summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.hardware8
-rwxr-xr-xbitbake/bin/bitbake26
-rwxr-xr-xbitbake/bin/bitbake-layers54
-rwxr-xr-xbitbake/bin/bitbake-worker64
-rwxr-xr-xbitbake/bin/toaster135
-rwxr-xr-xbitbake/bin/toaster-eventreplay179
-rwxr-xr-xbitbake/contrib/vim/plugin/newbb.vim1
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml31
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml88
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml2
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml64
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml126
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml2
-rw-r--r--bitbake/doc/bitbake.12
-rw-r--r--bitbake/lib/bb/__init__.py4
-rw-r--r--bitbake/lib/bb/build.py13
-rw-r--r--bitbake/lib/bb/cache.py44
-rw-r--r--bitbake/lib/bb/codeparser.py145
-rw-r--r--bitbake/lib/bb/command.py16
-rw-r--r--bitbake/lib/bb/cooker.py224
-rw-r--r--bitbake/lib/bb/cookerdata.py12
-rw-r--r--bitbake/lib/bb/daemonize.py15
-rw-r--r--bitbake/lib/bb/data.py49
-rw-r--r--bitbake/lib/bb/data_smart.py25
-rw-r--r--bitbake/lib/bb/event.py15
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py67
-rw-r--r--bitbake/lib/bb/fetch2/clearcase.py263
-rw-r--r--bitbake/lib/bb/fetch2/git.py54
-rw-r--r--bitbake/lib/bb/fetch2/hg.py5
-rw-r--r--bitbake/lib/bb/fetch2/local.py54
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py21
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py3
-rw-r--r--bitbake/lib/bb/fetch2/wget.py266
-rw-r--r--bitbake/lib/bb/monitordisk.py18
-rw-r--r--bitbake/lib/bb/namedtuple_with_abc.py4
-rw-r--r--bitbake/lib/bb/parse/__init__.py5
-rw-r--r--bitbake/lib/bb/parse/ast.py6
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py20
-rw-r--r--bitbake/lib/bb/runqueue.py67
-rw-r--r--bitbake/lib/bb/server/process.py21
-rw-r--r--bitbake/lib/bb/siggen.py56
-rw-r--r--bitbake/lib/bb/tests/data.py20
-rw-r--r--bitbake/lib/bb/tests/fetch.py86
-rw-r--r--bitbake/lib/bb/tinfoil.py9
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py463
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py5
-rw-r--r--bitbake/lib/bb/ui/depexp.py4
-rw-r--r--bitbake/lib/bb/ui/knotty.py17
-rw-r--r--bitbake/lib/bb/ui/ncurses.py4
-rw-r--r--bitbake/lib/bb/ui/toasterui.py57
-rw-r--r--bitbake/lib/bb/utils.py182
-rw-r--r--bitbake/lib/bs4/AUTHORS.txt43
-rw-r--r--bitbake/lib/bs4/COPYING.txt26
-rw-r--r--bitbake/lib/bs4/NEWS.txt1066
-rw-r--r--bitbake/lib/bs4/__init__.py406
-rw-r--r--bitbake/lib/bs4/builder/__init__.py321
-rw-r--r--bitbake/lib/bs4/builder/_html5lib.py285
-rw-r--r--bitbake/lib/bs4/builder/_htmlparser.py258
-rw-r--r--bitbake/lib/bs4/builder/_lxml.py233
-rw-r--r--bitbake/lib/bs4/dammit.py829
-rw-r--r--bitbake/lib/bs4/diagnose.py204
-rw-r--r--bitbake/lib/bs4/element.py1611
-rw-r--r--bitbake/lib/bs4/testing.py592
-rw-r--r--bitbake/lib/bs4/tests/__init__.py1
-rw-r--r--bitbake/lib/bs4/tests/test_builder_registry.py141
-rw-r--r--bitbake/lib/bs4/tests/test_docs.py36
-rw-r--r--bitbake/lib/bs4/tests/test_html5lib.py85
-rw-r--r--bitbake/lib/bs4/tests/test_htmlparser.py19
-rw-r--r--bitbake/lib/bs4/tests/test_lxml.py91
-rw-r--r--bitbake/lib/bs4/tests/test_soup.py434
-rw-r--r--bitbake/lib/bs4/tests/test_tree.py1829
-rw-r--r--bitbake/lib/progressbar.py2
-rw-r--r--bitbake/lib/prserv/db.py15
-rw-r--r--bitbake/lib/prserv/serv.py31
-rw-r--r--bitbake/lib/pyinotify.py2416
-rw-r--r--bitbake/lib/toaster/bldcontrol/admin.py8
-rw-r--r--bitbake/lib/toaster/bldcontrol/bbcontroller.py131
-rw-r--r--bitbake/lib/toaster/bldcontrol/fixtures/initial_data.json1
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py275
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py157
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py174
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py58
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py106
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py99
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py104
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py112
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py128
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py145
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py77
-rw-r--r--bitbake/lib/toaster/bldcontrol/sshbecontroller.py155
-rw-r--r--bitbake/lib/toaster/bldcontrol/tests.py137
-rw-r--r--bitbake/lib/toaster/bldviewer/templates/simple_build.html2
-rw-r--r--bitbake/lib/toaster/bldviewer/templates/simple_layer.html2
-rw-r--r--bitbake/lib/toaster/bldviewer/templates/simple_recipe.html2
-rw-r--r--bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py (renamed from bitbake/lib/toaster/bldviewer/templatetags/projecttags.py)0
-rw-r--r--bitbake/lib/toaster/orm/admin.py34
-rw-r--r--bitbake/lib/toaster/orm/management/__init__.py (renamed from scripts/lib/mic/3rdparty/pykickstart/__init__.py)0
-rw-r--r--bitbake/lib/toaster/orm/management/commands/__init__.py (renamed from scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py)0
-rw-r--r--bitbake/lib/toaster/orm/management/commands/lsupdates.py12
-rw-r--r--bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py257
-rw-r--r--bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py242
-rw-r--r--bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py252
-rw-r--r--bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py710
-rw-r--r--bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py336
-rw-r--r--bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py336
-rw-r--r--bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py359
-rw-r--r--bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py396
-rw-r--r--bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py331
-rw-r--r--bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py342
-rw-r--r--bitbake/lib/toaster/orm/models.py688
-rw-r--r--bitbake/lib/toaster/orm/tests.py36
-rw-r--r--bitbake/lib/toaster/orm/urls.py27
-rw-r--r--bitbake/lib/toaster/orm/views.py60
-rw-r--r--bitbake/lib/toaster/toastergui/static/css/default.css142
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular-animate.min.js28
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular-cookies.min.js8
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular-route.min.js14
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular-sanitize.min.js15
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular.min.js215
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/angular.min.js.map8
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js134
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/bootstrap.min.js11
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/importlayer.js289
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/jquery-ui.js15003
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js400
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/libtoaster.js387
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/main.js111
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projectapp.js807
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.js10
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.min.js10
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html112
-rw-r--r--[-rwxr-xr-x]bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basebuildpage.html7
-rw-r--r--bitbake/lib/toaster/toastergui/templates/baseprojectpage.html39
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_bottom.html53
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html19
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html16
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top_layers.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top_projectbuilds.html16
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html114
-rw-r--r--bitbake/lib/toaster/toastergui/templates/builddashboard.html177
-rw-r--r--bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html67
-rw-r--r--bitbake/lib/toaster/toastergui/templates/configuration.html6
-rw-r--r--bitbake/lib/toaster/toastergui/templates/filtersnippet.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html116
-rw-r--r--bitbake/lib/toaster/toastergui/templates/landing.html66
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layerdetails.html489
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layers.html288
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layers_dep_modal.html99
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machines.html63
-rw-r--r--bitbake/lib/toaster/toastergui/templates/managed_builds.html135
-rw-r--r--bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html190
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html108
-rw-r--r--bitbake/lib/toaster/toastergui/templates/newproject.html99
-rw-r--r--bitbake/lib/toaster/toastergui/templates/package_detail_base.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html435
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectbuilds.html125
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html661
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projects.html36
-rw-r--r--bitbake/lib/toaster/toastergui/templates/recipe.html17
-rw-r--r--[-rwxr-xr-x]bitbake/lib/toaster/toastergui/templates/recipes.html7
-rw-r--r--bitbake/lib/toaster/toastergui/templates/target.html18
-rw-r--r--bitbake/lib/toaster/toastergui/templates/targets.html270
-rw-r--r--bitbake/lib/toaster/toastergui/templates/task.html19
-rw-r--r--bitbake/lib/toaster/toastergui/templates/tasks.html12
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py60
-rw-r--r--bitbake/lib/toaster/toastergui/urls.py41
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py2151
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py90
-rw-r--r--bitbake/lib/toaster/toastermain/urls.py38
-rw-r--r--bitbake/toaster-requirements.txt4
-rw-r--r--documentation/Makefile183
-rw-r--r--documentation/adt-manual/adt-command.xml6
-rw-r--r--documentation/adt-manual/adt-manual-customization.xsl2
-rw-r--r--documentation/adt-manual/adt-manual.xml7
-rw-r--r--documentation/adt-manual/adt-package.xml12
-rw-r--r--documentation/adt-manual/adt-prepare.xml18
-rw-r--r--documentation/bsp-guide/bsp-guide-customization.xsl2
-rw-r--r--documentation/bsp-guide/bsp-guide.xml7
-rw-r--r--documentation/bsp-guide/bsp.xml237
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml1917
-rw-r--r--documentation/dev-manual/dev-manual-customization.xsl2
-rw-r--r--documentation/dev-manual/dev-manual-intro.xml101
-rw-r--r--documentation/dev-manual/dev-manual-model.xml102
-rw-r--r--documentation/dev-manual/dev-manual-newbie.xml71
-rw-r--r--documentation/dev-manual/dev-manual-qemu.xml419
-rw-r--r--documentation/dev-manual/dev-manual-start.xml49
-rw-r--r--documentation/dev-manual/dev-manual.xml9
-rw-r--r--documentation/dev-manual/figures/yp-download.pngbin193275 -> 230971 bytes
-rw-r--r--documentation/kernel-dev/kernel-dev-advanced.xml35
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml11
-rw-r--r--documentation/kernel-dev/kernel-dev-customization.xsl2
-rw-r--r--documentation/kernel-dev/kernel-dev-intro.xml2
-rw-r--r--documentation/kernel-dev/kernel-dev-maint-appx.xml6
-rw-r--r--documentation/kernel-dev/kernel-dev.xml7
-rw-r--r--documentation/mega-manual/figures/buildhistory.pngbin42532 -> 44913 bytes
-rw-r--r--documentation/mega-manual/figures/yp-download.pngbin193275 -> 230971 bytes
-rw-r--r--documentation/mega-manual/mega-manual-customization.xsl2
-rw-r--r--documentation/poky.ent20
-rw-r--r--documentation/profile-manual/profile-manual-customization.xsl2
-rw-r--r--documentation/profile-manual/profile-manual-usage.xml26
-rw-r--r--documentation/profile-manual/profile-manual.xml7
-rw-r--r--documentation/ref-manual/closer-look.xml32
-rw-r--r--documentation/ref-manual/faq.xml111
-rw-r--r--documentation/ref-manual/figures/buildhistory.pngbin42532 -> 44913 bytes
-rw-r--r--documentation/ref-manual/introduction.xml30
-rw-r--r--documentation/ref-manual/migration.xml342
-rw-r--r--documentation/ref-manual/ref-classes.xml259
-rw-r--r--documentation/ref-manual/ref-features.xml176
-rw-r--r--documentation/ref-manual/ref-images.xml273
-rw-r--r--documentation/ref-manual/ref-manual-customization.xsl3
-rw-r--r--documentation/ref-manual/ref-manual.xml7
-rw-r--r--documentation/ref-manual/ref-qa-checks.xml139
-rw-r--r--documentation/ref-manual/ref-structure.xml11
-rw-r--r--documentation/ref-manual/ref-style.css15
-rw-r--r--documentation/ref-manual/ref-tasks.xml21
-rw-r--r--documentation/ref-manual/ref-variables.xml3188
-rw-r--r--documentation/ref-manual/resources.xml8
-rw-r--r--documentation/ref-manual/technical-details.xml11
-rw-r--r--documentation/ref-manual/usingpoky.xml185
-rw-r--r--documentation/template/qa-code-permalinks.xsl23
-rw-r--r--documentation/tools/mega-manual.sed39
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs-customization.xsl2
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs.xml94
-rw-r--r--meta-yocto-bsp/conf/machine/beaglebone.conf4
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py2
-rw-r--r--meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend10
-rw-r--r--meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend7
-rw-r--r--meta-yocto/conf/distro/include/maintainers.inc229
-rw-r--r--meta-yocto/conf/distro/include/package_regex.inc409
-rw-r--r--meta-yocto/conf/distro/include/poky-floating-revisions.inc16
-rw-r--r--meta-yocto/conf/distro/include/upstream_tracking.inc154
-rw-r--r--meta-yocto/conf/distro/poky-lsb.conf3
-rw-r--r--meta-yocto/conf/distro/poky-tiny.conf7
-rw-r--r--meta-yocto/conf/distro/poky.conf47
-rw-r--r--meta-yocto/conf/local.conf.sample27
-rw-r--r--meta-yocto/conf/local.conf.sample.extended47
-rw-r--r--meta-yocto/conf/toasterconf.json104
-rw-r--r--meta-yocto/recipes-core/tiny-init/tiny-init.bb2
-rw-r--r--meta/classes/allarch.bbclass7
-rw-r--r--meta/classes/archiver.bbclass9
-rw-r--r--meta/classes/autotools.bbclass55
-rw-r--r--meta/classes/base.bbclass151
-rw-r--r--meta/classes/binconfig-disabled.bbclass13
-rw-r--r--meta/classes/boot-directdisk.bbclass24
-rw-r--r--meta/classes/bootimg.bbclass42
-rw-r--r--meta/classes/buildhistory.bbclass56
-rw-r--r--meta/classes/chrpath.bbclass1
-rw-r--r--meta/classes/cmake.bbclass9
-rw-r--r--meta/classes/cml1.bbclass7
-rw-r--r--meta/classes/compress_doc.bbclass260
-rw-r--r--meta/classes/core-image.bbclass5
-rw-r--r--meta/classes/cpan.bbclass4
-rw-r--r--meta/classes/cpan_build.bbclass5
-rw-r--r--meta/classes/cross-canadian.bbclass16
-rw-r--r--meta/classes/crosssdk.bbclass3
-rw-r--r--meta/classes/debian.bbclass16
-rw-r--r--meta/classes/distrodata.bbclass492
-rw-r--r--meta/classes/externalsrc.bbclass3
-rw-r--r--meta/classes/fontcache.bbclass7
-rw-r--r--meta/classes/gnomebase.bbclass14
-rw-r--r--meta/classes/grub-efi.bbclass2
-rw-r--r--meta/classes/icecc.bbclass15
-rw-r--r--meta/classes/image-buildinfo.bbclass69
-rw-r--r--meta/classes/image-live.bbclass2
-rw-r--r--meta/classes/image-mklibs.bbclass2
-rw-r--r--meta/classes/image-swab.bbclass2
-rw-r--r--meta/classes/image-vmdk.bbclass2
-rw-r--r--meta/classes/image.bbclass101
-rw-r--r--meta/classes/image_types.bbclass38
-rw-r--r--meta/classes/insane.bbclass205
-rw-r--r--meta/classes/kernel-module-split.bbclass16
-rw-r--r--meta/classes/kernel-yocto.bbclass220
-rw-r--r--meta/classes/kernel.bbclass171
-rw-r--r--meta/classes/kernelsrc.bbclass10
-rw-r--r--meta/classes/libc-common.bbclass19
-rw-r--r--meta/classes/libc-package.bbclass5
-rw-r--r--meta/classes/license.bbclass104
-rw-r--r--meta/classes/linux-kernel-base.bbclass13
-rw-r--r--meta/classes/metadata_scm.bbclass2
-rw-r--r--meta/classes/module-base.bbclass12
-rw-r--r--meta/classes/module.bbclass6
-rw-r--r--meta/classes/multilib.bbclass6
-rw-r--r--meta/classes/multilib_global.bbclass117
-rw-r--r--meta/classes/native.bbclass27
-rw-r--r--meta/classes/nativesdk.bbclass3
-rw-r--r--meta/classes/oelint.bbclass251
-rw-r--r--meta/classes/package.bbclass211
-rw-r--r--meta/classes/package_deb.bbclass17
-rw-r--r--meta/classes/package_ipk.bbclass29
-rw-r--r--meta/classes/package_rpm.bbclass38
-rw-r--r--meta/classes/packagegroup.bbclass7
-rw-r--r--meta/classes/populate_sdk_base.bbclass255
-rw-r--r--meta/classes/populate_sdk_deb.bbclass13
-rw-r--r--meta/classes/populate_sdk_ipk.bbclass3
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass16
-rw-r--r--meta/classes/prserv.bbclass31
-rw-r--r--meta/classes/ptest-gnome.bbclass8
-rw-r--r--meta/classes/pythonnative.bbclass2
-rw-r--r--meta/classes/qemu.bbclass28
-rw-r--r--meta/classes/qt4e.bbclass3
-rw-r--r--meta/classes/qt4x11.bbclass8
-rw-r--r--meta/classes/report-error.bbclass13
-rw-r--r--meta/classes/rm_work.bbclass21
-rw-r--r--meta/classes/rootfs_deb.bbclass15
-rw-r--r--meta/classes/rootfs_ipk.bbclass3
-rw-r--r--meta/classes/rootfs_rpm.bbclass21
-rw-r--r--meta/classes/sanity.bbclass107
-rw-r--r--meta/classes/siteconfig.bbclass8
-rw-r--r--meta/classes/siteinfo.bbclass8
-rw-r--r--meta/classes/spdx.bbclass338
-rw-r--r--meta/classes/sstate.bbclass110
-rw-r--r--meta/classes/staging.bbclass1
-rw-r--r--meta/classes/syslinux.bbclass2
-rw-r--r--meta/classes/systemd.bbclass7
-rw-r--r--meta/classes/testimage.bbclass109
-rw-r--r--meta/classes/toaster.bbclass56
-rw-r--r--meta/classes/toolchain-scripts.bbclass24
-rw-r--r--meta/classes/uboot-config.bbclass3
-rw-r--r--meta/classes/uninative.bbclass44
-rw-r--r--meta/classes/update-rc.d.bbclass3
-rw-r--r--meta/classes/useradd-staticids.bbclass8
-rw-r--r--meta/classes/useradd.bbclass4
-rw-r--r--meta/classes/utils.bbclass2
-rw-r--r--meta/conf/abi_version.conf2
-rw-r--r--meta/conf/bitbake.conf40
-rw-r--r--meta/conf/distro/defaultsetup.conf2
-rw-r--r--meta/conf/distro/include/default-distrovars.inc6
-rw-r--r--meta/conf/distro/include/default-providers.inc3
-rw-r--r--meta/conf/distro/include/default-versions.inc5
-rw-r--r--meta/conf/distro/include/security_flags.inc11
-rw-r--r--meta/conf/distro/include/tclibc-eglibc.inc40
-rw-r--r--meta/conf/distro/include/tclibc-glibc.inc40
-rw-r--r--meta/conf/distro/include/tclibc-musl.inc4
-rw-r--r--meta/conf/distro/include/tclibc-uclibc.inc4
-rw-r--r--meta/conf/distro/include/tcmode-default.inc25
-rw-r--r--meta/conf/documentation.conf23
-rw-r--r--meta/conf/layer.conf8
-rw-r--r--meta/conf/licenses.conf27
-rw-r--r--meta/conf/machine/include/arm/arch-arm64.inc36
-rw-r--r--meta/conf/machine/include/arm/arch-armv8.inc1
-rw-r--r--meta/conf/machine/include/arm/feature-arm-thumb.inc10
-rw-r--r--meta/conf/machine/include/mips/arch-mips.inc4
-rw-r--r--meta/conf/machine/include/tune-mips32r2.inc2
-rw-r--r--meta/conf/machine/include/tune-mips64.inc2
-rw-r--r--meta/conf/machine/include/tune-power5.inc21
-rw-r--r--meta/conf/machine/include/tune-power6.inc21
-rw-r--r--meta/conf/machine/include/tune-power7.inc21
-rw-r--r--meta/conf/machine/qemuarm64.conf12
-rw-r--r--meta/conf/machine/qemumips.conf2
-rw-r--r--meta/conf/machine/qemux86-64.conf2
-rw-r--r--meta/conf/machine/qemux86.conf2
-rw-r--r--meta/conf/multilib.conf2
-rw-r--r--meta/conf/sanity.conf2
-rw-r--r--meta/conf/toasterconf.json84
-rw-r--r--meta/files/common-licenses/SMAIL_GPL164
-rw-r--r--meta/files/common-licenses/XSL48
-rw-r--r--meta/files/fs-perms.txt16
-rw-r--r--meta/files/toolchain-shar-template.sh190
-rw-r--r--meta/lib/oe/classextend.py14
-rw-r--r--meta/lib/oe/image.py34
-rw-r--r--meta/lib/oe/package.py29
-rw-r--r--meta/lib/oe/package_manager.py217
-rw-r--r--meta/lib/oe/patch.py158
-rw-r--r--meta/lib/oe/recipeutils.py279
-rw-r--r--meta/lib/oe/rootfs.py122
-rw-r--r--meta/lib/oe/sdk.py4
-rw-r--r--meta/lib/oe/sstatesig.py108
-rw-r--r--meta/lib/oe/terminal.py6
-rw-r--r--meta/lib/oe/utils.py33
-rw-r--r--meta/lib/oeqa/oetest.py57
-rw-r--r--meta/lib/oeqa/runtime/_ptest.py124
-rw-r--r--meta/lib/oeqa/runtime/buildcvs.py3
-rw-r--r--meta/lib/oeqa/runtime/buildiptables.py3
-rw-r--r--meta/lib/oeqa/runtime/buildsudoku.py3
-rw-r--r--meta/lib/oeqa/runtime/connman.py2
-rw-r--r--meta/lib/oeqa/runtime/date.py1
-rw-r--r--meta/lib/oeqa/runtime/df.py1
-rw-r--r--meta/lib/oeqa/runtime/dmesg.py3
-rw-r--r--meta/lib/oeqa/runtime/files/test.cpp3
-rw-r--r--meta/lib/oeqa/runtime/gcc.py10
-rw-r--r--meta/lib/oeqa/runtime/kernelmodule.py1
-rw-r--r--meta/lib/oeqa/runtime/ldd.py3
-rw-r--r--meta/lib/oeqa/runtime/logrotate.py1
-rw-r--r--meta/lib/oeqa/runtime/multilib.py1
-rw-r--r--meta/lib/oeqa/runtime/pam.py9
-rw-r--r--meta/lib/oeqa/runtime/parselogs.py202
-rw-r--r--meta/lib/oeqa/runtime/perl.py1
-rw-r--r--meta/lib/oeqa/runtime/python.py1
-rw-r--r--meta/lib/oeqa/runtime/rpm.py3
-rw-r--r--meta/lib/oeqa/runtime/scanelf.py2
-rw-r--r--meta/lib/oeqa/runtime/scp.py3
-rw-r--r--meta/lib/oeqa/runtime/skeletoninit.py3
-rw-r--r--meta/lib/oeqa/runtime/smart.py13
-rw-r--r--meta/lib/oeqa/runtime/ssh.py1
-rw-r--r--meta/lib/oeqa/runtime/syslog.py2
-rw-r--r--meta/lib/oeqa/runtime/systemd.py4
-rw-r--r--meta/lib/oeqa/runtime/vnc.py3
-rw-r--r--meta/lib/oeqa/runtime/x32lib.py1
-rw-r--r--meta/lib/oeqa/runtime/xorg.py4
-rw-r--r--meta/lib/oeqa/sdk/__init__.py3
-rw-r--r--meta/lib/oeqa/sdk/buildcvs.py25
-rw-r--r--meta/lib/oeqa/sdk/buildiptables.py26
-rw-r--r--meta/lib/oeqa/sdk/buildsudoku.py26
-rw-r--r--meta/lib/oeqa/selftest/_toaster.py94
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py27
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py29
-rw-r--r--meta/lib/oeqa/selftest/devtool.py241
-rw-r--r--meta/lib/oeqa/selftest/oescripts.py12
-rw-r--r--meta/lib/oeqa/selftest/prservice.py10
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py35
-rw-r--r--meta/lib/oeqa/utils/commands.py14
-rw-r--r--meta/lib/oeqa/utils/decorators.py133
-rw-r--r--meta/lib/oeqa/utils/httpserver.py2
-rw-r--r--meta/lib/oeqa/utils/logparser.py125
-rw-r--r--meta/lib/oeqa/utils/targetbuild.py94
-rw-r--r--meta/recipes-bsp/acpid/acpid.inc23
-rw-r--r--meta/recipes-bsp/acpid/acpid/acpid.service10
-rw-r--r--meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch10
-rw-r--r--meta/recipes-bsp/acpid/acpid_2.0.23.bb (renamed from meta/recipes-bsp/acpid/acpid_1.0.10.bb)5
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb23
-rw-r--r--meta/recipes-bsp/formfactor/formfactor_0.0.bb2
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch22
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb40
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb33
-rw-r--r--meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch32
-rw-r--r--meta/recipes-bsp/grub/files/cfg2
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch44
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch28
-rw-r--r--meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch32
-rw-r--r--meta/recipes-bsp/grub/files/grub-install.in.patch (renamed from meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch104
-rw-r--r--meta/recipes-bsp/grub/files/remove-gets.patch (renamed from meta/recipes-bsp/grub/grub-2.00/remove-gets.patch)0
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.00.bb49
-rw-r--r--meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch34
-rw-r--r--meta/recipes-bsp/grub/grub2.inc44
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb30
-rw-r--r--meta/recipes-bsp/grub/grub_git.bb20
-rw-r--r--meta/recipes-bsp/hostap/hostap-conf_1.0.bb2
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch27
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb1
-rw-r--r--meta/recipes-bsp/keymaps/keymaps_1.0.bb34
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch92
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.3.0.bb (renamed from meta/recipes-bsp/pciutils/pciutils_3.2.1.bb)23
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils.inc4
-rw-r--r--meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb2
-rw-r--r--meta/recipes-bsp/setserial/setserial/ldflags.patch24
-rw-r--r--meta/recipes-bsp/setserial/setserial_2.17.bb3
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch74
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb38
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb35
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb47
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb29
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb34
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc11
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2013.07.bb25
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2014.07.bb9
-rw-r--r--meta/recipes-bsp/usbutils/usbutils-008/iconv.patch41
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_008.bb28
-rw-r--r--meta/recipes-bsp/v86d/v86d/uvesafb.conf2
-rw-r--r--meta/recipes-bsp/v86d/v86d_0.1.10.bb31
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb7
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc8
-rw-r--r--meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch35
-rw-r--r--meta/recipes-connectivity/bind/bind/bind92
-rw-r--r--meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch990
-rw-r--r--meta/recipes-connectivity/bind/bind/conf.patch18
-rw-r--r--meta/recipes-connectivity/bind/bind/generate-rndc-key.sh2
-rw-r--r--meta/recipes-connectivity/bind/bind/named.service2
-rw-r--r--meta/recipes-connectivity/bind/bind_9.9.5.bb27
-rw-r--r--meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb2
-rw-r--r--meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc31
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.21.bb3
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.27.bb51
-rw-r--r--meta/recipes-connectivity/connman/connman-conf.bb2
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch187
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome_0.7.bb7
-rw-r--r--meta/recipes-connectivity/connman/connman.inc17
-rw-r--r--meta/recipes-connectivity/connman/connman_1.26.bb (renamed from meta/recipes-connectivity/connman/connman_1.24.bb)6
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc29
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch26
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch112
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch176
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/site.h21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb (renamed from meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb)5
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcpd.service11
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcrelay.service9
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb (renamed from meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb)4
-rw-r--r--meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch75
-rw-r--r--meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb18
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb10
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc12
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch24
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb (renamed from meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb)8
-rw-r--r--meta/recipes-connectivity/neard/neard.inc4
-rw-r--r--meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch33
-rw-r--r--meta/recipes-connectivity/neard/neard/neard.service.in6
-rw-r--r--meta/recipes-connectivity/neard/neard/parallel-build.patch2
-rw-r--r--meta/recipes-connectivity/neard/neard_0.14.bb2
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch41
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb)13
-rw-r--r--meta/recipes-connectivity/ofono/ofono.inc16
-rw-r--r--meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch1270
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.14.bb13
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.15.bb12
-rw-r--r--meta/recipes-connectivity/openssh/openssh/init12
-rw-r--r--meta/recipes-connectivity/openssh/openssh/nostrip.patch20
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch29
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch22
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch114
-rw-r--r--meta/recipes-connectivity/openssh/openssh/ssh_config4
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd@.service1
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd_config30
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service1
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.7p1.bb (renamed from meta/recipes-connectivity/openssh/openssh_6.6p1.bb)25
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc35
-rw-r--r--meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch45
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.1j.bb (renamed from meta/recipes-connectivity/openssl/openssl_1.0.1h.bb)5
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc22
-rw-r--r--meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch (renamed from meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch)0
-rw-r--r--meta/recipes-connectivity/portmap/portmap/portmap.service10
-rw-r--r--meta/recipes-connectivity/portmap/portmap/tcpd-config.patch (renamed from meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch)0
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb9
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb2
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb (renamed from meta/recipes-connectivity/ppp/ppp_2.4.6.bb)4
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf4
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch20
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb (renamed from meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb)21
-rw-r--r--meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch29
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.2.4.bb2
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch18
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch15
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb23
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb16
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch15
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb17
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch76
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb51
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch43
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch26
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch26
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb32
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc28
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig (renamed from meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls)2
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch14
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb (renamed from meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb)0
-rw-r--r--meta/recipes-core/base-files/base-files/profile6
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb29
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.29.bb6
-rw-r--r--meta/recipes-core/busybox/busybox.inc5
-rw-r--r--meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch41
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch71
-rw-r--r--meta/recipes-core/busybox/busybox/defconfig6
-rw-r--r--meta/recipes-core/busybox/busybox/recognize_connmand.patch21
-rw-r--r--meta/recipes-core/busybox/busybox_1.22.1.bb4
-rw-r--r--meta/recipes-core/busybox/busybox_git.bb1
-rw-r--r--meta/recipes-core/busybox/files/find-touchscreen.sh7
-rwxr-xr-xmeta/recipes-core/busybox/files/mdev12
-rw-r--r--meta/recipes-core/busybox/files/mdev-mount.sh63
-rw-r--r--meta/recipes-core/busybox/files/mdev.conf5
-rw-r--r--meta/recipes-core/busybox/files/simple.script4
-rw-r--r--meta/recipes-core/busybox/files/syslog2
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch)12
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch39
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.23.bb (renamed from meta/recipes-core/coreutils/coreutils_8.22.bb)12
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc1
-rw-r--r--meta/recipes-core/dbus/dbus-glib/no-examples.patch (renamed from meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch)0
-rw-r--r--meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch (renamed from meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch)57
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.100.2.bb5
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.102.bb5
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.8.10.bb (renamed from meta/recipes-core/dbus/dbus-test_1.8.2.bb)4
-rw-r--r--meta/recipes-core/dbus/dbus.inc2
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.10.bb4
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.2.bb4
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc9
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch2
-rw-r--r--meta/recipes-core/dropbear/dropbear_2014.63.bb4
-rw-r--r--meta/recipes-core/dropbear/dropbear_2014.66.bb4
-rw-r--r--meta/recipes-core/eglibc/cross-localedef-native_2.19.bb48
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch912
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch169
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch176
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch143
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch22
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch32
-rw-r--r--meta/recipes-core/eglibc/eglibc-common.inc9
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial_2.19.bb11
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale_2.19.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace.inc13
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts.inc16
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts_2.19.bb1
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.4/parallel.patch (renamed from meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch)13
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template53
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgzbin37591 -> 0 bytes
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch43
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING)2
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in)47
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgzbin0 -> 39744 bytes
-rwxr-xr-xmeta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath)18
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin)0
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb (renamed from meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb)3
-rw-r--r--meta/recipes-core/gettext/gettext_0.19.4.bb (renamed from meta/recipes-core/gettext/gettext_0.18.3.2.bb)4
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb)5
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc40
-rw-r--r--meta/recipes-core/glib-networking/glib-networking_2.38.0.bb2
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch (renamed from meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch)6
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.20.bb56
-rw-r--r--meta/recipes-core/glibc/glibc-collateral.inc (renamed from meta/recipes-core/eglibc/eglibc-collateral.inc)2
-rw-r--r--meta/recipes-core/glibc/glibc-common.inc9
-rw-r--r--meta/recipes-core/glibc/glibc-initial.inc (renamed from meta/recipes-core/eglibc/eglibc-initial.inc)46
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.20.bb11
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc (renamed from meta/recipes-core/eglibc/eglibc-ld.inc)6
-rw-r--r--meta/recipes-core/glibc/glibc-locale.inc (renamed from meta/recipes-core/eglibc/eglibc-locale.inc)48
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace.inc13
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-options.inc (renamed from meta/recipes-core/eglibc/eglibc-options.inc)82
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc (renamed from meta/recipes-core/eglibc/eglibc-package.inc)83
-rw-r--r--meta/recipes-core/glibc/glibc-scripts.inc16
-rw-r--r--meta/recipes-core/glibc/glibc-scripts_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-testing.inc (renamed from meta/recipes-core/eglibc/eglibc-testing.inc)72
-rw-r--r--meta/recipes-core/glibc/glibc.inc (renamed from meta/recipes-core/eglibc/eglibc.inc)27
-rw-r--r--meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch)13
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch339
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch215
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch65
-rw-r--r--meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch529
-rw-r--r--meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch85
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch109
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch68
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch54
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch42
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch16543
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc.patch602
-rw-r--r--meta/recipes-core/glibc/glibc/etc/ld.so.conf (renamed from meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf)0
-rw-r--r--meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch)16
-rw-r--r--meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch29
-rw-r--r--meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch)38
-rw-r--r--meta/recipes-core/glibc/glibc/generate-supported.mk (renamed from meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk)0
-rw-r--r--meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch)114
-rw-r--r--meta/recipes-core/glibc/glibc/grok_gold.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch)16
-rw-r--r--meta/recipes-core/glibc/glibc/initgroups_keys.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch)14
-rw-r--r--meta/recipes-core/glibc/glibc/ld-search-order.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch)20
-rw-r--r--meta/recipes-core/glibc/glibc/mips-rld-map-check.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch)7
-rw-r--r--meta/recipes-core/glibc/glibc/multilib_readlib.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/option-groups.patch1397
-rw-r--r--meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch)136
-rw-r--r--meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/relocatable_sdk.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch38
-rw-r--r--meta/recipes-core/glibc/glibc_2.20.bb (renamed from meta/recipes-core/eglibc/eglibc_2.19.bb)50
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/README (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/README)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch47
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2 (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2)bin21491 -> 21491 bytes
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native_2.12.1.bb (renamed from meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb)1
-rw-r--r--meta/recipes-core/glibc/site_config/funcs (renamed from meta/recipes-core/eglibc/site_config/funcs)0
-rw-r--r--meta/recipes-core/glibc/site_config/headers (renamed from meta/recipes-core/eglibc/site_config/headers)0
-rw-r--r--meta/recipes-core/glibc/site_config/types (renamed from meta/recipes-core/eglibc/site_config/types)0
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx58
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf2
-rw-r--r--meta/recipes-core/images/build-appliance-image_12.0.1.bb (renamed from meta/recipes-core/images/build-appliance-image_8.0.bb)2
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/{{=machine}}/interfaces)0
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh141
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh4
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh10
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb6
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb2
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh16
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/hostname.sh2
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh2
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/urandom21
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb8
-rw-r--r--meta/recipes-core/kbd/kbd_2.0.2.bb (renamed from meta/recipes-core/kbd/kbd_2.0.1.bb)6
-rw-r--r--meta/recipes-core/libxml/libxml2.inc19
-rw-r--r--meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch30
-rw-r--r--meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch45
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch204
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch147
-rw-r--r--meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch17
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.2.bb (renamed from meta/recipes-core/libxml/libxml2_2.9.1.bb)7
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb33
-rw-r--r--meta/recipes-core/meta/meta-environment.bb46
-rw-r--r--meta/recipes-core/meta/meta-ide-support.bb1
-rw-r--r--meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb19
-rw-r--r--meta/recipes-core/meta/package-index.bb1
-rw-r--r--meta/recipes-core/meta/uninative-tarball.bb48
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc2
-rw-r--r--meta/recipes-core/netbase/netbase_5.3.bb (renamed from meta/recipes-core/netbase/netbase_5.2.bb)6
-rw-r--r--meta/recipes-core/os-release/os-release.bb36
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-base.bb17
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-boot.bb11
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-nfs.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-sdk.bb18
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb9
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb9
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb7
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-self-hosted.bb46
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb12
-rw-r--r--meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch32
-rw-r--r--meta/recipes-core/readline/readline-6.3/readline63-00343
-rw-r--r--meta/recipes-core/readline/readline_6.3.bb3
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service2
-rw-r--r--meta/recipes-core/systemd/systemd-systemctl-native.bb2
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl45
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch180
-rw-r--r--meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch138
-rw-r--r--meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch176
-rw-r--r--meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch56
-rw-r--r--meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch142
-rw-r--r--meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest2
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-older-kernel.patch56
-rw-r--r--meta/recipes-core/systemd/systemd_216.bb (renamed from meta/recipes-core/systemd/systemd_213.bb)75
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb4
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/01_bootlogd1
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/bootlogd.init14
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/rc3
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb7
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc6
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch75
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch33
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch377
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch75
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch125
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc6
-rw-r--r--meta/recipes-core/udev/udev-extraconf/automount.rules2
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh3
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.1.bb2
-rw-r--r--meta/recipes-core/udev/udev.inc5
-rw-r--r--meta/recipes-core/udev/udev/add-install-ptest.patch19
-rw-r--r--meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch59
-rw-r--r--meta/recipes-core/udev/udev/init66
-rw-r--r--meta/recipes-core/udev/udev/run-ptest2
-rw-r--r--meta/recipes-core/udev/udev/udev-cache45
-rw-r--r--meta/recipes-core/udev/udev/udev-cache.default2
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc55
-rw-r--r--meta/recipes-core/util-linux/util-linux/MCONFIG223
-rw-r--r--meta/recipes-core/util-linux/util-linux/defines.h10
-rw-r--r--meta/recipes-core/util-linux/util-linux/fix-configure.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/make_include17
-rw-r--r--meta/recipes-core/util-linux/util-linux/swapargs.h3
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch34
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native.patch54
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch24
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.25.2.bb (renamed from meta/recipes-core/util-linux/util-linux_2.24.2.bb)8
-rw-r--r--meta/recipes-core/volatile-binds/files/COPYING.MIT17
-rwxr-xr-xmeta/recipes-core/volatile-binds/files/mount-copybind34
-rw-r--r--meta/recipes-core/volatile-binds/files/volatile-binds.service.in19
-rw-r--r--meta/recipes-core/volatile-binds/volatile-binds.bb69
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch45
-rw-r--r--meta/recipes-core/zlib/zlib_1.2.8.bb1
-rw-r--r--meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch193
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc1
-rw-r--r--meta/recipes-devtools/apt/apt.inc1
-rw-r--r--meta/recipes-devtools/apt/apt_0.9.9.4.bb2
-rw-r--r--meta/recipes-devtools/autoconf/autoconf.inc1
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch13
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.69.bb3
-rw-r--r--meta/recipes-devtools/autogen/autogen-native_5.18.4.bb (renamed from meta/recipes-devtools/autogen/autogen-native_5.18.3.bb)6
-rw-r--r--meta/recipes-devtools/automake/automake_1.15.bb (renamed from meta/recipes-devtools/automake/automake_1.14.1.bb)4
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.24.inc8
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc2
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch67
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch102
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch60
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch89
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch523
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch47
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch75
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch177
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch27
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh18
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2_git.bb157
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch58
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch22
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch31
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb11
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb4
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb1
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc8
-rw-r--r--meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake18
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch37
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch40
-rw-r--r--meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh1
-rw-r--r--meta/recipes-devtools/cmake/cmake_2.8.12.2.bb14
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch20
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/aclocal.patch38
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/dirfix.patch27
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.59.bb (renamed from meta/recipes-devtools/diffstat/diffstat_1.58.bb)7
-rwxr-xr-xmeta/recipes-devtools/distcc/files/distcc5
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode_2.12.bb2
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS16
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch515
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml68
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb64
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch24
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml6
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb69
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb5
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc7
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch68
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch97
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch24
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.17.21.bb (renamed from meta/recipes-devtools/dpkg/dpkg_1.17.4.bb)6
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch54
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m453
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb14
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/arm_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff (renamed from meta/recipes-devtools/elfutils/elfutils/elf_additions.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch36
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/mips_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch (renamed from meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch (renamed from meta/recipes-devtools/elfutils/elfutils/remove-unused.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch27
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff77
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch34
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff1756
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch256
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff)382
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch166
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch83
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff)588
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch29
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb22
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.161.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.158.bb)27
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.bb5
-rw-r--r--meta/recipes-devtools/fdisk/gptfdisk_git.bb22
-rw-r--r--meta/recipes-devtools/file/file/debian-742262.patch19
-rw-r--r--meta/recipes-devtools/file/file/dump81
-rw-r--r--meta/recipes-devtools/file/file/filesystems812
-rw-r--r--meta/recipes-devtools/file/file_5.22.bb (renamed from meta/recipes-devtools/file/file_5.18.bb)17
-rw-r--r--meta/recipes-devtools/flex/flex.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc187
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch66
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch81
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9.inc193
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch66
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch98
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch61
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch32
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch113
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch59
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch81
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc48
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc77
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc26
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc38
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc31
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc35
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc185
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc117
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-shared-source.inc9
-rw-r--r--meta/recipes-devtools/gcc/gcc-source.inc34
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_4.8.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_4.9.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc110
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc6
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc42
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc31
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.8.1.inc (renamed from meta/recipes-devtools/gdb/gdb-7.7.inc)5
-rw-r--r--meta/recipes-devtools/gdb/gdb-common.inc6
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc2
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross.inc13
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross_7.7.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc3
-rw-r--r--meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb_7.7.bb)0
-rw-r--r--meta/recipes-devtools/git/git.inc22
-rw-r--r--meta/recipes-devtools/git/git_2.2.1.bb (renamed from meta/recipes-devtools/git/git_1.9.0.bb)6
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20120814.bb2
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_git.bb2
-rw-r--r--meta/recipes-devtools/guile/files/arm_aarch64.patch19
-rw-r--r--meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch42
-rw-r--r--meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch60
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.11.bb5
-rw-r--r--meta/recipes-devtools/help2man/help2man-native_1.46.4.bb (renamed from meta/recipes-devtools/help2man/help2man-native_1.45.1.bb)4
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk (renamed from meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk)0
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb26
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb34
-rw-r--r--meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb4
-rw-r--r--meta/recipes-devtools/insserv/files/run-ptest2
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal3
-rw-r--r--meta/recipes-devtools/installer/adt-installer_1.0.bb2
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.12.bb (renamed from meta/recipes-devtools/json-c/json-c_0.11.bb)6
-rw-r--r--meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb2
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.5.inc (renamed from meta/recipes-devtools/libtool/libtool-2.4.2.inc)19
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb (renamed from meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb)24
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.4.5.bb (renamed from meta/recipes-devtools/libtool/libtool-native_2.4.2.bb)3
-rw-r--r--meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch39
-rw-r--r--meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch32
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch30
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch15
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/fixinstall.patch35
-rw-r--r--meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch27
-rw-r--r--meta/recipes-devtools/libtool/libtool/norm-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch121
-rw-r--r--meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch68
-rw-r--r--meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch53
-rw-r--r--meta/recipes-devtools/libtool/libtool/trailingslash.patch11
-rw-r--r--meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch12
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.2.bb15
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.5.bb26
-rw-r--r--meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb (renamed from meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb)4
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb4
-rw-r--r--meta/recipes-devtools/m4/m4.inc1
-rw-r--r--meta/recipes-devtools/make/make_4.1.bb (renamed from meta/recipes-devtools/make/make_4.0.bb)4
-rw-r--r--meta/recipes-devtools/makedevs/makedevs_1.0.1.bb6
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage_git.bb2
-rw-r--r--meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch18
-rw-r--r--meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb (renamed from meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb)9
-rw-r--r--meta/recipes-devtools/mmc/mmc-utils_git.bb2
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch44
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_git.bb1
-rw-r--r--meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch23
-rw-r--r--meta/recipes-devtools/mtools/mtools_3.9.9.bb4
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.11.06.bb (renamed from meta/recipes-devtools/nasm/nasm_2.11.02.bb)4
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb2
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral.bb4
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc2
-rw-r--r--meta/recipes-devtools/opkg/opkg/add-exclude.patch32
-rw-r--r--meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch39
-rw-r--r--meta/recipes-devtools/opkg/opkg/no-install-recommends.patch26
-rw-r--r--meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch32
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.2.bb12
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.4.bb14
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.18.bb6
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.23.bb (renamed from meta/recipes-devtools/orc/orc.inc)6
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch26
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb1
-rw-r--r--meta/recipes-devtools/patchelf/patchelf_0.8.bb12
-rw-r--r--meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb (renamed from meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb)6
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb (renamed from meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb)8
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb2
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/config.sh7
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch21
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch30
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/run-ptest2
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.20.0.bb11
-rw-r--r--meta/recipes-devtools/perl/perl-ptest.inc2
-rw-r--r--meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc22
-rw-r--r--meta/recipes-devtools/perl/perl_5.20.0.bb23
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig.inc2
-rw-r--r--meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb (renamed from meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb)6
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb2
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch190
-rw-r--r--meta/recipes-devtools/pseudo/files/fallback-group2
-rw-r--r--meta/recipes-devtools/pseudo/files/fallback-passwd1
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch18
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch264
-rw-r--r--meta/recipes-devtools/pseudo/files/shutdownping.patch53
-rw-r--r--meta/recipes-devtools/pseudo/files/symver.patch26
-rw-r--r--meta/recipes-devtools/pseudo/pseudo.inc6
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.5.1.bb16
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.6.4.bb19
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb4
-rw-r--r--meta/recipes-devtools/python/fix-path.inc22
-rw-r--r--meta/recipes-devtools/python/python-2.7-manifest.inc18
-rw-r--r--meta/recipes-devtools/python/python-3.3-manifest.inc14
-rw-r--r--meta/recipes-devtools/python/python-argparse_1.2.1.bb17
-rw-r--r--meta/recipes-devtools/python/python-dbus_1.2.0.bb4
-rw-r--r--meta/recipes-devtools/python/python-distribute_0.6.32.bb8
-rw-r--r--meta/recipes-devtools/python/python-docutils_0.12.bb (renamed from meta/recipes-devtools/python/python-docutils_0.11.bb)6
-rw-r--r--meta/recipes-devtools/python/python-git_0.3.3.bb (renamed from meta/recipes-devtools/python/python-git_0.3.2.RC1.bb)5
-rw-r--r--meta/recipes-devtools/python/python-gitdb_0.6.1.bb (renamed from meta/recipes-devtools/python/python-gitdb_0.5.4.bb)5
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.3.bb5
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc64/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy_1.7.0.bb12
-rw-r--r--meta/recipes-devtools/python/python-pycairo_1.10.0.bb2
-rw-r--r--meta/recipes-devtools/python/python-pycurl/no-static-link.patch24
-rw-r--r--meta/recipes-devtools/python/python-pycurl_7.19.5.bb (renamed from meta/recipes-devtools/python/python-pycurl_7.19.3.bb)11
-rw-r--r--meta/recipes-devtools/python/python-pygobject_2.28.3.bb4
-rw-r--r--meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch13
-rw-r--r--meta/recipes-devtools/python/python-pygtk_2.24.0.bb30
-rw-r--r--meta/recipes-devtools/python/python-scons-native_2.3.2.bb (renamed from meta/recipes-devtools/python/python-scons-native_2.3.0.bb)2
-rw-r--r--meta/recipes-devtools/python/python-scons_2.3.2.bb (renamed from meta/recipes-devtools/python/python-scons_2.3.0.bb)6
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch37
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt.patch82
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-dflags.patch53
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch2
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch49
-rw-r--r--meta/recipes-devtools/python/python-smartpm_1.4.1.bb6
-rw-r--r--meta/recipes-devtools/python/python.inc4
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch15
-rw-r--r--meta/recipes-devtools/python/python/json-flaw-fix.patch27
-rw-r--r--meta/recipes-devtools/python/python/posix_close.patch43
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch75
-rw-r--r--meta/recipes-devtools/python/python/python2.7.3-nossl3.patch37
-rw-r--r--meta/recipes-devtools/python/python/remove-BOM-insection-code.patch24
-rw-r--r--meta/recipes-devtools/python/python3-distribute_0.6.32.bb2
-rw-r--r--meta/recipes-devtools/python/python3-native_3.3.3.bb2
-rw-r--r--meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch33
-rw-r--r--meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch28
-rw-r--r--meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch50
-rw-r--r--meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch54
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb31
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb18
-rw-r--r--meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch10
-rw-r--r--meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch93
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc14
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc52
-rw-r--r--meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch32
-rw-r--r--meta/recipes-devtools/qemu/qemu/no-strip.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu/wacom.patch130
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu_2.0.0.bb)19
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb2
-rw-r--r--meta/recipes-devtools/quilt/quilt-0.63.inc4
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/run-ptest2
-rw-r--r--meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch39
-rw-r--r--meta/recipes-devtools/remake/remake_git.bb4
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch20
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch19
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh16
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch26
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch194
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch384
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch38
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch49
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch32
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-realpath.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch32
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.11.2.bb135
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4+cvs.bb6
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.14.bb9
-rw-r--r--meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c8
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.0.bb26
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.1.bb27
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service1
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb2
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch72
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch190
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch38
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch215
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb (renamed from meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb)21
-rw-r--r--meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch28
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch53
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/git-version-gen (renamed from meta/recipes-devtools/strace/strace-4.8/git-version-gen)0
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/run-ptest (renamed from meta/recipes-devtools/strace/strace-4.8/run-ptest)0
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch (renamed from meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch)37
-rw-r--r--meta/recipes-devtools/strace/strace_4.9.bb (renamed from meta/recipes-devtools/strace/strace_4.8.bb)7
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch20
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch48
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch32
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch42
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch15
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch130
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch68
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch (renamed from meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch)0
-rw-r--r--meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch439
-rw-r--r--meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch29
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.6.15.bb5
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.7.10.bb45
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.8.10.bb49
-rw-r--r--meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch50
-rw-r--r--meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch450
-rw-r--r--meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch87
-rw-r--r--meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch65
-rw-r--r--meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch40
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch (renamed from meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch)17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch34
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.03.bb (renamed from meta/recipes-devtools/syslinux/syslinux_6.01.bb)18
-rw-r--r--meta/recipes-devtools/tcltk/tcl/run-ptest4
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.3.bb (renamed from meta/recipes-devtools/tcltk/tcl_8.6.1.bb)5
-rw-r--r--meta/recipes-devtools/ubootchart/files/sysvinit.patch14
-rw-r--r--meta/recipes-devtools/ubootchart/files/ubootchart-stop3
-rw-r--r--meta/recipes-devtools/ubootchart/files/ubootchart.desktop6
-rw-r--r--meta/recipes-devtools/ubootchart/ubootchart_svn.bb39
-rw-r--r--meta/recipes-devtools/unifdef/files/unifdef.c1005
-rw-r--r--meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb21
-rw-r--r--meta/recipes-devtools/unifdef/unifdef_2.10.bb15
-rw-r--r--meta/recipes-devtools/vala/vala.inc8
-rw-r--r--meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch (renamed from meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch)2
-rw-r--r--meta/recipes-devtools/vala/vala_0.16.0.bb8
-rw-r--r--meta/recipes-devtools/vala/vala_0.26.1.bb6
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/add-ptest.patch68
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch23
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch30
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch20
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch26
-rwxr-xr-xmeta/recipes-devtools/valgrind/valgrind/run-ptest3
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch25
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.10.1.bb (renamed from meta/recipes-devtools/valgrind/valgrind_3.9.0.bb)10
-rw-r--r--meta/recipes-devtools/xmlto/files/catalog.xml19
-rw-r--r--meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch30
-rw-r--r--meta/recipes-devtools/xmlto/xmlto_0.0.26.bb38
-rw-r--r--meta/recipes-extended/at/at/atd.init (renamed from meta/recipes-extended/at/files/S99at)0
-rw-r--r--meta/recipes-extended/at/at/atd.service (renamed from meta/recipes-extended/at/files/atd.service)0
-rw-r--r--meta/recipes-extended/at/at/configure-add-enable-pam.patch (renamed from meta/recipes-extended/at/files/configure-add-enable-pam.patch)0
-rw-r--r--meta/recipes-extended/at/at/file_replacement_with_gplv2.patch (renamed from meta/recipes-extended/at/files/file_replacement_with_gplv2.patch)0
-rw-r--r--meta/recipes-extended/at/at/fix_parallel_build_error.patch (renamed from meta/recipes-extended/at/files/fix_parallel_build_error.patch)0
-rw-r--r--meta/recipes-extended/at/at/pam.conf.patch (renamed from meta/recipes-extended/at/files/pam.conf.patch)24
-rw-r--r--meta/recipes-extended/at/at/posixtm.c (renamed from meta/recipes-extended/at/files/posixtm.c)0
-rw-r--r--meta/recipes-extended/at/at/posixtm.h (renamed from meta/recipes-extended/at/files/posixtm.h)0
-rw-r--r--meta/recipes-extended/at/at_3.1.16.bb (renamed from meta/recipes-extended/at/at_3.1.14.bb)17
-rw-r--r--meta/recipes-extended/bash/bash.inc9
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb39
-rw-r--r--meta/recipes-extended/bash/bash_4.3.bb93
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb4
-rw-r--r--meta/recipes-extended/byacc/byacc_20141128.bb (renamed from meta/recipes-extended/byacc/byacc_20140422.bb)4
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac2
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb14
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch220
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch217
-rw-r--r--meta/recipes-extended/cpio/cpio_2.11.bb3
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb7
-rw-r--r--meta/recipes-extended/cracklib/cracklib_2.9.2.bb (renamed from meta/recipes-extended/cracklib/cracklib_2.9.1.bb)10
-rw-r--r--meta/recipes-extended/cronie/cronie/crontab6
-rw-r--r--meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch31
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.12.bb (renamed from meta/recipes-extended/cronie/cronie_1.4.11.bb)16
-rw-r--r--meta/recipes-extended/cups/cups.inc34
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch35
-rw-r--r--meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch34
-rw-r--r--meta/recipes-extended/cups/cups/cups-no-gcrypt.patch49
-rw-r--r--meta/recipes-extended/cups/cups/cups-str4402.patch190
-rw-r--r--meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--meta/recipes-extended/cups/cups/cups.socket8
-rw-r--r--meta/recipes-extended/cups/cups_1.7.3.bb6
-rw-r--r--meta/recipes-extended/cups/cups_2.0.1.bb6
-rw-r--r--meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb10
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.3.bb2
-rw-r--r--meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch50
-rw-r--r--meta/recipes-extended/ethtool/ethtool_3.16.bb (renamed from meta/recipes-extended/ethtool/ethtool_3.14.bb)5
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch781
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch294
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch58
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch84
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch22
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch40
-rw-r--r--meta/recipes-extended/findutils/findutils.inc2
-rw-r--r--meta/recipes-extended/findutils/findutils_4.4.2.bb25
-rw-r--r--meta/recipes-extended/findutils/findutils_4.5.14.bb15
-rw-r--r--meta/recipes-extended/gawk/gawk-4.1.1/run-ptest4
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch31
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch99
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.15.bb (renamed from meta/recipes-extended/ghostscript/ghostscript_9.14.bb)15
-rw-r--r--meta/recipes-extended/grep/grep_2.21.bb (renamed from meta/recipes-extended/grep/grep_2.19.bb)5
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb2
-rw-r--r--meta/recipes-extended/groff/groff_1.18.1.4.bb2
-rw-r--r--meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch31
-rw-r--r--meta/recipes-extended/gzip/gzip.inc3
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.45.bb (renamed from meta/recipes-extended/hdparm/hdparm_9.43.bb)4
-rw-r--r--meta/recipes-extended/images/core-image-kernel-dev.bb17
-rw-r--r--meta/recipes-extended/less/less_471.bb (renamed from meta/recipes-extended/less/less_458.bb)4
-rw-r--r--meta/recipes-extended/libaio/libaio/00_arches.patch208
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio-aarch64.patch28
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch58
-rw-r--r--meta/recipes-extended/libaio/libaio/toolchain.patch27
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.110.bb (renamed from meta/recipes-extended/libaio/libaio_0.3.109.bb)12
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.1.2.bb1
-rw-r--r--meta/recipes-extended/libidn/libidn_0.6.14.bb1
-rw-r--r--meta/recipes-extended/libidn/libidn_1.29.bb (renamed from meta/recipes-extended/libidn/libidn_1.28.bb)10
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb (renamed from meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb)6
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb6
-rw-r--r--meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch14
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.7.bb29
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.8.bb62
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb12
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts_9.60.bb (renamed from meta/recipes-extended/lsb/lsbinitscripts_9.54.bb)7
-rw-r--r--meta/recipes-extended/lsb/lsbtest/LSB_Test.sh2
-rw-r--r--meta/recipes-extended/lsof/lsof_4.88.bb (renamed from meta/recipes-extended/lsof/lsof_4.87.bb)15
-rw-r--r--meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch39
-rw-r--r--meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch37
-rw-r--r--meta/recipes-extended/ltp/ltp/make-setregid02-work.patch61
-rw-r--r--meta/recipes-extended/ltp/ltp_20150119.bb (renamed from meta/recipes-extended/ltp/ltp_20140422.bb)23
-rw-r--r--meta/recipes-extended/man-pages/man-pages_3.76.bb (renamed from meta/recipes-extended/man-pages/man-pages_3.69.bb)11
-rw-r--r--meta/recipes-extended/man/man/man.conf3
-rw-r--r--meta/recipes-extended/man/man_1.6g.bb17
-rw-r--r--meta/recipes-extended/mc/mc/mc-CTRL.patch31
-rw-r--r--meta/recipes-extended/mc/mc_4.7.5.2.bb4
-rw-r--r--meta/recipes-extended/mc/mc_4.8.13.bb (renamed from meta/recipes-extended/mc/mc_4.8.12.bb)8
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.2.bb (renamed from meta/recipes-extended/mdadm/mdadm_3.3.bb)7
-rw-r--r--meta/recipes-extended/mingetty/mingetty_1.08.bb2
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.6.1.bb (renamed from meta/recipes-extended/msmtp/msmtp_1.4.32.bb)8
-rw-r--r--meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch32
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-25.bb5
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.18.bb (renamed from meta/recipes-extended/newt/libnewt-python_0.52.17.bb)0
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.18.bb (renamed from meta/recipes-extended/newt/libnewt_0.52.17.bb)13
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb20
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch226
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb51
-rw-r--r--meta/recipes-extended/parted/files/Makefile (renamed from meta/recipes-extended/parted/parted-3.1/Makefile)0
-rw-r--r--meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch57
-rw-r--r--meta/recipes-extended/parted/files/fix-doc-mandir.patch (renamed from meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch)0
-rw-r--r--meta/recipes-extended/parted/files/no_check.patch (renamed from meta/recipes-extended/parted/parted-3.1/no_check.patch)0
-rw-r--r--meta/recipes-extended/parted/files/run-ptest (renamed from meta/recipes-extended/parted/parted-3.1/run-ptest)0
-rw-r--r--meta/recipes-extended/parted/files/syscalls.patch (renamed from meta/recipes-extended/parted/parted-3.1/syscalls.patch)0
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch34
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch35
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch43
-rw-r--r--meta/recipes-extended/parted/parted_3.2.bb (renamed from meta/recipes-extended/parted/parted_3.1.bb)10
-rw-r--r--meta/recipes-extended/pax/pax_3.4.bb4
-rw-r--r--meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb (renamed from meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb)4
-rw-r--r--meta/recipes-extended/pigz/pigz.inc26
-rw-r--r--meta/recipes-extended/pigz/pigz/link-order.patch38
-rw-r--r--meta/recipes-extended/pigz/pigz_2.3.3.bb (renamed from meta/recipes-extended/pigz/pigz_2.3.1.bb)6
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch54
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch26
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch44
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/install.patch39
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch15
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procmodule.patch38
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch111
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch19
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch82
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/psmodule.patch23
-rw-r--r--meta/recipes-extended/procps/procps.inc31
-rw-r--r--meta/recipes-extended/procps/procps/fix-configure.patch19
-rw-r--r--meta/recipes-extended/procps/procps/sysctl.conf (renamed from meta/recipes-extended/procps/procps-3.2.8/sysctl.conf)0
-rw-r--r--meta/recipes-extended/procps/procps_3.2.8.bb32
-rw-r--r--meta/recipes-extended/procps/procps_3.3.10.bb62
-rw-r--r--meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch46
-rw-r--r--meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch29
-rw-r--r--meta/recipes-extended/psmisc/psmisc_22.21.bb4
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch34
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service10
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket8
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb (renamed from meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb)18
-rw-r--r--meta/recipes-extended/screen/screen_4.0.3.bb3
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb1
-rw-r--r--meta/recipes-extended/sed/sed_4.2.2.bb3
-rw-r--r--meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch46
-rw-r--r--meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch25
-rw-r--r--meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch109
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch75
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_options.patch1384
-rw-r--r--meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch215
-rw-r--r--meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch41
-rw-r--r--meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch46
-rw-r--r--meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch36
-rw-r--r--meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch28
-rw-r--r--meta/recipes-extended/shadow/files/securetty31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch36
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow.automake-1.11.patch106
-rw-r--r--meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch23
-rw-r--r--meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch63
-rw-r--r--meta/recipes-extended/shadow/files/useradd.patch17
-rw-r--r--meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch33
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb)2
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb)0
-rw-r--r--meta/recipes-extended/shadow/shadow.inc46
-rw-r--r--meta/recipes-extended/shadow/shadow_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow_4.1.4.3.bb)0
-rw-r--r--meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch116
-rw-r--r--meta/recipes-extended/slang/slang_2.2.4.bb3
-rw-r--r--meta/recipes-extended/sudo/files/volatiles.99_sudo1
-rw-r--r--meta/recipes-extended/sudo/sudo.inc16
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.11p2.bb (renamed from meta/recipes-extended/sudo/sudo_1.8.10p3.bb)13
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb4
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.bb5
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc2
-rw-r--r--meta/recipes-extended/sysstat/sysstat_10.2.1.bb6
-rw-r--r--meta/recipes-extended/sysstat/sysstat_11.0.2.bb6
-rw-r--r--meta/recipes-extended/tar/tar-replacement-native_1.28.bb (renamed from meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb)0
-rw-r--r--meta/recipes-extended/tar/tar_1.28.bb (renamed from meta/recipes-extended/tar/tar_1.27.1.bb)5
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb15
-rw-r--r--meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch31
-rw-r--r--meta/recipes-extended/texi2html/texi2html_5.0.bb15
-rw-r--r--meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py2
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch28
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch49
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch24
-rw-r--r--meta/recipes-extended/texinfo/texinfo_4.8.bb56
-rw-r--r--meta/recipes-extended/texinfo/texinfo_5.2.bb21
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native.inc2
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2014e.bb11
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2015a.bb10
-rw-r--r--meta/recipes-extended/tzdata/tzdata.inc2
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2014e.bb6
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2015a.bb6
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch (renamed from meta/recipes-extended/watchdog/files/fix-ping-failure.patch)56
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch (renamed from meta/recipes-extended/watchdog/files/fixsepbuild.patch)0
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.14.bb (renamed from meta/recipes-extended/watchdog/watchdog_5.13.bb)5
-rw-r--r--meta/recipes-extended/wget/wget.inc10
-rw-r--r--meta/recipes-extended/wget/wget_1.15.bb7
-rw-r--r--meta/recipes-extended/wget/wget_1.16.1.bb8
-rw-r--r--meta/recipes-extended/which/which-2.18/automake-foreign.patch28
-rw-r--r--meta/recipes-extended/which/which-2.20/automake.patch15
-rw-r--r--meta/recipes-extended/which/which_2.18.bb4
-rw-r--r--meta/recipes-extended/which/which_2.20.bb1
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.service13
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb12
-rw-r--r--meta/recipes-extended/xz/xz_5.2.0.bb (renamed from meta/recipes-extended/xz/xz_5.1.3alpha.bb)6
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb (renamed from meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb)16
-rw-r--r--meta/recipes-gnome/gnome/gnome-common_3.14.0.bb (renamed from meta/recipes-gnome/gnome/gnome-common_3.7.4.bb)4
-rw-r--r--meta/recipes-gnome/gnome/gnome-desktop.inc23
-rw-r--r--meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb7
-rw-r--r--meta/recipes-gnome/gnome/gnome-doc-utils.inc2
-rw-r--r--meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb16
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch48
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch30
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch31
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch21
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch87
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch105
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch1814
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch23
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch35
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/toggle-font.diff (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/xsettings.patch (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc8
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch43
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb (renamed from meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb)5
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.25.bb (renamed from meta/recipes-gnome/gtk+/gtk+_2.24.22.bb)21
-rw-r--r--meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb4
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/files/index.theme1731
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb (renamed from meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb)17
-rw-r--r--meta/recipes-gnome/json-glib/json-glib_1.0.2.bb (renamed from meta/recipes-gnome/json-glib/json-glib_1.0.0.bb)4
-rw-r--r--meta/recipes-gnome/libffi/libffi_3.2.1.bb (renamed from meta/recipes-gnome/libffi/libffi_3.1.bb)4
-rw-r--r--meta/recipes-gnome/librsvg/librsvg/vapigen.m496
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.40.6.bb (renamed from meta/recipes-gnome/librsvg/librsvg_2.40.2.bb)20
-rw-r--r--meta/recipes-graphics/builder/files/builder_hob_start.sh4
-rw-r--r--meta/recipes-graphics/cairo/cairo_1.12.18.bb (renamed from meta/recipes-graphics/cairo/cairo_1.12.16.bb)4
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0.inc7
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch20
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/run-ptest3
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb8
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb10
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0.inc19
-rw-r--r--meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch28
-rw-r--r--meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb1
-rw-r--r--meta/recipes-graphics/directfb/directfb.inc3
-rw-r--r--meta/recipes-graphics/directfb/directfb/fixsepbuild.patch19
-rw-r--r--meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch345
-rw-r--r--meta/recipes-graphics/directfb/directfb_1.7.6.bb (renamed from meta/recipes-graphics/directfb/directfb_1.7.4.bb)8
-rw-r--r--meta/recipes-graphics/drm/libdrm.inc7
-rw-r--r--meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch30
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.53.bb8
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.58.bb6
-rw-r--r--meta/recipes-graphics/freetype/freetype_2.5.4.bb (renamed from meta/recipes-graphics/freetype/freetype_2.5.3.bb)4
-rw-r--r--meta/recipes-graphics/glew/glew/autotools.patch (renamed from meta/recipes-graphics/glew/files/autotools.patch)0
-rw-r--r--meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch (renamed from meta/recipes-graphics/glew/files/fix-glew.pc-install.patch)23
-rw-r--r--meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch (renamed from meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch)0
-rw-r--r--meta/recipes-graphics/glew/glew_1.11.0.bb (renamed from meta/recipes-graphics/glew/glew_1.10.0.bb)4
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb (renamed from meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb)5
-rw-r--r--meta/recipes-graphics/menu-cache/files/Fix-segfault.patch31
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb21
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb16
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch33
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/glut.patch)28
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch424
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch)32
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch)74
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch)24
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch74
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch101
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch73
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb (renamed from meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb)38
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb (renamed from meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb)0
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc8
-rw-r--r--meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch52
-rw-r--r--meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch362
-rw-r--r--meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch48
-rw-r--r--meta/recipes-graphics/mesa/mesa_10.3.4.bb (renamed from meta/recipes-graphics/mesa/mesa_10.1.3.bb)9
-rw-r--r--meta/recipes-graphics/mesa/mesa_git.bb12
-rw-r--r--meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch (renamed from meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch)0
-rw-r--r--meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch (renamed from meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch)0
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb5
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb2
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb5
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb9
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb8
-rw-r--r--meta/recipes-graphics/pango/pango.inc6
-rw-r--r--meta/recipes-graphics/pango/pango_1.36.8.bb (renamed from meta/recipes-graphics/pango/pango_1.36.3.bb)4
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb11
-rw-r--r--meta/recipes-graphics/tslib/tslib_1.1.bb2
-rw-r--r--meta/recipes-graphics/wayland/libinput_0.7.0.bb14
-rw-r--r--meta/recipes-graphics/wayland/wayland_1.6.0.bb (renamed from meta/recipes-graphics/wayland/wayland_1.5.0.bb)5
-rw-r--r--meta/recipes-graphics/wayland/weston_1.6.0.bb (renamed from meta/recipes-graphics/wayland/weston_1.5.0.bb)8
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init.bb2
-rwxr-xr-xmeta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm4
-rw-r--r--meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb (renamed from meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/rgb_1.0.6.bb (renamed from meta/recipes-graphics/xorg-app/rgb_1.0.5.bb)5
-rw-r--r--meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xinit_1.3.4.bb (renamed from meta/recipes-graphics/xorg-app/xinit_1.3.3.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb (renamed from meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch60
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xorg-app-common.inc5
-rw-r--r--meta/recipes-graphics/xorg-app/xprop_1.2.2.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb (renamed from meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb)6
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb)4
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch60
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb)8
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch81
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb2
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb13
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch24
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch17
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.910.bb)21
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb)4
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch48
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb1
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch37
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch98
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch72
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb)7
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-common.inc8
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-input.inc5
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-video.inc5
-rw-r--r--meta/recipes-graphics/xorg-font/font-util_1.3.0.bb2
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb4
-rw-r--r--meta/recipes-graphics/xorg-lib/libice_1.0.9.bb (renamed from meta/recipes-graphics/xorg-lib/libice_1.0.8.bb)7
-rw-r--r--meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb7
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch72
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb1
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.10.bb10
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.11.bb10
-rw-r--r--meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb (renamed from meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb (renamed from meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft/freetype.patch39
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb (renamed from meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb)6
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb (renamed from meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_git.bb18
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb (renamed from meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb)8
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch22
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb (renamed from meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb11
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb11
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb (renamed from meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb)6
-rw-r--r--meta/recipes-graphics/xorg-lib/xorg-lib-common.inc9
-rw-r--r--meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb (renamed from meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb (renamed from meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb (renamed from meta/recipes-graphics/xorg-proto/inputproto_2.3.bb)5
-rw-r--r--meta/recipes-graphics/xorg-proto/presentproto_git.bb4
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb (renamed from meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/xorg-proto-common.inc7
-rw-r--r--meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb (renamed from meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb2
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg.inc5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch41
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch35
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch22
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch29
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch32
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb (renamed from meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb)10
-rw-r--r--meta/recipes-kernel/blktrace/blktrace/ldflags.patch8
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev_1.6.inc2
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc12
-rw-r--r--meta/recipes-kernel/dtc/dtc_git.bb4
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools.inc17
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch801
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb13
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb19
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb12
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc11
-rw-r--r--meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch21
-rwxr-xr-xmeta/recipes-kernel/kmod/kmod/run-ptest2
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb9
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb10
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_git.bb50
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb7
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb74
-rw-r--r--meta/recipes-kernel/linux/linux-dummy.bb9
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb3
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb30
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb12
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb21
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb26
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc3
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.10.bb37
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.14.bb40
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.17.bb39
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.4.bb38
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch17
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch54
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.2.4.bb (renamed from meta/recipes-kernel/lttng/babeltrace_1.2.1.bb)11
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch130
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb36
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.4.1.bb)13
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch47
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb60
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb60
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb76
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch19
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb32
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb)9
-rw-r--r--meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb13
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc10
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch31
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch123
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch12
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch41
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/opstart.patch245
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch134
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/run-ptest3
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_0.9.9.bb15
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_1.0.0.bb13
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_git.bb11
-rw-r--r--meta/recipes-kernel/perf/perf.bb102
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.7.bb (renamed from meta/recipes-kernel/powertop/powertop_2.5.bb)10
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_git.bb6
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb2
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch39
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/system_map_location.patch23
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb3
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc6
-rw-r--r--meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb8
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch61
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch38
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch96
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch30
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb23
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb41
-rw-r--r--meta/recipes-lsb4/libpng/libpng12_1.2.52.bb (renamed from meta/recipes-lsb4/libpng/libpng12_1.2.51.bb)8
-rw-r--r--meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb (renamed from meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb)6
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch32
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch34
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch345
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch31
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch68
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb)21
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch16
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb)13
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb)2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch42
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch48
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb)11
-rw-r--r--meta/recipes-multimedia/flac/flac_1.3.0.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch34
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch40
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch50
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch81
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch145
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch39
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch45
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch58
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch183
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch68
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch100
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch9304
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb24
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb (renamed from meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb)7
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo.inc5
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb7
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb1
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb4
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch47
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb9
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins.inc6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb)12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb)4
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb18
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc45
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch41
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch64
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.2.4.bb)8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch57
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb)11
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc9
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch62
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch25
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb)10
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb)6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb9
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb)7
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb4
-rw-r--r--meta/recipes-multimedia/libav/libav.inc15
-rw-r--r--meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch23
-rw-r--r--meta/recipes-multimedia/libav/libav_0.8.11.bb18
-rw-r--r--meta/recipes-multimedia/libav/libav_9.13.bb13
-rw-r--r--meta/recipes-multimedia/libav/libav_9.16.bb4
-rw-r--r--meta/recipes-multimedia/libav/libpostproc_git.bb46
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch3
-rw-r--r--meta/recipes-multimedia/libmad/libmad/automake-foreign.patch12
-rw-r--r--meta/recipes-multimedia/libmad/libmad_0.15.1b.bb1
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch36
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb10
-rw-r--r--meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch31
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.10.bb29
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.16.bb28
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch786
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.3.bb1
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb7
-rw-r--r--meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch239
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb3
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc4
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch52
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb4
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.3.bb (renamed from meta/recipes-multimedia/sbc/sbc_1.2.bb)4
-rw-r--r--meta/recipes-qt/meta/meta-toolchain-qt.inc25
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-core-qt.bb7
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb7
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb4
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc2
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init10
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb2
-rw-r--r--meta/recipes-qt/qt4/qt-mobility_1.2.0.inc2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6.inc13
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch53
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch491
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch124
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch18
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch40
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch98
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/g++.conf25
-rw-r--r--meta/recipes-qt/qt4/qt4-embedded.inc4
-rw-r--r--meta/recipes-qt/qt4/qt4-native.inc4
-rw-r--r--meta/recipes-qt/qt4/qt4.inc2
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc1
-rw-r--r--meta/recipes-sato/images/core-image-sato-sdk.bb3
-rw-r--r--meta/recipes-sato/midori/midori_0.5.5.bb47
-rw-r--r--meta/recipes-sato/midori/midori_0.5.8.bb26
-rw-r--r--meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb9
-rw-r--r--meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb (renamed from meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb)8
-rw-r--r--meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch52
-rw-r--r--meta/recipes-sato/puzzles/puzzles_r10116.bb4
-rw-r--r--meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb65
-rw-r--r--meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb2
-rw-r--r--meta/recipes-support/apr/apr-util_1.5.4.bb (renamed from meta/recipes-support/apr/apr-util_1.5.3.bb)21
-rw-r--r--meta/recipes-support/apr/apr_1.5.1.bb8
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.6.1.bb2
-rw-r--r--meta/recipes-support/atk/at-spi2-atk_2.14.1.bb (renamed from meta/recipes-support/atk/at-spi2-atk_2.12.0.bb)4
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.14.1.bb (renamed from meta/recipes-support/atk/at-spi2-core_2.12.0.bb)7
-rw-r--r--meta/recipes-support/atk/atk_2.14.0.bb (renamed from meta/recipes-support/atk/atk_2.12.0.bb)8
-rw-r--r--meta/recipes-support/attr/acl.inc2
-rw-r--r--meta/recipes-support/attr/attr.inc2
-rw-r--r--meta/recipes-support/attr/ea-acl.inc2
-rw-r--r--meta/recipes-support/bdwgc/bdwgc_7.4.2.bb (renamed from meta/recipes-support/bdwgc/bdwgc_7.2d.bb)19
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/run-ptest2
-rw-r--r--meta/recipes-support/beecrypt/beecrypt_4.2.1.bb1
-rw-r--r--meta/recipes-support/boost/bjam-native_1.57.0.bb (renamed from meta/recipes-support/boost/bjam-native_1.55.0.bb)0
-rw-r--r--meta/recipes-support/boost/boost-1.57.0.inc (renamed from meta/recipes-support/boost/boost-1.55.0.inc)4
-rw-r--r--meta/recipes-support/boost/boost.inc41
-rw-r--r--meta/recipes-support/boost/boost_1.55.0.bb4
-rw-r--r--meta/recipes-support/boost/boost_1.57.0.bb6
-rw-r--r--meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
-rw-r--r--meta/recipes-support/consolekit/consolekit_0.4.6.bb9
-rw-r--r--meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch8203
-rw-r--r--meta/recipes-support/curl/curl_7.40.0.bb (renamed from meta/recipes-support/curl/curl_7.37.0.bb)38
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb1
-rw-r--r--meta/recipes-support/db/db_6.0.30.bb1
-rw-r--r--meta/recipes-support/debianutils/debianutils_4.4.bb35
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.8.3.bb3
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/configure.patch209
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch33
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch48
-rw-r--r--meta/recipes-support/gmp/gmp.inc7
-rw-r--r--meta/recipes-support/gmp/gmp/append_user_provided_flags.patch (renamed from meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch)0
-rw-r--r--meta/recipes-support/gmp/gmp/configure.patch (renamed from meta/recipes-support/gmp/gmp-5.1.1/configure.patch)128
-rw-r--r--meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch26
-rw-r--r--meta/recipes-support/gmp/gmp_4.2.1.bb20
-rw-r--r--meta/recipes-support/gmp/gmp_5.1.1.bb11
-rw-r--r--meta/recipes-support/gmp/gmp_6.0.0.bb14
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch35
-rw-r--r--meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb8
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch62
-rw-r--r--meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch16
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch24
-rw-r--r--meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch72
-rw-r--r--meta/recipes-support/gnupg/gnupg_1.4.7.bb5
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.1.1.bb (renamed from meta/recipes-support/gnupg/gnupg_2.0.23.bb)17
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc8
-rw-r--r--meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch31
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.12.bb7
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.5.bb7
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc10
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.4.3.bb8
-rw-r--r--meta/recipes-support/icu/icu.inc3
-rw-r--r--meta/recipes-support/icu/icu_54.1.bb (renamed from meta/recipes-support/icu/icu_53.1.bb)6
-rw-r--r--meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch38
-rw-r--r--meta/recipes-support/libassuan/libassuan_2.2.0.bb (renamed from meta/recipes-support/libassuan/libassuan_2.1.1.bb)6
-rw-r--r--meta/recipes-support/libbsd/libbsd_0.7.0.bb (renamed from meta/recipes-support/libbsd/libbsd_0.6.0.bb)7
-rw-r--r--meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch39
-rw-r--r--meta/recipes-support/libcap/libcap_2.22.bb6
-rw-r--r--meta/recipes-support/libcap/libcap_2.24.bb (renamed from meta/recipes-support/libcap/libcap.inc)14
-rw-r--r--meta/recipes-support/libcheck/libcheck_0.9.14.bb (renamed from meta/recipes-support/libcheck/libcheck_0.9.13.bb)4
-rw-r--r--meta/recipes-support/libcroco/libcroco_0.6.8.bb4
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.3.bb13
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch31
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch14
-rw-r--r--meta/recipes-support/libfm/libfm-extra_1.2.3.bb23
-rw-r--r--meta/recipes-support/libfm/libfm_1.1.2.2.bb25
-rw-r--r--meta/recipes-support/libfm/libfm_1.2.3.bb38
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt.inc8
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb4
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb4
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch (renamed from meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch)69
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.12.bb31
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.17.bb56
-rw-r--r--meta/recipes-support/libical/files/pthread-fix.patch52
-rw-r--r--meta/recipes-support/libical/libical_0.48.bb16
-rw-r--r--meta/recipes-support/libical/libical_1.0.0.bb13
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.11.1.bb4
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.14.bb4
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.2.bb (renamed from meta/recipes-support/libksba/libksba_1.3.0.bb)5
-rw-r--r--meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch37
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch14
-rw-r--r--meta/recipes-support/libnl/libnl_3.2.25.bb (renamed from meta/recipes-support/libnl/libnl_3.2.24.bb)9
-rw-r--r--meta/recipes-support/libpcre/libpcre/Makefile2
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.36.bb (renamed from meta/recipes-support/libpcre/libpcre_8.35.bb)4
-rw-r--r--meta/recipes-support/libproxy/libproxy_0.4.11.bb2
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb2
-rw-r--r--meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch20
-rw-r--r--meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch81
-rw-r--r--meta/recipes-support/libunistring/libunistring/parallelmake.patch26
-rw-r--r--meta/recipes-support/libunistring/libunistring_0.9.4.bb (renamed from meta/recipes-support/libunistring/libunistring_0.9.3.bb)8
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch2529
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch28
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch72
-rw-r--r--meta/recipes-support/libunwind/libunwind.inc31
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.1.bb10
-rw-r--r--meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch47
-rw-r--r--meta/recipes-support/liburcu/liburcu/aarch64.patch19
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.8.6.bb (renamed from meta/recipes-support/liburcu/liburcu_0.8.4.bb)6
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.28.bb5
-rw-r--r--meta/recipes-support/lz4/lz4_svn.bb4
-rw-r--r--meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch70
-rw-r--r--meta/recipes-support/lzo/lzo/acinclude.m4 (renamed from meta/recipes-support/lzo/lzo-2.06/acinclude.m4)0
-rw-r--r--meta/recipes-support/lzo/lzo_2.08.bb (renamed from meta/recipes-support/lzo/lzo_2.06.bb)8
-rw-r--r--meta/recipes-support/nettle/nettle_2.7.1.bb2
-rw-r--r--meta/recipes-support/npth/npth/pkgconfig.patch49
-rw-r--r--meta/recipes-support/npth/npth_1.1.bb (renamed from meta/recipes-support/npth/npth_0.91.bb)6
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch31
-rw-r--r--meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch67
-rw-r--r--meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch62
-rw-r--r--meta/recipes-support/nspr/nspr_4.10.7.bb (renamed from meta/recipes-support/nspr/nspr_4.10.3.bb)22
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb9
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch81
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch92
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch18
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2013-1740.patch916
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2014-1492.patch68
-rw-r--r--meta/recipes-support/nss/nss.inc22
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch (renamed from meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch35
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch (renamed from meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch (renamed from meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss.pc.in (renamed from meta/recipes-support/nss/files/nss.pc.in)0
-rw-r--r--meta/recipes-support/nss/nss/signlibs.sh (renamed from meta/recipes-support/nss/files/signlibs.sh)0
-rw-r--r--meta/recipes-support/nss/nss_3.15.1.bb9
-rw-r--r--meta/recipes-support/nss/nss_3.17.3.bb7
-rw-r--r--meta/recipes-support/pinentry/pinentry_0.9.0.bb29
-rw-r--r--meta/recipes-support/ptest-runner/files/ptest-runner8
-rw-r--r--meta/recipes-support/ptest-runner/ptest-runner_1.0.bb2
-rw-r--r--meta/recipes-support/serf/serf/env.patch28
-rw-r--r--meta/recipes-support/serf/serf/norpath.patch42
-rw-r--r--meta/recipes-support/serf/serf_1.3.8.bb26
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb7
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb7
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb (renamed from meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb)6
-rw-r--r--meta/site/arm-3247
-rw-r--r--meta/site/arm-6446
-rw-r--r--meta/site/arm-common38
-rw-r--r--meta/site/common-darwin2
-rw-r--r--meta/site/common-mingw2
-rwxr-xr-xoe-init-build-env-memres8
-rwxr-xr-xscripts/combo-layer45
-rwxr-xr-xscripts/contrib/build-perf-test.sh6
-rwxr-xr-xscripts/contrib/list-packageconfig-flags.py4
-rwxr-xr-xscripts/contrib/mkefidisk.sh309
-rwxr-xr-xscripts/contrib/python/generate-manifest-2.7.py11
-rwxr-xr-xscripts/contrib/python/generate-manifest-3.3.py9
-rwxr-xr-xscripts/create-recipe3
-rwxr-xr-xscripts/devtool255
-rwxr-xr-xscripts/gen-lockedsig-cache40
-rw-r--r--scripts/lib/bsp/engine.py173
-rw-r--r--scripts/lib/bsp/help.py1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/conf/machine/{{=machine}}.conf105
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend2
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-non_hardware.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.17.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)3
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/{{=machine}}/machconfig)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall8
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom.bb)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/defconfig)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}-user-config.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}-user-patches.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf (renamed from scripts/lib/bsp/substrate/target/arch/i386/conf/machine/{{=machine}}.conf)21
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend2
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch (renamed from scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb (renamed from scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch (renamed from scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c (renamed from scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf (renamed from scripts/lib/bsp/substrate/target/arch/mips/conf/machine/{{=machine}}.conf)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg2
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend32
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/.gitignore (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg)0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf39
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc10
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc10
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc10
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg66
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc8
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall5
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/{{=machine}}.conf)13
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend26
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend)3
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf (renamed from scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf)7
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces5
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/xorg.conf)4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)3
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend)11
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend)7
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend62
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend)7
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend62
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.4.bbappend)7
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)11
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)11
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.17.bbappend62
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/{{=machine}}.conf)11
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend2
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend26
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend (renamed from scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend)1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.17.bbappend33
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend25
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend32
-rw-r--r--scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend32
-rw-r--r--scripts/lib/bsp/tags.py12
-rw-r--r--scripts/lib/devtool/__init__.py78
-rw-r--r--scripts/lib/devtool/deploy.py100
-rw-r--r--scripts/lib/devtool/standard.py545
-rw-r--r--scripts/lib/image/canned-wks/directdisk.wks2
-rw-r--r--scripts/lib/image/canned-wks/mkefidisk.wks2
-rw-r--r--scripts/lib/image/canned-wks/mkgummidisk.wks11
-rw-r--r--scripts/lib/image/canned-wks/sdimage-bootpart.wks6
-rw-r--r--scripts/lib/image/config/wic.conf1
-rw-r--r--scripts/lib/image/engine.py62
-rw-r--r--scripts/lib/image/help.py465
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py26
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py40
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py119
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py55
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py86
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/device.py125
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py40
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py68
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py91
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py184
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py114
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py193
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py62
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/group.py88
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py139
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py58
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py133
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py54
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/key.py64
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py55
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/lang.py60
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py58
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py54
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/logging.py66
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py304
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py53
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/method.py186
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py106
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py70
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py111
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/network.py363
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/raid.py365
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py79
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/repo.py249
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py68
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py93
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py64
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/services.py71
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py54
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py105
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py86
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/updates.py60
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py106
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/user.py173
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py114
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py102
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py184
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py69
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py134
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/control.py1307
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py24
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py53
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py463
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py1477
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py617
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py458
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py530
-rw-r--r--scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py90
-rw-r--r--scripts/lib/mic/__version__.py1
-rw-r--r--scripts/lib/mic/bootstrap.py279
-rw-r--r--scripts/lib/mic/chroot.py343
-rw-r--r--scripts/lib/mic/conf.py197
-rw-r--r--scripts/lib/mic/creator.py351
-rw-r--r--scripts/lib/mic/imager/baseimager.py1263
-rw-r--r--scripts/lib/mic/imager/fs.py99
-rw-r--r--scripts/lib/mic/imager/livecd.py750
-rw-r--r--scripts/lib/mic/imager/liveusb.py308
-rw-r--r--scripts/lib/mic/imager/loop.py418
-rw-r--r--scripts/lib/mic/imager/raw.py501
-rw-r--r--scripts/lib/mic/kickstart/__init__.py892
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/desktop.py95
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/installerfw.py63
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/micrepo.py127
-rw-r--r--scripts/lib/mic/plugins/backend/yumpkgmgr.py490
-rwxr-xr-xscripts/lib/mic/plugins/backend/zypppkgmgr.py973
-rw-r--r--scripts/lib/mic/plugins/hook/.py0
-rw-r--r--scripts/lib/mic/plugins/hook/empty_hook.py3
-rw-r--r--scripts/lib/mic/plugins/imager/fs_plugin.py143
-rw-r--r--scripts/lib/mic/plugins/imager/livecd_plugin.py255
-rw-r--r--scripts/lib/mic/plugins/imager/liveusb_plugin.py260
-rw-r--r--scripts/lib/mic/plugins/imager/loop_plugin.py255
-rw-r--r--scripts/lib/mic/plugins/imager/raw_plugin.py275
-rw-r--r--scripts/lib/mic/rt_util.py223
-rw-r--r--scripts/lib/mic/utils/BmapCreate.py298
-rw-r--r--scripts/lib/mic/utils/Fiemap.py252
-rw-r--r--scripts/lib/mic/utils/fs_related.py1060
-rw-r--r--scripts/lib/mic/utils/gpt_parser.py331
-rw-r--r--scripts/lib/mic/utils/grabber.py97
-rw-r--r--scripts/lib/mic/utils/misc.py1065
-rw-r--r--scripts/lib/mic/utils/partitionedfs.py782
-rw-r--r--scripts/lib/mic/utils/proxy.py183
-rw-r--r--scripts/lib/mic/utils/rpmmisc.py600
-rw-r--r--scripts/lib/recipetool/__init__.py (renamed from scripts/lib/mic/imager/__init__.py)0
-rw-r--r--scripts/lib/recipetool/create.py415
-rw-r--r--scripts/lib/recipetool/create_buildsys.py319
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py720
-rw-r--r--scripts/lib/scriptutils.py60
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/__init__.py (renamed from scripts/lib/mic/utils/__init__.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/base.py (renamed from scripts/lib/mic/3rdparty/pykickstart/base.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py (renamed from scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py)6
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py (renamed from scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py)49
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/commands/partition.py (renamed from scripts/lib/mic/3rdparty/pykickstart/commands/partition.py)39
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/constants.py (renamed from scripts/lib/mic/3rdparty/pykickstart/constants.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/errors.py (renamed from scripts/lib/mic/3rdparty/pykickstart/errors.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/handlers/control.py46
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py (renamed from scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/ko.py (renamed from scripts/lib/mic/3rdparty/pykickstart/ko.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/options.py (renamed from scripts/lib/mic/3rdparty/pykickstart/options.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/parser.py (renamed from scripts/lib/mic/3rdparty/pykickstart/parser.py)87
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/sections.py (renamed from scripts/lib/mic/3rdparty/pykickstart/sections.py)0
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/version.py (renamed from scripts/lib/mic/3rdparty/pykickstart/version.py)29
-rw-r--r--scripts/lib/wic/__init__.py (renamed from scripts/lib/mic/__init__.py)0
-rw-r--r--scripts/lib/wic/__version__.py1
-rw-r--r--scripts/lib/wic/conf.py102
-rw-r--r--scripts/lib/wic/creator.py187
-rw-r--r--scripts/lib/wic/imager/__init__.py (renamed from scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc)0
-rw-r--r--scripts/lib/wic/imager/baseimager.py193
-rw-r--r--scripts/lib/wic/imager/direct.py (renamed from scripts/lib/mic/imager/direct.py)165
-rw-r--r--scripts/lib/wic/kickstart/__init__.py125
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/__init__.py (renamed from scripts/lib/mic/kickstart/custom_commands/__init__.py)7
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/micboot.py (renamed from scripts/lib/mic/kickstart/custom_commands/micboot.py)2
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/micpartition.py (renamed from scripts/lib/mic/kickstart/custom_commands/micpartition.py)2
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py (renamed from scripts/lib/mic/kickstart/custom_commands/partition.py)222
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/wicboot.py (renamed from scripts/lib/mic/kickstart/custom_commands/wicboot.py)2
-rw-r--r--scripts/lib/wic/msger.py (renamed from scripts/lib/mic/msger.py)2
-rw-r--r--scripts/lib/wic/plugin.py (renamed from scripts/lib/mic/plugin.py)36
-rw-r--r--scripts/lib/wic/pluginbase.py (renamed from scripts/lib/mic/pluginbase.py)82
-rw-r--r--scripts/lib/wic/plugins/imager/direct_plugin.py (renamed from scripts/lib/mic/plugins/imager/direct_plugin.py)47
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py (renamed from scripts/lib/mic/plugins/source/bootimg-efi.py)149
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-partition.py138
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py (renamed from scripts/lib/mic/plugins/source/bootimg-pcbios.py)61
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py (renamed from scripts/lib/mic/plugins/source/rootfs.py)22
-rw-r--r--scripts/lib/wic/test (renamed from scripts/lib/mic/test)0
-rw-r--r--scripts/lib/wic/utils/__init__.py (renamed from scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf)0
-rw-r--r--scripts/lib/wic/utils/cmdln.py (renamed from scripts/lib/mic/utils/cmdln.py)0
-rw-r--r--scripts/lib/wic/utils/errors.py (renamed from scripts/lib/mic/utils/errors.py)28
-rw-r--r--scripts/lib/wic/utils/fs_related.py111
-rw-r--r--scripts/lib/wic/utils/misc.py59
-rw-r--r--scripts/lib/wic/utils/oe/__init__.py (renamed from scripts/lib/mic/utils/oe/__init__.py)2
-rw-r--r--scripts/lib/wic/utils/oe/misc.py (renamed from scripts/lib/mic/utils/oe/misc.py)63
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py360
-rw-r--r--scripts/lib/wic/utils/runner.py (renamed from scripts/lib/mic/utils/runner.py)4
-rwxr-xr-xscripts/oe-git-proxy2
-rwxr-xr-xscripts/oe-selftest81
-rwxr-xr-xscripts/pybootchartgui/pybootchartgui.py2
-rwxr-xr-xscripts/pythondeps250
-rwxr-xr-xscripts/recipetool99
-rwxr-xr-xscripts/runqemu5
-rwxr-xr-xscripts/runqemu-internal32
-rwxr-xr-xscripts/send-error-report8
-rwxr-xr-xscripts/sstate-sysroot-cruft.sh96
-rwxr-xr-xscripts/test-dependencies.sh20
-rwxr-xr-xscripts/test-remote-image41
-rwxr-xr-xscripts/wic46
2255 files changed, 108961 insertions, 82974 deletions
diff --git a/README.hardware b/README.hardware
index d8faaa3bdb..a97f104117 100644
--- a/README.hardware
+++ b/README.hardware
@@ -251,14 +251,14 @@ if used via a usb card reader):
5. If using core-image-minimal rootfs, install the modules
# tar x -C /media/root -f modules-beaglebone.tgz
- 6. If using core-image-minimal rootfs, install the kernel uImage into /boot
+ 6. If using core-image-minimal rootfs, install the kernel zImage into /boot
directory of rootfs
- # cp uImage-beaglebone.bin /media/root/boot/uImage
+ # cp zImage-beaglebone.bin /media/root/boot/zImage
7. If using core-image-minimal rootfs, also install device tree (DTB) files
into /boot directory of rootfs
- # cp uImage-am335x-bone.dtb /media/root/boot/am335x-bone.dtb
- # cp uImage-am335x-boneblack.dtb /media/root/boot/am335x-boneblack.dtb
+ # cp zImage-am335x-bone.dtb /media/root/boot/am335x-bone.dtb
+ # cp zImage-am335x-boneblack.dtb /media/root/boot/am335x-boneblack.dtb
8. Unmount the SD partitions, insert the SD card into the Beaglebone, and
boot the Beaglebone
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index b3acbe1bd2..49efdf1eb0 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -41,11 +41,11 @@ from bb import ui
from bb import server
from bb import cookerdata
-__version__ = "1.23.1"
+__version__ = "1.25.0"
logger = logging.getLogger("BitBake")
-# Python multiprocessing requires /dev/shm
-if not os.access('/dev/shm', os.W_OK | os.X_OK):
+# Python multiprocessing requires /dev/shm on Linux
+if sys.platform.startswith('linux') and not os.access('/dev/shm', os.W_OK | os.X_OK):
sys.exit("FATAL: /dev/shm does not exist or is not writable")
# Unbuffer stdout to avoid log truncation in the event
@@ -139,8 +139,8 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("-n", "--dry-run", help = "Don't execute, just go through the motions.",
action = "store_true", dest = "dry_run", default = False)
- parser.add_option("-S", "--dump-signatures", help = "Dump out the signature construction information, with no task execution. Parameters are passed to the signature handling code, use 'none' if no specific handler is required.",
- action = "append", dest = "dump_signatures", default = [])
+ parser.add_option("-S", "--dump-signatures", help = "Dump out the signature construction information, with no task execution. The SIGNATURE_HANDLER parameter is passed to the handler. Two common values are none and printdiff but the handler may define more/less. none means only dump the signature, printdiff means compare the dumped signature with the cached one.",
+ action = "append", dest = "dump_signatures", default = [], metavar="SIGNATURE_HANDLER")
parser.add_option("-p", "--parse-only", help = "Quit after parsing the BB recipes.",
action = "store_true", dest = "parse_only", default = False)
@@ -148,7 +148,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("-s", "--show-versions", help = "Show current and preferred versions of all recipes.",
action = "store_true", dest = "show_versions", default = False)
- parser.add_option("-e", "--environment", help = "Show the global or per-package environment complete with information about where variables were set/changed.",
+ parser.add_option("-e", "--environment", help = "Show the global or per-recipe environment complete with information about where variables were set/changed.",
action = "store_true", dest = "show_environment", default = False)
parser.add_option("-g", "--graphviz", help = "Save dependency tree information for the specified targets in the dot syntax.",
@@ -196,6 +196,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("", "--status-only", help = "Check the status of the remote bitbake server.",
action = "store_true", dest = "status_only", default = False)
+ parser.add_option("-w", "--write-log", help = "Writes the event log of the build to a bitbake event json file. Use '' (empty string) to assign the name automatically.",
+ action = "store", dest = "writeeventlog")
+
options, targets = parser.parse_args(sys.argv)
# some environmental variables set also configuration options
@@ -206,6 +209,14 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
if "BBTOKEN" in os.environ:
options.xmlrpctoken = os.environ["BBTOKEN"]
+ if "BBEVENTLOG" is os.environ:
+ options.writeeventlog = os.environ["BBEVENTLOG"]
+
+ # fill in proper log name if not supplied
+ if options.writeeventlog is not None and len(options.writeeventlog) == 0:
+ import datetime
+ options.writeeventlog = "bitbake_eventlog_%s.json" % datetime.datetime.now().strftime("%Y%m%d%H%M%S")
+
# if BBSERVER says to autodetect, let's do that
if options.remote_server:
[host, port] = options.remote_server.split(":", 2)
@@ -266,7 +277,6 @@ def start_server(servermodule, configParams, configuration, features):
return server
-
def main():
configParams = BitBakeConfigParameters()
@@ -372,7 +382,7 @@ def main():
bb.event.ui_queue = []
server_connection.terminate()
else:
- print("server address: %s, server port: %s" % (server.serverImpl.host, server.serverImpl.port))
+ print("Bitbake server address: %s, server port: %s" % (server.serverImpl.host, server.serverImpl.port))
return 0
return 1
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 9964040bf7..98794981a0 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -103,6 +103,60 @@ class Commands(cmd.Cmd):
logger.plain("%s %s %d" % (layername.ljust(20), layerdir.ljust(40), layerpri))
+ def do_add_layer(self, dirname):
+ """Add a layer to bblayers.conf
+
+usage: add-layer <layerdir>
+"""
+ if not dirname:
+ sys.stderr.write("Please specify the layer directory to add\n")
+ return
+
+ layerdir = os.path.abspath(dirname)
+ if not os.path.exists(layerdir):
+ sys.stderr.write("Specified layer directory doesn't exist\n")
+ return
+
+ layer_conf = os.path.join(layerdir, 'conf', 'layer.conf')
+ if not os.path.exists(layer_conf):
+ sys.stderr.write("Specified layer directory doesn't contain a conf/layer.conf file\n")
+ return
+
+ bblayers_conf = os.path.join('conf', 'bblayers.conf')
+ if not os.path.exists(bblayers_conf):
+ sys.stderr.write("Unable to find bblayers.conf\n")
+ return
+
+ (notadded, _) = bb.utils.edit_bblayers_conf(bblayers_conf, layerdir, None)
+ if notadded:
+ for item in notadded:
+ sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item)
+
+
+ def do_remove_layer(self, dirname):
+ """Remove a layer from bblayers.conf
+
+usage: remove-layer <layerdir>
+"""
+ if not dirname:
+ sys.stderr.write("Please specify the layer directory to remove\n")
+ return
+
+ bblayers_conf = os.path.join('conf', 'bblayers.conf')
+ if not os.path.exists(bblayers_conf):
+ sys.stderr.write("Unable to find bblayers.conf\n")
+ return
+
+ if dirname.startswith('*'):
+ layerdir = dirname
+ else:
+ layerdir = os.path.abspath(dirname)
+ (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdir)
+ if notremoved:
+ for item in notremoved:
+ sys.stderr.write("No layers matching %s found in BBLAYERS\n" % item)
+
+
def version_str(self, pe, pv, pr = None):
verstr = "%s" % pv
if pr:
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 05e0cf6313..8a24161250 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -12,10 +12,18 @@ import errno
import signal
# Users shouldn't be running this code directly
-if len(sys.argv) != 2 or sys.argv[1] != "decafbad":
+if len(sys.argv) != 2 or not sys.argv[1].startswith("decafbad"):
print("bitbake-worker is meant for internal execution by bitbake itself, please don't use it standalone.")
sys.exit(1)
+profiling = False
+if sys.argv[1] == "decafbadbad":
+ profiling = True
+ try:
+ import cProfile as profile
+ except:
+ import profile
+
logger = logging.getLogger("BitBake")
try:
@@ -81,6 +89,11 @@ def workerlog_write(msg):
lf.write(msg)
lf.flush()
+def sigterm_handler(signum, frame):
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
+ os.killpg(0, signal.SIGTERM)
+ sys.exit()
+
def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdata, quieterrors=False):
# We need to setup the environment BEFORE the fork, since
# a fork() or exec*() activates PSEUDO...
@@ -129,10 +142,13 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
bb.msg.fatal("RunQueue", "fork failed: %d (%s)" % (e.errno, e.strerror))
if pid == 0:
+ def child():
global worker_pipe
pipein.close()
- signal.signal(signal.SIGTERM, signal.SIG_DFL)
+ signal.signal(signal.SIGTERM, sigterm_handler)
+ # Let SIGHUP exit as SIGTERM
+ signal.signal(signal.SIGHUP, sigterm_handler)
# Save out the PID so that the event can include it the
# events
@@ -140,8 +156,11 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
bb.event.worker_fire = worker_child_fire
worker_pipe = pipeout
- # Make the child the process group leader
- os.setpgid(0, 0)
+ # Make the child the process group leader and ensure no
+ # child process will be controlled by the current terminal
+ # This ensures signals sent to the controlling terminal like Ctrl+C
+ # don't stop the child processes.
+ os.setsid()
# No stdin
newsi = os.open(os.devnull, os.O_RDWR)
os.dup2(newsi, sys.stdin.fileno())
@@ -154,7 +173,7 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
data.setVar("BUILDNAME", workerdata["buildname"])
data.setVar("DATE", workerdata["date"])
data.setVar("TIME", workerdata["time"])
- bb.parse.siggen.set_taskdata(workerdata["hashes"], workerdata["hash_deps"], workerdata["sigchecksums"])
+ bb.parse.siggen.set_taskdata(workerdata["sigdata"])
ret = 0
try:
the_data = bb.cache.Cache.loadDataFull(fn, appends, data)
@@ -179,11 +198,22 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
logger.critical(str(exc))
os._exit(1)
try:
- if not cfg.dry_run:
- ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile)
- os._exit(ret)
+ if cfg.dry_run:
+ return 0
+ return bb.build.exec_task(fn, taskname, the_data, cfg.profile)
except:
os._exit(1)
+ if not profiling:
+ os._exit(child())
+ else:
+ profname = "profile-%s.log" % (fn.replace("/", "-") + "-" + taskname)
+ prof = profile.Profile()
+ try:
+ ret = profile.Profile.runcall(prof, child)
+ finally:
+ prof.dump_stats(profname)
+ bb.utils.process_profilelog(profname)
+ os._exit(ret)
else:
for key, value in envbackup.iteritems():
if value is None:
@@ -241,9 +271,14 @@ class BitbakeWorker(object):
self.build_pipes = {}
signal.signal(signal.SIGTERM, self.sigterm_exception)
+ # Let SIGHUP exit as SIGTERM
+ signal.signal(signal.SIGHUP, self.sigterm_exception)
def sigterm_exception(self, signum, stackframe):
- bb.warn("Worker recieved SIGTERM, shutting down...")
+ if signum == signal.SIGTERM:
+ bb.warn("Worker recieved SIGTERM, shutting down...")
+ elif signum == signal.SIGHUP:
+ bb.warn("Worker recieved SIGHUP, shutting down...")
self.handle_finishnow(None)
signal.signal(signal.SIGTERM, signal.SIG_DFL)
os.kill(os.getpid(), signal.SIGTERM)
@@ -358,7 +393,16 @@ class BitbakeWorker(object):
try:
worker = BitbakeWorker(sys.stdin)
- worker.serve()
+ if not profiling:
+ worker.serve()
+ else:
+ profname = "profile-worker.log"
+ prof = profile.Profile()
+ try:
+ profile.Profile.runcall(prof, worker.serve)
+ finally:
+ prof.dump_stats(profname)
+ bb.utils.process_profilelog(profname)
except BaseException as e:
if not normalexit:
import traceback
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 01ffc7a37c..85a2575a66 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -37,7 +37,7 @@ function webserverKillAll()
kill -SIGTERM -$(< ${pidfile}) 2>/dev/null
sleep 1;
# Kill processes if they are still running - may happen in interactive shells
- ps fux | grep "python.*manage.py" | awk '{print $2}' | xargs kill
+ ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill
done;
rm ${pidfile}
fi
@@ -63,14 +63,19 @@ function webserverStartAll()
retval=0
python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1
fi
- python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1
-
+ if [ "x$TOASTER_MANAGED" == "x1" ]; then
+ python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1
+ python $BBBASEDIR/lib/toaster/manage.py checksettings --traceback || retval=1
+ fi
if [ $retval -eq 0 ]; then
- python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
+ echo "Starting webserver..."
+ python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >${BUILDDIR}/toaster_web_$$.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
sleep 1
if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then
retval=1
rm "${BUILDDIR}/.toastermain.pid"
+ else
+ echo "Webserver address: http://0.0.0.0:$WEB_PORT/"
fi
fi
return $retval
@@ -80,8 +85,10 @@ function webserverStartAll()
function addtoConfiguration()
{
- echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2
- echo $1 >> ${BUILDDIR}/conf/$2
+ file=$1
+ shift
+ echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file
+ for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done
}
INSTOPSYSTEM=0
@@ -96,7 +103,7 @@ function stop_system()
kill $(< ${BUILDDIR}/.toasterui.pid ) 2>/dev/null
rm ${BUILDDIR}/.toasterui.pid
fi
- BBSERVER=localhost:8200 bitbake -m
+ BBSERVER=0.0.0.0:-1 bitbake -m
unset BBSERVER
webserverKillAll
# force stop any misbehaving bitbake server
@@ -119,16 +126,58 @@ function notify_chldexit() {
}
+# Verify prerequisites
+
+if ! echo "import django; print (1,) == django.VERSION[0:1] and django.VERSION[1:2][0] in (5,6)" | python 2>/dev/null | grep True >/dev/null; then
+ echo -e "This program needs Django 1.5 or 1.6. Please install with\n\npip install django==1.6"
+ return 2
+fi
+
+if ! echo "import south; print [0,8,4] == map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then
+ echo -e "This program needs South 0.8.4. Please install with\n\npip install south==0.8.4"
+ return 2
+fi
+
+
+# read command line parameters
+
BBBASEDIR=`dirname ${BASH_SOURCE}`/..
RUNNING=0
+NOTOASTERUI=0
+WEBSERVER=1
+TOASTER_BRBE=""
+WEB_PORT="8000"
+
+for param in $*; do
+ case $param in
+ noui )
+ NOTOASTERUI=1
+ ;;
+ noweb )
+ WEBSERVER=0
+ ;;
+ brbe=* )
+ TOASTER_BRBE=$'\n'"TOASTER_BRBE=\""${param#*=}"\""
+ ;;
+ webport=*)
+ WEB_PORT="${param#*=}"
+ esac
+done
+
+
if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; then
# We are called as standalone. We refuse to run in a build environment - we need the interactive mode for that.
# Start just the web server, point the web browser to the interface, and start any Django services.
if [ -n "$BUILDDIR" ]; then
- echo "Error: build/ directory detected. Standalone Toaster will not start in a build environment." 1>&2;
- return 1;
+ echo -e "Error: It looks like you sourced oe-init-build-env. Toaster cannot start in build mode from an oe-core build environment. You can work around this problem by starting Toaster from a new terminal window." 1>&2;
+ exit 1;
+ fi
+
+ if [ "x`which daemon`" == "x" ]; then
+ echo -e "Failed dependency; toaster needs the 'daemon' program in order to be able to start builds'. Please install the 'daemon' program." 1>&2;
+ exit 1;
fi
# Define a fake builddir where only the pid files are actually created. No real builds will take place here.
@@ -139,10 +188,18 @@ if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; th
webserverKillAll
RUNNING=0
}
- webserverStartAll || (echo "Fail to start the web server, stopping" 1>&2 && exit 1)
- xdg-open http://0.0.0.0:8000/ >/dev/null 2>&1 &
+ TOASTER_MANAGED=1
+ export TOASTER_MANAGED=1
+ if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
+ echo "Failed to start the web server, stopping" 1>&2;
+ exit 1;
+ fi
+ if [ $WEBSERVER -gt 0 ]; then
+ echo "Starting browser..."
+ xdg-open http://127.0.0.1:$WEB_PORT/ >/dev/null 2>&1 &
+ fi
trap trap_ctrlc SIGINT
- echo "Running. Stop with Ctrl-C"
+ echo "Toaster is now running. You can stop it with Ctrl-C"
while [ $RUNNING -gt 0 ]; do
python $BBBASEDIR/lib/toaster/manage.py runbuilds
sleep 1
@@ -158,23 +215,6 @@ if [ -z "$BUILDDIR" ] || [ -z `which bitbake` ]; then
fi
-
-# Verify prerequisites
-
-if ! echo "import django; print (1,5) == django.VERSION[0:2]" | python 2>/dev/null | grep True >/dev/null; then
- echo -e "This program needs Django 1.5. Please install with\n\nsudo pip install django==1.5"
- return 2
-fi
-
-if ! echo "import south; print [0,8,4] == map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then
- echo -e "This program needs South 0.8.4. Please install with\n\nsudo pip install south==0.8.4"
- return 2
-fi
-
-
-
-
-
# Determine the action. If specified by arguments, fine, if not, toggle it
if [ "x$1" == "xstart" ] || [ "x$1" == "xstop" ]; then
CMD="$1"
@@ -186,19 +226,6 @@ else
fi;
fi
-NOTOASTERUI=0
-WEBSERVER=1
-for param in $*; do
- case $param in
- noui )
- NOTOASTERUI=1
- ;;
- noweb )
- WEBSERVER=0
- ;;
- esac
-done
-
echo "The system will $CMD."
# Make sure it's safe to run by checking bitbake lock
@@ -208,30 +235,40 @@ if [ -e $BUILDDIR/bitbake.lock ]; then
(flock -n 200 ) 200<$BUILDDIR/bitbake.lock || lock=0
fi
-if [ ${CMD} == "start" ] && ( [ $lock -eq 0 ] || [ -e $BUILDDIR/.toastermain.pid ] ); then
- echo "Error: bitbake lock state error. File locks show that the system is on." 2>&1
- echo "If you see problems, stop and then start the system again." 2>&1
+if [ ${CMD} == "start" ] && [ $lock -eq 0 ]; then
+ echo "Error: bitbake lock state error. File locks show that the system is on." 1>&2
+ echo "Please wait for the current build to finish, stop and then start the system again." 1>&2
return 3
fi
+if [ ${CMD} == "start" ] && [ -e $BUILDDIR/.toastermain.pid ] && kill -0 `cat $BUILDDIR/.toastermain.pid`; then
+ echo "Error: bitbake appears to be dead, but the webserver is alive. Something fishy is going on." 1>&2
+ echo "Cleaning up the web server at to start a clean slate."
+ webserverKillAll
+fi
+
# Execute the commands
case $CMD in
start )
start_success=1
- addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
+ addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE
if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
echo "Failed ${CMD}."
return 4
fi
unset BBSERVER
- bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B localhost:8200
+ PREREAD=""
+ if [ -e conf/toaster-pre.conf ]; then
+ PREREAD="--read conf/toaster-pre.conf"
+ fi
+ bitbake $PREREAD --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0
if [ $? -ne 0 ]; then
start_success=0
echo "Bitbake server start failed"
else
- export BBSERVER=localhost:8200
+ export BBSERVER=0.0.0.0:-1
if [ $NOTOASTERUI == 0 ]; then # we start the TOASTERUI only if not inhibited
bitbake --observe-only -u toasterui >${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid
fi
@@ -240,10 +277,12 @@ case $CMD in
# set fail safe stop system on terminal exit
trap stop_system SIGHUP
echo "Successful ${CMD}."
+ return 0
else
# failed start, do stop
stop_system
echo "Failed ${CMD}."
+ return 1
fi
# stop system on terminal exit
set -o monitor
diff --git a/bitbake/bin/toaster-eventreplay b/bitbake/bin/toaster-eventreplay
new file mode 100755
index 0000000000..624829aea0
--- /dev/null
+++ b/bitbake/bin/toaster-eventreplay
@@ -0,0 +1,179 @@
+#!/usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Copyright (C) 2014 Alex Damian
+#
+# This file re-uses code spread throughout other Bitbake source files.
+# As such, all other copyrights belong to their own right holders.
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+# This command takes a filename as a single parameter. The filename is read
+# as a build eventlog, and the ToasterUI is used to process events in the file
+# and log data in the database
+
+import os
+import sys, logging
+
+# mangle syspath to allow easy import of modules
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
+ 'lib'))
+
+
+import bb.cooker
+from bb.ui import toasterui
+import sys
+import logging
+
+logger = logging.getLogger(__name__)
+console = logging.StreamHandler(sys.stdout)
+format_str = "%(levelname)s: %(message)s"
+logging.basicConfig(format=format_str)
+
+
+import json, pickle
+
+
+class FileReadEventsServerConnection():
+ """ Emulates a connection to a bitbake server that feeds
+ events coming actually read from a saved log file.
+ """
+
+ class MockConnection():
+ """ fill-in for the proxy to the server. we just return generic data
+ """
+ def __init__(self, sc):
+ self._sc = sc
+
+ def runCommand(self, commandArray):
+ """ emulates running a command on the server; only read-only commands are accepted """
+ command_name = commandArray[0]
+
+ if command_name == "getVariable":
+ if commandArray[1] in self._sc._variables:
+ return (self._sc._variables[commandArray[1]]['v'], None)
+ return (None, "Missing variable")
+
+ elif command_name == "getAllKeysWithFlags":
+ dump = {}
+ flaglist = commandArray[1]
+ for k in self._sc._variables.keys():
+ try:
+ if not k.startswith("__"):
+ v = self._sc._variables[k]['v']
+ dump[k] = {
+ 'v' : v ,
+ 'history' : self._sc._variables[k]['history'],
+ }
+ for d in flaglist:
+ dump[k][d] = self._sc._variables[k][d]
+ except Exception as e:
+ print(e)
+ return (dump, None)
+ else:
+ raise Exception("Command %s not implemented" % commandArray[0])
+
+ def terminateServer(self):
+ """ do not do anything """
+ pass
+
+
+
+ class EventReader():
+ def __init__(self, sc):
+ self._sc = sc
+ self.firstraise = 0
+
+ def _create_event(self, line):
+ def _import_class(name):
+ assert len(name) > 0
+ assert "." in name, name
+
+ components = name.strip().split(".")
+ modulename = ".".join(components[:-1])
+ moduleklass = components[-1]
+
+ module = __import__(modulename, fromlist=[str(moduleklass)])
+ return getattr(module, moduleklass)
+
+ # we build a toaster event out of current event log line
+ try:
+ event_data = json.loads(line.strip())
+ event_class = _import_class(event_data['class'])
+ event_object = pickle.loads(json.loads(event_data['vars']))
+ except ValueError as e:
+ print("Failed loading ", line)
+ raise e
+
+ if not isinstance(event_object, event_class):
+ raise Exception("Error loading objects %s class %s ", event_object, event_class)
+
+ return event_object
+
+ def waitEvent(self, timeout):
+
+ nextline = self._sc._eventfile.readline()
+ if len(nextline) == 0:
+ # the build data ended, while toasterui still waits for events.
+ # this happens when the server was abruptly stopped, so we simulate this
+ self.firstraise += 1
+ if self.firstraise == 1:
+ raise KeyboardInterrupt()
+ else:
+ return None
+ else:
+ self._sc.lineno += 1
+ return self._create_event(nextline)
+
+
+ def _readVariables(self, variableline):
+ self._variables = json.loads(variableline.strip())['allvariables']
+
+
+ def __init__(self, file_name):
+ self.connection = FileReadEventsServerConnection.MockConnection(self)
+ self._eventfile = open(file_name, "r")
+
+ # we expect to have the variable dump at the start of the file
+ self.lineno = 1
+ self._readVariables(self._eventfile.readline())
+
+ self.events = FileReadEventsServerConnection.EventReader(self)
+
+
+
+
+
+class MockConfigParameters():
+ """ stand-in for cookerdata.ConfigParameters; as we don't really config a cooker, this
+ serves just to supply needed interfaces for the toaster ui to work """
+ def __init__(self):
+ self.observe_only = True # we can only read files
+
+
+# run toaster ui on our mock bitbake class
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ logger.error("Usage: %s event.log " % sys.argv[0])
+ sys.exit(1)
+
+ file_name = sys.argv[-1]
+ mock_connection = FileReadEventsServerConnection(file_name)
+ configParams = MockConfigParameters()
+
+ # run the main program
+ toasterui.main(mock_connection.connection, mock_connection.events, configParams)
diff --git a/bitbake/contrib/vim/plugin/newbb.vim b/bitbake/contrib/vim/plugin/newbb.vim
index 3019c855c0..874e338059 100755
--- a/bitbake/contrib/vim/plugin/newbb.vim
+++ b/bitbake/contrib/vim/plugin/newbb.vim
@@ -53,7 +53,6 @@ fun! NewBBTemplate()
put ='LICENSE = \"\"'
put ='SECTION = \"\"'
put ='DEPENDS = \"\"'
- put ='PR = \"r0\"'
put =''
put ='SRC_URI = \"\"'
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index 8b6e0b442f..571424b99f 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -7,7 +7,8 @@
<para>
The primary purpose for running BitBake is to produce some kind
of output such as a single installable package, a kernel, a software
- development kit, or even a full, board-specific bootable Linux image.
+ development kit, or even a full, board-specific bootable Linux image,
+ complete with bootloader, kernel, and root filesystem.
Of course, you can execute the <filename>bitbake</filename>
command with options that cause it to execute single tasks,
compile single recipe files, capture or clear data, or simply
@@ -45,6 +46,11 @@
build host with hyper-threading will most likely show eight processors,
which is the value you would then assign to that variable.
</para>
+
+ <para>
+ A possibly simpler solution is that some Linux distributions
+ (e.g. Debian and Ubuntu) provide the <filename>ncpus</filename> command.
+ </para>
</note>
</para>
@@ -464,6 +470,29 @@
PREFERRED_VERSION_a = "1.1"
</literallayout>
</para>
+
+ <note>
+ <para>
+ It is common for a recipe to provide two versions -- a stable,
+ numbered (and preferred) version, and a version that is
+ automatically checked out from a source code repository that
+ is considered more "bleeding edge" but can be selected only
+ explicitly.
+ </para>
+
+ <para>
+ For example, in the OpenEmbedded codebase, there is a standard,
+ versioned recipe file for BusyBox,
+ <filename>busybox_1.22.1.bb</filename>,
+ but there is also a Git-based version,
+ <filename>busybox_git.bb</filename>, which explicitly contains the line
+ <literallayout class='monospaced'>
+ DEFAULT_PREFERENCE = "-1"
+ </literallayout>
+ to ensure that the numbered, stable version is always preferred
+ unless the developer selects otherwise.
+ </para>
+ </note>
</section>
<section id='bb-bitbake-dependencies'>
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
index 7cc69f831e..0dff736dea 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
@@ -468,6 +468,13 @@
compile-time when set to "keep".
By default, these directories are removed.
</para></listitem>
+ <listitem><para><emphasis>"transportuser":</emphasis>
+ When required, sets the username for the transport.
+ By default, this parameter is empty.
+ The transport username is different than the username
+ used in the main URL, which is passed to the subversion
+ command.
+ </para></listitem>
</itemizedlist>
Following are two examples using svn:
<literallayout class='monospaced'>
@@ -601,6 +608,87 @@
</para>
</section>
+ <section id='clearcase-fetcher'>
+ <title>ClearCase Fetcher (<filename>ccrc://</filename>)</title>
+
+ <para>
+ This fetcher submodule fetches code from a
+ <ulink url='http://en.wikipedia.org/wiki/Rational_ClearCase'>ClearCase</ulink>
+ repository.
+ </para>
+
+ <para>
+ To use this fetcher, make sure your recipe has proper
+ <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
+ <link linkend='var-SRCREV'><filename>SRCREV</filename></link>, and
+ <link linkend='var-PV'><filename>PV</filename></link> settings.
+ Here is an example:
+ <literallayout class='monospaced'>
+ SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module"
+ SRCREV = "EXAMPLE_CLEARCASE_TAG"
+ PV = "${@d.getVar("SRCREV").replace("/", "+")}"
+ </literallayout>
+ The fetcher uses the <filename>rcleartool</filename> or
+ <filename>cleartool</filename> remote client, depending on
+ which one is available.
+ </para>
+
+ <para>
+ Following are options for the <filename>SRC_URI</filename>
+ statement:
+ <itemizedlist>
+ <listitem><para><emphasis><filename>vob</filename></emphasis>:
+ The name, which must include the
+ prepending "/" character, of the ClearCase VOB.
+ This option is required.
+ </para></listitem>
+ <listitem><para><emphasis><filename>module</filename></emphasis>:
+ The module, which must include the
+ prepending "/" character, in the selected VOB
+ The <filename>module</filename> and <filename>vob</filename>
+ options are combined to create the following load rule in
+ the view config spec:
+ <literallayout class='monospaced'>
+ load &lt;vob&gt;&lt;module&gt;
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis><filename>proto</filename></emphasis>:
+ The protocol, which can be either <filename>http</filename> or
+ <filename>https</filename>.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ By default, the fetcher creates a configuration specification.
+ If you want this specification written to an area other than the default,
+ use the <filename>CCASE_CUSTOM_CONFIG_SPEC</filename> variable
+ in your recipe to define where the specification is written.
+ <note>
+ the <filename>SRCREV</filename> loses its functionality if you
+ specify this variable.
+ However, <filename>SRCREV</filename> is still used to label the
+ archive after a fetch even though it does not define what is
+ fetched.
+ </note>
+ </para>
+
+ <para>
+ Here are a couple of other behaviors worth mentioning:
+ <itemizedlist>
+ <listitem><para>
+ When using <filename>cleartool</filename>, the login of
+ <filename>cleartool</filename> is handled by the system.
+ The login require no special steps.
+ </para></listitem>
+ <listitem><para>
+ In order to use <filename>rcleartool</filename> with authenticated
+ users, an "rcleartool login" is necessary before using the fetcher.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<section id='other-fetchers'>
<title>Other Fetchers</title>
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
index 4ce7ed9f8c..fd5a92316c 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
@@ -471,7 +471,7 @@ ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inh
Time: 00:00:00
Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
- NOTE: Preparing runqueue
+ NOTE: Preparing RunQueue
NOTE: Executing RunQueue Tasks
********************
* *
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
index af2400f53c..2188655de3 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
@@ -35,17 +35,19 @@
<listitem><para>
BitBake executes tasks according to provided
metadata that builds up the tasks.
- Metadata is stored in recipe (<filename>.bb</filename>),
- recipe "append" (<filename>.bbappend</filename>),
- configuration (<filename>.conf</filename>), and class
- (<filename>.bbclass</filename>) files and provides
+ Metadata is stored in recipe (<filename>.bb</filename>)
+ and related recipe "append" (<filename>.bbappend</filename>)
+ files, configuration (<filename>.conf</filename>) and
+ underlying include (<filename>.inc</filename>) files, and
+ in class (<filename>.bbclass</filename>) files.
+ The metadata provides
BitBake with instructions on what tasks to run and
the dependencies between those tasks.
</para></listitem>
<listitem><para>
BitBake includes a fetcher library for obtaining source
code from various places such as local files, source control
- systems, websites, or local files.
+ systems, or websites.
</para></listitem>
<listitem><para>
The instructions for each unit to be built (e.g. a piece
@@ -56,8 +58,8 @@
</para></listitem>
<listitem><para>
BitBake includes a client/server abstraction and can
- be used from a command line or used as a service over XMLRPC and
- has several different user interfaces.
+ be used from a command line or used as a service over
+ XML-RPC and has several different user interfaces.
</para></listitem>
</itemizedlist>
</para>
@@ -80,8 +82,11 @@
Today, BitBake is the primary basis of the
<ulink url="http://www.openembedded.org/">OpenEmbedded</ulink>
project, which is being used to build and maintain Linux
- distributions such as the Angstrom Distribution and which is used
- as the build tool for Linux projects such as the Yocto Project.
+ distributions such as the
+ <ulink url='http://www.angstrom-distribution.org/'>Angstrom Distribution</ulink>,
+ and which is also being used as the build tool for Linux projects
+ such as the
+ <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink>.
</para>
<para>
@@ -152,7 +157,7 @@
</para></listitem>
<listitem><para>
Split metadata into layers and allow layers
- to override each other.
+ to enhance or override other layers.
</para></listitem>
<listitem><para>
Allow representation of a given set of input variables
@@ -212,11 +217,12 @@
<listitem><para>Where the source code resides and
how to fetch it</para></listitem>
<listitem><para>Whether the source code requires
- any patches</para></listitem>
+ any patches, where to find them, and how to apply
+ them</para></listitem>
<listitem><para>How to configure and compile the
source code</para></listitem>
<listitem><para>Where on the target machine to install the
- package or packages being compiled</para></listitem>
+ package or packages created</para></listitem>
</itemizedlist>
</para>
@@ -228,7 +234,11 @@
The term "package" is also commonly used to describe recipes.
However, since the same word is used to describe packaged
output from a project, it is best to maintain a single
- descriptive term, "recipes".
+ descriptive term - "recipes".
+ Put another way, a single "recipe" file is quite capable
+ of generating a number of related but separately installable
+ "packages".
+ In fact, that ability is fairly common.
</note>
</para>
</section>
@@ -313,7 +323,6 @@
Append files, which are files that have the
<filename>.bbappend</filename> file extension, extend or
override information in an existing recipe file.
- recipe file.
</para>
<para>
@@ -326,8 +335,9 @@
</para>
<para>
- Information in append files overrides the information in the
- similarly-named recipe file.
+ Information in append files extends or
+ overrides the information in the underlying,
+ similarly-named recipe files.
</para>
<para>
@@ -352,6 +362,12 @@
However, if you named the append file
<filename>busybox_1.%.bbappend</filename>, then you would have a match.
</para>
+
+ <para>
+ In the most general case, you could name the append file something as
+ simple as <filename>busybox_%.bbappend</filename> to be entirely
+ version independent.
+ </para>
</section>
</section>
@@ -432,7 +448,7 @@
has been thoroughly tested for compatibility with the other
components.
For information on how to check out a particular BitBake-based
- build system, the build system's supporting documentation.
+ build system, consult that build system's supporting documentation.
</para></listitem>
</itemizedlist>
</para>
@@ -492,14 +508,16 @@
-D, --debug Increase the debug level. You can specify this more
than once.
-n, --dry-run Don't execute, just go through the motions.
- -S DUMP_SIGNATURES, --dump-signatures=DUMP_SIGNATURES
+ -S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER
Dump out the signature construction information, with
- no task execution. Parameters are passed to the
- signature handling code, use 'none' if no specific
- handler is required.
+ no task execution. The SIGNATURE_HANDLER parameter is
+ passed to the handler. Two common values are none and
+ printdiff but the handler may define more/less. none
+ means only dump the signature, printdiff means compare
+ the dumped signature with the cached one.
-p, --parse-only Quit after parsing the BB recipes.
-s, --show-versions Show current and preferred versions of all recipes.
- -e, --environment Show the global or per-package environment complete
+ -e, --environment Show the global or per-recipe environment complete
with information about where variables were
set/changed.
-g, --graphviz Save dependency tree information for the specified
@@ -514,6 +532,8 @@
-u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp).
-t SERVERTYPE, --servertype=SERVERTYPE
Choose which server to use, process or xmlrpc.
+ --token=XMLRPCTOKEN Specify the connection token to be used when
+ connecting to a remote server.
--revisions-changed Set the exit code depending on whether upstream
floating revisions have changed or not.
--server-only Run bitbake without a UI, only starting a server
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index a9f5072128..0dd543bcc0 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -159,6 +159,10 @@
using the "+=" and "=+" operators.
These operators insert a space between the current
value and prepended or appended value.
+ </para>
+
+ <para>
+ These operators take immediate effect during parsing.
Here are some examples:
<literallayout class='monospaced'>
B = "bval"
@@ -178,6 +182,10 @@
<para>
If you want to append or prepend values without an
inserted space, use the ".=" and "=." operators.
+ </para>
+
+ <para>
+ These operators take immediate effect during parsing.
Here are some examples:
<literallayout class='monospaced'>
B = "bval"
@@ -198,6 +206,13 @@
You can also append and prepend a variable's value
using an override style syntax.
When you use this syntax, no spaces are inserted.
+ </para>
+
+ <para>
+ These operators differ from the ":=", ".=", "=.", "+=", and "=+"
+ operators in that their effects are deferred
+ until after parsing completes rather than being immediately
+ applied.
Here are some examples:
<literallayout class='monospaced'>
B = "bval"
@@ -217,13 +232,6 @@
override syntax.
</note>
</para>
-
- <para>
- The operators "_append" and "_prepend" differ from
- the operators ".=" and "=." in that they are deferred
- until after parsing completes rather than being immediately
- applied.
- </para>
</section>
<section id='removing-override-style-syntax'>
@@ -283,7 +291,18 @@
The variable <filename>FOO</filename> has two flags:
<filename>a</filename> and <filename>b</filename>.
The flags are immediately set to "abc" and "123", respectively.
- The <filename>a</filename> flag becomes "abc456".
+ The <filename>a</filename> flag becomes "abc 456".
+ </para>
+
+ <para>
+ No need exists to pre-define variable flags.
+ You can simply start using them.
+ One extremely common application
+ is to attach some brief documentation to a BitBake variable as
+ follows:
+ <literallayout class='monospaced'>
+ CACHE[doc] = "The directory holding the cache of the metadata."
+ </literallayout>
</para>
</section>
@@ -298,7 +317,19 @@
DATE = "${@time.strftime('%Y%m%d',time.gmtime())}"
</literallayout>
This example results in the <filename>DATE</filename>
- variable becoming the current date.
+ variable being set to the current date.
+ </para>
+
+ <para>
+ Probably the most common use of this feature is to extract
+ the value of variables from BitBake's internal data dictionary,
+ <filename>d</filename>.
+ The following lines select the values of a package name
+ and its version number, respectively:
+ <literallayout class='monospaced'>
+ PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}"
+ PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}"
+ </literallayout>
</para>
</section>
@@ -372,6 +403,25 @@
You select the os-specific version of the <filename>TEST</filename>
variable by appending the "os" override to the variable
(i.e.<filename>TEST_os</filename>).
+ </para>
+
+ <para>
+ To better understand this, consider a practical example
+ that assumes an OpenEmbedded metadata-based Linux
+ kernel recipe file.
+ The following lines from the recipe file first set
+ the kernel branch variable <filename>KBRANCH</filename>
+ to a default value, then conditionally override that
+ value based on the architecture of the build:
+ <literallayout class='monospaced'>
+ KBRANCH = "standard/base"
+ KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
+ KBRANCH_qemumips = "standard/mti-malta32"
+ KBRANCH_qemuppc = "standard/qemuppc"
+ KBRANCH_qemux86 = "standard/common-pc/base"
+ KBRANCH_qemux86-64 = "standard/common-pc-64/base"
+ KBRANCH_qemumips64 = "standard/mti-malta64"
+ </literallayout>
</para></listitem>
<listitem><para><emphasis>Appending and Prepending:</emphasis>
BitBake also supports append and prepend operations to
@@ -385,6 +435,19 @@
</literallayout>
In this example, <filename>DEPENDS</filename> becomes
"glibc ncurses libmad".
+ </para>
+
+ <para>
+ Again, using an OpenEmbedded metadata-based
+ kernel recipe file as an example, the
+ following lines will conditionally append to the
+ <filename>KERNEL_FEATURES</filename> variable based
+ on the architecture:
+ <literallayout class='monospaced'>
+ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+ KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+ KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+ </literallayout>
</para></listitem>
</itemizedlist>
</para>
@@ -1140,12 +1203,6 @@
Tells BitBake to not generate a stamp file for a task,
which implies the task should always be executed.
</para></listitem>
- <listitem><para><emphasis>fakeroot:</emphasis>
- Causes a task to be run in a fakeroot environment,
- obtained by adding the variables in
- <link linkend='var-FAKEROOTENV'><filename>FAKEROOTENV</filename></link>
- to the environment.
- </para></listitem>
<listitem><para><emphasis>umask:</emphasis>
The umask to run the task under.
</para></listitem>
@@ -1251,8 +1308,8 @@
BitBake allows installation of event handlers within
recipe and class files.
Events are triggered at certain points during operation,
- such as the beginning of operation against a given
- <filename>.bb</filename>, the start of a given task,
+ such as the beginning of an operation against a given recipe
+ (<filename>*.bb</filename> file), the start of a given task,
task failure, task success, and so forth.
The intent is to make it easy to do things like email
notification on build failure.
@@ -1281,6 +1338,27 @@
</para>
<para>
+ Because you probably are only interested in a subset of events,
+ you would likely use the <filename>[eventmask]</filename> flag
+ for your event handler to be sure that only certain events
+ trigger the handler.
+ Given the previous example, suppose you only wanted the
+ <filename>bb.build.TaskFailed</filename> event to trigger that
+ event handler.
+ Use the flag as follows:
+ <literallayout class='monospaced'>
+ addhandler myclass_eventhandler
+ myclass_eventhandler[eventmask] = "bb.build.TaskFailed"
+ python myclass_eventhandler() {
+ from bb.event import getName
+ from bb import data
+ print("The name of the Event is %s" % getName(e))
+ print("The file we run for is %s" % data.getVar('FILE', e.data, True))
+ }
+ </literallayout>
+ </para>
+
+ <para>
During a standard build, the following common events might occur:
<itemizedlist>
<listitem><para>
@@ -1466,9 +1544,9 @@
complete before that task can be executed.
Here is an example:
<literallayout class='monospaced'>
- do_configure[deptask] = "do_populate_staging"
+ do_configure[deptask] = "do_populate_sysroot"
</literallayout>
- In this example, the <filename>do_populate_staging</filename>
+ In this example, the <filename>do_populate_sysroot</filename>
task of each item in <filename>DEPENDS</filename> must complete before
<filename>do_configure</filename> can execute.
</para>
@@ -1494,11 +1572,11 @@
item runtime dependency which must have completed before that
task can be executed.
<literallayout class='monospaced'>
- do_package_write[rdeptask] = "do_package"
+ do_package_qa[rdeptask] = "do_packagedata"
</literallayout>
- In the previous example, the <filename>do_package</filename>
+ In the previous example, the <filename>do_packagedata</filename>
task of each item in <filename>RDEPENDS</filename> must have
- completed before <filename>do_package_write</filename> can execute.
+ completed before <filename>do_package_qa</filename> can execute.
</para>
</section>
@@ -1543,9 +1621,9 @@
the data in <filename>DEPENDS</filename>.
Here is an example:
<literallayout class='monospaced'>
- do_patch[depends] = "quilt-native:do_populate_staging"
+ do_patch[depends] = "quilt-native:do_populate_sysroot"
</literallayout>
- In this example, the <filename>do_populate_staging</filename>
+ In this example, the <filename>do_populate_sysroot</filename>
task of the target <filename>quilt-native</filename>
must have completed before the
<filename>do_patch</filename> task can execute.
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
index e927c4d9e3..7fff933be8 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
@@ -56,7 +56,7 @@
-->
<copyright>
- <year>2004-2014</year>
+ <year>2004-2015</year>
<holder>Richard Purdie</holder>
<holder>Chris Larson</holder>
<holder>and Phil Blundell</holder>
diff --git a/bitbake/doc/bitbake.1 b/bitbake/doc/bitbake.1
index 15a7f205aa..a6c8d97276 100644
--- a/bitbake/doc/bitbake.1
+++ b/bitbake/doc/bitbake.1
@@ -89,7 +89,7 @@ quit after parsing the BB files (developers only)
show current and preferred versions of all packages
.TP
.B \-e, \-\-environment
-show the global or per-package environment (this is what used to be bbread)
+show the global or per-recipe environment (this is what used to be bbread)
.TP
.B \-g, \-\-graphviz
emit the dependency trees of the specified packages in the dot syntax
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index 84f6ec3f3c..36c4d9663d 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -21,7 +21,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-__version__ = "1.23.1"
+__version__ = "1.25.0"
import sys
if sys.version_info < (2, 7, 3):
@@ -103,7 +103,7 @@ def fatal(*args):
def deprecated(func, name=None, advice=""):
"""This is a decorator which can be used to mark functions
- as deprecated. It will result in a warning being emmitted
+ as deprecated. It will result in a warning being emitted
when the function is used."""
import warnings
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index dcd42ef8cf..65cc851df4 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -23,7 +23,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-#Based on functions from the base bb module, Copyright 2003 Holger Schurig
+# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import os
import sys
@@ -42,9 +42,8 @@ logger = logging.getLogger('BitBake.Build')
NULL = open(os.devnull, 'r+')
-
-# When we execute a python function we'd like certain things
-# in all namespaces, hence we add them to __builtins__
+# When we execute a Python function, we'd like certain things
+# in all namespaces, hence we add them to __builtins__.
# If we do not do this and use the exec globals, they will
# not be available to subfunctions.
__builtins__['bb'] = bb
@@ -143,7 +142,7 @@ class LogTee(object):
self.outfile.flush()
def exec_func(func, d, dirs = None):
- """Execute an BB 'function'"""
+ """Execute a BB 'function'"""
body = d.getVar(func)
if not body:
@@ -228,7 +227,7 @@ def exec_func_python(func, d, runfile, cwd=None):
code = _functionfmt.format(function=func, body=d.getVar(func, True))
bb.utils.mkdirhier(os.path.dirname(runfile))
with open(runfile, 'w') as script:
- script.write(code)
+ bb.data.emit_func_python(func, script, d)
if cwd:
try:
@@ -417,7 +416,7 @@ def _exec_task(fn, task, d, quieterr):
os.dup2(logfile.fileno(), oso[1])
os.dup2(logfile.fileno(), ose[1])
- # Ensure python logging goes to the logfile
+ # Ensure Python logging goes to the logfile
handler = logging.StreamHandler(logfile)
handler.setFormatter(logformatter)
# Always enable full debug output into task logfiles
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 936829b838..a1dde96425 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@ except ImportError:
logger.info("Importing cPickle failed. "
"Falling back to a very slow implementation.")
-__cache_version__ = "147"
+__cache_version__ = "148"
def getCacheFile(path, filename, data_hash):
return os.path.join(path, filename + "." + data_hash)
@@ -225,7 +225,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
for package in self.packages_dynamic:
cachedata.packages_dynamic[package].append(fn)
- # Build hash of runtime depends and rececommends
+ # Build hash of runtime depends and recommends
for package in self.packages + [self.pn]:
cachedata.rundeps[fn][package] = list(self.rdepends) + self.rdepends_pkg[package]
cachedata.runrecs[fn][package] = list(self.rrecommends) + self.rrecommends_pkg[package]
@@ -261,7 +261,7 @@ class Cache(object):
def __init__(self, data, data_hash, caches_array):
# Pass caches_array information into Cache Constructor
- # It will be used in later for deciding whether we
+ # It will be used later for deciding whether we
# need extra cache file dump/load support
self.caches_array = caches_array
self.cachedir = data.getVar("CACHE", True)
@@ -529,8 +529,11 @@ class Cache(object):
if hasattr(info_array[0], 'file_checksums'):
for _, fl in info_array[0].file_checksums.items():
for f in fl.split():
- if not ('*' in f or os.path.exists(f)):
- logger.debug(2, "Cache: %s's file checksum list file %s was removed",
+ if "*" in f:
+ continue
+ f, exist = f.split(":")
+ if (exist == "True" and not os.path.exists(f)) or (exist == "False" and os.path.exists(f)):
+ logger.debug(2, "Cache: %s's file checksum list file %s changed",
fn, f)
self.remove(fn)
return False
@@ -620,10 +623,13 @@ class Cache(object):
def mtime(cachefile):
return bb.parse.cached_mtime_noerror(cachefile)
- def add_info(self, filename, info_array, cacheData, parsed=None):
+ def add_info(self, filename, info_array, cacheData, parsed=None, watcher=None):
if isinstance(info_array[0], CoreRecipeInfo) and (not info_array[0].skipped):
cacheData.add_from_recipeinfo(filename, info_array)
+ if watcher:
+ watcher(info_array[0].file_depends)
+
if not self.has_cache:
return
@@ -764,16 +770,6 @@ class MultiProcessCache(object):
self.cachedata = data
- def internSet(self, items):
- new = set()
- for i in items:
- new.add(intern(i))
- return new
-
- def compress_keys(self, data):
- # Override in subclasses if desired
- return
-
def create_cachedata(self):
data = [{}]
return data
@@ -814,15 +810,7 @@ class MultiProcessCache(object):
glf = bb.utils.lockfile(self.cachefile + ".lock")
- try:
- with open(self.cachefile, "rb") as f:
- p = pickle.Unpickler(f)
- data, version = p.load()
- except (IOError, EOFError):
- data, version = None, None
-
- if version != self.__class__.CACHE_VERSION:
- data = self.create_cachedata()
+ data = self.cachedata
for f in [y for y in os.listdir(os.path.dirname(self.cachefile)) if y.startswith(os.path.basename(self.cachefile) + '-')]:
f = os.path.join(os.path.dirname(self.cachefile), f)
@@ -831,16 +819,16 @@ class MultiProcessCache(object):
p = pickle.Unpickler(fd)
extradata, version = p.load()
except (IOError, EOFError):
- extradata, version = self.create_cachedata(), None
+ os.unlink(f)
+ continue
if version != self.__class__.CACHE_VERSION:
+ os.unlink(f)
continue
self.merge_data(extradata, data)
os.unlink(f)
- self.compress_keys(data)
-
with open(self.cachefile, "wb") as f:
p = pickle.Pickler(f, -1)
p.dump([data, self.__class__.CACHE_VERSION])
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 2e8de12f33..21a36f64ca 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -33,9 +33,82 @@ def check_indent(codestr):
return codestr
+# Basically pickle, in python 2.7.3 at least, does badly with data duplication
+# upon pickling and unpickling. Combine this with duplicate objects and things
+# are a mess.
+#
+# When the sets are originally created, python calls intern() on the set keys
+# which significantly improves memory usage. Sadly the pickle/unpickle process
+# doesn't call intern() on the keys and results in the same strings being duplicated
+# in memory. This also means pickle will save the same string multiple times in
+# the cache file.
+#
+# By having shell and python cacheline objects with setstate/getstate, we force
+# the object creation through our own routine where we can call intern (via internSet).
+#
+# We also use hashable frozensets and ensure we use references to these so that
+# duplicates can be removed, both in memory and in the resulting pickled data.
+#
+# By playing these games, the size of the cache file shrinks dramatically
+# meaning faster load times and the reloaded cache files also consume much less
+# memory. Smaller cache files, faster load times and lower memory usage is good.
+#
+# A custom getstate/setstate using tuples is actually worth 15% cachesize by
+# avoiding duplication of the attribute names!
+
+class SetCache(object):
+ def __init__(self):
+ self.setcache = {}
+
+ def internSet(self, items):
+
+ new = []
+ for i in items:
+ new.append(intern(i))
+ s = frozenset(new)
+ if hash(s) in self.setcache:
+ return self.setcache[hash(s)]
+ self.setcache[hash(s)] = s
+ return s
+
+codecache = SetCache()
+
+class pythonCacheLine(object):
+ def __init__(self, refs, execs, contains):
+ self.refs = codecache.internSet(refs)
+ self.execs = codecache.internSet(execs)
+ self.contains = {}
+ for c in contains:
+ self.contains[c] = codecache.internSet(contains[c])
+
+ def __getstate__(self):
+ return (self.refs, self.execs, self.contains)
+
+ def __setstate__(self, state):
+ (refs, execs, contains) = state
+ self.__init__(refs, execs, contains)
+ def __hash__(self):
+ l = (hash(self.refs), hash(self.execs))
+ for c in sorted(self.contains.keys()):
+ l = l + (c, hash(self.contains[c]))
+ return hash(l)
+
+class shellCacheLine(object):
+ def __init__(self, execs):
+ self.execs = codecache.internSet(execs)
+
+ def __getstate__(self):
+ return (self.execs)
+
+ def __setstate__(self, state):
+ (execs) = state
+ self.__init__(execs)
+ def __hash__(self):
+ return hash(self.execs)
+
class CodeParserCache(MultiProcessCache):
cache_file_name = "bb_codeparser.dat"
- CACHE_VERSION = 6
+ CACHE_VERSION = 7
def __init__(self):
MultiProcessCache.__init__(self)
@@ -44,6 +117,27 @@ class CodeParserCache(MultiProcessCache):
self.pythoncacheextras = self.cachedata_extras[0]
self.shellcacheextras = self.cachedata_extras[1]
+ # To avoid duplication in the codeparser cache, keep
+ # a lookup of hashes of objects we already have
+ self.pythoncachelines = {}
+ self.shellcachelines = {}
+
+ def newPythonCacheLine(self, refs, execs, contains):
+ cacheline = pythonCacheLine(refs, execs, contains)
+ h = hash(cacheline)
+ if h in self.pythoncachelines:
+ return self.pythoncachelines[h]
+ self.pythoncachelines[h] = cacheline
+ return cacheline
+
+ def newShellCacheLine(self, execs):
+ cacheline = shellCacheLine(execs)
+ h = hash(cacheline)
+ if h in self.shellcachelines:
+ return self.shellcachelines[h]
+ self.shellcachelines[h] = cacheline
+ return cacheline
+
def init_cache(self, d):
MultiProcessCache.init_cache(self, d)
@@ -51,25 +145,6 @@ class CodeParserCache(MultiProcessCache):
self.pythoncache = self.cachedata[0]
self.shellcache = self.cachedata[1]
- def compress_keys(self, data):
- # When the dicts are originally created, python calls intern() on the set keys
- # which significantly improves memory usage. Sadly the pickle/unpickle process
- # doesn't call intern() on the keys and results in the same strings being duplicated
- # in memory. This also means pickle will save the same string multiple times in
- # the cache file. By interning the data here, the cache file shrinks dramatically
- # meaning faster load times and the reloaded cache files also consume much less
- # memory. This is worth any performance hit from this loops and the use of the
- # intern() data storage.
- # Python 3.x may behave better in this area
- for h in data[0]:
- data[0][h]["refs"] = self.internSet(data[0][h]["refs"])
- data[0][h]["execs"] = self.internSet(data[0][h]["execs"])
- for k in data[0][h]["contains"]:
- data[0][h]["contains"][k] = self.internSet(data[0][h]["contains"][k])
- for h in data[1]:
- data[1][h]["execs"] = self.internSet(data[1][h]["execs"])
- return
-
def create_cachedata(self):
data = [{}, {}]
return data
@@ -103,7 +178,7 @@ class BufferedLogger(Logger):
class PythonParser():
getvars = (".getVar", ".appendVar", ".prependVar")
- containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains", "bb.utils.contains_any")
+ containsfuncs = ("bb.utils.contains", "base_contains", "bb.utils.contains_any")
execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
def warn(self, func, arg):
@@ -168,15 +243,19 @@ class PythonParser():
h = hash(str(node))
if h in codeparsercache.pythoncache:
- self.references = codeparsercache.pythoncache[h]["refs"]
- self.execs = codeparsercache.pythoncache[h]["execs"]
- self.contains = codeparsercache.pythoncache[h]["contains"]
+ self.references = set(codeparsercache.pythoncache[h].refs)
+ self.execs = set(codeparsercache.pythoncache[h].execs)
+ self.contains = {}
+ for i in codeparsercache.pythoncache[h].contains:
+ self.contains[i] = set(codeparsercache.pythoncache[h].contains[i])
return
if h in codeparsercache.pythoncacheextras:
- self.references = codeparsercache.pythoncacheextras[h]["refs"]
- self.execs = codeparsercache.pythoncacheextras[h]["execs"]
- self.contains = codeparsercache.pythoncacheextras[h]["contains"]
+ self.references = set(codeparsercache.pythoncacheextras[h].refs)
+ self.execs = set(codeparsercache.pythoncacheextras[h].execs)
+ self.contains = {}
+ for i in codeparsercache.pythoncacheextras[h].contains:
+ self.contains[i] = set(codeparsercache.pythoncacheextras[h].contains[i])
return
code = compile(check_indent(str(node)), "<string>", "exec",
@@ -188,10 +267,7 @@ class PythonParser():
self.execs.update(self.var_execs)
- codeparsercache.pythoncacheextras[h] = {}
- codeparsercache.pythoncacheextras[h]["refs"] = self.references
- codeparsercache.pythoncacheextras[h]["execs"] = self.execs
- codeparsercache.pythoncacheextras[h]["contains"] = self.contains
+ codeparsercache.pythoncacheextras[h] = codeparsercache.newPythonCacheLine(self.references, self.execs, self.contains)
class ShellParser():
def __init__(self, name, log):
@@ -210,18 +286,17 @@ class ShellParser():
h = hash(str(value))
if h in codeparsercache.shellcache:
- self.execs = codeparsercache.shellcache[h]["execs"]
+ self.execs = set(codeparsercache.shellcache[h].execs)
return self.execs
if h in codeparsercache.shellcacheextras:
- self.execs = codeparsercache.shellcacheextras[h]["execs"]
+ self.execs = set(codeparsercache.shellcacheextras[h].execs)
return self.execs
self._parse_shell(value)
self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
- codeparsercache.shellcacheextras[h] = {}
- codeparsercache.shellcacheextras[h]["execs"] = self.execs
+ codeparsercache.shellcacheextras[h] = codeparsercache.newShellCacheLine(self.execs)
return self.execs
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 84fcdf9433..24ff341045 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -86,7 +86,10 @@ class Command:
def runAsyncCommand(self):
try:
- if self.cooker.state == bb.cooker.state.error:
+ if self.cooker.state in (bb.cooker.state.error, bb.cooker.state.shutdown, bb.cooker.state.forceshutdown):
+ # updateCache will trigger a shutdown of the parser
+ # and then raise BBHandledException triggering an exit
+ self.cooker.updateCache()
return False
if self.currentAsyncCommand is not None:
(command, options) = self.currentAsyncCommand
@@ -120,11 +123,11 @@ class Command:
def finishAsyncCommand(self, msg=None, code=None):
if msg or msg == "":
- bb.event.fire(CommandFailed(msg), self.cooker.event_data)
+ bb.event.fire(CommandFailed(msg), self.cooker.expanded_data)
elif code:
- bb.event.fire(CommandExit(code), self.cooker.event_data)
+ bb.event.fire(CommandExit(code), self.cooker.expanded_data)
else:
- bb.event.fire(CommandCompleted(), self.cooker.event_data)
+ bb.event.fire(CommandCompleted(), self.cooker.expanded_data)
self.currentAsyncCommand = None
self.cooker.finishcommand()
@@ -268,6 +271,11 @@ class CommandsSync:
# we always take and leave the cooker in state.initial
setFeatures.readonly = True
+ def updateConfig(self, command, params):
+ options = params[0]
+ environment = params[1]
+ command.cooker.updateConfigOpts(options, environment)
+
class CommandsAsync:
"""
A class of asynchronous commands
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index f44a08889a..f77c6c0532 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -39,6 +39,7 @@ from bb import utils, data, parse, event, cache, providers, taskdata, runqueue
import Queue
import signal
import prserv.serv
+import pyinotify
logger = logging.getLogger("BitBake")
collectlog = logging.getLogger("BitBake.Collection")
@@ -120,7 +121,20 @@ class BBCooker:
self.configuration = configuration
+ self.configwatcher = pyinotify.WatchManager()
+ self.configwatcher.bbseen = []
+ self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
+ self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
+ pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
+ pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
+ self.watcher = pyinotify.WatchManager()
+ self.watcher.bbseen = []
+ self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
+
+
self.initConfigurationData()
+ self.baseconfig_valid = True
+ self.parsecache_valid = False
# Take a lock so only one copy of bitbake can run against a given build
# directory at a time
@@ -153,20 +167,60 @@ class BBCooker:
self.parser = None
signal.signal(signal.SIGTERM, self.sigterm_exception)
+ # Let SIGHUP exit as SIGTERM
+ signal.signal(signal.SIGHUP, self.sigterm_exception)
+
+ def config_notifications(self, event):
+ bb.parse.update_cache(event.path)
+ self.baseconfig_valid = False
+
+ def notifications(self, event):
+ bb.parse.update_cache(event.path)
+ self.parsecache_valid = False
+
+ def add_filewatch(self, deps, watcher=None):
+ if not watcher:
+ watcher = self.watcher
+ for i in deps:
+ f = os.path.dirname(i[0])
+ if f in watcher.bbseen:
+ continue
+ watcher.bbseen.append(f)
+ while True:
+ # We try and add watches for files that don't exist but if they did, would influence
+ # the parser. The parent directory of these files may not exist, in which case we need
+ # to watch any parent that does exist for changes.
+ try:
+ watcher.add_watch(f, self.watchmask, quiet=False)
+ break
+ except pyinotify.WatchManagerError as e:
+ if 'ENOENT' in str(e):
+ f = os.path.dirname(f)
+ watcher.bbseen.append(f)
+ continue
+ if 'ENOSPC' in str(e):
+ providerlog.error("No space left on device or exceeds fs.inotify.max_user_watches?")
+ providerlog.error("To check max_user_watches: sysctl -n fs.inotify.max_user_watches.")
+ providerlog.error("To modify max_user_watches: sysctl -n -w fs.inotify.max_user_watches=<value>.")
+ providerlog.error("Root privilege is required to modify max_user_watches.")
+ raise
def sigterm_exception(self, signum, stackframe):
- bb.warn("Cooker recieved SIGTERM, shutting down...")
+ if signum == signal.SIGTERM:
+ bb.warn("Cooker recieved SIGTERM, shutting down...")
+ elif signum == signal.SIGHUP:
+ bb.warn("Cooker recieved SIGHUP, shutting down...")
self.state = state.forceshutdown
def setFeatures(self, features):
# we only accept a new feature set if we're in state initial, so we can reset without problems
- if self.state != state.initial:
+ if self.state != state.initial and self.state != state.error:
raise Exception("Illegal state for feature set change")
original_featureset = list(self.featureset)
for feature in features:
self.featureset.setFeature(feature)
bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset)))
- if (original_featureset != list(self.featureset)):
+ if (original_featureset != list(self.featureset)) and self.state != state.error:
self.reset()
def initConfigurationData(self):
@@ -200,12 +254,82 @@ class BBCooker:
self.data = self.databuilder.data
self.data_hash = self.databuilder.data_hash
+
+ # we log all events to a file if so directed
+ if self.configuration.writeeventlog:
+ import json, pickle
+ DEFAULT_EVENTFILE = self.configuration.writeeventlog
+ class EventLogWriteHandler():
+
+ class EventWriter():
+ def __init__(self, cooker):
+ self.file_inited = None
+ self.cooker = cooker
+ self.event_queue = []
+
+ def init_file(self):
+ try:
+ # delete the old log
+ os.remove(DEFAULT_EVENTFILE)
+ except:
+ pass
+
+ # write current configuration data
+ with open(DEFAULT_EVENTFILE, "w") as f:
+ f.write("%s\n" % json.dumps({ "allvariables" : self.cooker.getAllKeysWithFlags(["doc", "func"])}))
+
+ def write_event(self, event):
+ with open(DEFAULT_EVENTFILE, "a") as f:
+ try:
+ f.write("%s\n" % json.dumps({"class":event.__module__ + "." + event.__class__.__name__, "vars":json.dumps(pickle.dumps(event)) }))
+ except Exception as e:
+ import traceback
+ print(e, traceback.format_exc(e))
+
+
+ def send(self, event):
+ event_class = event.__module__ + "." + event.__class__.__name__
+
+ # init on bb.event.BuildStarted
+ if self.file_inited is None:
+ if event_class == "bb.event.BuildStarted":
+ self.init_file()
+ self.file_inited = True
+
+ # write pending events
+ for e in self.event_queue:
+ self.write_event(e)
+
+ # also write the current event
+ self.write_event(event)
+
+ else:
+ # queue all events until the file is inited
+ self.event_queue.append(event)
+
+ else:
+ # we have the file, just write the event
+ self.write_event(event)
+
+ # set our handler's event processor
+ event = EventWriter(self) # self is the cooker here
+
+
+ # set up cooker features for this mock UI handler
+
+ # we need to write the dependency tree in the log
+ self.featureset.setFeature(CookerFeatures.SEND_DEPENDS_TREE)
+ # register the log file writer as UI Handler
+ bb.event.register_UIHhandler(EventLogWriteHandler())
+
+
#
- # Special updated configuration we use for firing events
+ # Copy of the data store which has been expanded.
+ # Used for firing events and accessing variables where expansion needs to be accounted for
#
- self.event_data = bb.data.createCopy(self.data)
- bb.data.update_data(self.event_data)
- bb.parse.init_parser(self.event_data)
+ self.expanded_data = bb.data.createCopy(self.data)
+ bb.data.update_data(self.expanded_data)
+ bb.parse.init_parser(self.expanded_data)
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.disableDataTracking()
@@ -240,7 +364,7 @@ class BBCooker:
f.write(total)
#add to history
- loginfo = {"op":append, "file":default_file, "line":total.count("\n")}
+ loginfo = {"op":"append", "file":default_file, "line":total.count("\n")}
self.data.appendVar(var, val, **loginfo)
def saveConfigurationVar(self, var, val, default_file, op):
@@ -309,7 +433,7 @@ class BBCooker:
f.write(total)
#add to history
- loginfo = {"op":set, "file":default_file, "line":total.count("\n")}
+ loginfo = {"op":"set", "file":default_file, "line":total.count("\n")}
self.data.setVar(var, val, **loginfo)
def removeConfigurationVar(self, var):
@@ -371,6 +495,30 @@ class BBCooker:
self.handleCollections( self.data.getVar("BBFILE_COLLECTIONS", True) )
+ def updateConfigOpts(self, options, environment):
+ for o in options:
+ setattr(self.configuration, o, options[o])
+ clean = True
+ for k in bb.utils.approved_variables():
+ if k in environment and k not in self.configuration.env:
+ logger.debug(1, "Updating environment variable %s to %s" % (k, environment[k]))
+ self.configuration.env[k] = environment[k]
+ clean = False
+ if k in self.configuration.env and k not in environment:
+ logger.debug(1, "Updating environment variable %s (deleted)" % (k))
+ del self.configuration.env[k]
+ clean = False
+ if k not in self.configuration.env and k not in environment:
+ continue
+ if environment[k] != self.configuration.env[k]:
+ logger.debug(1, "Updating environment variable %s to %s" % (k, environment[k]))
+ self.configuration.env[k] = environment[k]
+ clean = False
+ if not clean:
+ logger.debug(1, "Base environment change, triggering reparse")
+ self.baseconfig_valid = False
+ self.reset()
+
def runCommands(self, server, data, abort):
"""
Run any queued asynchronous command
@@ -402,7 +550,7 @@ class BBCooker:
def showEnvironment(self, buildfile = None, pkgs_to_build = []):
"""
- Show the outer or per-package environment
+ Show the outer or per-recipe environment
"""
fn = None
envdata = None
@@ -416,7 +564,7 @@ class BBCooker:
fn = self.matchFile(fn)
fn = bb.cache.Cache.realfn2virtual(fn, cls)
elif len(pkgs_to_build) == 1:
- ignore = self.data.getVar("ASSUME_PROVIDED", True) or ""
+ ignore = self.expanded_data.getVar("ASSUME_PROVIDED", True) or ""
if pkgs_to_build[0] in set(ignore.split()):
bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
@@ -496,7 +644,7 @@ class BBCooker:
taskdata, runlist, pkgs_to_build = self.buildTaskData(pkgs_to_build, task, False)
return runlist, taskdata
-
+
######## WARNING : this function requires cache_extra to be enabled ########
def generateTaskDepTreeData(self, pkgs_to_build, task):
@@ -818,7 +966,6 @@ class BBCooker:
or to find all machine configuration files one could call:
findFilesMatchingInDir(self, 'conf/machines', 'conf')
"""
- import re
matches = []
p = re.compile(re.escape(filepattern))
@@ -1036,7 +1183,7 @@ class BBCooker:
bf = os.path.abspath(bf)
self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)
- filelist, masked = self.collection.collect_bbfiles(self.data, self.event_data)
+ filelist, masked = self.collection.collect_bbfiles(self.data, self.expanded_data)
try:
os.stat(bf)
bf = os.path.abspath(bf)
@@ -1126,7 +1273,7 @@ class BBCooker:
taskdata.add_provider(self.data, self.recipecache, item)
buildname = self.data.getVar("BUILDNAME")
- bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.event_data)
+ bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
# Execute the runqueue
runlist = [[item, "do_%s" % task]]
@@ -1153,7 +1300,7 @@ class BBCooker:
return False
if not retval:
- bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.event_data)
+ bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
self.command.finishAsyncCommand(msg)
return False
if retval is True:
@@ -1228,7 +1375,6 @@ class BBCooker:
'''
Create a new image with a "require"/"inherit" base_image statement
'''
- import re
if timestamp:
image_name = os.path.splitext(image)[0]
timestr = time.strftime("-%Y%m%d-%H%M%S")
@@ -1279,29 +1425,44 @@ class BBCooker:
if self.state == state.running:
return
- if self.state in (state.shutdown, state.forceshutdown):
+ if self.state in (state.shutdown, state.forceshutdown, state.error):
if hasattr(self.parser, 'shutdown'):
self.parser.shutdown(clean=False, force = True)
raise bb.BBHandledException()
if self.state != state.parsing:
+ for n in [self.confignotifier, self.notifier]:
+ if n.check_events(timeout=0):
+ # read notified events and enqeue them
+ n.read_events()
+ n.process_events()
+ if not self.baseconfig_valid:
+ logger.debug(1, "Reloading base configuration data")
+ self.initConfigurationData()
+ self.baseconfig_valid = True
+ self.parsecache_valid = False
+
+ if self.state != state.parsing and not self.parsecache_valid:
self.parseConfiguration ()
if CookerFeatures.SEND_SANITYEVENTS in self.featureset:
bb.event.fire(bb.event.SanityCheck(False), self.data)
- ignore = self.data.getVar("ASSUME_PROVIDED", True) or ""
+ ignore = self.expanded_data.getVar("ASSUME_PROVIDED", True) or ""
self.recipecache.ignored_dependencies = set(ignore.split())
for dep in self.configuration.extra_assume_provided:
self.recipecache.ignored_dependencies.add(dep)
self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)
- (filelist, masked) = self.collection.collect_bbfiles(self.data, self.event_data)
+ (filelist, masked) = self.collection.collect_bbfiles(self.data, self.expanded_data)
self.data.renameVar("__depends", "__base_depends")
+ self.add_filewatch(self.data.getVar("__base_depends"), self.configwatcher)
self.parser = CookerParser(self, filelist, masked)
- self.state = state.parsing
+ self.parsecache_valid = True
+
+ self.state = state.parsing
if not self.parser.parse_next():
collectlog.debug(1, "parsing complete")
@@ -1309,7 +1470,7 @@ class BBCooker:
raise bb.BBHandledException()
self.show_appends_with_no_recipes()
self.handlePrefProviders()
- self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn)
+ self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn, self.data)
self.state = state.running
return None
@@ -1323,7 +1484,7 @@ class BBCooker:
if len(pkgs_to_build) == 0:
raise NothingToBuild
- ignore = (self.data.getVar("ASSUME_PROVIDED", True) or "").split()
+ ignore = (self.expanded_data.getVar("ASSUME_PROVIDED", True) or "").split()
for pkg in pkgs_to_build:
if pkg in ignore:
parselog.warn("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg)
@@ -1353,13 +1514,13 @@ class BBCooker:
try:
self.prhost = prserv.serv.auto_start(self.data)
except prserv.serv.PRServiceConfigError:
- bb.event.fire(CookerExit(), self.event_data)
+ bb.event.fire(CookerExit(), self.expanded_data)
self.state = state.error
return
def post_serve(self):
prserv.serv.auto_shutdown(self.data)
- bb.event.fire(CookerExit(), self.event_data)
+ bb.event.fire(CookerExit(), self.expanded_data)
def shutdown(self, force = False):
if force:
@@ -1437,7 +1598,7 @@ class CookerCollectFiles(object):
for ignored in ('SCCS', 'CVS', '.svn'):
if ignored in dirs:
dirs.remove(ignored)
- found += [os.path.join(dir, f) for f in files if (f.endswith('.bb') or f.endswith('.bbappend'))]
+ found += [os.path.join(dir, f) for f in files if (f.endswith(['.bb', '.bbappend']))]
return found
@@ -1534,7 +1695,7 @@ class CookerCollectFiles(object):
filelist.append(filename)
return filelist
- def collection_priorities(self, pkgfns):
+ def collection_priorities(self, pkgfns, d):
priorities = {}
@@ -1543,10 +1704,10 @@ class CookerCollectFiles(object):
for p in pkgfns:
realfn, cls = bb.cache.Cache.virtualfn2realfn(p)
priorities[p] = self.calc_bbfile_priority(realfn, matched)
-
+
# Don't show the warning if the BBFILE_PATTERN did match .bbappend files
unmatched = set()
- for _, _, regex, pri in self.bbfile_config_priorities:
+ for _, _, regex, pri in self.bbfile_config_priorities:
if not regex in matched:
unmatched.add(regex)
@@ -1563,7 +1724,8 @@ class CookerCollectFiles(object):
for collection, pattern, regex, _ in self.bbfile_config_priorities:
if regex in unmatched:
- collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
+ if d.getVar('BBFILE_PATTERN_IGNORE_EMPTY_%s' % collection, True) != '1':
+ collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
return priorities
@@ -1863,7 +2025,7 @@ class CookerParser(object):
self.skipped += 1
self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0])
self.bb_cache.add_info(virtualfn, info_array, self.cooker.recipecache,
- parsed=parsed)
+ parsed=parsed, watcher = self.cooker.add_filewatch)
return True
def reparse(self, filename):
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 60a6d516af..7eae761d59 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -69,6 +69,17 @@ class ConfigParameters(object):
if bbpkgs:
self.options.pkgs_to_build.extend(bbpkgs.split())
+ def updateToServer(self, server, environment):
+ options = {}
+ for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp",
+ "verbose", "debug", "dry_run", "dump_signatures",
+ "debug_domains", "extra_assume_provided", "profile"]:
+ options[o] = getattr(self.options, o)
+
+ ret, error = server.runCommand(["updateConfig", options, environment])
+ if error:
+ raise Exception("Unable to update the server configuration with local parameters: %s" % error)
+
def parseActions(self):
# Parse any commandline into actions
action = {'action':None, 'msg':None}
@@ -128,6 +139,7 @@ class CookerConfiguration(object):
self.dry_run = False
self.tracking = False
self.interface = []
+ self.writeeventlog = False
self.env = {}
diff --git a/bitbake/lib/bb/daemonize.py b/bitbake/lib/bb/daemonize.py
index f0714b3af6..346a618582 100644
--- a/bitbake/lib/bb/daemonize.py
+++ b/bitbake/lib/bb/daemonize.py
@@ -1,5 +1,5 @@
"""
-Python Deamonizing helper
+Python Daemonizing helper
Configurable daemon behaviors:
@@ -12,8 +12,11 @@ A failed call to fork() now raises an exception.
References:
1) Advanced Programming in the Unix Environment: W. Richard Stevens
- 2) Unix Programming Frequently Asked Questions:
- http://www.erlenstar.demon.co.uk/unix/faq_toc.html
+ http://www.apuebook.com/apue3e.html
+ 2) The Linux Programming Interface: Michael Kerrisk
+ http://man7.org/tlpi/index.html
+ 3) Unix Programming Frequently Asked Questions:
+ http://www.faqs.org/faqs/unix-faq/programmer/faq/
Modified to allow a function to be daemonized and return for
bitbake use by Richard Purdie
@@ -25,7 +28,7 @@ __version__ = "0.2"
# Standard Python modules.
import os # Miscellaneous OS interfaces.
-import sys # System-specific parameters and functions.
+import sys # System-specific parameters and functions.
# Default daemon parameters.
# File mode creation mask of the daemon.
@@ -128,7 +131,7 @@ def createDaemon(function, logfile):
# of methods to accomplish this task. Three are listed below.
#
# Try the system configuration variable, SC_OPEN_MAX, to obtain the maximum
- # number of open file descriptors to close. If it doesn't exists, use
+ # number of open file descriptors to close. If it doesn't exist, use
# the default value (configurable).
#
# try:
@@ -146,7 +149,7 @@ def createDaemon(function, logfile):
# OR
#
# Use the getrlimit method to retrieve the maximum file descriptor number
- # that can be opened by this process. If there is not limit on the
+ # that can be opened by this process. If there is no limit on the
# resource, use the default value.
#
import resource # Resource usage information.
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index db938be1e6..82eefef1a6 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -6,7 +6,7 @@ BitBake 'Data' implementations
Functions for interacting with the data structure used by the
BitBake build tools.
-The expandData and update_data are the most expensive
+The expandKeys and update_data are the most expensive
operations. At night the cookie monster came by and
suggested 'give me cookies on setting the variables and
things will work out'. Taking this suggestion into account
@@ -15,7 +15,7 @@ Analyse von Algorithmen' lecture and the cookie
monster seems to be right. We will track setVar more carefully
to have faster update_data and expandKeys operations.
-This is a treade-off between speed and memory again but
+This is a trade-off between speed and memory again but
the speed is more critical here.
"""
@@ -35,7 +35,7 @@ the speed is more critical here.
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-#Based on functions from the base bb module, Copyright 2003 Holger Schurig
+# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import sys, os, re
if sys.argv[0][-5:] == "pydoc":
@@ -219,6 +219,13 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
val = str(val)
+ if varExpanded.startswith("BASH_FUNC_"):
+ varExpanded = varExpanded[10:-2]
+ val = val[3:] # Strip off "() "
+ o.write("%s() %s\n" % (varExpanded, val))
+ o.write("export -f %s\n" % (varExpanded))
+ return 1
+
if func:
# NOTE: should probably check for unbalanced {} within the var
o.write("%s() {\n%s\n}\n" % (varExpanded, val))
@@ -231,6 +238,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
# to a shell, we need to escape the quotes in the var
alter = re.sub('"', '\\"', val)
alter = re.sub('\n', ' \\\n', alter)
+ alter = re.sub('\\$', '\\\\$', alter)
o.write('%s="%s"\n' % (varExpanded, alter))
return 0
@@ -281,6 +289,41 @@ def emit_func(func, o=sys.__stdout__, d = init()):
newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
newdeps -= seen
+_functionfmt = """
+def {function}(d):
+{body}"""
+
+def emit_func_python(func, o=sys.__stdout__, d = init()):
+ """Emits all items in the data store in a format such that it can be sourced by a shell."""
+
+ def write_func(func, o, call = False):
+ body = d.getVar(func, True)
+ if not body.startswith("def"):
+ body = _functionfmt.format(function=func, body=body)
+
+ o.write(body.strip() + "\n\n")
+ if call:
+ o.write(func + "(d)" + "\n\n")
+
+ write_func(func, o, True)
+ pp = bb.codeparser.PythonParser(func, logger)
+ pp.parse_python(d.getVar(func, True))
+ newdeps = pp.execs
+ newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
+ seen = set()
+ while newdeps:
+ deps = newdeps
+ seen |= deps
+ newdeps = set()
+ for dep in deps:
+ if d.getVarFlag(dep, "func") and d.getVarFlag(dep, "python"):
+ write_func(dep, o)
+ pp = bb.codeparser.PythonParser(dep, logger)
+ pp.parse_python(d.getVar(dep, True))
+ newdeps |= pp.execs
+ newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
+ newdeps -= seen
+
def update_data(d):
"""Performs final steps upon the datastore, including application of overrides"""
d.finalize(parent = True)
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 3d773b1d69..7bb7b4aae3 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -263,7 +263,7 @@ class VariableHistory(object):
flag = ''
o.write("# %s %s:%s%s\n# %s\"%s\"\n" % (event['op'], event['file'], event['line'], display_func, flag, re.sub('\n', '\n# ', event['detail'])))
if len(history) > 1:
- o.write("# computed:\n")
+ o.write("# pre-expansion value:\n")
o.write('# "%s"\n' % (commentVal))
else:
o.write("#\n# $%s\n# [no history recorded]\n#\n" % var)
@@ -296,9 +296,14 @@ class VariableHistory(object):
self.variables[var] = []
class DataSmart(MutableMapping):
- def __init__(self, special = COWDictBase.copy(), seen = COWDictBase.copy() ):
+ def __init__(self, special = None, seen = None ):
self.dict = {}
+ if special is None:
+ special = COWDictBase.copy()
+ if seen is None:
+ seen = COWDictBase.copy()
+
self.inchistory = IncludeHistory()
self.varhistory = VariableHistory(self)
self._tracking = False
@@ -589,7 +594,7 @@ class DataSmart(MutableMapping):
self._makeShadowCopy(var)
self.dict[var][flag] = value
- if flag == "defaultval" and '_' in var:
+ if flag == "_defaultval" and '_' in var:
self._setvar_update_overrides(var)
if flag == "unexport" or flag == "export":
@@ -605,8 +610,8 @@ class DataSmart(MutableMapping):
if local_var is not None:
if flag in local_var:
value = copy.copy(local_var[flag])
- elif flag == "_content" and "defaultval" in local_var and not noweakdefault:
- value = copy.copy(local_var["defaultval"])
+ elif flag == "_content" and "_defaultval" in local_var and not noweakdefault:
+ value = copy.copy(local_var["_defaultval"])
if expand and value:
# Only getvar (flag == _content) hits the expand cache
cachename = None
@@ -616,8 +621,10 @@ class DataSmart(MutableMapping):
cachename = var + "[" + flag + "]"
value = self.expand(value, cachename)
if value and flag == "_content" and local_var is not None and "_removeactive" in local_var:
- filtered = filter(lambda v: v not in local_var["_removeactive"],
- value.split(" "))
+ removes = [self.expand(r).split() for r in local_var["_removeactive"]]
+ removes = reduce(lambda a, b: a+b, removes, [])
+ filtered = filter(lambda v: v not in removes,
+ value.split())
value = " ".join(filtered)
if expand:
# We need to ensure the expand cache has the correct value
@@ -739,12 +746,16 @@ class DataSmart(MutableMapping):
yield key
def __iter__(self):
+ deleted = set()
def keylist(d):
klist = set()
for key in d:
if key == "_data":
continue
+ if key in deleted:
+ continue
if not d[key]:
+ deleted.add(key)
continue
klist.add(key)
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 8b47ae5957..fec6a05b38 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -55,6 +55,7 @@ def get_class_handlers():
return _handlers
def set_class_handlers(h):
+ global _handlers
_handlers = h
def clean_class_handlers():
@@ -67,6 +68,7 @@ _ui_logfilters = {}
_ui_handler_seq = 0
_event_handler_map = {}
_catchall_handlers = {}
+_eventfilter = None
def execute_handler(name, handler, event, d):
event.data = d
@@ -94,6 +96,9 @@ def fire_class_handlers(event, d):
evt_hmap = _event_handler_map.get(eid, {})
for name, handler in _handlers.iteritems():
if name in _catchall_handlers or name in evt_hmap:
+ if _eventfilter:
+ if not _eventfilter(name, handler, event, d):
+ continue
execute_handler(name, handler, event, d)
ui_queue = []
@@ -204,6 +209,10 @@ def remove(name, handler):
"""Remove an Event handler"""
_handlers.pop(name)
+def set_eventfilter(func):
+ global _eventfilter
+ _eventfilter = func
+
def register_UIHhandler(handler):
bb.event._ui_handler_seq = bb.event._ui_handler_seq + 1
_ui_handlers[_ui_handler_seq] = handler
@@ -594,11 +603,11 @@ class MetadataEvent(Event):
def __init__(self, eventtype, eventdata):
Event.__init__(self)
self.type = eventtype
- self.data = eventdata
+ self._localdata = eventdata
class SanityCheck(Event):
"""
- Event to runs sanity checks, either raise errors or generate events as return status.
+ Event to run sanity checks, either raise errors or generate events as return status.
"""
def __init__(self, generateevents = True):
Event.__init__(self)
@@ -606,7 +615,7 @@ class SanityCheck(Event):
class SanityCheckPassed(Event):
"""
- Event to indicate sanity check is passed
+ Event to indicate sanity check has passed
"""
class SanityCheckFailed(Event):
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dcada12ead..599ea8c822 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -535,7 +535,7 @@ def verify_checksum(ud, d):
"""
- if not ud.method.supports_checksum(ud):
+ if ud.ignore_checksums or not ud.method.supports_checksum(ud):
return
md5data = bb.utils.md5_file(ud.localpath)
@@ -543,8 +543,8 @@ def verify_checksum(ud, d):
if ud.method.recommends_checksum(ud):
# If strict checking enabled and neither sum defined, raise error
- strict = d.getVar("BB_STRICT_CHECKSUM", True) or None
- if strict and not (ud.md5_expected or ud.sha256_expected):
+ strict = d.getVar("BB_STRICT_CHECKSUM", True) or "0"
+ if (strict == "1") and not (ud.md5_expected or ud.sha256_expected):
logger.error('No checksum specified for %s, please add at least one to the recipe:\n'
'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' %
(ud.localpath, ud.md5_name, md5data,
@@ -620,11 +620,13 @@ def get_autorev(d):
def get_srcrev(d):
"""
- Return the version string for the current package
- (usually to be used as PV)
+ Return the revsion string, usually for use in the version string (PV) of the current package
Most packages usually only have one SCM so we just pass on the call.
In the multi SCM case, we build a value based on SRCREV_FORMAT which must
have been set.
+
+ The idea here is that we put the string "AUTOINC+" into return value if the revisions are not
+ incremental, other code is then responsible for turning that into an increasing value (if needed)
"""
scms = []
@@ -936,22 +938,21 @@ def get_checksum_file_list(d):
ud = fetch.ud[u]
if ud and isinstance(ud.method, local.Local):
- ud.setup_localpath(d)
- f = ud.localpath
- pth = ud.decodedurl
- if '*' in pth:
- f = os.path.join(os.path.abspath(f), pth)
- if f.startswith(dl_dir):
- # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else
- if os.path.exists(f):
- bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN', True), os.path.basename(f)))
- else:
- bb.warn("Unable to get checksum for %s SRC_URI entry %s: file could not be found" % (d.getVar('PN', True), os.path.basename(f)))
- filelist.append(f)
+ paths = ud.method.localpaths(ud, d)
+ for f in paths:
+ pth = ud.decodedurl
+ if '*' in pth:
+ f = os.path.join(os.path.abspath(f), pth)
+ if f.startswith(dl_dir):
+ # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else
+ if os.path.exists(f):
+ bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN', True), os.path.basename(f)))
+ else:
+ bb.warn("Unable to get checksum for %s SRC_URI entry %s: file could not be found" % (d.getVar('PN', True), os.path.basename(f)))
+ filelist.append(f + ":" + str(os.path.exists(f)))
return " ".join(filelist)
-
def get_file_checksums(filelist, pn):
"""Get a list of the checksums for a list of local files
@@ -981,6 +982,10 @@ def get_file_checksums(filelist, pn):
checksums = []
for pth in filelist.split():
+ exist = pth.split(":")[1]
+ if exist == "False":
+ continue
+ pth = pth.split(":")[0]
if '*' in pth:
# Handle globs
for f in glob.glob(pth):
@@ -988,14 +993,12 @@ def get_file_checksums(filelist, pn):
checksums.extend(checksum_dir(f))
else:
checksum = checksum_file(f)
- if checksum:
- checksums.append((f, checksum))
+ checksums.append((f, checksum))
elif os.path.isdir(pth):
checksums.extend(checksum_dir(pth))
else:
checksum = checksum_file(pth)
- if checksum:
- checksums.append((pth, checksum))
+ checksums.append((pth, checksum))
checksums.sort(key=operator.itemgetter(1))
return checksums
@@ -1041,6 +1044,7 @@ class FetchData(object):
self.sha256_expected = None
else:
self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
+ self.ignore_checksums = False
self.names = self.parm.get("name",'default').split(',')
@@ -1197,9 +1201,9 @@ class FetchMethod(object):
bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
(file, urldata.parm.get('unpack')))
- dots = file.split(".")
- if dots[-1] in ['gz', 'bz2', 'Z', 'xz']:
- efile = os.path.join(rootdir, os.path.basename('.'.join(dots[0:-1])))
+ base, ext = os.path.splitext(file)
+ if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz']:
+ efile = os.path.join(rootdir, os.path.basename(base))
else:
efile = file
cmd = None
@@ -1219,6 +1223,10 @@ class FetchMethod(object):
cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
elif file.endswith('.xz'):
cmd = 'xz -dc %s > %s' % (file, efile)
+ elif file.endswith('.tar.lz'):
+ cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
+ elif file.endswith('.lz'):
+ cmd = 'lzip -dc %s > %s' % (file, efile)
elif file.endswith('.zip') or file.endswith('.jar'):
try:
dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)
@@ -1264,8 +1272,13 @@ class FetchMethod(object):
# items. So, only do so for file:// entries.
if urldata.type == "file" and urldata.path.find("/") != -1:
destdir = urldata.path.rsplit("/", 1)[0]
+ if urldata.parm.get('subdir') != None:
+ destdir = urldata.parm.get('subdir') + "/" + destdir
else:
- destdir = "."
+ if urldata.parm.get('subdir') != None:
+ destdir = urldata.parm.get('subdir')
+ else:
+ destdir = "."
bb.utils.mkdirhier("%s/%s" % (rootdir, destdir))
cmd = 'cp -f %s %s/%s/' % (file, rootdir, destdir)
@@ -1560,6 +1573,7 @@ from . import bzr
from . import hg
from . import osc
from . import repo
+from . import clearcase
methods.append(local.Local())
methods.append(wget.Wget())
@@ -1575,3 +1589,4 @@ methods.append(bzr.Bzr())
methods.append(hg.Hg())
methods.append(osc.Osc())
methods.append(repo.Repo())
+methods.append(clearcase.ClearCase())
diff --git a/bitbake/lib/bb/fetch2/clearcase.py b/bitbake/lib/bb/fetch2/clearcase.py
new file mode 100644
index 0000000000..bfca2f7bcf
--- /dev/null
+++ b/bitbake/lib/bb/fetch2/clearcase.py
@@ -0,0 +1,263 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+"""
+BitBake 'Fetch' clearcase implementation
+
+The clearcase fetcher is used to retrieve files from a ClearCase repository.
+
+Usage in the recipe:
+
+ SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module"
+ SRCREV = "EXAMPLE_CLEARCASE_TAG"
+ PV = "${@d.getVar("SRCREV").replace("/", "+")}"
+
+The fetcher uses the rcleartool or cleartool remote client, depending on which one is available.
+
+Supported SRC_URI options are:
+
+- vob
+ (required) The name of the clearcase VOB (with prepending "/")
+
+- module
+ The module in the selected VOB (with prepending "/")
+
+ The module and vob parameters are combined to create
+ the following load rule in the view config spec:
+ load <vob><module>
+
+- proto
+ http or https
+
+Related variables:
+
+ CCASE_CUSTOM_CONFIG_SPEC
+ Write a config spec to this variable in your recipe to use it instead
+ of the default config spec generated by this fetcher.
+ Please note that the SRCREV loses its functionality if you specify
+ this variable. SRCREV is still used to label the archive after a fetch,
+ but it doesn't define what's fetched.
+
+User credentials:
+ cleartool:
+ The login of cleartool is handled by the system. No special steps needed.
+
+ rcleartool:
+ In order to use rcleartool with authenticated users an `rcleartool login` is
+ necessary before using the fetcher.
+"""
+# Copyright (C) 2014 Siemens AG
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+import os
+import sys
+import shutil
+import bb
+from bb import data
+from bb.fetch2 import FetchMethod
+from bb.fetch2 import FetchError
+from bb.fetch2 import runfetchcmd
+from bb.fetch2 import logger
+from distutils import spawn
+
+class ClearCase(FetchMethod):
+ """Class to fetch urls via 'clearcase'"""
+ def init(self, d):
+ pass
+
+ def supports(self, ud, d):
+ """
+ Check to see if a given url can be fetched with Clearcase.
+ """
+ return ud.type in ['ccrc']
+
+ def debug(self, msg):
+ logger.debug(1, "ClearCase: %s", msg)
+
+ def urldata_init(self, ud, d):
+ """
+ init ClearCase specific variable within url data
+ """
+ ud.proto = "https"
+ if 'protocol' in ud.parm:
+ ud.proto = ud.parm['protocol']
+ if not ud.proto in ('http', 'https'):
+ raise fetch2.ParameterError("Invalid protocol type", ud.url)
+
+ ud.vob = ''
+ if 'vob' in ud.parm:
+ ud.vob = ud.parm['vob']
+ else:
+ msg = ud.url+": vob must be defined so the fetcher knows what to get."
+ raise MissingParameterError('vob', msg)
+
+ if 'module' in ud.parm:
+ ud.module = ud.parm['module']
+ else:
+ ud.module = ""
+
+ ud.basecmd = d.getVar("FETCHCMD_ccrc", True) or spawn.find_executable("cleartool") or spawn.find_executable("rcleartool")
+
+ if data.getVar("SRCREV", d, True) == "INVALID":
+ raise FetchError("Set a valid SRCREV for the clearcase fetcher in your recipe, e.g. SRCREV = \"/main/LATEST\" or any other label of your choice.")
+
+ ud.label = d.getVar("SRCREV")
+ ud.customspec = d.getVar("CCASE_CUSTOM_CONFIG_SPEC", True)
+
+ ud.server = "%s://%s%s" % (ud.proto, ud.host, ud.path)
+
+ ud.identifier = "clearcase-%s%s-%s" % ( ud.vob.replace("/", ""),
+ ud.module.replace("/", "."),
+ ud.label.replace("/", "."))
+
+ ud.viewname = "%s-view%s" % (ud.identifier, d.getVar("DATETIME", d, True))
+ ud.csname = "%s-config-spec" % (ud.identifier)
+ ud.ccasedir = os.path.join(data.getVar("DL_DIR", d, True), ud.type)
+ ud.viewdir = os.path.join(ud.ccasedir, ud.viewname)
+ ud.configspecfile = os.path.join(ud.ccasedir, ud.csname)
+ ud.localfile = "%s.tar.gz" % (ud.identifier)
+
+ self.debug("host = %s" % ud.host)
+ self.debug("path = %s" % ud.path)
+ self.debug("server = %s" % ud.server)
+ self.debug("proto = %s" % ud.proto)
+ self.debug("type = %s" % ud.type)
+ self.debug("vob = %s" % ud.vob)
+ self.debug("module = %s" % ud.module)
+ self.debug("basecmd = %s" % ud.basecmd)
+ self.debug("label = %s" % ud.label)
+ self.debug("ccasedir = %s" % ud.ccasedir)
+ self.debug("viewdir = %s" % ud.viewdir)
+ self.debug("viewname = %s" % ud.viewname)
+ self.debug("configspecfile = %s" % ud.configspecfile)
+ self.debug("localfile = %s" % ud.localfile)
+
+ ud.localfile = os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
+
+ def _build_ccase_command(self, ud, command):
+ """
+ Build up a commandline based on ud
+ command is: mkview, setcs, rmview
+ """
+ options = []
+
+ if "rcleartool" in ud.basecmd:
+ options.append("-server %s" % ud.server)
+
+ basecmd = "%s %s" % (ud.basecmd, command)
+
+ if command is 'mkview':
+ if not "rcleartool" in ud.basecmd:
+ # Cleartool needs a -snapshot view
+ options.append("-snapshot")
+ options.append("-tag %s" % ud.viewname)
+ options.append(ud.viewdir)
+
+ elif command is 'rmview':
+ options.append("-force")
+ options.append("%s" % ud.viewdir)
+
+ elif command is 'setcs':
+ options.append("-overwrite")
+ options.append(ud.configspecfile)
+
+ else:
+ raise FetchError("Invalid ccase command %s" % command)
+
+ ccasecmd = "%s %s" % (basecmd, " ".join(options))
+ self.debug("ccasecmd = %s" % ccasecmd)
+ return ccasecmd
+
+ def _write_configspec(self, ud, d):
+ """
+ Create config spec file (ud.configspecfile) for ccase view
+ """
+ config_spec = ""
+ custom_config_spec = d.getVar("CCASE_CUSTOM_CONFIG_SPEC", d)
+ if custom_config_spec is not None:
+ for line in custom_config_spec.split("\\n"):
+ config_spec += line+"\n"
+ bb.warn("A custom config spec has been set, SRCREV is only relevant for the tarball name.")
+ else:
+ config_spec += "element * CHECKEDOUT\n"
+ config_spec += "element * %s\n" % ud.label
+ config_spec += "load %s%s\n" % (ud.vob, ud.module)
+
+ logger.info("Using config spec: \n%s" % config_spec)
+
+ with open(ud.configspecfile, 'w') as f:
+ f.write(config_spec)
+
+ def _remove_view(self, ud, d):
+ if os.path.exists(ud.viewdir):
+ os.chdir(ud.ccasedir)
+ cmd = self._build_ccase_command(ud, 'rmview');
+ logger.info("cleaning up [VOB=%s label=%s view=%s]", ud.vob, ud.label, ud.viewname)
+ bb.fetch2.check_network_access(d, cmd, ud.url)
+ output = runfetchcmd(cmd, d)
+ logger.info("rmview output: %s", output)
+
+ def need_update(self, ud, d):
+ if ("LATEST" in ud.label) or (ud.customspec and "LATEST" in ud.customspec):
+ ud.identifier += "-%s" % d.getVar("DATETIME",d, True)
+ return True
+ if os.path.exists(ud.localpath):
+ return False
+ return True
+
+ def supports_srcrev(self):
+ return True
+
+ def sortable_revision(self, ud, d, name):
+ return False, ud.identifier
+
+ def download(self, ud, d):
+ """Fetch url"""
+
+ # Make a fresh view
+ bb.utils.mkdirhier(ud.ccasedir)
+ self._write_configspec(ud, d)
+ cmd = self._build_ccase_command(ud, 'mkview')
+ logger.info("creating view [VOB=%s label=%s view=%s]", ud.vob, ud.label, ud.viewname)
+ bb.fetch2.check_network_access(d, cmd, ud.url)
+ try:
+ runfetchcmd(cmd, d)
+ except FetchError as e:
+ if "CRCLI2008E" in e.msg:
+ raise FetchError("%s\n%s\n" % (e.msg, "Call `rcleartool login` in your console to authenticate to the clearcase server before running bitbake."))
+ else:
+ raise e
+
+ # Set configspec: Setting the configspec effectively fetches the files as defined in the configspec
+ os.chdir(ud.viewdir)
+ cmd = self._build_ccase_command(ud, 'setcs');
+ logger.info("fetching data [VOB=%s label=%s view=%s]", ud.vob, ud.label, ud.viewname)
+ bb.fetch2.check_network_access(d, cmd, ud.url)
+ output = runfetchcmd(cmd, d)
+ logger.info("%s", output)
+
+ # Copy the configspec to the viewdir so we have it in our source tarball later
+ shutil.copyfile(ud.configspecfile, os.path.join(ud.viewdir, ud.csname))
+
+ # Clean clearcase meta-data before tar
+
+ runfetchcmd('tar -czf "%s" .' % (ud.localpath), d, cleanup = [ud.localpath])
+
+ # Clean up so we can create a new view next time
+ self.clean(ud, d);
+
+ def clean(self, ud, d):
+ self._remove_view(ud, d)
+ bb.utils.remove(ud.configspecfile)
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 799fb6c0fe..44fc27193e 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -67,6 +67,7 @@ Supported SRC_URI options are:
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import re
import bb
from bb import data
from bb.fetch2 import FetchMethod
@@ -339,9 +340,56 @@ class Git(FetchMethod):
"""
Compute the HEAD revision for the url
"""
- search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
- output = self._lsremote(ud, d, search)
- return output.split()[0]
+ output = self._lsremote(ud, d, "")
+ # Tags of the form ^{} may not work, need to fallback to other form
+ if ud.unresolvedrev[name][:5] == "refs/":
+ head = ud.unresolvedrev[name]
+ tag = ud.unresolvedrev[name]
+ else:
+ head = "refs/heads/%s" % ud.unresolvedrev[name]
+ tag = "refs/tags/%s" % ud.unresolvedrev[name]
+ for s in [head, tag + "^{}", tag]:
+ for l in output.split('\n'):
+ if s in l:
+ return l.split()[0]
+ raise bb.fetch2.FetchError("Unable to resolve '%s' in upstream git repository in git ls-remote output" % ud.unresolvedrev[name])
+
+ def latest_versionstring(self, ud, d):
+ """
+ Compute the latest release name like "x.y.x" in "x.y.x+gitHASH"
+ by searching through the tags output of ls-remote, comparing
+ versions and returning the highest match.
+ """
+ verstring = ""
+ tagregex = re.compile(d.getVar('GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
+ try:
+ output = self._lsremote(ud, d, "refs/tags/*^{}")
+ except bb.fetch2.FetchError or bb.fetch2.NetworkAccess:
+ return ""
+
+ for line in output.split("\n"):
+ if not line:
+ break
+
+ line = line.split("/")[-1]
+ # Ignore non-released branches
+ m = re.search("(alpha|beta|rc|final)+", line)
+ if m:
+ continue
+
+ # search for version in the line
+ tag = tagregex.search(line)
+ if tag == None:
+ continue
+
+ tag = tag.group('pver')
+ tag = tag.replace("_", ".")
+
+ if verstring and bb.utils.vercmp(("0", tag, ""), ("0", verstring, "")) < 0:
+ continue
+ verstring = tag
+
+ return verstring
def _build_revision(self, ud, d, name):
return ud.revisions[name]
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 5760fcdc58..81592f6e04 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -123,7 +123,10 @@ class Hg(FetchMethod):
else:
cmd = "%s pull" % (basecmd)
elif command == "update":
- cmd = "%s update --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" -C %s" % (basecmd, ud.user, ud.pswd, proto, " ".join(options))
+ if ud.user and ud.pswd:
+ cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" update -C %s" % (basecmd, ud.user, ud.pswd, proto, " ".join(options))
+ else:
+ cmd = "%s update -C %s" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid hg command %s" % command, ud.url)
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 5c4e42a942..0785236a6b 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -51,29 +51,41 @@ class Local(FetchMethod):
"""
Return the local filename of a given url assuming a successful fetch.
"""
+ return self.localpaths(urldata, d)[-1]
+
+ def localpaths(self, urldata, d):
+ """
+ Return the local filename of a given url assuming a successful fetch.
+ """
+ searched = []
path = urldata.decodedurl
newpath = path
- if path[0] != "/":
- filespath = data.getVar('FILESPATH', d, True)
- if filespath:
- logger.debug(2, "Searching for %s in paths: \n%s" % (path, "\n ".join(filespath.split(":"))))
- newpath = bb.utils.which(filespath, path)
- if not newpath:
- filesdir = data.getVar('FILESDIR', d, True)
- if filesdir:
- logger.debug(2, "Searching for %s in path: %s" % (path, filesdir))
- newpath = os.path.join(filesdir, path)
- if (not newpath or not os.path.exists(newpath)) and path.find("*") != -1:
- # For expressions using '*', best we can do is take the first directory in FILESPATH that exists
- newpath = bb.utils.which(filespath, ".")
- logger.debug(2, "Searching for %s in path: %s" % (path, newpath))
- return newpath
- if not os.path.exists(newpath):
- dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
- logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path))
- bb.utils.mkdirhier(os.path.dirname(dldirfile))
- return dldirfile
- return newpath
+ if path[0] == "/":
+ return [path]
+ filespath = data.getVar('FILESPATH', d, True)
+ if filespath:
+ logger.debug(2, "Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":"))))
+ newpath, hist = bb.utils.which(filespath, path, history=True)
+ searched.extend(hist)
+ if not newpath:
+ filesdir = data.getVar('FILESDIR', d, True)
+ if filesdir:
+ logger.debug(2, "Searching for %s in path: %s" % (path, filesdir))
+ newpath = os.path.join(filesdir, path)
+ searched.append(newpath)
+ if (not newpath or not os.path.exists(newpath)) and path.find("*") != -1:
+ # For expressions using '*', best we can do is take the first directory in FILESPATH that exists
+ newpath, hist = bb.utils.which(filespath, ".", history=True)
+ searched.extend(hist)
+ logger.debug(2, "Searching for %s in path: %s" % (path, newpath))
+ return searched
+ if not os.path.exists(newpath):
+ dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
+ logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path))
+ bb.utils.mkdirhier(os.path.dirname(dldirfile))
+ searched.append(dldirfile)
+ return searched
+ return searched
def need_update(self, ud, d):
if ud.url.find("*") != -1:
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 9836bd7268..d079a33c62 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -103,22 +103,15 @@ class Perforce(FetchMethod):
def urldata_init(self, ud, d):
(host, path, user, pswd, parm) = Perforce.doparse(ud.url, d)
- # If a label is specified, we use that as our filename
-
+ base_path = path.replace('/...', '')
+ base_path = self._strip_leading_slashes(base_path)
+
if "label" in parm:
- ud.localfile = "%s.tar.gz" % (parm["label"])
- return
-
- base = path
- which = path.find('/...')
- if which != -1:
- base = path[:which-1]
-
- base = self._strip_leading_slashes(base)
-
- cset = Perforce.getcset(d, path, host, user, pswd, parm)
+ version = parm["label"]
+ else:
+ version = Perforce.getcset(d, path, host, user, pswd, parm)
- ud.localfile = data.expand('%s+%s+%s.tar.gz' % (host, base.replace('/', '.'), cset), d)
+ ud.localfile = data.expand('%s+%s+%s.tar.gz' % (host, base_path.replace('/', '.'), version), d)
def download(self, ud, d):
"""
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index 4ae979472c..635578a711 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -87,7 +87,8 @@ class SSH(FetchMethod):
m = __pattern__.match(urldata.url)
path = m.group('path')
host = m.group('host')
- urldata.localpath = os.path.join(d.getVar('DL_DIR', True), os.path.basename(path))
+ urldata.localpath = os.path.join(d.getVar('DL_DIR', True),
+ os.path.basename(os.path.normpath(path)))
def download(self, urldata, d):
dldir = d.getVar('DL_DIR', True)
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 0456490368..9e4b443421 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -25,6 +25,9 @@ BitBake build tools.
#
# Based on functions from the base bb module, Copyright 2003 Holger Schurig
+import re
+import tempfile
+import subprocess
import os
import logging
import bb
@@ -34,6 +37,7 @@ from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import logger
from bb.fetch2 import runfetchcmd
+from bs4 import BeautifulSoup
class Wget(FetchMethod):
"""Class to fetch urls via 'wget'"""
@@ -104,3 +108,265 @@ class Wget(FetchMethod):
self._runwget(ud, d, fetchcmd, True)
return True
+
+
+ def _parse_path(self, regex, s):
+ """
+ Find and group name, version and archive type in the given string s
+ """
+ bb.debug(3, "parse_path(%s, %s)" % (regex.pattern, s))
+ m = regex.search(s)
+ if m:
+ bb.debug(3, "%s, %s, %s" % (m.group('name'), m.group('ver'), m.group('type')))
+ return (m.group('name'), m.group('ver'), m.group('type'))
+ return None
+
+ def _modelate_version(self, version):
+ if version[0] in ['.', '-']:
+ if version[1].isdigit():
+ version = version[1] + version[0] + version[2:len(version)]
+ else:
+ version = version[1:len(version)]
+
+ version = re.sub('\-', '.', version)
+ version = re.sub('_', '.', version)
+ version = re.sub('(rc)+', '.-1.', version)
+ version = re.sub('(alpha)+', '.-3.', version)
+ version = re.sub('(beta)+', '.-2.', version)
+ if version[0] == 'v':
+ version = version[1:len(version)]
+ return version
+
+ def _vercmp(self, old, new):
+ """
+ Check whether 'new' is newer than 'old' version. We use existing vercmp() for the
+ purpose. PE is cleared in comparison as it's not for build, and PR is cleared too
+ for simplicity as it's somehow difficult to get from various upstream format
+ """
+
+ (oldpn, oldpv, oldsuffix) = old
+ (newpn, newpv, newsuffix) = new
+
+ """
+ Check for a new suffix type that we have never heard of before
+ """
+ if (newsuffix):
+ m = self.suffix_regex_comp.search(newsuffix)
+ if not m:
+ bb.warn("%s has a possible unknown suffix: %s" % (newpn, newsuffix))
+ return False
+
+ """
+ Not our package so ignore it
+ """
+ if oldpn != newpn:
+ return False
+
+ oldpv = self._modelate_version(oldpv)
+ newpv = self._modelate_version(newpv)
+
+ if bb.utils.vercmp(("0", oldpv, ""), ("0", newpv, "")) < 0:
+ return True
+ else:
+ return False
+
+ def _fetch_index(self, uri, ud, d):
+ """
+ Run fetch checkstatus to get directory information
+ """
+ f = tempfile.NamedTemporaryFile()
+
+ agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
+ fetchcmd = self.basecmd
+ fetchcmd += " -O " + f.name + " --user-agent='" + agent + "' '" + uri + "'"
+ try:
+ self._runwget(ud, d, fetchcmd, True)
+ fetchresult = f.read()
+ except bb.fetch2.BBFetchException:
+ fetchresult = ""
+
+ f.close()
+ return fetchresult
+
+ def _check_latest_dir(self, url, versionstring, ud, d):
+ """
+ Return the name of the directory with the greatest package version
+ If error or no version, return None
+ """
+ bb.debug(3, "DirURL: %s, %s" % (url, versionstring))
+ soup = BeautifulSoup(self._fetch_index(url, ud, d))
+ if not soup:
+ return None
+
+ valid = 0
+ prefix = ''
+ regex = re.compile("(\D*)((\d+[\.\-_])+(\d+))")
+ m = regex.search(versionstring)
+ if m:
+ version = ('', m.group(2), '')
+ prefix = m.group(1)
+ bb.debug(3, "version: %s, prefix: %s" % (version, prefix))
+ else:
+ version = ('', versionstring, '')
+
+ for href in soup.find_all('a', href=True):
+ bb.debug(3, "href: %s" % (href['href']))
+ if href['href'].find(versionstring) >= 0:
+ valid = 1
+ m = regex.search(href['href'].strip("/"))
+ if m:
+ thisversion = ('', m.group(2), '')
+ if thisversion and self._vercmp(version, thisversion) == True:
+ version = thisversion
+
+ if valid:
+ bb.debug(3, "Would return %s" % (prefix+version[1]))
+ return prefix+version[1]
+ else:
+ bb.debug(3, "Not Valid")
+ return None
+
+ def _check_latest_version(self, url, package, package_regex, current_version, ud, d):
+ """
+ Return the latest version of a package inside a given directory path
+ If error or no version, return None
+ """
+ valid = 0
+ version = ('', '', '')
+
+ bb.debug(3, "VersionURL: %s" % (url))
+ soup = BeautifulSoup(self._fetch_index(url, ud, d))
+ if not soup:
+ bb.debug(3, "*** %s NO SOUP" % (url))
+ return None
+
+ pn_regex = d.getVar('REGEX', True)
+ if pn_regex:
+ pn_regex = re.compile(pn_regex)
+ bb.debug(3, "pn_regex = '%s'" % (pn_regex.pattern))
+
+ for line in soup.find_all('a', href=True):
+ newver = None
+ bb.debug(3, "line = '%s'" % (line['href']))
+ if pn_regex:
+ m = pn_regex.search(line['href'])
+ if m:
+ bb.debug(3, "Pver = '%s'" % (m.group('pver')))
+ newver = ('', m.group('pver'), '')
+ else:
+ m = pn_regex.search(str(line))
+ if m:
+ bb.debug(3, "Pver = '%s'" % (m.group('pver')))
+ newver = ('', m.group('pver'), '')
+ else:
+ newver = self._parse_path(package_regex, line['href'])
+ if not newver:
+ newver = self._parse_path(package_regex, str(line))
+
+ if newver:
+ bb.debug(3, "Upstream version found: %s" % newver[1])
+ if valid == 0:
+ version = newver
+ valid = 1
+ elif self._vercmp(version, newver) == True:
+ version = newver
+
+ # check whether a valid package and version were found
+ bb.debug(3, "*** %s -> UpstreamVersion = %s (CurrentVersion = %s)" %
+ (package, version[1] or "N/A", current_version[1]))
+
+ if valid and version:
+ return re.sub('_', '.', version[1])
+
+ return None
+
+ def _init_regexes(self, package):
+ """
+ Match as many patterns as possible such as:
+ gnome-common-2.20.0.tar.gz (most common format)
+ gtk+-2.90.1.tar.gz
+ xf86-input-synaptics-12.6.9.tar.gz
+ dri2proto-2.3.tar.gz
+ blktool_4.orig.tar.gz
+ libid3tag-0.15.1b.tar.gz
+ unzip552.tar.gz
+ icu4c-3_6-src.tgz
+ genext2fs_1.3.orig.tar.gz
+ gst-fluendo-mp3
+ """
+ # match most patterns which uses "-" as separator to version digits
+ pn_prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*\+?[\-_]"
+ # a loose pattern such as for unzip552.tar.gz
+ pn_prefix2 = "[a-zA-Z]+"
+ # a loose pattern such as for 80325-quicky-0.4.tar.gz
+ pn_prefix3 = "[0-9]+[\-]?[a-zA-Z]+"
+ # Save the Package Name (pn) Regex for use later
+ pn_regex = "(%s|%s|%s)" % (pn_prefix1, pn_prefix2, pn_prefix3)
+
+ # match version
+ pver_regex = "(([A-Z]*\d+[a-zA-Z]*[\.\-_]*)+)"
+
+ # match arch
+ parch_regex = "\-source|_all_"
+
+ # src.rpm extension was added only for rpm package. Can be removed if the rpm
+ # packaged will always be considered as having to be manually upgraded
+ psuffix_regex = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm|bz2|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)"
+
+ # match name, version and archive type of a package
+ self.package_regex_comp = re.compile("(?P<name>%s?)\.?v?(?P<ver>%s)(?P<arch>%s)?[\.\-](?P<type>%s$)"
+ % (pn_regex, pver_regex, parch_regex, psuffix_regex))
+ self.suffix_regex_comp = re.compile(psuffix_regex)
+
+ # search for version matches on folders inside the path, like:
+ # "5.7" in http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz
+ self.dirver_regex_comp = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([\-_]r\d+)*)/")
+
+ # make custom regex for search in uri's
+ package_custom_regex_comp = None
+ version = self._parse_path(self.package_regex_comp, package)
+ if version:
+ package_custom_regex_comp = re.compile(
+ "(?P<name>%s)(?P<ver>%s)(?P<arch>%s)?[\.\-](?P<type>%s)$" %
+ (re.escape(version[0]), pver_regex, parch_regex, psuffix_regex))
+
+ return package_custom_regex_comp
+
+ def latest_versionstring(self, ud, d):
+ """
+ Manipulate the URL and try to obtain the latest package version
+
+ sanity check to ensure same name and type.
+ """
+ package = ud.path.split("/")[-1]
+ regex_uri = d.getVar("REGEX_URI", True)
+ newpath = regex_uri or ud.path
+ pupver = ""
+
+ package_custom_regex_comp = self._init_regexes(package)
+
+ current_version = ('', d.getVar('PV', True), '')
+
+ """possible to have no version in pkg name, such as spectrum-fw"""
+ if not re.search("\d+", package):
+ return re.sub('_', '.', current_version[1])
+
+ if not regex_uri:
+ # generate the new uri with the appropriate latest directory
+ m = self.dirver_regex_comp.search(ud.path)
+ if m:
+ dirver = m.group('dirver')
+ newuri = bb.fetch.encodeurl([ud.type, ud.host,
+ ud.path.split(dirver)[0], ud.user, ud.pswd, {}])
+ new_dirver = self._check_latest_dir(newuri, dirver, ud, d)
+ if new_dirver and dirver != new_dirver:
+ newpath = ud.path.replace(dirver, new_dirver, True)
+
+ newpath = newpath.split(package)[0] or "/" # path to directory
+ newuri = bb.fetch.encodeurl([ud.type, ud.host, newpath, ud.user, ud.pswd, {}])
+ else:
+ newuri = newpath
+
+ return self._check_latest_version(newuri, package,
+ package_custom_regex_comp or package_regex_comp,
+ current_version, ud, d) or ""
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index fca43eefd0..466523c6e4 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -52,10 +52,10 @@ def getMountedDev(path):
parentDev = os.stat(path).st_dev
currentDev = parentDev
# When the current directory's device is different from the
- # parrent's, then the current directory is a mount point
+ # parent's, then the current directory is a mount point
while parentDev == currentDev:
mountPoint = path
- # Use dirname to get the parrent's directory
+ # Use dirname to get the parent's directory
path = os.path.dirname(path)
# Reach the "/"
if path == mountPoint:
@@ -77,7 +77,7 @@ def getDiskData(BBDirs, configuration):
"""Prepare disk data for disk space monitor"""
# Save the device IDs, need the ID to be unique (the dictionary's key is
- # unique), so that when more than one directories are located in the same
+ # unique), so that when more than one directory is located on the same
# device, we just monitor it once
devDict = {}
for pathSpaceInode in BBDirs.split():
@@ -187,11 +187,11 @@ class diskMonitor:
if self.spaceInterval and self.inodeInterval:
self.enableMonitor = True
# These are for saving the previous disk free space and inode, we
- # use them to avoid print too many warning messages
+ # use them to avoid printing too many warning messages
self.preFreeS = {}
self.preFreeI = {}
- # This is for STOPTASKS and ABORT, to avoid print the message repeatly
- # during waiting the tasks to finish
+ # This is for STOPTASKS and ABORT, to avoid printing the message
+ # repeatedly while waiting for the tasks to finish
self.checked = {}
for k in self.devDict:
self.preFreeS[k] = 0
@@ -239,11 +239,9 @@ class diskMonitor:
freeInode = st.f_favail
if minInode and freeInode < minInode:
- # Some fs formats' (e.g., btrfs) statvfs.f_files (inodes) is
- # zero, this is a feature of the fs, we disable the inode
- # checking for such a fs.
+ # Some filesystems use dynamic inodes so can't run out
+ # (e.g. btrfs). This is reported by the inode count being 0.
if st.f_files == 0:
- logger.info("Inode check for %s is unavaliable, will remove it from disk monitor" % path)
self.devDict[k][2] = None
continue
# Always show warning, the self.checked would always be False if the action is WARN
diff --git a/bitbake/lib/bb/namedtuple_with_abc.py b/bitbake/lib/bb/namedtuple_with_abc.py
index f5e0a3f3d5..32f2fc642c 100644
--- a/bitbake/lib/bb/namedtuple_with_abc.py
+++ b/bitbake/lib/bb/namedtuple_with_abc.py
@@ -202,8 +202,8 @@ if __name__ == '__main__':
print(rec5._replace(k=222)._my_custom_method()) # MyMixIn's
print(rec5._replace(k=222).count(2)) # MyMixIn's
- # None that behavior: the standard namedtuple methods cannot be
- # overriden by a foreign mix-in -- even if the mix-in is declared
+ # Note that behavior: the standard namedtuple methods cannot be
+ # overridden by a foreign mix-in -- even if the mix-in is declared
# as the leftmost base class (but, obviously, you can override them
# in the defined class or its subclasses):
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index 2303f15b9e..25effc2200 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -73,6 +73,11 @@ def update_mtime(f):
__mtime_cache[f] = os.stat(f)[stat.ST_MTIME]
return __mtime_cache[f]
+def update_cache(f):
+ if f in __mtime_cache:
+ logger.debug(1, "Updating mtime cache for %s" % f)
+ update_mtime(f)
+
def mark_dependency(d, f):
if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:])
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 4e5a06e761..c53ab17d68 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -128,7 +128,7 @@ class DataNode(AstNode):
if 'flag' in groupd and groupd['flag'] != None:
flag = groupd['flag']
elif groupd["lazyques"]:
- flag = "defaultval"
+ flag = "_defaultval"
loginfo['op'] = op
loginfo['detail'] = groupd["value"]
@@ -139,7 +139,7 @@ class DataNode(AstNode):
data.setVar(key, val, **loginfo)
class MethodNode(AstNode):
- tr_tbl = string.maketrans('/.+-@%', '______')
+ tr_tbl = string.maketrans('/.+-@%&', '_______')
def __init__(self, filename, lineno, func_name, body):
AstNode.__init__(self, filename, lineno)
@@ -226,6 +226,8 @@ class ExportFuncsNode(AstNode):
if data.getVarFlag(calledfunc, "python"):
data.setVar(func, " bb.build.exec_func('" + calledfunc + "', d)\n")
else:
+ if "-" in self.classname:
+ bb.fatal("The classname %s contains a dash character and is calling an sh function %s using EXPORT_FUNCTIONS. Since a dash is illegal in sh function names, this cannot work, please rename the class or don't use EXPORT_FUNCTIONS." % (self.classname, calledfunc))
data.setVar(func, " " + calledfunc + "\n")
data.setVarFlag(func, 'export_func', '1')
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index 978ebe4608..861faf0e76 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -27,7 +27,7 @@
import re, os
import logging
import bb.utils
-from bb.parse import ParseError, resolve_file, ast, logger
+from bb.parse import ParseError, resolve_file, ast, logger, handle
__config_regexp__ = re.compile( r"""
^
@@ -66,38 +66,36 @@ def init(data):
def supports(fn, d):
return fn[-5:] == ".conf"
-def include(oldfn, fn, lineno, data, error_out):
+def include(parentfn, fn, lineno, data, error_out):
"""
error_out: A string indicating the verb (e.g. "include", "inherit") to be
used in a ParseError that will be raised if the file to be included could
not be included. Specify False to avoid raising an error in this case.
"""
- if oldfn == fn: # prevent infinite recursion
+ if parentfn == fn: # prevent infinite recursion
return None
- import bb
fn = data.expand(fn)
- oldfn = data.expand(oldfn)
+ parentfn = data.expand(parentfn)
if not os.path.isabs(fn):
- dname = os.path.dirname(oldfn)
+ dname = os.path.dirname(parentfn)
bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True))
abs_fn, attempts = bb.utils.which(bbpath, fn, history=True)
if abs_fn and bb.parse.check_dependency(data, abs_fn):
- bb.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
+ logger.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
for af in attempts:
bb.parse.mark_dependency(data, af)
if abs_fn:
fn = abs_fn
elif bb.parse.check_dependency(data, fn):
- bb.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
+ logger.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
- from bb.parse import handle
try:
- ret = handle(fn, data, True)
+ ret = bb.parse.handle(fn, data, True)
except (IOError, OSError):
if error_out:
- raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
+ raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), parentfn, lineno)
logger.debug(2, "CONF file '%s' not found", fn)
bb.parse.mark_dependency(data, fn)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 4ea4970127..c503980666 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -97,7 +97,7 @@ class RunQueueScheduler(object):
def __init__(self, runqueue, rqdata):
"""
The default scheduler just returns the first buildable task (the
- priority map is sorted by task numer)
+ priority map is sorted by task number)
"""
self.rq = runqueue
self.rqdata = rqdata
@@ -186,7 +186,7 @@ class RunQueueSchedulerCompletion(RunQueueSchedulerSpeed):
"""
A scheduler optimised to complete .bb files are quickly as possible. The
priority map is sorted by task weight, but then reordered so once a given
- .bb file starts to build, its completed as quickly as possible. This works
+ .bb file starts to build, it's completed as quickly as possible. This works
well where disk space is at a premium and classes like OE's rm_work are in
force.
"""
@@ -430,7 +430,7 @@ class RunQueueData:
# Nothing to do
return 0
- logger.info("Preparing runqueue")
+ logger.info("Preparing RunQueue")
# Step A - Work out a list of tasks to run
#
@@ -795,7 +795,7 @@ class RunQueueData:
for st in self.cooker.configuration.invalidate_stamp.split(','):
invalidate_task(fn, "do_%s" % st, True)
- # Interate over the task list and call into the siggen code
+ # Iterate over the task list and call into the siggen code
dealtwith = set()
todeal = set(range(len(self.runq_fnid)))
while len(todeal) > 0:
@@ -859,15 +859,18 @@ class RunQueue:
def _start_worker(self, fakeroot = False, rqexec = None):
logger.debug(1, "Starting bitbake-worker")
+ magic = "decafbad"
+ if self.cooker.configuration.profile:
+ magic = "decafbadbad"
if fakeroot:
fakerootcmd = self.cfgData.getVar("FAKEROOTCMD", True)
fakerootenv = (self.cfgData.getVar("FAKEROOTBASEENV", True) or "").split()
env = os.environ.copy()
for key, value in (var.split('=') for var in fakerootenv):
env[key] = value
- worker = subprocess.Popen([fakerootcmd, "bitbake-worker", "decafbad"], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env)
+ worker = subprocess.Popen([fakerootcmd, "bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env)
else:
- worker = subprocess.Popen(["bitbake-worker", "decafbad"], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+ worker = subprocess.Popen(["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
bb.utils.nonblockingfd(worker.stdout)
workerpipe = runQueuePipe(worker.stdout, None, self.cfgData, self, rqexec)
@@ -876,9 +879,7 @@ class RunQueue:
"fakerootenv" : self.rqdata.dataCache.fakerootenv,
"fakerootdirs" : self.rqdata.dataCache.fakerootdirs,
"fakerootnoenv" : self.rqdata.dataCache.fakerootnoenv,
- "hashes" : bb.parse.siggen.taskhash,
- "hash_deps" : bb.parse.siggen.runtaskdeps,
- "sigchecksums" : bb.parse.siggen.file_checksum_values,
+ "sigdata" : bb.parse.siggen.get_taskdata(),
"runq_hash" : self.rqdata.runq_hash,
"logdefaultdebug" : bb.msg.loggerDefaultDebugLevel,
"logdefaultverbose" : bb.msg.loggerDefaultVerbose,
@@ -967,11 +968,11 @@ class RunQueue:
stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn)
- # If the stamp is missing its not current
+ # If the stamp is missing, it's not current
if not os.access(stampfile, os.F_OK):
logger.debug(2, "Stampfile %s not available", stampfile)
return False
- # If its a 'nostamp' task, it's not current
+ # If it's a 'nostamp' task, it's not current
taskdep = self.rqdata.dataCache.task_deps[fn]
if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
logger.debug(2, "%s.%s is nostamp\n", fn, taskname)
@@ -1063,9 +1064,9 @@ class RunQueue:
retval = self.rqexe.execute()
if self.state is runQueueCleanUp:
- self.rqexe.finish()
+ retval = self.rqexe.finish()
- if self.state is runQueueComplete or self.state is runQueueFailed:
+ if (self.state is runQueueComplete or self.state is runQueueFailed) and self.rqexe:
self.teardown_workers()
if self.rqexe.stats.failed:
logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed + self.rqexe.stats.failed, self.rqexe.stats.skipped, self.rqexe.stats.failed)
@@ -1106,6 +1107,7 @@ class RunQueue:
def finish_runqueue(self, now = False):
if not self.rqexe:
+ self.state = runQueueComplete
return
if now:
@@ -1304,15 +1306,14 @@ class RunQueueExecute:
if self.stats.active > 0:
bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData)
self.rq.read_workers()
-
- return
+ return self.rq.active_fds()
if len(self.failed_fnids) != 0:
self.rq.state = runQueueFailed
- return
+ return True
self.rq.state = runQueueComplete
- return
+ return True
def check_dependencies(self, task, taskdeps, setscene = False):
if not self.rq.depvalidate:
@@ -1687,7 +1688,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
process_endpoints(endpoints)
- # Build a list of setscene tasks which as "unskippable"
+ # Build a list of setscene tasks which are "unskippable"
# These are direct endpoints referenced by the build
endpoints2 = {}
sq_revdeps2 = []
@@ -1843,6 +1844,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
realtask = self.rqdata.runq_setscene[task]
realdep = self.rqdata.runq_setscene[dep]
logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (self.rqdata.get_user_idstring(realtask), self.rqdata.get_user_idstring(realdep)))
+ self.scenequeue_updatecounters(dep, fail)
+ continue
+ if task not in self.sq_revdeps2[dep]:
+ # May already have been removed by the fail case above
continue
self.sq_revdeps2[dep].remove(task)
if len(self.sq_revdeps2[dep]) == 0:
@@ -1984,6 +1989,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
logger.debug(1, 'We can skip tasks %s', sorted(self.rq.scenequeue_covered))
self.rq.state = runQueueRunInit
+
+ completeevent = sceneQueueComplete(self.stats, self.rq)
+ bb.event.fire(completeevent, self.cfgData)
+
return True
def runqueue_process_waitpid(self, task, status):
@@ -2036,7 +2045,7 @@ class sceneQueueEvent(runQueueEvent):
class runQueueTaskStarted(runQueueEvent):
"""
- Event notifing a task was started
+ Event notifying a task was started
"""
def __init__(self, task, stats, rq, noexec=False):
runQueueEvent.__init__(self, task, stats, rq)
@@ -2044,7 +2053,7 @@ class runQueueTaskStarted(runQueueEvent):
class sceneQueueTaskStarted(sceneQueueEvent):
"""
- Event notifing a setscene task was started
+ Event notifying a setscene task was started
"""
def __init__(self, task, stats, rq, noexec=False):
sceneQueueEvent.__init__(self, task, stats, rq)
@@ -2052,7 +2061,7 @@ class sceneQueueTaskStarted(sceneQueueEvent):
class runQueueTaskFailed(runQueueEvent):
"""
- Event notifing a task failed
+ Event notifying a task failed
"""
def __init__(self, task, stats, exitcode, rq):
runQueueEvent.__init__(self, task, stats, rq)
@@ -2060,25 +2069,33 @@ class runQueueTaskFailed(runQueueEvent):
class sceneQueueTaskFailed(sceneQueueEvent):
"""
- Event notifing a setscene task failed
+ Event notifying a setscene task failed
"""
def __init__(self, task, stats, exitcode, rq):
sceneQueueEvent.__init__(self, task, stats, rq)
self.exitcode = exitcode
+class sceneQueueComplete(sceneQueueEvent):
+ """
+ Event when all the sceneQueue tasks are complete
+ """
+ def __init__(self, stats, rq):
+ self.stats = stats.copy()
+ bb.event.Event.__init__(self)
+
class runQueueTaskCompleted(runQueueEvent):
"""
- Event notifing a task completed
+ Event notifying a task completed
"""
class sceneQueueTaskCompleted(sceneQueueEvent):
"""
- Event notifing a setscene task completed
+ Event notifying a setscene task completed
"""
class runQueueTaskSkipped(runQueueEvent):
"""
- Event notifing a task was skipped
+ Event notifying a task was skipped
"""
def __init__(self, task, stats, rq, reason):
runQueueEvent.__init__(self, task, stats, rq)
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 577c2503ac..7671b26a80 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -38,14 +38,18 @@ from . import BitBakeBaseServer, BitBakeBaseServerConnection, BaseImplServer
logger = logging.getLogger('BitBake')
class ServerCommunicator():
- def __init__(self, connection, event_handle):
+ def __init__(self, connection, event_handle, server):
self.connection = connection
self.event_handle = event_handle
+ self.server = server
def runCommand(self, command):
# @todo try/except
self.connection.send(command)
+ if not self.server.is_alive():
+ raise SystemExit
+
while True:
# don't let the user ctrl-c while we're waiting for a response
try:
@@ -111,7 +115,7 @@ class ProcessServer(Process, BaseImplServer):
self.quitout.recv()
self.quit = True
- self.idle_commands(.1, [self.event_queue._reader, self.command_channel, self.quitout])
+ self.idle_commands(.1, [self.command_channel, self.quitout])
except Exception:
logger.exception('Running command %s', command)
@@ -139,6 +143,8 @@ class ProcessServer(Process, BaseImplServer):
raise
except Exception:
logger.exception('Running idle function')
+ del self._idlefuns[function]
+ self.quit = True
if nextsleep is not None:
select.select(fds,[],[],nextsleep)
@@ -158,7 +164,7 @@ class BitBakeProcessServerConnection(BitBakeBaseServerConnection):
self.procserver = serverImpl
self.ui_channel = ui_channel
self.event_queue = event_queue
- self.connection = ServerCommunicator(self.ui_channel, self.procserver.event_handle)
+ self.connection = ServerCommunicator(self.ui_channel, self.procserver.event_handle, self.procserver)
self.events = self.event_queue
def sigterm_terminate(self):
@@ -197,14 +203,20 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
def waitEvent(self, timeout):
if self.exit:
- raise KeyboardInterrupt()
+ sys.exit(1)
try:
+ if not self.server.is_alive():
+ self.setexit()
+ return None
return self.get(True, timeout)
except Empty:
return None
def getEvent(self):
try:
+ if not self.server.is_alive():
+ self.setexit()
+ return None
return self.get(False)
except Empty:
return None
@@ -219,6 +231,7 @@ class BitBakeServer(BitBakeBaseServer):
self.ui_channel, self.server_channel = Pipe()
self.event_queue = ProcessEventQueue(0)
self.serverImpl = ProcessServer(self.server_channel, self.event_queue, None)
+ self.event_queue.server = self.serverImpl
def detach(self):
self.serverImpl.start()
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 933311cccb..2de3aff332 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -62,6 +62,13 @@ class SignatureGenerator(object):
def dump_sigs(self, dataCache, options):
return
+ def get_taskdata(self):
+ return (self.runtaskdeps, self.taskhash, self.file_checksum_values)
+
+ def set_taskdata(self, data):
+ self.runtaskdeps, self.taskhash, self.file_checksum_values = data
+
+
class SignatureGeneratorBasic(SignatureGenerator):
"""
"""
@@ -185,7 +192,14 @@ class SignatureGeneratorBasic(SignatureGenerator):
checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename)
for (f,cs) in checksums:
self.file_checksum_values[k][f] = cs
- data = data + cs
+ if cs:
+ data = data + cs
+
+ taskdep = dataCache.task_deps[fn]
+ if 'nostamp' in taskdep and task in taskdep['nostamp']:
+ # Nostamp tasks need an implicit taint so that they force any dependent tasks to run
+ import uuid
+ data = data + str(uuid.uuid4())
taint = self.read_taint(fn, task, dataCache.stamp[fn])
if taint:
@@ -197,11 +211,6 @@ class SignatureGeneratorBasic(SignatureGenerator):
#d.setVar("BB_TASKHASH_task-%s" % task, taskhash[task])
return h
- def set_taskdata(self, hashes, deps, checksums):
- self.runtaskdeps = deps
- self.taskhash = hashes
- self.file_checksum_values = checksums
-
def dump_sigtask(self, fn, task, stampbase, runtime):
k = fn + "." + task
if runtime == "customfile":
@@ -294,10 +303,9 @@ def dump_this_task(outfile, d):
bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
def clean_basepath(a):
+ b = a.rsplit("/", 2)[1] + a.rsplit("/", 2)[2]
if a.startswith("virtual:"):
- b = a.rsplit(":", 1)[0] + ":" + a.rsplit("/", 1)[1]
- else:
- b = a.rsplit("/", 1)[1]
+ b = b + ":" + a.rsplit(":", 1)[0]
return b
def clean_basepaths(a):
@@ -306,6 +314,12 @@ def clean_basepaths(a):
b[clean_basepath(x)] = a[x]
return b
+def clean_basepaths_list(a):
+ b = []
+ for x in a:
+ b.append(clean_basepath(x))
+ return b
+
def compare_sigfiles(a, b, recursecb = None):
output = []
@@ -405,6 +419,17 @@ def compare_sigfiles(a, b, recursecb = None):
for f in removed:
output.append("Dependency on checksum of file %s was removed" % (f))
+ changed = []
+ for idx, task in enumerate(a_data['runtaskdeps']):
+ a = a_data['runtaskdeps'][idx]
+ b = b_data['runtaskdeps'][idx]
+ if a_data['runtaskhashes'][a] != b_data['runtaskhashes'][b]:
+ changed.append("%s with hash %s\n changed to\n%s with hash %s" % (a, a_data['runtaskhashes'][a], b, b_data['runtaskhashes'][b]))
+
+ if changed:
+ output.append("runtaskdeps changed from %s to %s" % (clean_basepaths_list(a_data['runtaskdeps']), clean_basepaths_list(b_data['runtaskdeps'])))
+ output.append("\n".join(changed))
+
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
a = a_data['runtaskhashes']
@@ -481,4 +506,17 @@ def dump_sigfile(a):
if 'taint' in a_data:
output.append("Tainted (by forced/invalidated task): %s" % a_data['taint'])
+ data = a_data['basehash']
+ for dep in a_data['runtaskdeps']:
+ data = data + a_data['runtaskhashes'][dep]
+
+ for c in a_data['file_checksum_values']:
+ data = data + c[1]
+
+ if 'taint' in a_data:
+ data = data + a_data['taint']
+
+ h = hashlib.md5(data).hexdigest()
+ output.append("Computed Hash is %s" % h)
+
return output
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index 944a906653..7994a88a78 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -121,6 +121,12 @@ class DataExpansions(unittest.TestCase):
keys = self.d.keys()
self.assertEqual(keys, ['value_of_foo', 'foo', 'bar'])
+ def test_keys_deletion(self):
+ newd = bb.data.createCopy(self.d)
+ newd.delVar("bar")
+ keys = newd.keys()
+ self.assertEqual(keys, ['value_of_foo', 'foo'])
+
class TestNestedExpansions(unittest.TestCase):
def setUp(self):
self.d = bb.data.init()
@@ -259,6 +265,20 @@ class TestConcatOverride(unittest.TestCase):
bb.data.update_data(self.d)
self.assertEqual(self.d.getVar("TEST", True), "")
+ def test_remove_expansion(self):
+ self.d.setVar("BAR", "Z")
+ self.d.setVar("TEST", "${BAR}/X Y")
+ self.d.setVar("TEST_remove", "${BAR}/X")
+ bb.data.update_data(self.d)
+ self.assertEqual(self.d.getVar("TEST", True), "Y")
+
+ def test_remove_expansion_items(self):
+ self.d.setVar("TEST", "A B C D")
+ self.d.setVar("BAR", "B D")
+ self.d.setVar("TEST_remove", "${BAR}")
+ bb.data.update_data(self.d)
+ self.assertEqual(self.d.getVar("TEST", True), "A C")
+
class TestOverrides(unittest.TestCase):
def setUp(self):
self.d = bb.data.init()
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 7df7a0ef51..6eb0f2dc18 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -24,6 +24,7 @@ import tempfile
import subprocess
import os
from bb.fetch2 import URI
+from bb.fetch2 import FetchMethod
import bb
class URITest(unittest.TestCase):
@@ -444,6 +445,13 @@ class FetcherLocalTest(FetcherTest):
tree = self.fetchUnpack(['file://dir/subdir/e'])
self.assertEqual(tree, ['dir/subdir/e'])
+ def test_local_subdirparam(self):
+ tree = self.fetchUnpack(['file://a;subdir=bar'])
+ self.assertEqual(tree, ['bar/a'])
+
+ def test_local_deepsubdirparam(self):
+ tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar'])
+ self.assertEqual(tree, ['bar/dir/subdir/e'])
class FetcherNetworkTest(FetcherTest):
@@ -558,5 +566,81 @@ class URLHandle(unittest.TestCase):
result = bb.fetch.encodeurl(v)
self.assertEqual(result, k)
+class FetchMethodTest(FetcherTest):
+
+ test_git_uris = {
+ # version pattern "X.Y.Z"
+ ("mx-1.0", "git://github.com/clutter-project/mx.git;branch=mx-1.4", "9b1db6b8060bd00b121a692f942404a24ae2960f", "")
+ : "1.99.4",
+ # version pattern "vX.Y"
+ ("mtd-utils", "git://git.infradead.org/mtd-utils.git", "ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f", "")
+ : "1.5.0",
+ # version pattern "pkg_name-X.Y"
+ ("presentproto", "git://anongit.freedesktop.org/git/xorg/proto/presentproto", "24f3a56e541b0a9e6c6ee76081f441221a120ef9", "")
+ : "1.0",
+ # version pattern "pkg_name-vX.Y.Z"
+ ("dtc", "git://git.qemu.org/dtc.git", "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf", "")
+ : "1.4.0",
+ # combination version pattern
+ ("sysprof", "git://git.gnome.org/sysprof", "cd44ee6644c3641507fb53b8a2a69137f2971219", "")
+ : "1.2.0",
+ ("u-boot-mkimage", "git://git.denx.de/u-boot.git;branch=master;protocol=git", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "")
+ : "2014.01",
+ # version pattern "yyyymmdd"
+ ("mobile-broadband-provider-info", "git://git.gnome.org/mobile-broadband-provider-info", "4ed19e11c2975105b71b956440acdb25d46a347d", "")
+ : "20120614",
+ # packages with a valid GITTAGREGEX
+ ("xf86-video-omap", "git://anongit.freedesktop.org/xorg/driver/xf86-video-omap", "ae0394e687f1a77e966cf72f895da91840dffb8f", "(?P<pver>(\d+\.(\d\.?)*))")
+ : "0.4.3",
+ ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P<pver>(([0-9][\.|_]?)+[0-9]))")
+ : "11.0.0",
+ ("chkconfig-alternatives-native", "git://github.com/kergoth/chkconfig;branch=sysroot", "cd437ecbd8986c894442f8fce1e0061e20f04dee", "chkconfig\-(?P<pver>((\d+[\.\-_]*)+))")
+ : "1.3.59",
+ ("remake", "git://github.com/rocky/remake.git", "f05508e521987c8494c92d9c2871aec46307d51d", "(?P<pver>(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))")
+ : "3.82+dbg0.9",
+ }
-
+ test_wget_uris = {
+ # packages with versions inside directory name
+ ("util-linux", "http://kernel.org/pub/linux/utils/util-linux/v2.23/util-linux-2.24.2.tar.bz2", "", "")
+ : "2.24.2",
+ ("enchant", "http://www.abisource.com/downloads/enchant/1.6.0/enchant-1.6.0.tar.gz", "", "")
+ : "1.6.0",
+ ("cmake", "http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz", "", "")
+ : "2.8.12.1",
+ # packages with versions only in current directory
+ ("eglic", "http://downloads.yoctoproject.org/releases/eglibc/eglibc-2.18-svnr23787.tar.bz2", "", "")
+ : "2.19",
+ ("gnu-config", "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-20120814.tar.bz2", "", "")
+ : "20120814",
+ # packages with "99" in the name of possible version
+ ("pulseaudio", "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-4.0.tar.xz", "", "")
+ : "5.0",
+ ("xserver-xorg", "http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.15.1.tar.bz2", "", "")
+ : "1.15.1",
+ # packages with valid REGEX_URI and REGEX
+ ("cups", "http://www.cups.org/software/1.7.2/cups-1.7.2-source.tar.bz2", "http://www.cups.org/software.php", "(?P<name>cups\-)(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz")
+ : "2.0.0",
+ ("db", "http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz", "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html", "http://download.oracle.com/otn/berkeley-db/(?P<name>db-)(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz")
+ : "6.1.19",
+ }
+ if os.environ.get("BB_SKIP_NETTESTS") == "yes":
+ print("Unset BB_SKIP_NETTESTS to run network tests")
+ else:
+ def test_git_latest_versionstring(self):
+ for k, v in self.test_git_uris.items():
+ self.d.setVar("SRCREV", k[2])
+ self.d.setVar("GITTAGREGEX", k[3])
+ ud = bb.fetch2.FetchData(k[1], self.d)
+ verstring = ud.method.latest_versionstring(ud, self.d)
+ r = bb.utils.vercmp_string(v, verstring)
+ self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring))
+
+ def test_wget_latest_versionstring(self):
+ for k, v in self.test_wget_uris.items():
+ self.d.setVar("REGEX_URI", k[2])
+ self.d.setVar("REGEX", k[3])
+ ud = bb.fetch2.FetchData(k[1], self.d)
+ verstring = ud.method.latest_versionstring(ud, self.d)
+ r = bb.utils.vercmp_string(v, verstring)
+ self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring))
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 751a2d7a23..6bcbd47ab3 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -25,12 +25,12 @@ import bb.cache
import bb.cooker
import bb.providers
import bb.utils
-from bb.cooker import state, BBCooker
+from bb.cooker import state, BBCooker, CookerFeatures
from bb.cookerdata import CookerConfiguration, ConfigParameters
import bb.fetch2
class Tinfoil:
- def __init__(self, output=sys.stdout):
+ def __init__(self, output=sys.stdout, tracking=False):
# Needed to avoid deprecation warnings with python 2.6
warnings.filterwarnings("ignore", category=DeprecationWarning)
@@ -48,7 +48,10 @@ class Tinfoil:
configparams = TinfoilConfigParameters(parse_only=True)
self.config.setConfigParameters(configparams)
self.config.setServerRegIdleCallback(self.register_idle_function)
- self.cooker = BBCooker(self.config)
+ features = []
+ if tracking:
+ features.append(CookerFeatures.BASEDATASTORE_TRACKING)
+ self.cooker = BBCooker(self.config, features)
self.config_data = self.cooker.data
bb.providers.logger.setLevel(logging.ERROR)
self.cooker_data = None
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 77be7c744c..4e2d4a7dec 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -26,12 +26,18 @@ os.environ["DJANGO_SETTINGS_MODULE"] = "toaster.toastermain.settings"
import toaster.toastermain.settings as toaster_django_settings
from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage, HelpText
-from toaster.orm.models import Target_Image_File
+from toaster.orm.models import Target_Image_File, BuildArtifact
from toaster.orm.models import Variable, VariableHistory
from toaster.orm.models import Package, Package_File, Target_Installed_Package, Target_File
from toaster.orm.models import Task_Dependency, Package_Dependency
from toaster.orm.models import Recipe_Dependency
from bb.msg import BBLogFormatter as format
+from django.db import models
+import logging
+
+
+logger = logging.getLogger("BitBake")
+
class NotExisting(Exception):
pass
@@ -43,10 +49,59 @@ class ORMWrapper(object):
"""
def __init__(self):
+ self.layer_version_objects = []
+ self.task_objects = {}
+ self.recipe_objects = {}
pass
+ @staticmethod
+ def _build_key(**kwargs):
+ key = "0"
+ for k in sorted(kwargs.keys()):
+ if isinstance(kwargs[k], models.Model):
+ key += "-%d" % kwargs[k].id
+ else:
+ key += "-%s" % str(kwargs[k])
+ return key
+
+
+ def _cached_get_or_create(self, clazz, **kwargs):
+ """ This is a memory-cached get_or_create. We assume that the objects will not be created in the
+ database through any other means.
+ """
+
+ assert issubclass(clazz, models.Model), "_cached_get_or_create needs to get the class as first argument"
+
+ key = ORMWrapper._build_key(**kwargs)
+ dictname = "objects_%s" % clazz.__name__
+ if not dictname in vars(self).keys():
+ vars(self)[dictname] = {}
+
+ created = False
+ if not key in vars(self)[dictname].keys():
+ vars(self)[dictname][key] = clazz.objects.create(**kwargs)
+ created = True
+
+ return (vars(self)[dictname][key], created)
+
- def create_build_object(self, build_info):
+ def _cached_get(self, clazz, **kwargs):
+ """ This is a memory-cached get. We assume that the objects will not change in the database between gets.
+ """
+ assert issubclass(clazz, models.Model), "_cached_get needs to get the class as first argument"
+
+ key = ORMWrapper._build_key(**kwargs)
+ dictname = "objects_%s" % clazz.__name__
+
+ if not dictname in vars(self).keys():
+ vars(self)[dictname] = {}
+
+ if not key in vars(self)[dictname].keys():
+ vars(self)[dictname][key] = clazz.objects.get(**kwargs)
+
+ return vars(self)[dictname][key]
+
+ def create_build_object(self, build_info, brbe):
assert 'machine' in build_info
assert 'distro' in build_info
assert 'distro_version' in build_info
@@ -65,6 +120,18 @@ class ORMWrapper(object):
build_name=build_info['build_name'],
bitbake_version=build_info['bitbake_version'])
+ logger.debug(1, "buildinfohelper: build is created %s" % build)
+ if brbe is not None:
+ logger.debug(1, "buildinfohelper: brbe is %s" % brbe)
+ from bldcontrol.models import BuildEnvironment, BuildRequest
+ br, be = brbe.split(":")
+
+ buildrequest = BuildRequest.objects.get(pk = br)
+ buildrequest.build = build
+ buildrequest.save()
+
+ build.project_id = buildrequest.project_id
+ build.save()
return build
def create_target_objects(self, target_info):
@@ -76,7 +143,7 @@ class ORMWrapper(object):
tgt_object = Target.objects.create( build = target_info['build'],
target = tgt_name,
is_image = False,
- );
+ )
targets.append(tgt_object)
return targets
@@ -96,8 +163,7 @@ class ORMWrapper(object):
build.outcome = outcome
build.save()
- def update_target_object(self, target, license_manifest_path):
-
+ def update_target_set_license_manifest(self, target, license_manifest_path):
target.license_manifest_path = license_manifest_path
target.save()
@@ -106,39 +172,47 @@ class ORMWrapper(object):
assert 'recipe' in task_information
assert 'task_name' in task_information
- task_object, created = Task.objects.get_or_create(
- build=task_information['build'],
- recipe=task_information['recipe'],
- task_name=task_information['task_name'],
- )
-
- if must_exist and created:
- task_information['debug'] = "build id %d, recipe id %d" % (task_information['build'].pk, task_information['recipe'].pk)
- task_object.delete()
- raise NotExisting("Task object created when expected to exist", task_information)
+ # we use must_exist info for database look-up optimization
+ task_object, created = self._cached_get_or_create(Task,
+ build=task_information['build'],
+ recipe=task_information['recipe'],
+ task_name=task_information['task_name']
+ )
+ if created and must_exist:
+ task_information['debug'] = "build id %d, recipe id %d" % (task_information['build'].pk, task_information['recipe'].pk)
+ raise NotExisting("Task object created when expected to exist", task_information)
+ object_changed = False
for v in vars(task_object):
if v in task_information.keys():
- vars(task_object)[v] = task_information[v]
+ if vars(task_object)[v] != task_information[v]:
+ vars(task_object)[v] = task_information[v]
+ object_changed = True
- # update setscene-related information
- if 1 == Task.objects.related_setscene(task_object).count():
- if task_object.outcome == Task.OUTCOME_COVERED:
- task_object.outcome = Task.OUTCOME_CACHED
+ # update setscene-related information if the task was just created
+ if created and task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.related_setscene(task_object).count():
+ task_object.outcome = Task.OUTCOME_CACHED
+ object_changed = True
outcome_task_setscene = Task.objects.get(task_executed=True, build = task_object.build,
recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").outcome
if outcome_task_setscene == Task.OUTCOME_SUCCESS:
task_object.sstate_result = Task.SSTATE_RESTORED
+ object_changed = True
elif outcome_task_setscene == Task.OUTCOME_FAILED:
task_object.sstate_result = Task.SSTATE_FAILED
+ object_changed = True
# mark down duration if we have a start time and a current time
if 'start_time' in task_information.keys() and 'end_time' in task_information.keys():
duration = task_information['end_time'] - task_information['start_time']
task_object.elapsed_time = duration
+ object_changed = True
+ del task_information['start_time']
+ del task_information['end_time']
- task_object.save()
+ if object_changed:
+ task_object.save()
return task_object
@@ -146,20 +220,19 @@ class ORMWrapper(object):
assert 'layer_version' in recipe_information
assert 'file_path' in recipe_information
-
- recipe_object, created = Recipe.objects.get_or_create(
- layer_version=recipe_information['layer_version'],
- file_path=recipe_information['file_path'])
-
- if must_exist and created:
- recipe_object.delete()
+ recipe_object, created = self._cached_get_or_create(Recipe, layer_version=recipe_information['layer_version'],
+ file_path=recipe_information['file_path'])
+ if created and must_exist:
raise NotExisting("Recipe object created when expected to exist", recipe_information)
+ object_changed = False
for v in vars(recipe_object):
if v in recipe_information.keys():
+ object_changed = True
vars(recipe_object)[v] = recipe_information[v]
- recipe_object.save()
+ if object_changed:
+ recipe_object.save()
return recipe_object
@@ -178,19 +251,34 @@ class ORMWrapper(object):
priority = layer_version_information['priority']
)
+ self.layer_version_objects.append(layer_version_object)
+
return layer_version_object
- def get_update_layer_object(self, layer_information):
+ def get_update_layer_object(self, layer_information, brbe):
assert 'name' in layer_information
assert 'local_path' in layer_information
assert 'layer_index_url' in layer_information
- layer_object, created = Layer.objects.get_or_create(
+ if brbe is None:
+ layer_object, created = Layer.objects.get_or_create(
name=layer_information['name'],
local_path=layer_information['local_path'],
layer_index_url=layer_information['layer_index_url'])
+ return layer_object
+ else:
+ # we are under managed mode; we must match the layer used in the Project Layer
+ from bldcontrol.models import BuildEnvironment, BuildRequest
+ br, be = brbe.split(":")
+
+ buildrequest = BuildRequest.objects.get(pk = br)
+
+ # we might have a race condition here, as the project layers may change between the build trigger and the actual build execution
+ # but we can only match on the layer name, so the worst thing can happen is a mis-identification of the layer, not a total failure
+ layer_object = buildrequest.project.projectlayer_set.get(layercommit__layer__name=layer_information['name']).layercommit.layer
+
+ return layer_object
- return layer_object
def save_target_file_information(self, build_obj, target_obj, filedata):
assert isinstance(build_obj, Build)
@@ -222,7 +310,7 @@ class ORMWrapper(object):
parent_path = "/".join(path.split("/")[:len(path.split("/")) - 1])
if len(parent_path) == 0:
parent_path = "/"
- parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
+ parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
tf_obj = Target_File.objects.create(
target = target_obj,
path = path,
@@ -256,7 +344,7 @@ class ORMWrapper(object):
permission = permission,
owner = user,
group = group)
- parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
+ parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
tf_obj.directory = parent_obj
tf_obj.save()
@@ -311,8 +399,7 @@ class ORMWrapper(object):
searchname = pkgpnmap[p]['OPKGN']
packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
- if created:
- # package was not build in the current build, but
+ if created or packagedict[p]['object'].size == -1: # save the data anyway we can, not just if it was not created here; bug [YOCTO #6887]
# fill in everything we can from the runtime-reverse package data
try:
packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']]
@@ -326,11 +413,14 @@ class ORMWrapper(object):
packagedict[p]['object'].size = int(pkgpnmap[p]['PKGSIZE'])
# no files recorded for this package, so save files info
+ packagefile_objects = []
for targetpath in pkgpnmap[p]['FILES_INFO']:
targetfilesize = pkgpnmap[p]['FILES_INFO'][targetpath]
- Package_File.objects.create( package = packagedict[p]['object'],
+ packagefile_objects.append(Package_File( package = packagedict[p]['object'],
path = targetpath,
- size = targetfilesize)
+ size = targetfilesize))
+ if len(packagefile_objects):
+ Package_File.objects.bulk_create(packagefile_objects)
except KeyError as e:
errormsg += " stpi: Key error, package %s key %s \n" % ( p, e )
@@ -340,6 +430,7 @@ class ORMWrapper(object):
Target_Installed_Package.objects.create(target = target_obj, package = packagedict[p]['object'])
+ packagedeps_objs = []
for p in packagedict:
for (px,deptype) in packagedict[p]['depends']:
if deptype == 'depends':
@@ -347,10 +438,13 @@ class ORMWrapper(object):
elif deptype == 'recommends':
tdeptype = Package_Dependency.TYPE_TRECOMMENDS
- Package_Dependency.objects.create( package = packagedict[p]['object'],
+ packagedeps_objs.append(Package_Dependency( package = packagedict[p]['object'],
depends_on = packagedict[px]['object'],
dep_type = tdeptype,
- target = target_obj);
+ target = target_obj))
+
+ if len(packagedeps_objs) > 0:
+ Package_Dependency.objects.bulk_create(packagedeps_objs)
if (len(errormsg) > 0):
raise Exception(errormsg)
@@ -359,7 +453,17 @@ class ORMWrapper(object):
target_image_file = Target_Image_File.objects.create( target = target_obj,
file_name = file_name,
file_size = file_size)
- target_image_file.save()
+
+ def save_artifact_information(self, build_obj, file_name, file_size):
+ # we skip the image files from other builds
+ if Target_Image_File.objects.filter(file_name = file_name).count() > 0:
+ return
+
+ # do not update artifacts found in other builds
+ if BuildArtifact.objects.filter(file_name = file_name).count() > 0:
+ return
+
+ BuildArtifact.objects.create(build = build_obj, file_name = file_name, file_size = file_size)
def create_logmessage(self, log_information):
assert 'build' in log_information
@@ -401,10 +505,13 @@ class ORMWrapper(object):
bp_object.save()
# save any attached file information
+ packagefile_objects = []
for path in package_info['FILES_INFO']:
- fo = Package_File.objects.create( package = bp_object,
+ packagefile_objects.append(Package_File( package = bp_object,
path = path,
- size = package_info['FILES_INFO'][path] )
+ size = package_info['FILES_INFO'][path] ))
+ if len(packagefile_objects):
+ Package_File.objects.bulk_create(packagefile_objects)
def _po_byname(p):
pkg, created = Package.objects.get_or_create(build = build_obj, name = p)
@@ -413,39 +520,44 @@ class ORMWrapper(object):
pkg.save()
return pkg
+ packagedeps_objs = []
# save soft dependency information
if 'RDEPENDS' in package_info and package_info['RDEPENDS']:
for p in bb.utils.explode_deps(package_info['RDEPENDS']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RDEPENDS)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RDEPENDS))
if 'RPROVIDES' in package_info and package_info['RPROVIDES']:
for p in bb.utils.explode_deps(package_info['RPROVIDES']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RPROVIDES)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RPROVIDES))
if 'RRECOMMENDS' in package_info and package_info['RRECOMMENDS']:
for p in bb.utils.explode_deps(package_info['RRECOMMENDS']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RRECOMMENDS)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RRECOMMENDS))
if 'RSUGGESTS' in package_info and package_info['RSUGGESTS']:
for p in bb.utils.explode_deps(package_info['RSUGGESTS']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RSUGGESTS)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RSUGGESTS))
if 'RREPLACES' in package_info and package_info['RREPLACES']:
for p in bb.utils.explode_deps(package_info['RREPLACES']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RREPLACES)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RREPLACES))
if 'RCONFLICTS' in package_info and package_info['RCONFLICTS']:
for p in bb.utils.explode_deps(package_info['RCONFLICTS']):
- Package_Dependency.objects.get_or_create( package = bp_object,
- depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RCONFLICTS)
+ packagedeps_objs.append(Package_Dependency( package = bp_object,
+ depends_on = _po_byname(p), dep_type = Package_Dependency.TYPE_RCONFLICTS))
+
+ if len(packagedeps_objs) > 0:
+ Package_Dependency.objects.bulk_create(packagedeps_objs)
return bp_object
def save_build_variables(self, build_obj, vardump):
assert isinstance(build_obj, Build)
+ helptext_objects = []
for k in vardump:
- desc = vardump[k]['doc'];
+ desc = vardump[k]['doc']
if desc is None:
var_words = [word for word in k.split('_')]
root_var = "_".join([word for word in var_words if word.isupper()])
@@ -453,25 +565,33 @@ class ORMWrapper(object):
desc = vardump[root_var]['doc']
if desc is None:
desc = ''
- if desc:
- helptext_obj = HelpText.objects.create(build=build_obj,
+ if len(desc):
+ helptext_objects.append(HelpText(build=build_obj,
area=HelpText.VARIABLE,
key=k,
- text=desc)
+ text=desc))
if not bool(vardump[k]['func']):
- value = vardump[k]['v'];
+ value = vardump[k]['v']
if value is None:
value = ''
variable_obj = Variable.objects.create( build = build_obj,
variable_name = k,
variable_value = value,
description = desc)
+
+ varhist_objects = []
for vh in vardump[k]['history']:
if not 'documentation.conf' in vh['file']:
- VariableHistory.objects.create( variable = variable_obj,
+ varhist_objects.append(VariableHistory( variable = variable_obj,
file_name = vh['file'],
line_number = vh['line'],
- operation = vh['op'])
+ operation = vh['op']))
+ if len(varhist_objects):
+ VariableHistory.objects.bulk_create(varhist_objects)
+
+ HelpText.objects.bulk_create(helptext_objects)
+
+class MockEvent: pass # sometimes we mock an event, declare it here
class BuildInfoHelper(object):
""" This class gathers the build information from the server and sends it
@@ -480,6 +600,7 @@ class BuildInfoHelper(object):
Keeps in memory all data that needs matching before writing it to the database
"""
+
def __init__(self, server, has_build_history = False):
self._configure_django()
self.internal_state = {}
@@ -489,6 +610,9 @@ class BuildInfoHelper(object):
self.orm_wrapper = ORMWrapper()
self.has_build_history = has_build_history
self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
+ self.brbe = self.server.runCommand(["getVariable", "TOASTER_BRBE"])[0]
+ logger.debug(1, "buildinfohelper: Build info helper inited %s" % vars(self))
+
def _configure_django(self):
# Add toaster to sys path for importing modules
@@ -538,13 +662,15 @@ class BuildInfoHelper(object):
# Heuristics: we always match recipe to the deepest layer path that
# we can match to the recipe file path
- for bl in sorted(Layer_Version.objects.filter(build = self.internal_state['build']), reverse=True, key=_slkey):
+ for bl in sorted(self.orm_wrapper.layer_version_objects, reverse=True, key=_slkey):
if (path.startswith(bl.layer.local_path)):
return bl
- #TODO: if we get here, we didn't read layers correctly
- assert False
- return None
+ #if we get here, we didn't read layers correctly; mockup the new layer
+ unknown_layer, created = Layer.objects.get_or_create(name="unknown", local_path="/", layer_index_url="")
+ unknown_layer_version_obj, created = Layer_Version.objects.get_or_create(layer = unknown_layer, build = self.internal_state['build'])
+
+ return unknown_layer_version_obj
def _get_recipe_information_from_taskfile(self, taskfile):
localfilepath = taskfile.split(":")[-1]
@@ -587,27 +713,40 @@ class BuildInfoHelper(object):
################################
## external available methods to store information
+ @staticmethod
+ def _get_data_from_event(event):
+ evdata = None
+ if '_localdata' in vars(event):
+ evdata = event._localdata
+ elif 'data' in vars(event):
+ evdata = event.data
+ else:
+ raise Exception("Event with neither _localdata or data properties")
+ return evdata
def store_layer_info(self, event):
- assert 'data' in vars(event)
- layerinfos = event.data
+ layerinfos = BuildInfoHelper._get_data_from_event(event)
self.internal_state['lvs'] = {}
for layer in layerinfos:
- self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer])] = layerinfos[layer]['version']
+ self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)] = layerinfos[layer]['version']
def store_started_build(self, event):
assert '_pkgs' in vars(event)
build_information = self._get_build_information()
- build_obj = self.orm_wrapper.create_build_object(build_information)
+ build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe)
+
self.internal_state['build'] = build_obj
# save layer version information for this build
- for layer_obj in self.internal_state['lvs']:
- self.orm_wrapper.get_update_layer_version_object(build_obj, layer_obj, self.internal_state['lvs'][layer_obj])
+ if not 'lvs' in self.internal_state:
+ logger.error("Layer version information not found; Check if the bitbake server was configured to inherit toaster.bbclass.")
+ else:
+ for layer_obj in self.internal_state['lvs']:
+ self.orm_wrapper.get_update_layer_version_object(build_obj, layer_obj, self.internal_state['lvs'][layer_obj])
- del self.internal_state['lvs']
+ del self.internal_state['lvs']
# create target information
target_information = {}
@@ -617,16 +756,27 @@ class BuildInfoHelper(object):
self.internal_state['targets'] = self.orm_wrapper.create_target_objects(target_information)
# Save build configuration
- self.orm_wrapper.save_build_variables(build_obj, self.server.runCommand(["getAllKeysWithFlags", ["doc", "func"]])[0])
+ data = self.server.runCommand(["getAllKeysWithFlags", ["doc", "func"]])[0]
+ self.orm_wrapper.save_build_variables(build_obj, data)
+
+ return self.brbe
+
def update_target_image_file(self, event):
image_fstypes = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"])[0]
+ evdata = BuildInfoHelper._get_data_from_event(event)
+
for t in self.internal_state['targets']:
if t.is_image == True:
- output_files = list(event.data.viewkeys())
+ output_files = list(evdata.viewkeys())
for output in output_files:
- if t.target in output and output.split('.rootfs.')[1] in image_fstypes:
- self.orm_wrapper.save_target_image_file_information(t, output, event.data[output])
+ if t.target in output and 'rootfs' in output and not output.endswith(".manifest"):
+ self.orm_wrapper.save_target_image_file_information(t, output, evdata[output])
+
+ def update_artifact_image_file(self, event):
+ evdata = BuildInfoHelper._get_data_from_event(event)
+ for artifact_path in evdata.keys():
+ self.orm_wrapper.save_artifact_information(self.internal_state['build'], artifact_path, evdata[artifact_path])
def update_build_information(self, event, errors, warnings, taskfailures):
if 'build' in self.internal_state:
@@ -634,12 +784,12 @@ class BuildInfoHelper(object):
def store_license_manifest_path(self, event):
- deploy_dir = event.data['deploy_dir']
- image_name = event.data['image_name']
- path = deploy_dir + "/licenses/" + image_name + "/"
+ deploy_dir = BuildInfoHelper._get_data_from_event(event)['deploy_dir']
+ image_name = BuildInfoHelper._get_data_from_event(event)['image_name']
+ path = deploy_dir + "/licenses/" + image_name + "/license.manifest"
for target in self.internal_state['targets']:
if target.target in image_name:
- self.orm_wrapper.update_target_object(target, path)
+ self.orm_wrapper.update_target_set_license_manifest(target, path)
def store_started_task(self, event):
@@ -683,7 +833,7 @@ class BuildInfoHelper(object):
def store_tasks_stats(self, event):
- for (taskfile, taskname, taskstats, recipename) in event.data:
+ for (taskfile, taskname, taskstats, recipename) in BuildInfoHelper._get_data_from_event(event):
localfilepath = taskfile.split(":")[-1]
assert localfilepath.startswith("/")
@@ -698,6 +848,8 @@ class BuildInfoHelper(object):
task_information['task_name'] = taskname
task_information['cpu_usage'] = taskstats['cpu_usage']
task_information['disk_io'] = taskstats['disk_io']
+ if 'elapsed_time' in taskstats:
+ task_information['elapsed_time'] = taskstats['elapsed_time']
task_obj = self.orm_wrapper.get_update_task_object(task_information, True) # must exist
def update_and_store_task(self, event):
@@ -755,12 +907,11 @@ class BuildInfoHelper(object):
def store_missed_state_tasks(self, event):
- for (fn, taskname, taskhash, sstatefile) in event.data['missed']:
+ for (fn, taskname, taskhash, sstatefile) in BuildInfoHelper._get_data_from_event(event)['missed']:
identifier = fn + taskname + "_setscene"
recipe_information = self._get_recipe_information_from_taskfile(fn)
recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
- class MockEvent: pass
mevent = MockEvent()
mevent.taskname = taskname
mevent.taskhash = taskhash
@@ -774,12 +925,11 @@ class BuildInfoHelper(object):
self.orm_wrapper.get_update_task_object(task_information)
- for (fn, taskname, taskhash, sstatefile) in event.data['found']:
+ for (fn, taskname, taskhash, sstatefile) in BuildInfoHelper._get_data_from_event(event)['found']:
identifier = fn + taskname + "_setscene"
recipe_information = self._get_recipe_information_from_taskfile(fn)
recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
- class MockEvent: pass
mevent = MockEvent()
mevent.taskname = taskname
mevent.taskhash = taskhash
@@ -791,15 +941,14 @@ class BuildInfoHelper(object):
def store_target_package_data(self, event):
- assert 'data' in vars(event)
# for all image targets
for target in self.internal_state['targets']:
if target.is_image:
try:
- pkgdata = event.data['pkgdata']
- imgdata = event.data['imgdata'][target.target]
+ pkgdata = BuildInfoHelper._get_data_from_event(event)['pkgdata']
+ imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target]
self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'])
- filedata = event.data['filedata'][target.target]
+ filedata = BuildInfoHelper._get_data_from_event(event)['filedata'][target.target]
self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata)
except KeyError:
# we must have not got the data for this image, nothing to save
@@ -835,14 +984,29 @@ class BuildInfoHelper(object):
recipe_info = {}
recipe_info['name'] = pn
- recipe_info['version'] = event._depgraph['pn'][pn]['version'].lstrip(":")
recipe_info['layer_version'] = layer_version_obj
- recipe_info['summary'] = event._depgraph['pn'][pn]['summary']
- recipe_info['license'] = event._depgraph['pn'][pn]['license']
- recipe_info['description'] = event._depgraph['pn'][pn]['description']
- recipe_info['section'] = event._depgraph['pn'][pn]['section']
- recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage']
- recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
+
+ if 'version' in event._depgraph['pn'][pn]:
+ recipe_info['version'] = event._depgraph['pn'][pn]['version'].lstrip(":")
+
+ if 'summary' in event._depgraph['pn'][pn]:
+ recipe_info['summary'] = event._depgraph['pn'][pn]['summary']
+
+ if 'license' in event._depgraph['pn'][pn]:
+ recipe_info['license'] = event._depgraph['pn'][pn]['license']
+
+ if 'description' in event._depgraph['pn'][pn]:
+ recipe_info['description'] = event._depgraph['pn'][pn]['description']
+
+ if 'section' in event._depgraph['pn'][pn]:
+ recipe_info['section'] = event._depgraph['pn'][pn]['section']
+
+ if 'homepage' in event._depgraph['pn'][pn]:
+ recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage']
+
+ if 'bugtracker' in event._depgraph['pn'][pn]:
+ recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
+
recipe_info['file_path'] = file_name
recipe = self.orm_wrapper.get_update_recipe_object(recipe_info)
recipe.is_image = False
@@ -864,20 +1028,22 @@ class BuildInfoHelper(object):
# save recipe dependency
# buildtime
+ recipedeps_objects = []
for recipe in event._depgraph['depends']:
try:
target = self.internal_state['recipes'][recipe]
for dep in event._depgraph['depends'][recipe]:
dependency = self.internal_state['recipes'][dep]
- Recipe_Dependency.objects.get_or_create( recipe = target,
- depends_on = dependency, dep_type = Recipe_Dependency.TYPE_DEPENDS)
+ recipedeps_objects.append(Recipe_Dependency( recipe = target,
+ depends_on = dependency, dep_type = Recipe_Dependency.TYPE_DEPENDS))
except KeyError as e:
if e not in assume_provided and not str(e).startswith("virtual/"):
errormsg += " stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, e)
+ Recipe_Dependency.objects.bulk_create(recipedeps_objects)
# save all task information
def _save_a_task(taskdesc):
- spec = re.split(r'\.', taskdesc);
+ spec = re.split(r'\.', taskdesc)
pn = ".".join(spec[0:-1])
taskname = spec[-1]
e = event
@@ -894,6 +1060,7 @@ class BuildInfoHelper(object):
tasks[taskdesc] = _save_a_task(taskdesc)
# create dependencies between tasks
+ taskdeps_objects = []
for taskdesc in event._depgraph['tdepends']:
target = tasks[taskdesc]
for taskdep in event._depgraph['tdepends'][taskdesc]:
@@ -902,73 +1069,107 @@ class BuildInfoHelper(object):
dep = _save_a_task(taskdep)
else:
dep = tasks[taskdep]
- Task_Dependency.objects.get_or_create( task = target, depends_on = dep )
+ taskdeps_objects.append(Task_Dependency( task = target, depends_on = dep ))
+ Task_Dependency.objects.bulk_create(taskdeps_objects)
if (len(errormsg) > 0):
raise Exception(errormsg)
def store_build_package_information(self, event):
- assert 'data' in vars(event)
- package_info = event.data
+ package_info = BuildInfoHelper._get_data_from_event(event)
self.orm_wrapper.save_build_package_information(self.internal_state['build'],
package_info,
self.internal_state['recipes'],
)
- def store_build_done(self, br_id, be_id):
+ def _store_build_done(self, errorcode):
+ br_id, be_id = self.brbe.split(":")
from bldcontrol.models import BuildEnvironment, BuildRequest
be = BuildEnvironment.objects.get(pk = be_id)
be.lock = BuildEnvironment.LOCK_LOCK
be.save()
br = BuildRequest.objects.get(pk = br_id)
- br.state = BuildRequest.REQ_COMPLETED
- br.build = self.internal_state['build']
+ if errorcode == 0:
+ br.state = BuildRequest.REQ_COMPLETED
+ else:
+ br.state = BuildRequest.REQ_FAILED
br.save()
- def _store_log_information(self, level, text):
- log_information = {}
- log_information['build'] = self.internal_state['build']
- log_information['level'] = level
- log_information['message'] = text
- self.orm_wrapper.create_logmessage(log_information)
-
- def store_log_info(self, text):
- self._store_log_information(LogMessage.INFO, text)
-
- def store_log_warn(self, text):
- self._store_log_information(LogMessage.WARNING, text)
def store_log_error(self, text):
- self._store_log_information(LogMessage.ERROR, text)
+ mockevent = MockEvent()
+ mockevent.levelno = format.ERROR
+ mockevent.msg = text
+ mockevent.pathname = '-- None'
+ mockevent.lineno = -1
+ self.store_log_event(mockevent)
+
+ def store_log_exception(self, text, backtrace = ""):
+ mockevent = MockEvent()
+ mockevent.levelno = -1
+ mockevent.msg = text
+ mockevent.pathname = backtrace
+ mockevent.lineno = -1
+ self.store_log_event(mockevent)
+
def store_log_event(self, event):
+ if event.levelno < format.WARNING:
+ return
+
+ if 'args' in vars(event):
+ event.msg = event.msg % event.args
+
+ if not 'build' in self.internal_state:
+ if self.brbe is None:
+ if not 'backlog' in self.internal_state:
+ self.internal_state['backlog'] = []
+ self.internal_state['backlog'].append(event)
+ else: # we're under Toaster control, post the errors to the build request
+ from bldcontrol.models import BuildRequest, BRError
+ br, be = self.brbe.split(":")
+ buildrequest = BuildRequest.objects.get(pk = br)
+ brerror = BRError.objects.create(req = buildrequest, errtype="build", errmsg = event.msg)
+
+ return
+
if 'build' in self.internal_state and 'backlog' in self.internal_state:
+ # if we have a backlog of events, do our best to save them here
if len(self.internal_state['backlog']):
tempevent = self.internal_state['backlog'].pop()
- print "Saving stored event ", tempevent
+ logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent)
self.store_log_event(tempevent)
else:
+ logger.error("buildinfohelper: Events not saved: %s" % self.internal_state['backlog'])
del self.internal_state['backlog']
- if event.levelno < format.WARNING:
- return
-
- if not 'build' in self.internal_state:
- print "Save event for later"
- if not 'backlog' in self.internal_state:
- self.internal_state['backlog'] = []
- self.internal_state['backlog'].append(event)
-
- return
log_information = {}
log_information['build'] = self.internal_state['build']
- if event.levelno >= format.ERROR:
+ if event.levelno == format.ERROR:
log_information['level'] = LogMessage.ERROR
elif event.levelno == format.WARNING:
log_information['level'] = LogMessage.WARNING
+ elif event.levelno == -1: # toaster self-logging
+ log_information['level'] = -1
+ else:
+ log_information['level'] = LogMessage.INFO
+
log_information['message'] = event.msg
log_information['pathname'] = event.pathname
log_information['lineno'] = event.lineno
self.orm_wrapper.create_logmessage(log_information)
+ def close(self, errorcode):
+ if self.brbe is not None:
+ self._store_build_done(errorcode)
+
+ if 'backlog' in self.internal_state:
+ if 'build' in self.internal_state:
+ # we save missed events in the database for the current build
+ tempevent = self.internal_state['backlog'].pop()
+ self.store_log_event(tempevent)
+ else:
+ # we have no build, and we still have events; something amazingly wrong happend
+ for event in self.internal_state['backlog']:
+ logger.error("UNSAVED log: %s", event.msg)
diff --git a/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py b/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py
index ab5b614c8d..b5eb3d8738 100644
--- a/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py
+++ b/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py
@@ -230,10 +230,7 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
self.configuration.sstatemirror = ""
for mirror in self.sstatemirrors_list:
if mirror[1] != "" and mirror[2].startswith("file://"):
- if mirror[1].endswith("\\1"):
- smirror = mirror[2] + " " + mirror[1] + " \\n "
- else:
- smirror = mirror[2] + " " + mirror[1] + "\\1 \\n "
+ smirror = mirror[2] + " " + mirror[1] + " \\n "
self.configuration.sstatemirror += smirror
self.configuration.bbthread = self.bb_spinner.get_value_as_int()
self.configuration.pmake = self.pmake_spinner.get_value_as_int()
diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index 4578dce615..0c71a3ebd2 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -198,7 +198,7 @@ def main(server, eventHandler, params):
print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
return 1
if 'msg' in cmdline and cmdline['msg']:
- logger.error(cmdline['msg'])
+ print(cmdline['msg'])
return 1
cmdline = cmdline['action']
if not cmdline or cmdline[0] != "generateDotGraph":
@@ -236,7 +236,7 @@ def main(server, eventHandler, params):
try:
event = eventHandler.waitEvent(0.25)
if gtkthread.quit.isSet():
- _, error = server.runCommand(["stateStop"])
+ _, error = server.runCommand(["stateForceShutdown"])
if error:
print('Unable to cleanly stop: %s' % error)
break
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 77a708258a..ea20ddc7e0 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -284,6 +284,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if not params.observe_only:
params.updateFromServer(server)
+ params.updateToServer(server, os.environ.copy())
cmdline = params.parseActions()
if not cmdline:
print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
@@ -321,8 +322,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
break
termfilter.updateFooter()
event = eventHandler.waitEvent(0.25)
- if event is None:
- continue
+ if event is None:
+ continue
helper.eventHandler(event)
if isinstance(event, bb.runqueue.runQueueExitWait):
if not main.shutdown:
@@ -507,7 +508,11 @@ def main(server, eventHandler, params, tf = TerminalFilter):
termfilter.clearFooter()
# ignore interrupted io
if ioerror.args[0] == 4:
- pass
+ continue
+ sys.stderr.write(str(ioerror))
+ if not params.observe_only:
+ _, error = server.runCommand(["stateForceShutdown"])
+ main.shutdown = 2
except KeyboardInterrupt:
termfilter.clearFooter()
if params.observe_only:
@@ -526,7 +531,11 @@ def main(server, eventHandler, params, tf = TerminalFilter):
logger.error("Unable to cleanly shutdown: %s" % error)
main.shutdown = main.shutdown + 1
pass
-
+ except Exception as e:
+ sys.stderr.write(str(e))
+ if not params.observe_only:
+ _, error = server.runCommand(["stateForceShutdown"])
+ main.shutdown = 2
summary = ""
if taskfailures:
summary += pluralise("\nSummary: %s task failed:",
diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py
index b6c20ec388..9589a77d75 100644
--- a/bitbake/lib/bb/ui/ncurses.py
+++ b/bitbake/lib/bb/ui/ncurses.py
@@ -361,13 +361,13 @@ class NCursesUI:
shutdown = shutdown + 1
pass
-def main(server, eventHandler):
+def main(server, eventHandler, params):
if not os.isatty(sys.stdout.fileno()):
print("FATAL: Unable to run 'ncurses' UI without a TTY.")
return
ui = NCursesUI()
try:
- curses.wrapper(ui.main, server, eventHandler)
+ curses.wrapper(ui.main, server, eventHandler, params)
except:
import traceback
traceback.print_exc()
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index b1c80cc822..a85ad5a06a 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -62,15 +62,6 @@ def _log_settings_from_server(server):
def main(server, eventHandler, params ):
- includelogs, loglines = _log_settings_from_server(server)
-
- # verify and warn
- build_history_enabled = True
- inheritlist, error = server.runCommand(["getVariable", "INHERIT"])
- if not "buildhistory" in inheritlist.split(" "):
- logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
- build_history_enabled = False
-
helper = uihelper.BBUIHelper()
console = logging.StreamHandler(sys.stdout)
@@ -80,6 +71,16 @@ def main(server, eventHandler, params ):
console.setFormatter(format)
logger.addHandler(console)
+ includelogs, loglines = _log_settings_from_server(server)
+
+ # verify and warn
+ build_history_enabled = True
+ inheritlist, error = server.runCommand(["getVariable", "INHERIT"])
+
+ if not "buildhistory" in inheritlist.split(" "):
+ logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
+ build_history_enabled = False
+
if not params.observe_only:
logger.error("ToasterUI can only work in observer mode")
return
@@ -91,13 +92,16 @@ def main(server, eventHandler, params ):
errors = 0
warnings = 0
taskfailures = []
+ first = True
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
-
while True:
try:
event = eventHandler.waitEvent(0.25)
+ if first:
+ first = False
+ logger.info("ToasterUI waiting for events")
if event is None:
if main.shutdown > 0:
@@ -216,27 +220,28 @@ def main(server, eventHandler, params ):
if isinstance(event, (bb.command.CommandCompleted,
bb.command.CommandFailed,
bb.command.CommandExit)):
+ errorcode = 0
if (isinstance(event, bb.command.CommandFailed)):
event.levelno = format.ERROR
- event.msg = event.error
+ event.msg = "Command Failed " + event.error
event.pathname = ""
event.lineno = 0
buildinfohelper.store_log_event(event)
errors += 1
+ errorcode = 1
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
+ buildinfohelper.close(errorcode)
+ # mark the log output; controllers may kill the toasterUI after seeing this log
+ logger.info("ToasterUI build done")
-
- brbe = server.runCommand(["getVariable", "TOASTER_BRBE"])[0]
- br_id, be_id = brbe.split(":")
# we start a new build info
- if brbe is not None:
- buildinfohelper.store_build_done(br_id, be_id)
+ if buildinfohelper.brbe is not None:
- print "we are under BuildEnvironment management - after the build, we exit"
+ logger.debug(1, "ToasterUI under BuildEnvironment management - exiting after the build")
server.terminateServer()
else:
- print "prepared for new build"
+ logger.debug(1, "ToasterUI prepared for new build")
errors = 0
warnings = 0
taskfailures = []
@@ -257,8 +262,12 @@ def main(server, eventHandler, params ):
buildinfohelper.store_missed_state_tasks(event)
elif event.type == "ImageFileSize":
buildinfohelper.update_target_image_file(event)
+ elif event.type == "ArtifactFileSize":
+ buildinfohelper.update_artifact_image_file(event)
elif event.type == "LicenseManifestPath":
buildinfohelper.store_license_manifest_path(event)
+ else:
+ logger.error("Unprocessed MetadataEvent %s " % str(event))
continue
if isinstance(event, bb.cooker.CookerExit):
@@ -291,9 +300,17 @@ def main(server, eventHandler, params ):
main.shutdown = 1
pass
except Exception as e:
- logger.error(e)
+ # print errors to log
import traceback
- traceback.print_exc()
+ exception_data = traceback.format_exc()
+ logger.error("%s\n%s" % (e, exception_data))
+
+ # save them to database, if possible; if it fails, we already logged to console.
+ try:
+ buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data))
+ except Exception as ce:
+ logger.error("CRITICAL - Failed to to save toaster exception to the database: %s" % str(ce))
+
pass
if interrupted:
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index f62709bed5..90090b2fe3 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -264,7 +264,7 @@ def _print_trace(body, line):
def better_compile(text, file, realfile, mode = "exec"):
"""
A better compile method. This method
- will print the offending lines.
+ will print the offending lines.
"""
try:
return compile(text, file, mode)
@@ -522,7 +522,7 @@ def filter_environment(good_vars):
os.unsetenv(key)
del os.environ[key]
- if len(removed_vars):
+ if removed_vars:
logger.debug(1, "Removed the following variables from the environment: %s", ", ".join(removed_vars.keys()))
return removed_vars
@@ -530,7 +530,7 @@ def filter_environment(good_vars):
def approved_variables():
"""
Determine and return the list of whitelisted variables which are approved
- to remain in the envrionment.
+ to remain in the environment.
"""
if 'BB_PRESERVE_ENV' in os.environ:
return os.environ.keys()
@@ -862,21 +862,16 @@ def nonblockingfd(fd):
fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
def process_profilelog(fn):
- # Redirect stdout to capture profile information
pout = open(fn + '.processed', 'w')
- so = sys.stdout.fileno()
- orig_so = os.dup(sys.stdout.fileno())
- os.dup2(pout.fileno(), so)
import pstats
- p = pstats.Stats(fn)
+ p = pstats.Stats(fn, stream=pout)
p.sort_stats('time')
p.print_stats()
p.print_callers()
p.sort_stats('cumulative')
p.print_stats()
- os.dup2(orig_so, so)
pout.flush()
pout.close()
@@ -884,5 +879,174 @@ def process_profilelog(fn):
# Was present to work around multiprocessing pool bugs in python < 2.7.3
#
def multiprocessingpool(*args, **kwargs):
+
+ import multiprocessing.pool
+ #import multiprocessing.util
+ #multiprocessing.util.log_to_stderr(10)
+ # Deal with a multiprocessing bug where signals to the processes would be delayed until the work
+ # completes. Putting in a timeout means the signals (like SIGINT/SIGTERM) get processed.
+ def wrapper(func):
+ def wrap(self, timeout=None):
+ return func(self, timeout=timeout if timeout is not None else 1e100)
+ return wrap
+ multiprocessing.pool.IMapIterator.next = wrapper(multiprocessing.pool.IMapIterator.next)
+
return multiprocessing.Pool(*args, **kwargs)
+def exec_flat_python_func(func, *args, **kwargs):
+ """Execute a flat python function (defined with def funcname(args):...)"""
+ # Prepare a small piece of python code which calls the requested function
+ # To do this we need to prepare two things - a set of variables we can use to pass
+ # the values of arguments into the calling function, and the list of arguments for
+ # the function being called
+ context = {}
+ funcargs = []
+ # Handle unnamed arguments
+ aidx = 1
+ for arg in args:
+ argname = 'arg_%s' % aidx
+ context[argname] = arg
+ funcargs.append(argname)
+ aidx += 1
+ # Handle keyword arguments
+ context.update(kwargs)
+ funcargs.extend(['%s=%s' % (arg, arg) for arg in kwargs.iterkeys()])
+ code = 'retval = %s(%s)' % (func, ', '.join(funcargs))
+ comp = bb.utils.better_compile(code, '<string>', '<string>')
+ bb.utils.better_exec(comp, context, code, '<string>')
+ return context['retval']
+
+def edit_metadata_file(meta_file, variables, func):
+ """Edit a recipe or config file and modify one or more specified
+ variable values set in the file using a specified callback function.
+ The file is only written to if the value(s) actually change.
+ """
+ var_res = {}
+ for var in variables:
+ var_res[var] = re.compile(r'^%s[ \t]*[?+]*=' % var)
+
+ updated = False
+ varset_start = ''
+ newlines = []
+ in_var = None
+ full_value = ''
+
+ def handle_var_end():
+ (newvalue, indent, minbreak) = func(in_var, full_value)
+ if newvalue != full_value:
+ if isinstance(newvalue, list):
+ intentspc = ' ' * indent
+ if minbreak:
+ # First item on first line
+ if len(newvalue) == 1:
+ newlines.append('%s "%s"\n' % (varset_start, newvalue[0]))
+ else:
+ newlines.append('%s "%s\\\n' % (varset_start, newvalue[0]))
+ for item in newvalue[1:]:
+ newlines.append('%s%s \\\n' % (intentspc, item))
+ newlines.append('%s"\n' % indentspc)
+ else:
+ # No item on first line
+ newlines.append('%s " \\\n' % varset_start)
+ for item in newvalue:
+ newlines.append('%s%s \\\n' % (intentspc, item))
+ newlines.append('%s"\n' % intentspc)
+ else:
+ newlines.append('%s "%s"\n' % (varset_start, newvalue))
+ return True
+ return False
+
+ with open(meta_file, 'r') as f:
+ for line in f:
+ if in_var:
+ value = line.rstrip()
+ full_value += value[:-1]
+ if value.endswith('"') or value.endswith("'"):
+ if handle_var_end():
+ updated = True
+ in_var = None
+ else:
+ matched = False
+ for (varname, var_re) in var_res.iteritems():
+ if var_re.match(line):
+ splitvalue = line.split('"', 1)
+ varset_start = splitvalue[0].rstrip()
+ value = splitvalue[1].rstrip()
+ if value.endswith('\\'):
+ value = value[:-1]
+ full_value = value
+ if value.endswith('"') or value.endswith("'"):
+ if handle_var_end():
+ updated = True
+ else:
+ in_var = varname
+ matched = True
+ break
+ if not matched:
+ newlines.append(line)
+ if updated:
+ with open(meta_file, 'w') as f:
+ f.writelines(newlines)
+
+def edit_bblayers_conf(bblayers_conf, add, remove):
+ """Edit bblayers.conf, adding and/or removing layers"""
+
+ import fnmatch
+
+ def remove_trailing_sep(pth):
+ if pth and pth[-1] == os.sep:
+ pth = pth[:-1]
+ return pth
+
+ def layerlist_param(value):
+ if not value:
+ return []
+ elif isinstance(value, list):
+ return [remove_trailing_sep(x) for x in value]
+ else:
+ return [remove_trailing_sep(value)]
+
+ notadded = []
+ notremoved = []
+
+ addlayers = layerlist_param(add)
+ removelayers = layerlist_param(remove)
+
+ # Need to use a list here because we can't set non-local variables from a callback in python 2.x
+ bblayercalls = []
+
+ def handle_bblayers(varname, origvalue):
+ bblayercalls.append(varname)
+ updated = False
+ bblayers = [remove_trailing_sep(x) for x in origvalue.split()]
+ if removelayers:
+ for removelayer in removelayers:
+ matched = False
+ for layer in bblayers:
+ if fnmatch.fnmatch(layer, removelayer):
+ updated = True
+ matched = True
+ bblayers.remove(layer)
+ break
+ if not matched:
+ notremoved.append(removelayer)
+ if addlayers:
+ for addlayer in addlayers:
+ if addlayer not in bblayers:
+ updated = True
+ bblayers.append(addlayer)
+ else:
+ notadded.append(addlayer)
+
+ if updated:
+ return (bblayers, 2, False)
+ else:
+ return (origvalue, 2, False)
+
+ edit_metadata_file(bblayers_conf, ['BBLAYERS'], handle_bblayers)
+
+ if not bblayercalls:
+ raise Exception('Unable to find BBLAYERS in %s' % bblayers_conf)
+
+ return (notadded, notremoved)
+
diff --git a/bitbake/lib/bs4/AUTHORS.txt b/bitbake/lib/bs4/AUTHORS.txt
new file mode 100644
index 0000000000..2ac8fcc8cc
--- /dev/null
+++ b/bitbake/lib/bs4/AUTHORS.txt
@@ -0,0 +1,43 @@
+Behold, mortal, the origins of Beautiful Soup...
+================================================
+
+Leonard Richardson is the primary programmer.
+
+Aaron DeVore is awesome.
+
+Mark Pilgrim provided the encoding detection code that forms the base
+of UnicodeDammit.
+
+Thomas Kluyver and Ezio Melotti finished the work of getting Beautiful
+Soup 4 working under Python 3.
+
+Simon Willison wrote soupselect, which was used to make Beautiful Soup
+support CSS selectors.
+
+Sam Ruby helped with a lot of edge cases.
+
+Jonathan Ellis was awarded the prestigous Beau Potage D'Or for his
+work in solving the nestable tags conundrum.
+
+An incomplete list of people have contributed patches to Beautiful
+Soup:
+
+ Istvan Albert, Andrew Lin, Anthony Baxter, Andrew Boyko, Tony Chang,
+ Zephyr Fang, Fuzzy, Roman Gaufman, Yoni Gilad, Richie Hindle, Peteris
+ Krumins, Kent Johnson, Ben Last, Robert Leftwich, Staffan Malmgren,
+ Ksenia Marasanova, JP Moins, Adam Monsen, John Nagle, "Jon", Ed
+ Oskiewicz, Greg Phillips, Giles Radford, Arthur Rudolph, Marko
+ Samastur, Jouni Seppänen, Alexander Schmolck, Andy Theyers, Glyn
+ Webster, Paul Wright, Danny Yoo
+
+An incomplete list of people who made suggestions or found bugs or
+found ways to break Beautiful Soup:
+
+ Hanno Böck, Matteo Bertini, Chris Curvey, Simon Cusack, Bruce Eckel,
+ Matt Ernst, Michael Foord, Tom Harris, Bill de hOra, Donald Howes,
+ Matt Patterson, Scott Roberts, Steve Strassmann, Mike Williams,
+ warchild at redho dot com, Sami Kuisma, Carlos Rocha, Bob Hutchison,
+ Joren Mc, Michal Migurski, John Kleven, Tim Heaney, Tripp Lilley, Ed
+ Summers, Dennis Sutch, Chris Smith, Aaron Sweep^W Swartz, Stuart
+ Turner, Greg Edwards, Kevin J Kalupson, Nikos Kouremenos, Artur de
+ Sousa Rocha, Yichun Wei, Per Vognsen
diff --git a/bitbake/lib/bs4/COPYING.txt b/bitbake/lib/bs4/COPYING.txt
new file mode 100644
index 0000000000..d668d13f04
--- /dev/null
+++ b/bitbake/lib/bs4/COPYING.txt
@@ -0,0 +1,26 @@
+Beautiful Soup is made available under the MIT license:
+
+ Copyright (c) 2004-2012 Leonard Richardson
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE, DAMMIT.
+
+Beautiful Soup incorporates code from the html5lib library, which is
+also made available under the MIT license.
diff --git a/bitbake/lib/bs4/NEWS.txt b/bitbake/lib/bs4/NEWS.txt
new file mode 100644
index 0000000000..88a60a2458
--- /dev/null
+++ b/bitbake/lib/bs4/NEWS.txt
@@ -0,0 +1,1066 @@
+= 4.3.2 (20131002) =
+
+* Fixed a bug in which short Unicode input was improperly encoded to
+ ASCII when checking whether or not it was the name of a file on
+ disk. [bug=1227016]
+
+* Fixed a crash when a short input contains data not valid in
+ filenames. [bug=1232604]
+
+* Fixed a bug that caused Unicode data put into UnicodeDammit to
+ return None instead of the original data. [bug=1214983]
+
+* Combined two tests to stop a spurious test failure when tests are
+ run by nosetests. [bug=1212445]
+
+= 4.3.1 (20130815) =
+
+* Fixed yet another problem with the html5lib tree builder, caused by
+ html5lib's tendency to rearrange the tree during
+ parsing. [bug=1189267]
+
+* Fixed a bug that caused the optimized version of find_all() to
+ return nothing. [bug=1212655]
+
+= 4.3.0 (20130812) =
+
+* Instead of converting incoming data to Unicode and feeding it to the
+ lxml tree builder in chunks, Beautiful Soup now makes successive
+ guesses at the encoding of the incoming data, and tells lxml to
+ parse the data as that encoding. Giving lxml more control over the
+ parsing process improves performance and avoids a number of bugs and
+ issues with the lxml parser which had previously required elaborate
+ workarounds:
+
+ - An issue in which lxml refuses to parse Unicode strings on some
+ systems. [bug=1180527]
+
+ - A returning bug that truncated documents longer than a (very
+ small) size. [bug=963880]
+
+ - A returning bug in which extra spaces were added to a document if
+ the document defined a charset other than UTF-8. [bug=972466]
+
+ This required a major overhaul of the tree builder architecture. If
+ you wrote your own tree builder and didn't tell me, you'll need to
+ modify your prepare_markup() method.
+
+* The UnicodeDammit code that makes guesses at encodings has been
+ split into its own class, EncodingDetector. A lot of apparently
+ redundant code has been removed from Unicode, Dammit, and some
+ undocumented features have also been removed.
+
+* Beautiful Soup will issue a warning if instead of markup you pass it
+ a URL or the name of a file on disk (a common beginner's mistake).
+
+* A number of optimizations improve the performance of the lxml tree
+ builder by about 33%, the html.parser tree builder by about 20%, and
+ the html5lib tree builder by about 15%.
+
+* All find_all calls should now return a ResultSet object. Patch by
+ Aaron DeVore. [bug=1194034]
+
+= 4.2.1 (20130531) =
+
+* The default XML formatter will now replace ampersands even if they
+ appear to be part of entities. That is, "&lt;" will become
+ "&amp;lt;". The old code was left over from Beautiful Soup 3, which
+ didn't always turn entities into Unicode characters.
+
+ If you really want the old behavior (maybe because you add new
+ strings to the tree, those strings include entities, and you want
+ the formatter to leave them alone on output), it can be found in
+ EntitySubstitution.substitute_xml_containing_entities(). [bug=1182183]
+
+* Gave new_string() the ability to create subclasses of
+ NavigableString. [bug=1181986]
+
+* Fixed another bug by which the html5lib tree builder could create a
+ disconnected tree. [bug=1182089]
+
+* The .previous_element of a BeautifulSoup object is now always None,
+ not the last element to be parsed. [bug=1182089]
+
+* Fixed test failures when lxml is not installed. [bug=1181589]
+
+* html5lib now supports Python 3. Fixed some Python 2-specific
+ code in the html5lib test suite. [bug=1181624]
+
+* The html.parser treebuilder can now handle numeric attributes in
+ text when the hexidecimal name of the attribute starts with a
+ capital X. Patch by Tim Shirley. [bug=1186242]
+
+= 4.2.0 (20130514) =
+
+* The Tag.select() method now supports a much wider variety of CSS
+ selectors.
+
+ - Added support for the adjacent sibling combinator (+) and the
+ general sibling combinator (~). Tests by "liquider". [bug=1082144]
+
+ - The combinators (>, +, and ~) can now combine with any supported
+ selector, not just one that selects based on tag name.
+
+ - Added limited support for the "nth-of-type" pseudo-class. Code
+ by Sven Slootweg. [bug=1109952]
+
+* The BeautifulSoup class is now aliased to "_s" and "_soup", making
+ it quicker to type the import statement in an interactive session:
+
+ from bs4 import _s
+ or
+ from bs4 import _soup
+
+ The alias may change in the future, so don't use this in code you're
+ going to run more than once.
+
+* Added the 'diagnose' submodule, which includes several useful
+ functions for reporting problems and doing tech support.
+
+ - diagnose(data) tries the given markup on every installed parser,
+ reporting exceptions and displaying successes. If a parser is not
+ installed, diagnose() mentions this fact.
+
+ - lxml_trace(data, html=True) runs the given markup through lxml's
+ XML parser or HTML parser, and prints out the parser events as
+ they happen. This helps you quickly determine whether a given
+ problem occurs in lxml code or Beautiful Soup code.
+
+ - htmlparser_trace(data) is the same thing, but for Python's
+ built-in HTMLParser class.
+
+* In an HTML document, the contents of a <script> or <style> tag will
+ no longer undergo entity substitution by default. XML documents work
+ the same way they did before. [bug=1085953]
+
+* Methods like get_text() and properties like .strings now only give
+ you strings that are visible in the document--no comments or
+ processing commands. [bug=1050164]
+
+* The prettify() method now leaves the contents of <pre> tags
+ alone. [bug=1095654]
+
+* Fix a bug in the html5lib treebuilder which sometimes created
+ disconnected trees. [bug=1039527]
+
+* Fix a bug in the lxml treebuilder which crashed when a tag included
+ an attribute from the predefined "xml:" namespace. [bug=1065617]
+
+* Fix a bug by which keyword arguments to find_parent() were not
+ being passed on. [bug=1126734]
+
+* Stop a crash when unwisely messing with a tag that's been
+ decomposed. [bug=1097699]
+
+* Now that lxml's segfault on invalid doctype has been fixed, fixed a
+ corresponding problem on the Beautiful Soup end that was previously
+ invisible. [bug=984936]
+
+* Fixed an exception when an overspecified CSS selector didn't match
+ anything. Code by Stefaan Lippens. [bug=1168167]
+
+= 4.1.3 (20120820) =
+
+* Skipped a test under Python 2.6 and Python 3.1 to avoid a spurious
+ test failure caused by the lousy HTMLParser in those
+ versions. [bug=1038503]
+
+* Raise a more specific error (FeatureNotFound) when a requested
+ parser or parser feature is not installed. Raise NotImplementedError
+ instead of ValueError when the user calls insert_before() or
+ insert_after() on the BeautifulSoup object itself. Patch by Aaron
+ Devore. [bug=1038301]
+
+= 4.1.2 (20120817) =
+
+* As per PEP-8, allow searching by CSS class using the 'class_'
+ keyword argument. [bug=1037624]
+
+* Display namespace prefixes for namespaced attribute names, instead of
+ the fully-qualified names given by the lxml parser. [bug=1037597]
+
+* Fixed a crash on encoding when an attribute name contained
+ non-ASCII characters.
+
+* When sniffing encodings, if the cchardet library is installed,
+ Beautiful Soup uses it instead of chardet. cchardet is much
+ faster. [bug=1020748]
+
+* Use logging.warning() instead of warning.warn() to notify the user
+ that characters were replaced with REPLACEMENT
+ CHARACTER. [bug=1013862]
+
+= 4.1.1 (20120703) =
+
+* Fixed an html5lib tree builder crash which happened when html5lib
+ moved a tag with a multivalued attribute from one part of the tree
+ to another. [bug=1019603]
+
+* Correctly display closing tags with an XML namespace declared. Patch
+ by Andreas Kostyrka. [bug=1019635]
+
+* Fixed a typo that made parsing significantly slower than it should
+ have been, and also waited too long to close tags with XML
+ namespaces. [bug=1020268]
+
+* get_text() now returns an empty Unicode string if there is no text,
+ rather than an empty bytestring. [bug=1020387]
+
+= 4.1.0 (20120529) =
+
+* Added experimental support for fixing Windows-1252 characters
+ embedded in UTF-8 documents. (UnicodeDammit.detwingle())
+
+* Fixed the handling of &quot; with the built-in parser. [bug=993871]
+
+* Comments, processing instructions, document type declarations, and
+ markup declarations are now treated as preformatted strings, the way
+ CData blocks are. [bug=1001025]
+
+* Fixed a bug with the lxml treebuilder that prevented the user from
+ adding attributes to a tag that didn't originally have
+ attributes. [bug=1002378] Thanks to Oliver Beattie for the patch.
+
+* Fixed some edge-case bugs having to do with inserting an element
+ into a tag it's already inside, and replacing one of a tag's
+ children with another. [bug=997529]
+
+* Added the ability to search for attribute values specified in UTF-8. [bug=1003974]
+
+ This caused a major refactoring of the search code. All the tests
+ pass, but it's possible that some searches will behave differently.
+
+= 4.0.5 (20120427) =
+
+* Added a new method, wrap(), which wraps an element in a tag.
+
+* Renamed replace_with_children() to unwrap(), which is easier to
+ understand and also the jQuery name of the function.
+
+* Made encoding substitution in <meta> tags completely transparent (no
+ more %SOUP-ENCODING%).
+
+* Fixed a bug in decoding data that contained a byte-order mark, such
+ as data encoded in UTF-16LE. [bug=988980]
+
+* Fixed a bug that made the HTMLParser treebuilder generate XML
+ definitions ending with two question marks instead of
+ one. [bug=984258]
+
+* Upon document generation, CData objects are no longer run through
+ the formatter. [bug=988905]
+
+* The test suite now passes when lxml is not installed, whether or not
+ html5lib is installed. [bug=987004]
+
+* Print a warning on HTMLParseErrors to let people know they should
+ install a better parser library.
+
+= 4.0.4 (20120416) =
+
+* Fixed a bug that sometimes created disconnected trees.
+
+* Fixed a bug with the string setter that moved a string around the
+ tree instead of copying it. [bug=983050]
+
+* Attribute values are now run through the provided output formatter.
+ Previously they were always run through the 'minimal' formatter. In
+ the future I may make it possible to specify different formatters
+ for attribute values and strings, but for now, consistent behavior
+ is better than inconsistent behavior. [bug=980237]
+
+* Added the missing renderContents method from Beautiful Soup 3. Also
+ added an encode_contents() method to go along with decode_contents().
+
+* Give a more useful error when the user tries to run the Python 2
+ version of BS under Python 3.
+
+* UnicodeDammit can now convert Microsoft smart quotes to ASCII with
+ UnicodeDammit(markup, smart_quotes_to="ascii").
+
+= 4.0.3 (20120403) =
+
+* Fixed a typo that caused some versions of Python 3 to convert the
+ Beautiful Soup codebase incorrectly.
+
+* Got rid of the 4.0.2 workaround for HTML documents--it was
+ unnecessary and the workaround was triggering a (possibly different,
+ but related) bug in lxml. [bug=972466]
+
+= 4.0.2 (20120326) =
+
+* Worked around a possible bug in lxml that prevents non-tiny XML
+ documents from being parsed. [bug=963880, bug=963936]
+
+* Fixed a bug where specifying `text` while also searching for a tag
+ only worked if `text` wanted an exact string match. [bug=955942]
+
+= 4.0.1 (20120314) =
+
+* This is the first official release of Beautiful Soup 4. There is no
+ 4.0.0 release, to eliminate any possibility that packaging software
+ might treat "4.0.0" as being an earlier version than "4.0.0b10".
+
+* Brought BS up to date with the latest release of soupselect, adding
+ CSS selector support for direct descendant matches and multiple CSS
+ class matches.
+
+= 4.0.0b10 (20120302) =
+
+* Added support for simple CSS selectors, taken from the soupselect project.
+
+* Fixed a crash when using html5lib. [bug=943246]
+
+* In HTML5-style <meta charset="foo"> tags, the value of the "charset"
+ attribute is now replaced with the appropriate encoding on
+ output. [bug=942714]
+
+* Fixed a bug that caused calling a tag to sometimes call find_all()
+ with the wrong arguments. [bug=944426]
+
+* For backwards compatibility, brought back the BeautifulStoneSoup
+ class as a deprecated wrapper around BeautifulSoup.
+
+= 4.0.0b9 (20120228) =
+
+* Fixed the string representation of DOCTYPEs that have both a public
+ ID and a system ID.
+
+* Fixed the generated XML declaration.
+
+* Renamed Tag.nsprefix to Tag.prefix, for consistency with
+ NamespacedAttribute.
+
+* Fixed a test failure that occured on Python 3.x when chardet was
+ installed.
+
+* Made prettify() return Unicode by default, so it will look nice on
+ Python 3 when passed into print().
+
+= 4.0.0b8 (20120224) =
+
+* All tree builders now preserve namespace information in the
+ documents they parse. If you use the html5lib parser or lxml's XML
+ parser, you can access the namespace URL for a tag as tag.namespace.
+
+ However, there is no special support for namespace-oriented
+ searching or tree manipulation. When you search the tree, you need
+ to use namespace prefixes exactly as they're used in the original
+ document.
+
+* The string representation of a DOCTYPE always ends in a newline.
+
+* Issue a warning if the user tries to use a SoupStrainer in
+ conjunction with the html5lib tree builder, which doesn't support
+ them.
+
+= 4.0.0b7 (20120223) =
+
+* Upon decoding to string, any characters that can't be represented in
+ your chosen encoding will be converted into numeric XML entity
+ references.
+
+* Issue a warning if characters were replaced with REPLACEMENT
+ CHARACTER during Unicode conversion.
+
+* Restored compatibility with Python 2.6.
+
+* The install process no longer installs docs or auxillary text files.
+
+* It's now possible to deepcopy a BeautifulSoup object created with
+ Python's built-in HTML parser.
+
+* About 100 unit tests that "test" the behavior of various parsers on
+ invalid markup have been removed. Legitimate changes to those
+ parsers caused these tests to fail, indicating that perhaps
+ Beautiful Soup should not test the behavior of foreign
+ libraries.
+
+ The problematic unit tests have been reformulated as informational
+ comparisons generated by the script
+ scripts/demonstrate_parser_differences.py.
+
+ This makes Beautiful Soup compatible with html5lib version 0.95 and
+ future versions of HTMLParser.
+
+= 4.0.0b6 (20120216) =
+
+* Multi-valued attributes like "class" always have a list of values,
+ even if there's only one value in the list.
+
+* Added a number of multi-valued attributes defined in HTML5.
+
+* Stopped generating a space before the slash that closes an
+ empty-element tag. This may come back if I add a special XHTML mode
+ (http://www.w3.org/TR/xhtml1/#C_2), but right now it's pretty
+ useless.
+
+* Passing text along with tag-specific arguments to a find* method:
+
+ find("a", text="Click here")
+
+ will find tags that contain the given text as their
+ .string. Previously, the tag-specific arguments were ignored and
+ only strings were searched.
+
+* Fixed a bug that caused the html5lib tree builder to build a
+ partially disconnected tree. Generally cleaned up the html5lib tree
+ builder.
+
+* If you restrict a multi-valued attribute like "class" to a string
+ that contains spaces, Beautiful Soup will only consider it a match
+ if the values correspond to that specific string.
+
+= 4.0.0b5 (20120209) =
+
+* Rationalized Beautiful Soup's treatment of CSS class. A tag
+ belonging to multiple CSS classes is treated as having a list of
+ values for the 'class' attribute. Searching for a CSS class will
+ match *any* of the CSS classes.
+
+ This actually affects all attributes that the HTML standard defines
+ as taking multiple values (class, rel, rev, archive, accept-charset,
+ and headers), but 'class' is by far the most common. [bug=41034]
+
+* If you pass anything other than a dictionary as the second argument
+ to one of the find* methods, it'll assume you want to use that
+ object to search against a tag's CSS classes. Previously this only
+ worked if you passed in a string.
+
+* Fixed a bug that caused a crash when you passed a dictionary as an
+ attribute value (possibly because you mistyped "attrs"). [bug=842419]
+
+* Unicode, Dammit now detects the encoding in HTML 5-style <meta> tags
+ like <meta charset="utf-8" />. [bug=837268]
+
+* If Unicode, Dammit can't figure out a consistent encoding for a
+ page, it will try each of its guesses again, with errors="replace"
+ instead of errors="strict". This may mean that some data gets
+ replaced with REPLACEMENT CHARACTER, but at least most of it will
+ get turned into Unicode. [bug=754903]
+
+* Patched over a bug in html5lib (?) that was crashing Beautiful Soup
+ on certain kinds of markup. [bug=838800]
+
+* Fixed a bug that wrecked the tree if you replaced an element with an
+ empty string. [bug=728697]
+
+* Improved Unicode, Dammit's behavior when you give it Unicode to
+ begin with.
+
+= 4.0.0b4 (20120208) =
+
+* Added BeautifulSoup.new_string() to go along with BeautifulSoup.new_tag()
+
+* BeautifulSoup.new_tag() will follow the rules of whatever
+ tree-builder was used to create the original BeautifulSoup object. A
+ new <p> tag will look like "<p />" if the soup object was created to
+ parse XML, but it will look like "<p></p>" if the soup object was
+ created to parse HTML.
+
+* We pass in strict=False to html.parser on Python 3, greatly
+ improving html.parser's ability to handle bad HTML.
+
+* We also monkeypatch a serious bug in html.parser that made
+ strict=False disastrous on Python 3.2.2.
+
+* Replaced the "substitute_html_entities" argument with the
+ more general "formatter" argument.
+
+* Bare ampersands and angle brackets are always converted to XML
+ entities unless the user prevents it.
+
+* Added PageElement.insert_before() and PageElement.insert_after(),
+ which let you put an element into the parse tree with respect to
+ some other element.
+
+* Raise an exception when the user tries to do something nonsensical
+ like insert a tag into itself.
+
+
+= 4.0.0b3 (20120203) =
+
+Beautiful Soup 4 is a nearly-complete rewrite that removes Beautiful
+Soup's custom HTML parser in favor of a system that lets you write a
+little glue code and plug in any HTML or XML parser you want.
+
+Beautiful Soup 4.0 comes with glue code for four parsers:
+
+ * Python's standard HTMLParser (html.parser in Python 3)
+ * lxml's HTML and XML parsers
+ * html5lib's HTML parser
+
+HTMLParser is the default, but I recommend you install lxml if you
+can.
+
+For complete documentation, see the Sphinx documentation in
+bs4/doc/source/. What follows is a summary of the changes from
+Beautiful Soup 3.
+
+=== The module name has changed ===
+
+Previously you imported the BeautifulSoup class from a module also
+called BeautifulSoup. To save keystrokes and make it clear which
+version of the API is in use, the module is now called 'bs4':
+
+ >>> from bs4 import BeautifulSoup
+
+=== It works with Python 3 ===
+
+Beautiful Soup 3.1.0 worked with Python 3, but the parser it used was
+so bad that it barely worked at all. Beautiful Soup 4 works with
+Python 3, and since its parser is pluggable, you don't sacrifice
+quality.
+
+Special thanks to Thomas Kluyver and Ezio Melotti for getting Python 3
+support to the finish line. Ezio Melotti is also to thank for greatly
+improving the HTML parser that comes with Python 3.2.
+
+=== CDATA sections are normal text, if they're understood at all. ===
+
+Currently, the lxml and html5lib HTML parsers ignore CDATA sections in
+markup:
+
+ <p><![CDATA[foo]]></p> => <p></p>
+
+A future version of html5lib will turn CDATA sections into text nodes,
+but only within tags like <svg> and <math>:
+
+ <svg><![CDATA[foo]]></svg> => <p>foo</p>
+
+The default XML parser (which uses lxml behind the scenes) turns CDATA
+sections into ordinary text elements:
+
+ <p><![CDATA[foo]]></p> => <p>foo</p>
+
+In theory it's possible to preserve the CDATA sections when using the
+XML parser, but I don't see how to get it to work in practice.
+
+=== Miscellaneous other stuff ===
+
+If the BeautifulSoup instance has .is_xml set to True, an appropriate
+XML declaration will be emitted when the tree is transformed into a
+string:
+
+ <?xml version="1.0" encoding="utf-8">
+ <markup>
+ ...
+ </markup>
+
+The ['lxml', 'xml'] tree builder sets .is_xml to True; the other tree
+builders set it to False. If you want to parse XHTML with an HTML
+parser, you can set it manually.
+
+
+= 3.2.0 =
+
+The 3.1 series wasn't very useful, so I renamed the 3.0 series to 3.2
+to make it obvious which one you should use.
+
+= 3.1.0 =
+
+A hybrid version that supports 2.4 and can be automatically converted
+to run under Python 3.0. There are three backwards-incompatible
+changes you should be aware of, but no new features or deliberate
+behavior changes.
+
+1. str() may no longer do what you want. This is because the meaning
+of str() inverts between Python 2 and 3; in Python 2 it gives you a
+byte string, in Python 3 it gives you a Unicode string.
+
+The effect of this is that you can't pass an encoding to .__str__
+anymore. Use encode() to get a string and decode() to get Unicode, and
+you'll be ready (well, readier) for Python 3.
+
+2. Beautiful Soup is now based on HTMLParser rather than SGMLParser,
+which is gone in Python 3. There's some bad HTML that SGMLParser
+handled but HTMLParser doesn't, usually to do with attribute values
+that aren't closed or have brackets inside them:
+
+ <a href="foo</a>, </a><a href="bar">baz</a>
+ <a b="<a>">', '<a b="&lt;a&gt;"></a><a>"></a>
+
+A later version of Beautiful Soup will allow you to plug in different
+parsers to make tradeoffs between speed and the ability to handle bad
+HTML.
+
+3. In Python 3 (but not Python 2), HTMLParser converts entities within
+attributes to the corresponding Unicode characters. In Python 2 it's
+possible to parse this string and leave the &eacute; intact.
+
+ <a href="http://crummy.com?sacr&eacute;&bleu">
+
+In Python 3, the &eacute; is always converted to \xe9 during
+parsing.
+
+
+= 3.0.7a =
+
+Added an import that makes BS work in Python 2.3.
+
+
+= 3.0.7 =
+
+Fixed a UnicodeDecodeError when unpickling documents that contain
+non-ASCII characters.
+
+Fixed a TypeError that occured in some circumstances when a tag
+contained no text.
+
+Jump through hoops to avoid the use of chardet, which can be extremely
+slow in some circumstances. UTF-8 documents should never trigger the
+use of chardet.
+
+Whitespace is preserved inside <pre> and <textarea> tags that contain
+nothing but whitespace.
+
+Beautiful Soup can now parse a doctype that's scoped to an XML namespace.
+
+
+= 3.0.6 =
+
+Got rid of a very old debug line that prevented chardet from working.
+
+Added a Tag.decompose() method that completely disconnects a tree or a
+subset of a tree, breaking it up into bite-sized pieces that are
+easy for the garbage collecter to collect.
+
+Tag.extract() now returns the tag that was extracted.
+
+Tag.findNext() now does something with the keyword arguments you pass
+it instead of dropping them on the floor.
+
+Fixed a Unicode conversion bug.
+
+Fixed a bug that garbled some <meta> tags when rewriting them.
+
+
+= 3.0.5 =
+
+Soup objects can now be pickled, and copied with copy.deepcopy.
+
+Tag.append now works properly on existing BS objects. (It wasn't
+originally intended for outside use, but it can be now.) (Giles
+Radford)
+
+Passing in a nonexistent encoding will no longer crash the parser on
+Python 2.4 (John Nagle).
+
+Fixed an underlying bug in SGMLParser that thinks ASCII has 255
+characters instead of 127 (John Nagle).
+
+Entities are converted more consistently to Unicode characters.
+
+Entity references in attribute values are now converted to Unicode
+characters when appropriate. Numeric entities are always converted,
+because SGMLParser always converts them outside of attribute values.
+
+ALL_ENTITIES happens to just be the XHTML entities, so I renamed it to
+XHTML_ENTITIES.
+
+The regular expression for bare ampersands was too loose. In some
+cases ampersands were not being escaped. (Sam Ruby?)
+
+Non-breaking spaces and other special Unicode space characters are no
+longer folded to ASCII spaces. (Robert Leftwich)
+
+Information inside a TEXTAREA tag is now parsed literally, not as HTML
+tags. TEXTAREA now works exactly the same way as SCRIPT. (Zephyr Fang)
+
+= 3.0.4 =
+
+Fixed a bug that crashed Unicode conversion in some cases.
+
+Fixed a bug that prevented UnicodeDammit from being used as a
+general-purpose data scrubber.
+
+Fixed some unit test failures when running against Python 2.5.
+
+When considering whether to convert smart quotes, UnicodeDammit now
+looks at the original encoding in a case-insensitive way.
+
+= 3.0.3 (20060606) =
+
+Beautiful Soup is now usable as a way to clean up invalid XML/HTML (be
+sure to pass in an appropriate value for convertEntities, or XML/HTML
+entities might stick around that aren't valid in HTML/XML). The result
+may not validate, but it should be good enough to not choke a
+real-world XML parser. Specifically, the output of a properly
+constructed soup object should always be valid as part of an XML
+document, but parts may be missing if they were missing in the
+original. As always, if the input is valid XML, the output will also
+be valid.
+
+= 3.0.2 (20060602) =
+
+Previously, Beautiful Soup correctly handled attribute values that
+contained embedded quotes (sometimes by escaping), but not other kinds
+of XML character. Now, it correctly handles or escapes all special XML
+characters in attribute values.
+
+I aliased methods to the 2.x names (fetch, find, findText, etc.) for
+backwards compatibility purposes. Those names are deprecated and if I
+ever do a 4.0 I will remove them. I will, I tell you!
+
+Fixed a bug where the findAll method wasn't passing along any keyword
+arguments.
+
+When run from the command line, Beautiful Soup now acts as an HTML
+pretty-printer, not an XML pretty-printer.
+
+= 3.0.1 (20060530) =
+
+Reintroduced the "fetch by CSS class" shortcut. I thought keyword
+arguments would replace it, but they don't. You can't call soup('a',
+class='foo') because class is a Python keyword.
+
+If Beautiful Soup encounters a meta tag that declares the encoding,
+but a SoupStrainer tells it not to parse that tag, Beautiful Soup will
+no longer try to rewrite the meta tag to mention the new
+encoding. Basically, this makes SoupStrainers work in real-world
+applications instead of crashing the parser.
+
+= 3.0.0 "Who would not give all else for two p" (20060528) =
+
+This release is not backward-compatible with previous releases. If
+you've got code written with a previous version of the library, go
+ahead and keep using it, unless one of the features mentioned here
+really makes your life easier. Since the library is self-contained,
+you can include an old copy of the library in your old applications,
+and use the new version for everything else.
+
+The documentation has been rewritten and greatly expanded with many
+more examples.
+
+Beautiful Soup autodetects the encoding of a document (or uses the one
+you specify), and converts it from its native encoding to
+Unicode. Internally, it only deals with Unicode strings. When you
+print out the document, it converts to UTF-8 (or another encoding you
+specify). [Doc reference]
+
+It's now easy to make large-scale changes to the parse tree without
+screwing up the navigation members. The methods are extract,
+replaceWith, and insert. [Doc reference. See also Improving Memory
+Usage with extract]
+
+Passing True in as an attribute value gives you tags that have any
+value for that attribute. You don't have to create a regular
+expression. Passing None for an attribute value gives you tags that
+don't have that attribute at all.
+
+Tag objects now know whether or not they're self-closing. This avoids
+the problem where Beautiful Soup thought that tags like <BR /> were
+self-closing even in XML documents. You can customize the self-closing
+tags for a parser object by passing them in as a list of
+selfClosingTags: you don't have to subclass anymore.
+
+There's a new built-in parser, MinimalSoup, which has most of
+BeautifulSoup's HTML-specific rules, but no tag nesting rules. [Doc
+reference]
+
+You can use a SoupStrainer to tell Beautiful Soup to parse only part
+of a document. This saves time and memory, often making Beautiful Soup
+about as fast as a custom-built SGMLParser subclass. [Doc reference,
+SoupStrainer reference]
+
+You can (usually) use keyword arguments instead of passing a
+dictionary of attributes to a search method. That is, you can replace
+soup(args={"id" : "5"}) with soup(id="5"). You can still use args if
+(for instance) you need to find an attribute whose name clashes with
+the name of an argument to findAll. [Doc reference: **kwargs attrs]
+
+The method names have changed to the better method names used in
+Rubyful Soup. Instead of find methods and fetch methods, there are
+only find methods. Instead of a scheme where you can't remember which
+method finds one element and which one finds them all, we have find
+and findAll. In general, if the method name mentions All or a plural
+noun (eg. findNextSiblings), then it finds many elements
+method. Otherwise, it only finds one element. [Doc reference]
+
+Some of the argument names have been renamed for clarity. For instance
+avoidParserProblems is now parserMassage.
+
+Beautiful Soup no longer implements a feed method. You need to pass a
+string or a filehandle into the soup constructor, not with feed after
+the soup has been created. There is still a feed method, but it's the
+feed method implemented by SGMLParser and calling it will bypass
+Beautiful Soup and cause problems.
+
+The NavigableText class has been renamed to NavigableString. There is
+no NavigableUnicodeString anymore, because every string inside a
+Beautiful Soup parse tree is a Unicode string.
+
+findText and fetchText are gone. Just pass a text argument into find
+or findAll.
+
+Null was more trouble than it was worth, so I got rid of it. Anything
+that used to return Null now returns None.
+
+Special XML constructs like comments and CDATA now have their own
+NavigableString subclasses, instead of being treated as oddly-formed
+data. If you parse a document that contains CDATA and write it back
+out, the CDATA will still be there.
+
+When you're parsing a document, you can get Beautiful Soup to convert
+XML or HTML entities into the corresponding Unicode characters. [Doc
+reference]
+
+= 2.1.1 (20050918) =
+
+Fixed a serious performance bug in BeautifulStoneSoup which was
+causing parsing to be incredibly slow.
+
+Corrected several entities that were previously being incorrectly
+translated from Microsoft smart-quote-like characters.
+
+Fixed a bug that was breaking text fetch.
+
+Fixed a bug that crashed the parser when text chunks that look like
+HTML tag names showed up within a SCRIPT tag.
+
+THEAD, TBODY, and TFOOT tags are now nestable within TABLE
+tags. Nested tables should parse more sensibly now.
+
+BASE is now considered a self-closing tag.
+
+= 2.1.0 "Game, or any other dish?" (20050504) =
+
+Added a wide variety of new search methods which, given a starting
+point inside the tree, follow a particular navigation member (like
+nextSibling) over and over again, looking for Tag and NavigableText
+objects that match certain criteria. The new methods are findNext,
+fetchNext, findPrevious, fetchPrevious, findNextSibling,
+fetchNextSiblings, findPreviousSibling, fetchPreviousSiblings,
+findParent, and fetchParents. All of these use the same basic code
+used by first and fetch, so you can pass your weird ways of matching
+things into these methods.
+
+The fetch method and its derivatives now accept a limit argument.
+
+You can now pass keyword arguments when calling a Tag object as though
+it were a method.
+
+Fixed a bug that caused all hand-created tags to share a single set of
+attributes.
+
+= 2.0.3 (20050501) =
+
+Fixed Python 2.2 support for iterators.
+
+Fixed a bug that gave the wrong representation to tags within quote
+tags like <script>.
+
+Took some code from Mark Pilgrim that treats CDATA declarations as
+data instead of ignoring them.
+
+Beautiful Soup's setup.py will now do an install even if the unit
+tests fail. It won't build a source distribution if the unit tests
+fail, so I can't release a new version unless they pass.
+
+= 2.0.2 (20050416) =
+
+Added the unit tests in a separate module, and packaged it with
+distutils.
+
+Fixed a bug that sometimes caused renderContents() to return a Unicode
+string even if there was no Unicode in the original string.
+
+Added the done() method, which closes all of the parser's open
+tags. It gets called automatically when you pass in some text to the
+constructor of a parser class; otherwise you must call it yourself.
+
+Reinstated some backwards compatibility with 1.x versions: referencing
+the string member of a NavigableText object returns the NavigableText
+object instead of throwing an error.
+
+= 2.0.1 (20050412) =
+
+Fixed a bug that caused bad results when you tried to reference a tag
+name shorter than 3 characters as a member of a Tag, eg. tag.table.td.
+
+Made sure all Tags have the 'hidden' attribute so that an attempt to
+access tag.hidden doesn't spawn an attempt to find a tag named
+'hidden'.
+
+Fixed a bug in the comparison operator.
+
+= 2.0.0 "Who cares for fish?" (20050410)
+
+Beautiful Soup version 1 was very useful but also pretty stupid. I
+originally wrote it without noticing any of the problems inherent in
+trying to build a parse tree out of ambiguous HTML tags. This version
+solves all of those problems to my satisfaction. It also adds many new
+clever things to make up for the removal of the stupid things.
+
+== Parsing ==
+
+The parser logic has been greatly improved, and the BeautifulSoup
+class should much more reliably yield a parse tree that looks like
+what the page author intended. For a particular class of odd edge
+cases that now causes problems, there is a new class,
+ICantBelieveItsBeautifulSoup.
+
+By default, Beautiful Soup now performs some cleanup operations on
+text before parsing it. This is to avoid common problems with bad
+definitions and self-closing tags that crash SGMLParser. You can
+provide your own set of cleanup operations, or turn it off
+altogether. The cleanup operations include fixing self-closing tags
+that don't close, and replacing Microsoft smart quotes and similar
+characters with their HTML entity equivalents.
+
+You can now get a pretty-print version of parsed HTML to get a visual
+picture of how Beautiful Soup parses it, with the Tag.prettify()
+method.
+
+== Strings and Unicode ==
+
+There are separate NavigableText subclasses for ASCII and Unicode
+strings. These classes directly subclass the corresponding base data
+types. This means you can treat NavigableText objects as strings
+instead of having to call methods on them to get the strings.
+
+str() on a Tag always returns a string, and unicode() always returns
+Unicode. Previously it was inconsistent.
+
+== Tree traversal ==
+
+In a first() or fetch() call, the tag name or the desired value of an
+attribute can now be any of the following:
+
+ * A string (matches that specific tag or that specific attribute value)
+ * A list of strings (matches any tag or attribute value in the list)
+ * A compiled regular expression object (matches any tag or attribute
+ value that matches the regular expression)
+ * A callable object that takes the Tag object or attribute value as a
+ string. It returns None/false/empty string if the given string
+ doesn't match, and any other value if it does.
+
+This is much easier to use than SQL-style wildcards (see, regular
+expressions are good for something). Because of this, I took out
+SQL-style wildcards. I'll put them back if someone complains, but
+their removal simplifies the code a lot.
+
+You can use fetch() and first() to search for text in the parse tree,
+not just tags. There are new alias methods fetchText() and firstText()
+designed for this purpose. As with searching for tags, you can pass in
+a string, a regular expression object, or a method to match your text.
+
+If you pass in something besides a map to the attrs argument of
+fetch() or first(), Beautiful Soup will assume you want to match that
+thing against the "class" attribute. When you're scraping
+well-structured HTML, this makes your code a lot cleaner.
+
+1.x and 2.x both let you call a Tag object as a shorthand for
+fetch(). For instance, foo("bar") is a shorthand for
+foo.fetch("bar"). In 2.x, you can also access a specially-named member
+of a Tag object as a shorthand for first(). For instance, foo.barTag
+is a shorthand for foo.first("bar"). By chaining these shortcuts you
+traverse a tree in very little code: for header in
+soup.bodyTag.pTag.tableTag('th'):
+
+If an element relationship (like parent or next) doesn't apply to a
+tag, it'll now show up Null instead of None. first() will also return
+Null if you ask it for a nonexistent tag. Null is an object that's
+just like None, except you can do whatever you want to it and it'll
+give you Null instead of throwing an error.
+
+This lets you do tree traversals like soup.htmlTag.headTag.titleTag
+without having to worry if the intermediate stages are actually
+there. Previously, if there was no 'head' tag in the document, headTag
+in that instance would have been None, and accessing its 'titleTag'
+member would have thrown an AttributeError. Now, you can get what you
+want when it exists, and get Null when it doesn't, without having to
+do a lot of conditionals checking to see if every stage is None.
+
+There are two new relations between page elements: previousSibling and
+nextSibling. They reference the previous and next element at the same
+level of the parse tree. For instance, if you have HTML like this:
+
+ <p><ul><li>Foo<br /><li>Bar</ul>
+
+The first 'li' tag has a previousSibling of Null and its nextSibling
+is the second 'li' tag. The second 'li' tag has a nextSibling of Null
+and its previousSibling is the first 'li' tag. The previousSibling of
+the 'ul' tag is the first 'p' tag. The nextSibling of 'Foo' is the
+'br' tag.
+
+I took out the ability to use fetch() to find tags that have a
+specific list of contents. See, I can't even explain it well. It was
+really difficult to use, I never used it, and I don't think anyone
+else ever used it. To the extent anyone did, they can probably use
+fetchText() instead. If it turns out someone needs it I'll think of
+another solution.
+
+== Tree manipulation ==
+
+You can add new attributes to a tag, and delete attributes from a
+tag. In 1.x you could only change a tag's existing attributes.
+
+== Porting Considerations ==
+
+There are three changes in 2.0 that break old code:
+
+In the post-1.2 release you could pass in a function into fetch(). The
+function took a string, the tag name. In 2.0, the function takes the
+actual Tag object.
+
+It's no longer to pass in SQL-style wildcards to fetch(). Use a
+regular expression instead.
+
+The different parsing algorithm means the parse tree may not be shaped
+like you expect. This will only actually affect you if your code uses
+one of the affected parts. I haven't run into this problem yet while
+porting my code.
+
+= Between 1.2 and 2.0 =
+
+This is the release to get if you want Python 1.5 compatibility.
+
+The desired value of an attribute can now be any of the following:
+
+ * A string
+ * A string with SQL-style wildcards
+ * A compiled RE object
+ * A callable that returns None/false/empty string if the given value
+ doesn't match, and any other value otherwise.
+
+This is much easier to use than SQL-style wildcards (see, regular
+expressions are good for something). Because of this, I no longer
+recommend you use SQL-style wildcards. They may go away in a future
+release to clean up the code.
+
+Made Beautiful Soup handle processing instructions as text instead of
+ignoring them.
+
+Applied patch from Richie Hindle (richie at entrian dot com) that
+makes tag.string a shorthand for tag.contents[0].string when the tag
+has only one string-owning child.
+
+Added still more nestable tags. The nestable tags thing won't work in
+a lot of cases and needs to be rethought.
+
+Fixed an edge case where searching for "%foo" would match any string
+shorter than "foo".
+
+= 1.2 "Who for such dainties would not stoop?" (20040708) =
+
+Applied patch from Ben Last (ben at benlast dot com) that made
+Tag.renderContents() correctly handle Unicode.
+
+Made BeautifulStoneSoup even dumber by making it not implicitly close
+a tag when another tag of the same type is encountered; only when an
+actual closing tag is encountered. This change courtesy of Fuzzy (mike
+at pcblokes dot com). BeautifulSoup still works as before.
+
+= 1.1 "Swimming in a hot tureen" =
+
+Added more 'nestable' tags. Changed popping semantics so that when a
+nestable tag is encountered, tags are popped up to the previously
+encountered nestable tag (of whatever kind). I will revert this if
+enough people complain, but it should make more people's lives easier
+than harder. This enhancement was suggested by Anthony Baxter (anthony
+at interlink dot com dot au).
+
+= 1.0 "So rich and green" (20040420) =
+
+Initial release.
diff --git a/bitbake/lib/bs4/__init__.py b/bitbake/lib/bs4/__init__.py
new file mode 100644
index 0000000000..7ba34269af
--- /dev/null
+++ b/bitbake/lib/bs4/__init__.py
@@ -0,0 +1,406 @@
+"""Beautiful Soup
+Elixir and Tonic
+"The Screen-Scraper's Friend"
+http://www.crummy.com/software/BeautifulSoup/
+
+Beautiful Soup uses a pluggable XML or HTML parser to parse a
+(possibly invalid) document into a tree representation. Beautiful Soup
+provides provides methods and Pythonic idioms that make it easy to
+navigate, search, and modify the parse tree.
+
+Beautiful Soup works with Python 2.6 and up. It works better if lxml
+and/or html5lib is installed.
+
+For more than you ever wanted to know about Beautiful Soup, see the
+documentation:
+http://www.crummy.com/software/BeautifulSoup/bs4/doc/
+"""
+
+__author__ = "Leonard Richardson (leonardr@segfault.org)"
+__version__ = "4.3.2"
+__copyright__ = "Copyright (c) 2004-2013 Leonard Richardson"
+__license__ = "MIT"
+
+__all__ = ['BeautifulSoup']
+
+import os
+import re
+import warnings
+
+from .builder import builder_registry, ParserRejectedMarkup
+from .dammit import UnicodeDammit
+from .element import (
+ CData,
+ Comment,
+ DEFAULT_OUTPUT_ENCODING,
+ Declaration,
+ Doctype,
+ NavigableString,
+ PageElement,
+ ProcessingInstruction,
+ ResultSet,
+ SoupStrainer,
+ Tag,
+ )
+
+# The very first thing we do is give a useful error if someone is
+# running this code under Python 3 without converting it.
+syntax_error = u'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work. You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
+
+class BeautifulSoup(Tag):
+ """
+ This class defines the basic interface called by the tree builders.
+
+ These methods will be called by the parser:
+ reset()
+ feed(markup)
+
+ The tree builder may call these methods from its feed() implementation:
+ handle_starttag(name, attrs) # See note about return value
+ handle_endtag(name)
+ handle_data(data) # Appends to the current data node
+ endData(containerClass=NavigableString) # Ends the current data node
+
+ No matter how complicated the underlying parser is, you should be
+ able to build a tree using 'start tag' events, 'end tag' events,
+ 'data' events, and "done with data" events.
+
+ If you encounter an empty-element tag (aka a self-closing tag,
+ like HTML's <br> tag), call handle_starttag and then
+ handle_endtag.
+ """
+ ROOT_TAG_NAME = u'[document]'
+
+ # If the end-user gives no indication which tree builder they
+ # want, look for one with these features.
+ DEFAULT_BUILDER_FEATURES = ['html', 'fast']
+
+ ASCII_SPACES = '\x20\x0a\x09\x0c\x0d'
+
+ def __init__(self, markup="", features=None, builder=None,
+ parse_only=None, from_encoding=None, **kwargs):
+ """The Soup object is initialized as the 'root tag', and the
+ provided markup (which can be a string or a file-like object)
+ is fed into the underlying parser."""
+
+ if 'convertEntities' in kwargs:
+ warnings.warn(
+ "BS4 does not respect the convertEntities argument to the "
+ "BeautifulSoup constructor. Entities are always converted "
+ "to Unicode characters.")
+
+ if 'markupMassage' in kwargs:
+ del kwargs['markupMassage']
+ warnings.warn(
+ "BS4 does not respect the markupMassage argument to the "
+ "BeautifulSoup constructor. The tree builder is responsible "
+ "for any necessary markup massage.")
+
+ if 'smartQuotesTo' in kwargs:
+ del kwargs['smartQuotesTo']
+ warnings.warn(
+ "BS4 does not respect the smartQuotesTo argument to the "
+ "BeautifulSoup constructor. Smart quotes are always converted "
+ "to Unicode characters.")
+
+ if 'selfClosingTags' in kwargs:
+ del kwargs['selfClosingTags']
+ warnings.warn(
+ "BS4 does not respect the selfClosingTags argument to the "
+ "BeautifulSoup constructor. The tree builder is responsible "
+ "for understanding self-closing tags.")
+
+ if 'isHTML' in kwargs:
+ del kwargs['isHTML']
+ warnings.warn(
+ "BS4 does not respect the isHTML argument to the "
+ "BeautifulSoup constructor. You can pass in features='html' "
+ "or features='xml' to get a builder capable of handling "
+ "one or the other.")
+
+ def deprecated_argument(old_name, new_name):
+ if old_name in kwargs:
+ warnings.warn(
+ 'The "%s" argument to the BeautifulSoup constructor '
+ 'has been renamed to "%s."' % (old_name, new_name))
+ value = kwargs[old_name]
+ del kwargs[old_name]
+ return value
+ return None
+
+ parse_only = parse_only or deprecated_argument(
+ "parseOnlyThese", "parse_only")
+
+ from_encoding = from_encoding or deprecated_argument(
+ "fromEncoding", "from_encoding")
+
+ if len(kwargs) > 0:
+ arg = kwargs.keys().pop()
+ raise TypeError(
+ "__init__() got an unexpected keyword argument '%s'" % arg)
+
+ if builder is None:
+ if isinstance(features, basestring):
+ features = [features]
+ if features is None or len(features) == 0:
+ features = self.DEFAULT_BUILDER_FEATURES
+ builder_class = builder_registry.lookup(*features)
+ if builder_class is None:
+ raise FeatureNotFound(
+ "Couldn't find a tree builder with the features you "
+ "requested: %s. Do you need to install a parser library?"
+ % ",".join(features))
+ builder = builder_class()
+ self.builder = builder
+ self.is_xml = builder.is_xml
+ self.builder.soup = self
+
+ self.parse_only = parse_only
+
+ if hasattr(markup, 'read'): # It's a file-type object.
+ markup = markup.read()
+ elif len(markup) <= 256:
+ # Print out warnings for a couple beginner problems
+ # involving passing non-markup to Beautiful Soup.
+ # Beautiful Soup will still parse the input as markup,
+ # just in case that's what the user really wants.
+ if (isinstance(markup, unicode)
+ and not os.path.supports_unicode_filenames):
+ possible_filename = markup.encode("utf8")
+ else:
+ possible_filename = markup
+ is_file = False
+ try:
+ is_file = os.path.exists(possible_filename)
+ except Exception, e:
+ # This is almost certainly a problem involving
+ # characters not valid in filenames on this
+ # system. Just let it go.
+ pass
+ if is_file:
+ warnings.warn(
+ '"%s" looks like a filename, not markup. You should probably open this file and pass the filehandle into Beautiful Soup.' % markup)
+ if markup[:5] == "http:" or markup[:6] == "https:":
+ # TODO: This is ugly but I couldn't get it to work in
+ # Python 3 otherwise.
+ if ((isinstance(markup, bytes) and not b' ' in markup)
+ or (isinstance(markup, unicode) and not u' ' in markup)):
+ warnings.warn(
+ '"%s" looks like a URL. Beautiful Soup is not an HTTP client. You should probably use an HTTP client to get the document behind the URL, and feed that document to Beautiful Soup.' % markup)
+
+ for (self.markup, self.original_encoding, self.declared_html_encoding,
+ self.contains_replacement_characters) in (
+ self.builder.prepare_markup(markup, from_encoding)):
+ self.reset()
+ try:
+ self._feed()
+ break
+ except ParserRejectedMarkup:
+ pass
+
+ # Clear out the markup and remove the builder's circular
+ # reference to this object.
+ self.markup = None
+ self.builder.soup = None
+
+ def _feed(self):
+ # Convert the document to Unicode.
+ self.builder.reset()
+
+ self.builder.feed(self.markup)
+ # Close out any unfinished strings and close all the open tags.
+ self.endData()
+ while self.currentTag.name != self.ROOT_TAG_NAME:
+ self.popTag()
+
+ def reset(self):
+ Tag.__init__(self, self, self.builder, self.ROOT_TAG_NAME)
+ self.hidden = 1
+ self.builder.reset()
+ self.current_data = []
+ self.currentTag = None
+ self.tagStack = []
+ self.preserve_whitespace_tag_stack = []
+ self.pushTag(self)
+
+ def new_tag(self, name, namespace=None, nsprefix=None, **attrs):
+ """Create a new tag associated with this soup."""
+ return Tag(None, self.builder, name, namespace, nsprefix, attrs)
+
+ def new_string(self, s, subclass=NavigableString):
+ """Create a new NavigableString associated with this soup."""
+ navigable = subclass(s)
+ navigable.setup()
+ return navigable
+
+ def insert_before(self, successor):
+ raise NotImplementedError("BeautifulSoup objects don't support insert_before().")
+
+ def insert_after(self, successor):
+ raise NotImplementedError("BeautifulSoup objects don't support insert_after().")
+
+ def popTag(self):
+ tag = self.tagStack.pop()
+ if self.preserve_whitespace_tag_stack and tag == self.preserve_whitespace_tag_stack[-1]:
+ self.preserve_whitespace_tag_stack.pop()
+ #print "Pop", tag.name
+ if self.tagStack:
+ self.currentTag = self.tagStack[-1]
+ return self.currentTag
+
+ def pushTag(self, tag):
+ #print "Push", tag.name
+ if self.currentTag:
+ self.currentTag.contents.append(tag)
+ self.tagStack.append(tag)
+ self.currentTag = self.tagStack[-1]
+ if tag.name in self.builder.preserve_whitespace_tags:
+ self.preserve_whitespace_tag_stack.append(tag)
+
+ def endData(self, containerClass=NavigableString):
+ if self.current_data:
+ current_data = u''.join(self.current_data)
+ # If whitespace is not preserved, and this string contains
+ # nothing but ASCII spaces, replace it with a single space
+ # or newline.
+ if not self.preserve_whitespace_tag_stack:
+ strippable = True
+ for i in current_data:
+ if i not in self.ASCII_SPACES:
+ strippable = False
+ break
+ if strippable:
+ if '\n' in current_data:
+ current_data = '\n'
+ else:
+ current_data = ' '
+
+ # Reset the data collector.
+ self.current_data = []
+
+ # Should we add this string to the tree at all?
+ if self.parse_only and len(self.tagStack) <= 1 and \
+ (not self.parse_only.text or \
+ not self.parse_only.search(current_data)):
+ return
+
+ o = containerClass(current_data)
+ self.object_was_parsed(o)
+
+ def object_was_parsed(self, o, parent=None, most_recent_element=None):
+ """Add an object to the parse tree."""
+ parent = parent or self.currentTag
+ most_recent_element = most_recent_element or self._most_recent_element
+ o.setup(parent, most_recent_element)
+
+ if most_recent_element is not None:
+ most_recent_element.next_element = o
+ self._most_recent_element = o
+ parent.contents.append(o)
+
+ def _popToTag(self, name, nsprefix=None, inclusivePop=True):
+ """Pops the tag stack up to and including the most recent
+ instance of the given tag. If inclusivePop is false, pops the tag
+ stack up to but *not* including the most recent instqance of
+ the given tag."""
+ #print "Popping to %s" % name
+ if name == self.ROOT_TAG_NAME:
+ # The BeautifulSoup object itself can never be popped.
+ return
+
+ most_recently_popped = None
+
+ stack_size = len(self.tagStack)
+ for i in range(stack_size - 1, 0, -1):
+ t = self.tagStack[i]
+ if (name == t.name and nsprefix == t.prefix):
+ if inclusivePop:
+ most_recently_popped = self.popTag()
+ break
+ most_recently_popped = self.popTag()
+
+ return most_recently_popped
+
+ def handle_starttag(self, name, namespace, nsprefix, attrs):
+ """Push a start tag on to the stack.
+
+ If this method returns None, the tag was rejected by the
+ SoupStrainer. You should proceed as if the tag had not occured
+ in the document. For instance, if this was a self-closing tag,
+ don't call handle_endtag.
+ """
+
+ # print "Start tag %s: %s" % (name, attrs)
+ self.endData()
+
+ if (self.parse_only and len(self.tagStack) <= 1
+ and (self.parse_only.text
+ or not self.parse_only.search_tag(name, attrs))):
+ return None
+
+ tag = Tag(self, self.builder, name, namespace, nsprefix, attrs,
+ self.currentTag, self._most_recent_element)
+ if tag is None:
+ return tag
+ if self._most_recent_element:
+ self._most_recent_element.next_element = tag
+ self._most_recent_element = tag
+ self.pushTag(tag)
+ return tag
+
+ def handle_endtag(self, name, nsprefix=None):
+ #print "End tag: " + name
+ self.endData()
+ self._popToTag(name, nsprefix)
+
+ def handle_data(self, data):
+ self.current_data.append(data)
+
+ def decode(self, pretty_print=False,
+ eventual_encoding=DEFAULT_OUTPUT_ENCODING,
+ formatter="minimal"):
+ """Returns a string or Unicode representation of this document.
+ To get Unicode, pass None for encoding."""
+
+ if self.is_xml:
+ # Print the XML declaration
+ encoding_part = ''
+ if eventual_encoding != None:
+ encoding_part = ' encoding="%s"' % eventual_encoding
+ prefix = u'<?xml version="1.0"%s?>\n' % encoding_part
+ else:
+ prefix = u''
+ if not pretty_print:
+ indent_level = None
+ else:
+ indent_level = 0
+ return prefix + super(BeautifulSoup, self).decode(
+ indent_level, eventual_encoding, formatter)
+
+# Alias to make it easier to type import: 'from bs4 import _soup'
+_s = BeautifulSoup
+_soup = BeautifulSoup
+
+class BeautifulStoneSoup(BeautifulSoup):
+ """Deprecated interface to an XML parser."""
+
+ def __init__(self, *args, **kwargs):
+ kwargs['features'] = 'xml'
+ warnings.warn(
+ 'The BeautifulStoneSoup class is deprecated. Instead of using '
+ 'it, pass features="xml" into the BeautifulSoup constructor.')
+ super(BeautifulStoneSoup, self).__init__(*args, **kwargs)
+
+
+class StopParsing(Exception):
+ pass
+
+class FeatureNotFound(ValueError):
+ pass
+
+
+#By default, act as an HTML pretty-printer.
+if __name__ == '__main__':
+ import sys
+ soup = BeautifulSoup(sys.stdin)
+ print soup.prettify()
diff --git a/bitbake/lib/bs4/builder/__init__.py b/bitbake/lib/bs4/builder/__init__.py
new file mode 100644
index 0000000000..740f5f29cd
--- /dev/null
+++ b/bitbake/lib/bs4/builder/__init__.py
@@ -0,0 +1,321 @@
+from collections import defaultdict
+import itertools
+import sys
+from bs4.element import (
+ CharsetMetaAttributeValue,
+ ContentMetaAttributeValue,
+ whitespace_re
+ )
+
+__all__ = [
+ 'HTMLTreeBuilder',
+ 'SAXTreeBuilder',
+ 'TreeBuilder',
+ 'TreeBuilderRegistry',
+ ]
+
+# Some useful features for a TreeBuilder to have.
+FAST = 'fast'
+PERMISSIVE = 'permissive'
+STRICT = 'strict'
+XML = 'xml'
+HTML = 'html'
+HTML_5 = 'html5'
+
+
+class TreeBuilderRegistry(object):
+
+ def __init__(self):
+ self.builders_for_feature = defaultdict(list)
+ self.builders = []
+
+ def register(self, treebuilder_class):
+ """Register a treebuilder based on its advertised features."""
+ for feature in treebuilder_class.features:
+ self.builders_for_feature[feature].insert(0, treebuilder_class)
+ self.builders.insert(0, treebuilder_class)
+
+ def lookup(self, *features):
+ if len(self.builders) == 0:
+ # There are no builders at all.
+ return None
+
+ if len(features) == 0:
+ # They didn't ask for any features. Give them the most
+ # recently registered builder.
+ return self.builders[0]
+
+ # Go down the list of features in order, and eliminate any builders
+ # that don't match every feature.
+ features = list(features)
+ features.reverse()
+ candidates = None
+ candidate_set = None
+ while len(features) > 0:
+ feature = features.pop()
+ we_have_the_feature = self.builders_for_feature.get(feature, [])
+ if len(we_have_the_feature) > 0:
+ if candidates is None:
+ candidates = we_have_the_feature
+ candidate_set = set(candidates)
+ else:
+ # Eliminate any candidates that don't have this feature.
+ candidate_set = candidate_set.intersection(
+ set(we_have_the_feature))
+
+ # The only valid candidates are the ones in candidate_set.
+ # Go through the original list of candidates and pick the first one
+ # that's in candidate_set.
+ if candidate_set is None:
+ return None
+ for candidate in candidates:
+ if candidate in candidate_set:
+ return candidate
+ return None
+
+# The BeautifulSoup class will take feature lists from developers and use them
+# to look up builders in this registry.
+builder_registry = TreeBuilderRegistry()
+
+class TreeBuilder(object):
+ """Turn a document into a Beautiful Soup object tree."""
+
+ features = []
+
+ is_xml = False
+ preserve_whitespace_tags = set()
+ empty_element_tags = None # A tag will be considered an empty-element
+ # tag when and only when it has no contents.
+
+ # A value for these tag/attribute combinations is a space- or
+ # comma-separated list of CDATA, rather than a single CDATA.
+ cdata_list_attributes = {}
+
+
+ def __init__(self):
+ self.soup = None
+
+ def reset(self):
+ pass
+
+ def can_be_empty_element(self, tag_name):
+ """Might a tag with this name be an empty-element tag?
+
+ The final markup may or may not actually present this tag as
+ self-closing.
+
+ For instance: an HTMLBuilder does not consider a <p> tag to be
+ an empty-element tag (it's not in
+ HTMLBuilder.empty_element_tags). This means an empty <p> tag
+ will be presented as "<p></p>", not "<p />".
+
+ The default implementation has no opinion about which tags are
+ empty-element tags, so a tag will be presented as an
+ empty-element tag if and only if it has no contents.
+ "<foo></foo>" will become "<foo />", and "<foo>bar</foo>" will
+ be left alone.
+ """
+ if self.empty_element_tags is None:
+ return True
+ return tag_name in self.empty_element_tags
+
+ def feed(self, markup):
+ raise NotImplementedError()
+
+ def prepare_markup(self, markup, user_specified_encoding=None,
+ document_declared_encoding=None):
+ return markup, None, None, False
+
+ def test_fragment_to_document(self, fragment):
+ """Wrap an HTML fragment to make it look like a document.
+
+ Different parsers do this differently. For instance, lxml
+ introduces an empty <head> tag, and html5lib
+ doesn't. Abstracting this away lets us write simple tests
+ which run HTML fragments through the parser and compare the
+ results against other HTML fragments.
+
+ This method should not be used outside of tests.
+ """
+ return fragment
+
+ def set_up_substitutions(self, tag):
+ return False
+
+ def _replace_cdata_list_attribute_values(self, tag_name, attrs):
+ """Replaces class="foo bar" with class=["foo", "bar"]
+
+ Modifies its input in place.
+ """
+ if not attrs:
+ return attrs
+ if self.cdata_list_attributes:
+ universal = self.cdata_list_attributes.get('*', [])
+ tag_specific = self.cdata_list_attributes.get(
+ tag_name.lower(), None)
+ for attr in attrs.keys():
+ if attr in universal or (tag_specific and attr in tag_specific):
+ # We have a "class"-type attribute whose string
+ # value is a whitespace-separated list of
+ # values. Split it into a list.
+ value = attrs[attr]
+ if isinstance(value, basestring):
+ values = whitespace_re.split(value)
+ else:
+ # html5lib sometimes calls setAttributes twice
+ # for the same tag when rearranging the parse
+ # tree. On the second call the attribute value
+ # here is already a list. If this happens,
+ # leave the value alone rather than trying to
+ # split it again.
+ values = value
+ attrs[attr] = values
+ return attrs
+
+class SAXTreeBuilder(TreeBuilder):
+ """A Beautiful Soup treebuilder that listens for SAX events."""
+
+ def feed(self, markup):
+ raise NotImplementedError()
+
+ def close(self):
+ pass
+
+ def startElement(self, name, attrs):
+ attrs = dict((key[1], value) for key, value in list(attrs.items()))
+ #print "Start %s, %r" % (name, attrs)
+ self.soup.handle_starttag(name, attrs)
+
+ def endElement(self, name):
+ #print "End %s" % name
+ self.soup.handle_endtag(name)
+
+ def startElementNS(self, nsTuple, nodeName, attrs):
+ # Throw away (ns, nodeName) for now.
+ self.startElement(nodeName, attrs)
+
+ def endElementNS(self, nsTuple, nodeName):
+ # Throw away (ns, nodeName) for now.
+ self.endElement(nodeName)
+ #handler.endElementNS((ns, node.nodeName), node.nodeName)
+
+ def startPrefixMapping(self, prefix, nodeValue):
+ # Ignore the prefix for now.
+ pass
+
+ def endPrefixMapping(self, prefix):
+ # Ignore the prefix for now.
+ # handler.endPrefixMapping(prefix)
+ pass
+
+ def characters(self, content):
+ self.soup.handle_data(content)
+
+ def startDocument(self):
+ pass
+
+ def endDocument(self):
+ pass
+
+
+class HTMLTreeBuilder(TreeBuilder):
+ """This TreeBuilder knows facts about HTML.
+
+ Such as which tags are empty-element tags.
+ """
+
+ preserve_whitespace_tags = set(['pre', 'textarea'])
+ empty_element_tags = set(['br' , 'hr', 'input', 'img', 'meta',
+ 'spacer', 'link', 'frame', 'base'])
+
+ # The HTML standard defines these attributes as containing a
+ # space-separated list of values, not a single value. That is,
+ # class="foo bar" means that the 'class' attribute has two values,
+ # 'foo' and 'bar', not the single value 'foo bar'. When we
+ # encounter one of these attributes, we will parse its value into
+ # a list of values if possible. Upon output, the list will be
+ # converted back into a string.
+ cdata_list_attributes = {
+ "*" : ['class', 'accesskey', 'dropzone'],
+ "a" : ['rel', 'rev'],
+ "link" : ['rel', 'rev'],
+ "td" : ["headers"],
+ "th" : ["headers"],
+ "td" : ["headers"],
+ "form" : ["accept-charset"],
+ "object" : ["archive"],
+
+ # These are HTML5 specific, as are *.accesskey and *.dropzone above.
+ "area" : ["rel"],
+ "icon" : ["sizes"],
+ "iframe" : ["sandbox"],
+ "output" : ["for"],
+ }
+
+ def set_up_substitutions(self, tag):
+ # We are only interested in <meta> tags
+ if tag.name != 'meta':
+ return False
+
+ http_equiv = tag.get('http-equiv')
+ content = tag.get('content')
+ charset = tag.get('charset')
+
+ # We are interested in <meta> tags that say what encoding the
+ # document was originally in. This means HTML 5-style <meta>
+ # tags that provide the "charset" attribute. It also means
+ # HTML 4-style <meta> tags that provide the "content"
+ # attribute and have "http-equiv" set to "content-type".
+ #
+ # In both cases we will replace the value of the appropriate
+ # attribute with a standin object that can take on any
+ # encoding.
+ meta_encoding = None
+ if charset is not None:
+ # HTML 5 style:
+ # <meta charset="utf8">
+ meta_encoding = charset
+ tag['charset'] = CharsetMetaAttributeValue(charset)
+
+ elif (content is not None and http_equiv is not None
+ and http_equiv.lower() == 'content-type'):
+ # HTML 4 style:
+ # <meta http-equiv="content-type" content="text/html; charset=utf8">
+ tag['content'] = ContentMetaAttributeValue(content)
+
+ return (meta_encoding is not None)
+
+def register_treebuilders_from(module):
+ """Copy TreeBuilders from the given module into this module."""
+ # I'm fairly sure this is not the best way to do this.
+ this_module = sys.modules['bs4.builder']
+ for name in module.__all__:
+ obj = getattr(module, name)
+
+ if issubclass(obj, TreeBuilder):
+ setattr(this_module, name, obj)
+ this_module.__all__.append(name)
+ # Register the builder while we're at it.
+ this_module.builder_registry.register(obj)
+
+class ParserRejectedMarkup(Exception):
+ pass
+
+# Builders are registered in reverse order of priority, so that custom
+# builder registrations will take precedence. In general, we want lxml
+# to take precedence over html5lib, because it's faster. And we only
+# want to use HTMLParser as a last result.
+from . import _htmlparser
+register_treebuilders_from(_htmlparser)
+try:
+ from . import _html5lib
+ register_treebuilders_from(_html5lib)
+except ImportError:
+ # They don't have html5lib installed.
+ pass
+try:
+ from . import _lxml
+ register_treebuilders_from(_lxml)
+except ImportError:
+ # They don't have lxml installed.
+ pass
diff --git a/bitbake/lib/bs4/builder/_html5lib.py b/bitbake/lib/bs4/builder/_html5lib.py
new file mode 100644
index 0000000000..7de36ae75e
--- /dev/null
+++ b/bitbake/lib/bs4/builder/_html5lib.py
@@ -0,0 +1,285 @@
+__all__ = [
+ 'HTML5TreeBuilder',
+ ]
+
+import warnings
+from bs4.builder import (
+ PERMISSIVE,
+ HTML,
+ HTML_5,
+ HTMLTreeBuilder,
+ )
+from bs4.element import NamespacedAttribute
+import html5lib
+from html5lib.constants import namespaces
+from bs4.element import (
+ Comment,
+ Doctype,
+ NavigableString,
+ Tag,
+ )
+
+class HTML5TreeBuilder(HTMLTreeBuilder):
+ """Use html5lib to build a tree."""
+
+ features = ['html5lib', PERMISSIVE, HTML_5, HTML]
+
+ def prepare_markup(self, markup, user_specified_encoding):
+ # Store the user-specified encoding for use later on.
+ self.user_specified_encoding = user_specified_encoding
+ yield (markup, None, None, False)
+
+ # These methods are defined by Beautiful Soup.
+ def feed(self, markup):
+ if self.soup.parse_only is not None:
+ warnings.warn("You provided a value for parse_only, but the html5lib tree builder doesn't support parse_only. The entire document will be parsed.")
+ parser = html5lib.HTMLParser(tree=self.create_treebuilder)
+ doc = parser.parse(markup, encoding=self.user_specified_encoding)
+
+ # Set the character encoding detected by the tokenizer.
+ if isinstance(markup, unicode):
+ # We need to special-case this because html5lib sets
+ # charEncoding to UTF-8 if it gets Unicode input.
+ doc.original_encoding = None
+ else:
+ doc.original_encoding = parser.tokenizer.stream.charEncoding[0]
+
+ def create_treebuilder(self, namespaceHTMLElements):
+ self.underlying_builder = TreeBuilderForHtml5lib(
+ self.soup, namespaceHTMLElements)
+ return self.underlying_builder
+
+ def test_fragment_to_document(self, fragment):
+ """See `TreeBuilder`."""
+ return u'<html><head></head><body>%s</body></html>' % fragment
+
+
+class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
+
+ def __init__(self, soup, namespaceHTMLElements):
+ self.soup = soup
+ super(TreeBuilderForHtml5lib, self).__init__(namespaceHTMLElements)
+
+ def documentClass(self):
+ self.soup.reset()
+ return Element(self.soup, self.soup, None)
+
+ def insertDoctype(self, token):
+ name = token["name"]
+ publicId = token["publicId"]
+ systemId = token["systemId"]
+
+ doctype = Doctype.for_name_and_ids(name, publicId, systemId)
+ self.soup.object_was_parsed(doctype)
+
+ def elementClass(self, name, namespace):
+ tag = self.soup.new_tag(name, namespace)
+ return Element(tag, self.soup, namespace)
+
+ def commentClass(self, data):
+ return TextNode(Comment(data), self.soup)
+
+ def fragmentClass(self):
+ self.soup = BeautifulSoup("")
+ self.soup.name = "[document_fragment]"
+ return Element(self.soup, self.soup, None)
+
+ def appendChild(self, node):
+ # XXX This code is not covered by the BS4 tests.
+ self.soup.append(node.element)
+
+ def getDocument(self):
+ return self.soup
+
+ def getFragment(self):
+ return html5lib.treebuilders._base.TreeBuilder.getFragment(self).element
+
+class AttrList(object):
+ def __init__(self, element):
+ self.element = element
+ self.attrs = dict(self.element.attrs)
+ def __iter__(self):
+ return list(self.attrs.items()).__iter__()
+ def __setitem__(self, name, value):
+ "set attr", name, value
+ self.element[name] = value
+ def items(self):
+ return list(self.attrs.items())
+ def keys(self):
+ return list(self.attrs.keys())
+ def __len__(self):
+ return len(self.attrs)
+ def __getitem__(self, name):
+ return self.attrs[name]
+ def __contains__(self, name):
+ return name in list(self.attrs.keys())
+
+
+class Element(html5lib.treebuilders._base.Node):
+ def __init__(self, element, soup, namespace):
+ html5lib.treebuilders._base.Node.__init__(self, element.name)
+ self.element = element
+ self.soup = soup
+ self.namespace = namespace
+
+ def appendChild(self, node):
+ string_child = child = None
+ if isinstance(node, basestring):
+ # Some other piece of code decided to pass in a string
+ # instead of creating a TextElement object to contain the
+ # string.
+ string_child = child = node
+ elif isinstance(node, Tag):
+ # Some other piece of code decided to pass in a Tag
+ # instead of creating an Element object to contain the
+ # Tag.
+ child = node
+ elif node.element.__class__ == NavigableString:
+ string_child = child = node.element
+ else:
+ child = node.element
+
+ if not isinstance(child, basestring) and child.parent is not None:
+ node.element.extract()
+
+ if (string_child and self.element.contents
+ and self.element.contents[-1].__class__ == NavigableString):
+ # We are appending a string onto another string.
+ # TODO This has O(n^2) performance, for input like
+ # "a</a>a</a>a</a>..."
+ old_element = self.element.contents[-1]
+ new_element = self.soup.new_string(old_element + string_child)
+ old_element.replace_with(new_element)
+ self.soup._most_recent_element = new_element
+ else:
+ if isinstance(node, basestring):
+ # Create a brand new NavigableString from this string.
+ child = self.soup.new_string(node)
+
+ # Tell Beautiful Soup to act as if it parsed this element
+ # immediately after the parent's last descendant. (Or
+ # immediately after the parent, if it has no children.)
+ if self.element.contents:
+ most_recent_element = self.element._last_descendant(False)
+ else:
+ most_recent_element = self.element
+
+ self.soup.object_was_parsed(
+ child, parent=self.element,
+ most_recent_element=most_recent_element)
+
+ def getAttributes(self):
+ return AttrList(self.element)
+
+ def setAttributes(self, attributes):
+ if attributes is not None and len(attributes) > 0:
+
+ converted_attributes = []
+ for name, value in list(attributes.items()):
+ if isinstance(name, tuple):
+ new_name = NamespacedAttribute(*name)
+ del attributes[name]
+ attributes[new_name] = value
+
+ self.soup.builder._replace_cdata_list_attribute_values(
+ self.name, attributes)
+ for name, value in attributes.items():
+ self.element[name] = value
+
+ # The attributes may contain variables that need substitution.
+ # Call set_up_substitutions manually.
+ #
+ # The Tag constructor called this method when the Tag was created,
+ # but we just set/changed the attributes, so call it again.
+ self.soup.builder.set_up_substitutions(self.element)
+ attributes = property(getAttributes, setAttributes)
+
+ def insertText(self, data, insertBefore=None):
+ if insertBefore:
+ text = TextNode(self.soup.new_string(data), self.soup)
+ self.insertBefore(data, insertBefore)
+ else:
+ self.appendChild(data)
+
+ def insertBefore(self, node, refNode):
+ index = self.element.index(refNode.element)
+ if (node.element.__class__ == NavigableString and self.element.contents
+ and self.element.contents[index-1].__class__ == NavigableString):
+ # (See comments in appendChild)
+ old_node = self.element.contents[index-1]
+ new_str = self.soup.new_string(old_node + node.element)
+ old_node.replace_with(new_str)
+ else:
+ self.element.insert(index, node.element)
+ node.parent = self
+
+ def removeChild(self, node):
+ node.element.extract()
+
+ def reparentChildren(self, new_parent):
+ """Move all of this tag's children into another tag."""
+ element = self.element
+ new_parent_element = new_parent.element
+ # Determine what this tag's next_element will be once all the children
+ # are removed.
+ final_next_element = element.next_sibling
+
+ new_parents_last_descendant = new_parent_element._last_descendant(False, False)
+ if len(new_parent_element.contents) > 0:
+ # The new parent already contains children. We will be
+ # appending this tag's children to the end.
+ new_parents_last_child = new_parent_element.contents[-1]
+ new_parents_last_descendant_next_element = new_parents_last_descendant.next_element
+ else:
+ # The new parent contains no children.
+ new_parents_last_child = None
+ new_parents_last_descendant_next_element = new_parent_element.next_element
+
+ to_append = element.contents
+ append_after = new_parent.element.contents
+ if len(to_append) > 0:
+ # Set the first child's previous_element and previous_sibling
+ # to elements within the new parent
+ first_child = to_append[0]
+ first_child.previous_element = new_parents_last_descendant
+ first_child.previous_sibling = new_parents_last_child
+
+ # Fix the last child's next_element and next_sibling
+ last_child = to_append[-1]
+ last_child.next_element = new_parents_last_descendant_next_element
+ last_child.next_sibling = None
+
+ for child in to_append:
+ child.parent = new_parent_element
+ new_parent_element.contents.append(child)
+
+ # Now that this element has no children, change its .next_element.
+ element.contents = []
+ element.next_element = final_next_element
+
+ def cloneNode(self):
+ tag = self.soup.new_tag(self.element.name, self.namespace)
+ node = Element(tag, self.soup, self.namespace)
+ for key,value in self.attributes:
+ node.attributes[key] = value
+ return node
+
+ def hasContent(self):
+ return self.element.contents
+
+ def getNameTuple(self):
+ if self.namespace == None:
+ return namespaces["html"], self.name
+ else:
+ return self.namespace, self.name
+
+ nameTuple = property(getNameTuple)
+
+class TextNode(Element):
+ def __init__(self, element, soup):
+ html5lib.treebuilders._base.Node.__init__(self, None)
+ self.element = element
+ self.soup = soup
+
+ def cloneNode(self):
+ raise NotImplementedError
diff --git a/bitbake/lib/bs4/builder/_htmlparser.py b/bitbake/lib/bs4/builder/_htmlparser.py
new file mode 100644
index 0000000000..ca8d8b892b
--- /dev/null
+++ b/bitbake/lib/bs4/builder/_htmlparser.py
@@ -0,0 +1,258 @@
+"""Use the HTMLParser library to parse HTML files that aren't too bad."""
+
+__all__ = [
+ 'HTMLParserTreeBuilder',
+ ]
+
+from HTMLParser import (
+ HTMLParser,
+ HTMLParseError,
+ )
+import sys
+import warnings
+
+# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
+# argument, which we'd like to set to False. Unfortunately,
+# http://bugs.python.org/issue13273 makes strict=True a better bet
+# before Python 3.2.3.
+#
+# At the end of this file, we monkeypatch HTMLParser so that
+# strict=True works well on Python 3.2.2.
+major, minor, release = sys.version_info[:3]
+CONSTRUCTOR_TAKES_STRICT = (
+ major > 3
+ or (major == 3 and minor > 2)
+ or (major == 3 and minor == 2 and release >= 3))
+
+from bs4.element import (
+ CData,
+ Comment,
+ Declaration,
+ Doctype,
+ ProcessingInstruction,
+ )
+from bs4.dammit import EntitySubstitution, UnicodeDammit
+
+from bs4.builder import (
+ HTML,
+ HTMLTreeBuilder,
+ STRICT,
+ )
+
+
+HTMLPARSER = 'html.parser'
+
+class BeautifulSoupHTMLParser(HTMLParser):
+ def handle_starttag(self, name, attrs):
+ # XXX namespace
+ attr_dict = {}
+ for key, value in attrs:
+ # Change None attribute values to the empty string
+ # for consistency with the other tree builders.
+ if value is None:
+ value = ''
+ attr_dict[key] = value
+ attrvalue = '""'
+ self.soup.handle_starttag(name, None, None, attr_dict)
+
+ def handle_endtag(self, name):
+ self.soup.handle_endtag(name)
+
+ def handle_data(self, data):
+ self.soup.handle_data(data)
+
+ def handle_charref(self, name):
+ # XXX workaround for a bug in HTMLParser. Remove this once
+ # it's fixed.
+ if name.startswith('x'):
+ real_name = int(name.lstrip('x'), 16)
+ elif name.startswith('X'):
+ real_name = int(name.lstrip('X'), 16)
+ else:
+ real_name = int(name)
+
+ try:
+ data = unichr(real_name)
+ except (ValueError, OverflowError), e:
+ data = u"\N{REPLACEMENT CHARACTER}"
+
+ self.handle_data(data)
+
+ def handle_entityref(self, name):
+ character = EntitySubstitution.HTML_ENTITY_TO_CHARACTER.get(name)
+ if character is not None:
+ data = character
+ else:
+ data = "&%s;" % name
+ self.handle_data(data)
+
+ def handle_comment(self, data):
+ self.soup.endData()
+ self.soup.handle_data(data)
+ self.soup.endData(Comment)
+
+ def handle_decl(self, data):
+ self.soup.endData()
+ if data.startswith("DOCTYPE "):
+ data = data[len("DOCTYPE "):]
+ elif data == 'DOCTYPE':
+ # i.e. "<!DOCTYPE>"
+ data = ''
+ self.soup.handle_data(data)
+ self.soup.endData(Doctype)
+
+ def unknown_decl(self, data):
+ if data.upper().startswith('CDATA['):
+ cls = CData
+ data = data[len('CDATA['):]
+ else:
+ cls = Declaration
+ self.soup.endData()
+ self.soup.handle_data(data)
+ self.soup.endData(cls)
+
+ def handle_pi(self, data):
+ self.soup.endData()
+ if data.endswith("?") and data.lower().startswith("xml"):
+ # "An XHTML processing instruction using the trailing '?'
+ # will cause the '?' to be included in data." - HTMLParser
+ # docs.
+ #
+ # Strip the question mark so we don't end up with two
+ # question marks.
+ data = data[:-1]
+ self.soup.handle_data(data)
+ self.soup.endData(ProcessingInstruction)
+
+
+class HTMLParserTreeBuilder(HTMLTreeBuilder):
+
+ is_xml = False
+ features = [HTML, STRICT, HTMLPARSER]
+
+ def __init__(self, *args, **kwargs):
+ if CONSTRUCTOR_TAKES_STRICT:
+ kwargs['strict'] = False
+ self.parser_args = (args, kwargs)
+
+ def prepare_markup(self, markup, user_specified_encoding=None,
+ document_declared_encoding=None):
+ """
+ :return: A 4-tuple (markup, original encoding, encoding
+ declared within markup, whether any characters had to be
+ replaced with REPLACEMENT CHARACTER).
+ """
+ if isinstance(markup, unicode):
+ yield (markup, None, None, False)
+ return
+
+ try_encodings = [user_specified_encoding, document_declared_encoding]
+ dammit = UnicodeDammit(markup, try_encodings, is_html=True)
+ yield (dammit.markup, dammit.original_encoding,
+ dammit.declared_html_encoding,
+ dammit.contains_replacement_characters)
+
+ def feed(self, markup):
+ args, kwargs = self.parser_args
+ parser = BeautifulSoupHTMLParser(*args, **kwargs)
+ parser.soup = self.soup
+ try:
+ parser.feed(markup)
+ except HTMLParseError, e:
+ warnings.warn(RuntimeWarning(
+ "Python's built-in HTMLParser cannot parse the given document. This is not a bug in Beautiful Soup. The best solution is to install an external parser (lxml or html5lib), and use Beautiful Soup with that parser. See http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser for help."))
+ raise e
+
+# Patch 3.2 versions of HTMLParser earlier than 3.2.3 to use some
+# 3.2.3 code. This ensures they don't treat markup like <p></p> as a
+# string.
+#
+# XXX This code can be removed once most Python 3 users are on 3.2.3.
+if major == 3 and minor == 2 and not CONSTRUCTOR_TAKES_STRICT:
+ import re
+ attrfind_tolerant = re.compile(
+ r'\s*((?<=[\'"\s])[^\s/>][^\s/=>]*)(\s*=+\s*'
+ r'(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?')
+ HTMLParserTreeBuilder.attrfind_tolerant = attrfind_tolerant
+
+ locatestarttagend = re.compile(r"""
+ <[a-zA-Z][-.a-zA-Z0-9:_]* # tag name
+ (?:\s+ # whitespace before attribute name
+ (?:[a-zA-Z_][-.:a-zA-Z0-9_]* # attribute name
+ (?:\s*=\s* # value indicator
+ (?:'[^']*' # LITA-enclosed value
+ |\"[^\"]*\" # LIT-enclosed value
+ |[^'\">\s]+ # bare value
+ )
+ )?
+ )
+ )*
+ \s* # trailing whitespace
+""", re.VERBOSE)
+ BeautifulSoupHTMLParser.locatestarttagend = locatestarttagend
+
+ from html.parser import tagfind, attrfind
+
+ def parse_starttag(self, i):
+ self.__starttag_text = None
+ endpos = self.check_for_whole_start_tag(i)
+ if endpos < 0:
+ return endpos
+ rawdata = self.rawdata
+ self.__starttag_text = rawdata[i:endpos]
+
+ # Now parse the data between i+1 and j into a tag and attrs
+ attrs = []
+ match = tagfind.match(rawdata, i+1)
+ assert match, 'unexpected call to parse_starttag()'
+ k = match.end()
+ self.lasttag = tag = rawdata[i+1:k].lower()
+ while k < endpos:
+ if self.strict:
+ m = attrfind.match(rawdata, k)
+ else:
+ m = attrfind_tolerant.match(rawdata, k)
+ if not m:
+ break
+ attrname, rest, attrvalue = m.group(1, 2, 3)
+ if not rest:
+ attrvalue = None
+ elif attrvalue[:1] == '\'' == attrvalue[-1:] or \
+ attrvalue[:1] == '"' == attrvalue[-1:]:
+ attrvalue = attrvalue[1:-1]
+ if attrvalue:
+ attrvalue = self.unescape(attrvalue)
+ attrs.append((attrname.lower(), attrvalue))
+ k = m.end()
+
+ end = rawdata[k:endpos].strip()
+ if end not in (">", "/>"):
+ lineno, offset = self.getpos()
+ if "\n" in self.__starttag_text:
+ lineno = lineno + self.__starttag_text.count("\n")
+ offset = len(self.__starttag_text) \
+ - self.__starttag_text.rfind("\n")
+ else:
+ offset = offset + len(self.__starttag_text)
+ if self.strict:
+ self.error("junk characters in start tag: %r"
+ % (rawdata[k:endpos][:20],))
+ self.handle_data(rawdata[i:endpos])
+ return endpos
+ if end.endswith('/>'):
+ # XHTML-style empty tag: <span attr="value" />
+ self.handle_startendtag(tag, attrs)
+ else:
+ self.handle_starttag(tag, attrs)
+ if tag in self.CDATA_CONTENT_ELEMENTS:
+ self.set_cdata_mode(tag)
+ return endpos
+
+ def set_cdata_mode(self, elem):
+ self.cdata_elem = elem.lower()
+ self.interesting = re.compile(r'</\s*%s\s*>' % self.cdata_elem, re.I)
+
+ BeautifulSoupHTMLParser.parse_starttag = parse_starttag
+ BeautifulSoupHTMLParser.set_cdata_mode = set_cdata_mode
+
+ CONSTRUCTOR_TAKES_STRICT = True
diff --git a/bitbake/lib/bs4/builder/_lxml.py b/bitbake/lib/bs4/builder/_lxml.py
new file mode 100644
index 0000000000..fa5d49875e
--- /dev/null
+++ b/bitbake/lib/bs4/builder/_lxml.py
@@ -0,0 +1,233 @@
+__all__ = [
+ 'LXMLTreeBuilderForXML',
+ 'LXMLTreeBuilder',
+ ]
+
+from io import BytesIO
+from StringIO import StringIO
+import collections
+from lxml import etree
+from bs4.element import Comment, Doctype, NamespacedAttribute
+from bs4.builder import (
+ FAST,
+ HTML,
+ HTMLTreeBuilder,
+ PERMISSIVE,
+ ParserRejectedMarkup,
+ TreeBuilder,
+ XML)
+from bs4.dammit import EncodingDetector
+
+LXML = 'lxml'
+
+class LXMLTreeBuilderForXML(TreeBuilder):
+ DEFAULT_PARSER_CLASS = etree.XMLParser
+
+ is_xml = True
+
+ # Well, it's permissive by XML parser standards.
+ features = [LXML, XML, FAST, PERMISSIVE]
+
+ CHUNK_SIZE = 512
+
+ # This namespace mapping is specified in the XML Namespace
+ # standard.
+ DEFAULT_NSMAPS = {'http://www.w3.org/XML/1998/namespace' : "xml"}
+
+ def default_parser(self, encoding):
+ # This can either return a parser object or a class, which
+ # will be instantiated with default arguments.
+ if self._default_parser is not None:
+ return self._default_parser
+ return etree.XMLParser(
+ target=self, strip_cdata=False, recover=True, encoding=encoding)
+
+ def parser_for(self, encoding):
+ # Use the default parser.
+ parser = self.default_parser(encoding)
+
+ if isinstance(parser, collections.Callable):
+ # Instantiate the parser with default arguments
+ parser = parser(target=self, strip_cdata=False, encoding=encoding)
+ return parser
+
+ def __init__(self, parser=None, empty_element_tags=None):
+ # TODO: Issue a warning if parser is present but not a
+ # callable, since that means there's no way to create new
+ # parsers for different encodings.
+ self._default_parser = parser
+ if empty_element_tags is not None:
+ self.empty_element_tags = set(empty_element_tags)
+ self.soup = None
+ self.nsmaps = [self.DEFAULT_NSMAPS]
+
+ def _getNsTag(self, tag):
+ # Split the namespace URL out of a fully-qualified lxml tag
+ # name. Copied from lxml's src/lxml/sax.py.
+ if tag[0] == '{':
+ return tuple(tag[1:].split('}', 1))
+ else:
+ return (None, tag)
+
+ def prepare_markup(self, markup, user_specified_encoding=None,
+ document_declared_encoding=None):
+ """
+ :yield: A series of 4-tuples.
+ (markup, encoding, declared encoding,
+ has undergone character replacement)
+
+ Each 4-tuple represents a strategy for parsing the document.
+ """
+ if isinstance(markup, unicode):
+ # We were given Unicode. Maybe lxml can parse Unicode on
+ # this system?
+ yield markup, None, document_declared_encoding, False
+
+ if isinstance(markup, unicode):
+ # No, apparently not. Convert the Unicode to UTF-8 and
+ # tell lxml to parse it as UTF-8.
+ yield (markup.encode("utf8"), "utf8",
+ document_declared_encoding, False)
+
+ # Instead of using UnicodeDammit to convert the bytestring to
+ # Unicode using different encodings, use EncodingDetector to
+ # iterate over the encodings, and tell lxml to try to parse
+ # the document as each one in turn.
+ is_html = not self.is_xml
+ try_encodings = [user_specified_encoding, document_declared_encoding]
+ detector = EncodingDetector(markup, try_encodings, is_html)
+ for encoding in detector.encodings:
+ yield (detector.markup, encoding, document_declared_encoding, False)
+
+ def feed(self, markup):
+ if isinstance(markup, bytes):
+ markup = BytesIO(markup)
+ elif isinstance(markup, unicode):
+ markup = StringIO(markup)
+
+ # Call feed() at least once, even if the markup is empty,
+ # or the parser won't be initialized.
+ data = markup.read(self.CHUNK_SIZE)
+ try:
+ self.parser = self.parser_for(self.soup.original_encoding)
+ self.parser.feed(data)
+ while len(data) != 0:
+ # Now call feed() on the rest of the data, chunk by chunk.
+ data = markup.read(self.CHUNK_SIZE)
+ if len(data) != 0:
+ self.parser.feed(data)
+ self.parser.close()
+ except (UnicodeDecodeError, LookupError, etree.ParserError), e:
+ raise ParserRejectedMarkup(str(e))
+
+ def close(self):
+ self.nsmaps = [self.DEFAULT_NSMAPS]
+
+ def start(self, name, attrs, nsmap={}):
+ # Make sure attrs is a mutable dict--lxml may send an immutable dictproxy.
+ attrs = dict(attrs)
+ nsprefix = None
+ # Invert each namespace map as it comes in.
+ if len(self.nsmaps) > 1:
+ # There are no new namespaces for this tag, but
+ # non-default namespaces are in play, so we need a
+ # separate tag stack to know when they end.
+ self.nsmaps.append(None)
+ elif len(nsmap) > 0:
+ # A new namespace mapping has come into play.
+ inverted_nsmap = dict((value, key) for key, value in nsmap.items())
+ self.nsmaps.append(inverted_nsmap)
+ # Also treat the namespace mapping as a set of attributes on the
+ # tag, so we can recreate it later.
+ attrs = attrs.copy()
+ for prefix, namespace in nsmap.items():
+ attribute = NamespacedAttribute(
+ "xmlns", prefix, "http://www.w3.org/2000/xmlns/")
+ attrs[attribute] = namespace
+
+ # Namespaces are in play. Find any attributes that came in
+ # from lxml with namespaces attached to their names, and
+ # turn then into NamespacedAttribute objects.
+ new_attrs = {}
+ for attr, value in attrs.items():
+ namespace, attr = self._getNsTag(attr)
+ if namespace is None:
+ new_attrs[attr] = value
+ else:
+ nsprefix = self._prefix_for_namespace(namespace)
+ attr = NamespacedAttribute(nsprefix, attr, namespace)
+ new_attrs[attr] = value
+ attrs = new_attrs
+
+ namespace, name = self._getNsTag(name)
+ nsprefix = self._prefix_for_namespace(namespace)
+ self.soup.handle_starttag(name, namespace, nsprefix, attrs)
+
+ def _prefix_for_namespace(self, namespace):
+ """Find the currently active prefix for the given namespace."""
+ if namespace is None:
+ return None
+ for inverted_nsmap in reversed(self.nsmaps):
+ if inverted_nsmap is not None and namespace in inverted_nsmap:
+ return inverted_nsmap[namespace]
+ return None
+
+ def end(self, name):
+ self.soup.endData()
+ completed_tag = self.soup.tagStack[-1]
+ namespace, name = self._getNsTag(name)
+ nsprefix = None
+ if namespace is not None:
+ for inverted_nsmap in reversed(self.nsmaps):
+ if inverted_nsmap is not None and namespace in inverted_nsmap:
+ nsprefix = inverted_nsmap[namespace]
+ break
+ self.soup.handle_endtag(name, nsprefix)
+ if len(self.nsmaps) > 1:
+ # This tag, or one of its parents, introduced a namespace
+ # mapping, so pop it off the stack.
+ self.nsmaps.pop()
+
+ def pi(self, target, data):
+ pass
+
+ def data(self, content):
+ self.soup.handle_data(content)
+
+ def doctype(self, name, pubid, system):
+ self.soup.endData()
+ doctype = Doctype.for_name_and_ids(name, pubid, system)
+ self.soup.object_was_parsed(doctype)
+
+ def comment(self, content):
+ "Handle comments as Comment objects."
+ self.soup.endData()
+ self.soup.handle_data(content)
+ self.soup.endData(Comment)
+
+ def test_fragment_to_document(self, fragment):
+ """See `TreeBuilder`."""
+ return u'<?xml version="1.0" encoding="utf-8"?>\n%s' % fragment
+
+
+class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
+
+ features = [LXML, HTML, FAST, PERMISSIVE]
+ is_xml = False
+
+ def default_parser(self, encoding):
+ return etree.HTMLParser
+
+ def feed(self, markup):
+ encoding = self.soup.original_encoding
+ try:
+ self.parser = self.parser_for(encoding)
+ self.parser.feed(markup)
+ self.parser.close()
+ except (UnicodeDecodeError, LookupError, etree.ParserError), e:
+ raise ParserRejectedMarkup(str(e))
+
+
+ def test_fragment_to_document(self, fragment):
+ """See `TreeBuilder`."""
+ return u'<html><body>%s</body></html>' % fragment
diff --git a/bitbake/lib/bs4/dammit.py b/bitbake/lib/bs4/dammit.py
new file mode 100644
index 0000000000..59640b7ce3
--- /dev/null
+++ b/bitbake/lib/bs4/dammit.py
@@ -0,0 +1,829 @@
+# -*- coding: utf-8 -*-
+"""Beautiful Soup bonus library: Unicode, Dammit
+
+This library converts a bytestream to Unicode through any means
+necessary. It is heavily based on code from Mark Pilgrim's Universal
+Feed Parser. It works best on XML and XML, but it does not rewrite the
+XML or HTML to reflect a new encoding; that's the tree builder's job.
+"""
+
+import codecs
+from htmlentitydefs import codepoint2name
+import re
+import logging
+import string
+
+# Import a library to autodetect character encodings.
+chardet_type = None
+try:
+ # First try the fast C implementation.
+ # PyPI package: cchardet
+ import cchardet
+ def chardet_dammit(s):
+ return cchardet.detect(s)['encoding']
+except ImportError:
+ try:
+ # Fall back to the pure Python implementation
+ # Debian package: python-chardet
+ # PyPI package: chardet
+ import chardet
+ def chardet_dammit(s):
+ return chardet.detect(s)['encoding']
+ #import chardet.constants
+ #chardet.constants._debug = 1
+ except ImportError:
+ # No chardet available.
+ def chardet_dammit(s):
+ return None
+
+# Available from http://cjkpython.i18n.org/.
+try:
+ import iconv_codec
+except ImportError:
+ pass
+
+xml_encoding_re = re.compile(
+ '^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I)
+html_meta_re = re.compile(
+ '<\s*meta[^>]+charset\s*=\s*["\']?([^>]*?)[ /;\'">]'.encode(), re.I)
+
+class EntitySubstitution(object):
+
+ """Substitute XML or HTML entities for the corresponding characters."""
+
+ def _populate_class_variables():
+ lookup = {}
+ reverse_lookup = {}
+ characters_for_re = []
+ for codepoint, name in list(codepoint2name.items()):
+ character = unichr(codepoint)
+ if codepoint != 34:
+ # There's no point in turning the quotation mark into
+ # &quot;, unless it happens within an attribute value, which
+ # is handled elsewhere.
+ characters_for_re.append(character)
+ lookup[character] = name
+ # But we do want to turn &quot; into the quotation mark.
+ reverse_lookup[name] = character
+ re_definition = "[%s]" % "".join(characters_for_re)
+ return lookup, reverse_lookup, re.compile(re_definition)
+ (CHARACTER_TO_HTML_ENTITY, HTML_ENTITY_TO_CHARACTER,
+ CHARACTER_TO_HTML_ENTITY_RE) = _populate_class_variables()
+
+ CHARACTER_TO_XML_ENTITY = {
+ "'": "apos",
+ '"': "quot",
+ "&": "amp",
+ "<": "lt",
+ ">": "gt",
+ }
+
+ BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|"
+ "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)"
+ ")")
+
+ AMPERSAND_OR_BRACKET = re.compile("([<>&])")
+
+ @classmethod
+ def _substitute_html_entity(cls, matchobj):
+ entity = cls.CHARACTER_TO_HTML_ENTITY.get(matchobj.group(0))
+ return "&%s;" % entity
+
+ @classmethod
+ def _substitute_xml_entity(cls, matchobj):
+ """Used with a regular expression to substitute the
+ appropriate XML entity for an XML special character."""
+ entity = cls.CHARACTER_TO_XML_ENTITY[matchobj.group(0)]
+ return "&%s;" % entity
+
+ @classmethod
+ def quoted_attribute_value(self, value):
+ """Make a value into a quoted XML attribute, possibly escaping it.
+
+ Most strings will be quoted using double quotes.
+
+ Bob's Bar -> "Bob's Bar"
+
+ If a string contains double quotes, it will be quoted using
+ single quotes.
+
+ Welcome to "my bar" -> 'Welcome to "my bar"'
+
+ If a string contains both single and double quotes, the
+ double quotes will be escaped, and the string will be quoted
+ using double quotes.
+
+ Welcome to "Bob's Bar" -> "Welcome to &quot;Bob's bar&quot;
+ """
+ quote_with = '"'
+ if '"' in value:
+ if "'" in value:
+ # The string contains both single and double
+ # quotes. Turn the double quotes into
+ # entities. We quote the double quotes rather than
+ # the single quotes because the entity name is
+ # "&quot;" whether this is HTML or XML. If we
+ # quoted the single quotes, we'd have to decide
+ # between &apos; and &squot;.
+ replace_with = "&quot;"
+ value = value.replace('"', replace_with)
+ else:
+ # There are double quotes but no single quotes.
+ # We can use single quotes to quote the attribute.
+ quote_with = "'"
+ return quote_with + value + quote_with
+
+ @classmethod
+ def substitute_xml(cls, value, make_quoted_attribute=False):
+ """Substitute XML entities for special XML characters.
+
+ :param value: A string to be substituted. The less-than sign
+ will become &lt;, the greater-than sign will become &gt;,
+ and any ampersands will become &amp;. If you want ampersands
+ that appear to be part of an entity definition to be left
+ alone, use substitute_xml_containing_entities() instead.
+
+ :param make_quoted_attribute: If True, then the string will be
+ quoted, as befits an attribute value.
+ """
+ # Escape angle brackets and ampersands.
+ value = cls.AMPERSAND_OR_BRACKET.sub(
+ cls._substitute_xml_entity, value)
+
+ if make_quoted_attribute:
+ value = cls.quoted_attribute_value(value)
+ return value
+
+ @classmethod
+ def substitute_xml_containing_entities(
+ cls, value, make_quoted_attribute=False):
+ """Substitute XML entities for special XML characters.
+
+ :param value: A string to be substituted. The less-than sign will
+ become &lt;, the greater-than sign will become &gt;, and any
+ ampersands that are not part of an entity defition will
+ become &amp;.
+
+ :param make_quoted_attribute: If True, then the string will be
+ quoted, as befits an attribute value.
+ """
+ # Escape angle brackets, and ampersands that aren't part of
+ # entities.
+ value = cls.BARE_AMPERSAND_OR_BRACKET.sub(
+ cls._substitute_xml_entity, value)
+
+ if make_quoted_attribute:
+ value = cls.quoted_attribute_value(value)
+ return value
+
+ @classmethod
+ def substitute_html(cls, s):
+ """Replace certain Unicode characters with named HTML entities.
+
+ This differs from data.encode(encoding, 'xmlcharrefreplace')
+ in that the goal is to make the result more readable (to those
+ with ASCII displays) rather than to recover from
+ errors. There's absolutely nothing wrong with a UTF-8 string
+ containg a LATIN SMALL LETTER E WITH ACUTE, but replacing that
+ character with "&eacute;" will make it more readable to some
+ people.
+ """
+ return cls.CHARACTER_TO_HTML_ENTITY_RE.sub(
+ cls._substitute_html_entity, s)
+
+
+class EncodingDetector:
+ """Suggests a number of possible encodings for a bytestring.
+
+ Order of precedence:
+
+ 1. Encodings you specifically tell EncodingDetector to try first
+ (the override_encodings argument to the constructor).
+
+ 2. An encoding declared within the bytestring itself, either in an
+ XML declaration (if the bytestring is to be interpreted as an XML
+ document), or in a <meta> tag (if the bytestring is to be
+ interpreted as an HTML document.)
+
+ 3. An encoding detected through textual analysis by chardet,
+ cchardet, or a similar external library.
+
+ 4. UTF-8.
+
+ 5. Windows-1252.
+ """
+ def __init__(self, markup, override_encodings=None, is_html=False):
+ self.override_encodings = override_encodings or []
+ self.chardet_encoding = None
+ self.is_html = is_html
+ self.declared_encoding = None
+
+ # First order of business: strip a byte-order mark.
+ self.markup, self.sniffed_encoding = self.strip_byte_order_mark(markup)
+
+ def _usable(self, encoding, tried):
+ if encoding is not None:
+ encoding = encoding.lower()
+ if encoding not in tried:
+ tried.add(encoding)
+ return True
+ return False
+
+ @property
+ def encodings(self):
+ """Yield a number of encodings that might work for this markup."""
+ tried = set()
+ for e in self.override_encodings:
+ if self._usable(e, tried):
+ yield e
+
+ # Did the document originally start with a byte-order mark
+ # that indicated its encoding?
+ if self._usable(self.sniffed_encoding, tried):
+ yield self.sniffed_encoding
+
+ # Look within the document for an XML or HTML encoding
+ # declaration.
+ if self.declared_encoding is None:
+ self.declared_encoding = self.find_declared_encoding(
+ self.markup, self.is_html)
+ if self._usable(self.declared_encoding, tried):
+ yield self.declared_encoding
+
+ # Use third-party character set detection to guess at the
+ # encoding.
+ if self.chardet_encoding is None:
+ self.chardet_encoding = chardet_dammit(self.markup)
+ if self._usable(self.chardet_encoding, tried):
+ yield self.chardet_encoding
+
+ # As a last-ditch effort, try utf-8 and windows-1252.
+ for e in ('utf-8', 'windows-1252'):
+ if self._usable(e, tried):
+ yield e
+
+ @classmethod
+ def strip_byte_order_mark(cls, data):
+ """If a byte-order mark is present, strip it and return the encoding it implies."""
+ encoding = None
+ if (len(data) >= 4) and (data[:2] == b'\xfe\xff') \
+ and (data[2:4] != '\x00\x00'):
+ encoding = 'utf-16be'
+ data = data[2:]
+ elif (len(data) >= 4) and (data[:2] == b'\xff\xfe') \
+ and (data[2:4] != '\x00\x00'):
+ encoding = 'utf-16le'
+ data = data[2:]
+ elif data[:3] == b'\xef\xbb\xbf':
+ encoding = 'utf-8'
+ data = data[3:]
+ elif data[:4] == b'\x00\x00\xfe\xff':
+ encoding = 'utf-32be'
+ data = data[4:]
+ elif data[:4] == b'\xff\xfe\x00\x00':
+ encoding = 'utf-32le'
+ data = data[4:]
+ return data, encoding
+
+ @classmethod
+ def find_declared_encoding(cls, markup, is_html=False, search_entire_document=False):
+ """Given a document, tries to find its declared encoding.
+
+ An XML encoding is declared at the beginning of the document.
+
+ An HTML encoding is declared in a <meta> tag, hopefully near the
+ beginning of the document.
+ """
+ if search_entire_document:
+ xml_endpos = html_endpos = len(markup)
+ else:
+ xml_endpos = 1024
+ html_endpos = max(2048, int(len(markup) * 0.05))
+
+ declared_encoding = None
+ declared_encoding_match = xml_encoding_re.search(markup, endpos=xml_endpos)
+ if not declared_encoding_match and is_html:
+ declared_encoding_match = html_meta_re.search(markup, endpos=html_endpos)
+ if declared_encoding_match is not None:
+ declared_encoding = declared_encoding_match.groups()[0].decode(
+ 'ascii')
+ if declared_encoding:
+ return declared_encoding.lower()
+ return None
+
+class UnicodeDammit:
+ """A class for detecting the encoding of a *ML document and
+ converting it to a Unicode string. If the source encoding is
+ windows-1252, can replace MS smart quotes with their HTML or XML
+ equivalents."""
+
+ # This dictionary maps commonly seen values for "charset" in HTML
+ # meta tags to the corresponding Python codec names. It only covers
+ # values that aren't in Python's aliases and can't be determined
+ # by the heuristics in find_codec.
+ CHARSET_ALIASES = {"macintosh": "mac-roman",
+ "x-sjis": "shift-jis"}
+
+ ENCODINGS_WITH_SMART_QUOTES = [
+ "windows-1252",
+ "iso-8859-1",
+ "iso-8859-2",
+ ]
+
+ def __init__(self, markup, override_encodings=[],
+ smart_quotes_to=None, is_html=False):
+ self.smart_quotes_to = smart_quotes_to
+ self.tried_encodings = []
+ self.contains_replacement_characters = False
+ self.is_html = is_html
+
+ self.detector = EncodingDetector(markup, override_encodings, is_html)
+
+ # Short-circuit if the data is in Unicode to begin with.
+ if isinstance(markup, unicode) or markup == '':
+ self.markup = markup
+ self.unicode_markup = unicode(markup)
+ self.original_encoding = None
+ return
+
+ # The encoding detector may have stripped a byte-order mark.
+ # Use the stripped markup from this point on.
+ self.markup = self.detector.markup
+
+ u = None
+ for encoding in self.detector.encodings:
+ markup = self.detector.markup
+ u = self._convert_from(encoding)
+ if u is not None:
+ break
+
+ if not u:
+ # None of the encodings worked. As an absolute last resort,
+ # try them again with character replacement.
+
+ for encoding in self.detector.encodings:
+ if encoding != "ascii":
+ u = self._convert_from(encoding, "replace")
+ if u is not None:
+ logging.warning(
+ "Some characters could not be decoded, and were "
+ "replaced with REPLACEMENT CHARACTER.")
+ self.contains_replacement_characters = True
+ break
+
+ # If none of that worked, we could at this point force it to
+ # ASCII, but that would destroy so much data that I think
+ # giving up is better.
+ self.unicode_markup = u
+ if not u:
+ self.original_encoding = None
+
+ def _sub_ms_char(self, match):
+ """Changes a MS smart quote character to an XML or HTML
+ entity, or an ASCII character."""
+ orig = match.group(1)
+ if self.smart_quotes_to == 'ascii':
+ sub = self.MS_CHARS_TO_ASCII.get(orig).encode()
+ else:
+ sub = self.MS_CHARS.get(orig)
+ if type(sub) == tuple:
+ if self.smart_quotes_to == 'xml':
+ sub = '&#x'.encode() + sub[1].encode() + ';'.encode()
+ else:
+ sub = '&'.encode() + sub[0].encode() + ';'.encode()
+ else:
+ sub = sub.encode()
+ return sub
+
+ def _convert_from(self, proposed, errors="strict"):
+ proposed = self.find_codec(proposed)
+ if not proposed or (proposed, errors) in self.tried_encodings:
+ return None
+ self.tried_encodings.append((proposed, errors))
+ markup = self.markup
+ # Convert smart quotes to HTML if coming from an encoding
+ # that might have them.
+ if (self.smart_quotes_to is not None
+ and proposed in self.ENCODINGS_WITH_SMART_QUOTES):
+ smart_quotes_re = b"([\x80-\x9f])"
+ smart_quotes_compiled = re.compile(smart_quotes_re)
+ markup = smart_quotes_compiled.sub(self._sub_ms_char, markup)
+
+ try:
+ #print "Trying to convert document to %s (errors=%s)" % (
+ # proposed, errors)
+ u = self._to_unicode(markup, proposed, errors)
+ self.markup = u
+ self.original_encoding = proposed
+ except Exception as e:
+ #print "That didn't work!"
+ #print e
+ return None
+ #print "Correct encoding: %s" % proposed
+ return self.markup
+
+ def _to_unicode(self, data, encoding, errors="strict"):
+ '''Given a string and its encoding, decodes the string into Unicode.
+ %encoding is a string recognized by encodings.aliases'''
+ return unicode(data, encoding, errors)
+
+ @property
+ def declared_html_encoding(self):
+ if not self.is_html:
+ return None
+ return self.detector.declared_encoding
+
+ def find_codec(self, charset):
+ value = (self._codec(self.CHARSET_ALIASES.get(charset, charset))
+ or (charset and self._codec(charset.replace("-", "")))
+ or (charset and self._codec(charset.replace("-", "_")))
+ or (charset and charset.lower())
+ or charset
+ )
+ if value:
+ return value.lower()
+ return None
+
+ def _codec(self, charset):
+ if not charset:
+ return charset
+ codec = None
+ try:
+ codecs.lookup(charset)
+ codec = charset
+ except (LookupError, ValueError):
+ pass
+ return codec
+
+
+ # A partial mapping of ISO-Latin-1 to HTML entities/XML numeric entities.
+ MS_CHARS = {b'\x80': ('euro', '20AC'),
+ b'\x81': ' ',
+ b'\x82': ('sbquo', '201A'),
+ b'\x83': ('fnof', '192'),
+ b'\x84': ('bdquo', '201E'),
+ b'\x85': ('hellip', '2026'),
+ b'\x86': ('dagger', '2020'),
+ b'\x87': ('Dagger', '2021'),
+ b'\x88': ('circ', '2C6'),
+ b'\x89': ('permil', '2030'),
+ b'\x8A': ('Scaron', '160'),
+ b'\x8B': ('lsaquo', '2039'),
+ b'\x8C': ('OElig', '152'),
+ b'\x8D': '?',
+ b'\x8E': ('#x17D', '17D'),
+ b'\x8F': '?',
+ b'\x90': '?',
+ b'\x91': ('lsquo', '2018'),
+ b'\x92': ('rsquo', '2019'),
+ b'\x93': ('ldquo', '201C'),
+ b'\x94': ('rdquo', '201D'),
+ b'\x95': ('bull', '2022'),
+ b'\x96': ('ndash', '2013'),
+ b'\x97': ('mdash', '2014'),
+ b'\x98': ('tilde', '2DC'),
+ b'\x99': ('trade', '2122'),
+ b'\x9a': ('scaron', '161'),
+ b'\x9b': ('rsaquo', '203A'),
+ b'\x9c': ('oelig', '153'),
+ b'\x9d': '?',
+ b'\x9e': ('#x17E', '17E'),
+ b'\x9f': ('Yuml', ''),}
+
+ # A parochial partial mapping of ISO-Latin-1 to ASCII. Contains
+ # horrors like stripping diacritical marks to turn á into a, but also
+ # contains non-horrors like turning “ into ".
+ MS_CHARS_TO_ASCII = {
+ b'\x80' : 'EUR',
+ b'\x81' : ' ',
+ b'\x82' : ',',
+ b'\x83' : 'f',
+ b'\x84' : ',,',
+ b'\x85' : '...',
+ b'\x86' : '+',
+ b'\x87' : '++',
+ b'\x88' : '^',
+ b'\x89' : '%',
+ b'\x8a' : 'S',
+ b'\x8b' : '<',
+ b'\x8c' : 'OE',
+ b'\x8d' : '?',
+ b'\x8e' : 'Z',
+ b'\x8f' : '?',
+ b'\x90' : '?',
+ b'\x91' : "'",
+ b'\x92' : "'",
+ b'\x93' : '"',
+ b'\x94' : '"',
+ b'\x95' : '*',
+ b'\x96' : '-',
+ b'\x97' : '--',
+ b'\x98' : '~',
+ b'\x99' : '(TM)',
+ b'\x9a' : 's',
+ b'\x9b' : '>',
+ b'\x9c' : 'oe',
+ b'\x9d' : '?',
+ b'\x9e' : 'z',
+ b'\x9f' : 'Y',
+ b'\xa0' : ' ',
+ b'\xa1' : '!',
+ b'\xa2' : 'c',
+ b'\xa3' : 'GBP',
+ b'\xa4' : '$', #This approximation is especially parochial--this is the
+ #generic currency symbol.
+ b'\xa5' : 'YEN',
+ b'\xa6' : '|',
+ b'\xa7' : 'S',
+ b'\xa8' : '..',
+ b'\xa9' : '',
+ b'\xaa' : '(th)',
+ b'\xab' : '<<',
+ b'\xac' : '!',
+ b'\xad' : ' ',
+ b'\xae' : '(R)',
+ b'\xaf' : '-',
+ b'\xb0' : 'o',
+ b'\xb1' : '+-',
+ b'\xb2' : '2',
+ b'\xb3' : '3',
+ b'\xb4' : ("'", 'acute'),
+ b'\xb5' : 'u',
+ b'\xb6' : 'P',
+ b'\xb7' : '*',
+ b'\xb8' : ',',
+ b'\xb9' : '1',
+ b'\xba' : '(th)',
+ b'\xbb' : '>>',
+ b'\xbc' : '1/4',
+ b'\xbd' : '1/2',
+ b'\xbe' : '3/4',
+ b'\xbf' : '?',
+ b'\xc0' : 'A',
+ b'\xc1' : 'A',
+ b'\xc2' : 'A',
+ b'\xc3' : 'A',
+ b'\xc4' : 'A',
+ b'\xc5' : 'A',
+ b'\xc6' : 'AE',
+ b'\xc7' : 'C',
+ b'\xc8' : 'E',
+ b'\xc9' : 'E',
+ b'\xca' : 'E',
+ b'\xcb' : 'E',
+ b'\xcc' : 'I',
+ b'\xcd' : 'I',
+ b'\xce' : 'I',
+ b'\xcf' : 'I',
+ b'\xd0' : 'D',
+ b'\xd1' : 'N',
+ b'\xd2' : 'O',
+ b'\xd3' : 'O',
+ b'\xd4' : 'O',
+ b'\xd5' : 'O',
+ b'\xd6' : 'O',
+ b'\xd7' : '*',
+ b'\xd8' : 'O',
+ b'\xd9' : 'U',
+ b'\xda' : 'U',
+ b'\xdb' : 'U',
+ b'\xdc' : 'U',
+ b'\xdd' : 'Y',
+ b'\xde' : 'b',
+ b'\xdf' : 'B',
+ b'\xe0' : 'a',
+ b'\xe1' : 'a',
+ b'\xe2' : 'a',
+ b'\xe3' : 'a',
+ b'\xe4' : 'a',
+ b'\xe5' : 'a',
+ b'\xe6' : 'ae',
+ b'\xe7' : 'c',
+ b'\xe8' : 'e',
+ b'\xe9' : 'e',
+ b'\xea' : 'e',
+ b'\xeb' : 'e',
+ b'\xec' : 'i',
+ b'\xed' : 'i',
+ b'\xee' : 'i',
+ b'\xef' : 'i',
+ b'\xf0' : 'o',
+ b'\xf1' : 'n',
+ b'\xf2' : 'o',
+ b'\xf3' : 'o',
+ b'\xf4' : 'o',
+ b'\xf5' : 'o',
+ b'\xf6' : 'o',
+ b'\xf7' : '/',
+ b'\xf8' : 'o',
+ b'\xf9' : 'u',
+ b'\xfa' : 'u',
+ b'\xfb' : 'u',
+ b'\xfc' : 'u',
+ b'\xfd' : 'y',
+ b'\xfe' : 'b',
+ b'\xff' : 'y',
+ }
+
+ # A map used when removing rogue Windows-1252/ISO-8859-1
+ # characters in otherwise UTF-8 documents.
+ #
+ # Note that \x81, \x8d, \x8f, \x90, and \x9d are undefined in
+ # Windows-1252.
+ WINDOWS_1252_TO_UTF8 = {
+ 0x80 : b'\xe2\x82\xac', # €
+ 0x82 : b'\xe2\x80\x9a', # ‚
+ 0x83 : b'\xc6\x92', # Æ’
+ 0x84 : b'\xe2\x80\x9e', # „
+ 0x85 : b'\xe2\x80\xa6', # …
+ 0x86 : b'\xe2\x80\xa0', # †
+ 0x87 : b'\xe2\x80\xa1', # ‡
+ 0x88 : b'\xcb\x86', # ˆ
+ 0x89 : b'\xe2\x80\xb0', # ‰
+ 0x8a : b'\xc5\xa0', # Å 
+ 0x8b : b'\xe2\x80\xb9', # ‹
+ 0x8c : b'\xc5\x92', # Å’
+ 0x8e : b'\xc5\xbd', # Ž
+ 0x91 : b'\xe2\x80\x98', # ‘
+ 0x92 : b'\xe2\x80\x99', # ’
+ 0x93 : b'\xe2\x80\x9c', # “
+ 0x94 : b'\xe2\x80\x9d', # â€
+ 0x95 : b'\xe2\x80\xa2', # •
+ 0x96 : b'\xe2\x80\x93', # –
+ 0x97 : b'\xe2\x80\x94', # —
+ 0x98 : b'\xcb\x9c', # ˜
+ 0x99 : b'\xe2\x84\xa2', # â„¢
+ 0x9a : b'\xc5\xa1', # Å¡
+ 0x9b : b'\xe2\x80\xba', # ›
+ 0x9c : b'\xc5\x93', # Å“
+ 0x9e : b'\xc5\xbe', # ž
+ 0x9f : b'\xc5\xb8', # Ÿ
+ 0xa0 : b'\xc2\xa0', #  
+ 0xa1 : b'\xc2\xa1', # ¡
+ 0xa2 : b'\xc2\xa2', # ¢
+ 0xa3 : b'\xc2\xa3', # £
+ 0xa4 : b'\xc2\xa4', # ¤
+ 0xa5 : b'\xc2\xa5', # ¥
+ 0xa6 : b'\xc2\xa6', # ¦
+ 0xa7 : b'\xc2\xa7', # §
+ 0xa8 : b'\xc2\xa8', # ¨
+ 0xa9 : b'\xc2\xa9', # ©
+ 0xaa : b'\xc2\xaa', # ª
+ 0xab : b'\xc2\xab', # «
+ 0xac : b'\xc2\xac', # ¬
+ 0xad : b'\xc2\xad', # ­
+ 0xae : b'\xc2\xae', # ®
+ 0xaf : b'\xc2\xaf', # ¯
+ 0xb0 : b'\xc2\xb0', # °
+ 0xb1 : b'\xc2\xb1', # ±
+ 0xb2 : b'\xc2\xb2', # ²
+ 0xb3 : b'\xc2\xb3', # ³
+ 0xb4 : b'\xc2\xb4', # ´
+ 0xb5 : b'\xc2\xb5', # µ
+ 0xb6 : b'\xc2\xb6', # ¶
+ 0xb7 : b'\xc2\xb7', # ·
+ 0xb8 : b'\xc2\xb8', # ¸
+ 0xb9 : b'\xc2\xb9', # ¹
+ 0xba : b'\xc2\xba', # º
+ 0xbb : b'\xc2\xbb', # »
+ 0xbc : b'\xc2\xbc', # ¼
+ 0xbd : b'\xc2\xbd', # ½
+ 0xbe : b'\xc2\xbe', # ¾
+ 0xbf : b'\xc2\xbf', # ¿
+ 0xc0 : b'\xc3\x80', # À
+ 0xc1 : b'\xc3\x81', # Ã
+ 0xc2 : b'\xc3\x82', # Â
+ 0xc3 : b'\xc3\x83', # Ã
+ 0xc4 : b'\xc3\x84', # Ä
+ 0xc5 : b'\xc3\x85', # Ã…
+ 0xc6 : b'\xc3\x86', # Æ
+ 0xc7 : b'\xc3\x87', # Ç
+ 0xc8 : b'\xc3\x88', # È
+ 0xc9 : b'\xc3\x89', # É
+ 0xca : b'\xc3\x8a', # Ê
+ 0xcb : b'\xc3\x8b', # Ë
+ 0xcc : b'\xc3\x8c', # Ì
+ 0xcd : b'\xc3\x8d', # Ã
+ 0xce : b'\xc3\x8e', # ÃŽ
+ 0xcf : b'\xc3\x8f', # Ã
+ 0xd0 : b'\xc3\x90', # Ã
+ 0xd1 : b'\xc3\x91', # Ñ
+ 0xd2 : b'\xc3\x92', # Ã’
+ 0xd3 : b'\xc3\x93', # Ó
+ 0xd4 : b'\xc3\x94', # Ô
+ 0xd5 : b'\xc3\x95', # Õ
+ 0xd6 : b'\xc3\x96', # Ö
+ 0xd7 : b'\xc3\x97', # ×
+ 0xd8 : b'\xc3\x98', # Ø
+ 0xd9 : b'\xc3\x99', # Ù
+ 0xda : b'\xc3\x9a', # Ú
+ 0xdb : b'\xc3\x9b', # Û
+ 0xdc : b'\xc3\x9c', # Ü
+ 0xdd : b'\xc3\x9d', # Ã
+ 0xde : b'\xc3\x9e', # Þ
+ 0xdf : b'\xc3\x9f', # ß
+ 0xe0 : b'\xc3\xa0', # à
+ 0xe1 : b'\xa1', # á
+ 0xe2 : b'\xc3\xa2', # â
+ 0xe3 : b'\xc3\xa3', # ã
+ 0xe4 : b'\xc3\xa4', # ä
+ 0xe5 : b'\xc3\xa5', # å
+ 0xe6 : b'\xc3\xa6', # æ
+ 0xe7 : b'\xc3\xa7', # ç
+ 0xe8 : b'\xc3\xa8', # è
+ 0xe9 : b'\xc3\xa9', # é
+ 0xea : b'\xc3\xaa', # ê
+ 0xeb : b'\xc3\xab', # ë
+ 0xec : b'\xc3\xac', # ì
+ 0xed : b'\xc3\xad', # í
+ 0xee : b'\xc3\xae', # î
+ 0xef : b'\xc3\xaf', # ï
+ 0xf0 : b'\xc3\xb0', # ð
+ 0xf1 : b'\xc3\xb1', # ñ
+ 0xf2 : b'\xc3\xb2', # ò
+ 0xf3 : b'\xc3\xb3', # ó
+ 0xf4 : b'\xc3\xb4', # ô
+ 0xf5 : b'\xc3\xb5', # õ
+ 0xf6 : b'\xc3\xb6', # ö
+ 0xf7 : b'\xc3\xb7', # ÷
+ 0xf8 : b'\xc3\xb8', # ø
+ 0xf9 : b'\xc3\xb9', # ù
+ 0xfa : b'\xc3\xba', # ú
+ 0xfb : b'\xc3\xbb', # û
+ 0xfc : b'\xc3\xbc', # ü
+ 0xfd : b'\xc3\xbd', # ý
+ 0xfe : b'\xc3\xbe', # þ
+ }
+
+ MULTIBYTE_MARKERS_AND_SIZES = [
+ (0xc2, 0xdf, 2), # 2-byte characters start with a byte C2-DF
+ (0xe0, 0xef, 3), # 3-byte characters start with E0-EF
+ (0xf0, 0xf4, 4), # 4-byte characters start with F0-F4
+ ]
+
+ FIRST_MULTIBYTE_MARKER = MULTIBYTE_MARKERS_AND_SIZES[0][0]
+ LAST_MULTIBYTE_MARKER = MULTIBYTE_MARKERS_AND_SIZES[-1][1]
+
+ @classmethod
+ def detwingle(cls, in_bytes, main_encoding="utf8",
+ embedded_encoding="windows-1252"):
+ """Fix characters from one encoding embedded in some other encoding.
+
+ Currently the only situation supported is Windows-1252 (or its
+ subset ISO-8859-1), embedded in UTF-8.
+
+ The input must be a bytestring. If you've already converted
+ the document to Unicode, you're too late.
+
+ The output is a bytestring in which `embedded_encoding`
+ characters have been converted to their `main_encoding`
+ equivalents.
+ """
+ if embedded_encoding.replace('_', '-').lower() not in (
+ 'windows-1252', 'windows_1252'):
+ raise NotImplementedError(
+ "Windows-1252 and ISO-8859-1 are the only currently supported "
+ "embedded encodings.")
+
+ if main_encoding.lower() not in ('utf8', 'utf-8'):
+ raise NotImplementedError(
+ "UTF-8 is the only currently supported main encoding.")
+
+ byte_chunks = []
+
+ chunk_start = 0
+ pos = 0
+ while pos < len(in_bytes):
+ byte = in_bytes[pos]
+ if not isinstance(byte, int):
+ # Python 2.x
+ byte = ord(byte)
+ if (byte >= cls.FIRST_MULTIBYTE_MARKER
+ and byte <= cls.LAST_MULTIBYTE_MARKER):
+ # This is the start of a UTF-8 multibyte character. Skip
+ # to the end.
+ for start, end, size in cls.MULTIBYTE_MARKERS_AND_SIZES:
+ if byte >= start and byte <= end:
+ pos += size
+ break
+ elif byte >= 0x80 and byte in cls.WINDOWS_1252_TO_UTF8:
+ # We found a Windows-1252 character!
+ # Save the string up to this point as a chunk.
+ byte_chunks.append(in_bytes[chunk_start:pos])
+
+ # Now translate the Windows-1252 character into UTF-8
+ # and add it as another, one-byte chunk.
+ byte_chunks.append(cls.WINDOWS_1252_TO_UTF8[byte])
+ pos += 1
+ chunk_start = pos
+ else:
+ # Go on to the next character.
+ pos += 1
+ if chunk_start == 0:
+ # The string is unchanged.
+ return in_bytes
+ else:
+ # Store the final chunk.
+ byte_chunks.append(in_bytes[chunk_start:])
+ return b''.join(byte_chunks)
+
diff --git a/bitbake/lib/bs4/diagnose.py b/bitbake/lib/bs4/diagnose.py
new file mode 100644
index 0000000000..4d0b00afad
--- /dev/null
+++ b/bitbake/lib/bs4/diagnose.py
@@ -0,0 +1,204 @@
+"""Diagnostic functions, mainly for use when doing tech support."""
+import cProfile
+from StringIO import StringIO
+from HTMLParser import HTMLParser
+import bs4
+from bs4 import BeautifulSoup, __version__
+from bs4.builder import builder_registry
+
+import os
+import pstats
+import random
+import tempfile
+import time
+import traceback
+import sys
+import cProfile
+
+def diagnose(data):
+ """Diagnostic suite for isolating common problems."""
+ print "Diagnostic running on Beautiful Soup %s" % __version__
+ print "Python version %s" % sys.version
+
+ basic_parsers = ["html.parser", "html5lib", "lxml"]
+ for name in basic_parsers:
+ for builder in builder_registry.builders:
+ if name in builder.features:
+ break
+ else:
+ basic_parsers.remove(name)
+ print (
+ "I noticed that %s is not installed. Installing it may help." %
+ name)
+
+ if 'lxml' in basic_parsers:
+ basic_parsers.append(["lxml", "xml"])
+ from lxml import etree
+ print "Found lxml version %s" % ".".join(map(str,etree.LXML_VERSION))
+
+ if 'html5lib' in basic_parsers:
+ import html5lib
+ print "Found html5lib version %s" % html5lib.__version__
+
+ if hasattr(data, 'read'):
+ data = data.read()
+ elif os.path.exists(data):
+ print '"%s" looks like a filename. Reading data from the file.' % data
+ data = open(data).read()
+ elif data.startswith("http:") or data.startswith("https:"):
+ print '"%s" looks like a URL. Beautiful Soup is not an HTTP client.' % data
+ print "You need to use some other library to get the document behind the URL, and feed that document to Beautiful Soup."
+ return
+ print
+
+ for parser in basic_parsers:
+ print "Trying to parse your markup with %s" % parser
+ success = False
+ try:
+ soup = BeautifulSoup(data, parser)
+ success = True
+ except Exception, e:
+ print "%s could not parse the markup." % parser
+ traceback.print_exc()
+ if success:
+ print "Here's what %s did with the markup:" % parser
+ print soup.prettify()
+
+ print "-" * 80
+
+def lxml_trace(data, html=True, **kwargs):
+ """Print out the lxml events that occur during parsing.
+
+ This lets you see how lxml parses a document when no Beautiful
+ Soup code is running.
+ """
+ from lxml import etree
+ for event, element in etree.iterparse(StringIO(data), html=html, **kwargs):
+ print("%s, %4s, %s" % (event, element.tag, element.text))
+
+class AnnouncingParser(HTMLParser):
+ """Announces HTMLParser parse events, without doing anything else."""
+
+ def _p(self, s):
+ print(s)
+
+ def handle_starttag(self, name, attrs):
+ self._p("%s START" % name)
+
+ def handle_endtag(self, name):
+ self._p("%s END" % name)
+
+ def handle_data(self, data):
+ self._p("%s DATA" % data)
+
+ def handle_charref(self, name):
+ self._p("%s CHARREF" % name)
+
+ def handle_entityref(self, name):
+ self._p("%s ENTITYREF" % name)
+
+ def handle_comment(self, data):
+ self._p("%s COMMENT" % data)
+
+ def handle_decl(self, data):
+ self._p("%s DECL" % data)
+
+ def unknown_decl(self, data):
+ self._p("%s UNKNOWN-DECL" % data)
+
+ def handle_pi(self, data):
+ self._p("%s PI" % data)
+
+def htmlparser_trace(data):
+ """Print out the HTMLParser events that occur during parsing.
+
+ This lets you see how HTMLParser parses a document when no
+ Beautiful Soup code is running.
+ """
+ parser = AnnouncingParser()
+ parser.feed(data)
+
+_vowels = "aeiou"
+_consonants = "bcdfghjklmnpqrstvwxyz"
+
+def rword(length=5):
+ "Generate a random word-like string."
+ s = ''
+ for i in range(length):
+ if i % 2 == 0:
+ t = _consonants
+ else:
+ t = _vowels
+ s += random.choice(t)
+ return s
+
+def rsentence(length=4):
+ "Generate a random sentence-like string."
+ return " ".join(rword(random.randint(4,9)) for i in range(length))
+
+def rdoc(num_elements=1000):
+ """Randomly generate an invalid HTML document."""
+ tag_names = ['p', 'div', 'span', 'i', 'b', 'script', 'table']
+ elements = []
+ for i in range(num_elements):
+ choice = random.randint(0,3)
+ if choice == 0:
+ # New tag.
+ tag_name = random.choice(tag_names)
+ elements.append("<%s>" % tag_name)
+ elif choice == 1:
+ elements.append(rsentence(random.randint(1,4)))
+ elif choice == 2:
+ # Close a tag.
+ tag_name = random.choice(tag_names)
+ elements.append("</%s>" % tag_name)
+ return "<html>" + "\n".join(elements) + "</html>"
+
+def benchmark_parsers(num_elements=100000):
+ """Very basic head-to-head performance benchmark."""
+ print "Comparative parser benchmark on Beautiful Soup %s" % __version__
+ data = rdoc(num_elements)
+ print "Generated a large invalid HTML document (%d bytes)." % len(data)
+
+ for parser in ["lxml", ["lxml", "html"], "html5lib", "html.parser"]:
+ success = False
+ try:
+ a = time.time()
+ soup = BeautifulSoup(data, parser)
+ b = time.time()
+ success = True
+ except Exception, e:
+ print "%s could not parse the markup." % parser
+ traceback.print_exc()
+ if success:
+ print "BS4+%s parsed the markup in %.2fs." % (parser, b-a)
+
+ from lxml import etree
+ a = time.time()
+ etree.HTML(data)
+ b = time.time()
+ print "Raw lxml parsed the markup in %.2fs." % (b-a)
+
+ import html5lib
+ parser = html5lib.HTMLParser()
+ a = time.time()
+ parser.parse(data)
+ b = time.time()
+ print "Raw html5lib parsed the markup in %.2fs." % (b-a)
+
+def profile(num_elements=100000, parser="lxml"):
+
+ filehandle = tempfile.NamedTemporaryFile()
+ filename = filehandle.name
+
+ data = rdoc(num_elements)
+ vars = dict(bs4=bs4, data=data, parser=parser)
+ cProfile.runctx('bs4.BeautifulSoup(data, parser)' , vars, vars, filename)
+
+ stats = pstats.Stats(filename)
+ # stats.strip_dirs()
+ stats.sort_stats("cumulative")
+ stats.print_stats('_html5lib|bs4', 50)
+
+if __name__ == '__main__':
+ diagnose(sys.stdin.read())
diff --git a/bitbake/lib/bs4/element.py b/bitbake/lib/bs4/element.py
new file mode 100644
index 0000000000..da9afdf48e
--- /dev/null
+++ b/bitbake/lib/bs4/element.py
@@ -0,0 +1,1611 @@
+import collections
+import re
+import sys
+import warnings
+from bs4.dammit import EntitySubstitution
+
+DEFAULT_OUTPUT_ENCODING = "utf-8"
+PY3K = (sys.version_info[0] > 2)
+
+whitespace_re = re.compile("\s+")
+
+def _alias(attr):
+ """Alias one attribute name to another for backward compatibility"""
+ @property
+ def alias(self):
+ return getattr(self, attr)
+
+ @alias.setter
+ def alias(self):
+ return setattr(self, attr)
+ return alias
+
+
+class NamespacedAttribute(unicode):
+
+ def __new__(cls, prefix, name, namespace=None):
+ if name is None:
+ obj = unicode.__new__(cls, prefix)
+ elif prefix is None:
+ # Not really namespaced.
+ obj = unicode.__new__(cls, name)
+ else:
+ obj = unicode.__new__(cls, prefix + ":" + name)
+ obj.prefix = prefix
+ obj.name = name
+ obj.namespace = namespace
+ return obj
+
+class AttributeValueWithCharsetSubstitution(unicode):
+ """A stand-in object for a character encoding specified in HTML."""
+
+class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
+ """A generic stand-in for the value of a meta tag's 'charset' attribute.
+
+ When Beautiful Soup parses the markup '<meta charset="utf8">', the
+ value of the 'charset' attribute will be one of these objects.
+ """
+
+ def __new__(cls, original_value):
+ obj = unicode.__new__(cls, original_value)
+ obj.original_value = original_value
+ return obj
+
+ def encode(self, encoding):
+ return encoding
+
+
+class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
+ """A generic stand-in for the value of a meta tag's 'content' attribute.
+
+ When Beautiful Soup parses the markup:
+ <meta http-equiv="content-type" content="text/html; charset=utf8">
+
+ The value of the 'content' attribute will be one of these objects.
+ """
+
+ CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M)
+
+ def __new__(cls, original_value):
+ match = cls.CHARSET_RE.search(original_value)
+ if match is None:
+ # No substitution necessary.
+ return unicode.__new__(unicode, original_value)
+
+ obj = unicode.__new__(cls, original_value)
+ obj.original_value = original_value
+ return obj
+
+ def encode(self, encoding):
+ def rewrite(match):
+ return match.group(1) + encoding
+ return self.CHARSET_RE.sub(rewrite, self.original_value)
+
+class HTMLAwareEntitySubstitution(EntitySubstitution):
+
+ """Entity substitution rules that are aware of some HTML quirks.
+
+ Specifically, the contents of <script> and <style> tags should not
+ undergo entity substitution.
+
+ Incoming NavigableString objects are checked to see if they're the
+ direct children of a <script> or <style> tag.
+ """
+
+ cdata_containing_tags = set(["script", "style"])
+
+ preformatted_tags = set(["pre"])
+
+ @classmethod
+ def _substitute_if_appropriate(cls, ns, f):
+ if (isinstance(ns, NavigableString)
+ and ns.parent is not None
+ and ns.parent.name in cls.cdata_containing_tags):
+ # Do nothing.
+ return ns
+ # Substitute.
+ return f(ns)
+
+ @classmethod
+ def substitute_html(cls, ns):
+ return cls._substitute_if_appropriate(
+ ns, EntitySubstitution.substitute_html)
+
+ @classmethod
+ def substitute_xml(cls, ns):
+ return cls._substitute_if_appropriate(
+ ns, EntitySubstitution.substitute_xml)
+
+class PageElement(object):
+ """Contains the navigational information for some part of the page
+ (either a tag or a piece of text)"""
+
+ # There are five possible values for the "formatter" argument passed in
+ # to methods like encode() and prettify():
+ #
+ # "html" - All Unicode characters with corresponding HTML entities
+ # are converted to those entities on output.
+ # "minimal" - Bare ampersands and angle brackets are converted to
+ # XML entities: &amp; &lt; &gt;
+ # None - The null formatter. Unicode characters are never
+ # converted to entities. This is not recommended, but it's
+ # faster than "minimal".
+ # A function - This function will be called on every string that
+ # needs to undergo entity substitution.
+ #
+
+ # In an HTML document, the default "html" and "minimal" functions
+ # will leave the contents of <script> and <style> tags alone. For
+ # an XML document, all tags will be given the same treatment.
+
+ HTML_FORMATTERS = {
+ "html" : HTMLAwareEntitySubstitution.substitute_html,
+ "minimal" : HTMLAwareEntitySubstitution.substitute_xml,
+ None : None
+ }
+
+ XML_FORMATTERS = {
+ "html" : EntitySubstitution.substitute_html,
+ "minimal" : EntitySubstitution.substitute_xml,
+ None : None
+ }
+
+ def format_string(self, s, formatter='minimal'):
+ """Format the given string using the given formatter."""
+ if not callable(formatter):
+ formatter = self._formatter_for_name(formatter)
+ if formatter is None:
+ output = s
+ else:
+ output = formatter(s)
+ return output
+
+ @property
+ def _is_xml(self):
+ """Is this element part of an XML tree or an HTML tree?
+
+ This is used when mapping a formatter name ("minimal") to an
+ appropriate function (one that performs entity-substitution on
+ the contents of <script> and <style> tags, or not). It's
+ inefficient, but it should be called very rarely.
+ """
+ if self.parent is None:
+ # This is the top-level object. It should have .is_xml set
+ # from tree creation. If not, take a guess--BS is usually
+ # used on HTML markup.
+ return getattr(self, 'is_xml', False)
+ return self.parent._is_xml
+
+ def _formatter_for_name(self, name):
+ "Look up a formatter function based on its name and the tree."
+ if self._is_xml:
+ return self.XML_FORMATTERS.get(
+ name, EntitySubstitution.substitute_xml)
+ else:
+ return self.HTML_FORMATTERS.get(
+ name, HTMLAwareEntitySubstitution.substitute_xml)
+
+ def setup(self, parent=None, previous_element=None):
+ """Sets up the initial relations between this element and
+ other elements."""
+ self.parent = parent
+ self.previous_element = previous_element
+ if previous_element is not None:
+ self.previous_element.next_element = self
+ self.next_element = None
+ self.previous_sibling = None
+ self.next_sibling = None
+ if self.parent is not None and self.parent.contents:
+ self.previous_sibling = self.parent.contents[-1]
+ self.previous_sibling.next_sibling = self
+
+ nextSibling = _alias("next_sibling") # BS3
+ previousSibling = _alias("previous_sibling") # BS3
+
+ def replace_with(self, replace_with):
+ if replace_with is self:
+ return
+ if replace_with is self.parent:
+ raise ValueError("Cannot replace a Tag with its parent.")
+ old_parent = self.parent
+ my_index = self.parent.index(self)
+ self.extract()
+ old_parent.insert(my_index, replace_with)
+ return self
+ replaceWith = replace_with # BS3
+
+ def unwrap(self):
+ my_parent = self.parent
+ my_index = self.parent.index(self)
+ self.extract()
+ for child in reversed(self.contents[:]):
+ my_parent.insert(my_index, child)
+ return self
+ replace_with_children = unwrap
+ replaceWithChildren = unwrap # BS3
+
+ def wrap(self, wrap_inside):
+ me = self.replace_with(wrap_inside)
+ wrap_inside.append(me)
+ return wrap_inside
+
+ def extract(self):
+ """Destructively rips this element out of the tree."""
+ if self.parent is not None:
+ del self.parent.contents[self.parent.index(self)]
+
+ #Find the two elements that would be next to each other if
+ #this element (and any children) hadn't been parsed. Connect
+ #the two.
+ last_child = self._last_descendant()
+ next_element = last_child.next_element
+
+ if self.previous_element is not None:
+ self.previous_element.next_element = next_element
+ if next_element is not None:
+ next_element.previous_element = self.previous_element
+ self.previous_element = None
+ last_child.next_element = None
+
+ self.parent = None
+ if self.previous_sibling is not None:
+ self.previous_sibling.next_sibling = self.next_sibling
+ if self.next_sibling is not None:
+ self.next_sibling.previous_sibling = self.previous_sibling
+ self.previous_sibling = self.next_sibling = None
+ return self
+
+ def _last_descendant(self, is_initialized=True, accept_self=True):
+ "Finds the last element beneath this object to be parsed."
+ if is_initialized and self.next_sibling:
+ last_child = self.next_sibling.previous_element
+ else:
+ last_child = self
+ while isinstance(last_child, Tag) and last_child.contents:
+ last_child = last_child.contents[-1]
+ if not accept_self and last_child == self:
+ last_child = None
+ return last_child
+ # BS3: Not part of the API!
+ _lastRecursiveChild = _last_descendant
+
+ def insert(self, position, new_child):
+ if new_child is self:
+ raise ValueError("Cannot insert a tag into itself.")
+ if (isinstance(new_child, basestring)
+ and not isinstance(new_child, NavigableString)):
+ new_child = NavigableString(new_child)
+
+ position = min(position, len(self.contents))
+ if hasattr(new_child, 'parent') and new_child.parent is not None:
+ # We're 'inserting' an element that's already one
+ # of this object's children.
+ if new_child.parent is self:
+ current_index = self.index(new_child)
+ if current_index < position:
+ # We're moving this element further down the list
+ # of this object's children. That means that when
+ # we extract this element, our target index will
+ # jump down one.
+ position -= 1
+ new_child.extract()
+
+ new_child.parent = self
+ previous_child = None
+ if position == 0:
+ new_child.previous_sibling = None
+ new_child.previous_element = self
+ else:
+ previous_child = self.contents[position - 1]
+ new_child.previous_sibling = previous_child
+ new_child.previous_sibling.next_sibling = new_child
+ new_child.previous_element = previous_child._last_descendant(False)
+ if new_child.previous_element is not None:
+ new_child.previous_element.next_element = new_child
+
+ new_childs_last_element = new_child._last_descendant(False)
+
+ if position >= len(self.contents):
+ new_child.next_sibling = None
+
+ parent = self
+ parents_next_sibling = None
+ while parents_next_sibling is None and parent is not None:
+ parents_next_sibling = parent.next_sibling
+ parent = parent.parent
+ if parents_next_sibling is not None:
+ # We found the element that comes next in the document.
+ break
+ if parents_next_sibling is not None:
+ new_childs_last_element.next_element = parents_next_sibling
+ else:
+ # The last element of this tag is the last element in
+ # the document.
+ new_childs_last_element.next_element = None
+ else:
+ next_child = self.contents[position]
+ new_child.next_sibling = next_child
+ if new_child.next_sibling is not None:
+ new_child.next_sibling.previous_sibling = new_child
+ new_childs_last_element.next_element = next_child
+
+ if new_childs_last_element.next_element is not None:
+ new_childs_last_element.next_element.previous_element = new_childs_last_element
+ self.contents.insert(position, new_child)
+
+ def append(self, tag):
+ """Appends the given tag to the contents of this tag."""
+ self.insert(len(self.contents), tag)
+
+ def insert_before(self, predecessor):
+ """Makes the given element the immediate predecessor of this one.
+
+ The two elements will have the same parent, and the given element
+ will be immediately before this one.
+ """
+ if self is predecessor:
+ raise ValueError("Can't insert an element before itself.")
+ parent = self.parent
+ if parent is None:
+ raise ValueError(
+ "Element has no parent, so 'before' has no meaning.")
+ # Extract first so that the index won't be screwed up if they
+ # are siblings.
+ if isinstance(predecessor, PageElement):
+ predecessor.extract()
+ index = parent.index(self)
+ parent.insert(index, predecessor)
+
+ def insert_after(self, successor):
+ """Makes the given element the immediate successor of this one.
+
+ The two elements will have the same parent, and the given element
+ will be immediately after this one.
+ """
+ if self is successor:
+ raise ValueError("Can't insert an element after itself.")
+ parent = self.parent
+ if parent is None:
+ raise ValueError(
+ "Element has no parent, so 'after' has no meaning.")
+ # Extract first so that the index won't be screwed up if they
+ # are siblings.
+ if isinstance(successor, PageElement):
+ successor.extract()
+ index = parent.index(self)
+ parent.insert(index+1, successor)
+
+ def find_next(self, name=None, attrs={}, text=None, **kwargs):
+ """Returns the first item that matches the given criteria and
+ appears after this Tag in the document."""
+ return self._find_one(self.find_all_next, name, attrs, text, **kwargs)
+ findNext = find_next # BS3
+
+ def find_all_next(self, name=None, attrs={}, text=None, limit=None,
+ **kwargs):
+ """Returns all items that match the given criteria and appear
+ after this Tag in the document."""
+ return self._find_all(name, attrs, text, limit, self.next_elements,
+ **kwargs)
+ findAllNext = find_all_next # BS3
+
+ def find_next_sibling(self, name=None, attrs={}, text=None, **kwargs):
+ """Returns the closest sibling to this Tag that matches the
+ given criteria and appears after this Tag in the document."""
+ return self._find_one(self.find_next_siblings, name, attrs, text,
+ **kwargs)
+ findNextSibling = find_next_sibling # BS3
+
+ def find_next_siblings(self, name=None, attrs={}, text=None, limit=None,
+ **kwargs):
+ """Returns the siblings of this Tag that match the given
+ criteria and appear after this Tag in the document."""
+ return self._find_all(name, attrs, text, limit,
+ self.next_siblings, **kwargs)
+ findNextSiblings = find_next_siblings # BS3
+ fetchNextSiblings = find_next_siblings # BS2
+
+ def find_previous(self, name=None, attrs={}, text=None, **kwargs):
+ """Returns the first item that matches the given criteria and
+ appears before this Tag in the document."""
+ return self._find_one(
+ self.find_all_previous, name, attrs, text, **kwargs)
+ findPrevious = find_previous # BS3
+
+ def find_all_previous(self, name=None, attrs={}, text=None, limit=None,
+ **kwargs):
+ """Returns all items that match the given criteria and appear
+ before this Tag in the document."""
+ return self._find_all(name, attrs, text, limit, self.previous_elements,
+ **kwargs)
+ findAllPrevious = find_all_previous # BS3
+ fetchPrevious = find_all_previous # BS2
+
+ def find_previous_sibling(self, name=None, attrs={}, text=None, **kwargs):
+ """Returns the closest sibling to this Tag that matches the
+ given criteria and appears before this Tag in the document."""
+ return self._find_one(self.find_previous_siblings, name, attrs, text,
+ **kwargs)
+ findPreviousSibling = find_previous_sibling # BS3
+
+ def find_previous_siblings(self, name=None, attrs={}, text=None,
+ limit=None, **kwargs):
+ """Returns the siblings of this Tag that match the given
+ criteria and appear before this Tag in the document."""
+ return self._find_all(name, attrs, text, limit,
+ self.previous_siblings, **kwargs)
+ findPreviousSiblings = find_previous_siblings # BS3
+ fetchPreviousSiblings = find_previous_siblings # BS2
+
+ def find_parent(self, name=None, attrs={}, **kwargs):
+ """Returns the closest parent of this Tag that matches the given
+ criteria."""
+ # NOTE: We can't use _find_one because findParents takes a different
+ # set of arguments.
+ r = None
+ l = self.find_parents(name, attrs, 1, **kwargs)
+ if l:
+ r = l[0]
+ return r
+ findParent = find_parent # BS3
+
+ def find_parents(self, name=None, attrs={}, limit=None, **kwargs):
+ """Returns the parents of this Tag that match the given
+ criteria."""
+
+ return self._find_all(name, attrs, None, limit, self.parents,
+ **kwargs)
+ findParents = find_parents # BS3
+ fetchParents = find_parents # BS2
+
+ @property
+ def next(self):
+ return self.next_element
+
+ @property
+ def previous(self):
+ return self.previous_element
+
+ #These methods do the real heavy lifting.
+
+ def _find_one(self, method, name, attrs, text, **kwargs):
+ r = None
+ l = method(name, attrs, text, 1, **kwargs)
+ if l:
+ r = l[0]
+ return r
+
+ def _find_all(self, name, attrs, text, limit, generator, **kwargs):
+ "Iterates over a generator looking for things that match."
+
+ if isinstance(name, SoupStrainer):
+ strainer = name
+ else:
+ strainer = SoupStrainer(name, attrs, text, **kwargs)
+
+ if text is None and not limit and not attrs and not kwargs:
+ if name is True or name is None:
+ # Optimization to find all tags.
+ result = (element for element in generator
+ if isinstance(element, Tag))
+ return ResultSet(strainer, result)
+ elif isinstance(name, basestring):
+ # Optimization to find all tags with a given name.
+ result = (element for element in generator
+ if isinstance(element, Tag)
+ and element.name == name)
+ return ResultSet(strainer, result)
+ results = ResultSet(strainer)
+ while True:
+ try:
+ i = next(generator)
+ except StopIteration:
+ break
+ if i:
+ found = strainer.search(i)
+ if found:
+ results.append(found)
+ if limit and len(results) >= limit:
+ break
+ return results
+
+ #These generators can be used to navigate starting from both
+ #NavigableStrings and Tags.
+ @property
+ def next_elements(self):
+ i = self.next_element
+ while i is not None:
+ yield i
+ i = i.next_element
+
+ @property
+ def next_siblings(self):
+ i = self.next_sibling
+ while i is not None:
+ yield i
+ i = i.next_sibling
+
+ @property
+ def previous_elements(self):
+ i = self.previous_element
+ while i is not None:
+ yield i
+ i = i.previous_element
+
+ @property
+ def previous_siblings(self):
+ i = self.previous_sibling
+ while i is not None:
+ yield i
+ i = i.previous_sibling
+
+ @property
+ def parents(self):
+ i = self.parent
+ while i is not None:
+ yield i
+ i = i.parent
+
+ # Methods for supporting CSS selectors.
+
+ tag_name_re = re.compile('^[a-z0-9]+$')
+
+ # /^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/
+ # \---/ \---/\-------------/ \-------/
+ # | | | |
+ # | | | The value
+ # | | ~,|,^,$,* or =
+ # | Attribute
+ # Tag
+ attribselect_re = re.compile(
+ r'^(?P<tag>\w+)?\[(?P<attribute>\w+)(?P<operator>[=~\|\^\$\*]?)' +
+ r'=?"?(?P<value>[^\]"]*)"?\]$'
+ )
+
+ def _attr_value_as_string(self, value, default=None):
+ """Force an attribute value into a string representation.
+
+ A multi-valued attribute will be converted into a
+ space-separated stirng.
+ """
+ value = self.get(value, default)
+ if isinstance(value, list) or isinstance(value, tuple):
+ value =" ".join(value)
+ return value
+
+ def _tag_name_matches_and(self, function, tag_name):
+ if not tag_name:
+ return function
+ else:
+ def _match(tag):
+ return tag.name == tag_name and function(tag)
+ return _match
+
+ def _attribute_checker(self, operator, attribute, value=''):
+ """Create a function that performs a CSS selector operation.
+
+ Takes an operator, attribute and optional value. Returns a
+ function that will return True for elements that match that
+ combination.
+ """
+ if operator == '=':
+ # string representation of `attribute` is equal to `value`
+ return lambda el: el._attr_value_as_string(attribute) == value
+ elif operator == '~':
+ # space-separated list representation of `attribute`
+ # contains `value`
+ def _includes_value(element):
+ attribute_value = element.get(attribute, [])
+ if not isinstance(attribute_value, list):
+ attribute_value = attribute_value.split()
+ return value in attribute_value
+ return _includes_value
+ elif operator == '^':
+ # string representation of `attribute` starts with `value`
+ return lambda el: el._attr_value_as_string(
+ attribute, '').startswith(value)
+ elif operator == '$':
+ # string represenation of `attribute` ends with `value`
+ return lambda el: el._attr_value_as_string(
+ attribute, '').endswith(value)
+ elif operator == '*':
+ # string representation of `attribute` contains `value`
+ return lambda el: value in el._attr_value_as_string(attribute, '')
+ elif operator == '|':
+ # string representation of `attribute` is either exactly
+ # `value` or starts with `value` and then a dash.
+ def _is_or_starts_with_dash(element):
+ attribute_value = element._attr_value_as_string(attribute, '')
+ return (attribute_value == value or attribute_value.startswith(
+ value + '-'))
+ return _is_or_starts_with_dash
+ else:
+ return lambda el: el.has_attr(attribute)
+
+ # Old non-property versions of the generators, for backwards
+ # compatibility with BS3.
+ def nextGenerator(self):
+ return self.next_elements
+
+ def nextSiblingGenerator(self):
+ return self.next_siblings
+
+ def previousGenerator(self):
+ return self.previous_elements
+
+ def previousSiblingGenerator(self):
+ return self.previous_siblings
+
+ def parentGenerator(self):
+ return self.parents
+
+
+class NavigableString(unicode, PageElement):
+
+ PREFIX = ''
+ SUFFIX = ''
+
+ def __new__(cls, value):
+ """Create a new NavigableString.
+
+ When unpickling a NavigableString, this method is called with
+ the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
+ passed in to the superclass's __new__ or the superclass won't know
+ how to handle non-ASCII characters.
+ """
+ if isinstance(value, unicode):
+ return unicode.__new__(cls, value)
+ return unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
+
+ def __copy__(self):
+ return self
+
+ def __getnewargs__(self):
+ return (unicode(self),)
+
+ def __getattr__(self, attr):
+ """text.string gives you text. This is for backwards
+ compatibility for Navigable*String, but for CData* it lets you
+ get the string without the CData wrapper."""
+ if attr == 'string':
+ return self
+ else:
+ raise AttributeError(
+ "'%s' object has no attribute '%s'" % (
+ self.__class__.__name__, attr))
+
+ def output_ready(self, formatter="minimal"):
+ output = self.format_string(self, formatter)
+ return self.PREFIX + output + self.SUFFIX
+
+ @property
+ def name(self):
+ return None
+
+ @name.setter
+ def name(self, name):
+ raise AttributeError("A NavigableString cannot be given a name.")
+
+class PreformattedString(NavigableString):
+ """A NavigableString not subject to the normal formatting rules.
+
+ The string will be passed into the formatter (to trigger side effects),
+ but the return value will be ignored.
+ """
+
+ def output_ready(self, formatter="minimal"):
+ """CData strings are passed into the formatter.
+ But the return value is ignored."""
+ self.format_string(self, formatter)
+ return self.PREFIX + self + self.SUFFIX
+
+class CData(PreformattedString):
+
+ PREFIX = u'<![CDATA['
+ SUFFIX = u']]>'
+
+class ProcessingInstruction(PreformattedString):
+
+ PREFIX = u'<?'
+ SUFFIX = u'?>'
+
+class Comment(PreformattedString):
+
+ PREFIX = u'<!--'
+ SUFFIX = u'-->'
+
+
+class Declaration(PreformattedString):
+ PREFIX = u'<!'
+ SUFFIX = u'!>'
+
+
+class Doctype(PreformattedString):
+
+ @classmethod
+ def for_name_and_ids(cls, name, pub_id, system_id):
+ value = name or ''
+ if pub_id is not None:
+ value += ' PUBLIC "%s"' % pub_id
+ if system_id is not None:
+ value += ' "%s"' % system_id
+ elif system_id is not None:
+ value += ' SYSTEM "%s"' % system_id
+
+ return Doctype(value)
+
+ PREFIX = u'<!DOCTYPE '
+ SUFFIX = u'>\n'
+
+
+class Tag(PageElement):
+
+ """Represents a found HTML tag with its attributes and contents."""
+
+ def __init__(self, parser=None, builder=None, name=None, namespace=None,
+ prefix=None, attrs=None, parent=None, previous=None):
+ "Basic constructor."
+
+ if parser is None:
+ self.parser_class = None
+ else:
+ # We don't actually store the parser object: that lets extracted
+ # chunks be garbage-collected.
+ self.parser_class = parser.__class__
+ if name is None:
+ raise ValueError("No value provided for new tag's name.")
+ self.name = name
+ self.namespace = namespace
+ self.prefix = prefix
+ if attrs is None:
+ attrs = {}
+ elif attrs and builder.cdata_list_attributes:
+ attrs = builder._replace_cdata_list_attribute_values(
+ self.name, attrs)
+ else:
+ attrs = dict(attrs)
+ self.attrs = attrs
+ self.contents = []
+ self.setup(parent, previous)
+ self.hidden = False
+
+ # Set up any substitutions, such as the charset in a META tag.
+ if builder is not None:
+ builder.set_up_substitutions(self)
+ self.can_be_empty_element = builder.can_be_empty_element(name)
+ else:
+ self.can_be_empty_element = False
+
+ parserClass = _alias("parser_class") # BS3
+
+ @property
+ def is_empty_element(self):
+ """Is this tag an empty-element tag? (aka a self-closing tag)
+
+ A tag that has contents is never an empty-element tag.
+
+ A tag that has no contents may or may not be an empty-element
+ tag. It depends on the builder used to create the tag. If the
+ builder has a designated list of empty-element tags, then only
+ a tag whose name shows up in that list is considered an
+ empty-element tag.
+
+ If the builder has no designated list of empty-element tags,
+ then any tag with no contents is an empty-element tag.
+ """
+ return len(self.contents) == 0 and self.can_be_empty_element
+ isSelfClosing = is_empty_element # BS3
+
+ @property
+ def string(self):
+ """Convenience property to get the single string within this tag.
+
+ :Return: If this tag has a single string child, return value
+ is that string. If this tag has no children, or more than one
+ child, return value is None. If this tag has one child tag,
+ return value is the 'string' attribute of the child tag,
+ recursively.
+ """
+ if len(self.contents) != 1:
+ return None
+ child = self.contents[0]
+ if isinstance(child, NavigableString):
+ return child
+ return child.string
+
+ @string.setter
+ def string(self, string):
+ self.clear()
+ self.append(string.__class__(string))
+
+ def _all_strings(self, strip=False, types=(NavigableString, CData)):
+ """Yield all strings of certain classes, possibly stripping them.
+
+ By default, yields only NavigableString and CData objects. So
+ no comments, processing instructions, etc.
+ """
+ for descendant in self.descendants:
+ if (
+ (types is None and not isinstance(descendant, NavigableString))
+ or
+ (types is not None and type(descendant) not in types)):
+ continue
+ if strip:
+ descendant = descendant.strip()
+ if len(descendant) == 0:
+ continue
+ yield descendant
+
+ strings = property(_all_strings)
+
+ @property
+ def stripped_strings(self):
+ for string in self._all_strings(True):
+ yield string
+
+ def get_text(self, separator=u"", strip=False,
+ types=(NavigableString, CData)):
+ """
+ Get all child strings, concatenated using the given separator.
+ """
+ return separator.join([s for s in self._all_strings(
+ strip, types=types)])
+ getText = get_text
+ text = property(get_text)
+
+ def decompose(self):
+ """Recursively destroys the contents of this tree."""
+ self.extract()
+ i = self
+ while i is not None:
+ next = i.next_element
+ i.__dict__.clear()
+ i.contents = []
+ i = next
+
+ def clear(self, decompose=False):
+ """
+ Extract all children. If decompose is True, decompose instead.
+ """
+ if decompose:
+ for element in self.contents[:]:
+ if isinstance(element, Tag):
+ element.decompose()
+ else:
+ element.extract()
+ else:
+ for element in self.contents[:]:
+ element.extract()
+
+ def index(self, element):
+ """
+ Find the index of a child by identity, not value. Avoids issues with
+ tag.contents.index(element) getting the index of equal elements.
+ """
+ for i, child in enumerate(self.contents):
+ if child is element:
+ return i
+ raise ValueError("Tag.index: element not in tag")
+
+ def get(self, key, default=None):
+ """Returns the value of the 'key' attribute for the tag, or
+ the value given for 'default' if it doesn't have that
+ attribute."""
+ return self.attrs.get(key, default)
+
+ def has_attr(self, key):
+ return key in self.attrs
+
+ def __hash__(self):
+ return str(self).__hash__()
+
+ def __getitem__(self, key):
+ """tag[key] returns the value of the 'key' attribute for the tag,
+ and throws an exception if it's not there."""
+ return self.attrs[key]
+
+ def __iter__(self):
+ "Iterating over a tag iterates over its contents."
+ return iter(self.contents)
+
+ def __len__(self):
+ "The length of a tag is the length of its list of contents."
+ return len(self.contents)
+
+ def __contains__(self, x):
+ return x in self.contents
+
+ def __nonzero__(self):
+ "A tag is non-None even if it has no contents."
+ return True
+
+ def __setitem__(self, key, value):
+ """Setting tag[key] sets the value of the 'key' attribute for the
+ tag."""
+ self.attrs[key] = value
+
+ def __delitem__(self, key):
+ "Deleting tag[key] deletes all 'key' attributes for the tag."
+ self.attrs.pop(key, None)
+
+ def __call__(self, *args, **kwargs):
+ """Calling a tag like a function is the same as calling its
+ find_all() method. Eg. tag('a') returns a list of all the A tags
+ found within this tag."""
+ return self.find_all(*args, **kwargs)
+
+ def __getattr__(self, tag):
+ #print "Getattr %s.%s" % (self.__class__, tag)
+ if len(tag) > 3 and tag.endswith('Tag'):
+ # BS3: soup.aTag -> "soup.find("a")
+ tag_name = tag[:-3]
+ warnings.warn(
+ '.%sTag is deprecated, use .find("%s") instead.' % (
+ tag_name, tag_name))
+ return self.find(tag_name)
+ # We special case contents to avoid recursion.
+ elif not tag.startswith("__") and not tag=="contents":
+ return self.find(tag)
+ raise AttributeError(
+ "'%s' object has no attribute '%s'" % (self.__class__, tag))
+
+ def __eq__(self, other):
+ """Returns true iff this tag has the same name, the same attributes,
+ and the same contents (recursively) as the given tag."""
+ if self is other:
+ return True
+ if (not hasattr(other, 'name') or
+ not hasattr(other, 'attrs') or
+ not hasattr(other, 'contents') or
+ self.name != other.name or
+ self.attrs != other.attrs or
+ len(self) != len(other)):
+ return False
+ for i, my_child in enumerate(self.contents):
+ if my_child != other.contents[i]:
+ return False
+ return True
+
+ def __ne__(self, other):
+ """Returns true iff this tag is not identical to the other tag,
+ as defined in __eq__."""
+ return not self == other
+
+ def __repr__(self, encoding=DEFAULT_OUTPUT_ENCODING):
+ """Renders this tag as a string."""
+ return self.encode(encoding)
+
+ def __unicode__(self):
+ return self.decode()
+
+ def __str__(self):
+ return self.encode()
+
+ if PY3K:
+ __str__ = __repr__ = __unicode__
+
+ def encode(self, encoding=DEFAULT_OUTPUT_ENCODING,
+ indent_level=None, formatter="minimal",
+ errors="xmlcharrefreplace"):
+ # Turn the data structure into Unicode, then encode the
+ # Unicode.
+ u = self.decode(indent_level, encoding, formatter)
+ return u.encode(encoding, errors)
+
+ def _should_pretty_print(self, indent_level):
+ """Should this tag be pretty-printed?"""
+ return (
+ indent_level is not None and
+ (self.name not in HTMLAwareEntitySubstitution.preformatted_tags
+ or self._is_xml))
+
+ def decode(self, indent_level=None,
+ eventual_encoding=DEFAULT_OUTPUT_ENCODING,
+ formatter="minimal"):
+ """Returns a Unicode representation of this tag and its contents.
+
+ :param eventual_encoding: The tag is destined to be
+ encoded into this encoding. This method is _not_
+ responsible for performing that encoding. This information
+ is passed in so that it can be substituted in if the
+ document contains a <META> tag that mentions the document's
+ encoding.
+ """
+
+ # First off, turn a string formatter into a function. This
+ # will stop the lookup from happening over and over again.
+ if not callable(formatter):
+ formatter = self._formatter_for_name(formatter)
+
+ attrs = []
+ if self.attrs:
+ for key, val in sorted(self.attrs.items()):
+ if val is None:
+ decoded = key
+ else:
+ if isinstance(val, list) or isinstance(val, tuple):
+ val = ' '.join(val)
+ elif not isinstance(val, basestring):
+ val = unicode(val)
+ elif (
+ isinstance(val, AttributeValueWithCharsetSubstitution)
+ and eventual_encoding is not None):
+ val = val.encode(eventual_encoding)
+
+ text = self.format_string(val, formatter)
+ decoded = (
+ unicode(key) + '='
+ + EntitySubstitution.quoted_attribute_value(text))
+ attrs.append(decoded)
+ close = ''
+ closeTag = ''
+
+ prefix = ''
+ if self.prefix:
+ prefix = self.prefix + ":"
+
+ if self.is_empty_element:
+ close = '/'
+ else:
+ closeTag = '</%s%s>' % (prefix, self.name)
+
+ pretty_print = self._should_pretty_print(indent_level)
+ space = ''
+ indent_space = ''
+ if indent_level is not None:
+ indent_space = (' ' * (indent_level - 1))
+ if pretty_print:
+ space = indent_space
+ indent_contents = indent_level + 1
+ else:
+ indent_contents = None
+ contents = self.decode_contents(
+ indent_contents, eventual_encoding, formatter)
+
+ if self.hidden:
+ # This is the 'document root' object.
+ s = contents
+ else:
+ s = []
+ attribute_string = ''
+ if attrs:
+ attribute_string = ' ' + ' '.join(attrs)
+ if indent_level is not None:
+ # Even if this particular tag is not pretty-printed,
+ # we should indent up to the start of the tag.
+ s.append(indent_space)
+ s.append('<%s%s%s%s>' % (
+ prefix, self.name, attribute_string, close))
+ if pretty_print:
+ s.append("\n")
+ s.append(contents)
+ if pretty_print and contents and contents[-1] != "\n":
+ s.append("\n")
+ if pretty_print and closeTag:
+ s.append(space)
+ s.append(closeTag)
+ if indent_level is not None and closeTag and self.next_sibling:
+ # Even if this particular tag is not pretty-printed,
+ # we're now done with the tag, and we should add a
+ # newline if appropriate.
+ s.append("\n")
+ s = ''.join(s)
+ return s
+
+ def prettify(self, encoding=None, formatter="minimal"):
+ if encoding is None:
+ return self.decode(True, formatter=formatter)
+ else:
+ return self.encode(encoding, True, formatter=formatter)
+
+ def decode_contents(self, indent_level=None,
+ eventual_encoding=DEFAULT_OUTPUT_ENCODING,
+ formatter="minimal"):
+ """Renders the contents of this tag as a Unicode string.
+
+ :param eventual_encoding: The tag is destined to be
+ encoded into this encoding. This method is _not_
+ responsible for performing that encoding. This information
+ is passed in so that it can be substituted in if the
+ document contains a <META> tag that mentions the document's
+ encoding.
+ """
+ # First off, turn a string formatter into a function. This
+ # will stop the lookup from happening over and over again.
+ if not callable(formatter):
+ formatter = self._formatter_for_name(formatter)
+
+ pretty_print = (indent_level is not None)
+ s = []
+ for c in self:
+ text = None
+ if isinstance(c, NavigableString):
+ text = c.output_ready(formatter)
+ elif isinstance(c, Tag):
+ s.append(c.decode(indent_level, eventual_encoding,
+ formatter))
+ if text and indent_level and not self.name == 'pre':
+ text = text.strip()
+ if text:
+ if pretty_print and not self.name == 'pre':
+ s.append(" " * (indent_level - 1))
+ s.append(text)
+ if pretty_print and not self.name == 'pre':
+ s.append("\n")
+ return ''.join(s)
+
+ def encode_contents(
+ self, indent_level=None, encoding=DEFAULT_OUTPUT_ENCODING,
+ formatter="minimal"):
+ """Renders the contents of this tag as a bytestring."""
+ contents = self.decode_contents(indent_level, encoding, formatter)
+ return contents.encode(encoding)
+
+ # Old method for BS3 compatibility
+ def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING,
+ prettyPrint=False, indentLevel=0):
+ if not prettyPrint:
+ indentLevel = None
+ return self.encode_contents(
+ indent_level=indentLevel, encoding=encoding)
+
+ #Soup methods
+
+ def find(self, name=None, attrs={}, recursive=True, text=None,
+ **kwargs):
+ """Return only the first child of this Tag matching the given
+ criteria."""
+ r = None
+ l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
+ if l:
+ r = l[0]
+ return r
+ findChild = find
+
+ def find_all(self, name=None, attrs={}, recursive=True, text=None,
+ limit=None, **kwargs):
+ """Extracts a list of Tag objects that match the given
+ criteria. You can specify the name of the Tag and any
+ attributes you want the Tag to have.
+
+ The value of a key-value pair in the 'attrs' map can be a
+ string, a list of strings, a regular expression object, or a
+ callable that takes a string and returns whether or not the
+ string matches for some custom definition of 'matches'. The
+ same is true of the tag name."""
+
+ generator = self.descendants
+ if not recursive:
+ generator = self.children
+ return self._find_all(name, attrs, text, limit, generator, **kwargs)
+ findAll = find_all # BS3
+ findChildren = find_all # BS2
+
+ #Generator methods
+ @property
+ def children(self):
+ # return iter() to make the purpose of the method clear
+ return iter(self.contents) # XXX This seems to be untested.
+
+ @property
+ def descendants(self):
+ if not len(self.contents):
+ return
+ stopNode = self._last_descendant().next_element
+ current = self.contents[0]
+ while current is not stopNode:
+ yield current
+ current = current.next_element
+
+ # CSS selector code
+
+ _selector_combinators = ['>', '+', '~']
+ _select_debug = False
+ def select(self, selector, _candidate_generator=None):
+ """Perform a CSS selection operation on the current element."""
+ tokens = selector.split()
+ current_context = [self]
+
+ if tokens[-1] in self._selector_combinators:
+ raise ValueError(
+ 'Final combinator "%s" is missing an argument.' % tokens[-1])
+ if self._select_debug:
+ print 'Running CSS selector "%s"' % selector
+ for index, token in enumerate(tokens):
+ if self._select_debug:
+ print ' Considering token "%s"' % token
+ recursive_candidate_generator = None
+ tag_name = None
+ if tokens[index-1] in self._selector_combinators:
+ # This token was consumed by the previous combinator. Skip it.
+ if self._select_debug:
+ print ' Token was consumed by the previous combinator.'
+ continue
+ # Each operation corresponds to a checker function, a rule
+ # for determining whether a candidate matches the
+ # selector. Candidates are generated by the active
+ # iterator.
+ checker = None
+
+ m = self.attribselect_re.match(token)
+ if m is not None:
+ # Attribute selector
+ tag_name, attribute, operator, value = m.groups()
+ checker = self._attribute_checker(operator, attribute, value)
+
+ elif '#' in token:
+ # ID selector
+ tag_name, tag_id = token.split('#', 1)
+ def id_matches(tag):
+ return tag.get('id', None) == tag_id
+ checker = id_matches
+
+ elif '.' in token:
+ # Class selector
+ tag_name, klass = token.split('.', 1)
+ classes = set(klass.split('.'))
+ def classes_match(candidate):
+ return classes.issubset(candidate.get('class', []))
+ checker = classes_match
+
+ elif ':' in token:
+ # Pseudo-class
+ tag_name, pseudo = token.split(':', 1)
+ if tag_name == '':
+ raise ValueError(
+ "A pseudo-class must be prefixed with a tag name.")
+ pseudo_attributes = re.match('([a-zA-Z\d-]+)\(([a-zA-Z\d]+)\)', pseudo)
+ found = []
+ if pseudo_attributes is not None:
+ pseudo_type, pseudo_value = pseudo_attributes.groups()
+ if pseudo_type == 'nth-of-type':
+ try:
+ pseudo_value = int(pseudo_value)
+ except:
+ raise NotImplementedError(
+ 'Only numeric values are currently supported for the nth-of-type pseudo-class.')
+ if pseudo_value < 1:
+ raise ValueError(
+ 'nth-of-type pseudo-class value must be at least 1.')
+ class Counter(object):
+ def __init__(self, destination):
+ self.count = 0
+ self.destination = destination
+
+ def nth_child_of_type(self, tag):
+ self.count += 1
+ if self.count == self.destination:
+ return True
+ if self.count > self.destination:
+ # Stop the generator that's sending us
+ # these things.
+ raise StopIteration()
+ return False
+ checker = Counter(pseudo_value).nth_child_of_type
+ else:
+ raise NotImplementedError(
+ 'Only the following pseudo-classes are implemented: nth-of-type.')
+
+ elif token == '*':
+ # Star selector -- matches everything
+ pass
+ elif token == '>':
+ # Run the next token as a CSS selector against the
+ # direct children of each tag in the current context.
+ recursive_candidate_generator = lambda tag: tag.children
+ elif token == '~':
+ # Run the next token as a CSS selector against the
+ # siblings of each tag in the current context.
+ recursive_candidate_generator = lambda tag: tag.next_siblings
+ elif token == '+':
+ # For each tag in the current context, run the next
+ # token as a CSS selector against the tag's next
+ # sibling that's a tag.
+ def next_tag_sibling(tag):
+ yield tag.find_next_sibling(True)
+ recursive_candidate_generator = next_tag_sibling
+
+ elif self.tag_name_re.match(token):
+ # Just a tag name.
+ tag_name = token
+ else:
+ raise ValueError(
+ 'Unsupported or invalid CSS selector: "%s"' % token)
+
+ if recursive_candidate_generator:
+ # This happens when the selector looks like "> foo".
+ #
+ # The generator calls select() recursively on every
+ # member of the current context, passing in a different
+ # candidate generator and a different selector.
+ #
+ # In the case of "> foo", the candidate generator is
+ # one that yields a tag's direct children (">"), and
+ # the selector is "foo".
+ next_token = tokens[index+1]
+ def recursive_select(tag):
+ if self._select_debug:
+ print ' Calling select("%s") recursively on %s %s' % (next_token, tag.name, tag.attrs)
+ print '-' * 40
+ for i in tag.select(next_token, recursive_candidate_generator):
+ if self._select_debug:
+ print '(Recursive select picked up candidate %s %s)' % (i.name, i.attrs)
+ yield i
+ if self._select_debug:
+ print '-' * 40
+ _use_candidate_generator = recursive_select
+ elif _candidate_generator is None:
+ # By default, a tag's candidates are all of its
+ # children. If tag_name is defined, only yield tags
+ # with that name.
+ if self._select_debug:
+ if tag_name:
+ check = "[any]"
+ else:
+ check = tag_name
+ print ' Default candidate generator, tag name="%s"' % check
+ if self._select_debug:
+ # This is redundant with later code, but it stops
+ # a bunch of bogus tags from cluttering up the
+ # debug log.
+ def default_candidate_generator(tag):
+ for child in tag.descendants:
+ if not isinstance(child, Tag):
+ continue
+ if tag_name and not child.name == tag_name:
+ continue
+ yield child
+ _use_candidate_generator = default_candidate_generator
+ else:
+ _use_candidate_generator = lambda tag: tag.descendants
+ else:
+ _use_candidate_generator = _candidate_generator
+
+ new_context = []
+ new_context_ids = set([])
+ for tag in current_context:
+ if self._select_debug:
+ print " Running candidate generator on %s %s" % (
+ tag.name, repr(tag.attrs))
+ for candidate in _use_candidate_generator(tag):
+ if not isinstance(candidate, Tag):
+ continue
+ if tag_name and candidate.name != tag_name:
+ continue
+ if checker is not None:
+ try:
+ result = checker(candidate)
+ except StopIteration:
+ # The checker has decided we should no longer
+ # run the generator.
+ break
+ if checker is None or result:
+ if self._select_debug:
+ print " SUCCESS %s %s" % (candidate.name, repr(candidate.attrs))
+ if id(candidate) not in new_context_ids:
+ # If a tag matches a selector more than once,
+ # don't include it in the context more than once.
+ new_context.append(candidate)
+ new_context_ids.add(id(candidate))
+ elif self._select_debug:
+ print " FAILURE %s %s" % (candidate.name, repr(candidate.attrs))
+
+ current_context = new_context
+
+ if self._select_debug:
+ print "Final verdict:"
+ for i in current_context:
+ print " %s %s" % (i.name, i.attrs)
+ return current_context
+
+ # Old names for backwards compatibility
+ def childGenerator(self):
+ return self.children
+
+ def recursiveChildGenerator(self):
+ return self.descendants
+
+ def has_key(self, key):
+ """This was kind of misleading because has_key() (attributes)
+ was different from __in__ (contents). has_key() is gone in
+ Python 3, anyway."""
+ warnings.warn('has_key is deprecated. Use has_attr("%s") instead.' % (
+ key))
+ return self.has_attr(key)
+
+# Next, a couple classes to represent queries and their results.
+class SoupStrainer(object):
+ """Encapsulates a number of ways of matching a markup element (tag or
+ text)."""
+
+ def __init__(self, name=None, attrs={}, text=None, **kwargs):
+ self.name = self._normalize_search_value(name)
+ if not isinstance(attrs, dict):
+ # Treat a non-dict value for attrs as a search for the 'class'
+ # attribute.
+ kwargs['class'] = attrs
+ attrs = None
+
+ if 'class_' in kwargs:
+ # Treat class_="foo" as a search for the 'class'
+ # attribute, overriding any non-dict value for attrs.
+ kwargs['class'] = kwargs['class_']
+ del kwargs['class_']
+
+ if kwargs:
+ if attrs:
+ attrs = attrs.copy()
+ attrs.update(kwargs)
+ else:
+ attrs = kwargs
+ normalized_attrs = {}
+ for key, value in attrs.items():
+ normalized_attrs[key] = self._normalize_search_value(value)
+
+ self.attrs = normalized_attrs
+ self.text = self._normalize_search_value(text)
+
+ def _normalize_search_value(self, value):
+ # Leave it alone if it's a Unicode string, a callable, a
+ # regular expression, a boolean, or None.
+ if (isinstance(value, unicode) or callable(value) or hasattr(value, 'match')
+ or isinstance(value, bool) or value is None):
+ return value
+
+ # If it's a bytestring, convert it to Unicode, treating it as UTF-8.
+ if isinstance(value, bytes):
+ return value.decode("utf8")
+
+ # If it's listlike, convert it into a list of strings.
+ if hasattr(value, '__iter__'):
+ new_value = []
+ for v in value:
+ if (hasattr(v, '__iter__') and not isinstance(v, bytes)
+ and not isinstance(v, unicode)):
+ # This is almost certainly the user's mistake. In the
+ # interests of avoiding infinite loops, we'll let
+ # it through as-is rather than doing a recursive call.
+ new_value.append(v)
+ else:
+ new_value.append(self._normalize_search_value(v))
+ return new_value
+
+ # Otherwise, convert it into a Unicode string.
+ # The unicode(str()) thing is so this will do the same thing on Python 2
+ # and Python 3.
+ return unicode(str(value))
+
+ def __str__(self):
+ if self.text:
+ return self.text
+ else:
+ return "%s|%s" % (self.name, self.attrs)
+
+ def search_tag(self, markup_name=None, markup_attrs={}):
+ found = None
+ markup = None
+ if isinstance(markup_name, Tag):
+ markup = markup_name
+ markup_attrs = markup
+ call_function_with_tag_data = (
+ isinstance(self.name, collections.Callable)
+ and not isinstance(markup_name, Tag))
+
+ if ((not self.name)
+ or call_function_with_tag_data
+ or (markup and self._matches(markup, self.name))
+ or (not markup and self._matches(markup_name, self.name))):
+ if call_function_with_tag_data:
+ match = self.name(markup_name, markup_attrs)
+ else:
+ match = True
+ markup_attr_map = None
+ for attr, match_against in list(self.attrs.items()):
+ if not markup_attr_map:
+ if hasattr(markup_attrs, 'get'):
+ markup_attr_map = markup_attrs
+ else:
+ markup_attr_map = {}
+ for k, v in markup_attrs:
+ markup_attr_map[k] = v
+ attr_value = markup_attr_map.get(attr)
+ if not self._matches(attr_value, match_against):
+ match = False
+ break
+ if match:
+ if markup:
+ found = markup
+ else:
+ found = markup_name
+ if found and self.text and not self._matches(found.string, self.text):
+ found = None
+ return found
+ searchTag = search_tag
+
+ def search(self, markup):
+ # print 'looking for %s in %s' % (self, markup)
+ found = None
+ # If given a list of items, scan it for a text element that
+ # matches.
+ if hasattr(markup, '__iter__') and not isinstance(markup, (Tag, basestring)):
+ for element in markup:
+ if isinstance(element, NavigableString) \
+ and self.search(element):
+ found = element
+ break
+ # If it's a Tag, make sure its name or attributes match.
+ # Don't bother with Tags if we're searching for text.
+ elif isinstance(markup, Tag):
+ if not self.text or self.name or self.attrs:
+ found = self.search_tag(markup)
+ # If it's text, make sure the text matches.
+ elif isinstance(markup, NavigableString) or \
+ isinstance(markup, basestring):
+ if not self.name and not self.attrs and self._matches(markup, self.text):
+ found = markup
+ else:
+ raise Exception(
+ "I don't know how to match against a %s" % markup.__class__)
+ return found
+
+ def _matches(self, markup, match_against):
+ # print u"Matching %s against %s" % (markup, match_against)
+ result = False
+ if isinstance(markup, list) or isinstance(markup, tuple):
+ # This should only happen when searching a multi-valued attribute
+ # like 'class'.
+ if (isinstance(match_against, unicode)
+ and ' ' in match_against):
+ # A bit of a special case. If they try to match "foo
+ # bar" on a multivalue attribute's value, only accept
+ # the literal value "foo bar"
+ #
+ # XXX This is going to be pretty slow because we keep
+ # splitting match_against. But it shouldn't come up
+ # too often.
+ return (whitespace_re.split(match_against) == markup)
+ else:
+ for item in markup:
+ if self._matches(item, match_against):
+ return True
+ return False
+
+ if match_against is True:
+ # True matches any non-None value.
+ return markup is not None
+
+ if isinstance(match_against, collections.Callable):
+ return match_against(markup)
+
+ # Custom callables take the tag as an argument, but all
+ # other ways of matching match the tag name as a string.
+ if isinstance(markup, Tag):
+ markup = markup.name
+
+ # Ensure that `markup` is either a Unicode string, or None.
+ markup = self._normalize_search_value(markup)
+
+ if markup is None:
+ # None matches None, False, an empty string, an empty list, and so on.
+ return not match_against
+
+ if isinstance(match_against, unicode):
+ # Exact string match
+ return markup == match_against
+
+ if hasattr(match_against, 'match'):
+ # Regexp match
+ return match_against.search(markup)
+
+ if hasattr(match_against, '__iter__'):
+ # The markup must be an exact match against something
+ # in the iterable.
+ return markup in match_against
+
+
+class ResultSet(list):
+ """A ResultSet is just a list that keeps track of the SoupStrainer
+ that created it."""
+ def __init__(self, source, result=()):
+ super(ResultSet, self).__init__(result)
+ self.source = source
diff --git a/bitbake/lib/bs4/testing.py b/bitbake/lib/bs4/testing.py
new file mode 100644
index 0000000000..fd4495ac58
--- /dev/null
+++ b/bitbake/lib/bs4/testing.py
@@ -0,0 +1,592 @@
+"""Helper classes for tests."""
+
+import copy
+import functools
+import unittest
+from unittest import TestCase
+from bs4 import BeautifulSoup
+from bs4.element import (
+ CharsetMetaAttributeValue,
+ Comment,
+ ContentMetaAttributeValue,
+ Doctype,
+ SoupStrainer,
+)
+
+from bs4.builder import HTMLParserTreeBuilder
+default_builder = HTMLParserTreeBuilder
+
+
+class SoupTest(unittest.TestCase):
+
+ @property
+ def default_builder(self):
+ return default_builder()
+
+ def soup(self, markup, **kwargs):
+ """Build a Beautiful Soup object from markup."""
+ builder = kwargs.pop('builder', self.default_builder)
+ return BeautifulSoup(markup, builder=builder, **kwargs)
+
+ def document_for(self, markup):
+ """Turn an HTML fragment into a document.
+
+ The details depend on the builder.
+ """
+ return self.default_builder.test_fragment_to_document(markup)
+
+ def assertSoupEquals(self, to_parse, compare_parsed_to=None):
+ builder = self.default_builder
+ obj = BeautifulSoup(to_parse, builder=builder)
+ if compare_parsed_to is None:
+ compare_parsed_to = to_parse
+
+ self.assertEqual(obj.decode(), self.document_for(compare_parsed_to))
+
+
+class HTMLTreeBuilderSmokeTest(object):
+
+ """A basic test of a treebuilder's competence.
+
+ Any HTML treebuilder, present or future, should be able to pass
+ these tests. With invalid markup, there's room for interpretation,
+ and different parsers can handle it differently. But with the
+ markup in these tests, there's not much room for interpretation.
+ """
+
+ def assertDoctypeHandled(self, doctype_fragment):
+ """Assert that a given doctype string is handled correctly."""
+ doctype_str, soup = self._document_with_doctype(doctype_fragment)
+
+ # Make sure a Doctype object was created.
+ doctype = soup.contents[0]
+ self.assertEqual(doctype.__class__, Doctype)
+ self.assertEqual(doctype, doctype_fragment)
+ self.assertEqual(str(soup)[:len(doctype_str)], doctype_str)
+
+ # Make sure that the doctype was correctly associated with the
+ # parse tree and that the rest of the document parsed.
+ self.assertEqual(soup.p.contents[0], 'foo')
+
+ def _document_with_doctype(self, doctype_fragment):
+ """Generate and parse a document with the given doctype."""
+ doctype = '<!DOCTYPE %s>' % doctype_fragment
+ markup = doctype + '\n<p>foo</p>'
+ soup = self.soup(markup)
+ return doctype, soup
+
+ def test_normal_doctypes(self):
+ """Make sure normal, everyday HTML doctypes are handled correctly."""
+ self.assertDoctypeHandled("html")
+ self.assertDoctypeHandled(
+ 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"')
+
+ def test_empty_doctype(self):
+ soup = self.soup("<!DOCTYPE>")
+ doctype = soup.contents[0]
+ self.assertEqual("", doctype.strip())
+
+ def test_public_doctype_with_url(self):
+ doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"'
+ self.assertDoctypeHandled(doctype)
+
+ def test_system_doctype(self):
+ self.assertDoctypeHandled('foo SYSTEM "http://www.example.com/"')
+
+ def test_namespaced_system_doctype(self):
+ # We can handle a namespaced doctype with a system ID.
+ self.assertDoctypeHandled('xsl:stylesheet SYSTEM "htmlent.dtd"')
+
+ def test_namespaced_public_doctype(self):
+ # Test a namespaced doctype with a public id.
+ self.assertDoctypeHandled('xsl:stylesheet PUBLIC "htmlent.dtd"')
+
+ def test_real_xhtml_document(self):
+ """A real XHTML document should come out more or less the same as it went in."""
+ markup = b"""<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Hello.</title></head>
+<body>Goodbye.</body>
+</html>"""
+ soup = self.soup(markup)
+ self.assertEqual(
+ soup.encode("utf-8").replace(b"\n", b""),
+ markup.replace(b"\n", b""))
+
+ def test_deepcopy(self):
+ """Make sure you can copy the tree builder.
+
+ This is important because the builder is part of a
+ BeautifulSoup object, and we want to be able to copy that.
+ """
+ copy.deepcopy(self.default_builder)
+
+ def test_p_tag_is_never_empty_element(self):
+ """A <p> tag is never designated as an empty-element tag.
+
+ Even if the markup shows it as an empty-element tag, it
+ shouldn't be presented that way.
+ """
+ soup = self.soup("<p/>")
+ self.assertFalse(soup.p.is_empty_element)
+ self.assertEqual(str(soup.p), "<p></p>")
+
+ def test_unclosed_tags_get_closed(self):
+ """A tag that's not closed by the end of the document should be closed.
+
+ This applies to all tags except empty-element tags.
+ """
+ self.assertSoupEquals("<p>", "<p></p>")
+ self.assertSoupEquals("<b>", "<b></b>")
+
+ self.assertSoupEquals("<br>", "<br/>")
+
+ def test_br_is_always_empty_element_tag(self):
+ """A <br> tag is designated as an empty-element tag.
+
+ Some parsers treat <br></br> as one <br/> tag, some parsers as
+ two tags, but it should always be an empty-element tag.
+ """
+ soup = self.soup("<br></br>")
+ self.assertTrue(soup.br.is_empty_element)
+ self.assertEqual(str(soup.br), "<br/>")
+
+ def test_nested_formatting_elements(self):
+ self.assertSoupEquals("<em><em></em></em>")
+
+ def test_comment(self):
+ # Comments are represented as Comment objects.
+ markup = "<p>foo<!--foobar-->baz</p>"
+ self.assertSoupEquals(markup)
+
+ soup = self.soup(markup)
+ comment = soup.find(text="foobar")
+ self.assertEqual(comment.__class__, Comment)
+
+ # The comment is properly integrated into the tree.
+ foo = soup.find(text="foo")
+ self.assertEqual(comment, foo.next_element)
+ baz = soup.find(text="baz")
+ self.assertEqual(comment, baz.previous_element)
+
+ def test_preserved_whitespace_in_pre_and_textarea(self):
+ """Whitespace must be preserved in <pre> and <textarea> tags."""
+ self.assertSoupEquals("<pre> </pre>")
+ self.assertSoupEquals("<textarea> woo </textarea>")
+
+ def test_nested_inline_elements(self):
+ """Inline elements can be nested indefinitely."""
+ b_tag = "<b>Inside a B tag</b>"
+ self.assertSoupEquals(b_tag)
+
+ nested_b_tag = "<p>A <i>nested <b>tag</b></i></p>"
+ self.assertSoupEquals(nested_b_tag)
+
+ double_nested_b_tag = "<p>A <a>doubly <i>nested <b>tag</b></i></a></p>"
+ self.assertSoupEquals(nested_b_tag)
+
+ def test_nested_block_level_elements(self):
+ """Block elements can be nested."""
+ soup = self.soup('<blockquote><p><b>Foo</b></p></blockquote>')
+ blockquote = soup.blockquote
+ self.assertEqual(blockquote.p.b.string, 'Foo')
+ self.assertEqual(blockquote.b.string, 'Foo')
+
+ def test_correctly_nested_tables(self):
+ """One table can go inside another one."""
+ markup = ('<table id="1">'
+ '<tr>'
+ "<td>Here's another table:"
+ '<table id="2">'
+ '<tr><td>foo</td></tr>'
+ '</table></td>')
+
+ self.assertSoupEquals(
+ markup,
+ '<table id="1"><tr><td>Here\'s another table:'
+ '<table id="2"><tr><td>foo</td></tr></table>'
+ '</td></tr></table>')
+
+ self.assertSoupEquals(
+ "<table><thead><tr><td>Foo</td></tr></thead>"
+ "<tbody><tr><td>Bar</td></tr></tbody>"
+ "<tfoot><tr><td>Baz</td></tr></tfoot></table>")
+
+ def test_deeply_nested_multivalued_attribute(self):
+ # html5lib can set the attributes of the same tag many times
+ # as it rearranges the tree. This has caused problems with
+ # multivalued attributes.
+ markup = '<table><div><div class="css"></div></div></table>'
+ soup = self.soup(markup)
+ self.assertEqual(["css"], soup.div.div['class'])
+
+ def test_angle_brackets_in_attribute_values_are_escaped(self):
+ self.assertSoupEquals('<a b="<a>"></a>', '<a b="&lt;a&gt;"></a>')
+
+ def test_entities_in_attributes_converted_to_unicode(self):
+ expect = u'<p id="pi\N{LATIN SMALL LETTER N WITH TILDE}ata"></p>'
+ self.assertSoupEquals('<p id="pi&#241;ata"></p>', expect)
+ self.assertSoupEquals('<p id="pi&#xf1;ata"></p>', expect)
+ self.assertSoupEquals('<p id="pi&#Xf1;ata"></p>', expect)
+ self.assertSoupEquals('<p id="pi&ntilde;ata"></p>', expect)
+
+ def test_entities_in_text_converted_to_unicode(self):
+ expect = u'<p>pi\N{LATIN SMALL LETTER N WITH TILDE}ata</p>'
+ self.assertSoupEquals("<p>pi&#241;ata</p>", expect)
+ self.assertSoupEquals("<p>pi&#xf1;ata</p>", expect)
+ self.assertSoupEquals("<p>pi&#Xf1;ata</p>", expect)
+ self.assertSoupEquals("<p>pi&ntilde;ata</p>", expect)
+
+ def test_quot_entity_converted_to_quotation_mark(self):
+ self.assertSoupEquals("<p>I said &quot;good day!&quot;</p>",
+ '<p>I said "good day!"</p>')
+
+ def test_out_of_range_entity(self):
+ expect = u"\N{REPLACEMENT CHARACTER}"
+ self.assertSoupEquals("&#10000000000000;", expect)
+ self.assertSoupEquals("&#x10000000000000;", expect)
+ self.assertSoupEquals("&#1000000000;", expect)
+
+ def test_multipart_strings(self):
+ "Mostly to prevent a recurrence of a bug in the html5lib treebuilder."
+ soup = self.soup("<html><h2>\nfoo</h2><p></p></html>")
+ self.assertEqual("p", soup.h2.string.next_element.name)
+ self.assertEqual("p", soup.p.name)
+
+ def test_basic_namespaces(self):
+ """Parsers don't need to *understand* namespaces, but at the
+ very least they should not choke on namespaces or lose
+ data."""
+
+ markup = b'<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg"><head></head><body><mathml:msqrt>4</mathml:msqrt><b svg:fill="red"></b></body></html>'
+ soup = self.soup(markup)
+ self.assertEqual(markup, soup.encode())
+ html = soup.html
+ self.assertEqual('http://www.w3.org/1999/xhtml', soup.html['xmlns'])
+ self.assertEqual(
+ 'http://www.w3.org/1998/Math/MathML', soup.html['xmlns:mathml'])
+ self.assertEqual(
+ 'http://www.w3.org/2000/svg', soup.html['xmlns:svg'])
+
+ def test_multivalued_attribute_value_becomes_list(self):
+ markup = b'<a class="foo bar">'
+ soup = self.soup(markup)
+ self.assertEqual(['foo', 'bar'], soup.a['class'])
+
+ #
+ # Generally speaking, tests below this point are more tests of
+ # Beautiful Soup than tests of the tree builders. But parsers are
+ # weird, so we run these tests separately for every tree builder
+ # to detect any differences between them.
+ #
+
+ def test_can_parse_unicode_document(self):
+ # A seemingly innocuous document... but it's in Unicode! And
+ # it contains characters that can't be represented in the
+ # encoding found in the declaration! The horror!
+ markup = u'<html><head><meta encoding="euc-jp"></head><body>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</body>'
+ soup = self.soup(markup)
+ self.assertEqual(u'Sacr\xe9 bleu!', soup.body.string)
+
+ def test_soupstrainer(self):
+ """Parsers should be able to work with SoupStrainers."""
+ strainer = SoupStrainer("b")
+ soup = self.soup("A <b>bold</b> <meta/> <i>statement</i>",
+ parse_only=strainer)
+ self.assertEqual(soup.decode(), "<b>bold</b>")
+
+ def test_single_quote_attribute_values_become_double_quotes(self):
+ self.assertSoupEquals("<foo attr='bar'></foo>",
+ '<foo attr="bar"></foo>')
+
+ def test_attribute_values_with_nested_quotes_are_left_alone(self):
+ text = """<foo attr='bar "brawls" happen'>a</foo>"""
+ self.assertSoupEquals(text)
+
+ def test_attribute_values_with_double_nested_quotes_get_quoted(self):
+ text = """<foo attr='bar "brawls" happen'>a</foo>"""
+ soup = self.soup(text)
+ soup.foo['attr'] = 'Brawls happen at "Bob\'s Bar"'
+ self.assertSoupEquals(
+ soup.foo.decode(),
+ """<foo attr="Brawls happen at &quot;Bob\'s Bar&quot;">a</foo>""")
+
+ def test_ampersand_in_attribute_value_gets_escaped(self):
+ self.assertSoupEquals('<this is="really messed up & stuff"></this>',
+ '<this is="really messed up &amp; stuff"></this>')
+
+ self.assertSoupEquals(
+ '<a href="http://example.org?a=1&b=2;3">foo</a>',
+ '<a href="http://example.org?a=1&amp;b=2;3">foo</a>')
+
+ def test_escaped_ampersand_in_attribute_value_is_left_alone(self):
+ self.assertSoupEquals('<a href="http://example.org?a=1&amp;b=2;3"></a>')
+
+ def test_entities_in_strings_converted_during_parsing(self):
+ # Both XML and HTML entities are converted to Unicode characters
+ # during parsing.
+ text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
+ expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>"
+ self.assertSoupEquals(text, expected)
+
+ def test_smart_quotes_converted_on_the_way_in(self):
+ # Microsoft smart quotes are converted to Unicode characters during
+ # parsing.
+ quote = b"<p>\x91Foo\x92</p>"
+ soup = self.soup(quote)
+ self.assertEqual(
+ soup.p.string,
+ u"\N{LEFT SINGLE QUOTATION MARK}Foo\N{RIGHT SINGLE QUOTATION MARK}")
+
+ def test_non_breaking_spaces_converted_on_the_way_in(self):
+ soup = self.soup("<a>&nbsp;&nbsp;</a>")
+ self.assertEqual(soup.a.string, u"\N{NO-BREAK SPACE}" * 2)
+
+ def test_entities_converted_on_the_way_out(self):
+ text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
+ expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>".encode("utf-8")
+ soup = self.soup(text)
+ self.assertEqual(soup.p.encode("utf-8"), expected)
+
+ def test_real_iso_latin_document(self):
+ # Smoke test of interrelated functionality, using an
+ # easy-to-understand document.
+
+ # Here it is in Unicode. Note that it claims to be in ISO-Latin-1.
+ unicode_html = u'<html><head><meta content="text/html; charset=ISO-Latin-1" http-equiv="Content-type"/></head><body><p>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</p></body></html>'
+
+ # That's because we're going to encode it into ISO-Latin-1, and use
+ # that to test.
+ iso_latin_html = unicode_html.encode("iso-8859-1")
+
+ # Parse the ISO-Latin-1 HTML.
+ soup = self.soup(iso_latin_html)
+ # Encode it to UTF-8.
+ result = soup.encode("utf-8")
+
+ # What do we expect the result to look like? Well, it would
+ # look like unicode_html, except that the META tag would say
+ # UTF-8 instead of ISO-Latin-1.
+ expected = unicode_html.replace("ISO-Latin-1", "utf-8")
+
+ # And, of course, it would be in UTF-8, not Unicode.
+ expected = expected.encode("utf-8")
+
+ # Ta-da!
+ self.assertEqual(result, expected)
+
+ def test_real_shift_jis_document(self):
+ # Smoke test to make sure the parser can handle a document in
+ # Shift-JIS encoding, without choking.
+ shift_jis_html = (
+ b'<html><head></head><body><pre>'
+ b'\x82\xb1\x82\xea\x82\xcdShift-JIS\x82\xc5\x83R\x81[\x83f'
+ b'\x83B\x83\x93\x83O\x82\xb3\x82\xea\x82\xbd\x93\xfa\x96{\x8c'
+ b'\xea\x82\xcc\x83t\x83@\x83C\x83\x8b\x82\xc5\x82\xb7\x81B'
+ b'</pre></body></html>')
+ unicode_html = shift_jis_html.decode("shift-jis")
+ soup = self.soup(unicode_html)
+
+ # Make sure the parse tree is correctly encoded to various
+ # encodings.
+ self.assertEqual(soup.encode("utf-8"), unicode_html.encode("utf-8"))
+ self.assertEqual(soup.encode("euc_jp"), unicode_html.encode("euc_jp"))
+
+ def test_real_hebrew_document(self):
+ # A real-world test to make sure we can convert ISO-8859-9 (a
+ # Hebrew encoding) to UTF-8.
+ hebrew_document = b'<html><head><title>Hebrew (ISO 8859-8) in Visual Directionality</title></head><body><h1>Hebrew (ISO 8859-8) in Visual Directionality</h1>\xed\xe5\xec\xf9</body></html>'
+ soup = self.soup(
+ hebrew_document, from_encoding="iso8859-8")
+ self.assertEqual(soup.original_encoding, 'iso8859-8')
+ self.assertEqual(
+ soup.encode('utf-8'),
+ hebrew_document.decode("iso8859-8").encode("utf-8"))
+
+ def test_meta_tag_reflects_current_encoding(self):
+ # Here's the <meta> tag saying that a document is
+ # encoded in Shift-JIS.
+ meta_tag = ('<meta content="text/html; charset=x-sjis" '
+ 'http-equiv="Content-type"/>')
+
+ # Here's a document incorporating that meta tag.
+ shift_jis_html = (
+ '<html><head>\n%s\n'
+ '<meta http-equiv="Content-language" content="ja"/>'
+ '</head><body>Shift-JIS markup goes here.') % meta_tag
+ soup = self.soup(shift_jis_html)
+
+ # Parse the document, and the charset is seemingly unaffected.
+ parsed_meta = soup.find('meta', {'http-equiv': 'Content-type'})
+ content = parsed_meta['content']
+ self.assertEqual('text/html; charset=x-sjis', content)
+
+ # But that value is actually a ContentMetaAttributeValue object.
+ self.assertTrue(isinstance(content, ContentMetaAttributeValue))
+
+ # And it will take on a value that reflects its current
+ # encoding.
+ self.assertEqual('text/html; charset=utf8', content.encode("utf8"))
+
+ # For the rest of the story, see TestSubstitutions in
+ # test_tree.py.
+
+ def test_html5_style_meta_tag_reflects_current_encoding(self):
+ # Here's the <meta> tag saying that a document is
+ # encoded in Shift-JIS.
+ meta_tag = ('<meta id="encoding" charset="x-sjis" />')
+
+ # Here's a document incorporating that meta tag.
+ shift_jis_html = (
+ '<html><head>\n%s\n'
+ '<meta http-equiv="Content-language" content="ja"/>'
+ '</head><body>Shift-JIS markup goes here.') % meta_tag
+ soup = self.soup(shift_jis_html)
+
+ # Parse the document, and the charset is seemingly unaffected.
+ parsed_meta = soup.find('meta', id="encoding")
+ charset = parsed_meta['charset']
+ self.assertEqual('x-sjis', charset)
+
+ # But that value is actually a CharsetMetaAttributeValue object.
+ self.assertTrue(isinstance(charset, CharsetMetaAttributeValue))
+
+ # And it will take on a value that reflects its current
+ # encoding.
+ self.assertEqual('utf8', charset.encode("utf8"))
+
+ def test_tag_with_no_attributes_can_have_attributes_added(self):
+ data = self.soup("<a>text</a>")
+ data.a['foo'] = 'bar'
+ self.assertEqual('<a foo="bar">text</a>', data.a.decode())
+
+class XMLTreeBuilderSmokeTest(object):
+
+ def test_docstring_generated(self):
+ soup = self.soup("<root/>")
+ self.assertEqual(
+ soup.encode(), b'<?xml version="1.0" encoding="utf-8"?>\n<root/>')
+
+ def test_real_xhtml_document(self):
+ """A real XHTML document should come out *exactly* the same as it went in."""
+ markup = b"""<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Hello.</title></head>
+<body>Goodbye.</body>
+</html>"""
+ soup = self.soup(markup)
+ self.assertEqual(
+ soup.encode("utf-8"), markup)
+
+ def test_formatter_processes_script_tag_for_xml_documents(self):
+ doc = """
+ <script type="text/javascript">
+ </script>
+"""
+ soup = BeautifulSoup(doc, "xml")
+ # lxml would have stripped this while parsing, but we can add
+ # it later.
+ soup.script.string = 'console.log("< < hey > > ");'
+ encoded = soup.encode()
+ self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
+
+ def test_can_parse_unicode_document(self):
+ markup = u'<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
+ soup = self.soup(markup)
+ self.assertEqual(u'Sacr\xe9 bleu!', soup.root.string)
+
+ def test_popping_namespaced_tag(self):
+ markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>'
+ soup = self.soup(markup)
+ self.assertEqual(
+ unicode(soup.rss), markup)
+
+ def test_docstring_includes_correct_encoding(self):
+ soup = self.soup("<root/>")
+ self.assertEqual(
+ soup.encode("latin1"),
+ b'<?xml version="1.0" encoding="latin1"?>\n<root/>')
+
+ def test_large_xml_document(self):
+ """A large XML document should come out the same as it went in."""
+ markup = (b'<?xml version="1.0" encoding="utf-8"?>\n<root>'
+ + b'0' * (2**12)
+ + b'</root>')
+ soup = self.soup(markup)
+ self.assertEqual(soup.encode("utf-8"), markup)
+
+
+ def test_tags_are_empty_element_if_and_only_if_they_are_empty(self):
+ self.assertSoupEquals("<p>", "<p/>")
+ self.assertSoupEquals("<p>foo</p>")
+
+ def test_namespaces_are_preserved(self):
+ markup = '<root xmlns:a="http://example.com/" xmlns:b="http://example.net/"><a:foo>This tag is in the a namespace</a:foo><b:foo>This tag is in the b namespace</b:foo></root>'
+ soup = self.soup(markup)
+ root = soup.root
+ self.assertEqual("http://example.com/", root['xmlns:a'])
+ self.assertEqual("http://example.net/", root['xmlns:b'])
+
+ def test_closing_namespaced_tag(self):
+ markup = '<p xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>20010504</dc:date></p>'
+ soup = self.soup(markup)
+ self.assertEqual(unicode(soup.p), markup)
+
+ def test_namespaced_attributes(self):
+ markup = '<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bar xsi:schemaLocation="http://www.example.com"/></foo>'
+ soup = self.soup(markup)
+ self.assertEqual(unicode(soup.foo), markup)
+
+ def test_namespaced_attributes_xml_namespace(self):
+ markup = '<foo xml:lang="fr">bar</foo>'
+ soup = self.soup(markup)
+ self.assertEqual(unicode(soup.foo), markup)
+
+class HTML5TreeBuilderSmokeTest(HTMLTreeBuilderSmokeTest):
+ """Smoke test for a tree builder that supports HTML5."""
+
+ def test_real_xhtml_document(self):
+ # Since XHTML is not HTML5, HTML5 parsers are not tested to handle
+ # XHTML documents in any particular way.
+ pass
+
+ def test_html_tags_have_namespace(self):
+ markup = "<a>"
+ soup = self.soup(markup)
+ self.assertEqual("http://www.w3.org/1999/xhtml", soup.a.namespace)
+
+ def test_svg_tags_have_namespace(self):
+ markup = '<svg><circle/></svg>'
+ soup = self.soup(markup)
+ namespace = "http://www.w3.org/2000/svg"
+ self.assertEqual(namespace, soup.svg.namespace)
+ self.assertEqual(namespace, soup.circle.namespace)
+
+
+ def test_mathml_tags_have_namespace(self):
+ markup = '<math><msqrt>5</msqrt></math>'
+ soup = self.soup(markup)
+ namespace = 'http://www.w3.org/1998/Math/MathML'
+ self.assertEqual(namespace, soup.math.namespace)
+ self.assertEqual(namespace, soup.msqrt.namespace)
+
+ def test_xml_declaration_becomes_comment(self):
+ markup = '<?xml version="1.0" encoding="utf-8"?><html></html>'
+ soup = self.soup(markup)
+ self.assertTrue(isinstance(soup.contents[0], Comment))
+ self.assertEqual(soup.contents[0], '?xml version="1.0" encoding="utf-8"?')
+ self.assertEqual("html", soup.contents[0].next_element.name)
+
+def skipIf(condition, reason):
+ def nothing(test, *args, **kwargs):
+ return None
+
+ def decorator(test_item):
+ if condition:
+ return nothing
+ else:
+ return test_item
+
+ return decorator
diff --git a/bitbake/lib/bs4/tests/__init__.py b/bitbake/lib/bs4/tests/__init__.py
new file mode 100644
index 0000000000..142c8cc3f1
--- /dev/null
+++ b/bitbake/lib/bs4/tests/__init__.py
@@ -0,0 +1 @@
+"The beautifulsoup tests."
diff --git a/bitbake/lib/bs4/tests/test_builder_registry.py b/bitbake/lib/bs4/tests/test_builder_registry.py
new file mode 100644
index 0000000000..92ad10fb04
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_builder_registry.py
@@ -0,0 +1,141 @@
+"""Tests of the builder registry."""
+
+import unittest
+
+from bs4 import BeautifulSoup
+from bs4.builder import (
+ builder_registry as registry,
+ HTMLParserTreeBuilder,
+ TreeBuilderRegistry,
+)
+
+try:
+ from bs4.builder import HTML5TreeBuilder
+ HTML5LIB_PRESENT = True
+except ImportError:
+ HTML5LIB_PRESENT = False
+
+try:
+ from bs4.builder import (
+ LXMLTreeBuilderForXML,
+ LXMLTreeBuilder,
+ )
+ LXML_PRESENT = True
+except ImportError:
+ LXML_PRESENT = False
+
+
+class BuiltInRegistryTest(unittest.TestCase):
+ """Test the built-in registry with the default builders registered."""
+
+ def test_combination(self):
+ if LXML_PRESENT:
+ self.assertEqual(registry.lookup('fast', 'html'),
+ LXMLTreeBuilder)
+
+ if LXML_PRESENT:
+ self.assertEqual(registry.lookup('permissive', 'xml'),
+ LXMLTreeBuilderForXML)
+ self.assertEqual(registry.lookup('strict', 'html'),
+ HTMLParserTreeBuilder)
+ if HTML5LIB_PRESENT:
+ self.assertEqual(registry.lookup('html5lib', 'html'),
+ HTML5TreeBuilder)
+
+ def test_lookup_by_markup_type(self):
+ if LXML_PRESENT:
+ self.assertEqual(registry.lookup('html'), LXMLTreeBuilder)
+ self.assertEqual(registry.lookup('xml'), LXMLTreeBuilderForXML)
+ else:
+ self.assertEqual(registry.lookup('xml'), None)
+ if HTML5LIB_PRESENT:
+ self.assertEqual(registry.lookup('html'), HTML5TreeBuilder)
+ else:
+ self.assertEqual(registry.lookup('html'), HTMLParserTreeBuilder)
+
+ def test_named_library(self):
+ if LXML_PRESENT:
+ self.assertEqual(registry.lookup('lxml', 'xml'),
+ LXMLTreeBuilderForXML)
+ self.assertEqual(registry.lookup('lxml', 'html'),
+ LXMLTreeBuilder)
+ if HTML5LIB_PRESENT:
+ self.assertEqual(registry.lookup('html5lib'),
+ HTML5TreeBuilder)
+
+ self.assertEqual(registry.lookup('html.parser'),
+ HTMLParserTreeBuilder)
+
+ def test_beautifulsoup_constructor_does_lookup(self):
+ # You can pass in a string.
+ BeautifulSoup("", features="html")
+ # Or a list of strings.
+ BeautifulSoup("", features=["html", "fast"])
+
+ # You'll get an exception if BS can't find an appropriate
+ # builder.
+ self.assertRaises(ValueError, BeautifulSoup,
+ "", features="no-such-feature")
+
+class RegistryTest(unittest.TestCase):
+ """Test the TreeBuilderRegistry class in general."""
+
+ def setUp(self):
+ self.registry = TreeBuilderRegistry()
+
+ def builder_for_features(self, *feature_list):
+ cls = type('Builder_' + '_'.join(feature_list),
+ (object,), {'features' : feature_list})
+
+ self.registry.register(cls)
+ return cls
+
+ def test_register_with_no_features(self):
+ builder = self.builder_for_features()
+
+ # Since the builder advertises no features, you can't find it
+ # by looking up features.
+ self.assertEqual(self.registry.lookup('foo'), None)
+
+ # But you can find it by doing a lookup with no features, if
+ # this happens to be the only registered builder.
+ self.assertEqual(self.registry.lookup(), builder)
+
+ def test_register_with_features_makes_lookup_succeed(self):
+ builder = self.builder_for_features('foo', 'bar')
+ self.assertEqual(self.registry.lookup('foo'), builder)
+ self.assertEqual(self.registry.lookup('bar'), builder)
+
+ def test_lookup_fails_when_no_builder_implements_feature(self):
+ builder = self.builder_for_features('foo', 'bar')
+ self.assertEqual(self.registry.lookup('baz'), None)
+
+ def test_lookup_gets_most_recent_registration_when_no_feature_specified(self):
+ builder1 = self.builder_for_features('foo')
+ builder2 = self.builder_for_features('bar')
+ self.assertEqual(self.registry.lookup(), builder2)
+
+ def test_lookup_fails_when_no_tree_builders_registered(self):
+ self.assertEqual(self.registry.lookup(), None)
+
+ def test_lookup_gets_most_recent_builder_supporting_all_features(self):
+ has_one = self.builder_for_features('foo')
+ has_the_other = self.builder_for_features('bar')
+ has_both_early = self.builder_for_features('foo', 'bar', 'baz')
+ has_both_late = self.builder_for_features('foo', 'bar', 'quux')
+ lacks_one = self.builder_for_features('bar')
+ has_the_other = self.builder_for_features('foo')
+
+ # There are two builders featuring 'foo' and 'bar', but
+ # the one that also features 'quux' was registered later.
+ self.assertEqual(self.registry.lookup('foo', 'bar'),
+ has_both_late)
+
+ # There is only one builder featuring 'foo', 'bar', and 'baz'.
+ self.assertEqual(self.registry.lookup('foo', 'bar', 'baz'),
+ has_both_early)
+
+ def test_lookup_fails_when_cannot_reconcile_requested_features(self):
+ builder1 = self.builder_for_features('foo', 'bar')
+ builder2 = self.builder_for_features('foo', 'baz')
+ self.assertEqual(self.registry.lookup('bar', 'baz'), None)
diff --git a/bitbake/lib/bs4/tests/test_docs.py b/bitbake/lib/bs4/tests/test_docs.py
new file mode 100644
index 0000000000..5b9f677093
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_docs.py
@@ -0,0 +1,36 @@
+"Test harness for doctests."
+
+# pylint: disable-msg=E0611,W0142
+
+__metaclass__ = type
+__all__ = [
+ 'additional_tests',
+ ]
+
+import atexit
+import doctest
+import os
+#from pkg_resources import (
+# resource_filename, resource_exists, resource_listdir, cleanup_resources)
+import unittest
+
+DOCTEST_FLAGS = (
+ doctest.ELLIPSIS |
+ doctest.NORMALIZE_WHITESPACE |
+ doctest.REPORT_NDIFF)
+
+
+# def additional_tests():
+# "Run the doc tests (README.txt and docs/*, if any exist)"
+# doctest_files = [
+# os.path.abspath(resource_filename('bs4', 'README.txt'))]
+# if resource_exists('bs4', 'docs'):
+# for name in resource_listdir('bs4', 'docs'):
+# if name.endswith('.txt'):
+# doctest_files.append(
+# os.path.abspath(
+# resource_filename('bs4', 'docs/%s' % name)))
+# kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS)
+# atexit.register(cleanup_resources)
+# return unittest.TestSuite((
+# doctest.DocFileSuite(*doctest_files, **kwargs)))
diff --git a/bitbake/lib/bs4/tests/test_html5lib.py b/bitbake/lib/bs4/tests/test_html5lib.py
new file mode 100644
index 0000000000..594c3e1f26
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_html5lib.py
@@ -0,0 +1,85 @@
+"""Tests to ensure that the html5lib tree builder generates good trees."""
+
+import warnings
+
+try:
+ from bs4.builder import HTML5TreeBuilder
+ HTML5LIB_PRESENT = True
+except ImportError, e:
+ HTML5LIB_PRESENT = False
+from bs4.element import SoupStrainer
+from bs4.testing import (
+ HTML5TreeBuilderSmokeTest,
+ SoupTest,
+ skipIf,
+)
+
+@skipIf(
+ not HTML5LIB_PRESENT,
+ "html5lib seems not to be present, not testing its tree builder.")
+class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest):
+ """See ``HTML5TreeBuilderSmokeTest``."""
+
+ @property
+ def default_builder(self):
+ return HTML5TreeBuilder()
+
+ def test_soupstrainer(self):
+ # The html5lib tree builder does not support SoupStrainers.
+ strainer = SoupStrainer("b")
+ markup = "<p>A <b>bold</b> statement.</p>"
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup(markup, parse_only=strainer)
+ self.assertEqual(
+ soup.decode(), self.document_for(markup))
+
+ self.assertTrue(
+ "the html5lib tree builder doesn't support parse_only" in
+ str(w[0].message))
+
+ def test_correctly_nested_tables(self):
+ """html5lib inserts <tbody> tags where other parsers don't."""
+ markup = ('<table id="1">'
+ '<tr>'
+ "<td>Here's another table:"
+ '<table id="2">'
+ '<tr><td>foo</td></tr>'
+ '</table></td>')
+
+ self.assertSoupEquals(
+ markup,
+ '<table id="1"><tbody><tr><td>Here\'s another table:'
+ '<table id="2"><tbody><tr><td>foo</td></tr></tbody></table>'
+ '</td></tr></tbody></table>')
+
+ self.assertSoupEquals(
+ "<table><thead><tr><td>Foo</td></tr></thead>"
+ "<tbody><tr><td>Bar</td></tr></tbody>"
+ "<tfoot><tr><td>Baz</td></tr></tfoot></table>")
+
+ def test_xml_declaration_followed_by_doctype(self):
+ markup = '''<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html>
+<html>
+ <head>
+ </head>
+ <body>
+ <p>foo</p>
+ </body>
+</html>'''
+ soup = self.soup(markup)
+ # Verify that we can reach the <p> tag; this means the tree is connected.
+ self.assertEqual(b"<p>foo</p>", soup.p.encode())
+
+ def test_reparented_markup(self):
+ markup = '<p><em>foo</p>\n<p>bar<a></a></em></p>'
+ soup = self.soup(markup)
+ self.assertEqual(u"<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p></body>", soup.body.decode())
+ self.assertEqual(2, len(soup.find_all('p')))
+
+
+ def test_reparented_markup_ends_with_whitespace(self):
+ markup = '<p><em>foo</p>\n<p>bar<a></a></em></p>\n'
+ soup = self.soup(markup)
+ self.assertEqual(u"<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p>\n</body>", soup.body.decode())
+ self.assertEqual(2, len(soup.find_all('p')))
diff --git a/bitbake/lib/bs4/tests/test_htmlparser.py b/bitbake/lib/bs4/tests/test_htmlparser.py
new file mode 100644
index 0000000000..bcb5ed232f
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_htmlparser.py
@@ -0,0 +1,19 @@
+"""Tests to ensure that the html.parser tree builder generates good
+trees."""
+
+from bs4.testing import SoupTest, HTMLTreeBuilderSmokeTest
+from bs4.builder import HTMLParserTreeBuilder
+
+class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
+
+ @property
+ def default_builder(self):
+ return HTMLParserTreeBuilder()
+
+ def test_namespaced_system_doctype(self):
+ # html.parser can't handle namespaced doctypes, so skip this one.
+ pass
+
+ def test_namespaced_public_doctype(self):
+ # html.parser can't handle namespaced doctypes, so skip this one.
+ pass
diff --git a/bitbake/lib/bs4/tests/test_lxml.py b/bitbake/lib/bs4/tests/test_lxml.py
new file mode 100644
index 0000000000..2b2e9b7e78
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_lxml.py
@@ -0,0 +1,91 @@
+"""Tests to ensure that the lxml tree builder generates good trees."""
+
+import re
+import warnings
+
+try:
+ import lxml.etree
+ LXML_PRESENT = True
+ LXML_VERSION = lxml.etree.LXML_VERSION
+except ImportError, e:
+ LXML_PRESENT = False
+ LXML_VERSION = (0,)
+
+if LXML_PRESENT:
+ from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML
+
+from bs4 import (
+ BeautifulSoup,
+ BeautifulStoneSoup,
+ )
+from bs4.element import Comment, Doctype, SoupStrainer
+from bs4.testing import skipIf
+from bs4.tests import test_htmlparser
+from bs4.testing import (
+ HTMLTreeBuilderSmokeTest,
+ XMLTreeBuilderSmokeTest,
+ SoupTest,
+ skipIf,
+)
+
+@skipIf(
+ not LXML_PRESENT,
+ "lxml seems not to be present, not testing its tree builder.")
+class LXMLTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
+ """See ``HTMLTreeBuilderSmokeTest``."""
+
+ @property
+ def default_builder(self):
+ return LXMLTreeBuilder()
+
+ def test_out_of_range_entity(self):
+ self.assertSoupEquals(
+ "<p>foo&#10000000000000;bar</p>", "<p>foobar</p>")
+ self.assertSoupEquals(
+ "<p>foo&#x10000000000000;bar</p>", "<p>foobar</p>")
+ self.assertSoupEquals(
+ "<p>foo&#1000000000;bar</p>", "<p>foobar</p>")
+
+ # In lxml < 2.3.5, an empty doctype causes a segfault. Skip this
+ # test if an old version of lxml is installed.
+
+ @skipIf(
+ not LXML_PRESENT or LXML_VERSION < (2,3,5,0),
+ "Skipping doctype test for old version of lxml to avoid segfault.")
+ def test_empty_doctype(self):
+ soup = self.soup("<!DOCTYPE>")
+ doctype = soup.contents[0]
+ self.assertEqual("", doctype.strip())
+
+ def test_beautifulstonesoup_is_xml_parser(self):
+ # Make sure that the deprecated BSS class uses an xml builder
+ # if one is installed.
+ with warnings.catch_warnings(record=True) as w:
+ soup = BeautifulStoneSoup("<b />")
+ self.assertEqual(u"<b/>", unicode(soup.b))
+ self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message))
+
+ def test_real_xhtml_document(self):
+ """lxml strips the XML definition from an XHTML doc, which is fine."""
+ markup = b"""<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Hello.</title></head>
+<body>Goodbye.</body>
+</html>"""
+ soup = self.soup(markup)
+ self.assertEqual(
+ soup.encode("utf-8").replace(b"\n", b''),
+ markup.replace(b'\n', b'').replace(
+ b'<?xml version="1.0" encoding="utf-8"?>', b''))
+
+
+@skipIf(
+ not LXML_PRESENT,
+ "lxml seems not to be present, not testing its XML tree builder.")
+class LXMLXMLTreeBuilderSmokeTest(SoupTest, XMLTreeBuilderSmokeTest):
+ """See ``HTMLTreeBuilderSmokeTest``."""
+
+ @property
+ def default_builder(self):
+ return LXMLTreeBuilderForXML()
diff --git a/bitbake/lib/bs4/tests/test_soup.py b/bitbake/lib/bs4/tests/test_soup.py
new file mode 100644
index 0000000000..47ac245f99
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_soup.py
@@ -0,0 +1,434 @@
+# -*- coding: utf-8 -*-
+"""Tests of Beautiful Soup as a whole."""
+
+import logging
+import unittest
+import sys
+import tempfile
+
+from bs4 import (
+ BeautifulSoup,
+ BeautifulStoneSoup,
+)
+from bs4.element import (
+ CharsetMetaAttributeValue,
+ ContentMetaAttributeValue,
+ SoupStrainer,
+ NamespacedAttribute,
+ )
+import bs4.dammit
+from bs4.dammit import (
+ EntitySubstitution,
+ UnicodeDammit,
+)
+from bs4.testing import (
+ SoupTest,
+ skipIf,
+)
+import warnings
+
+try:
+ from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML
+ LXML_PRESENT = True
+except ImportError, e:
+ LXML_PRESENT = False
+
+PYTHON_2_PRE_2_7 = (sys.version_info < (2,7))
+PYTHON_3_PRE_3_2 = (sys.version_info[0] == 3 and sys.version_info < (3,2))
+
+class TestConstructor(SoupTest):
+
+ def test_short_unicode_input(self):
+ data = u"<h1>éé</h1>"
+ soup = self.soup(data)
+ self.assertEqual(u"éé", soup.h1.string)
+
+ def test_embedded_null(self):
+ data = u"<h1>foo\0bar</h1>"
+ soup = self.soup(data)
+ self.assertEqual(u"foo\0bar", soup.h1.string)
+
+
+class TestDeprecatedConstructorArguments(SoupTest):
+
+ def test_parseOnlyThese_renamed_to_parse_only(self):
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup("<a><b></b></a>", parseOnlyThese=SoupStrainer("b"))
+ msg = str(w[0].message)
+ self.assertTrue("parseOnlyThese" in msg)
+ self.assertTrue("parse_only" in msg)
+ self.assertEqual(b"<b></b>", soup.encode())
+
+ def test_fromEncoding_renamed_to_from_encoding(self):
+ with warnings.catch_warnings(record=True) as w:
+ utf8 = b"\xc3\xa9"
+ soup = self.soup(utf8, fromEncoding="utf8")
+ msg = str(w[0].message)
+ self.assertTrue("fromEncoding" in msg)
+ self.assertTrue("from_encoding" in msg)
+ self.assertEqual("utf8", soup.original_encoding)
+
+ def test_unrecognized_keyword_argument(self):
+ self.assertRaises(
+ TypeError, self.soup, "<a>", no_such_argument=True)
+
+class TestWarnings(SoupTest):
+
+ def test_disk_file_warning(self):
+ filehandle = tempfile.NamedTemporaryFile()
+ filename = filehandle.name
+ try:
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup(filename)
+ msg = str(w[0].message)
+ self.assertTrue("looks like a filename" in msg)
+ finally:
+ filehandle.close()
+
+ # The file no longer exists, so Beautiful Soup will no longer issue the warning.
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup(filename)
+ self.assertEqual(0, len(w))
+
+ def test_url_warning(self):
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup("http://www.crummy.com/")
+ msg = str(w[0].message)
+ self.assertTrue("looks like a URL" in msg)
+
+ with warnings.catch_warnings(record=True) as w:
+ soup = self.soup("http://www.crummy.com/ is great")
+ self.assertEqual(0, len(w))
+
+class TestSelectiveParsing(SoupTest):
+
+ def test_parse_with_soupstrainer(self):
+ markup = "No<b>Yes</b><a>No<b>Yes <c>Yes</c></b>"
+ strainer = SoupStrainer("b")
+ soup = self.soup(markup, parse_only=strainer)
+ self.assertEqual(soup.encode(), b"<b>Yes</b><b>Yes <c>Yes</c></b>")
+
+
+class TestEntitySubstitution(unittest.TestCase):
+ """Standalone tests of the EntitySubstitution class."""
+ def setUp(self):
+ self.sub = EntitySubstitution
+
+ def test_simple_html_substitution(self):
+ # Unicode characters corresponding to named HTML entites
+ # are substituted, and no others.
+ s = u"foo\u2200\N{SNOWMAN}\u00f5bar"
+ self.assertEqual(self.sub.substitute_html(s),
+ u"foo&forall;\N{SNOWMAN}&otilde;bar")
+
+ def test_smart_quote_substitution(self):
+ # MS smart quotes are a common source of frustration, so we
+ # give them a special test.
+ quotes = b"\x91\x92foo\x93\x94"
+ dammit = UnicodeDammit(quotes)
+ self.assertEqual(self.sub.substitute_html(dammit.markup),
+ "&lsquo;&rsquo;foo&ldquo;&rdquo;")
+
+ def test_xml_converstion_includes_no_quotes_if_make_quoted_attribute_is_false(self):
+ s = 'Welcome to "my bar"'
+ self.assertEqual(self.sub.substitute_xml(s, False), s)
+
+ def test_xml_attribute_quoting_normally_uses_double_quotes(self):
+ self.assertEqual(self.sub.substitute_xml("Welcome", True),
+ '"Welcome"')
+ self.assertEqual(self.sub.substitute_xml("Bob's Bar", True),
+ '"Bob\'s Bar"')
+
+ def test_xml_attribute_quoting_uses_single_quotes_when_value_contains_double_quotes(self):
+ s = 'Welcome to "my bar"'
+ self.assertEqual(self.sub.substitute_xml(s, True),
+ "'Welcome to \"my bar\"'")
+
+ def test_xml_attribute_quoting_escapes_single_quotes_when_value_contains_both_single_and_double_quotes(self):
+ s = 'Welcome to "Bob\'s Bar"'
+ self.assertEqual(
+ self.sub.substitute_xml(s, True),
+ '"Welcome to &quot;Bob\'s Bar&quot;"')
+
+ def test_xml_quotes_arent_escaped_when_value_is_not_being_quoted(self):
+ quoted = 'Welcome to "Bob\'s Bar"'
+ self.assertEqual(self.sub.substitute_xml(quoted), quoted)
+
+ def test_xml_quoting_handles_angle_brackets(self):
+ self.assertEqual(
+ self.sub.substitute_xml("foo<bar>"),
+ "foo&lt;bar&gt;")
+
+ def test_xml_quoting_handles_ampersands(self):
+ self.assertEqual(self.sub.substitute_xml("AT&T"), "AT&amp;T")
+
+ def test_xml_quoting_including_ampersands_when_they_are_part_of_an_entity(self):
+ self.assertEqual(
+ self.sub.substitute_xml("&Aacute;T&T"),
+ "&amp;Aacute;T&amp;T")
+
+ def test_xml_quoting_ignoring_ampersands_when_they_are_part_of_an_entity(self):
+ self.assertEqual(
+ self.sub.substitute_xml_containing_entities("&Aacute;T&T"),
+ "&Aacute;T&amp;T")
+
+ def test_quotes_not_html_substituted(self):
+ """There's no need to do this except inside attribute values."""
+ text = 'Bob\'s "bar"'
+ self.assertEqual(self.sub.substitute_html(text), text)
+
+
+class TestEncodingConversion(SoupTest):
+ # Test Beautiful Soup's ability to decode and encode from various
+ # encodings.
+
+ def setUp(self):
+ super(TestEncodingConversion, self).setUp()
+ self.unicode_data = u'<html><head><meta charset="utf-8"/></head><body><foo>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</foo></body></html>'
+ self.utf8_data = self.unicode_data.encode("utf-8")
+ # Just so you know what it looks like.
+ self.assertEqual(
+ self.utf8_data,
+ b'<html><head><meta charset="utf-8"/></head><body><foo>Sacr\xc3\xa9 bleu!</foo></body></html>')
+
+ def test_ascii_in_unicode_out(self):
+ # ASCII input is converted to Unicode. The original_encoding
+ # attribute is set to 'utf-8', a superset of ASCII.
+ chardet = bs4.dammit.chardet_dammit
+ logging.disable(logging.WARNING)
+ try:
+ def noop(str):
+ return None
+ # Disable chardet, which will realize that the ASCII is ASCII.
+ bs4.dammit.chardet_dammit = noop
+ ascii = b"<foo>a</foo>"
+ soup_from_ascii = self.soup(ascii)
+ unicode_output = soup_from_ascii.decode()
+ self.assertTrue(isinstance(unicode_output, unicode))
+ self.assertEqual(unicode_output, self.document_for(ascii.decode()))
+ self.assertEqual(soup_from_ascii.original_encoding.lower(), "utf-8")
+ finally:
+ logging.disable(logging.NOTSET)
+ bs4.dammit.chardet_dammit = chardet
+
+ def test_unicode_in_unicode_out(self):
+ # Unicode input is left alone. The original_encoding attribute
+ # is not set.
+ soup_from_unicode = self.soup(self.unicode_data)
+ self.assertEqual(soup_from_unicode.decode(), self.unicode_data)
+ self.assertEqual(soup_from_unicode.foo.string, u'Sacr\xe9 bleu!')
+ self.assertEqual(soup_from_unicode.original_encoding, None)
+
+ def test_utf8_in_unicode_out(self):
+ # UTF-8 input is converted to Unicode. The original_encoding
+ # attribute is set.
+ soup_from_utf8 = self.soup(self.utf8_data)
+ self.assertEqual(soup_from_utf8.decode(), self.unicode_data)
+ self.assertEqual(soup_from_utf8.foo.string, u'Sacr\xe9 bleu!')
+
+ def test_utf8_out(self):
+ # The internal data structures can be encoded as UTF-8.
+ soup_from_unicode = self.soup(self.unicode_data)
+ self.assertEqual(soup_from_unicode.encode('utf-8'), self.utf8_data)
+
+ @skipIf(
+ PYTHON_2_PRE_2_7 or PYTHON_3_PRE_3_2,
+ "Bad HTMLParser detected; skipping test of non-ASCII characters in attribute name.")
+ def test_attribute_name_containing_unicode_characters(self):
+ markup = u'<div><a \N{SNOWMAN}="snowman"></a></div>'
+ self.assertEqual(self.soup(markup).div.encode("utf8"), markup.encode("utf8"))
+
+class TestUnicodeDammit(unittest.TestCase):
+ """Standalone tests of UnicodeDammit."""
+
+ def test_unicode_input(self):
+ markup = u"I'm already Unicode! \N{SNOWMAN}"
+ dammit = UnicodeDammit(markup)
+ self.assertEqual(dammit.unicode_markup, markup)
+
+ def test_smart_quotes_to_unicode(self):
+ markup = b"<foo>\x91\x92\x93\x94</foo>"
+ dammit = UnicodeDammit(markup)
+ self.assertEqual(
+ dammit.unicode_markup, u"<foo>\u2018\u2019\u201c\u201d</foo>")
+
+ def test_smart_quotes_to_xml_entities(self):
+ markup = b"<foo>\x91\x92\x93\x94</foo>"
+ dammit = UnicodeDammit(markup, smart_quotes_to="xml")
+ self.assertEqual(
+ dammit.unicode_markup, "<foo>&#x2018;&#x2019;&#x201C;&#x201D;</foo>")
+
+ def test_smart_quotes_to_html_entities(self):
+ markup = b"<foo>\x91\x92\x93\x94</foo>"
+ dammit = UnicodeDammit(markup, smart_quotes_to="html")
+ self.assertEqual(
+ dammit.unicode_markup, "<foo>&lsquo;&rsquo;&ldquo;&rdquo;</foo>")
+
+ def test_smart_quotes_to_ascii(self):
+ markup = b"<foo>\x91\x92\x93\x94</foo>"
+ dammit = UnicodeDammit(markup, smart_quotes_to="ascii")
+ self.assertEqual(
+ dammit.unicode_markup, """<foo>''""</foo>""")
+
+ def test_detect_utf8(self):
+ utf8 = b"\xc3\xa9"
+ dammit = UnicodeDammit(utf8)
+ self.assertEqual(dammit.unicode_markup, u'\xe9')
+ self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
+
+ def test_convert_hebrew(self):
+ hebrew = b"\xed\xe5\xec\xf9"
+ dammit = UnicodeDammit(hebrew, ["iso-8859-8"])
+ self.assertEqual(dammit.original_encoding.lower(), 'iso-8859-8')
+ self.assertEqual(dammit.unicode_markup, u'\u05dd\u05d5\u05dc\u05e9')
+
+ def test_dont_see_smart_quotes_where_there_are_none(self):
+ utf_8 = b"\343\202\261\343\203\274\343\202\277\343\202\244 Watch"
+ dammit = UnicodeDammit(utf_8)
+ self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
+ self.assertEqual(dammit.unicode_markup.encode("utf-8"), utf_8)
+
+ def test_ignore_inappropriate_codecs(self):
+ utf8_data = u"Räksmörgås".encode("utf-8")
+ dammit = UnicodeDammit(utf8_data, ["iso-8859-8"])
+ self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
+
+ def test_ignore_invalid_codecs(self):
+ utf8_data = u"Räksmörgås".encode("utf-8")
+ for bad_encoding in ['.utf8', '...', 'utF---16.!']:
+ dammit = UnicodeDammit(utf8_data, [bad_encoding])
+ self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
+
+ def test_detect_html5_style_meta_tag(self):
+
+ for data in (
+ b'<html><meta charset="euc-jp" /></html>',
+ b"<html><meta charset='euc-jp' /></html>",
+ b"<html><meta charset=euc-jp /></html>",
+ b"<html><meta charset=euc-jp/></html>"):
+ dammit = UnicodeDammit(data, is_html=True)
+ self.assertEqual(
+ "euc-jp", dammit.original_encoding)
+
+ def test_last_ditch_entity_replacement(self):
+ # This is a UTF-8 document that contains bytestrings
+ # completely incompatible with UTF-8 (ie. encoded with some other
+ # encoding).
+ #
+ # Since there is no consistent encoding for the document,
+ # Unicode, Dammit will eventually encode the document as UTF-8
+ # and encode the incompatible characters as REPLACEMENT
+ # CHARACTER.
+ #
+ # If chardet is installed, it will detect that the document
+ # can be converted into ISO-8859-1 without errors. This happens
+ # to be the wrong encoding, but it is a consistent encoding, so the
+ # code we're testing here won't run.
+ #
+ # So we temporarily disable chardet if it's present.
+ doc = b"""\357\273\277<?xml version="1.0" encoding="UTF-8"?>
+<html><b>\330\250\330\252\330\261</b>
+<i>\310\322\321\220\312\321\355\344</i></html>"""
+ chardet = bs4.dammit.chardet_dammit
+ logging.disable(logging.WARNING)
+ try:
+ def noop(str):
+ return None
+ bs4.dammit.chardet_dammit = noop
+ dammit = UnicodeDammit(doc)
+ self.assertEqual(True, dammit.contains_replacement_characters)
+ self.assertTrue(u"\ufffd" in dammit.unicode_markup)
+
+ soup = BeautifulSoup(doc, "html.parser")
+ self.assertTrue(soup.contains_replacement_characters)
+ finally:
+ logging.disable(logging.NOTSET)
+ bs4.dammit.chardet_dammit = chardet
+
+ def test_byte_order_mark_removed(self):
+ # A document written in UTF-16LE will have its byte order marker stripped.
+ data = b'\xff\xfe<\x00a\x00>\x00\xe1\x00\xe9\x00<\x00/\x00a\x00>\x00'
+ dammit = UnicodeDammit(data)
+ self.assertEqual(u"<a>áé</a>", dammit.unicode_markup)
+ self.assertEqual("utf-16le", dammit.original_encoding)
+
+ def test_detwingle(self):
+ # Here's a UTF8 document.
+ utf8 = (u"\N{SNOWMAN}" * 3).encode("utf8")
+
+ # Here's a Windows-1252 document.
+ windows_1252 = (
+ u"\N{LEFT DOUBLE QUOTATION MARK}Hi, I like Windows!"
+ u"\N{RIGHT DOUBLE QUOTATION MARK}").encode("windows_1252")
+
+ # Through some unholy alchemy, they've been stuck together.
+ doc = utf8 + windows_1252 + utf8
+
+ # The document can't be turned into UTF-8:
+ self.assertRaises(UnicodeDecodeError, doc.decode, "utf8")
+
+ # Unicode, Dammit thinks the whole document is Windows-1252,
+ # and decodes it into "☃☃☃“Hi, I like Windows!â€Ã¢ËœÆ’☃☃"
+
+ # But if we run it through fix_embedded_windows_1252, it's fixed:
+
+ fixed = UnicodeDammit.detwingle(doc)
+ self.assertEqual(
+ u"☃☃☃“Hi, I like Windows!â€â˜ƒâ˜ƒâ˜ƒ", fixed.decode("utf8"))
+
+ def test_detwingle_ignores_multibyte_characters(self):
+ # Each of these characters has a UTF-8 representation ending
+ # in \x93. \x93 is a smart quote if interpreted as
+ # Windows-1252. But our code knows to skip over multibyte
+ # UTF-8 characters, so they'll survive the process unscathed.
+ for tricky_unicode_char in (
+ u"\N{LATIN SMALL LIGATURE OE}", # 2-byte char '\xc5\x93'
+ u"\N{LATIN SUBSCRIPT SMALL LETTER X}", # 3-byte char '\xe2\x82\x93'
+ u"\xf0\x90\x90\x93", # This is a CJK character, not sure which one.
+ ):
+ input = tricky_unicode_char.encode("utf8")
+ self.assertTrue(input.endswith(b'\x93'))
+ output = UnicodeDammit.detwingle(input)
+ self.assertEqual(output, input)
+
+class TestNamedspacedAttribute(SoupTest):
+
+ def test_name_may_be_none(self):
+ a = NamespacedAttribute("xmlns", None)
+ self.assertEqual(a, "xmlns")
+
+ def test_attribute_is_equivalent_to_colon_separated_string(self):
+ a = NamespacedAttribute("a", "b")
+ self.assertEqual("a:b", a)
+
+ def test_attributes_are_equivalent_if_prefix_and_name_identical(self):
+ a = NamespacedAttribute("a", "b", "c")
+ b = NamespacedAttribute("a", "b", "c")
+ self.assertEqual(a, b)
+
+ # The actual namespace is not considered.
+ c = NamespacedAttribute("a", "b", None)
+ self.assertEqual(a, c)
+
+ # But name and prefix are important.
+ d = NamespacedAttribute("a", "z", "c")
+ self.assertNotEqual(a, d)
+
+ e = NamespacedAttribute("z", "b", "c")
+ self.assertNotEqual(a, e)
+
+
+class TestAttributeValueWithCharsetSubstitution(unittest.TestCase):
+
+ def test_content_meta_attribute_value(self):
+ value = CharsetMetaAttributeValue("euc-jp")
+ self.assertEqual("euc-jp", value)
+ self.assertEqual("euc-jp", value.original_value)
+ self.assertEqual("utf8", value.encode("utf8"))
+
+
+ def test_content_meta_attribute_value(self):
+ value = ContentMetaAttributeValue("text/html; charset=euc-jp")
+ self.assertEqual("text/html; charset=euc-jp", value)
+ self.assertEqual("text/html; charset=euc-jp", value.original_value)
+ self.assertEqual("text/html; charset=utf8", value.encode("utf8"))
diff --git a/bitbake/lib/bs4/tests/test_tree.py b/bitbake/lib/bs4/tests/test_tree.py
new file mode 100644
index 0000000000..f8515c0ea1
--- /dev/null
+++ b/bitbake/lib/bs4/tests/test_tree.py
@@ -0,0 +1,1829 @@
+# -*- coding: utf-8 -*-
+"""Tests for Beautiful Soup's tree traversal methods.
+
+The tree traversal methods are the main advantage of using Beautiful
+Soup over just using a parser.
+
+Different parsers will build different Beautiful Soup trees given the
+same markup, but all Beautiful Soup trees can be traversed with the
+methods tested here.
+"""
+
+import copy
+import pickle
+import re
+import warnings
+from bs4 import BeautifulSoup
+from bs4.builder import (
+ builder_registry,
+ HTMLParserTreeBuilder,
+)
+from bs4.element import (
+ CData,
+ Comment,
+ Doctype,
+ NavigableString,
+ SoupStrainer,
+ Tag,
+)
+from bs4.testing import (
+ SoupTest,
+ skipIf,
+)
+
+XML_BUILDER_PRESENT = (builder_registry.lookup("xml") is not None)
+LXML_PRESENT = (builder_registry.lookup("lxml") is not None)
+
+class TreeTest(SoupTest):
+
+ def assertSelects(self, tags, should_match):
+ """Make sure that the given tags have the correct text.
+
+ This is used in tests that define a bunch of tags, each
+ containing a single string, and then select certain strings by
+ some mechanism.
+ """
+ self.assertEqual([tag.string for tag in tags], should_match)
+
+ def assertSelectsIDs(self, tags, should_match):
+ """Make sure that the given tags have the correct IDs.
+
+ This is used in tests that define a bunch of tags, each
+ containing a single string, and then select certain strings by
+ some mechanism.
+ """
+ self.assertEqual([tag['id'] for tag in tags], should_match)
+
+
+class TestFind(TreeTest):
+ """Basic tests of the find() method.
+
+ find() just calls find_all() with limit=1, so it's not tested all
+ that thouroughly here.
+ """
+
+ def test_find_tag(self):
+ soup = self.soup("<a>1</a><b>2</b><a>3</a><b>4</b>")
+ self.assertEqual(soup.find("b").string, "2")
+
+ def test_unicode_text_find(self):
+ soup = self.soup(u'<h1>Räksmörgås</h1>')
+ self.assertEqual(soup.find(text=u'Räksmörgås'), u'Räksmörgås')
+
+ def test_find_everything(self):
+ """Test an optimization that finds all tags."""
+ soup = self.soup("<a>foo</a><b>bar</b>")
+ self.assertEqual(2, len(soup.find_all()))
+
+ def test_find_everything_with_name(self):
+ """Test an optimization that finds all tags with a given name."""
+ soup = self.soup("<a>foo</a><b>bar</b><a>baz</a>")
+ self.assertEqual(2, len(soup.find_all('a')))
+
+class TestFindAll(TreeTest):
+ """Basic tests of the find_all() method."""
+
+ def test_find_all_text_nodes(self):
+ """You can search the tree for text nodes."""
+ soup = self.soup("<html>Foo<b>bar</b>\xbb</html>")
+ # Exact match.
+ self.assertEqual(soup.find_all(text="bar"), [u"bar"])
+ # Match any of a number of strings.
+ self.assertEqual(
+ soup.find_all(text=["Foo", "bar"]), [u"Foo", u"bar"])
+ # Match a regular expression.
+ self.assertEqual(soup.find_all(text=re.compile('.*')),
+ [u"Foo", u"bar", u'\xbb'])
+ # Match anything.
+ self.assertEqual(soup.find_all(text=True),
+ [u"Foo", u"bar", u'\xbb'])
+
+ def test_find_all_limit(self):
+ """You can limit the number of items returned by find_all."""
+ soup = self.soup("<a>1</a><a>2</a><a>3</a><a>4</a><a>5</a>")
+ self.assertSelects(soup.find_all('a', limit=3), ["1", "2", "3"])
+ self.assertSelects(soup.find_all('a', limit=1), ["1"])
+ self.assertSelects(
+ soup.find_all('a', limit=10), ["1", "2", "3", "4", "5"])
+
+ # A limit of 0 means no limit.
+ self.assertSelects(
+ soup.find_all('a', limit=0), ["1", "2", "3", "4", "5"])
+
+ def test_calling_a_tag_is_calling_findall(self):
+ soup = self.soup("<a>1</a><b>2<a id='foo'>3</a></b>")
+ self.assertSelects(soup('a', limit=1), ["1"])
+ self.assertSelects(soup.b(id="foo"), ["3"])
+
+ def test_find_all_with_self_referential_data_structure_does_not_cause_infinite_recursion(self):
+ soup = self.soup("<a></a>")
+ # Create a self-referential list.
+ l = []
+ l.append(l)
+
+ # Without special code in _normalize_search_value, this would cause infinite
+ # recursion.
+ self.assertEqual([], soup.find_all(l))
+
+ def test_find_all_resultset(self):
+ """All find_all calls return a ResultSet"""
+ soup = self.soup("<a></a>")
+ result = soup.find_all("a")
+ self.assertTrue(hasattr(result, "source"))
+
+ result = soup.find_all(True)
+ self.assertTrue(hasattr(result, "source"))
+
+ result = soup.find_all(text="foo")
+ self.assertTrue(hasattr(result, "source"))
+
+
+class TestFindAllBasicNamespaces(TreeTest):
+
+ def test_find_by_namespaced_name(self):
+ soup = self.soup('<mathml:msqrt>4</mathml:msqrt><a svg:fill="red">')
+ self.assertEqual("4", soup.find("mathml:msqrt").string)
+ self.assertEqual("a", soup.find(attrs= { "svg:fill" : "red" }).name)
+
+
+class TestFindAllByName(TreeTest):
+ """Test ways of finding tags by tag name."""
+
+ def setUp(self):
+ super(TreeTest, self).setUp()
+ self.tree = self.soup("""<a>First tag.</a>
+ <b>Second tag.</b>
+ <c>Third <a>Nested tag.</a> tag.</c>""")
+
+ def test_find_all_by_tag_name(self):
+ # Find all the <a> tags.
+ self.assertSelects(
+ self.tree.find_all('a'), ['First tag.', 'Nested tag.'])
+
+ def test_find_all_by_name_and_text(self):
+ self.assertSelects(
+ self.tree.find_all('a', text='First tag.'), ['First tag.'])
+
+ self.assertSelects(
+ self.tree.find_all('a', text=True), ['First tag.', 'Nested tag.'])
+
+ self.assertSelects(
+ self.tree.find_all('a', text=re.compile("tag")),
+ ['First tag.', 'Nested tag.'])
+
+
+ def test_find_all_on_non_root_element(self):
+ # You can call find_all on any node, not just the root.
+ self.assertSelects(self.tree.c.find_all('a'), ['Nested tag.'])
+
+ def test_calling_element_invokes_find_all(self):
+ self.assertSelects(self.tree('a'), ['First tag.', 'Nested tag.'])
+
+ def test_find_all_by_tag_strainer(self):
+ self.assertSelects(
+ self.tree.find_all(SoupStrainer('a')),
+ ['First tag.', 'Nested tag.'])
+
+ def test_find_all_by_tag_names(self):
+ self.assertSelects(
+ self.tree.find_all(['a', 'b']),
+ ['First tag.', 'Second tag.', 'Nested tag.'])
+
+ def test_find_all_by_tag_dict(self):
+ self.assertSelects(
+ self.tree.find_all({'a' : True, 'b' : True}),
+ ['First tag.', 'Second tag.', 'Nested tag.'])
+
+ def test_find_all_by_tag_re(self):
+ self.assertSelects(
+ self.tree.find_all(re.compile('^[ab]$')),
+ ['First tag.', 'Second tag.', 'Nested tag.'])
+
+ def test_find_all_with_tags_matching_method(self):
+ # You can define an oracle method that determines whether
+ # a tag matches the search.
+ def id_matches_name(tag):
+ return tag.name == tag.get('id')
+
+ tree = self.soup("""<a id="a">Match 1.</a>
+ <a id="1">Does not match.</a>
+ <b id="b">Match 2.</a>""")
+
+ self.assertSelects(
+ tree.find_all(id_matches_name), ["Match 1.", "Match 2."])
+
+
+class TestFindAllByAttribute(TreeTest):
+
+ def test_find_all_by_attribute_name(self):
+ # You can pass in keyword arguments to find_all to search by
+ # attribute.
+ tree = self.soup("""
+ <a id="first">Matching a.</a>
+ <a id="second">
+ Non-matching <b id="first">Matching b.</b>a.
+ </a>""")
+ self.assertSelects(tree.find_all(id='first'),
+ ["Matching a.", "Matching b."])
+
+ def test_find_all_by_utf8_attribute_value(self):
+ peace = u"×ולש".encode("utf8")
+ data = u'<a title="×ולש"></a>'.encode("utf8")
+ soup = self.soup(data)
+ self.assertEqual([soup.a], soup.find_all(title=peace))
+ self.assertEqual([soup.a], soup.find_all(title=peace.decode("utf8")))
+ self.assertEqual([soup.a], soup.find_all(title=[peace, "something else"]))
+
+ def test_find_all_by_attribute_dict(self):
+ # You can pass in a dictionary as the argument 'attrs'. This
+ # lets you search for attributes like 'name' (a fixed argument
+ # to find_all) and 'class' (a reserved word in Python.)
+ tree = self.soup("""
+ <a name="name1" class="class1">Name match.</a>
+ <a name="name2" class="class2">Class match.</a>
+ <a name="name3" class="class3">Non-match.</a>
+ <name1>A tag called 'name1'.</name1>
+ """)
+
+ # This doesn't do what you want.
+ self.assertSelects(tree.find_all(name='name1'),
+ ["A tag called 'name1'."])
+ # This does what you want.
+ self.assertSelects(tree.find_all(attrs={'name' : 'name1'}),
+ ["Name match."])
+
+ self.assertSelects(tree.find_all(attrs={'class' : 'class2'}),
+ ["Class match."])
+
+ def test_find_all_by_class(self):
+ tree = self.soup("""
+ <a class="1">Class 1.</a>
+ <a class="2">Class 2.</a>
+ <b class="1">Class 1.</b>
+ <c class="3 4">Class 3 and 4.</c>
+ """)
+
+ # Passing in the class_ keyword argument will search against
+ # the 'class' attribute.
+ self.assertSelects(tree.find_all('a', class_='1'), ['Class 1.'])
+ self.assertSelects(tree.find_all('c', class_='3'), ['Class 3 and 4.'])
+ self.assertSelects(tree.find_all('c', class_='4'), ['Class 3 and 4.'])
+
+ # Passing in a string to 'attrs' will also search the CSS class.
+ self.assertSelects(tree.find_all('a', '1'), ['Class 1.'])
+ self.assertSelects(tree.find_all(attrs='1'), ['Class 1.', 'Class 1.'])
+ self.assertSelects(tree.find_all('c', '3'), ['Class 3 and 4.'])
+ self.assertSelects(tree.find_all('c', '4'), ['Class 3 and 4.'])
+
+ def test_find_by_class_when_multiple_classes_present(self):
+ tree = self.soup("<gar class='foo bar'>Found it</gar>")
+
+ f = tree.find_all("gar", class_=re.compile("o"))
+ self.assertSelects(f, ["Found it"])
+
+ f = tree.find_all("gar", class_=re.compile("a"))
+ self.assertSelects(f, ["Found it"])
+
+ # Since the class is not the string "foo bar", but the two
+ # strings "foo" and "bar", this will not find anything.
+ f = tree.find_all("gar", class_=re.compile("o b"))
+ self.assertSelects(f, [])
+
+ def test_find_all_with_non_dictionary_for_attrs_finds_by_class(self):
+ soup = self.soup("<a class='bar'>Found it</a>")
+
+ self.assertSelects(soup.find_all("a", re.compile("ba")), ["Found it"])
+
+ def big_attribute_value(value):
+ return len(value) > 3
+
+ self.assertSelects(soup.find_all("a", big_attribute_value), [])
+
+ def small_attribute_value(value):
+ return len(value) <= 3
+
+ self.assertSelects(
+ soup.find_all("a", small_attribute_value), ["Found it"])
+
+ def test_find_all_with_string_for_attrs_finds_multiple_classes(self):
+ soup = self.soup('<a class="foo bar"></a><a class="foo"></a>')
+ a, a2 = soup.find_all("a")
+ self.assertEqual([a, a2], soup.find_all("a", "foo"))
+ self.assertEqual([a], soup.find_all("a", "bar"))
+
+ # If you specify the class as a string that contains a
+ # space, only that specific value will be found.
+ self.assertEqual([a], soup.find_all("a", class_="foo bar"))
+ self.assertEqual([a], soup.find_all("a", "foo bar"))
+ self.assertEqual([], soup.find_all("a", "bar foo"))
+
+ def test_find_all_by_attribute_soupstrainer(self):
+ tree = self.soup("""
+ <a id="first">Match.</a>
+ <a id="second">Non-match.</a>""")
+
+ strainer = SoupStrainer(attrs={'id' : 'first'})
+ self.assertSelects(tree.find_all(strainer), ['Match.'])
+
+ def test_find_all_with_missing_atribute(self):
+ # You can pass in None as the value of an attribute to find_all.
+ # This will match tags that do not have that attribute set.
+ tree = self.soup("""<a id="1">ID present.</a>
+ <a>No ID present.</a>
+ <a id="">ID is empty.</a>""")
+ self.assertSelects(tree.find_all('a', id=None), ["No ID present."])
+
+ def test_find_all_with_defined_attribute(self):
+ # You can pass in None as the value of an attribute to find_all.
+ # This will match tags that have that attribute set to any value.
+ tree = self.soup("""<a id="1">ID present.</a>
+ <a>No ID present.</a>
+ <a id="">ID is empty.</a>""")
+ self.assertSelects(
+ tree.find_all(id=True), ["ID present.", "ID is empty."])
+
+ def test_find_all_with_numeric_attribute(self):
+ # If you search for a number, it's treated as a string.
+ tree = self.soup("""<a id=1>Unquoted attribute.</a>
+ <a id="1">Quoted attribute.</a>""")
+
+ expected = ["Unquoted attribute.", "Quoted attribute."]
+ self.assertSelects(tree.find_all(id=1), expected)
+ self.assertSelects(tree.find_all(id="1"), expected)
+
+ def test_find_all_with_list_attribute_values(self):
+ # You can pass a list of attribute values instead of just one,
+ # and you'll get tags that match any of the values.
+ tree = self.soup("""<a id="1">1</a>
+ <a id="2">2</a>
+ <a id="3">3</a>
+ <a>No ID.</a>""")
+ self.assertSelects(tree.find_all(id=["1", "3", "4"]),
+ ["1", "3"])
+
+ def test_find_all_with_regular_expression_attribute_value(self):
+ # You can pass a regular expression as an attribute value, and
+ # you'll get tags whose values for that attribute match the
+ # regular expression.
+ tree = self.soup("""<a id="a">One a.</a>
+ <a id="aa">Two as.</a>
+ <a id="ab">Mixed as and bs.</a>
+ <a id="b">One b.</a>
+ <a>No ID.</a>""")
+
+ self.assertSelects(tree.find_all(id=re.compile("^a+$")),
+ ["One a.", "Two as."])
+
+ def test_find_by_name_and_containing_string(self):
+ soup = self.soup("<b>foo</b><b>bar</b><a>foo</a>")
+ a = soup.a
+
+ self.assertEqual([a], soup.find_all("a", text="foo"))
+ self.assertEqual([], soup.find_all("a", text="bar"))
+ self.assertEqual([], soup.find_all("a", text="bar"))
+
+ def test_find_by_name_and_containing_string_when_string_is_buried(self):
+ soup = self.soup("<a>foo</a><a><b><c>foo</c></b></a>")
+ self.assertEqual(soup.find_all("a"), soup.find_all("a", text="foo"))
+
+ def test_find_by_attribute_and_containing_string(self):
+ soup = self.soup('<b id="1">foo</b><a id="2">foo</a>')
+ a = soup.a
+
+ self.assertEqual([a], soup.find_all(id=2, text="foo"))
+ self.assertEqual([], soup.find_all(id=1, text="bar"))
+
+
+
+
+class TestIndex(TreeTest):
+ """Test Tag.index"""
+ def test_index(self):
+ tree = self.soup("""<div>
+ <a>Identical</a>
+ <b>Not identical</b>
+ <a>Identical</a>
+
+ <c><d>Identical with child</d></c>
+ <b>Also not identical</b>
+ <c><d>Identical with child</d></c>
+ </div>""")
+ div = tree.div
+ for i, element in enumerate(div.contents):
+ self.assertEqual(i, div.index(element))
+ self.assertRaises(ValueError, tree.index, 1)
+
+
+class TestParentOperations(TreeTest):
+ """Test navigation and searching through an element's parents."""
+
+ def setUp(self):
+ super(TestParentOperations, self).setUp()
+ self.tree = self.soup('''<ul id="empty"></ul>
+ <ul id="top">
+ <ul id="middle">
+ <ul id="bottom">
+ <b>Start here</b>
+ </ul>
+ </ul>''')
+ self.start = self.tree.b
+
+
+ def test_parent(self):
+ self.assertEqual(self.start.parent['id'], 'bottom')
+ self.assertEqual(self.start.parent.parent['id'], 'middle')
+ self.assertEqual(self.start.parent.parent.parent['id'], 'top')
+
+ def test_parent_of_top_tag_is_soup_object(self):
+ top_tag = self.tree.contents[0]
+ self.assertEqual(top_tag.parent, self.tree)
+
+ def test_soup_object_has_no_parent(self):
+ self.assertEqual(None, self.tree.parent)
+
+ def test_find_parents(self):
+ self.assertSelectsIDs(
+ self.start.find_parents('ul'), ['bottom', 'middle', 'top'])
+ self.assertSelectsIDs(
+ self.start.find_parents('ul', id="middle"), ['middle'])
+
+ def test_find_parent(self):
+ self.assertEqual(self.start.find_parent('ul')['id'], 'bottom')
+ self.assertEqual(self.start.find_parent('ul', id='top')['id'], 'top')
+
+ def test_parent_of_text_element(self):
+ text = self.tree.find(text="Start here")
+ self.assertEqual(text.parent.name, 'b')
+
+ def test_text_element_find_parent(self):
+ text = self.tree.find(text="Start here")
+ self.assertEqual(text.find_parent('ul')['id'], 'bottom')
+
+ def test_parent_generator(self):
+ parents = [parent['id'] for parent in self.start.parents
+ if parent is not None and 'id' in parent.attrs]
+ self.assertEqual(parents, ['bottom', 'middle', 'top'])
+
+
+class ProximityTest(TreeTest):
+
+ def setUp(self):
+ super(TreeTest, self).setUp()
+ self.tree = self.soup(
+ '<html id="start"><head></head><body><b id="1">One</b><b id="2">Two</b><b id="3">Three</b></body></html>')
+
+
+class TestNextOperations(ProximityTest):
+
+ def setUp(self):
+ super(TestNextOperations, self).setUp()
+ self.start = self.tree.b
+
+ def test_next(self):
+ self.assertEqual(self.start.next_element, "One")
+ self.assertEqual(self.start.next_element.next_element['id'], "2")
+
+ def test_next_of_last_item_is_none(self):
+ last = self.tree.find(text="Three")
+ self.assertEqual(last.next_element, None)
+
+ def test_next_of_root_is_none(self):
+ # The document root is outside the next/previous chain.
+ self.assertEqual(self.tree.next_element, None)
+
+ def test_find_all_next(self):
+ self.assertSelects(self.start.find_all_next('b'), ["Two", "Three"])
+ self.start.find_all_next(id=3)
+ self.assertSelects(self.start.find_all_next(id=3), ["Three"])
+
+ def test_find_next(self):
+ self.assertEqual(self.start.find_next('b')['id'], '2')
+ self.assertEqual(self.start.find_next(text="Three"), "Three")
+
+ def test_find_next_for_text_element(self):
+ text = self.tree.find(text="One")
+ self.assertEqual(text.find_next("b").string, "Two")
+ self.assertSelects(text.find_all_next("b"), ["Two", "Three"])
+
+ def test_next_generator(self):
+ start = self.tree.find(text="Two")
+ successors = [node for node in start.next_elements]
+ # There are two successors: the final <b> tag and its text contents.
+ tag, contents = successors
+ self.assertEqual(tag['id'], '3')
+ self.assertEqual(contents, "Three")
+
+class TestPreviousOperations(ProximityTest):
+
+ def setUp(self):
+ super(TestPreviousOperations, self).setUp()
+ self.end = self.tree.find(text="Three")
+
+ def test_previous(self):
+ self.assertEqual(self.end.previous_element['id'], "3")
+ self.assertEqual(self.end.previous_element.previous_element, "Two")
+
+ def test_previous_of_first_item_is_none(self):
+ first = self.tree.find('html')
+ self.assertEqual(first.previous_element, None)
+
+ def test_previous_of_root_is_none(self):
+ # The document root is outside the next/previous chain.
+ # XXX This is broken!
+ #self.assertEqual(self.tree.previous_element, None)
+ pass
+
+ def test_find_all_previous(self):
+ # The <b> tag containing the "Three" node is the predecessor
+ # of the "Three" node itself, which is why "Three" shows up
+ # here.
+ self.assertSelects(
+ self.end.find_all_previous('b'), ["Three", "Two", "One"])
+ self.assertSelects(self.end.find_all_previous(id=1), ["One"])
+
+ def test_find_previous(self):
+ self.assertEqual(self.end.find_previous('b')['id'], '3')
+ self.assertEqual(self.end.find_previous(text="One"), "One")
+
+ def test_find_previous_for_text_element(self):
+ text = self.tree.find(text="Three")
+ self.assertEqual(text.find_previous("b").string, "Three")
+ self.assertSelects(
+ text.find_all_previous("b"), ["Three", "Two", "One"])
+
+ def test_previous_generator(self):
+ start = self.tree.find(text="One")
+ predecessors = [node for node in start.previous_elements]
+
+ # There are four predecessors: the <b> tag containing "One"
+ # the <body> tag, the <head> tag, and the <html> tag.
+ b, body, head, html = predecessors
+ self.assertEqual(b['id'], '1')
+ self.assertEqual(body.name, "body")
+ self.assertEqual(head.name, "head")
+ self.assertEqual(html.name, "html")
+
+
+class SiblingTest(TreeTest):
+
+ def setUp(self):
+ super(SiblingTest, self).setUp()
+ markup = '''<html>
+ <span id="1">
+ <span id="1.1"></span>
+ </span>
+ <span id="2">
+ <span id="2.1"></span>
+ </span>
+ <span id="3">
+ <span id="3.1"></span>
+ </span>
+ <span id="4"></span>
+ </html>'''
+ # All that whitespace looks good but makes the tests more
+ # difficult. Get rid of it.
+ markup = re.compile("\n\s*").sub("", markup)
+ self.tree = self.soup(markup)
+
+
+class TestNextSibling(SiblingTest):
+
+ def setUp(self):
+ super(TestNextSibling, self).setUp()
+ self.start = self.tree.find(id="1")
+
+ def test_next_sibling_of_root_is_none(self):
+ self.assertEqual(self.tree.next_sibling, None)
+
+ def test_next_sibling(self):
+ self.assertEqual(self.start.next_sibling['id'], '2')
+ self.assertEqual(self.start.next_sibling.next_sibling['id'], '3')
+
+ # Note the difference between next_sibling and next_element.
+ self.assertEqual(self.start.next_element['id'], '1.1')
+
+ def test_next_sibling_may_not_exist(self):
+ self.assertEqual(self.tree.html.next_sibling, None)
+
+ nested_span = self.tree.find(id="1.1")
+ self.assertEqual(nested_span.next_sibling, None)
+
+ last_span = self.tree.find(id="4")
+ self.assertEqual(last_span.next_sibling, None)
+
+ def test_find_next_sibling(self):
+ self.assertEqual(self.start.find_next_sibling('span')['id'], '2')
+
+ def test_next_siblings(self):
+ self.assertSelectsIDs(self.start.find_next_siblings("span"),
+ ['2', '3', '4'])
+
+ self.assertSelectsIDs(self.start.find_next_siblings(id='3'), ['3'])
+
+ def test_next_sibling_for_text_element(self):
+ soup = self.soup("Foo<b>bar</b>baz")
+ start = soup.find(text="Foo")
+ self.assertEqual(start.next_sibling.name, 'b')
+ self.assertEqual(start.next_sibling.next_sibling, 'baz')
+
+ self.assertSelects(start.find_next_siblings('b'), ['bar'])
+ self.assertEqual(start.find_next_sibling(text="baz"), "baz")
+ self.assertEqual(start.find_next_sibling(text="nonesuch"), None)
+
+
+class TestPreviousSibling(SiblingTest):
+
+ def setUp(self):
+ super(TestPreviousSibling, self).setUp()
+ self.end = self.tree.find(id="4")
+
+ def test_previous_sibling_of_root_is_none(self):
+ self.assertEqual(self.tree.previous_sibling, None)
+
+ def test_previous_sibling(self):
+ self.assertEqual(self.end.previous_sibling['id'], '3')
+ self.assertEqual(self.end.previous_sibling.previous_sibling['id'], '2')
+
+ # Note the difference between previous_sibling and previous_element.
+ self.assertEqual(self.end.previous_element['id'], '3.1')
+
+ def test_previous_sibling_may_not_exist(self):
+ self.assertEqual(self.tree.html.previous_sibling, None)
+
+ nested_span = self.tree.find(id="1.1")
+ self.assertEqual(nested_span.previous_sibling, None)
+
+ first_span = self.tree.find(id="1")
+ self.assertEqual(first_span.previous_sibling, None)
+
+ def test_find_previous_sibling(self):
+ self.assertEqual(self.end.find_previous_sibling('span')['id'], '3')
+
+ def test_previous_siblings(self):
+ self.assertSelectsIDs(self.end.find_previous_siblings("span"),
+ ['3', '2', '1'])
+
+ self.assertSelectsIDs(self.end.find_previous_siblings(id='1'), ['1'])
+
+ def test_previous_sibling_for_text_element(self):
+ soup = self.soup("Foo<b>bar</b>baz")
+ start = soup.find(text="baz")
+ self.assertEqual(start.previous_sibling.name, 'b')
+ self.assertEqual(start.previous_sibling.previous_sibling, 'Foo')
+
+ self.assertSelects(start.find_previous_siblings('b'), ['bar'])
+ self.assertEqual(start.find_previous_sibling(text="Foo"), "Foo")
+ self.assertEqual(start.find_previous_sibling(text="nonesuch"), None)
+
+
+class TestTagCreation(SoupTest):
+ """Test the ability to create new tags."""
+ def test_new_tag(self):
+ soup = self.soup("")
+ new_tag = soup.new_tag("foo", bar="baz")
+ self.assertTrue(isinstance(new_tag, Tag))
+ self.assertEqual("foo", new_tag.name)
+ self.assertEqual(dict(bar="baz"), new_tag.attrs)
+ self.assertEqual(None, new_tag.parent)
+
+ def test_tag_inherits_self_closing_rules_from_builder(self):
+ if XML_BUILDER_PRESENT:
+ xml_soup = BeautifulSoup("", "xml")
+ xml_br = xml_soup.new_tag("br")
+ xml_p = xml_soup.new_tag("p")
+
+ # Both the <br> and <p> tag are empty-element, just because
+ # they have no contents.
+ self.assertEqual(b"<br/>", xml_br.encode())
+ self.assertEqual(b"<p/>", xml_p.encode())
+
+ html_soup = BeautifulSoup("", "html")
+ html_br = html_soup.new_tag("br")
+ html_p = html_soup.new_tag("p")
+
+ # The HTML builder users HTML's rules about which tags are
+ # empty-element tags, and the new tags reflect these rules.
+ self.assertEqual(b"<br/>", html_br.encode())
+ self.assertEqual(b"<p></p>", html_p.encode())
+
+ def test_new_string_creates_navigablestring(self):
+ soup = self.soup("")
+ s = soup.new_string("foo")
+ self.assertEqual("foo", s)
+ self.assertTrue(isinstance(s, NavigableString))
+
+ def test_new_string_can_create_navigablestring_subclass(self):
+ soup = self.soup("")
+ s = soup.new_string("foo", Comment)
+ self.assertEqual("foo", s)
+ self.assertTrue(isinstance(s, Comment))
+
+class TestTreeModification(SoupTest):
+
+ def test_attribute_modification(self):
+ soup = self.soup('<a id="1"></a>')
+ soup.a['id'] = 2
+ self.assertEqual(soup.decode(), self.document_for('<a id="2"></a>'))
+ del(soup.a['id'])
+ self.assertEqual(soup.decode(), self.document_for('<a></a>'))
+ soup.a['id2'] = 'foo'
+ self.assertEqual(soup.decode(), self.document_for('<a id2="foo"></a>'))
+
+ def test_new_tag_creation(self):
+ builder = builder_registry.lookup('html')()
+ soup = self.soup("<body></body>", builder=builder)
+ a = Tag(soup, builder, 'a')
+ ol = Tag(soup, builder, 'ol')
+ a['href'] = 'http://foo.com/'
+ soup.body.insert(0, a)
+ soup.body.insert(1, ol)
+ self.assertEqual(
+ soup.body.encode(),
+ b'<body><a href="http://foo.com/"></a><ol></ol></body>')
+
+ def test_append_to_contents_moves_tag(self):
+ doc = """<p id="1">Don't leave me <b>here</b>.</p>
+ <p id="2">Don\'t leave!</p>"""
+ soup = self.soup(doc)
+ second_para = soup.find(id='2')
+ bold = soup.b
+
+ # Move the <b> tag to the end of the second paragraph.
+ soup.find(id='2').append(soup.b)
+
+ # The <b> tag is now a child of the second paragraph.
+ self.assertEqual(bold.parent, second_para)
+
+ self.assertEqual(
+ soup.decode(), self.document_for(
+ '<p id="1">Don\'t leave me .</p>\n'
+ '<p id="2">Don\'t leave!<b>here</b></p>'))
+
+ def test_replace_with_returns_thing_that_was_replaced(self):
+ text = "<a></a><b><c></c></b>"
+ soup = self.soup(text)
+ a = soup.a
+ new_a = a.replace_with(soup.c)
+ self.assertEqual(a, new_a)
+
+ def test_unwrap_returns_thing_that_was_replaced(self):
+ text = "<a><b></b><c></c></a>"
+ soup = self.soup(text)
+ a = soup.a
+ new_a = a.unwrap()
+ self.assertEqual(a, new_a)
+
+ def test_replace_tag_with_itself(self):
+ text = "<a><b></b><c>Foo<d></d></c></a><a><e></e></a>"
+ soup = self.soup(text)
+ c = soup.c
+ soup.c.replace_with(c)
+ self.assertEqual(soup.decode(), self.document_for(text))
+
+ def test_replace_tag_with_its_parent_raises_exception(self):
+ text = "<a><b></b></a>"
+ soup = self.soup(text)
+ self.assertRaises(ValueError, soup.b.replace_with, soup.a)
+
+ def test_insert_tag_into_itself_raises_exception(self):
+ text = "<a><b></b></a>"
+ soup = self.soup(text)
+ self.assertRaises(ValueError, soup.a.insert, 0, soup.a)
+
+ def test_replace_with_maintains_next_element_throughout(self):
+ soup = self.soup('<p><a>one</a><b>three</b></p>')
+ a = soup.a
+ b = a.contents[0]
+ # Make it so the <a> tag has two text children.
+ a.insert(1, "two")
+
+ # Now replace each one with the empty string.
+ left, right = a.contents
+ left.replaceWith('')
+ right.replaceWith('')
+
+ # The <b> tag is still connected to the tree.
+ self.assertEqual("three", soup.b.string)
+
+ def test_replace_final_node(self):
+ soup = self.soup("<b>Argh!</b>")
+ soup.find(text="Argh!").replace_with("Hooray!")
+ new_text = soup.find(text="Hooray!")
+ b = soup.b
+ self.assertEqual(new_text.previous_element, b)
+ self.assertEqual(new_text.parent, b)
+ self.assertEqual(new_text.previous_element.next_element, new_text)
+ self.assertEqual(new_text.next_element, None)
+
+ def test_consecutive_text_nodes(self):
+ # A builder should never create two consecutive text nodes,
+ # but if you insert one next to another, Beautiful Soup will
+ # handle it correctly.
+ soup = self.soup("<a><b>Argh!</b><c></c></a>")
+ soup.b.insert(1, "Hooray!")
+
+ self.assertEqual(
+ soup.decode(), self.document_for(
+ "<a><b>Argh!Hooray!</b><c></c></a>"))
+
+ new_text = soup.find(text="Hooray!")
+ self.assertEqual(new_text.previous_element, "Argh!")
+ self.assertEqual(new_text.previous_element.next_element, new_text)
+
+ self.assertEqual(new_text.previous_sibling, "Argh!")
+ self.assertEqual(new_text.previous_sibling.next_sibling, new_text)
+
+ self.assertEqual(new_text.next_sibling, None)
+ self.assertEqual(new_text.next_element, soup.c)
+
+ def test_insert_string(self):
+ soup = self.soup("<a></a>")
+ soup.a.insert(0, "bar")
+ soup.a.insert(0, "foo")
+ # The string were added to the tag.
+ self.assertEqual(["foo", "bar"], soup.a.contents)
+ # And they were converted to NavigableStrings.
+ self.assertEqual(soup.a.contents[0].next_element, "bar")
+
+ def test_insert_tag(self):
+ builder = self.default_builder
+ soup = self.soup(
+ "<a><b>Find</b><c>lady!</c><d></d></a>", builder=builder)
+ magic_tag = Tag(soup, builder, 'magictag')
+ magic_tag.insert(0, "the")
+ soup.a.insert(1, magic_tag)
+
+ self.assertEqual(
+ soup.decode(), self.document_for(
+ "<a><b>Find</b><magictag>the</magictag><c>lady!</c><d></d></a>"))
+
+ # Make sure all the relationships are hooked up correctly.
+ b_tag = soup.b
+ self.assertEqual(b_tag.next_sibling, magic_tag)
+ self.assertEqual(magic_tag.previous_sibling, b_tag)
+
+ find = b_tag.find(text="Find")
+ self.assertEqual(find.next_element, magic_tag)
+ self.assertEqual(magic_tag.previous_element, find)
+
+ c_tag = soup.c
+ self.assertEqual(magic_tag.next_sibling, c_tag)
+ self.assertEqual(c_tag.previous_sibling, magic_tag)
+
+ the = magic_tag.find(text="the")
+ self.assertEqual(the.parent, magic_tag)
+ self.assertEqual(the.next_element, c_tag)
+ self.assertEqual(c_tag.previous_element, the)
+
+ def test_append_child_thats_already_at_the_end(self):
+ data = "<a><b></b></a>"
+ soup = self.soup(data)
+ soup.a.append(soup.b)
+ self.assertEqual(data, soup.decode())
+
+ def test_move_tag_to_beginning_of_parent(self):
+ data = "<a><b></b><c></c><d></d></a>"
+ soup = self.soup(data)
+ soup.a.insert(0, soup.d)
+ self.assertEqual("<a><d></d><b></b><c></c></a>", soup.decode())
+
+ def test_insert_works_on_empty_element_tag(self):
+ # This is a little strange, since most HTML parsers don't allow
+ # markup like this to come through. But in general, we don't
+ # know what the parser would or wouldn't have allowed, so
+ # I'm letting this succeed for now.
+ soup = self.soup("<br/>")
+ soup.br.insert(1, "Contents")
+ self.assertEqual(str(soup.br), "<br>Contents</br>")
+
+ def test_insert_before(self):
+ soup = self.soup("<a>foo</a><b>bar</b>")
+ soup.b.insert_before("BAZ")
+ soup.a.insert_before("QUUX")
+ self.assertEqual(
+ soup.decode(), self.document_for("QUUX<a>foo</a>BAZ<b>bar</b>"))
+
+ soup.a.insert_before(soup.b)
+ self.assertEqual(
+ soup.decode(), self.document_for("QUUX<b>bar</b><a>foo</a>BAZ"))
+
+ def test_insert_after(self):
+ soup = self.soup("<a>foo</a><b>bar</b>")
+ soup.b.insert_after("BAZ")
+ soup.a.insert_after("QUUX")
+ self.assertEqual(
+ soup.decode(), self.document_for("<a>foo</a>QUUX<b>bar</b>BAZ"))
+ soup.b.insert_after(soup.a)
+ self.assertEqual(
+ soup.decode(), self.document_for("QUUX<b>bar</b><a>foo</a>BAZ"))
+
+ def test_insert_after_raises_exception_if_after_has_no_meaning(self):
+ soup = self.soup("")
+ tag = soup.new_tag("a")
+ string = soup.new_string("")
+ self.assertRaises(ValueError, string.insert_after, tag)
+ self.assertRaises(NotImplementedError, soup.insert_after, tag)
+ self.assertRaises(ValueError, tag.insert_after, tag)
+
+ def test_insert_before_raises_notimplementederror_if_before_has_no_meaning(self):
+ soup = self.soup("")
+ tag = soup.new_tag("a")
+ string = soup.new_string("")
+ self.assertRaises(ValueError, string.insert_before, tag)
+ self.assertRaises(NotImplementedError, soup.insert_before, tag)
+ self.assertRaises(ValueError, tag.insert_before, tag)
+
+ def test_replace_with(self):
+ soup = self.soup(
+ "<p>There's <b>no</b> business like <b>show</b> business</p>")
+ no, show = soup.find_all('b')
+ show.replace_with(no)
+ self.assertEqual(
+ soup.decode(),
+ self.document_for(
+ "<p>There's business like <b>no</b> business</p>"))
+
+ self.assertEqual(show.parent, None)
+ self.assertEqual(no.parent, soup.p)
+ self.assertEqual(no.next_element, "no")
+ self.assertEqual(no.next_sibling, " business")
+
+ def test_replace_first_child(self):
+ data = "<a><b></b><c></c></a>"
+ soup = self.soup(data)
+ soup.b.replace_with(soup.c)
+ self.assertEqual("<a><c></c></a>", soup.decode())
+
+ def test_replace_last_child(self):
+ data = "<a><b></b><c></c></a>"
+ soup = self.soup(data)
+ soup.c.replace_with(soup.b)
+ self.assertEqual("<a><b></b></a>", soup.decode())
+
+ def test_nested_tag_replace_with(self):
+ soup = self.soup(
+ """<a>We<b>reserve<c>the</c><d>right</d></b></a><e>to<f>refuse</f><g>service</g></e>""")
+
+ # Replace the entire <b> tag and its contents ("reserve the
+ # right") with the <f> tag ("refuse").
+ remove_tag = soup.b
+ move_tag = soup.f
+ remove_tag.replace_with(move_tag)
+
+ self.assertEqual(
+ soup.decode(), self.document_for(
+ "<a>We<f>refuse</f></a><e>to<g>service</g></e>"))
+
+ # The <b> tag is now an orphan.
+ self.assertEqual(remove_tag.parent, None)
+ self.assertEqual(remove_tag.find(text="right").next_element, None)
+ self.assertEqual(remove_tag.previous_element, None)
+ self.assertEqual(remove_tag.next_sibling, None)
+ self.assertEqual(remove_tag.previous_sibling, None)
+
+ # The <f> tag is now connected to the <a> tag.
+ self.assertEqual(move_tag.parent, soup.a)
+ self.assertEqual(move_tag.previous_element, "We")
+ self.assertEqual(move_tag.next_element.next_element, soup.e)
+ self.assertEqual(move_tag.next_sibling, None)
+
+ # The gap where the <f> tag used to be has been mended, and
+ # the word "to" is now connected to the <g> tag.
+ to_text = soup.find(text="to")
+ g_tag = soup.g
+ self.assertEqual(to_text.next_element, g_tag)
+ self.assertEqual(to_text.next_sibling, g_tag)
+ self.assertEqual(g_tag.previous_element, to_text)
+ self.assertEqual(g_tag.previous_sibling, to_text)
+
+ def test_unwrap(self):
+ tree = self.soup("""
+ <p>Unneeded <em>formatting</em> is unneeded</p>
+ """)
+ tree.em.unwrap()
+ self.assertEqual(tree.em, None)
+ self.assertEqual(tree.p.text, "Unneeded formatting is unneeded")
+
+ def test_wrap(self):
+ soup = self.soup("I wish I was bold.")
+ value = soup.string.wrap(soup.new_tag("b"))
+ self.assertEqual(value.decode(), "<b>I wish I was bold.</b>")
+ self.assertEqual(
+ soup.decode(), self.document_for("<b>I wish I was bold.</b>"))
+
+ def test_wrap_extracts_tag_from_elsewhere(self):
+ soup = self.soup("<b></b>I wish I was bold.")
+ soup.b.next_sibling.wrap(soup.b)
+ self.assertEqual(
+ soup.decode(), self.document_for("<b>I wish I was bold.</b>"))
+
+ def test_wrap_puts_new_contents_at_the_end(self):
+ soup = self.soup("<b>I like being bold.</b>I wish I was bold.")
+ soup.b.next_sibling.wrap(soup.b)
+ self.assertEqual(2, len(soup.b.contents))
+ self.assertEqual(
+ soup.decode(), self.document_for(
+ "<b>I like being bold.I wish I was bold.</b>"))
+
+ def test_extract(self):
+ soup = self.soup(
+ '<html><body>Some content. <div id="nav">Nav crap</div> More content.</body></html>')
+
+ self.assertEqual(len(soup.body.contents), 3)
+ extracted = soup.find(id="nav").extract()
+
+ self.assertEqual(
+ soup.decode(), "<html><body>Some content. More content.</body></html>")
+ self.assertEqual(extracted.decode(), '<div id="nav">Nav crap</div>')
+
+ # The extracted tag is now an orphan.
+ self.assertEqual(len(soup.body.contents), 2)
+ self.assertEqual(extracted.parent, None)
+ self.assertEqual(extracted.previous_element, None)
+ self.assertEqual(extracted.next_element.next_element, None)
+
+ # The gap where the extracted tag used to be has been mended.
+ content_1 = soup.find(text="Some content. ")
+ content_2 = soup.find(text=" More content.")
+ self.assertEqual(content_1.next_element, content_2)
+ self.assertEqual(content_1.next_sibling, content_2)
+ self.assertEqual(content_2.previous_element, content_1)
+ self.assertEqual(content_2.previous_sibling, content_1)
+
+ def test_extract_distinguishes_between_identical_strings(self):
+ soup = self.soup("<a>foo</a><b>bar</b>")
+ foo_1 = soup.a.string
+ bar_1 = soup.b.string
+ foo_2 = soup.new_string("foo")
+ bar_2 = soup.new_string("bar")
+ soup.a.append(foo_2)
+ soup.b.append(bar_2)
+
+ # Now there are two identical strings in the <a> tag, and two
+ # in the <b> tag. Let's remove the first "foo" and the second
+ # "bar".
+ foo_1.extract()
+ bar_2.extract()
+ self.assertEqual(foo_2, soup.a.string)
+ self.assertEqual(bar_2, soup.b.string)
+
+ def test_clear(self):
+ """Tag.clear()"""
+ soup = self.soup("<p><a>String <em>Italicized</em></a> and another</p>")
+ # clear using extract()
+ a = soup.a
+ soup.p.clear()
+ self.assertEqual(len(soup.p.contents), 0)
+ self.assertTrue(hasattr(a, "contents"))
+
+ # clear using decompose()
+ em = a.em
+ a.clear(decompose=True)
+ self.assertEqual(0, len(em.contents))
+
+ def test_string_set(self):
+ """Tag.string = 'string'"""
+ soup = self.soup("<a></a> <b><c></c></b>")
+ soup.a.string = "foo"
+ self.assertEqual(soup.a.contents, ["foo"])
+ soup.b.string = "bar"
+ self.assertEqual(soup.b.contents, ["bar"])
+
+ def test_string_set_does_not_affect_original_string(self):
+ soup = self.soup("<a><b>foo</b><c>bar</c>")
+ soup.b.string = soup.c.string
+ self.assertEqual(soup.a.encode(), b"<a><b>bar</b><c>bar</c></a>")
+
+ def test_set_string_preserves_class_of_string(self):
+ soup = self.soup("<a></a>")
+ cdata = CData("foo")
+ soup.a.string = cdata
+ self.assertTrue(isinstance(soup.a.string, CData))
+
+class TestElementObjects(SoupTest):
+ """Test various features of element objects."""
+
+ def test_len(self):
+ """The length of an element is its number of children."""
+ soup = self.soup("<top>1<b>2</b>3</top>")
+
+ # The BeautifulSoup object itself contains one element: the
+ # <top> tag.
+ self.assertEqual(len(soup.contents), 1)
+ self.assertEqual(len(soup), 1)
+
+ # The <top> tag contains three elements: the text node "1", the
+ # <b> tag, and the text node "3".
+ self.assertEqual(len(soup.top), 3)
+ self.assertEqual(len(soup.top.contents), 3)
+
+ def test_member_access_invokes_find(self):
+ """Accessing a Python member .foo invokes find('foo')"""
+ soup = self.soup('<b><i></i></b>')
+ self.assertEqual(soup.b, soup.find('b'))
+ self.assertEqual(soup.b.i, soup.find('b').find('i'))
+ self.assertEqual(soup.a, None)
+
+ def test_deprecated_member_access(self):
+ soup = self.soup('<b><i></i></b>')
+ with warnings.catch_warnings(record=True) as w:
+ tag = soup.bTag
+ self.assertEqual(soup.b, tag)
+ self.assertEqual(
+ '.bTag is deprecated, use .find("b") instead.',
+ str(w[0].message))
+
+ def test_has_attr(self):
+ """has_attr() checks for the presence of an attribute.
+
+ Please note note: has_attr() is different from
+ __in__. has_attr() checks the tag's attributes and __in__
+ checks the tag's chidlren.
+ """
+ soup = self.soup("<foo attr='bar'>")
+ self.assertTrue(soup.foo.has_attr('attr'))
+ self.assertFalse(soup.foo.has_attr('attr2'))
+
+
+ def test_attributes_come_out_in_alphabetical_order(self):
+ markup = '<b a="1" z="5" m="3" f="2" y="4"></b>'
+ self.assertSoupEquals(markup, '<b a="1" f="2" m="3" y="4" z="5"></b>')
+
+ def test_string(self):
+ # A tag that contains only a text node makes that node
+ # available as .string.
+ soup = self.soup("<b>foo</b>")
+ self.assertEqual(soup.b.string, 'foo')
+
+ def test_empty_tag_has_no_string(self):
+ # A tag with no children has no .stirng.
+ soup = self.soup("<b></b>")
+ self.assertEqual(soup.b.string, None)
+
+ def test_tag_with_multiple_children_has_no_string(self):
+ # A tag with no children has no .string.
+ soup = self.soup("<a>foo<b></b><b></b></b>")
+ self.assertEqual(soup.b.string, None)
+
+ soup = self.soup("<a>foo<b></b>bar</b>")
+ self.assertEqual(soup.b.string, None)
+
+ # Even if all the children are strings, due to trickery,
+ # it won't work--but this would be a good optimization.
+ soup = self.soup("<a>foo</b>")
+ soup.a.insert(1, "bar")
+ self.assertEqual(soup.a.string, None)
+
+ def test_tag_with_recursive_string_has_string(self):
+ # A tag with a single child which has a .string inherits that
+ # .string.
+ soup = self.soup("<a><b>foo</b></a>")
+ self.assertEqual(soup.a.string, "foo")
+ self.assertEqual(soup.string, "foo")
+
+ def test_lack_of_string(self):
+ """Only a tag containing a single text node has a .string."""
+ soup = self.soup("<b>f<i>e</i>o</b>")
+ self.assertFalse(soup.b.string)
+
+ soup = self.soup("<b></b>")
+ self.assertFalse(soup.b.string)
+
+ def test_all_text(self):
+ """Tag.text and Tag.get_text(sep=u"") -> all child text, concatenated"""
+ soup = self.soup("<a>a<b>r</b> <r> t </r></a>")
+ self.assertEqual(soup.a.text, "ar t ")
+ self.assertEqual(soup.a.get_text(strip=True), "art")
+ self.assertEqual(soup.a.get_text(","), "a,r, , t ")
+ self.assertEqual(soup.a.get_text(",", strip=True), "a,r,t")
+
+ def test_get_text_ignores_comments(self):
+ soup = self.soup("foo<!--IGNORE-->bar")
+ self.assertEqual(soup.get_text(), "foobar")
+
+ self.assertEqual(
+ soup.get_text(types=(NavigableString, Comment)), "fooIGNOREbar")
+ self.assertEqual(
+ soup.get_text(types=None), "fooIGNOREbar")
+
+ def test_all_strings_ignores_comments(self):
+ soup = self.soup("foo<!--IGNORE-->bar")
+ self.assertEqual(['foo', 'bar'], list(soup.strings))
+
+class TestCDAtaListAttributes(SoupTest):
+
+ """Testing cdata-list attributes like 'class'.
+ """
+ def test_single_value_becomes_list(self):
+ soup = self.soup("<a class='foo'>")
+ self.assertEqual(["foo"],soup.a['class'])
+
+ def test_multiple_values_becomes_list(self):
+ soup = self.soup("<a class='foo bar'>")
+ self.assertEqual(["foo", "bar"], soup.a['class'])
+
+ def test_multiple_values_separated_by_weird_whitespace(self):
+ soup = self.soup("<a class='foo\tbar\nbaz'>")
+ self.assertEqual(["foo", "bar", "baz"],soup.a['class'])
+
+ def test_attributes_joined_into_string_on_output(self):
+ soup = self.soup("<a class='foo\tbar'>")
+ self.assertEqual(b'<a class="foo bar"></a>', soup.a.encode())
+
+ def test_accept_charset(self):
+ soup = self.soup('<form accept-charset="ISO-8859-1 UTF-8">')
+ self.assertEqual(['ISO-8859-1', 'UTF-8'], soup.form['accept-charset'])
+
+ def test_cdata_attribute_applying_only_to_one_tag(self):
+ data = '<a accept-charset="ISO-8859-1 UTF-8"></a>'
+ soup = self.soup(data)
+ # We saw in another test that accept-charset is a cdata-list
+ # attribute for the <form> tag. But it's not a cdata-list
+ # attribute for any other tag.
+ self.assertEqual('ISO-8859-1 UTF-8', soup.a['accept-charset'])
+
+ def test_string_has_immutable_name_property(self):
+ string = self.soup("s").string
+ self.assertEqual(None, string.name)
+ def t():
+ string.name = 'foo'
+ self.assertRaises(AttributeError, t)
+
+class TestPersistence(SoupTest):
+ "Testing features like pickle and deepcopy."
+
+ def setUp(self):
+ super(TestPersistence, self).setUp()
+ self.page = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+"http://www.w3.org/TR/REC-html40/transitional.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Beautiful Soup: We called him Tortoise because he taught us.</title>
+<link rev="made" href="mailto:leonardr@segfault.org">
+<meta name="Description" content="Beautiful Soup: an HTML parser optimized for screen-scraping.">
+<meta name="generator" content="Markov Approximation 1.4 (module: leonardr)">
+<meta name="author" content="Leonard Richardson">
+</head>
+<body>
+<a href="foo">foo</a>
+<a href="foo"><b>bar</b></a>
+</body>
+</html>"""
+ self.tree = self.soup(self.page)
+
+ def test_pickle_and_unpickle_identity(self):
+ # Pickling a tree, then unpickling it, yields a tree identical
+ # to the original.
+ dumped = pickle.dumps(self.tree, 2)
+ loaded = pickle.loads(dumped)
+ self.assertEqual(loaded.__class__, BeautifulSoup)
+ self.assertEqual(loaded.decode(), self.tree.decode())
+
+ def test_deepcopy_identity(self):
+ # Making a deepcopy of a tree yields an identical tree.
+ copied = copy.deepcopy(self.tree)
+ self.assertEqual(copied.decode(), self.tree.decode())
+
+ def test_unicode_pickle(self):
+ # A tree containing Unicode characters can be pickled.
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ dumped = pickle.dumps(soup, pickle.HIGHEST_PROTOCOL)
+ loaded = pickle.loads(dumped)
+ self.assertEqual(loaded.decode(), soup.decode())
+
+
+class TestSubstitutions(SoupTest):
+
+ def test_default_formatter_is_minimal(self):
+ markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ soup = self.soup(markup)
+ decoded = soup.decode(formatter="minimal")
+ # The < is converted back into &lt; but the e-with-acute is left alone.
+ self.assertEqual(
+ decoded,
+ self.document_for(
+ u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
+
+ def test_formatter_html(self):
+ markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ soup = self.soup(markup)
+ decoded = soup.decode(formatter="html")
+ self.assertEqual(
+ decoded,
+ self.document_for("<b>&lt;&lt;Sacr&eacute; bleu!&gt;&gt;</b>"))
+
+ def test_formatter_minimal(self):
+ markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ soup = self.soup(markup)
+ decoded = soup.decode(formatter="minimal")
+ # The < is converted back into &lt; but the e-with-acute is left alone.
+ self.assertEqual(
+ decoded,
+ self.document_for(
+ u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
+
+ def test_formatter_null(self):
+ markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ soup = self.soup(markup)
+ decoded = soup.decode(formatter=None)
+ # Neither the angle brackets nor the e-with-acute are converted.
+ # This is not valid HTML, but it's what the user wanted.
+ self.assertEqual(decoded,
+ self.document_for(u"<b><<Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!>></b>"))
+
+ def test_formatter_custom(self):
+ markup = u"<b>&lt;foo&gt;</b><b>bar</b>"
+ soup = self.soup(markup)
+ decoded = soup.decode(formatter = lambda x: x.upper())
+ # Instead of normal entity conversion code, the custom
+ # callable is called on every string.
+ self.assertEqual(
+ decoded,
+ self.document_for(u"<b><FOO></b><b>BAR</b>"))
+
+ def test_formatter_is_run_on_attribute_values(self):
+ markup = u'<a href="http://a.com?a=b&c=é">e</a>'
+ soup = self.soup(markup)
+ a = soup.a
+
+ expect_minimal = u'<a href="http://a.com?a=b&amp;c=é">e</a>'
+
+ self.assertEqual(expect_minimal, a.decode())
+ self.assertEqual(expect_minimal, a.decode(formatter="minimal"))
+
+ expect_html = u'<a href="http://a.com?a=b&amp;c=&eacute;">e</a>'
+ self.assertEqual(expect_html, a.decode(formatter="html"))
+
+ self.assertEqual(markup, a.decode(formatter=None))
+ expect_upper = u'<a href="HTTP://A.COM?A=B&C=É">E</a>'
+ self.assertEqual(expect_upper, a.decode(formatter=lambda x: x.upper()))
+
+ def test_formatter_skips_script_tag_for_html_documents(self):
+ doc = """
+ <script type="text/javascript">
+ console.log("< < hey > > ");
+ </script>
+"""
+ encoded = BeautifulSoup(doc).encode()
+ self.assertTrue(b"< < hey > >" in encoded)
+
+ def test_formatter_skips_style_tag_for_html_documents(self):
+ doc = """
+ <style type="text/css">
+ console.log("< < hey > > ");
+ </style>
+"""
+ encoded = BeautifulSoup(doc).encode()
+ self.assertTrue(b"< < hey > >" in encoded)
+
+ def test_prettify_leaves_preformatted_text_alone(self):
+ soup = self.soup("<div> foo <pre> \tbar\n \n </pre> baz ")
+ # Everything outside the <pre> tag is reformatted, but everything
+ # inside is left alone.
+ self.assertEqual(
+ u'<div>\n foo\n <pre> \tbar\n \n </pre>\n baz\n</div>',
+ soup.div.prettify())
+
+ def test_prettify_accepts_formatter(self):
+ soup = BeautifulSoup("<html><body>foo</body></html>")
+ pretty = soup.prettify(formatter = lambda x: x.upper())
+ self.assertTrue("FOO" in pretty)
+
+ def test_prettify_outputs_unicode_by_default(self):
+ soup = self.soup("<a></a>")
+ self.assertEqual(unicode, type(soup.prettify()))
+
+ def test_prettify_can_encode_data(self):
+ soup = self.soup("<a></a>")
+ self.assertEqual(bytes, type(soup.prettify("utf-8")))
+
+ def test_html_entity_substitution_off_by_default(self):
+ markup = u"<b>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</b>"
+ soup = self.soup(markup)
+ encoded = soup.b.encode("utf-8")
+ self.assertEqual(encoded, markup.encode('utf-8'))
+
+ def test_encoding_substitution(self):
+ # Here's the <meta> tag saying that a document is
+ # encoded in Shift-JIS.
+ meta_tag = ('<meta content="text/html; charset=x-sjis" '
+ 'http-equiv="Content-type"/>')
+ soup = self.soup(meta_tag)
+
+ # Parse the document, and the charset apprears unchanged.
+ self.assertEqual(soup.meta['content'], 'text/html; charset=x-sjis')
+
+ # Encode the document into some encoding, and the encoding is
+ # substituted into the meta tag.
+ utf_8 = soup.encode("utf-8")
+ self.assertTrue(b"charset=utf-8" in utf_8)
+
+ euc_jp = soup.encode("euc_jp")
+ self.assertTrue(b"charset=euc_jp" in euc_jp)
+
+ shift_jis = soup.encode("shift-jis")
+ self.assertTrue(b"charset=shift-jis" in shift_jis)
+
+ utf_16_u = soup.encode("utf-16").decode("utf-16")
+ self.assertTrue("charset=utf-16" in utf_16_u)
+
+ def test_encoding_substitution_doesnt_happen_if_tag_is_strained(self):
+ markup = ('<head><meta content="text/html; charset=x-sjis" '
+ 'http-equiv="Content-type"/></head><pre>foo</pre>')
+
+ # Beautiful Soup used to try to rewrite the meta tag even if the
+ # meta tag got filtered out by the strainer. This test makes
+ # sure that doesn't happen.
+ strainer = SoupStrainer('pre')
+ soup = self.soup(markup, parse_only=strainer)
+ self.assertEqual(soup.contents[0].name, 'pre')
+
+class TestEncoding(SoupTest):
+ """Test the ability to encode objects into strings."""
+
+ def test_unicode_string_can_be_encoded(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(soup.b.string.encode("utf-8"),
+ u"\N{SNOWMAN}".encode("utf-8"))
+
+ def test_tag_containing_unicode_string_can_be_encoded(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(
+ soup.b.encode("utf-8"), html.encode("utf-8"))
+
+ def test_encoding_substitutes_unrecognized_characters_by_default(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(soup.b.encode("ascii"), b"<b>&#9731;</b>")
+
+ def test_encoding_can_be_made_strict(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertRaises(
+ UnicodeEncodeError, soup.encode, "ascii", errors="strict")
+
+ def test_decode_contents(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(u"\N{SNOWMAN}", soup.b.decode_contents())
+
+ def test_encode_contents(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(
+ u"\N{SNOWMAN}".encode("utf8"), soup.b.encode_contents(
+ encoding="utf8"))
+
+ def test_deprecated_renderContents(self):
+ html = u"<b>\N{SNOWMAN}</b>"
+ soup = self.soup(html)
+ self.assertEqual(
+ u"\N{SNOWMAN}".encode("utf8"), soup.b.renderContents())
+
+class TestNavigableStringSubclasses(SoupTest):
+
+ def test_cdata(self):
+ # None of the current builders turn CDATA sections into CData
+ # objects, but you can create them manually.
+ soup = self.soup("")
+ cdata = CData("foo")
+ soup.insert(1, cdata)
+ self.assertEqual(str(soup), "<![CDATA[foo]]>")
+ self.assertEqual(soup.find(text="foo"), "foo")
+ self.assertEqual(soup.contents[0], "foo")
+
+ def test_cdata_is_never_formatted(self):
+ """Text inside a CData object is passed into the formatter.
+
+ But the return value is ignored.
+ """
+
+ self.count = 0
+ def increment(*args):
+ self.count += 1
+ return "BITTER FAILURE"
+
+ soup = self.soup("")
+ cdata = CData("<><><>")
+ soup.insert(1, cdata)
+ self.assertEqual(
+ b"<![CDATA[<><><>]]>", soup.encode(formatter=increment))
+ self.assertEqual(1, self.count)
+
+ def test_doctype_ends_in_newline(self):
+ # Unlike other NavigableString subclasses, a DOCTYPE always ends
+ # in a newline.
+ doctype = Doctype("foo")
+ soup = self.soup("")
+ soup.insert(1, doctype)
+ self.assertEqual(soup.encode(), b"<!DOCTYPE foo>\n")
+
+
+class TestSoupSelector(TreeTest):
+
+ HTML = """
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>The title</title>
+<link rel="stylesheet" href="blah.css" type="text/css" id="l1">
+</head>
+<body>
+
+<div id="main" class="fancy">
+<div id="inner">
+<h1 id="header1">An H1</h1>
+<p>Some text</p>
+<p class="onep" id="p1">Some more text</p>
+<h2 id="header2">An H2</h2>
+<p class="class1 class2 class3" id="pmulti">Another</p>
+<a href="http://bob.example.org/" rel="friend met" id="bob">Bob</a>
+<h2 id="header3">Another H2</h2>
+<a id="me" href="http://simonwillison.net/" rel="me">me</a>
+<span class="s1">
+<a href="#" id="s1a1">span1a1</a>
+<a href="#" id="s1a2">span1a2 <span id="s1a2s1">test</span></a>
+<span class="span2">
+<a href="#" id="s2a1">span2a1</a>
+</span>
+<span class="span3"></span>
+</span>
+</div>
+<p lang="en" id="lang-en">English</p>
+<p lang="en-gb" id="lang-en-gb">English UK</p>
+<p lang="en-us" id="lang-en-us">English US</p>
+<p lang="fr" id="lang-fr">French</p>
+</div>
+
+<div id="footer">
+</div>
+"""
+
+ def setUp(self):
+ self.soup = BeautifulSoup(self.HTML)
+
+ def assertSelects(self, selector, expected_ids):
+ el_ids = [el['id'] for el in self.soup.select(selector)]
+ el_ids.sort()
+ expected_ids.sort()
+ self.assertEqual(expected_ids, el_ids,
+ "Selector %s, expected [%s], got [%s]" % (
+ selector, ', '.join(expected_ids), ', '.join(el_ids)
+ )
+ )
+
+ assertSelect = assertSelects
+
+ def assertSelectMultiple(self, *tests):
+ for selector, expected_ids in tests:
+ self.assertSelect(selector, expected_ids)
+
+ def test_one_tag_one(self):
+ els = self.soup.select('title')
+ self.assertEqual(len(els), 1)
+ self.assertEqual(els[0].name, 'title')
+ self.assertEqual(els[0].contents, [u'The title'])
+
+ def test_one_tag_many(self):
+ els = self.soup.select('div')
+ self.assertEqual(len(els), 3)
+ for div in els:
+ self.assertEqual(div.name, 'div')
+
+ def test_tag_in_tag_one(self):
+ els = self.soup.select('div div')
+ self.assertSelects('div div', ['inner'])
+
+ def test_tag_in_tag_many(self):
+ for selector in ('html div', 'html body div', 'body div'):
+ self.assertSelects(selector, ['main', 'inner', 'footer'])
+
+ def test_tag_no_match(self):
+ self.assertEqual(len(self.soup.select('del')), 0)
+
+ def test_invalid_tag(self):
+ self.assertRaises(ValueError, self.soup.select, 'tag%t')
+
+ def test_header_tags(self):
+ self.assertSelectMultiple(
+ ('h1', ['header1']),
+ ('h2', ['header2', 'header3']),
+ )
+
+ def test_class_one(self):
+ for selector in ('.onep', 'p.onep', 'html p.onep'):
+ els = self.soup.select(selector)
+ self.assertEqual(len(els), 1)
+ self.assertEqual(els[0].name, 'p')
+ self.assertEqual(els[0]['class'], ['onep'])
+
+ def test_class_mismatched_tag(self):
+ els = self.soup.select('div.onep')
+ self.assertEqual(len(els), 0)
+
+ def test_one_id(self):
+ for selector in ('div#inner', '#inner', 'div div#inner'):
+ self.assertSelects(selector, ['inner'])
+
+ def test_bad_id(self):
+ els = self.soup.select('#doesnotexist')
+ self.assertEqual(len(els), 0)
+
+ def test_items_in_id(self):
+ els = self.soup.select('div#inner p')
+ self.assertEqual(len(els), 3)
+ for el in els:
+ self.assertEqual(el.name, 'p')
+ self.assertEqual(els[1]['class'], ['onep'])
+ self.assertFalse(els[0].has_attr('class'))
+
+ def test_a_bunch_of_emptys(self):
+ for selector in ('div#main del', 'div#main div.oops', 'div div#main'):
+ self.assertEqual(len(self.soup.select(selector)), 0)
+
+ def test_multi_class_support(self):
+ for selector in ('.class1', 'p.class1', '.class2', 'p.class2',
+ '.class3', 'p.class3', 'html p.class2', 'div#inner .class2'):
+ self.assertSelects(selector, ['pmulti'])
+
+ def test_multi_class_selection(self):
+ for selector in ('.class1.class3', '.class3.class2',
+ '.class1.class2.class3'):
+ self.assertSelects(selector, ['pmulti'])
+
+ def test_child_selector(self):
+ self.assertSelects('.s1 > a', ['s1a1', 's1a2'])
+ self.assertSelects('.s1 > a span', ['s1a2s1'])
+
+ def test_child_selector_id(self):
+ self.assertSelects('.s1 > a#s1a2 span', ['s1a2s1'])
+
+ def test_attribute_equals(self):
+ self.assertSelectMultiple(
+ ('p[class="onep"]', ['p1']),
+ ('p[id="p1"]', ['p1']),
+ ('[class="onep"]', ['p1']),
+ ('[id="p1"]', ['p1']),
+ ('link[rel="stylesheet"]', ['l1']),
+ ('link[type="text/css"]', ['l1']),
+ ('link[href="blah.css"]', ['l1']),
+ ('link[href="no-blah.css"]', []),
+ ('[rel="stylesheet"]', ['l1']),
+ ('[type="text/css"]', ['l1']),
+ ('[href="blah.css"]', ['l1']),
+ ('[href="no-blah.css"]', []),
+ ('p[href="no-blah.css"]', []),
+ ('[href="no-blah.css"]', []),
+ )
+
+ def test_attribute_tilde(self):
+ self.assertSelectMultiple(
+ ('p[class~="class1"]', ['pmulti']),
+ ('p[class~="class2"]', ['pmulti']),
+ ('p[class~="class3"]', ['pmulti']),
+ ('[class~="class1"]', ['pmulti']),
+ ('[class~="class2"]', ['pmulti']),
+ ('[class~="class3"]', ['pmulti']),
+ ('a[rel~="friend"]', ['bob']),
+ ('a[rel~="met"]', ['bob']),
+ ('[rel~="friend"]', ['bob']),
+ ('[rel~="met"]', ['bob']),
+ )
+
+ def test_attribute_startswith(self):
+ self.assertSelectMultiple(
+ ('[rel^="style"]', ['l1']),
+ ('link[rel^="style"]', ['l1']),
+ ('notlink[rel^="notstyle"]', []),
+ ('[rel^="notstyle"]', []),
+ ('link[rel^="notstyle"]', []),
+ ('link[href^="bla"]', ['l1']),
+ ('a[href^="http://"]', ['bob', 'me']),
+ ('[href^="http://"]', ['bob', 'me']),
+ ('[id^="p"]', ['pmulti', 'p1']),
+ ('[id^="m"]', ['me', 'main']),
+ ('div[id^="m"]', ['main']),
+ ('a[id^="m"]', ['me']),
+ )
+
+ def test_attribute_endswith(self):
+ self.assertSelectMultiple(
+ ('[href$=".css"]', ['l1']),
+ ('link[href$=".css"]', ['l1']),
+ ('link[id$="1"]', ['l1']),
+ ('[id$="1"]', ['l1', 'p1', 'header1', 's1a1', 's2a1', 's1a2s1']),
+ ('div[id$="1"]', []),
+ ('[id$="noending"]', []),
+ )
+
+ def test_attribute_contains(self):
+ self.assertSelectMultiple(
+ # From test_attribute_startswith
+ ('[rel*="style"]', ['l1']),
+ ('link[rel*="style"]', ['l1']),
+ ('notlink[rel*="notstyle"]', []),
+ ('[rel*="notstyle"]', []),
+ ('link[rel*="notstyle"]', []),
+ ('link[href*="bla"]', ['l1']),
+ ('a[href*="http://"]', ['bob', 'me']),
+ ('[href*="http://"]', ['bob', 'me']),
+ ('[id*="p"]', ['pmulti', 'p1']),
+ ('div[id*="m"]', ['main']),
+ ('a[id*="m"]', ['me']),
+ # From test_attribute_endswith
+ ('[href*=".css"]', ['l1']),
+ ('link[href*=".css"]', ['l1']),
+ ('link[id*="1"]', ['l1']),
+ ('[id*="1"]', ['l1', 'p1', 'header1', 's1a1', 's1a2', 's2a1', 's1a2s1']),
+ ('div[id*="1"]', []),
+ ('[id*="noending"]', []),
+ # New for this test
+ ('[href*="."]', ['bob', 'me', 'l1']),
+ ('a[href*="."]', ['bob', 'me']),
+ ('link[href*="."]', ['l1']),
+ ('div[id*="n"]', ['main', 'inner']),
+ ('div[id*="nn"]', ['inner']),
+ )
+
+ def test_attribute_exact_or_hypen(self):
+ self.assertSelectMultiple(
+ ('p[lang|="en"]', ['lang-en', 'lang-en-gb', 'lang-en-us']),
+ ('[lang|="en"]', ['lang-en', 'lang-en-gb', 'lang-en-us']),
+ ('p[lang|="fr"]', ['lang-fr']),
+ ('p[lang|="gb"]', []),
+ )
+
+ def test_attribute_exists(self):
+ self.assertSelectMultiple(
+ ('[rel]', ['l1', 'bob', 'me']),
+ ('link[rel]', ['l1']),
+ ('a[rel]', ['bob', 'me']),
+ ('[lang]', ['lang-en', 'lang-en-gb', 'lang-en-us', 'lang-fr']),
+ ('p[class]', ['p1', 'pmulti']),
+ ('[blah]', []),
+ ('p[blah]', []),
+ )
+
+ def test_nth_of_type(self):
+ # Try to select first paragraph
+ els = self.soup.select('div#inner p:nth-of-type(1)')
+ self.assertEqual(len(els), 1)
+ self.assertEqual(els[0].string, u'Some text')
+
+ # Try to select third paragraph
+ els = self.soup.select('div#inner p:nth-of-type(3)')
+ self.assertEqual(len(els), 1)
+ self.assertEqual(els[0].string, u'Another')
+
+ # Try to select (non-existent!) fourth paragraph
+ els = self.soup.select('div#inner p:nth-of-type(4)')
+ self.assertEqual(len(els), 0)
+
+ # Pass in an invalid value.
+ self.assertRaises(
+ ValueError, self.soup.select, 'div p:nth-of-type(0)')
+
+ def test_nth_of_type_direct_descendant(self):
+ els = self.soup.select('div#inner > p:nth-of-type(1)')
+ self.assertEqual(len(els), 1)
+ self.assertEqual(els[0].string, u'Some text')
+
+ def test_id_child_selector_nth_of_type(self):
+ self.assertSelects('#inner > p:nth-of-type(2)', ['p1'])
+
+ def test_select_on_element(self):
+ # Other tests operate on the tree; this operates on an element
+ # within the tree.
+ inner = self.soup.find("div", id="main")
+ selected = inner.select("div")
+ # The <div id="inner"> tag was selected. The <div id="footer">
+ # tag was not.
+ self.assertSelectsIDs(selected, ['inner'])
+
+ def test_overspecified_child_id(self):
+ self.assertSelects(".fancy #inner", ['inner'])
+ self.assertSelects(".normal #inner", [])
+
+ def test_adjacent_sibling_selector(self):
+ self.assertSelects('#p1 + h2', ['header2'])
+ self.assertSelects('#p1 + h2 + p', ['pmulti'])
+ self.assertSelects('#p1 + #header2 + .class1', ['pmulti'])
+ self.assertEqual([], self.soup.select('#p1 + p'))
+
+ def test_general_sibling_selector(self):
+ self.assertSelects('#p1 ~ h2', ['header2', 'header3'])
+ self.assertSelects('#p1 ~ #header2', ['header2'])
+ self.assertSelects('#p1 ~ h2 + a', ['me'])
+ self.assertSelects('#p1 ~ h2 + [rel="me"]', ['me'])
+ self.assertEqual([], self.soup.select('#inner ~ h2'))
+
+ def test_dangling_combinator(self):
+ self.assertRaises(ValueError, self.soup.select, 'h1 >')
+
+ def test_sibling_combinator_wont_select_same_tag_twice(self):
+ self.assertSelects('p[lang] ~ p', ['lang-en-gb', 'lang-en-us', 'lang-fr'])
diff --git a/bitbake/lib/progressbar.py b/bitbake/lib/progressbar.py
index b668647a36..114cdc16ba 100644
--- a/bitbake/lib/progressbar.py
+++ b/bitbake/lib/progressbar.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
#
# progressbar - Text progressbar library for python.
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py
index 49f36da1ad..9d6d11526a 100644
--- a/bitbake/lib/prserv/db.py
+++ b/bitbake/lib/prserv/db.py
@@ -19,6 +19,7 @@ class PRTable(object):
def __init__(self, conn, table, nohist):
self.conn = conn
self.nohist = nohist
+ self.dirty = False
if nohist:
self.table = "%s_nohist" % table
else:
@@ -47,6 +48,11 @@ class PRTable(object):
self.conn.commit()
self._execute("BEGIN EXCLUSIVE TRANSACTION")
+ def sync_if_dirty(self):
+ if self.dirty:
+ self.sync()
+ self.dirty = False
+
def _getValueHist(self, version, pkgarch, checksum):
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
(version, pkgarch, checksum))
@@ -62,6 +68,8 @@ class PRTable(object):
except sqlite3.IntegrityError as exc:
logger.error(str(exc))
+ self.dirty = True
+
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
(version, pkgarch, checksum))
row=data.fetchone()
@@ -89,6 +97,8 @@ class PRTable(object):
logger.error(str(exc))
self.conn.rollback()
+ self.dirty = True
+
data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
(version, pkgarch, checksum))
row=data.fetchone()
@@ -118,6 +128,8 @@ class PRTable(object):
except sqlite3.IntegrityError as exc:
logger.error(str(exc))
+ self.dirty = True
+
data = self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table,
(version, pkgarch, checksum))
row = data.fetchone()
@@ -139,6 +151,8 @@ class PRTable(object):
except sqlite3.IntegrityError as exc:
logger.error(str(exc))
+ self.dirty = True
+
data = self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=? AND value>=?;" % self.table,
(version,pkgarch,checksum,value))
row=data.fetchone()
@@ -221,6 +235,7 @@ class PRData(object):
self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
self.connection.row_factory=sqlite3.Row
self.connection.execute("pragma synchronous = off;")
+ self.connection.execute("PRAGMA journal_mode = WAL;")
self._tables={}
def __del__(self):
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 1e170cea0a..a7639c8c2d 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -38,8 +38,17 @@ singleton = None
class PRServer(SimpleXMLRPCServer):
def __init__(self, dbfile, logfile, interface, daemon=True):
''' constructor '''
- SimpleXMLRPCServer.__init__(self, interface,
- logRequests=False, allow_none=True)
+ import socket
+ try:
+ SimpleXMLRPCServer.__init__(self, interface,
+ logRequests=False, allow_none=True)
+ except socket.error:
+ ip=socket.gethostbyname(interface[0])
+ port=interface[1]
+ msg="PR Server unable to bind to %s:%s\n" % (ip, port)
+ sys.stderr.write(msg)
+ raise PRServiceConfigError
+
self.dbfile=dbfile
self.daemon=daemon
self.logfile=logfile
@@ -67,15 +76,27 @@ class PRServer(SimpleXMLRPCServer):
In addition, exception handling is done here.
"""
- while True:
- (request, client_address) = self.requestqueue.get()
+ iter_count = 1
+ # 60 iterations between syncs or sync if dirty every ~30 seconds
+ iterations_between_sync = 60
+
+ while not self.quit:
+ try:
+ (request, client_address) = self.requestqueue.get(True, 30)
+ except Queue.Empty:
+ self.table.sync_if_dirty()
+ continue
try:
self.finish_request(request, client_address)
self.shutdown_request(request)
+ iter_count = (iter_count + 1) % iterations_between_sync
+ if iter_count == 0:
+ self.table.sync_if_dirty()
except:
self.handle_error(request, client_address)
self.shutdown_request(request)
self.table.sync()
+ self.table.sync_if_dirty()
def process_request(self, request, client_address):
self.requestqueue.put((request, client_address))
@@ -120,7 +141,7 @@ class PRServer(SimpleXMLRPCServer):
self.handlerthread.start()
while not self.quit:
self.handle_request()
-
+ self.handlerthread.join()
self.table.sync()
logger.info("PRServer: stopping...")
self.server_close()
diff --git a/bitbake/lib/pyinotify.py b/bitbake/lib/pyinotify.py
new file mode 100644
index 0000000000..2dae002118
--- /dev/null
+++ b/bitbake/lib/pyinotify.py
@@ -0,0 +1,2416 @@
+#!/usr/bin/env python
+
+# pyinotify.py - python interface to inotify
+# Copyright (c) 2005-2015 Sebastien Martini <seb@dbzteam.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+"""
+pyinotify
+
+@author: Sebastien Martini
+@license: MIT License
+@contact: seb@dbzteam.org
+"""
+
+class PyinotifyError(Exception):
+ """Indicates exceptions raised by a Pyinotify class."""
+ pass
+
+
+class UnsupportedPythonVersionError(PyinotifyError):
+ """
+ Raised on unsupported Python versions.
+ """
+ def __init__(self, version):
+ """
+ @param version: Current Python version
+ @type version: string
+ """
+ err = 'Python %s is unsupported, requires at least Python 2.4'
+ PyinotifyError.__init__(self, err % version)
+
+
+# Check Python version
+import sys
+if sys.version_info < (2, 4):
+ raise UnsupportedPythonVersionError(sys.version)
+
+
+# Import directives
+import threading
+import os
+import select
+import struct
+import fcntl
+import errno
+import termios
+import array
+import logging
+import atexit
+from collections import deque
+from datetime import datetime, timedelta
+import time
+import re
+import asyncore
+import subprocess
+
+try:
+ from functools import reduce
+except ImportError:
+ pass # Will fail on Python 2.4 which has reduce() builtin anyway.
+
+try:
+ from glob import iglob as glob
+except ImportError:
+ # Python 2.4 does not have glob.iglob().
+ from glob import glob as glob
+
+try:
+ import ctypes
+ import ctypes.util
+except ImportError:
+ ctypes = None
+
+try:
+ import inotify_syscalls
+except ImportError:
+ inotify_syscalls = None
+
+
+__author__ = "seb@dbzteam.org (Sebastien Martini)"
+
+__version__ = "0.9.5"
+
+__metaclass__ = type # Use new-style classes by default
+
+
+# Compatibity mode: set to True to improve compatibility with
+# Pyinotify 0.7.1. Do not set this variable yourself, call the
+# function compatibility_mode() instead.
+COMPATIBILITY_MODE = False
+
+
+class InotifyBindingNotFoundError(PyinotifyError):
+ """
+ Raised when no inotify support couldn't be found.
+ """
+ def __init__(self):
+ err = "Couldn't find any inotify binding"
+ PyinotifyError.__init__(self, err)
+
+
+class INotifyWrapper:
+ """
+ Abstract class wrapping access to inotify's functions. This is an
+ internal class.
+ """
+ @staticmethod
+ def create():
+ # First, try to use ctypes.
+ if ctypes:
+ inotify = _CtypesLibcINotifyWrapper()
+ if inotify.init():
+ return inotify
+ # Second, see if C extension is compiled.
+ if inotify_syscalls:
+ inotify = _INotifySyscallsWrapper()
+ if inotify.init():
+ return inotify
+
+ def get_errno(self):
+ """
+ Return None is no errno code is available.
+ """
+ return self._get_errno()
+
+ def str_errno(self):
+ code = self.get_errno()
+ if code is None:
+ return 'Errno: no errno support'
+ return 'Errno=%s (%s)' % (os.strerror(code), errno.errorcode[code])
+
+ def inotify_init(self):
+ return self._inotify_init()
+
+ def inotify_add_watch(self, fd, pathname, mask):
+ # Unicode strings must be encoded to string prior to calling this
+ # method.
+ assert isinstance(pathname, str)
+ return self._inotify_add_watch(fd, pathname, mask)
+
+ def inotify_rm_watch(self, fd, wd):
+ return self._inotify_rm_watch(fd, wd)
+
+
+class _INotifySyscallsWrapper(INotifyWrapper):
+ def __init__(self):
+ # Stores the last errno value.
+ self._last_errno = None
+
+ def init(self):
+ assert inotify_syscalls
+ return True
+
+ def _get_errno(self):
+ return self._last_errno
+
+ def _inotify_init(self):
+ try:
+ fd = inotify_syscalls.inotify_init()
+ except IOError, err:
+ self._last_errno = err.errno
+ return -1
+ return fd
+
+ def _inotify_add_watch(self, fd, pathname, mask):
+ try:
+ wd = inotify_syscalls.inotify_add_watch(fd, pathname, mask)
+ except IOError, err:
+ self._last_errno = err.errno
+ return -1
+ return wd
+
+ def _inotify_rm_watch(self, fd, wd):
+ try:
+ ret = inotify_syscalls.inotify_rm_watch(fd, wd)
+ except IOError, err:
+ self._last_errno = err.errno
+ return -1
+ return ret
+
+
+class _CtypesLibcINotifyWrapper(INotifyWrapper):
+ def __init__(self):
+ self._libc = None
+ self._get_errno_func = None
+
+ def init(self):
+ assert ctypes
+
+ try_libc_name = 'c'
+ if sys.platform.startswith('freebsd'):
+ try_libc_name = 'inotify'
+
+ libc_name = None
+ try:
+ libc_name = ctypes.util.find_library(try_libc_name)
+ except (OSError, IOError):
+ pass # Will attemp to load it with None anyway.
+
+ if sys.version_info >= (2, 6):
+ self._libc = ctypes.CDLL(libc_name, use_errno=True)
+ self._get_errno_func = ctypes.get_errno
+ else:
+ self._libc = ctypes.CDLL(libc_name)
+ try:
+ location = self._libc.__errno_location
+ location.restype = ctypes.POINTER(ctypes.c_int)
+ self._get_errno_func = lambda: location().contents.value
+ except AttributeError:
+ pass
+
+ # Eventually check that libc has needed inotify bindings.
+ if (not hasattr(self._libc, 'inotify_init') or
+ not hasattr(self._libc, 'inotify_add_watch') or
+ not hasattr(self._libc, 'inotify_rm_watch')):
+ return False
+
+ self._libc.inotify_init.argtypes = []
+ self._libc.inotify_init.restype = ctypes.c_int
+ self._libc.inotify_add_watch.argtypes = [ctypes.c_int, ctypes.c_char_p,
+ ctypes.c_uint32]
+ self._libc.inotify_add_watch.restype = ctypes.c_int
+ self._libc.inotify_rm_watch.argtypes = [ctypes.c_int, ctypes.c_int]
+ self._libc.inotify_rm_watch.restype = ctypes.c_int
+ return True
+
+ def _get_errno(self):
+ if self._get_errno_func is not None:
+ return self._get_errno_func()
+ return None
+
+ def _inotify_init(self):
+ assert self._libc is not None
+ return self._libc.inotify_init()
+
+ def _inotify_add_watch(self, fd, pathname, mask):
+ assert self._libc is not None
+ pathname = ctypes.create_string_buffer(pathname)
+ return self._libc.inotify_add_watch(fd, pathname, mask)
+
+ def _inotify_rm_watch(self, fd, wd):
+ assert self._libc is not None
+ return self._libc.inotify_rm_watch(fd, wd)
+
+ def _sysctl(self, *args):
+ assert self._libc is not None
+ return self._libc.sysctl(*args)
+
+
+# Logging
+def logger_init():
+ """Initialize logger instance."""
+ log = logging.getLogger("pyinotify")
+ console_handler = logging.StreamHandler()
+ console_handler.setFormatter(
+ logging.Formatter("[%(asctime)s %(name)s %(levelname)s] %(message)s"))
+ log.addHandler(console_handler)
+ log.setLevel(20)
+ return log
+
+log = logger_init()
+
+
+# inotify's variables
+class SysCtlINotify:
+ """
+ Access (read, write) inotify's variables through sysctl. Usually it
+ requires administrator rights to update them.
+
+ Examples:
+ - Read max_queued_events attribute: myvar = max_queued_events.value
+ - Update max_queued_events attribute: max_queued_events.value = 42
+ """
+
+ inotify_attrs = {'max_user_instances': 1,
+ 'max_user_watches': 2,
+ 'max_queued_events': 3}
+
+ def __init__(self, attrname, inotify_wrapper):
+ # FIXME: right now only supporting ctypes
+ assert ctypes
+ self._attrname = attrname
+ self._inotify_wrapper = inotify_wrapper
+ sino = ctypes.c_int * 3
+ self._attr = sino(5, 20, SysCtlINotify.inotify_attrs[attrname])
+
+ @staticmethod
+ def create(attrname):
+ """
+ Factory method instanciating and returning the right wrapper.
+ """
+ # FIXME: right now only supporting ctypes
+ if ctypes is None:
+ return None
+ inotify_wrapper = _CtypesLibcINotifyWrapper()
+ if not inotify_wrapper.init():
+ return None
+ return SysCtlINotify(attrname, inotify_wrapper)
+
+ def get_val(self):
+ """
+ Gets attribute's value. Raises OSError if the operation failed.
+
+ @return: stored value.
+ @rtype: int
+ """
+ oldv = ctypes.c_int(0)
+ size = ctypes.c_int(ctypes.sizeof(oldv))
+ sysctl = self._inotify_wrapper._sysctl
+ res = sysctl(self._attr, 3,
+ ctypes.c_voidp(ctypes.addressof(oldv)),
+ ctypes.addressof(size),
+ None, 0)
+ if res == -1:
+ raise OSError(self._inotify_wrapper.get_errno(),
+ self._inotify_wrapper.str_errno())
+ return oldv.value
+
+ def set_val(self, nval):
+ """
+ Sets new attribute's value. Raises OSError if the operation failed.
+
+ @param nval: replaces current value by nval.
+ @type nval: int
+ """
+ oldv = ctypes.c_int(0)
+ sizeo = ctypes.c_int(ctypes.sizeof(oldv))
+ newv = ctypes.c_int(nval)
+ sizen = ctypes.c_int(ctypes.sizeof(newv))
+ sysctl = self._inotify_wrapper._sysctl
+ res = sysctl(self._attr, 3,
+ ctypes.c_voidp(ctypes.addressof(oldv)),
+ ctypes.addressof(sizeo),
+ ctypes.c_voidp(ctypes.addressof(newv)),
+ sizen)
+ if res == -1:
+ raise OSError(self._inotify_wrapper.get_errno(),
+ self._inotify_wrapper.str_errno())
+
+ value = property(get_val, set_val)
+
+ def __repr__(self):
+ return '<%s=%d>' % (self._attrname, self.get_val())
+
+
+# Inotify's variables
+#
+# FIXME: currently these variables are only accessible when ctypes is used,
+# otherwise there are set to None.
+#
+# read: myvar = max_queued_events.value
+# update: max_queued_events.value = 42
+#
+for attrname in ('max_queued_events', 'max_user_instances', 'max_user_watches'):
+ globals()[attrname] = SysCtlINotify.create(attrname)
+
+
+class EventsCodes:
+ """
+ Set of codes corresponding to each kind of events.
+ Some of these flags are used to communicate with inotify, whereas
+ the others are sent to userspace by inotify notifying some events.
+
+ @cvar IN_ACCESS: File was accessed.
+ @type IN_ACCESS: int
+ @cvar IN_MODIFY: File was modified.
+ @type IN_MODIFY: int
+ @cvar IN_ATTRIB: Metadata changed.
+ @type IN_ATTRIB: int
+ @cvar IN_CLOSE_WRITE: Writtable file was closed.
+ @type IN_CLOSE_WRITE: int
+ @cvar IN_CLOSE_NOWRITE: Unwrittable file closed.
+ @type IN_CLOSE_NOWRITE: int
+ @cvar IN_OPEN: File was opened.
+ @type IN_OPEN: int
+ @cvar IN_MOVED_FROM: File was moved from X.
+ @type IN_MOVED_FROM: int
+ @cvar IN_MOVED_TO: File was moved to Y.
+ @type IN_MOVED_TO: int
+ @cvar IN_CREATE: Subfile was created.
+ @type IN_CREATE: int
+ @cvar IN_DELETE: Subfile was deleted.
+ @type IN_DELETE: int
+ @cvar IN_DELETE_SELF: Self (watched item itself) was deleted.
+ @type IN_DELETE_SELF: int
+ @cvar IN_MOVE_SELF: Self (watched item itself) was moved.
+ @type IN_MOVE_SELF: int
+ @cvar IN_UNMOUNT: Backing fs was unmounted.
+ @type IN_UNMOUNT: int
+ @cvar IN_Q_OVERFLOW: Event queued overflowed.
+ @type IN_Q_OVERFLOW: int
+ @cvar IN_IGNORED: File was ignored.
+ @type IN_IGNORED: int
+ @cvar IN_ONLYDIR: only watch the path if it is a directory (new
+ in kernel 2.6.15).
+ @type IN_ONLYDIR: int
+ @cvar IN_DONT_FOLLOW: don't follow a symlink (new in kernel 2.6.15).
+ IN_ONLYDIR we can make sure that we don't watch
+ the target of symlinks.
+ @type IN_DONT_FOLLOW: int
+ @cvar IN_EXCL_UNLINK: Events are not generated for children after they
+ have been unlinked from the watched directory.
+ (new in kernel 2.6.36).
+ @type IN_EXCL_UNLINK: int
+ @cvar IN_MASK_ADD: add to the mask of an already existing watch (new
+ in kernel 2.6.14).
+ @type IN_MASK_ADD: int
+ @cvar IN_ISDIR: Event occurred against dir.
+ @type IN_ISDIR: int
+ @cvar IN_ONESHOT: Only send event once.
+ @type IN_ONESHOT: int
+ @cvar ALL_EVENTS: Alias for considering all of the events.
+ @type ALL_EVENTS: int
+ """
+
+ # The idea here is 'configuration-as-code' - this way, we get our nice class
+ # constants, but we also get nice human-friendly text mappings to do lookups
+ # against as well, for free:
+ FLAG_COLLECTIONS = {'OP_FLAGS': {
+ 'IN_ACCESS' : 0x00000001, # File was accessed
+ 'IN_MODIFY' : 0x00000002, # File was modified
+ 'IN_ATTRIB' : 0x00000004, # Metadata changed
+ 'IN_CLOSE_WRITE' : 0x00000008, # Writable file was closed
+ 'IN_CLOSE_NOWRITE' : 0x00000010, # Unwritable file closed
+ 'IN_OPEN' : 0x00000020, # File was opened
+ 'IN_MOVED_FROM' : 0x00000040, # File was moved from X
+ 'IN_MOVED_TO' : 0x00000080, # File was moved to Y
+ 'IN_CREATE' : 0x00000100, # Subfile was created
+ 'IN_DELETE' : 0x00000200, # Subfile was deleted
+ 'IN_DELETE_SELF' : 0x00000400, # Self (watched item itself)
+ # was deleted
+ 'IN_MOVE_SELF' : 0x00000800, # Self (watched item itself) was moved
+ },
+ 'EVENT_FLAGS': {
+ 'IN_UNMOUNT' : 0x00002000, # Backing fs was unmounted
+ 'IN_Q_OVERFLOW' : 0x00004000, # Event queued overflowed
+ 'IN_IGNORED' : 0x00008000, # File was ignored
+ },
+ 'SPECIAL_FLAGS': {
+ 'IN_ONLYDIR' : 0x01000000, # only watch the path if it is a
+ # directory
+ 'IN_DONT_FOLLOW' : 0x02000000, # don't follow a symlink
+ 'IN_EXCL_UNLINK' : 0x04000000, # exclude events on unlinked objects
+ 'IN_MASK_ADD' : 0x20000000, # add to the mask of an already
+ # existing watch
+ 'IN_ISDIR' : 0x40000000, # event occurred against dir
+ 'IN_ONESHOT' : 0x80000000, # only send event once
+ },
+ }
+
+ def maskname(mask):
+ """
+ Returns the event name associated to mask. IN_ISDIR is appended to
+ the result when appropriate. Note: only one event is returned, because
+ only one event can be raised at a given time.
+
+ @param mask: mask.
+ @type mask: int
+ @return: event name.
+ @rtype: str
+ """
+ ms = mask
+ name = '%s'
+ if mask & IN_ISDIR:
+ ms = mask - IN_ISDIR
+ name = '%s|IN_ISDIR'
+ return name % EventsCodes.ALL_VALUES[ms]
+
+ maskname = staticmethod(maskname)
+
+
+# So let's now turn the configuration into code
+EventsCodes.ALL_FLAGS = {}
+EventsCodes.ALL_VALUES = {}
+for flagc, valc in EventsCodes.FLAG_COLLECTIONS.items():
+ # Make the collections' members directly accessible through the
+ # class dictionary
+ setattr(EventsCodes, flagc, valc)
+
+ # Collect all the flags under a common umbrella
+ EventsCodes.ALL_FLAGS.update(valc)
+
+ # Make the individual masks accessible as 'constants' at globals() scope
+ # and masknames accessible by values.
+ for name, val in valc.items():
+ globals()[name] = val
+ EventsCodes.ALL_VALUES[val] = name
+
+
+# all 'normal' events
+ALL_EVENTS = reduce(lambda x, y: x | y, EventsCodes.OP_FLAGS.values())
+EventsCodes.ALL_FLAGS['ALL_EVENTS'] = ALL_EVENTS
+EventsCodes.ALL_VALUES[ALL_EVENTS] = 'ALL_EVENTS'
+
+
+class _Event:
+ """
+ Event structure, represent events raised by the system. This
+ is the base class and should be subclassed.
+
+ """
+ def __init__(self, dict_):
+ """
+ Attach attributes (contained in dict_) to self.
+
+ @param dict_: Set of attributes.
+ @type dict_: dictionary
+ """
+ for tpl in dict_.items():
+ setattr(self, *tpl)
+
+ def __repr__(self):
+ """
+ @return: Generic event string representation.
+ @rtype: str
+ """
+ s = ''
+ for attr, value in sorted(self.__dict__.items(), key=lambda x: x[0]):
+ if attr.startswith('_'):
+ continue
+ if attr == 'mask':
+ value = hex(getattr(self, attr))
+ elif isinstance(value, basestring) and not value:
+ value = "''"
+ s += ' %s%s%s' % (output_format.field_name(attr),
+ output_format.punctuation('='),
+ output_format.field_value(value))
+
+ s = '%s%s%s %s' % (output_format.punctuation('<'),
+ output_format.class_name(self.__class__.__name__),
+ s,
+ output_format.punctuation('>'))
+ return s
+
+ def __str__(self):
+ return repr(self)
+
+
+class _RawEvent(_Event):
+ """
+ Raw event, it contains only the informations provided by the system.
+ It doesn't infer anything.
+ """
+ def __init__(self, wd, mask, cookie, name):
+ """
+ @param wd: Watch Descriptor.
+ @type wd: int
+ @param mask: Bitmask of events.
+ @type mask: int
+ @param cookie: Cookie.
+ @type cookie: int
+ @param name: Basename of the file or directory against which the
+ event was raised in case where the watched directory
+ is the parent directory. None if the event was raised
+ on the watched item itself.
+ @type name: string or None
+ """
+ # Use this variable to cache the result of str(self), this object
+ # is immutable.
+ self._str = None
+ # name: remove trailing '\0'
+ d = {'wd': wd,
+ 'mask': mask,
+ 'cookie': cookie,
+ 'name': name.rstrip('\0')}
+ _Event.__init__(self, d)
+ log.debug(str(self))
+
+ def __str__(self):
+ if self._str is None:
+ self._str = _Event.__str__(self)
+ return self._str
+
+
+class Event(_Event):
+ """
+ This class contains all the useful informations about the observed
+ event. However, the presence of each field is not guaranteed and
+ depends on the type of event. In effect, some fields are irrelevant
+ for some kind of event (for example 'cookie' is meaningless for
+ IN_CREATE whereas it is mandatory for IN_MOVE_TO).
+
+ The possible fields are:
+ - wd (int): Watch Descriptor.
+ - mask (int): Mask.
+ - maskname (str): Readable event name.
+ - path (str): path of the file or directory being watched.
+ - name (str): Basename of the file or directory against which the
+ event was raised in case where the watched directory
+ is the parent directory. None if the event was raised
+ on the watched item itself. This field is always provided
+ even if the string is ''.
+ - pathname (str): Concatenation of 'path' and 'name'.
+ - src_pathname (str): Only present for IN_MOVED_TO events and only in
+ the case where IN_MOVED_FROM events are watched too. Holds the
+ source pathname from where pathname was moved from.
+ - cookie (int): Cookie.
+ - dir (bool): True if the event was raised against a directory.
+
+ """
+ def __init__(self, raw):
+ """
+ Concretely, this is the raw event plus inferred infos.
+ """
+ _Event.__init__(self, raw)
+ self.maskname = EventsCodes.maskname(self.mask)
+ if COMPATIBILITY_MODE:
+ self.event_name = self.maskname
+ try:
+ if self.name:
+ self.pathname = os.path.abspath(os.path.join(self.path,
+ self.name))
+ else:
+ self.pathname = os.path.abspath(self.path)
+ except AttributeError, err:
+ # Usually it is not an error some events are perfectly valids
+ # despite the lack of these attributes.
+ log.debug(err)
+
+
+class ProcessEventError(PyinotifyError):
+ """
+ ProcessEventError Exception. Raised on ProcessEvent error.
+ """
+ def __init__(self, err):
+ """
+ @param err: Exception error description.
+ @type err: string
+ """
+ PyinotifyError.__init__(self, err)
+
+
+class _ProcessEvent:
+ """
+ Abstract processing event class.
+ """
+ def __call__(self, event):
+ """
+ To behave like a functor the object must be callable.
+ This method is a dispatch method. Its lookup order is:
+ 1. process_MASKNAME method
+ 2. process_FAMILY_NAME method
+ 3. otherwise calls process_default
+
+ @param event: Event to be processed.
+ @type event: Event object
+ @return: By convention when used from the ProcessEvent class:
+ - Returning False or None (default value) means keep on
+ executing next chained functors (see chain.py example).
+ - Returning True instead means do not execute next
+ processing functions.
+ @rtype: bool
+ @raise ProcessEventError: Event object undispatchable,
+ unknown event.
+ """
+ stripped_mask = event.mask - (event.mask & IN_ISDIR)
+ maskname = EventsCodes.ALL_VALUES.get(stripped_mask)
+ if maskname is None:
+ raise ProcessEventError("Unknown mask 0x%08x" % stripped_mask)
+
+ # 1- look for process_MASKNAME
+ meth = getattr(self, 'process_' + maskname, None)
+ if meth is not None:
+ return meth(event)
+ # 2- look for process_FAMILY_NAME
+ meth = getattr(self, 'process_IN_' + maskname.split('_')[1], None)
+ if meth is not None:
+ return meth(event)
+ # 3- default call method process_default
+ return self.process_default(event)
+
+ def __repr__(self):
+ return '<%s>' % self.__class__.__name__
+
+
+class _SysProcessEvent(_ProcessEvent):
+ """
+ There is three kind of processing according to each event:
+
+ 1. special handling (deletion from internal container, bug, ...).
+ 2. default treatment: which is applied to the majority of events.
+ 3. IN_ISDIR is never sent alone, he is piggybacked with a standard
+ event, he is not processed as the others events, instead, its
+ value is captured and appropriately aggregated to dst event.
+ """
+ def __init__(self, wm, notifier):
+ """
+
+ @param wm: Watch Manager.
+ @type wm: WatchManager instance
+ @param notifier: Notifier.
+ @type notifier: Notifier instance
+ """
+ self._watch_manager = wm # watch manager
+ self._notifier = notifier # notifier
+ self._mv_cookie = {} # {cookie(int): (src_path(str), date), ...}
+ self._mv = {} # {src_path(str): (dst_path(str), date), ...}
+
+ def cleanup(self):
+ """
+ Cleanup (delete) old (>1mn) records contained in self._mv_cookie
+ and self._mv.
+ """
+ date_cur_ = datetime.now()
+ for seq in [self._mv_cookie, self._mv]:
+ for k in seq.keys():
+ if (date_cur_ - seq[k][1]) > timedelta(minutes=1):
+ log.debug('Cleanup: deleting entry %s', seq[k][0])
+ del seq[k]
+
+ def process_IN_CREATE(self, raw_event):
+ """
+ If the event affects a directory and the auto_add flag of the
+ targetted watch is set to True, a new watch is added on this
+ new directory, with the same attribute values than those of
+ this watch.
+ """
+ if raw_event.mask & IN_ISDIR:
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ created_dir = os.path.join(watch_.path, raw_event.name)
+ if watch_.auto_add and not watch_.exclude_filter(created_dir):
+ addw = self._watch_manager.add_watch
+ # The newly monitored directory inherits attributes from its
+ # parent directory.
+ addw_ret = addw(created_dir, watch_.mask,
+ proc_fun=watch_.proc_fun,
+ rec=False, auto_add=watch_.auto_add,
+ exclude_filter=watch_.exclude_filter)
+
+ # Trick to handle mkdir -p /d1/d2/t3 where d1 is watched and
+ # d2 and t3 (directory or file) are created.
+ # Since the directory d2 is new, then everything inside it must
+ # also be new.
+ created_dir_wd = addw_ret.get(created_dir)
+ if ((created_dir_wd is not None) and (created_dir_wd > 0) and
+ os.path.isdir(created_dir)):
+ try:
+ for name in os.listdir(created_dir):
+ inner = os.path.join(created_dir, name)
+ if self._watch_manager.get_wd(inner) is not None:
+ continue
+ # Generate (simulate) creation events for sub-
+ # directories and files.
+ if os.path.isfile(inner):
+ # symlinks are handled as files.
+ flags = IN_CREATE
+ elif os.path.isdir(inner):
+ flags = IN_CREATE | IN_ISDIR
+ else:
+ # This path should not be taken.
+ continue
+ rawevent = _RawEvent(created_dir_wd, flags, 0, name)
+ self._notifier.append_event(rawevent)
+ except OSError, err:
+ msg = "process_IN_CREATE, invalid directory %s: %s"
+ log.debug(msg % (created_dir, str(err)))
+ return self.process_default(raw_event)
+
+ def process_IN_MOVED_FROM(self, raw_event):
+ """
+ Map the cookie with the source path (+ date for cleaning).
+ """
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ path_ = watch_.path
+ src_path = os.path.normpath(os.path.join(path_, raw_event.name))
+ self._mv_cookie[raw_event.cookie] = (src_path, datetime.now())
+ return self.process_default(raw_event, {'cookie': raw_event.cookie})
+
+ def process_IN_MOVED_TO(self, raw_event):
+ """
+ Map the source path with the destination path (+ date for
+ cleaning).
+ """
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ path_ = watch_.path
+ dst_path = os.path.normpath(os.path.join(path_, raw_event.name))
+ mv_ = self._mv_cookie.get(raw_event.cookie)
+ to_append = {'cookie': raw_event.cookie}
+ if mv_ is not None:
+ self._mv[mv_[0]] = (dst_path, datetime.now())
+ # Let's assume that IN_MOVED_FROM event is always queued before
+ # that its associated (they share a common cookie) IN_MOVED_TO
+ # event is queued itself. It is then possible in that scenario
+ # to provide as additional information to the IN_MOVED_TO event
+ # the original pathname of the moved file/directory.
+ to_append['src_pathname'] = mv_[0]
+ elif (raw_event.mask & IN_ISDIR and watch_.auto_add and
+ not watch_.exclude_filter(dst_path)):
+ # We got a diretory that's "moved in" from an unknown source and
+ # auto_add is enabled. Manually add watches to the inner subtrees.
+ # The newly monitored directory inherits attributes from its
+ # parent directory.
+ self._watch_manager.add_watch(dst_path, watch_.mask,
+ proc_fun=watch_.proc_fun,
+ rec=True, auto_add=True,
+ exclude_filter=watch_.exclude_filter)
+ return self.process_default(raw_event, to_append)
+
+ def process_IN_MOVE_SELF(self, raw_event):
+ """
+ STATUS: the following bug has been fixed in recent kernels (FIXME:
+ which version ?). Now it raises IN_DELETE_SELF instead.
+
+ Old kernels were bugged, this event raised when the watched item
+ were moved, so we had to update its path, but under some circumstances
+ it was impossible: if its parent directory and its destination
+ directory wasn't watched. The kernel (see include/linux/fsnotify.h)
+ doesn't bring us enough informations like the destination path of
+ moved items.
+ """
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ src_path = watch_.path
+ mv_ = self._mv.get(src_path)
+ if mv_:
+ dest_path = mv_[0]
+ watch_.path = dest_path
+ # add the separator to the source path to avoid overlapping
+ # path issue when testing with startswith()
+ src_path += os.path.sep
+ src_path_len = len(src_path)
+ # The next loop renames all watches with src_path as base path.
+ # It seems that IN_MOVE_SELF does not provide IN_ISDIR information
+ # therefore the next loop is iterated even if raw_event is a file.
+ for w in self._watch_manager.watches.values():
+ if w.path.startswith(src_path):
+ # Note that dest_path is a normalized path.
+ w.path = os.path.join(dest_path, w.path[src_path_len:])
+ else:
+ log.error("The pathname '%s' of this watch %s has probably changed "
+ "and couldn't be updated, so it cannot be trusted "
+ "anymore. To fix this error move directories/files only "
+ "between watched parents directories, in this case e.g. "
+ "put a watch on '%s'.",
+ watch_.path, watch_,
+ os.path.normpath(os.path.join(watch_.path,
+ os.path.pardir)))
+ if not watch_.path.endswith('-unknown-path'):
+ watch_.path += '-unknown-path'
+ return self.process_default(raw_event)
+
+ def process_IN_Q_OVERFLOW(self, raw_event):
+ """
+ Only signal an overflow, most of the common flags are irrelevant
+ for this event (path, wd, name).
+ """
+ return Event({'mask': raw_event.mask})
+
+ def process_IN_IGNORED(self, raw_event):
+ """
+ The watch descriptor raised by this event is now ignored (forever),
+ it can be safely deleted from the watch manager dictionary.
+ After this event we can be sure that neither the event queue nor
+ the system will raise an event associated to this wd again.
+ """
+ event_ = self.process_default(raw_event)
+ self._watch_manager.del_watch(raw_event.wd)
+ return event_
+
+ def process_default(self, raw_event, to_append=None):
+ """
+ Commons handling for the followings events:
+
+ IN_ACCESS, IN_MODIFY, IN_ATTRIB, IN_CLOSE_WRITE, IN_CLOSE_NOWRITE,
+ IN_OPEN, IN_DELETE, IN_DELETE_SELF, IN_UNMOUNT.
+ """
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ if raw_event.mask & (IN_DELETE_SELF | IN_MOVE_SELF):
+ # Unfornulately this information is not provided by the kernel
+ dir_ = watch_.dir
+ else:
+ dir_ = bool(raw_event.mask & IN_ISDIR)
+ dict_ = {'wd': raw_event.wd,
+ 'mask': raw_event.mask,
+ 'path': watch_.path,
+ 'name': raw_event.name,
+ 'dir': dir_}
+ if COMPATIBILITY_MODE:
+ dict_['is_dir'] = dir_
+ if to_append is not None:
+ dict_.update(to_append)
+ return Event(dict_)
+
+
+class ProcessEvent(_ProcessEvent):
+ """
+ Process events objects, can be specialized via subclassing, thus its
+ behavior can be overriden:
+
+ Note: you should not override __init__ in your subclass instead define
+ a my_init() method, this method will be called automatically from the
+ constructor of this class with its optionals parameters.
+
+ 1. Provide specialized individual methods, e.g. process_IN_DELETE for
+ processing a precise type of event (e.g. IN_DELETE in this case).
+ 2. Or/and provide methods for processing events by 'family', e.g.
+ process_IN_CLOSE method will process both IN_CLOSE_WRITE and
+ IN_CLOSE_NOWRITE events (if process_IN_CLOSE_WRITE and
+ process_IN_CLOSE_NOWRITE aren't defined though).
+ 3. Or/and override process_default for catching and processing all
+ the remaining types of events.
+ """
+ pevent = None
+
+ def __init__(self, pevent=None, **kargs):
+ """
+ Enable chaining of ProcessEvent instances.
+
+ @param pevent: Optional callable object, will be called on event
+ processing (before self).
+ @type pevent: callable
+ @param kargs: This constructor is implemented as a template method
+ delegating its optionals keyworded arguments to the
+ method my_init().
+ @type kargs: dict
+ """
+ self.pevent = pevent
+ self.my_init(**kargs)
+
+ def my_init(self, **kargs):
+ """
+ This method is called from ProcessEvent.__init__(). This method is
+ empty here and must be redefined to be useful. In effect, if you
+ need to specifically initialize your subclass' instance then you
+ just have to override this method in your subclass. Then all the
+ keyworded arguments passed to ProcessEvent.__init__() will be
+ transmitted as parameters to this method. Beware you MUST pass
+ keyword arguments though.
+
+ @param kargs: optional delegated arguments from __init__().
+ @type kargs: dict
+ """
+ pass
+
+ def __call__(self, event):
+ stop_chaining = False
+ if self.pevent is not None:
+ # By default methods return None so we set as guideline
+ # that methods asking for stop chaining must explicitely
+ # return non None or non False values, otherwise the default
+ # behavior will be to accept chain call to the corresponding
+ # local method.
+ stop_chaining = self.pevent(event)
+ if not stop_chaining:
+ return _ProcessEvent.__call__(self, event)
+
+ def nested_pevent(self):
+ return self.pevent
+
+ def process_IN_Q_OVERFLOW(self, event):
+ """
+ By default this method only reports warning messages, you can overredide
+ it by subclassing ProcessEvent and implement your own
+ process_IN_Q_OVERFLOW method. The actions you can take on receiving this
+ event is either to update the variable max_queued_events in order to
+ handle more simultaneous events or to modify your code in order to
+ accomplish a better filtering diminishing the number of raised events.
+ Because this method is defined, IN_Q_OVERFLOW will never get
+ transmitted as arguments to process_default calls.
+
+ @param event: IN_Q_OVERFLOW event.
+ @type event: dict
+ """
+ log.warning('Event queue overflowed.')
+
+ def process_default(self, event):
+ """
+ Default processing event method. By default does nothing. Subclass
+ ProcessEvent and redefine this method in order to modify its behavior.
+
+ @param event: Event to be processed. Can be of any type of events but
+ IN_Q_OVERFLOW events (see method process_IN_Q_OVERFLOW).
+ @type event: Event instance
+ """
+ pass
+
+
+class PrintAllEvents(ProcessEvent):
+ """
+ Dummy class used to print events strings representations. For instance this
+ class is used from command line to print all received events to stdout.
+ """
+ def my_init(self, out=None):
+ """
+ @param out: Where events will be written.
+ @type out: Object providing a valid file object interface.
+ """
+ if out is None:
+ out = sys.stdout
+ self._out = out
+
+ def process_default(self, event):
+ """
+ Writes event string representation to file object provided to
+ my_init().
+
+ @param event: Event to be processed. Can be of any type of events but
+ IN_Q_OVERFLOW events (see method process_IN_Q_OVERFLOW).
+ @type event: Event instance
+ """
+ self._out.write(str(event))
+ self._out.write('\n')
+ self._out.flush()
+
+
+class ChainIfTrue(ProcessEvent):
+ """
+ Makes conditional chaining depending on the result of the nested
+ processing instance.
+ """
+ def my_init(self, func):
+ """
+ Method automatically called from base class constructor.
+ """
+ self._func = func
+
+ def process_default(self, event):
+ return not self._func(event)
+
+
+class Stats(ProcessEvent):
+ """
+ Compute and display trivial statistics about processed events.
+ """
+ def my_init(self):
+ """
+ Method automatically called from base class constructor.
+ """
+ self._start_time = time.time()
+ self._stats = {}
+ self._stats_lock = threading.Lock()
+
+ def process_default(self, event):
+ """
+ Processes |event|.
+ """
+ self._stats_lock.acquire()
+ try:
+ events = event.maskname.split('|')
+ for event_name in events:
+ count = self._stats.get(event_name, 0)
+ self._stats[event_name] = count + 1
+ finally:
+ self._stats_lock.release()
+
+ def _stats_copy(self):
+ self._stats_lock.acquire()
+ try:
+ return self._stats.copy()
+ finally:
+ self._stats_lock.release()
+
+ def __repr__(self):
+ stats = self._stats_copy()
+
+ elapsed = int(time.time() - self._start_time)
+ elapsed_str = ''
+ if elapsed < 60:
+ elapsed_str = str(elapsed) + 'sec'
+ elif 60 <= elapsed < 3600:
+ elapsed_str = '%dmn%dsec' % (elapsed / 60, elapsed % 60)
+ elif 3600 <= elapsed < 86400:
+ elapsed_str = '%dh%dmn' % (elapsed / 3600, (elapsed % 3600) / 60)
+ elif elapsed >= 86400:
+ elapsed_str = '%dd%dh' % (elapsed / 86400, (elapsed % 86400) / 3600)
+ stats['ElapsedTime'] = elapsed_str
+
+ l = []
+ for ev, value in sorted(stats.items(), key=lambda x: x[0]):
+ l.append(' %s=%s' % (output_format.field_name(ev),
+ output_format.field_value(value)))
+ s = '<%s%s >' % (output_format.class_name(self.__class__.__name__),
+ ''.join(l))
+ return s
+
+ def dump(self, filename):
+ """
+ Dumps statistics.
+
+ @param filename: filename where stats will be dumped, filename is
+ created and must not exist prior to this call.
+ @type filename: string
+ """
+ flags = os.O_WRONLY|os.O_CREAT|os.O_NOFOLLOW|os.O_EXCL
+ fd = os.open(filename, flags, 0600)
+ os.write(fd, str(self))
+ os.close(fd)
+
+ def __str__(self, scale=45):
+ stats = self._stats_copy()
+ if not stats:
+ return ''
+
+ m = max(stats.values())
+ unity = float(scale) / m
+ fmt = '%%-26s%%-%ds%%s' % (len(output_format.field_value('@' * scale))
+ + 1)
+ def func(x):
+ return fmt % (output_format.field_name(x[0]),
+ output_format.field_value('@' * int(x[1] * unity)),
+ output_format.simple('%d' % x[1], 'yellow'))
+ s = '\n'.join(map(func, sorted(stats.items(), key=lambda x: x[0])))
+ return s
+
+
+class NotifierError(PyinotifyError):
+ """
+ Notifier Exception. Raised on Notifier error.
+
+ """
+ def __init__(self, err):
+ """
+ @param err: Exception string's description.
+ @type err: string
+ """
+ PyinotifyError.__init__(self, err)
+
+
+class Notifier:
+ """
+ Read notifications, process events.
+
+ """
+ def __init__(self, watch_manager, default_proc_fun=None, read_freq=0,
+ threshold=0, timeout=None):
+ """
+ Initialization. read_freq, threshold and timeout parameters are used
+ when looping.
+
+ @param watch_manager: Watch Manager.
+ @type watch_manager: WatchManager instance
+ @param default_proc_fun: Default processing method. If None, a new
+ instance of PrintAllEvents will be assigned.
+ @type default_proc_fun: instance of ProcessEvent
+ @param read_freq: if read_freq == 0, events are read asap,
+ if read_freq is > 0, this thread sleeps
+ max(0, read_freq - timeout) seconds. But if
+ timeout is None it may be different because
+ poll is blocking waiting for something to read.
+ @type read_freq: int
+ @param threshold: File descriptor will be read only if the accumulated
+ size to read becomes >= threshold. If != 0, you likely
+ want to use it in combination with an appropriate
+ value for read_freq because without that you would
+ keep looping without really reading anything and that
+ until the amount of events to read is >= threshold.
+ At least with read_freq set you might sleep.
+ @type threshold: int
+ @param timeout:
+ https://docs.python.org/3/library/select.html#polling-objects
+ @type timeout: int
+ """
+ # Watch Manager instance
+ self._watch_manager = watch_manager
+ # File descriptor
+ self._fd = self._watch_manager.get_fd()
+ # Poll object and registration
+ self._pollobj = select.poll()
+ self._pollobj.register(self._fd, select.POLLIN)
+ # This pipe is correctely initialized and used by ThreadedNotifier
+ self._pipe = (-1, -1)
+ # Event queue
+ self._eventq = deque()
+ # System processing functor, common to all events
+ self._sys_proc_fun = _SysProcessEvent(self._watch_manager, self)
+ # Default processing method
+ self._default_proc_fun = default_proc_fun
+ if default_proc_fun is None:
+ self._default_proc_fun = PrintAllEvents()
+ # Loop parameters
+ self._read_freq = read_freq
+ self._threshold = threshold
+ self._timeout = timeout
+ # Coalesce events option
+ self._coalesce = False
+ # set of str(raw_event), only used when coalesce option is True
+ self._eventset = set()
+
+ def append_event(self, event):
+ """
+ Append a raw event to the event queue.
+
+ @param event: An event.
+ @type event: _RawEvent instance.
+ """
+ self._eventq.append(event)
+
+ def proc_fun(self):
+ return self._default_proc_fun
+
+ def coalesce_events(self, coalesce=True):
+ """
+ Coalescing events. Events are usually processed by batchs, their size
+ depend on various factors. Thus, before processing them, events received
+ from inotify are aggregated in a fifo queue. If this coalescing
+ option is enabled events are filtered based on their unicity, only
+ unique events are enqueued, doublons are discarded. An event is unique
+ when the combination of its fields (wd, mask, cookie, name) is unique
+ among events of a same batch. After a batch of events is processed any
+ events is accepted again. By default this option is disabled, you have
+ to explictly call this function to turn it on.
+
+ @param coalesce: Optional new coalescing value. True by default.
+ @type coalesce: Bool
+ """
+ self._coalesce = coalesce
+ if not coalesce:
+ self._eventset.clear()
+
+ def check_events(self, timeout=None):
+ """
+ Check for new events available to read, blocks up to timeout
+ milliseconds.
+
+ @param timeout: If specified it overrides the corresponding instance
+ attribute _timeout.
+ @type timeout: int
+
+ @return: New events to read.
+ @rtype: bool
+ """
+ while True:
+ try:
+ # blocks up to 'timeout' milliseconds
+ if timeout is None:
+ timeout = self._timeout
+ ret = self._pollobj.poll(timeout)
+ except select.error, err:
+ if err[0] == errno.EINTR:
+ continue # interrupted, retry
+ else:
+ raise
+ else:
+ break
+
+ if not ret or (self._pipe[0] == ret[0][0]):
+ return False
+ # only one fd is polled
+ return ret[0][1] & select.POLLIN
+
+ def read_events(self):
+ """
+ Read events from device, build _RawEvents, and enqueue them.
+ """
+ buf_ = array.array('i', [0])
+ # get event queue size
+ if fcntl.ioctl(self._fd, termios.FIONREAD, buf_, 1) == -1:
+ return
+ queue_size = buf_[0]
+ if queue_size < self._threshold:
+ log.debug('(fd: %d) %d bytes available to read but threshold is '
+ 'fixed to %d bytes', self._fd, queue_size,
+ self._threshold)
+ return
+
+ try:
+ # Read content from file
+ r = os.read(self._fd, queue_size)
+ except Exception, msg:
+ raise NotifierError(msg)
+ log.debug('Event queue size: %d', queue_size)
+ rsum = 0 # counter
+ while rsum < queue_size:
+ s_size = 16
+ # Retrieve wd, mask, cookie and fname_len
+ wd, mask, cookie, fname_len = struct.unpack('iIII',
+ r[rsum:rsum+s_size])
+ # Retrieve name
+ fname, = struct.unpack('%ds' % fname_len,
+ r[rsum + s_size:rsum + s_size + fname_len])
+ rawevent = _RawEvent(wd, mask, cookie, fname)
+ if self._coalesce:
+ # Only enqueue new (unique) events.
+ raweventstr = str(rawevent)
+ if raweventstr not in self._eventset:
+ self._eventset.add(raweventstr)
+ self._eventq.append(rawevent)
+ else:
+ self._eventq.append(rawevent)
+ rsum += s_size + fname_len
+
+ def process_events(self):
+ """
+ Routine for processing events from queue by calling their
+ associated proccessing method (an instance of ProcessEvent).
+ It also does internal processings, to keep the system updated.
+ """
+ while self._eventq:
+ raw_event = self._eventq.popleft() # pop next event
+ if self._watch_manager.ignore_events:
+ log.debug("Event ignored: %s" % repr(raw_event))
+ continue
+ watch_ = self._watch_manager.get_watch(raw_event.wd)
+ if (watch_ is None) and not (raw_event.mask & IN_Q_OVERFLOW):
+ if not (raw_event.mask & IN_IGNORED):
+ # Not really sure how we ended up here, nor how we should
+ # handle these types of events and if it is appropriate to
+ # completly skip them (like we are doing here).
+ log.warning("Unable to retrieve Watch object associated to %s",
+ repr(raw_event))
+ continue
+ revent = self._sys_proc_fun(raw_event) # system processings
+ if watch_ and watch_.proc_fun:
+ watch_.proc_fun(revent) # user processings
+ else:
+ self._default_proc_fun(revent)
+ self._sys_proc_fun.cleanup() # remove olds MOVED_* events records
+ if self._coalesce:
+ self._eventset.clear()
+
+ def __daemonize(self, pid_file=None, stdin=os.devnull, stdout=os.devnull,
+ stderr=os.devnull):
+ """
+ @param pid_file: file where the pid will be written. If pid_file=None
+ the pid is written to
+ /var/run/<sys.argv[0]|pyinotify>.pid, if pid_file=False
+ no pid_file is written.
+ @param stdin:
+ @param stdout:
+ @param stderr: files associated to common streams.
+ """
+ if pid_file is None:
+ dirname = '/var/run/'
+ basename = os.path.basename(sys.argv[0]) or 'pyinotify'
+ pid_file = os.path.join(dirname, basename + '.pid')
+
+ if pid_file != False and os.path.lexists(pid_file):
+ err = 'Cannot daemonize: pid file %s already exists.' % pid_file
+ raise NotifierError(err)
+
+ def fork_daemon():
+ # Adapted from Chad J. Schroeder's recipe
+ # @see http://code.activestate.com/recipes/278731/
+ pid = os.fork()
+ if (pid == 0):
+ # parent 2
+ os.setsid()
+ pid = os.fork()
+ if (pid == 0):
+ # child
+ os.chdir('/')
+ os.umask(022)
+ else:
+ # parent 2
+ os._exit(0)
+ else:
+ # parent 1
+ os._exit(0)
+
+ fd_inp = os.open(stdin, os.O_RDONLY)
+ os.dup2(fd_inp, 0)
+ fd_out = os.open(stdout, os.O_WRONLY|os.O_CREAT, 0600)
+ os.dup2(fd_out, 1)
+ fd_err = os.open(stderr, os.O_WRONLY|os.O_CREAT, 0600)
+ os.dup2(fd_err, 2)
+
+ # Detach task
+ fork_daemon()
+
+ # Write pid
+ if pid_file != False:
+ flags = os.O_WRONLY|os.O_CREAT|os.O_NOFOLLOW|os.O_EXCL
+ fd_pid = os.open(pid_file, flags, 0600)
+ os.write(fd_pid, str(os.getpid()) + '\n')
+ os.close(fd_pid)
+ # Register unlink function
+ atexit.register(lambda : os.unlink(pid_file))
+
+ def _sleep(self, ref_time):
+ # Only consider sleeping if read_freq is > 0
+ if self._read_freq > 0:
+ cur_time = time.time()
+ sleep_amount = self._read_freq - (cur_time - ref_time)
+ if sleep_amount > 0:
+ log.debug('Now sleeping %d seconds', sleep_amount)
+ time.sleep(sleep_amount)
+
+ def loop(self, callback=None, daemonize=False, **args):
+ """
+ Events are read only one time every min(read_freq, timeout)
+ seconds at best and only if the size to read is >= threshold.
+ After this method returns it must not be called again for the same
+ instance.
+
+ @param callback: Functor called after each event processing iteration.
+ Expects to receive the notifier object (self) as first
+ parameter. If this function returns True the loop is
+ immediately terminated otherwise the loop method keeps
+ looping.
+ @type callback: callable object or function
+ @param daemonize: This thread is daemonized if set to True.
+ @type daemonize: boolean
+ @param args: Optional and relevant only if daemonize is True. Remaining
+ keyworded arguments are directly passed to daemonize see
+ __daemonize() method. If pid_file=None or is set to a
+ pathname the caller must ensure the file does not exist
+ before this method is called otherwise an exception
+ pyinotify.NotifierError will be raised. If pid_file=False
+ it is still daemonized but the pid is not written in any
+ file.
+ @type args: various
+ """
+ if daemonize:
+ self.__daemonize(**args)
+
+ # Read and process events forever
+ while 1:
+ try:
+ self.process_events()
+ if (callback is not None) and (callback(self) is True):
+ break
+ ref_time = time.time()
+ # check_events is blocking
+ if self.check_events():
+ self._sleep(ref_time)
+ self.read_events()
+ except KeyboardInterrupt:
+ # Stop monitoring if sigint is caught (Control-C).
+ log.debug('Pyinotify stops monitoring.')
+ break
+ # Close internals
+ self.stop()
+
+ def stop(self):
+ """
+ Close inotify's instance (close its file descriptor).
+ It destroys all existing watches, pending events,...
+ This method is automatically called at the end of loop().
+ """
+ self._pollobj.unregister(self._fd)
+ os.close(self._fd)
+ self._sys_proc_fun = None
+
+
+class ThreadedNotifier(threading.Thread, Notifier):
+ """
+ This notifier inherits from threading.Thread for instanciating a separate
+ thread, and also inherits from Notifier, because it is a threaded notifier.
+
+ Note that every functionality provided by this class is also provided
+ through Notifier class. Moreover Notifier should be considered first because
+ it is not threaded and could be easily daemonized.
+ """
+ def __init__(self, watch_manager, default_proc_fun=None, read_freq=0,
+ threshold=0, timeout=None):
+ """
+ Initialization, initialize base classes. read_freq, threshold and
+ timeout parameters are used when looping.
+
+ @param watch_manager: Watch Manager.
+ @type watch_manager: WatchManager instance
+ @param default_proc_fun: Default processing method. See base class.
+ @type default_proc_fun: instance of ProcessEvent
+ @param read_freq: if read_freq == 0, events are read asap,
+ if read_freq is > 0, this thread sleeps
+ max(0, read_freq - timeout) seconds.
+ @type read_freq: int
+ @param threshold: File descriptor will be read only if the accumulated
+ size to read becomes >= threshold. If != 0, you likely
+ want to use it in combination with an appropriate
+ value set for read_freq because without that you would
+ keep looping without really reading anything and that
+ until the amount of events to read is >= threshold. At
+ least with read_freq you might sleep.
+ @type threshold: int
+ @param timeout:
+ https://docs.python.org/3/library/select.html#polling-objects
+ @type timeout: int
+ """
+ # Init threading base class
+ threading.Thread.__init__(self)
+ # Stop condition
+ self._stop_event = threading.Event()
+ # Init Notifier base class
+ Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
+ threshold, timeout)
+ # Create a new pipe used for thread termination
+ self._pipe = os.pipe()
+ self._pollobj.register(self._pipe[0], select.POLLIN)
+
+ def stop(self):
+ """
+ Stop notifier's loop. Stop notification. Join the thread.
+ """
+ self._stop_event.set()
+ os.write(self._pipe[1], 'stop')
+ threading.Thread.join(self)
+ Notifier.stop(self)
+ self._pollobj.unregister(self._pipe[0])
+ os.close(self._pipe[0])
+ os.close(self._pipe[1])
+
+ def loop(self):
+ """
+ Thread's main loop. Don't meant to be called by user directly.
+ Call inherited start() method instead.
+
+ Events are read only once time every min(read_freq, timeout)
+ seconds at best and only if the size of events to read is >= threshold.
+ """
+ # When the loop must be terminated .stop() is called, 'stop'
+ # is written to pipe fd so poll() returns and .check_events()
+ # returns False which make evaluate the While's stop condition
+ # ._stop_event.isSet() wich put an end to the thread's execution.
+ while not self._stop_event.isSet():
+ self.process_events()
+ ref_time = time.time()
+ if self.check_events():
+ self._sleep(ref_time)
+ self.read_events()
+
+ def run(self):
+ """
+ Start thread's loop: read and process events until the method
+ stop() is called.
+ Never call this method directly, instead call the start() method
+ inherited from threading.Thread, which then will call run() in
+ its turn.
+ """
+ self.loop()
+
+
+class AsyncNotifier(asyncore.file_dispatcher, Notifier):
+ """
+ This notifier inherits from asyncore.file_dispatcher in order to be able to
+ use pyinotify along with the asyncore framework.
+
+ """
+ def __init__(self, watch_manager, default_proc_fun=None, read_freq=0,
+ threshold=0, timeout=None, channel_map=None):
+ """
+ Initializes the async notifier. The only additional parameter is
+ 'channel_map' which is the optional asyncore private map. See
+ Notifier class for the meaning of the others parameters.
+
+ """
+ Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
+ threshold, timeout)
+ asyncore.file_dispatcher.__init__(self, self._fd, channel_map)
+
+ def handle_read(self):
+ """
+ When asyncore tells us we can read from the fd, we proceed processing
+ events. This method can be overridden for handling a notification
+ differently.
+
+ """
+ self.read_events()
+ self.process_events()
+
+
+class TornadoAsyncNotifier(Notifier):
+ """
+ Tornado ioloop adapter.
+
+ """
+ def __init__(self, watch_manager, ioloop, callback=None,
+ default_proc_fun=None, read_freq=0, threshold=0, timeout=None,
+ channel_map=None):
+ """
+ Note that if later you must call ioloop.close() be sure to let the
+ default parameter to all_fds=False.
+
+ See example tornado_notifier.py for an example using this notifier.
+
+ @param ioloop: Tornado's IO loop.
+ @type ioloop: tornado.ioloop.IOLoop instance.
+ @param callback: Functor called at the end of each call to handle_read
+ (IOLoop's read handler). Expects to receive the
+ notifier object (self) as single parameter.
+ @type callback: callable object or function
+ """
+ self.io_loop = ioloop
+ self.handle_read_callback = callback
+ Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
+ threshold, timeout)
+ ioloop.add_handler(self._fd, self.handle_read, ioloop.READ)
+
+ def stop(self):
+ self.io_loop.remove_handler(self._fd)
+ Notifier.stop(self)
+
+ def handle_read(self, *args, **kwargs):
+ """
+ See comment in AsyncNotifier.
+
+ """
+ self.read_events()
+ self.process_events()
+ if self.handle_read_callback is not None:
+ self.handle_read_callback(self)
+
+
+class AsyncioNotifier(Notifier):
+ """
+
+ asyncio/trollius event loop adapter.
+
+ """
+ def __init__(self, watch_manager, loop, callback=None,
+ default_proc_fun=None, read_freq=0, threshold=0, timeout=None):
+ """
+
+ See examples/asyncio_notifier.py for an example usage.
+
+ @param loop: asyncio or trollius event loop instance.
+ @type loop: asyncio.BaseEventLoop or trollius.BaseEventLoop instance.
+ @param callback: Functor called at the end of each call to handle_read.
+ Expects to receive the notifier object (self) as
+ single parameter.
+ @type callback: callable object or function
+
+ """
+ self.loop = loop
+ self.handle_read_callback = callback
+ Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
+ threshold, timeout)
+ loop.add_reader(self._fd, self.handle_read)
+
+ def stop(self):
+ self.loop.remove_reader(self._fd)
+ Notifier.stop(self)
+
+ def handle_read(self, *args, **kwargs):
+ self.read_events()
+ self.process_events()
+ if self.handle_read_callback is not None:
+ self.handle_read_callback(self)
+
+
+class Watch:
+ """
+ Represent a watch, i.e. a file or directory being watched.
+
+ """
+ __slots__ = ('wd', 'path', 'mask', 'proc_fun', 'auto_add',
+ 'exclude_filter', 'dir')
+
+ def __init__(self, wd, path, mask, proc_fun, auto_add, exclude_filter):
+ """
+ Initializations.
+
+ @param wd: Watch descriptor.
+ @type wd: int
+ @param path: Path of the file or directory being watched.
+ @type path: str
+ @param mask: Mask.
+ @type mask: int
+ @param proc_fun: Processing callable object.
+ @type proc_fun:
+ @param auto_add: Automatically add watches on new directories.
+ @type auto_add: bool
+ @param exclude_filter: Boolean function, used to exclude new
+ directories from being automatically watched.
+ See WatchManager.__init__
+ @type exclude_filter: callable object
+ """
+ self.wd = wd
+ self.path = path
+ self.mask = mask
+ self.proc_fun = proc_fun
+ self.auto_add = auto_add
+ self.exclude_filter = exclude_filter
+ self.dir = os.path.isdir(self.path)
+
+ def __repr__(self):
+ """
+ @return: String representation.
+ @rtype: str
+ """
+ s = ' '.join(['%s%s%s' % (output_format.field_name(attr),
+ output_format.punctuation('='),
+ output_format.field_value(getattr(self,
+ attr))) \
+ for attr in self.__slots__ if not attr.startswith('_')])
+
+ s = '%s%s %s %s' % (output_format.punctuation('<'),
+ output_format.class_name(self.__class__.__name__),
+ s,
+ output_format.punctuation('>'))
+ return s
+
+
+class ExcludeFilter:
+ """
+ ExcludeFilter is an exclusion filter.
+
+ """
+ def __init__(self, arg_lst):
+ """
+ Examples:
+ ef1 = ExcludeFilter(["/etc/rc.*", "/etc/hostname"])
+ ef2 = ExcludeFilter("/my/path/exclude.lst")
+ Where exclude.lst contains:
+ /etc/rc.*
+ /etc/hostname
+
+ Note: it is not possible to exclude a file if its encapsulating
+ directory is itself watched. See this issue for more details
+ https://github.com/seb-m/pyinotify/issues/31
+
+ @param arg_lst: is either a list of patterns or a filename from which
+ patterns will be loaded.
+ @type arg_lst: list of str or str
+ """
+ if isinstance(arg_lst, str):
+ lst = self._load_patterns_from_file(arg_lst)
+ elif isinstance(arg_lst, list):
+ lst = arg_lst
+ else:
+ raise TypeError
+
+ self._lregex = []
+ for regex in lst:
+ self._lregex.append(re.compile(regex, re.UNICODE))
+
+ def _load_patterns_from_file(self, filename):
+ lst = []
+ file_obj = file(filename, 'r')
+ try:
+ for line in file_obj.readlines():
+ # Trim leading an trailing whitespaces
+ pattern = line.strip()
+ if not pattern or pattern.startswith('#'):
+ continue
+ lst.append(pattern)
+ finally:
+ file_obj.close()
+ return lst
+
+ def _match(self, regex, path):
+ return regex.match(path) is not None
+
+ def __call__(self, path):
+ """
+ @param path: Path to match against provided regexps.
+ @type path: str
+ @return: Return True if path has been matched and should
+ be excluded, False otherwise.
+ @rtype: bool
+ """
+ for regex in self._lregex:
+ if self._match(regex, path):
+ return True
+ return False
+
+
+class WatchManagerError(Exception):
+ """
+ WatchManager Exception. Raised on error encountered on watches
+ operations.
+
+ """
+ def __init__(self, msg, wmd):
+ """
+ @param msg: Exception string's description.
+ @type msg: string
+ @param wmd: This dictionary contains the wd assigned to paths of the
+ same call for which watches were successfully added.
+ @type wmd: dict
+ """
+ self.wmd = wmd
+ Exception.__init__(self, msg)
+
+
+class WatchManager:
+ """
+ Provide operations for watching files and directories. Its internal
+ dictionary is used to reference watched items. When used inside
+ threaded code, one must instanciate as many WatchManager instances as
+ there are ThreadedNotifier instances.
+
+ """
+ def __init__(self, exclude_filter=lambda path: False):
+ """
+ Initialization: init inotify, init watch manager dictionary.
+ Raise OSError if initialization fails, raise InotifyBindingNotFoundError
+ if no inotify binding was found (through ctypes or from direct access to
+ syscalls).
+
+ @param exclude_filter: boolean function, returns True if current
+ path must be excluded from being watched.
+ Convenient for providing a common exclusion
+ filter for every call to add_watch.
+ @type exclude_filter: callable object
+ """
+ self._ignore_events = False
+ self._exclude_filter = exclude_filter
+ self._wmd = {} # watch dict key: watch descriptor, value: watch
+
+ self._inotify_wrapper = INotifyWrapper.create()
+ if self._inotify_wrapper is None:
+ raise InotifyBindingNotFoundError()
+
+ self._fd = self._inotify_wrapper.inotify_init() # file descriptor
+ if self._fd < 0:
+ err = 'Cannot initialize new instance of inotify, %s'
+ raise OSError(err % self._inotify_wrapper.str_errno())
+
+ def close(self):
+ """
+ Close inotify's file descriptor, this action will also automatically
+ remove (i.e. stop watching) all its associated watch descriptors.
+ After a call to this method the WatchManager's instance become useless
+ and cannot be reused, a new instance must then be instanciated. It
+ makes sense to call this method in few situations for instance if
+ several independant WatchManager must be instanciated or if all watches
+ must be removed and no other watches need to be added.
+ """
+ os.close(self._fd)
+
+ def get_fd(self):
+ """
+ Return assigned inotify's file descriptor.
+
+ @return: File descriptor.
+ @rtype: int
+ """
+ return self._fd
+
+ def get_watch(self, wd):
+ """
+ Get watch from provided watch descriptor wd.
+
+ @param wd: Watch descriptor.
+ @type wd: int
+ """
+ return self._wmd.get(wd)
+
+ def del_watch(self, wd):
+ """
+ Remove watch entry associated to watch descriptor wd.
+
+ @param wd: Watch descriptor.
+ @type wd: int
+ """
+ try:
+ del self._wmd[wd]
+ except KeyError, err:
+ log.error('Cannot delete unknown watch descriptor %s' % str(err))
+
+ @property
+ def watches(self):
+ """
+ Get a reference on the internal watch manager dictionary.
+
+ @return: Internal watch manager dictionary.
+ @rtype: dict
+ """
+ return self._wmd
+
+ def __format_path(self, path):
+ """
+ Format path to its internal (stored in watch manager) representation.
+ """
+ # Unicode strings are converted back to strings, because it seems
+ # that inotify_add_watch from ctypes does not work well when
+ # it receives an ctypes.create_unicode_buffer instance as argument.
+ # Therefore even wd are indexed with bytes string and not with
+ # unicode paths.
+ if isinstance(path, unicode):
+ path = path.encode(sys.getfilesystemencoding())
+ return os.path.normpath(path)
+
+ def __add_watch(self, path, mask, proc_fun, auto_add, exclude_filter):
+ """
+ Add a watch on path, build a Watch object and insert it in the
+ watch manager dictionary. Return the wd value.
+ """
+ path = self.__format_path(path)
+ if auto_add and not mask & IN_CREATE:
+ mask |= IN_CREATE
+ wd = self._inotify_wrapper.inotify_add_watch(self._fd, path, mask)
+ if wd < 0:
+ return wd
+ watch = Watch(wd=wd, path=path, mask=mask, proc_fun=proc_fun,
+ auto_add=auto_add, exclude_filter=exclude_filter)
+ self._wmd[wd] = watch
+ log.debug('New %s', watch)
+ return wd
+
+ def __glob(self, path, do_glob):
+ if do_glob:
+ return glob(path)
+ else:
+ return [path]
+
+ def add_watch(self, path, mask, proc_fun=None, rec=False,
+ auto_add=False, do_glob=False, quiet=True,
+ exclude_filter=None):
+ """
+ Add watch(s) on the provided |path|(s) with associated |mask| flag
+ value and optionally with a processing |proc_fun| function and
+ recursive flag |rec| set to True.
+ Ideally |path| components should not be unicode objects. Note that
+ although unicode paths are accepted there are converted to byte
+ strings before a watch is put on that path. The encoding used for
+ converting the unicode object is given by sys.getfilesystemencoding().
+ If |path| si already watched it is ignored, but if it is called with
+ option rec=True a watch is put on each one of its not-watched
+ subdirectory.
+
+ @param path: Path to watch, the path can either be a file or a
+ directory. Also accepts a sequence (list) of paths.
+ @type path: string or list of strings
+ @param mask: Bitmask of events.
+ @type mask: int
+ @param proc_fun: Processing object.
+ @type proc_fun: function or ProcessEvent instance or instance of
+ one of its subclasses or callable object.
+ @param rec: Recursively add watches from path on all its
+ subdirectories, set to False by default (doesn't
+ follows symlinks in any case).
+ @type rec: bool
+ @param auto_add: Automatically add watches on newly created
+ directories in watched parent |path| directory.
+ If |auto_add| is True, IN_CREATE is ored with |mask|
+ when the watch is added.
+ @type auto_add: bool
+ @param do_glob: Do globbing on pathname (see standard globbing
+ module for more informations).
+ @type do_glob: bool
+ @param quiet: if False raises a WatchManagerError exception on
+ error. See example not_quiet.py.
+ @type quiet: bool
+ @param exclude_filter: predicate (boolean function), which returns
+ True if the current path must be excluded
+ from being watched. This argument has
+ precedence over exclude_filter passed to
+ the class' constructor.
+ @type exclude_filter: callable object
+ @return: dict of paths associated to watch descriptors. A wd value
+ is positive if the watch was added sucessfully,
+ otherwise the value is negative. If the path was invalid
+ or was already watched it is not included into this returned
+ dictionary.
+ @rtype: dict of {str: int}
+ """
+ ret_ = {} # return {path: wd, ...}
+
+ if exclude_filter is None:
+ exclude_filter = self._exclude_filter
+
+ # normalize args as list elements
+ for npath in self.__format_param(path):
+ # unix pathname pattern expansion
+ for apath in self.__glob(npath, do_glob):
+ # recursively list subdirs according to rec param
+ for rpath in self.__walk_rec(apath, rec):
+ if not exclude_filter(rpath):
+ wd = ret_[rpath] = self.__add_watch(rpath, mask,
+ proc_fun,
+ auto_add,
+ exclude_filter)
+ if wd < 0:
+ err = ('add_watch: cannot watch %s WD=%d, %s' % \
+ (rpath, wd,
+ self._inotify_wrapper.str_errno()))
+ if quiet:
+ log.error(err)
+ else:
+ raise WatchManagerError(err, ret_)
+ else:
+ # Let's say -2 means 'explicitely excluded
+ # from watching'.
+ ret_[rpath] = -2
+ return ret_
+
+ def __get_sub_rec(self, lpath):
+ """
+ Get every wd from self._wmd if its path is under the path of
+ one (at least) of those in lpath. Doesn't follow symlinks.
+
+ @param lpath: list of watch descriptor
+ @type lpath: list of int
+ @return: list of watch descriptor
+ @rtype: list of int
+ """
+ for d in lpath:
+ root = self.get_path(d)
+ if root is not None:
+ # always keep root
+ yield d
+ else:
+ # if invalid
+ continue
+
+ # nothing else to expect
+ if not os.path.isdir(root):
+ continue
+
+ # normalization
+ root = os.path.normpath(root)
+ # recursion
+ lend = len(root)
+ for iwd in self._wmd.items():
+ cur = iwd[1].path
+ pref = os.path.commonprefix([root, cur])
+ if root == os.sep or (len(pref) == lend and \
+ len(cur) > lend and \
+ cur[lend] == os.sep):
+ yield iwd[1].wd
+
+ def update_watch(self, wd, mask=None, proc_fun=None, rec=False,
+ auto_add=False, quiet=True):
+ """
+ Update existing watch descriptors |wd|. The |mask| value, the
+ processing object |proc_fun|, the recursive param |rec| and the
+ |auto_add| and |quiet| flags can all be updated.
+
+ @param wd: Watch Descriptor to update. Also accepts a list of
+ watch descriptors.
+ @type wd: int or list of int
+ @param mask: Optional new bitmask of events.
+ @type mask: int
+ @param proc_fun: Optional new processing function.
+ @type proc_fun: function or ProcessEvent instance or instance of
+ one of its subclasses or callable object.
+ @param rec: Optionally adds watches recursively on all
+ subdirectories contained into |wd| directory.
+ @type rec: bool
+ @param auto_add: Automatically adds watches on newly created
+ directories in the watch's path corresponding to |wd|.
+ If |auto_add| is True, IN_CREATE is ored with |mask|
+ when the watch is updated.
+ @type auto_add: bool
+ @param quiet: If False raises a WatchManagerError exception on
+ error. See example not_quiet.py
+ @type quiet: bool
+ @return: dict of watch descriptors associated to booleans values.
+ True if the corresponding wd has been successfully
+ updated, False otherwise.
+ @rtype: dict of {int: bool}
+ """
+ lwd = self.__format_param(wd)
+ if rec:
+ lwd = self.__get_sub_rec(lwd)
+
+ ret_ = {} # return {wd: bool, ...}
+ for awd in lwd:
+ apath = self.get_path(awd)
+ if not apath or awd < 0:
+ err = 'update_watch: invalid WD=%d' % awd
+ if quiet:
+ log.error(err)
+ continue
+ raise WatchManagerError(err, ret_)
+
+ if mask:
+ wd_ = self._inotify_wrapper.inotify_add_watch(self._fd, apath,
+ mask)
+ if wd_ < 0:
+ ret_[awd] = False
+ err = ('update_watch: cannot update %s WD=%d, %s' % \
+ (apath, wd_, self._inotify_wrapper.str_errno()))
+ if quiet:
+ log.error(err)
+ continue
+ raise WatchManagerError(err, ret_)
+
+ assert(awd == wd_)
+
+ if proc_fun or auto_add:
+ watch_ = self._wmd[awd]
+
+ if proc_fun:
+ watch_.proc_fun = proc_fun
+
+ if auto_add:
+ watch_.auto_add = auto_add
+
+ ret_[awd] = True
+ log.debug('Updated watch - %s', self._wmd[awd])
+ return ret_
+
+ def __format_param(self, param):
+ """
+ @param param: Parameter.
+ @type param: string or int
+ @return: wrap param.
+ @rtype: list of type(param)
+ """
+ if isinstance(param, list):
+ for p_ in param:
+ yield p_
+ else:
+ yield param
+
+ def get_wd(self, path):
+ """
+ Returns the watch descriptor associated to path. This method
+ presents a prohibitive cost, always prefer to keep the WD
+ returned by add_watch(). If the path is unknown it returns None.
+
+ @param path: Path.
+ @type path: str
+ @return: WD or None.
+ @rtype: int or None
+ """
+ path = self.__format_path(path)
+ for iwd in self._wmd.items():
+ if iwd[1].path == path:
+ return iwd[0]
+
+ def get_path(self, wd):
+ """
+ Returns the path associated to WD, if WD is unknown it returns None.
+
+ @param wd: Watch descriptor.
+ @type wd: int
+ @return: Path or None.
+ @rtype: string or None
+ """
+ watch_ = self._wmd.get(wd)
+ if watch_ is not None:
+ return watch_.path
+
+ def __walk_rec(self, top, rec):
+ """
+ Yields each subdirectories of top, doesn't follow symlinks.
+ If rec is false, only yield top.
+
+ @param top: root directory.
+ @type top: string
+ @param rec: recursive flag.
+ @type rec: bool
+ @return: path of one subdirectory.
+ @rtype: string
+ """
+ if not rec or os.path.islink(top) or not os.path.isdir(top):
+ yield top
+ else:
+ for root, dirs, files in os.walk(top):
+ yield root
+
+ def rm_watch(self, wd, rec=False, quiet=True):
+ """
+ Removes watch(s).
+
+ @param wd: Watch Descriptor of the file or directory to unwatch.
+ Also accepts a list of WDs.
+ @type wd: int or list of int.
+ @param rec: Recursively removes watches on every already watched
+ subdirectories and subfiles.
+ @type rec: bool
+ @param quiet: If False raises a WatchManagerError exception on
+ error. See example not_quiet.py
+ @type quiet: bool
+ @return: dict of watch descriptors associated to booleans values.
+ True if the corresponding wd has been successfully
+ removed, False otherwise.
+ @rtype: dict of {int: bool}
+ """
+ lwd = self.__format_param(wd)
+ if rec:
+ lwd = self.__get_sub_rec(lwd)
+
+ ret_ = {} # return {wd: bool, ...}
+ for awd in lwd:
+ # remove watch
+ wd_ = self._inotify_wrapper.inotify_rm_watch(self._fd, awd)
+ if wd_ < 0:
+ ret_[awd] = False
+ err = ('rm_watch: cannot remove WD=%d, %s' % \
+ (awd, self._inotify_wrapper.str_errno()))
+ if quiet:
+ log.error(err)
+ continue
+ raise WatchManagerError(err, ret_)
+
+ # Remove watch from our dictionary
+ if awd in self._wmd:
+ del self._wmd[awd]
+ ret_[awd] = True
+ log.debug('Watch WD=%d (%s) removed', awd, self.get_path(awd))
+ return ret_
+
+
+ def watch_transient_file(self, filename, mask, proc_class):
+ """
+ Watch a transient file, which will be created and deleted frequently
+ over time (e.g. pid file).
+
+ @attention: Currently under the call to this function it is not
+ possible to correctly watch the events triggered into the same
+ base directory than the directory where is located this watched
+ transient file. For instance it would be wrong to make these
+ two successive calls: wm.watch_transient_file('/var/run/foo.pid', ...)
+ and wm.add_watch('/var/run/', ...)
+
+ @param filename: Filename.
+ @type filename: string
+ @param mask: Bitmask of events, should contain IN_CREATE and IN_DELETE.
+ @type mask: int
+ @param proc_class: ProcessEvent (or of one of its subclass), beware of
+ accepting a ProcessEvent's instance as argument into
+ __init__, see transient_file.py example for more
+ details.
+ @type proc_class: ProcessEvent's instance or of one of its subclasses.
+ @return: Same as add_watch().
+ @rtype: Same as add_watch().
+ """
+ dirname = os.path.dirname(filename)
+ if dirname == '':
+ return {} # Maintains coherence with add_watch()
+ basename = os.path.basename(filename)
+ # Assuming we are watching at least for IN_CREATE and IN_DELETE
+ mask |= IN_CREATE | IN_DELETE
+
+ def cmp_name(event):
+ if getattr(event, 'name') is None:
+ return False
+ return basename == event.name
+ return self.add_watch(dirname, mask,
+ proc_fun=proc_class(ChainIfTrue(func=cmp_name)),
+ rec=False,
+ auto_add=False, do_glob=False,
+ exclude_filter=lambda path: False)
+
+ def get_ignore_events(self):
+ return self._ignore_events
+
+ def set_ignore_events(self, nval):
+ self._ignore_events = nval
+
+ ignore_events = property(get_ignore_events, set_ignore_events,
+ "Make watch manager ignoring new events.")
+
+
+
+class RawOutputFormat:
+ """
+ Format string representations.
+ """
+ def __init__(self, format=None):
+ self.format = format or {}
+
+ def simple(self, s, attribute):
+ if not isinstance(s, str):
+ s = str(s)
+ return (self.format.get(attribute, '') + s +
+ self.format.get('normal', ''))
+
+ def punctuation(self, s):
+ """Punctuation color."""
+ return self.simple(s, 'normal')
+
+ def field_value(self, s):
+ """Field value color."""
+ return self.simple(s, 'purple')
+
+ def field_name(self, s):
+ """Field name color."""
+ return self.simple(s, 'blue')
+
+ def class_name(self, s):
+ """Class name color."""
+ return self.format.get('red', '') + self.simple(s, 'bold')
+
+output_format = RawOutputFormat()
+
+class ColoredOutputFormat(RawOutputFormat):
+ """
+ Format colored string representations.
+ """
+ def __init__(self):
+ f = {'normal': '\033[0m',
+ 'black': '\033[30m',
+ 'red': '\033[31m',
+ 'green': '\033[32m',
+ 'yellow': '\033[33m',
+ 'blue': '\033[34m',
+ 'purple': '\033[35m',
+ 'cyan': '\033[36m',
+ 'bold': '\033[1m',
+ 'uline': '\033[4m',
+ 'blink': '\033[5m',
+ 'invert': '\033[7m'}
+ RawOutputFormat.__init__(self, f)
+
+
+def compatibility_mode():
+ """
+ Use this function to turn on the compatibility mode. The compatibility
+ mode is used to improve compatibility with Pyinotify 0.7.1 (or older)
+ programs. The compatibility mode provides additional variables 'is_dir',
+ 'event_name', 'EventsCodes.IN_*' and 'EventsCodes.ALL_EVENTS' as
+ Pyinotify 0.7.1 provided. Do not call this function from new programs!!
+ Especially if there are developped for Pyinotify >= 0.8.x.
+ """
+ setattr(EventsCodes, 'ALL_EVENTS', ALL_EVENTS)
+ for evname in globals():
+ if evname.startswith('IN_'):
+ setattr(EventsCodes, evname, globals()[evname])
+ global COMPATIBILITY_MODE
+ COMPATIBILITY_MODE = True
+
+
+def command_line():
+ """
+ By default the watched path is '/tmp' and all types of events are
+ monitored. Events monitoring serves forever, type c^c to stop it.
+ """
+ from optparse import OptionParser
+
+ usage = "usage: %prog [options] [path1] [path2] [pathn]"
+
+ parser = OptionParser(usage=usage)
+ parser.add_option("-v", "--verbose", action="store_true",
+ dest="verbose", help="Verbose mode")
+ parser.add_option("-r", "--recursive", action="store_true",
+ dest="recursive",
+ help="Add watches recursively on paths")
+ parser.add_option("-a", "--auto_add", action="store_true",
+ dest="auto_add",
+ help="Automatically add watches on new directories")
+ parser.add_option("-g", "--glob", action="store_true",
+ dest="glob",
+ help="Treat paths as globs")
+ parser.add_option("-e", "--events-list", metavar="EVENT[,...]",
+ dest="events_list",
+ help=("A comma-separated list of events to watch for - "
+ "see the documentation for valid options (defaults"
+ " to everything)"))
+ parser.add_option("-s", "--stats", action="store_true",
+ dest="stats",
+ help="Display dummy statistics")
+ parser.add_option("-V", "--version", action="store_true",
+ dest="version", help="Pyinotify version")
+ parser.add_option("-f", "--raw-format", action="store_true",
+ dest="raw_format",
+ help="Disable enhanced output format.")
+ parser.add_option("-c", "--command", action="store",
+ dest="command",
+ help="Shell command to run upon event")
+
+ (options, args) = parser.parse_args()
+
+ if options.verbose:
+ log.setLevel(10)
+
+ if options.version:
+ print(__version__)
+
+ if not options.raw_format:
+ global output_format
+ output_format = ColoredOutputFormat()
+
+ if len(args) < 1:
+ path = '/tmp' # default watched path
+ else:
+ path = args
+
+ # watch manager instance
+ wm = WatchManager()
+ # notifier instance and init
+ if options.stats:
+ notifier = Notifier(wm, default_proc_fun=Stats(), read_freq=5)
+ else:
+ notifier = Notifier(wm, default_proc_fun=PrintAllEvents())
+
+ # What mask to apply
+ mask = 0
+ if options.events_list:
+ events_list = options.events_list.split(',')
+ for ev in events_list:
+ evcode = EventsCodes.ALL_FLAGS.get(ev, 0)
+ if evcode:
+ mask |= evcode
+ else:
+ parser.error("The event '%s' specified with option -e"
+ " is not valid" % ev)
+ else:
+ mask = ALL_EVENTS
+
+ # stats
+ cb_fun = None
+ if options.stats:
+ def cb(s):
+ sys.stdout.write(repr(s.proc_fun()))
+ sys.stdout.write('\n')
+ sys.stdout.write(str(s.proc_fun()))
+ sys.stdout.write('\n')
+ sys.stdout.flush()
+ cb_fun = cb
+
+ # External command
+ if options.command:
+ def cb(s):
+ subprocess.Popen(options.command, shell=True)
+ cb_fun = cb
+
+ log.debug('Start monitoring %s, (press c^c to halt pyinotify)' % path)
+
+ wm.add_watch(path, mask, rec=options.recursive, auto_add=options.auto_add, do_glob=options.glob)
+ # Loop forever (until sigint signal get caught)
+ notifier.loop(callback=cb_fun)
+
+
+if __name__ == '__main__':
+ command_line()
diff --git a/bitbake/lib/toaster/bldcontrol/admin.py b/bitbake/lib/toaster/bldcontrol/admin.py
new file mode 100644
index 0000000000..fcbe5f5935
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/admin.py
@@ -0,0 +1,8 @@
+from django.contrib import admin
+from django.contrib.admin.filters import RelatedFieldListFilter
+from .models import BuildEnvironment
+
+class BuildEnvironmentAdmin(admin.ModelAdmin):
+ pass
+
+admin.site.register(BuildEnvironment, BuildEnvironmentAdmin)
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index d2b2a236bd..cf3f1fde75 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -25,11 +25,7 @@ import sys
import re
from django.db import transaction
from django.db.models import Q
-from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget
-import subprocess
-
-from toastermain import settings
-
+from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
# load Bitbake components
path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
@@ -72,6 +68,10 @@ def getBuildEnvironmentController(**kwargs):
The return object MUST always be a BuildEnvironmentController.
"""
+
+ from localhostbecontroller import LocalhostBEController
+ from sshbecontroller import SSHBEController
+
be = BuildEnvironment.objects.filter(Q(**kwargs))[0]
if be.betype == BuildEnvironment.TYPE_LOCAL:
return LocalhostBEController(be)
@@ -81,6 +81,18 @@ def getBuildEnvironmentController(**kwargs):
raise Exception("FIXME: Implement BEC for type %s" % str(be.betype))
+def _get_git_clonedirectory(url, branch):
+ """ Utility that returns the last component of a git path as directory
+ """
+ import re
+ components = re.split(r'[:\.\/]', url)
+ base = components[-2] if components[-1] == "git" else components[-1]
+
+ if branch != "HEAD":
+ return "_%s_%s.toaster_cloned" % (base, branch)
+
+ return base
+
class BuildEnvironmentController(object):
""" BuildEnvironmentController (BEC) is the abstract class that defines the operations that MUST
@@ -110,24 +122,53 @@ class BuildEnvironmentController(object):
self.be = be
self.connection = None
+ @staticmethod
+ def _updateBBLayers(bblayerconf, layerlist):
+ conflines = open(bblayerconf, "r").readlines()
+
+ bblayerconffile = open(bblayerconf, "w")
+ skip = 0
+ for i in xrange(len(conflines)):
+ if skip > 0:
+ skip =- 1
+ continue
+ if conflines[i].startswith("# line added by toaster"):
+ skip = 1
+ else:
+ bblayerconffile.write(conflines[i])
+
+ bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"")
+ bblayerconffile.close()
+
+
+ def writeConfFile(self, variable_list = None, raw = None):
+ """ Writes a configuration file in the build directory. Override with buildenv-specific implementation. """
+ raise Exception("FIXME: Must override to actually write a configuration file")
+
+
def startBBServer(self):
""" Starts a BB server with Toaster toasterui set up to record the builds, an no controlling UI.
After this method executes, self.be bbaddress/bbport MUST point to a running and free server,
and the bbstate MUST be updated to "started".
"""
- raise Exception("Must override in order to actually start the BB server")
+ raise Exception("FIXME: Must override in order to actually start the BB server")
def stopBBServer(self):
""" Stops the currently running BB server.
The bbstate MUST be updated to "stopped".
self.connection must be none.
"""
+ raise Exception("FIXME: Must override stoBBServer")
- def setLayers(self,ls):
- """ Sets the layer variables in the config file, after validating local layer paths.
+ def setLayers(self, bbs, ls):
+ """ Checks-out bitbake executor and layers from git repositories.
+ Sets the layer variables in the config file, after validating local layer paths.
+ The bitbakes must be a 1-length list of BRBitbake
The layer paths must be in a list of BRLayer object
+
+ a word of attention: by convention, the first layer for any build will be poky!
"""
- raise Exception("Must override setLayers")
+ raise Exception("FIXME: Must override setLayers")
def getBBController(self):
@@ -165,75 +206,7 @@ class BuildEnvironmentController(object):
class ShellCmdException(Exception):
pass
-class LocalhostBEController(BuildEnvironmentController):
- """ Implementation of the BuildEnvironmentController for the localhost;
- this controller manages the default build directory,
- the server setup and system start and stop for the localhost-type build environment
- The address field is used as working directory; if not set, the build/ directory
- is created
- """
-
- def __init__(self, be):
- super(LocalhostBEController, self).__init__(be)
- from os.path import dirname as DN
- self.cwd = DN(DN(DN(DN(DN(os.path.realpath(__file__))))))
- if self.be.address is None or len(self.be.address) == 0:
- self.be.address = "build"
- self.be.save()
- self.bwd = self.be.address
- self.dburl = settings.getDATABASE_URL()
-
- # transform relative paths to absolute ones
- if not self.bwd.startswith("/"):
- self.bwd = os.path.join(self.cwd, self.bwd)
- self._createBE()
-
- def _shellcmd(self, command):
- p = subprocess.Popen(command, cwd=self.cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- (out,err) = p.communicate()
- if p.returncode:
- if len(err) == 0:
- err = "command: %s" % command
- else:
- err = "command: %s \n%s" % (command, err)
- raise ShellCmdException(err)
- else:
- return out
-
- def _createBE(self):
- assert self.cwd and os.path.exists(self.cwd)
- self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.cwd, self.bwd))
-
- def startBBServer(self):
- assert self.cwd and os.path.exists(self.cwd)
- print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && DATABASE_URL=%s source toaster start noweb && sleep 1\"" % (self.cwd, self.bwd, self.dburl))
- # FIXME unfortunate sleep 1 - we need to make sure that bbserver is started and the toaster ui is connected
- # but since they start async without any return, we just wait a bit
- print "Started server"
- assert self.cwd and os.path.exists(self.bwd)
- self.be.bbaddress = "localhost"
- self.be.bbport = "8200"
- self.be.bbstate = BuildEnvironment.SERVER_STARTED
- self.be.save()
-
- def stopBBServer(self):
- assert self.cwd
- print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
- (self.cwd, self.bwd, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
- self.be.bbstate = BuildEnvironment.SERVER_STOPPED
- self.be.save()
- print "Stopped server"
-
- def setLayers(self, layers):
- assert self.cwd is not None
- layerconf = os.path.join(self.bwd, "conf/bblayers.conf")
- if not os.path.exists(layerconf):
- raise Exception("BE is not consistent: bblayers.conf file missing at ", layerconf)
- return True
+class BuildSetupException(Exception):
+ pass
- def release(self):
- assert self.cwd and os.path.exists(self.bwd)
- import shutil
- shutil.rmtree(os.path.join(self.cwd, "build"))
- assert not os.path.exists(self.bwd)
diff --git a/bitbake/lib/toaster/bldcontrol/fixtures/initial_data.json b/bitbake/lib/toaster/bldcontrol/fixtures/initial_data.json
deleted file mode 100644
index b2f12b38ae..0000000000
--- a/bitbake/lib/toaster/bldcontrol/fixtures/initial_data.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"pk": 1, "model": "bldcontrol.buildenvironment", "fields": {"updated": "2014-05-20T12:17:30Z", "created": "2014-05-20T12:17:30Z", "lock": 0, "bbstate": 0, "bbaddress": "", "betype": 0, "bbtoken": "", "address": "", "bbport": -1}}]
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
new file mode 100644
index 0000000000..47708d169a
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -0,0 +1,275 @@
+#
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+import os
+import sys
+import re
+from django.db import transaction
+from django.db.models import Q
+from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
+import subprocess
+
+from toastermain import settings
+
+from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, _get_git_clonedirectory
+
+import logging
+logger = logging.getLogger("toaster")
+
+from pprint import pprint, pformat
+
+class LocalhostBEController(BuildEnvironmentController):
+ """ Implementation of the BuildEnvironmentController for the localhost;
+ this controller manages the default build directory,
+ the server setup and system start and stop for the localhost-type build environment
+
+ """
+
+ def __init__(self, be):
+ super(LocalhostBEController, self).__init__(be)
+ self.dburl = settings.getDATABASE_URL()
+ self.pokydirname = None
+ self.islayerset = False
+
+ def _shellcmd(self, command, cwd = None):
+ if cwd is None:
+ cwd = self.be.sourcedir
+
+ p = subprocess.Popen(command, cwd = cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (out,err) = p.communicate()
+ p.wait()
+ if p.returncode:
+ if len(err) == 0:
+ err = "command: %s \n%s" % (command, out)
+ else:
+ err = "command: %s \n%s" % (command, err)
+ #logger.debug("localhostbecontroller: shellcmd error %s" % err)
+ raise ShellCmdException(err)
+ else:
+ #logger.debug("localhostbecontroller: shellcmd success")
+ return out
+
+ def _createdirpath(self, path):
+ from os.path import dirname as DN
+ if path == "":
+ raise Exception("Invalid path creation specified.")
+ if not os.path.exists(DN(path)):
+ self._createdirpath(DN(path))
+ if not os.path.exists(path):
+ os.mkdir(path, 0755)
+
+ def _setupBE(self):
+ assert self.pokydirname and os.path.exists(self.pokydirname)
+ self._createdirpath(self.be.builddir)
+ self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
+
+
+ def writeConfFile(self, file_name, variable_list = None, raw = None):
+ filepath = os.path.join(self.be.builddir, file_name)
+ with open(filepath, "w") as conffile:
+ if variable_list is not None:
+ for i in variable_list:
+ conffile.write("%s=\"%s\"\n" % (i.name, i.value))
+ if raw is not None:
+ conffile.write(raw)
+
+
+ def startBBServer(self):
+ assert self.pokydirname and os.path.exists(self.pokydirname)
+ assert self.islayerset
+
+ # find our own toasterui listener/bitbake
+ from toaster.bldcontrol.management.commands.loadconf import _reduce_canon_path
+
+ own_bitbake = _reduce_canon_path(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../bin/bitbake"))
+
+ assert os.path.exists(own_bitbake) and os.path.isfile(own_bitbake)
+
+ logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake)
+
+ try:
+ os.remove(os.path.join(self.be.builddir, "toaster_ui.log"))
+ except OSError as e:
+ import errno
+ if e.errno != errno.ENOENT:
+ raise
+
+
+ cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir,
+ self.dburl, self.be.builddir, own_bitbake)
+ logger.debug("fullcommand |%s| " % cmd)
+ port = "-1"
+ for i in self._shellcmd(cmd).split("\n"):
+ if i.startswith("Bitbake server address"):
+ port = i.split(" ")[-1]
+ logger.debug("localhostbecontroller: Found bitbake server port %s" % port)
+
+ def _toaster_ui_started(filepath):
+ if not os.path.exists(filepath):
+ return False
+ with open(filepath, "r") as f:
+ for line in f:
+ if line.startswith("NOTE: ToasterUI waiting for events"):
+ return True
+ return False
+
+ while not _toaster_ui_started(os.path.join(self.be.builddir, "toaster_ui.log")):
+ import time
+ logger.debug("localhostbecontroller: Waiting bitbake server to start")
+ time.sleep(0.5)
+
+ logger.debug("localhostbecontroller: Started bitbake server")
+
+ while port == "-1":
+ # the port specification is "autodetect"; read the bitbake.lock file
+ with open("%s/bitbake.lock" % self.be.builddir, "r") as f:
+ for line in f.readlines():
+ if ":" in line:
+ port = line.split(":")[1].strip()
+ logger.debug("localhostbecontroller: Autodetected bitbake port %s", port)
+ break
+
+ assert self.be.sourcedir and os.path.exists(self.be.builddir)
+ self.be.bbaddress = "localhost"
+ self.be.bbport = port
+ self.be.bbstate = BuildEnvironment.SERVER_STARTED
+ self.be.save()
+
+ def stopBBServer(self):
+ assert self.pokydirname and os.path.exists(self.pokydirname)
+ assert self.islayerset
+ self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
+ (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
+ self.be.bbstate = BuildEnvironment.SERVER_STOPPED
+ self.be.save()
+ logger.debug("localhostbecontroller: Stopped bitbake server")
+
+ def setLayers(self, bitbakes, layers):
+ """ a word of attention: by convention, the first layer for any build will be poky! """
+
+ assert self.be.sourcedir is not None
+ assert len(bitbakes) == 1
+ # set layers in the layersource
+
+ # 1. get a list of repos with branches, and map dirpaths for each layer
+ gitrepos = {}
+
+ gitrepos[(bitbakes[0].giturl, bitbakes[0].commit)] = []
+ gitrepos[(bitbakes[0].giturl, bitbakes[0].commit)].append( ("bitbake", bitbakes[0].dirpath) )
+
+ for layer in layers:
+ # we don't process local URLs
+ if layer.giturl.startswith("file://"):
+ continue
+ if not (layer.giturl, layer.commit) in gitrepos:
+ gitrepos[(layer.giturl, layer.commit)] = []
+ gitrepos[(layer.giturl, layer.commit)].append( (layer.name, layer.dirpath) )
+
+
+ logger.debug("localhostbecontroller, our git repos are %s" % pformat(gitrepos))
+
+
+ # 2. find checked-out git repos in the sourcedir directory that may help faster cloning
+
+ cached_layers = {}
+ for ldir in os.listdir(self.be.sourcedir):
+ fldir = os.path.join(self.be.sourcedir, ldir)
+ if os.path.isdir(fldir):
+ try:
+ for line in self._shellcmd("git remote -v", fldir).split("\n"):
+ try:
+ remote = line.split("\t")[1].split(" ")[0]
+ if remote not in cached_layers:
+ cached_layers[remote] = fldir
+ except IndexError:
+ pass
+ except ShellCmdException:
+ # ignore any errors in collecting git remotes
+ pass
+
+ layerlist = []
+
+ # 3. checkout the repositories
+ for giturl, commit in gitrepos.keys():
+ localdirname = os.path.join(self.be.sourcedir, _get_git_clonedirectory(giturl, commit))
+ logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
+
+ # make sure our directory is a git repository
+ if os.path.exists(localdirname):
+ if not giturl in self._shellcmd("git remote -v", localdirname):
+ raise BuildSetupException("Existing git repository at %s, but with different remotes (not '%s'). Aborting." % (localdirname, giturl))
+ else:
+ if giturl in cached_layers:
+ logger.debug("localhostbecontroller git-copying %s to %s" % (cached_layers[giturl], localdirname))
+ self._shellcmd("git clone \"%s\" \"%s\"" % (cached_layers[giturl], localdirname))
+ self._shellcmd("git remote remove origin", localdirname)
+ self._shellcmd("git remote add origin \"%s\"" % giturl, localdirname)
+ else:
+ logger.debug("localhostbecontroller: cloning %s:%s in %s" % (giturl, commit, localdirname))
+ self._shellcmd("git clone \"%s\" --single-branch --branch \"%s\" \"%s\"" % (giturl, commit, localdirname))
+
+ # branch magic name "HEAD" will inhibit checkout
+ if commit != "HEAD":
+ logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname))
+ self._shellcmd("git fetch --all && git checkout \"%s\"" % commit , localdirname)
+
+ # take the localdirname as poky dir if we can find the oe-init-build-env
+ if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")):
+ logger.debug("localhostbecontroller: selected poky dir name %s" % localdirname)
+ self.pokydirname = localdirname
+
+ # make sure we have a working bitbake
+ if not os.path.exists(os.path.join(self.pokydirname, 'bitbake')):
+ logger.debug("localhostbecontroller: checking bitbake into the poky dirname %s " % self.pokydirname)
+ self._shellcmd("git clone -b \"%s\" \"%s\" \"%s\" " % (bitbakes[0].commit, bitbakes[0].giturl, os.path.join(self.pokydirname, 'bitbake')))
+
+ # verify our repositories
+ for name, dirpath in gitrepos[(giturl, commit)]:
+ localdirpath = os.path.join(localdirname, dirpath)
+ logger.debug("localhostbecontroller: localdirpath expected '%s'" % localdirpath)
+ if not os.path.exists(localdirpath):
+ raise BuildSetupException("Cannot find layer git path '%s' in checked out repository '%s:%s'. Aborting." % (localdirpath, giturl, commit))
+
+ if name != "bitbake":
+ layerlist.append(localdirpath.rstrip("/"))
+
+ logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
+
+ # 4. configure the build environment, so we have a conf/bblayers.conf
+ assert self.pokydirname is not None
+ self._setupBE()
+
+ # 5. update the bblayers.conf
+ bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
+ if not os.path.exists(bblayerconf):
+ raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
+
+ BuildEnvironmentController._updateBBLayers(bblayerconf, layerlist)
+
+ self.islayerset = True
+ return True
+
+ def release(self):
+ assert self.be.sourcedir and os.path.exists(self.be.builddir)
+ import shutil
+ shutil.rmtree(os.path.join(self.be.sourcedir, "build"))
+ assert not os.path.exists(self.be.builddir)
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
new file mode 100644
index 0000000000..cf3c3d7ecf
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -0,0 +1,157 @@
+from django.core.management.base import NoArgsCommand, CommandError
+from django.db import transaction
+from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException
+from bldcontrol.models import BuildRequest, BuildEnvironment, BRError
+from orm.models import ToasterSetting
+import os
+
+def DN(path):
+ if path is None:
+ return ""
+ else:
+ return os.path.dirname(path)
+
+
+class Command(NoArgsCommand):
+ args = ""
+ help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings."
+
+
+ def _find_first_path_for_file(self, startdirectory, filename, level = 0):
+ if level < 0:
+ return None
+ dirs = []
+ for i in os.listdir(startdirectory):
+ j = os.path.join(startdirectory, i)
+ if os.path.isfile(j):
+ if i == filename:
+ return startdirectory
+ elif os.path.isdir(j):
+ dirs.append(j)
+ for j in dirs:
+ ret = self._find_first_path_for_file(j, filename, level - 1)
+ if ret is not None:
+ return ret
+ return None
+
+ def _recursive_list_directories(self, startdirectory, level = 0):
+ if level < 0:
+ return []
+ dirs = []
+ try:
+ for i in os.listdir(startdirectory):
+ j = os.path.join(startdirectory, i)
+ if os.path.isdir(j):
+ dirs.append(j)
+ except OSError:
+ pass
+ for j in dirs:
+ dirs = dirs + self._recursive_list_directories(j, level - 1)
+ return dirs
+
+
+ def _get_suggested_sourcedir(self, be):
+ if be.betype != BuildEnvironment.TYPE_LOCAL:
+ return ""
+ return DN(DN(DN(self._find_first_path_for_file(self.guesspath, "toasterconf.json", 4))))
+
+ def _get_suggested_builddir(self, be):
+ if be.betype != BuildEnvironment.TYPE_LOCAL:
+ return ""
+ return DN(self._find_first_path_for_file(DN(self.guesspath), "bblayers.conf", 4))
+
+
+ def handle(self, **options):
+ self.guesspath = DN(DN(DN(DN(DN(DN(DN(__file__)))))))
+ # refuse to start if we have no build environments
+ while BuildEnvironment.objects.count() == 0:
+ print(" !! No build environments found. Toaster needs at least one build environment in order to be able to run builds.\n" +
+ "You can manually define build environments in the database table bldcontrol_buildenvironment.\n" +
+ "Or Toaster can define a simple localhost-based build environment for you.")
+
+ i = raw_input(" -- Do you want to create a basic localhost build environment ? (Y/n) ");
+ if not len(i) or i.startswith("y") or i.startswith("Y"):
+ BuildEnvironment.objects.create(pk = 1, betype = 0)
+ else:
+ raise Exception("Toaster cannot start without build environments. Aborting.")
+
+
+ # we make sure we have builddir and sourcedir for all defined build envionments
+ for be in BuildEnvironment.objects.all():
+ def _verify_be():
+ is_changed = False
+ print("Verifying the Build Environment. If the Build Environment is completly configured, you will be asked to configure it.")
+ if len(be.sourcedir) == 0:
+ suggesteddir = self._get_suggested_sourcedir(be)
+ if len(suggesteddir) > 0:
+ be.sourcedir = raw_input("\nToaster needs to know in which directory it should check out the layers that will be needed for your builds.\n Toaster suggests \"%s\". If you select this directory, a layer like \"meta-yocto\" will end up in \"%s/meta-yocto\".\n Press Enter to select \"%s\" or type the full path to a different directory: " % (suggesteddir, suggesteddir, suggesteddir))
+ else:
+ be.sourcedir = raw_input("\nToaster needs to know in which directory it should check out the layers that will be needed for your builds. Type the full path to the directory (for example: \"%s\": " % os.environment['HOME'])
+ if len(be.sourcedir) == 0 and len(suggesteddir) > 0:
+ be.sourcedir = suggesteddir
+ is_changed = True
+
+ if not be.sourcedir.startswith("/"):
+ be.sourcedir = raw_input(" Layer sources checkout directory must be an absolute path:")
+ is_changed = True
+
+ if len(be.builddir) == 0:
+ suggesteddir = self._get_suggested_builddir(be)
+ if len(suggesteddir) > 0:
+ be.builddir = raw_input("\nToaster needs to know where is your build directory.\n The build directory is where all the artifacts created by your builds will be stored. Toaster suggests \"%s\".\n Press Enter to select \"%s\" or type the full path to a different directory: " % (suggesteddir, suggesteddir))
+ else:
+ be.builddir = raw_input("\nToaster needs to know where is your build directory.\n The build directory is where all the artifacts created by your builds will be stored. Type the full path to the directory (for example: \" %s/build\")" % os.environment['HOME'])
+ if len(be.builddir) == 0 and len(suggesteddir) > 0:
+ be.builddir = suggesteddir
+ is_changed = True
+
+ if not be.builddir.startswith("/"):
+ be.builddir = raw_input(" Build directory must be an absolute path:")
+ is_changed = True
+
+
+ if is_changed:
+ print "Build configuration saved"
+ be.save()
+
+ if is_changed and be.betype == BuildEnvironment.TYPE_LOCAL:
+ print "\nToaster can use a SINGLE predefined configuration file to set up default project settings and layer information sources.\n Toaster will list now the configuration files that it found. Select Yes to use the desired configuration file."
+ for dirname in self._recursive_list_directories(be.sourcedir,2):
+ if os.path.exists(os.path.join(dirname, ".templateconf")):
+ import subprocess
+ conffilepath, error = subprocess.Popen('bash -c ". '+os.path.join(dirname, ".templateconf")+'; echo \"\$TEMPLATECONF\""', shell=True, stdout=subprocess.PIPE).communicate()
+ conffilepath = os.path.join(conffilepath.strip(), "toasterconf.json")
+ candidatefilepath = os.path.join(dirname, conffilepath)
+ if os.path.exists(candidatefilepath):
+ i = raw_input("\n Found an preset configuration file \"%s\".\n Do you want to use it? (y/N):" % candidatefilepath)
+ if len(i) and i.upper()[0] == 'Y':
+ from loadconf import Command as LoadConfigCommand
+
+ LoadConfigCommand()._import_layer_config(candidatefilepath)
+ # we run lsupdates after config update
+ print "Layer configuration imported. Updating information from the layer sources, please wait.\n You can re-update any time later by running bitbake/lib/toaster/manage.py lsupdates"
+ from django.core.management import call_command
+ call_command("lsupdates")
+
+ # we don't look for any other config files
+ return is_changed
+
+ return is_changed
+
+ while (_verify_be()):
+ pass
+
+ # verify that default settings are there
+ if ToasterSetting.objects.filter(name = 'DEFAULT_RELEASE').count() != 1:
+ ToasterSetting.objects.filter(name = 'DEFAULT_RELEASE').delete()
+ ToasterSetting.objects.get_or_create(name = 'DEFAULT_RELEASE', value = '')
+
+ # we are just starting up. we must not have any builds in progress, or build environments taken
+ for b in BuildRequest.objects.filter(state = BuildRequest.REQ_INPROGRESS):
+ BRError.objects.create(req = b, errtype = "toaster", errmsg = "Toaster found this build IN PROGRESS while Toaster started up. This is an inconsistent state, and the build was marked as failed")
+
+ BuildRequest.objects.filter(state = BuildRequest.REQ_INPROGRESS).update(state = BuildRequest.REQ_FAILED)
+
+ BuildEnvironment.objects.update(lock = BuildEnvironment.LOCK_FREE)
+
+ return 0
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py b/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
new file mode 100644
index 0000000000..e2f61e4cb4
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
@@ -0,0 +1,174 @@
+from django.core.management.base import BaseCommand, CommandError
+from orm.models import LayerSource, ToasterSetting, Branch, Layer, Layer_Version
+from orm.models import BitbakeVersion, Release, ReleaseDefaultLayer, ReleaseLayerSourcePriority
+import os
+
+from checksettings import DN
+
+def _reduce_canon_path(path):
+ components = []
+ for c in path.split("/"):
+ if c == "..":
+ del components[-1]
+ elif c == ".":
+ pass
+ else:
+ components.append(c)
+ if len(components) < 2:
+ components.append('')
+ return "/".join(components)
+
+def _get_id_for_sourcetype(s):
+ for i in LayerSource.SOURCE_TYPE:
+ if s == i[1]:
+ return i[0]
+ raise Exception("Could not find definition for sourcetype '%s'. Valid source types are %s" % (str(s), ', '.join(map(lambda x: "'%s'" % x[1], LayerSource.SOURCE_TYPE ))))
+
+class Command(BaseCommand):
+ help = "Loads a toasterconf.json file in the database"
+ args = "filepath"
+
+
+
+ def _import_layer_config(self, filepath):
+ if not os.path.exists(filepath) or not os.path.isfile(filepath):
+ raise Exception("Failed to find toaster config file %s ." % filepath)
+
+ import json, pprint
+ data = json.loads(open(filepath, "r").read())
+
+ # verify config file validity before updating settings
+ for i in ['bitbake', 'releases', 'defaultrelease', 'config', 'layersources']:
+ assert i in data
+
+ def _read_git_url_from_local_repository(address):
+ url = None
+ # we detect the remote name at runtime
+ import subprocess
+ (remote, remote_name) = address.split(":", 1)
+ cmd = subprocess.Popen("git remote -v", shell=True, cwd = os.path.dirname(filepath), stdout=subprocess.PIPE, stderr = subprocess.PIPE)
+ (out,err) = cmd.communicate()
+ if cmd.returncode != 0:
+ raise Exception("Error while importing layer vcs_url: git error: %s" % err)
+ for line in out.split("\n"):
+ try:
+ (name, path) = line.split("\t", 1)
+ if name == remote_name:
+ url = path.split(" ")[0]
+ break
+ except ValueError:
+ pass
+ if url == None:
+ raise Exception("Error while looking for remote \"%s\" in \"s\"" % (remote_name, lo.local_path))
+ return url
+
+
+ # import bitbake data
+ for bvi in data['bitbake']:
+ bvo, created = BitbakeVersion.objects.get_or_create(name=bvi['name'])
+ bvo.giturl = bvi['giturl']
+ if bvi['giturl'].startswith("remote:"):
+ bvo.giturl = _read_git_url_from_local_repository(bvi['giturl'])
+ bvo.branch = bvi['branch']
+ bvo.dirpath = bvi['dirpath']
+ bvo.save()
+
+ # set the layer sources
+ for lsi in data['layersources']:
+ assert 'sourcetype' in lsi
+ assert 'apiurl' in lsi
+ assert 'name' in lsi
+ assert 'branches' in lsi
+
+
+ if _get_id_for_sourcetype(lsi['sourcetype']) == LayerSource.TYPE_LAYERINDEX or lsi['apiurl'].startswith("/"):
+ apiurl = lsi['apiurl']
+ else:
+ apiurl = _reduce_canon_path(os.path.join(DN(os.path.abspath(filepath)), lsi['apiurl']))
+
+ assert ((_get_id_for_sourcetype(lsi['sourcetype']) == LayerSource.TYPE_LAYERINDEX) or apiurl.startswith("/")), (lsi['sourcetype'],apiurl)
+
+ try:
+ ls = LayerSource.objects.get(sourcetype = _get_id_for_sourcetype(lsi['sourcetype']), apiurl = apiurl)
+ except LayerSource.DoesNotExist:
+ ls = LayerSource.objects.create(
+ name = lsi['name'],
+ sourcetype = _get_id_for_sourcetype(lsi['sourcetype']),
+ apiurl = apiurl
+ )
+
+ layerbranches = []
+ for branchname in lsi['branches']:
+ bo, created = Branch.objects.get_or_create(layer_source = ls, name = branchname)
+ layerbranches.append(bo)
+
+ if 'layers' in lsi:
+ for layerinfo in lsi['layers']:
+ lo, created = Layer.objects.get_or_create(layer_source = ls, name = layerinfo['name'])
+ if layerinfo['local_path'].startswith("/"):
+ lo.local_path = layerinfo['local_path']
+ else:
+ lo.local_path = _reduce_canon_path(os.path.join(ls.apiurl, layerinfo['local_path']))
+
+ if not os.path.exists(lo.local_path):
+ raise Exception("Local layer path %s must exists." % lo.local_path)
+
+ lo.vcs_url = layerinfo['vcs_url']
+ if layerinfo['vcs_url'].startswith("remote:"):
+ lo.vcs_url = _read_git_url_from_local_repository(layerinfo['vcs_url'])
+ else:
+ lo.vcs_url = layerinfo['vcs_url']
+
+ if 'layer_index_url' in layerinfo:
+ lo.layer_index_url = layerinfo['layer_index_url']
+ lo.save()
+
+ for branch in layerbranches:
+ lvo, created = Layer_Version.objects.get_or_create(layer_source = ls,
+ up_branch = branch,
+ commit = branch.name,
+ layer = lo)
+ lvo.dirpath = layerinfo['dirpath']
+ lvo.save()
+ # set releases
+ for ri in data['releases']:
+ bvo = BitbakeVersion.objects.get(name = ri['bitbake'])
+ assert bvo is not None
+
+ ro, created = Release.objects.get_or_create(name = ri['name'], bitbake_version = bvo, branch_name = ri['branch'])
+ ro.description = ri['description']
+ ro.helptext = ri['helptext']
+ ro.save()
+
+ # save layer source priority for release
+ for ls_name in ri['layersourcepriority'].keys():
+ rlspo, created = ReleaseLayerSourcePriority.objects.get_or_create(release = ro, layer_source = LayerSource.objects.get(name=ls_name))
+ rlspo.priority = ri['layersourcepriority'][ls_name]
+ rlspo.save()
+
+ for dli in ri['defaultlayers']:
+ # find layers with the same name
+ ReleaseDefaultLayer.objects.get_or_create( release = ro, layer_name = dli)
+
+ # set default release
+ if ToasterSetting.objects.filter(name = "DEFAULT_RELEASE").count() > 0:
+ ToasterSetting.objects.filter(name = "DEFAULT_RELEASE").update(value = data['defaultrelease'])
+ else:
+ ToasterSetting.objects.create(name = "DEFAULT_RELEASE", value = data['defaultrelease'])
+
+ # set default config variables
+ for configname in data['config']:
+ if ToasterSetting.objects.filter(name = "DEFCONF_" + configname).count() > 0:
+ ToasterSetting.objects.filter(name = "DEFCONF_" + configname).update(value = data['config'][configname])
+ else:
+ ToasterSetting.objects.create(name = "DEFCONF_" + configname, value = data['config'][configname])
+
+
+ def handle(self, *args, **options):
+ if len(args) == 0:
+ raise CommandError("Need a path to the toasterconf.json file")
+ filepath = args[0]
+ self._import_layer_config(filepath)
+
+
+
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index dd8f84b07a..3b539b591a 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,9 +1,12 @@
from django.core.management.base import NoArgsCommand, CommandError
from django.db import transaction
from orm.models import Build
-from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException
-from bldcontrol.models import BuildRequest, BuildEnvironment
+from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException
+from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable
import os
+import logging
+
+logger = logging.getLogger("toaster")
class Command(NoArgsCommand):
args = ""
@@ -25,12 +28,14 @@ class Command(NoArgsCommand):
return br
def schedule(self):
+ import traceback
try:
br = None
try:
# select the build environment and the request to build
br = self._selectBuildRequest()
except IndexError as e:
+ # logger.debug("runbuilds: No build request")
return
try:
bec = self._selectBuildEnvironment()
@@ -38,40 +43,51 @@ class Command(NoArgsCommand):
# we could not find a BEC; postpone the BR
br.state = BuildRequest.REQ_QUEUED
br.save()
+ logger.debug("runbuilds: No build env")
return
- # set up the buid environment with the needed layers
- print "Build %s, Environment %s" % (br, bec.be)
- bec.setLayers(br.brlayer_set.all())
+ logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be))
- # get the bb server running
- bbctrl = bec.getBBController()
+ # write the build identification variable
+ BRVariable.objects.create(req = br, name="TOASTER_BRBE", value="%d:%d" % (br.pk, bec.be.pk))
+ # let the build request know where it is being executed
+ br.environment = bec.be
+ br.save()
- # let toasterui that this is a managed build
- bbctrl.setVariable("TOASTER_BRBE", "%d:%d" % (br.pk, bec.be.pk))
+ # set up the buid environment with the needed layers
+ bec.setLayers(br.brbitbake_set.all(), br.brlayer_set.all())
+ bec.writeConfFile("conf/toaster-pre.conf", br.brvariable_set.all())
+ bec.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"")
- # set the build configuration
- for variable in br.brvariable_set.all():
- bbctrl.setVariable(variable.name, variable.value)
+ # get the bb server running with the build req id and build env id
+ bbctrl = bec.getBBController()
# trigger the build command
- bbctrl.build(list(map(lambda x:x.target, br.brtarget_set.all())))
+ task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all()))
+ if len(task) == 0:
+ task = None
+ bbctrl.build(list(map(lambda x:x.target, br.brtarget_set.all())), task)
- print "Build launched, exiting"
+ logger.debug("runbuilds: Build launched, exiting")
# disconnect from the server
bbctrl.disconnect()
# cleanup to be performed by toaster when the deed is done
- except ShellCmdException as e:
- import traceback
- print " EE Error executing shell command\n", e
- traceback.format_exc(e)
except Exception as e:
- import traceback
- traceback.print_exc()
- raise e
+ logger.error("runbuilds: Error executing shell command %s" % e)
+ traceback.print_exc(e)
+ BRError.objects.create(req = br,
+ errtype = str(type(e)),
+ errmsg = str(e),
+ traceback = traceback.format_exc(e))
+ br.state = BuildRequest.REQ_FAILED
+ br.save()
+ bec.be.lock = BuildEnvironment.LOCK_FREE
+ bec.be.save()
+
+
def cleanup(self):
from django.utils import timezone
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py
new file mode 100644
index 0000000000..f522a500b6
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py
@@ -0,0 +1,106 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'BuildEnvironment.sourcedir'
+ db.add_column(u'bldcontrol_buildenvironment', 'sourcedir',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True),
+ keep_default=False)
+
+ # Adding field 'BuildEnvironment.builddir'
+ db.add_column(u'bldcontrol_buildenvironment', 'builddir',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'BuildEnvironment.sourcedir'
+ db.delete_column(u'bldcontrol_buildenvironment', 'sourcedir')
+
+ # Deleting field 'BuildEnvironment.builddir'
+ db.delete_column(u'bldcontrol_buildenvironment', 'builddir')
+
+
+ models = {
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['bldcontrol'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py b/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py
new file mode 100644
index 0000000000..b9ba838d90
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py
@@ -0,0 +1,99 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'BRLayer.dirpath'
+ db.add_column(u'bldcontrol_brlayer', 'dirpath',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=254),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'BRLayer.dirpath'
+ db.delete_column(u'bldcontrol_brlayer', 'dirpath')
+
+
+ models = {
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['bldcontrol'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py b/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py
new file mode 100644
index 0000000000..d908578133
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py
@@ -0,0 +1,104 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import DataMigration
+from django.db import models
+
+class Migration(DataMigration):
+
+ def forwards(self, orm):
+ "Write your forwards methods here."
+ # Note: Don't use "from appname.models import ModelName".
+ # Use orm.ModelName to refer to models in this application,
+ # and orm['appname.ModelName'] for models in other applications.
+ try:
+ orm.BuildEnvironment.objects.get(pk = 1)
+ except:
+ from django.utils import timezone
+ orm.BuildEnvironment.objects.create(pk = 1,
+ created = timezone.now(),
+ updated = timezone.now(),
+ betype = 0)
+
+ def backwards(self, orm):
+ "Write your backwards methods here."
+
+ models = {
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['bldcontrol']
+ symmetrical = True
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py b/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py
new file mode 100644
index 0000000000..98aeb41ceb
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py
@@ -0,0 +1,112 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'BRError'
+ db.create_table(u'bldcontrol_brerror', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])),
+ ('errtype', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ ('errmsg', self.gf('django.db.models.fields.TextField')()),
+ ('traceback', self.gf('django.db.models.fields.TextField')()),
+ ))
+ db.send_create_signal(u'bldcontrol', ['BRError'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'BRError'
+ db.delete_table(u'bldcontrol_brerror')
+
+
+ models = {
+ u'bldcontrol.brerror': {
+ 'Meta': {'object_name': 'BRError'},
+ 'errmsg': ('django.db.models.fields.TextField', [], {}),
+ 'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'traceback': ('django.db.models.fields.TextField', [], {})
+ },
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['bldcontrol'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py b/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py
new file mode 100644
index 0000000000..74388f8434
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py
@@ -0,0 +1,128 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'BRBitbake'
+ db.create_table(u'bldcontrol_brbitbake', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'], unique=True)),
+ ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)),
+ ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)),
+ ('dirpath', self.gf('django.db.models.fields.CharField')(max_length=254)),
+ ))
+ db.send_create_signal(u'bldcontrol', ['BRBitbake'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'BRBitbake'
+ db.delete_table(u'bldcontrol_brbitbake')
+
+
+ models = {
+ u'bldcontrol.brbitbake': {
+ 'Meta': {'object_name': 'BRBitbake'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
+ },
+ u'bldcontrol.brerror': {
+ 'Meta': {'object_name': 'BRError'},
+ 'errmsg': ('django.db.models.fields.TextField', [], {}),
+ 'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'traceback': ('django.db.models.fields.TextField', [], {})
+ },
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['bldcontrol'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py b/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py
new file mode 100644
index 0000000000..70677a294e
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py
@@ -0,0 +1,145 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'BuildRequest.environment'
+ db.add_column(u'bldcontrol_buildrequest', 'environment',
+ self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildEnvironment'], null=True),
+ keep_default=False)
+
+
+ # Changing field 'BuildRequest.build'
+ db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['orm.Build'], unique=True, null=True))
+ # Adding unique constraint on 'BuildRequest', fields ['build']
+ db.create_unique(u'bldcontrol_buildrequest', ['build_id'])
+
+
+ def backwards(self, orm):
+ # Removing unique constraint on 'BuildRequest', fields ['build']
+ db.delete_unique(u'bldcontrol_buildrequest', ['build_id'])
+
+ # Deleting field 'BuildRequest.environment'
+ db.delete_column(u'bldcontrol_buildrequest', 'environment_id')
+
+
+ # Changing field 'BuildRequest.build'
+ db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True))
+
+ models = {
+ u'bldcontrol.brbitbake': {
+ 'Meta': {'object_name': 'BRBitbake'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
+ },
+ u'bldcontrol.brerror': {
+ 'Meta': {'object_name': 'BRError'},
+ 'errmsg': ('django.db.models.fields.TextField', [], {}),
+ 'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'traceback': ('django.db.models.fields.TextField', [], {})
+ },
+ u'bldcontrol.brlayer': {
+ 'Meta': {'object_name': 'BRLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
+ },
+ u'bldcontrol.brtarget': {
+ 'Meta': {'object_name': 'BRTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'bldcontrol.brvariable': {
+ 'Meta': {'object_name': 'BRVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'bldcontrol.buildenvironment': {
+ 'Meta': {'object_name': 'BuildEnvironment'},
+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
+ 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
+ 'betype': ('django.db.models.fields.IntegerField', [], {}),
+ 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'bldcontrol.buildrequest': {
+ 'Meta': {'object_name': 'BuildRequest'},
+ 'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ }
+ }
+
+ complete_apps = ['bldcontrol'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index 158874f393..dc4afca2f7 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -33,11 +33,57 @@ class BuildEnvironment(models.Model):
bbport = models.IntegerField(default = -1)
bbtoken = models.CharField(max_length = 126, blank = True)
bbstate = models.IntegerField(choices = SERVER_STATE, default = SERVER_STOPPED)
+ sourcedir = models.CharField(max_length = 512, blank = True)
+ builddir = models.CharField(max_length = 512, blank = True)
lock = models.IntegerField(choices = LOCK_STATE, default = LOCK_FREE)
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
+ def get_artifact_type(self, path):
+ if self.betype == BuildEnvironment.TYPE_LOCAL:
+ try:
+ import magic
+
+ # fair warning: this is a mess; there are multiple competeing and incompatible
+ # magic modules floating around, so we try some of the most common combinations
+
+ try: # we try ubuntu's python-magic 5.4
+ m = magic.open(magic.MAGIC_MIME_TYPE)
+ m.load()
+ return m.file(path)
+ except AttributeError:
+ pass
+
+ try: # we try python-magic 0.4.6
+ m = magic.Magic(magic.MAGIC_MIME)
+ return m.from_file(path)
+ except AttributeError:
+ pass
+
+ try: # we try pip filemagic 1.6
+ m = magic.Magic(flags=magic.MAGIC_MIME_TYPE)
+ return m.id_filename(path)
+ except AttributeError:
+ pass
+
+ return "binary/octet-stream"
+ except ImportError:
+ return "binary/octet-stream"
+ raise Exception("FIXME: artifact type not implemented for build environment type %s" % be.get_betype_display())
+
+
+ def get_artifact(self, path):
+ if self.betype == BuildEnvironment.TYPE_LOCAL:
+ return open(path, "r")
+ raise Exception("FIXME: artifact download not implemented for build environment type %s" % be.get_betype_display())
+
+ def has_artifact(self, path):
+ import os
+ if self.betype == BuildRequest.TYPE_LOCAL:
+ return os.path.exists(path)
+ raise Exception("FIXME: has artifact not implemented for build environment type %s" % be.get_betype_display())
+
# a BuildRequest is a request that the scheduler will build using a BuildEnvironment
# the build request queue is the table itself, ordered by state
@@ -46,20 +92,36 @@ class BuildRequest(models.Model):
REQ_QUEUED = 1
REQ_INPROGRESS = 2
REQ_COMPLETED = 3
+ REQ_FAILED = 4
+ REQ_DELETED = 5
REQUEST_STATE = (
(REQ_CREATED, "created"),
(REQ_QUEUED, "queued"),
(REQ_INPROGRESS, "in progress"),
(REQ_COMPLETED, "completed"),
+ (REQ_FAILED, "failed"),
+ (REQ_DELETED, "deleted"),
)
+ search_allowed_fields = ("brtarget__target",)
+
project = models.ForeignKey(Project)
- build = models.ForeignKey(Build, null = True) # TODO: toasterui should set this when Build is created
+ build = models.OneToOneField(Build, null = True) # TODO: toasterui should set this when Build is created
+ environment = models.ForeignKey(BuildEnvironment, null = True)
state = models.IntegerField(choices = REQUEST_STATE, default = REQ_CREATED)
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
+ def get_duration(self):
+ return (self.updated - self.created).total_seconds()
+
+ def get_sorted_target_list(self):
+ tgts = self.brtarget_set.order_by( 'target' );
+ return( tgts );
+
+ def get_machine(self):
+ return self.brvariable_set.get(name="MACHINE").value
# These tables specify the settings for running an actual build.
# They MUST be kept in sync with the tables in orm.models.Project*
@@ -69,6 +131,13 @@ class BRLayer(models.Model):
name = models.CharField(max_length = 100)
giturl = models.CharField(max_length = 254)
commit = models.CharField(max_length = 254)
+ dirpath = models.CharField(max_length = 254)
+
+class BRBitbake(models.Model):
+ req = models.ForeignKey(BuildRequest, unique = True) # only one bitbake for a request
+ giturl = models.CharField(max_length =254)
+ commit = models.CharField(max_length = 254)
+ dirpath = models.CharField(max_length = 254)
class BRVariable(models.Model):
req = models.ForeignKey(BuildRequest)
@@ -80,4 +149,8 @@ class BRTarget(models.Model):
target = models.CharField(max_length=100)
task = models.CharField(max_length=100, null=True)
-
+class BRError(models.Model):
+ req = models.ForeignKey(BuildRequest)
+ errtype = models.CharField(max_length=100)
+ errmsg = models.TextField()
+ traceback = models.TextField()
diff --git a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
new file mode 100644
index 0000000000..be797c9486
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
@@ -0,0 +1,155 @@
+#
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+import sys
+import re
+from django.db import transaction
+from django.db.models import Q
+from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
+import subprocess
+
+from toastermain import settings
+
+from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, _get_git_clonedirectory
+
+def DN(path):
+ return "/".join(path.split("/")[0:-1])
+
+class SSHBEController(BuildEnvironmentController):
+ """ Implementation of the BuildEnvironmentController for the localhost;
+ this controller manages the default build directory,
+ the server setup and system start and stop for the localhost-type build environment
+
+ """
+
+ def __init__(self, be):
+ super(SSHBEController, self).__init__(be)
+ self.dburl = settings.getDATABASE_URL()
+ self.pokydirname = None
+ self.islayerset = False
+
+ def _shellcmd(self, command, cwd = None):
+ if cwd is None:
+ cwd = self.be.sourcedir
+
+ p = subprocess.Popen("ssh %s 'cd %s && %s'" % (self.be.address, cwd, command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ (out,err) = p.communicate()
+ if p.returncode:
+ if len(err) == 0:
+ err = "command: %s \n%s" % (command, out)
+ else:
+ err = "command: %s \n%s" % (command, err)
+ raise ShellCmdException(err)
+ else:
+ return out.strip()
+
+ def _pathexists(self, path):
+ try:
+ self._shellcmd("test -e \"%s\"" % path)
+ return True
+ except ShellCmdException as e:
+ return False
+
+ def _pathcreate(self, path):
+ self._shellcmd("mkdir -p \"%s\"" % path)
+
+ def _setupBE(self):
+ assert self.pokydirname and self._pathexists(self.pokydirname)
+ self._pathcreate(self.be.builddir)
+ self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
+
+ def startBBServer(self, brbe):
+ assert self.pokydirname and self._pathexists(self.pokydirname)
+ assert self.islayerset
+ cmd = self._shellcmd("bash -c \"source %s/oe-init-build-env %s && DATABASE_URL=%s source toaster start noweb brbe=%s\"" % (self.pokydirname, self.be.builddir, self.dburl, brbe))
+
+ port = "-1"
+ for i in cmd.split("\n"):
+ if i.startswith("Bitbake server address"):
+ port = i.split(" ")[-1]
+ print "Found bitbake server port ", port
+
+
+ assert self.be.sourcedir and self._pathexists(self.be.builddir)
+ self.be.bbaddress = self.be.address.split("@")[-1]
+ self.be.bbport = port
+ self.be.bbstate = BuildEnvironment.SERVER_STARTED
+ self.be.save()
+
+ def stopBBServer(self):
+ assert self.pokydirname and self._pathexists(self.pokydirname)
+ assert self.islayerset
+ print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
+ (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
+ self.be.bbstate = BuildEnvironment.SERVER_STOPPED
+ self.be.save()
+ print "Stopped server"
+
+
+ def _copyFile(self, filepath1, filepath2):
+ p = subprocess.Popen("scp '%s' '%s'" % (filepath1, filepath2), stdout=subprocess.PIPE, stderr = subprocess.PIPE, shell=True)
+ (out, err) = p.communicate()
+ if p.returncode:
+ raise ShellCmdException(err)
+
+ def pullFile(self, local_filename, remote_filename):
+ _copyFile(local_filename, "%s:%s" % (self.be.address, remote_filename))
+
+ def pushFile(self, local_filename, remote_filename):
+ _copyFile("%s:%s" % (self.be.address, remote_filename), local_filename)
+
+ def setLayers(self, bitbakes, layers):
+ """ a word of attention: by convention, the first layer for any build will be poky! """
+
+ assert self.be.sourcedir is not None
+ assert len(bitbakes) == 1
+ # set layers in the layersource
+
+
+ raise Exception("Not implemented: SSH setLayers")
+ # 3. configure the build environment, so we have a conf/bblayers.conf
+ assert self.pokydirname is not None
+ self._setupBE()
+
+ # 4. update the bblayers.conf
+ bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
+ if not self._pathexists(bblayerconf):
+ raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
+
+ import uuid
+ local_bblayerconf = "/tmp/" + uuid.uuid4() + "-bblayer.conf"
+
+ self.pullFile(bblayerconf, local_bblayerconf)
+
+ BuildEnvironmentController._updateBBLayers(local_bblayerconf, layerlist)
+ self.pushFile(local_bblayerconf, bblayerconf)
+
+ os.unlink(local_bblayerconf)
+
+ self.islayerset = True
+ return True
+
+ def release(self):
+ assert self.be.sourcedir and self._pathexists(self.be.builddir)
+ import shutil
+ shutil.rmtree(os.path.join(self.be.sourcedir, "build"))
+ assert not self._pathexists(self.be.builddir)
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py
index ebe477d8a8..5a9d1df37a 100644
--- a/bitbake/lib/toaster/bldcontrol/tests.py
+++ b/bitbake/lib/toaster/bldcontrol/tests.py
@@ -7,46 +7,108 @@ Replace this with more appropriate tests for your application.
from django.test import TestCase
-from bldcontrol.bbcontroller import LocalhostBEController, BitbakeController
+from bldcontrol.bbcontroller import BitbakeController
+from bldcontrol.localhostbecontroller import LocalhostBEController
+from bldcontrol.sshbecontroller import SSHBEController
from bldcontrol.models import BuildEnvironment, BuildRequest
from bldcontrol.management.commands.runbuilds import Command
import socket
import subprocess
-class LocalhostBEControllerTests(TestCase):
- def test_StartAndStopServer(self):
- obe = BuildEnvironment.objects.create(lock = BuildEnvironment.LOCK_FREE, betype = BuildEnvironment.TYPE_LOCAL)
- lbc = LocalhostBEController(obe)
+# standard poky data hardcoded for testing
+BITBAKE_LAYERS = [type('bitbake_info', (object,), { "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "", "commit": "HEAD"})]
+POKY_LAYERS = [
+ type('poky_info', (object,), { "name": "meta", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta", "commit": "HEAD"}),
+ type('poky_info', (object,), { "name": "meta-yocto", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta-yocto", "commit": "HEAD"}),
+ type('poky_info', (object,), { "name": "meta-yocto-bsp", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta-yocto-bsp", "commit": "HEAD"}),
+ ]
- # test start server and stop
- self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('localhost', 8200)), "Port already occupied")
- lbc.startBBServer()
- self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('localhost', 8200)), "Server not answering")
- lbc.stopBBServer()
- self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('localhost', 8200)), "Server not stopped")
- # clean up
- import subprocess
- out, err = subprocess.Popen("netstat -tapn 2>/dev/null | grep 8200 | awk '{print $7}' | sort -fu | cut -d \"/\" -f 1 | grep -v -- - | tee /dev/fd/2 | xargs -r kill", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+# we have an abstract test class designed to ensure that the controllers use a single interface
+# specific controller tests only need to override the _getBuildEnvironment() method
+class BEControllerTests(object):
+
+ def _serverForceStop(self, bc):
+ err = bc._shellcmd("netstat -tapn 2>/dev/null | grep 8200 | awk '{print $7}' | sort -fu | cut -d \"/\" -f 1 | grep -v -- - | tee /dev/fd/2 | xargs -r kill")
self.assertTrue(err == '', "bitbake server pid %s not stopped" % err)
- obe = BuildEnvironment.objects.create(lock = BuildEnvironment.LOCK_FREE, betype = BuildEnvironment.TYPE_LOCAL)
- lbc = LocalhostBEController(obe)
+ def test_serverStartAndStop(self):
+ obe = self._getBuildEnvironment()
+ bc = self._getBEController(obe)
+ bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) # setting layers, skip any layer info
+
+ hostname = self.test_address.split("@")[-1]
+
+ # test start server and stop
+ self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Port already occupied")
+ bc.startBBServer("0:0")
+ self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Server not answering")
+
+ bc.stopBBServer()
+ self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Server not stopped")
- bbc = lbc.getBBController()
+ self._serverForceStop(bc)
+
+ def test_getBBController(self):
+ obe = self._getBuildEnvironment()
+ bc = self._getBEController(obe)
+ bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) # setting layers, skip any layer info
+
+ bbc = bc.getBBController("%d:%d" % (-1, obe.pk))
self.assertTrue(isinstance(bbc, BitbakeController))
- # test set variable
- try:
- bbc.setVariable
- except Exception as e :
- self.fail("setVariable raised %s", e)
-
- lbc.stopBBServer()
- out, err = subprocess.Popen("netstat -tapn 2>/dev/null | grep 8200 | awk '{print $7}' | sort -fu | cut -d \"/\" -f 1 | grep -v -- - | tee /dev/fd/2 | xargs -r kill", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- self.assertTrue(err == '', "bitbake server pid %s not stopped" % err)
+ bc.stopBBServer()
+
+ self._serverForceStop(bc)
+
+class LocalhostBEControllerTests(TestCase, BEControllerTests):
+ def __init__(self, *args):
+ super(LocalhostBEControllerTests, self).__init__(*args)
+ # hardcoded for Alex's machine; since the localhost BE is machine-dependent,
+ # I found no good way to abstractize this
+ self.test_sourcedir = "/home/ddalex/ssd/yocto"
+ self.test_builddir = "/home/ddalex/ssd/yocto/build"
+ self.test_address = "localhost"
+
+ def _getBuildEnvironment(self):
+ return BuildEnvironment.objects.create(
+ lock = BuildEnvironment.LOCK_FREE,
+ betype = BuildEnvironment.TYPE_LOCAL,
+ address = self.test_address,
+ sourcedir = self.test_sourcedir,
+ builddir = self.test_builddir )
+
+ def _getBEController(self, obe):
+ return LocalhostBEController(obe)
+
+class SSHBEControllerTests(TestCase, BEControllerTests):
+ def __init__(self, *args):
+ super(SSHBEControllerTests, self).__init__(*args)
+ self.test_address = "ddalex-desktop.local"
+ # hardcoded for ddalex-desktop.local machine; since the localhost BE is machine-dependent,
+ # I found no good way to abstractize this
+ self.test_sourcedir = "/home/ddalex/ssd/yocto"
+ self.test_builddir = "/home/ddalex/ssd/yocto/build"
+
+ def _getBuildEnvironment(self):
+ return BuildEnvironment.objects.create(
+ lock = BuildEnvironment.LOCK_FREE,
+ betype = BuildEnvironment.TYPE_SSH,
+ address = self.test_address,
+ sourcedir = self.test_sourcedir,
+ builddir = self.test_builddir )
+
+ def _getBEController(self, obe):
+ return SSHBEController(obe)
+
+ def test_pathExists(self):
+ obe = BuildEnvironment.objects.create(betype = BuildEnvironment.TYPE_SSH, address= self.test_address)
+ sbc = SSHBEController(obe)
+ self.assertTrue(sbc._pathexists("/"))
+ self.assertFalse(sbc._pathexists("/.deadbeef"))
+ self.assertTrue(sbc._pathexists(sbc._shellcmd("pwd")))
class RunBuildsCommandTests(TestCase):
@@ -67,8 +129,8 @@ class RunBuildsCommandTests(TestCase):
self.assertRaises(IndexError, command._selectBuildEnvironment)
def test_br_select(self):
- from orm.models import Project
- p, created = Project.objects.get_or_create(pk=1)
+ from orm.models import Project, Release, BitbakeVersion
+ p = Project.objects.create_project("test", Release.objects.get_or_create(name = "HEAD", bitbake_version = BitbakeVersion.objects.get_or_create(name="HEAD", branch=Branch.objects.get_or_create(name="HEAD"))[0])[0])
obr = BuildRequest.objects.create(state = BuildRequest.REQ_QUEUED, project = p)
command = Command()
br = command._selectBuildRequest()
@@ -79,3 +141,22 @@ class RunBuildsCommandTests(TestCase):
self.assertTrue(br.state == BuildRequest.REQ_INPROGRESS, "Request is not updated")
# no more selections possible here
self.assertRaises(IndexError, command._selectBuildRequest)
+
+
+class UtilityTests(TestCase):
+ def test_reduce_path(self):
+ from bldcontrol.management.commands.loadconf import _reduce_canon_path, _get_id_for_sourcetype
+
+ self.assertTrue( _reduce_canon_path("/") == "/")
+ self.assertTrue( _reduce_canon_path("/home/..") == "/")
+ self.assertTrue( _reduce_canon_path("/home/../ana") == "/ana")
+ self.assertTrue( _reduce_canon_path("/home/../ana/..") == "/")
+ self.assertTrue( _reduce_canon_path("/home/ana/mihai/../maria") == "/home/ana/maria")
+
+ def test_get_id_for_sorucetype(self):
+ from bldcontrol.management.commands.loadconf import _reduce_canon_path, _get_id_for_sourcetype
+ self.assertTrue( _get_id_for_sourcetype("layerindex") == 1)
+ self.assertTrue( _get_id_for_sourcetype("local") == 0)
+ self.assertTrue( _get_id_for_sourcetype("imported") == 2)
+ with self.assertRaises(Exception):
+ _get_id_for_sourcetype("unknown")
diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_build.html b/bitbake/lib/toaster/bldviewer/templates/simple_build.html
index a6983f5804..230e7c21ca 100644
--- a/bitbake/lib/toaster/bldviewer/templates/simple_build.html
+++ b/bitbake/lib/toaster/bldviewer/templates/simple_build.html
@@ -6,7 +6,7 @@
{% block pagetable %}
- {% load projecttags %}
+ {% load simple_projecttags %}
<tr>
<th>Outcome</th>
<th>Started On</th>
diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_layer.html b/bitbake/lib/toaster/bldviewer/templates/simple_layer.html
index ae7172d9a0..25e7bf818e 100644
--- a/bitbake/lib/toaster/bldviewer/templates/simple_layer.html
+++ b/bitbake/lib/toaster/bldviewer/templates/simple_layer.html
@@ -5,7 +5,7 @@
{% endblock %}
{% block pagetable %}
- {% load projecttags %}
+ {% load simple_projecttags %}
<tr>
<th>Name</th>
diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
index 77b9de2525..3bff3b9a25 100644
--- a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
+++ b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
@@ -8,7 +8,7 @@
{% endblock %}
{% block pagetable %}
- {% load projecttags %}
+ {% load simple_projecttags %}
<tr>
</tr>
diff --git a/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py b/bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py
index 1b8953c69d..1b8953c69d 100644
--- a/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py
diff --git a/bitbake/lib/toaster/orm/admin.py b/bitbake/lib/toaster/orm/admin.py
new file mode 100644
index 0000000000..706e517e0e
--- /dev/null
+++ b/bitbake/lib/toaster/orm/admin.py
@@ -0,0 +1,34 @@
+from django.contrib import admin
+from django.contrib.admin.filters import RelatedFieldListFilter
+from .models import BitbakeVersion, Release, LayerSource, ToasterSetting
+from django.forms.widgets import Textarea
+from django import forms
+import django.db.models as models
+
+from django.contrib.admin import widgets, helpers
+
+class LayerSourceAdmin(admin.ModelAdmin):
+ pass
+
+class BitbakeVersionAdmin(admin.ModelAdmin):
+
+ # we override the formfield for db URLField because of broken URL validation
+
+ def formfield_for_dbfield(self, db_field, **kwargs):
+ if isinstance(db_field, models.fields.URLField):
+ return forms.fields.CharField()
+ return super(BitbakeVersionAdmin, self).formfield_for_dbfield(db_field, **kwargs)
+
+
+
+class ReleaseAdmin(admin.ModelAdmin):
+ pass
+
+class ToasterSettingAdmin(admin.ModelAdmin):
+ pass
+
+admin.site.register(LayerSource, LayerSourceAdmin)
+admin.site.register(BitbakeVersion, BitbakeVersionAdmin)
+admin.site.register(Release, ReleaseAdmin)
+admin.site.register(ToasterSetting, ToasterSettingAdmin)
+
diff --git a/scripts/lib/mic/3rdparty/pykickstart/__init__.py b/bitbake/lib/toaster/orm/management/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/__init__.py
+++ b/bitbake/lib/toaster/orm/management/__init__.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py b/bitbake/lib/toaster/orm/management/commands/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py
+++ b/bitbake/lib/toaster/orm/management/commands/__init__.py
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
new file mode 100644
index 0000000000..75e9513fca
--- /dev/null
+++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
@@ -0,0 +1,12 @@
+from django.core.management.base import NoArgsCommand, CommandError
+from orm.models import LayerSource
+import os
+
+class Command(NoArgsCommand):
+ args = ""
+ help = "Updates locally cached information from all LayerSources"
+
+
+ def handle_noargs(self, **options):
+ for ls in LayerSource.objects.all():
+ ls.update()
diff --git a/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py b/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py
new file mode 100644
index 0000000000..aa1ce1f4ac
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py
@@ -0,0 +1,257 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Project.branch'
+ db.add_column(u'orm_project', 'branch',
+ self.gf('django.db.models.fields.CharField')(default='master', max_length=50),
+ keep_default=False)
+
+ # Adding field 'Project.short_description'
+ db.add_column(u'orm_project', 'short_description',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=50, blank=True),
+ keep_default=False)
+
+ # Adding field 'Project.user_id'
+ db.add_column(u'orm_project', 'user_id',
+ self.gf('django.db.models.fields.IntegerField')(null=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Project.branch'
+ db.delete_column(u'orm_project', 'branch')
+
+ # Deleting field 'Project.short_description'
+ db.delete_column(u'orm_project', 'short_description')
+
+ # Deleting field 'Project.user_id'
+ db.delete_column(u'orm_project', 'user_id')
+
+
+ models = {
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'object_name': 'Layer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py b/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py
new file mode 100644
index 0000000000..8a65221594
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py
@@ -0,0 +1,242 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'ProjectLayer.dirpath'
+ db.add_column(u'orm_projectlayer', 'dirpath',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=254),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'ProjectLayer.dirpath'
+ db.delete_column(u'orm_projectlayer', 'dirpath')
+
+
+ models = {
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'object_name': 'Layer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py b/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py
new file mode 100644
index 0000000000..9e483f5dac
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py
@@ -0,0 +1,252 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'ProjectLayer.optional'
+ db.add_column(u'orm_projectlayer', 'optional',
+ self.gf('django.db.models.fields.BooleanField')(default=True),
+ keep_default=False)
+
+ # Adding field 'ProjectTarget.task'
+ db.add_column(u'orm_projecttarget', 'task',
+ self.gf('django.db.models.fields.CharField')(max_length=100, null=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'ProjectLayer.optional'
+ db.delete_column(u'orm_projectlayer', 'optional')
+
+ # Deleting field 'ProjectTarget.task'
+ db.delete_column(u'orm_projecttarget', 'task')
+
+
+ models = {
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'object_name': 'Layer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py b/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py
new file mode 100644
index 0000000000..7c954e6bef
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py
@@ -0,0 +1,710 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Release'
+ db.create_table(u'orm_release', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)),
+ ('description', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('bitbake_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.BitbakeVersion'])),
+ ('branch', self.gf('django.db.models.fields.CharField')(max_length=32)),
+ ))
+ db.send_create_signal(u'orm', ['Release'])
+
+ # Adding model 'LayerVersionDependency'
+ db.create_table(u'orm_layerversiondependency', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True)),
+ ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
+ ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(related_name='dependencies', to=orm['orm.Layer_Version'])),
+ ('depends_on', self.gf('django.db.models.fields.related.ForeignKey')(related_name='dependees', to=orm['orm.Layer_Version'])),
+ ))
+ db.send_create_signal(u'orm', ['LayerVersionDependency'])
+
+ # Adding unique constraint on 'LayerVersionDependency', fields ['layer_source', 'up_id']
+ db.create_unique(u'orm_layerversiondependency', ['layer_source_id', 'up_id'])
+
+ # Adding model 'ToasterSetting'
+ db.create_table(u'orm_toastersetting', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=63)),
+ ('helptext', self.gf('django.db.models.fields.TextField')()),
+ ('value', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ))
+ db.send_create_signal(u'orm', ['ToasterSetting'])
+
+ # Adding model 'Machine'
+ db.create_table(u'orm_machine', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True)),
+ ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
+ ('up_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True)),
+ ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('description', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ))
+ db.send_create_signal(u'orm', ['Machine'])
+
+ # Adding unique constraint on 'Machine', fields ['layer_source', 'up_id']
+ db.create_unique(u'orm_machine', ['layer_source_id', 'up_id'])
+
+ # Adding model 'ReleaseDefaultLayer'
+ db.create_table(u'orm_releasedefaultlayer', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('release', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release'])),
+ ('layer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer'])),
+ ))
+ db.send_create_signal(u'orm', ['ReleaseDefaultLayer'])
+
+ # Adding model 'BitbakeVersion'
+ db.create_table(u'orm_bitbakeversion', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)),
+ ('giturl', self.gf('django.db.models.fields.URLField')(max_length=200)),
+ ('branch', self.gf('django.db.models.fields.CharField')(max_length=32)),
+ ('dirpath', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ))
+ db.send_create_signal(u'orm', ['BitbakeVersion'])
+
+ # Adding model 'Branch'
+ db.create_table(u'orm_branch', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=True, to=orm['orm.LayerSource'], null=True)),
+ ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
+ ('up_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
+ ('bitbake_branch', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)),
+ ('short_description', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)),
+ ))
+ db.send_create_signal(u'orm', ['Branch'])
+
+ # Adding unique constraint on 'Branch', fields ['layer_source', 'name']
+ db.create_unique(u'orm_branch', ['layer_source_id', 'name'])
+
+ # Adding unique constraint on 'Branch', fields ['layer_source', 'up_id']
+ db.create_unique(u'orm_branch', ['layer_source_id', 'up_id'])
+
+ # Adding model 'ToasterSettingDefaultLayer'
+ db.create_table(u'orm_toastersettingdefaultlayer', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
+ ))
+ db.send_create_signal(u'orm', ['ToasterSettingDefaultLayer'])
+
+ # Adding model 'LayerSource'
+ db.create_table(u'orm_layersource', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=63)),
+ ('sourcetype', self.gf('django.db.models.fields.IntegerField')()),
+ ('apiurl', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True)),
+ ))
+ db.send_create_signal(u'orm', ['LayerSource'])
+
+ # Adding unique constraint on 'LayerSource', fields ['sourcetype', 'apiurl']
+ db.create_unique(u'orm_layersource', ['sourcetype', 'apiurl'])
+
+ # Deleting field 'ProjectLayer.name'
+ db.delete_column(u'orm_projectlayer', 'name')
+
+ # Deleting field 'ProjectLayer.dirpath'
+ db.delete_column(u'orm_projectlayer', 'dirpath')
+
+ # Deleting field 'ProjectLayer.commit'
+ db.delete_column(u'orm_projectlayer', 'commit')
+
+ # Deleting field 'ProjectLayer.giturl'
+ db.delete_column(u'orm_projectlayer', 'giturl')
+
+ # Adding field 'ProjectLayer.layercommit'
+ db.add_column(u'orm_projectlayer', 'layercommit',
+ self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'], null=True),
+ keep_default=False)
+
+ # Adding field 'Layer_Version.layer_source'
+ db.add_column(u'orm_layer_version', 'layer_source',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
+ keep_default=False)
+
+ # Adding field 'Layer_Version.up_id'
+ db.add_column(u'orm_layer_version', 'up_id',
+ self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer_Version.up_date'
+ db.add_column(u'orm_layer_version', 'up_date',
+ self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer_Version.up_branch'
+ db.add_column(u'orm_layer_version', 'up_branch',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Branch'], null=True),
+ keep_default=False)
+
+ # Adding field 'Layer_Version.dirpath'
+ db.add_column(u'orm_layer_version', 'dirpath',
+ self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True),
+ keep_default=False)
+
+
+ # Changing field 'Layer_Version.build'
+ db.alter_column(u'orm_layer_version', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['orm.Build']))
+
+ # Changing field 'Layer_Version.branch'
+ db.alter_column(u'orm_layer_version', 'branch', self.gf('django.db.models.fields.CharField')(max_length=80))
+ # Adding unique constraint on 'Layer_Version', fields ['layer_source', 'up_id']
+ db.create_unique(u'orm_layer_version', ['layer_source_id', 'up_id'])
+
+ # Adding field 'Recipe.layer_source'
+ db.add_column(u'orm_recipe', 'layer_source',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
+ keep_default=False)
+
+ # Adding field 'Recipe.up_id'
+ db.add_column(u'orm_recipe', 'up_id',
+ self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Recipe.up_date'
+ db.add_column(u'orm_recipe', 'up_date',
+ self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.layer_source'
+ db.add_column(u'orm_layer', 'layer_source',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.up_id'
+ db.add_column(u'orm_layer', 'up_id',
+ self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.up_date'
+ db.add_column(u'orm_layer', 'up_date',
+ self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.vcs_url'
+ db.add_column(u'orm_layer', 'vcs_url',
+ self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.vcs_web_file_base_url'
+ db.add_column(u'orm_layer', 'vcs_web_file_base_url',
+ self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.summary'
+ db.add_column(u'orm_layer', 'summary',
+ self.gf('django.db.models.fields.CharField')(default=None, max_length=200, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.description'
+ db.add_column(u'orm_layer', 'description',
+ self.gf('django.db.models.fields.TextField')(default=None, null=True),
+ keep_default=False)
+
+
+ # Changing field 'Layer.local_path'
+ db.alter_column(u'orm_layer', 'local_path', self.gf('django.db.models.fields.FilePathField')(max_length=255, null=True))
+ # Adding unique constraint on 'Layer', fields ['layer_source', 'up_id']
+ db.create_unique(u'orm_layer', ['layer_source_id', 'up_id'])
+
+ # Adding unique constraint on 'Layer', fields ['layer_source', 'name']
+ db.create_unique(u'orm_layer', ['layer_source_id', 'name'])
+
+ # Deleting field 'Project.branch'
+ db.delete_column(u'orm_project', 'branch')
+
+ # Adding field 'Project.bitbake_version'
+ db.add_column(u'orm_project', 'bitbake_version',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=-1, to=orm['orm.BitbakeVersion']),
+ keep_default=False)
+
+ # Adding field 'Project.release'
+ db.add_column(u'orm_project', 'release',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=-1, to=orm['orm.Release']),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Removing unique constraint on 'Layer', fields ['layer_source', 'name']
+ db.delete_unique(u'orm_layer', ['layer_source_id', 'name'])
+
+ # Removing unique constraint on 'Layer', fields ['layer_source', 'up_id']
+ db.delete_unique(u'orm_layer', ['layer_source_id', 'up_id'])
+
+ # Removing unique constraint on 'Layer_Version', fields ['layer_source', 'up_id']
+ db.delete_unique(u'orm_layer_version', ['layer_source_id', 'up_id'])
+
+ # Removing unique constraint on 'LayerSource', fields ['sourcetype', 'apiurl']
+ db.delete_unique(u'orm_layersource', ['sourcetype', 'apiurl'])
+
+ # Removing unique constraint on 'Branch', fields ['layer_source', 'up_id']
+ db.delete_unique(u'orm_branch', ['layer_source_id', 'up_id'])
+
+ # Removing unique constraint on 'Branch', fields ['layer_source', 'name']
+ db.delete_unique(u'orm_branch', ['layer_source_id', 'name'])
+
+ # Removing unique constraint on 'Machine', fields ['layer_source', 'up_id']
+ db.delete_unique(u'orm_machine', ['layer_source_id', 'up_id'])
+
+ # Removing unique constraint on 'LayerVersionDependency', fields ['layer_source', 'up_id']
+ db.delete_unique(u'orm_layerversiondependency', ['layer_source_id', 'up_id'])
+
+ # Deleting model 'Release'
+ db.delete_table(u'orm_release')
+
+ # Deleting model 'LayerVersionDependency'
+ db.delete_table(u'orm_layerversiondependency')
+
+ # Deleting model 'ToasterSetting'
+ db.delete_table(u'orm_toastersetting')
+
+ # Deleting model 'Machine'
+ db.delete_table(u'orm_machine')
+
+ # Deleting model 'ReleaseDefaultLayer'
+ db.delete_table(u'orm_releasedefaultlayer')
+
+ # Deleting model 'BitbakeVersion'
+ db.delete_table(u'orm_bitbakeversion')
+
+ # Deleting model 'Branch'
+ db.delete_table(u'orm_branch')
+
+ # Deleting model 'ToasterSettingDefaultLayer'
+ db.delete_table(u'orm_toastersettingdefaultlayer')
+
+ # Deleting model 'LayerSource'
+ db.delete_table(u'orm_layersource')
+
+
+ # User chose to not deal with backwards NULL issues for 'ProjectLayer.name'
+ raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.name' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'ProjectLayer.name'
+ db.add_column(u'orm_projectlayer', 'name',
+ self.gf('django.db.models.fields.CharField')(max_length=100),
+ keep_default=False)
+
+
+ # User chose to not deal with backwards NULL issues for 'ProjectLayer.dirpath'
+ raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.dirpath' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'ProjectLayer.dirpath'
+ db.add_column(u'orm_projectlayer', 'dirpath',
+ self.gf('django.db.models.fields.CharField')(max_length=254),
+ keep_default=False)
+
+
+ # User chose to not deal with backwards NULL issues for 'ProjectLayer.commit'
+ raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.commit' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'ProjectLayer.commit'
+ db.add_column(u'orm_projectlayer', 'commit',
+ self.gf('django.db.models.fields.CharField')(max_length=254),
+ keep_default=False)
+
+
+ # User chose to not deal with backwards NULL issues for 'ProjectLayer.giturl'
+ raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.giturl' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'ProjectLayer.giturl'
+ db.add_column(u'orm_projectlayer', 'giturl',
+ self.gf('django.db.models.fields.CharField')(max_length=254),
+ keep_default=False)
+
+ # Deleting field 'ProjectLayer.layercommit'
+ db.delete_column(u'orm_projectlayer', 'layercommit_id')
+
+ # Deleting field 'Layer_Version.layer_source'
+ db.delete_column(u'orm_layer_version', 'layer_source_id')
+
+ # Deleting field 'Layer_Version.up_id'
+ db.delete_column(u'orm_layer_version', 'up_id')
+
+ # Deleting field 'Layer_Version.up_date'
+ db.delete_column(u'orm_layer_version', 'up_date')
+
+ # Deleting field 'Layer_Version.up_branch'
+ db.delete_column(u'orm_layer_version', 'up_branch_id')
+
+ # Deleting field 'Layer_Version.dirpath'
+ db.delete_column(u'orm_layer_version', 'dirpath')
+
+
+ # User chose to not deal with backwards NULL issues for 'Layer_Version.build'
+ raise RuntimeError("Cannot reverse this migration. 'Layer_Version.build' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration
+ # Changing field 'Layer_Version.build'
+ db.alter_column(u'orm_layer_version', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build']))
+
+ # Changing field 'Layer_Version.branch'
+ db.alter_column(u'orm_layer_version', 'branch', self.gf('django.db.models.fields.CharField')(max_length=50))
+ # Deleting field 'Recipe.layer_source'
+ db.delete_column(u'orm_recipe', 'layer_source_id')
+
+ # Deleting field 'Recipe.up_id'
+ db.delete_column(u'orm_recipe', 'up_id')
+
+ # Deleting field 'Recipe.up_date'
+ db.delete_column(u'orm_recipe', 'up_date')
+
+ # Deleting field 'Layer.layer_source'
+ db.delete_column(u'orm_layer', 'layer_source_id')
+
+ # Deleting field 'Layer.up_id'
+ db.delete_column(u'orm_layer', 'up_id')
+
+ # Deleting field 'Layer.up_date'
+ db.delete_column(u'orm_layer', 'up_date')
+
+ # Deleting field 'Layer.vcs_url'
+ db.delete_column(u'orm_layer', 'vcs_url')
+
+ # Deleting field 'Layer.vcs_web_file_base_url'
+ db.delete_column(u'orm_layer', 'vcs_web_file_base_url')
+
+ # Deleting field 'Layer.summary'
+ db.delete_column(u'orm_layer', 'summary')
+
+ # Deleting field 'Layer.description'
+ db.delete_column(u'orm_layer', 'description')
+
+
+ # User chose to not deal with backwards NULL issues for 'Layer.local_path'
+ raise RuntimeError("Cannot reverse this migration. 'Layer.local_path' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration
+ # Changing field 'Layer.local_path'
+ db.alter_column(u'orm_layer', 'local_path', self.gf('django.db.models.fields.FilePathField')(max_length=255))
+
+ # User chose to not deal with backwards NULL issues for 'Project.branch'
+ raise RuntimeError("Cannot reverse this migration. 'Project.branch' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'Project.branch'
+ db.add_column(u'orm_project', 'branch',
+ self.gf('django.db.models.fields.CharField')(max_length=50),
+ keep_default=False)
+
+ # Deleting field 'Project.bitbake_version'
+ db.delete_column(u'orm_project', 'bitbake_version_id')
+
+ # Deleting field 'Project.release'
+ db.delete_column(u'orm_project', 'release_id')
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ 'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.toastersettingdefaultlayer': {
+ 'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py b/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py
new file mode 100644
index 0000000000..7945f15a17
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py
@@ -0,0 +1,336 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Changing field 'Package.summary'
+ db.alter_column(u'orm_package', 'summary', self.gf('django.db.models.fields.TextField')())
+
+ # Changing field 'Layer.summary'
+ db.alter_column(u'orm_layer', 'summary', self.gf('django.db.models.fields.TextField')(null=True))
+
+ # Changing field 'Recipe.summary'
+ db.alter_column(u'orm_recipe', 'summary', self.gf('django.db.models.fields.TextField')())
+
+ def backwards(self, orm):
+
+ # Changing field 'Package.summary'
+ db.alter_column(u'orm_package', 'summary', self.gf('django.db.models.fields.CharField')(max_length=200))
+
+ # Changing field 'Layer.summary'
+ db.alter_column(u'orm_layer', 'summary', self.gf('django.db.models.fields.CharField')(max_length=200, null=True))
+
+ # Changing field 'Recipe.summary'
+ db.alter_column(u'orm_recipe', 'summary', self.gf('django.db.models.fields.CharField')(max_length=100))
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ 'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.toastersettingdefaultlayer': {
+ 'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py b/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py
new file mode 100644
index 0000000000..6e664c9fc8
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py
@@ -0,0 +1,336 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Layer.vcs_web_url'
+ db.add_column(u'orm_layer', 'vcs_web_url',
+ self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
+ keep_default=False)
+
+ # Adding field 'Layer.vcs_web_tree_base_url'
+ db.add_column(u'orm_layer', 'vcs_web_tree_base_url',
+ self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Layer.vcs_web_url'
+ db.delete_column(u'orm_layer', 'vcs_web_url')
+
+ # Deleting field 'Layer.vcs_web_tree_base_url'
+ db.delete_column(u'orm_layer', 'vcs_web_tree_base_url')
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ 'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.toastersettingdefaultlayer': {
+ 'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py b/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py
new file mode 100644
index 0000000000..545c0ba586
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py
@@ -0,0 +1,359 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Release.helptext'
+ db.add_column(u'orm_release', 'helptext',
+ self.gf('django.db.models.fields.TextField')(null=True),
+ keep_default=False)
+
+
+ # Renaming column for 'Release.branch' to match new field type.
+ db.delete_column(u'orm_release', 'branch')
+
+ # Changing field 'Release.branch'
+ db.add_column(u'orm_release', 'branch', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Branch'], default=-1))
+
+ # Deleting field 'Branch.bitbake_branch'
+ db.delete_column(u'orm_branch', 'bitbake_branch')
+
+ # Adding unique constraint on 'Recipe', fields ['layer_version', 'file_path']
+ db.create_unique(u'orm_recipe', ['layer_version_id', 'file_path'])
+
+ # Adding unique constraint on 'ProjectLayer', fields ['project', 'layercommit']
+ db.create_unique(u'orm_projectlayer', ['project_id', 'layercommit_id'])
+
+
+ def backwards(self, orm):
+ # Removing unique constraint on 'ProjectLayer', fields ['project', 'layercommit']
+ db.delete_unique(u'orm_projectlayer', ['project_id', 'layercommit_id'])
+
+ # Removing unique constraint on 'Recipe', fields ['layer_version', 'file_path']
+ db.delete_unique(u'orm_recipe', ['layer_version_id', 'file_path'])
+
+ # Deleting field 'Release.helptext'
+ db.delete_column(u'orm_release', 'helptext')
+
+ # Renaming column for 'Release.branch' to match new field type.
+ db.rename_column(u'orm_release', 'branch_id', 'branch')
+ # Changing field 'Release.branch'
+ db.alter_column(u'orm_release', 'branch', self.gf('django.db.models.fields.CharField')(max_length=32))
+ # Adding field 'Branch.bitbake_branch'
+ db.add_column(u'orm_branch', 'bitbake_branch',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=50, blank=True),
+ keep_default=False)
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Branch']"}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.toastersettingdefaultlayer': {
+ 'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm']
diff --git a/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py b/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py
new file mode 100644
index 0000000000..6685b55640
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py
@@ -0,0 +1,396 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Deleting model 'ToasterSettingDefaultLayer'
+ db.delete_table(u'orm_toastersettingdefaultlayer')
+
+ # Adding model 'ReleaseLayerSourcePriority'
+ db.create_table(u'orm_releaselayersourcepriority', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('release', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release'])),
+ ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.LayerSource'])),
+ ('priority', self.gf('django.db.models.fields.IntegerField')(default=0)),
+ ))
+ db.send_create_signal(u'orm', ['ReleaseLayerSourcePriority'])
+
+ # Adding unique constraint on 'ReleaseLayerSourcePriority', fields ['release', 'layer_source']
+ db.create_unique(u'orm_releaselayersourcepriority', ['release_id', 'layer_source_id'])
+
+ # Deleting field 'Release.branch'
+ db.delete_column(u'orm_release', 'branch_id')
+
+ # Adding field 'Release.branch_name'
+ db.add_column(u'orm_release', 'branch_name',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=50),
+ keep_default=False)
+
+ # Adding unique constraint on 'LayerSource', fields ['name']
+ db.create_unique(u'orm_layersource', ['name'])
+
+ # Deleting field 'ReleaseDefaultLayer.layer'
+ db.delete_column(u'orm_releasedefaultlayer', 'layer_id')
+
+ # Adding field 'ReleaseDefaultLayer.layer_name'
+ db.add_column(u'orm_releasedefaultlayer', 'layer_name',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=100),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Removing unique constraint on 'LayerSource', fields ['name']
+ db.delete_unique(u'orm_layersource', ['name'])
+
+ # Removing unique constraint on 'ReleaseLayerSourcePriority', fields ['release', 'layer_source']
+ db.delete_unique(u'orm_releaselayersourcepriority', ['release_id', 'layer_source_id'])
+
+ # Adding model 'ToasterSettingDefaultLayer'
+ db.create_table(u'orm_toastersettingdefaultlayer', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
+ ))
+ db.send_create_signal(u'orm', ['ToasterSettingDefaultLayer'])
+
+ # Deleting model 'ReleaseLayerSourcePriority'
+ db.delete_table(u'orm_releaselayersourcepriority')
+
+
+ # User chose to not deal with backwards NULL issues for 'Release.branch'
+ raise RuntimeError("Cannot reverse this migration. 'Release.branch' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'Release.branch'
+ db.add_column(u'orm_release', 'branch',
+ self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Branch']),
+ keep_default=False)
+
+ # Deleting field 'Release.branch_name'
+ db.delete_column(u'orm_release', 'branch_name')
+
+
+ # User chose to not deal with backwards NULL issues for 'ReleaseDefaultLayer.layer'
+ raise RuntimeError("Cannot reverse this migration. 'ReleaseDefaultLayer.layer' and its values cannot be restored.")
+
+ # The following code is provided here to aid in writing a correct migration # Adding field 'ReleaseDefaultLayer.layer'
+ db.add_column(u'orm_releasedefaultlayer', 'layer',
+ self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer']),
+ keep_default=False)
+
+ # Deleting field 'ReleaseDefaultLayer.layer_name'
+ db.delete_column(u'orm_releasedefaultlayer', 'layer_name')
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.releaselayersourcepriority': {
+ 'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py b/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py
new file mode 100644
index 0000000000..7284bb8429
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py
@@ -0,0 +1,331 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Layer_Version.project'
+ db.add_column(u'orm_layer_version', 'project',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Project'], null=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Layer_Version.project'
+ db.delete_column(u'orm_layer_version', 'project_id')
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.releaselayersourcepriority': {
+ 'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py b/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py
new file mode 100644
index 0000000000..0dce9ead20
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py
@@ -0,0 +1,342 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'BuildArtifact'
+ db.create_table(u'orm_buildartifact', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'])),
+ ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
+ ('file_size', self.gf('django.db.models.fields.IntegerField')()),
+ ))
+ db.send_create_signal(u'orm', ['BuildArtifact'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'BuildArtifact'
+ db.delete_table(u'orm_buildartifact')
+
+
+ models = {
+ u'orm.bitbakeversion': {
+ 'Meta': {'object_name': 'BitbakeVersion'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.branch': {
+ 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.build': {
+ 'Meta': {'object_name': 'Build'},
+ 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
+ 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
+ },
+ u'orm.buildartifact': {
+ 'Meta': {'object_name': 'BuildArtifact'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ u'orm.helptext': {
+ 'Meta': {'object_name': 'HelpText'},
+ 'area': ('django.db.models.fields.IntegerField', [], {}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'text': ('django.db.models.fields.TextField', [], {})
+ },
+ u'orm.layer': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
+ 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
+ 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
+ },
+ u'orm.layer_version': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
+ 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
+ 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
+ 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.layersource': {
+ 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
+ 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
+ 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.layerversiondependency': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.logmessage': {
+ 'Meta': {'object_name': 'LogMessage'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
+ },
+ u'orm.machine': {
+ 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
+ },
+ u'orm.package': {
+ 'Meta': {'object_name': 'Package'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
+ 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.package_dependency': {
+ 'Meta': {'object_name': 'Package_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
+ },
+ u'orm.package_file': {
+ 'Meta': {'object_name': 'Package_File'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {})
+ },
+ u'orm.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
+ 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ u'orm.projectlayer': {
+ 'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
+ 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
+ },
+ u'orm.projecttarget': {
+ 'Meta': {'object_name': 'ProjectTarget'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
+ },
+ u'orm.projectvariable': {
+ 'Meta': {'object_name': 'ProjectVariable'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.recipe': {
+ 'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
+ 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
+ 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
+ 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
+ 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'orm.recipe_dependency': {
+ 'Meta': {'object_name': 'Recipe_Dependency'},
+ 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
+ },
+ u'orm.release': {
+ 'Meta': {'object_name': 'Release'},
+ 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
+ 'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
+ },
+ u'orm.releasedefaultlayer': {
+ 'Meta': {'object_name': 'ReleaseDefaultLayer'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.releaselayersourcepriority': {
+ 'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
+ 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
+ },
+ u'orm.target': {
+ 'Meta': {'object_name': 'Target'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'orm.target_file': {
+ 'Meta': {'object_name': 'Target_File'},
+ 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
+ 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
+ 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_image_file': {
+ 'Meta': {'object_name': 'Target_Image_File'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
+ 'file_size': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.target_installed_package': {
+ 'Meta': {'object_name': 'Target_Installed_Package'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
+ },
+ u'orm.task': {
+ 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
+ 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
+ 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
+ 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
+ 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
+ },
+ u'orm.task_dependency': {
+ 'Meta': {'object_name': 'Task_Dependency'},
+ 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
+ },
+ u'orm.toastersetting': {
+ 'Meta': {'object_name': 'ToasterSetting'},
+ 'helptext': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'orm.variable': {
+ 'Meta': {'object_name': 'Variable'},
+ 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
+ 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ },
+ u'orm.variablehistory': {
+ 'Meta': {'object_name': 'VariableHistory'},
+ 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
+ }
+ }
+
+ complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index b67afe139c..5eff955453 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -20,13 +20,134 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.db import models
-from django.db.models import F
-from django.utils.encoding import python_2_unicode_compatible
+from django.db.models import F, Q
+from django.utils import timezone
+
+
+from django.core import validators
+from django.conf import settings
+
+class GitURLValidator(validators.URLValidator):
+ import re
+ regex = re.compile(
+ r'^(?:ssh|git|http|ftp)s?://' # http:// or https://
+ r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
+ r'localhost|' # localhost...
+ r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4
+ r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6
+ r'(?::\d+)?' # optional port
+ r'(?:/?|[/?]\S+)$', re.IGNORECASE)
+
+def GitURLField(**kwargs):
+ r = models.URLField(**kwargs)
+ for i in xrange(len(r.validators)):
+ if isinstance(r.validators[i], validators.URLValidator):
+ r.validators[i] = GitURLValidator()
+ return r
+
+
+class ToasterSetting(models.Model):
+ name = models.CharField(max_length=63)
+ helptext = models.TextField()
+ value = models.CharField(max_length=255)
+
+ def __unicode__(self):
+ return "Setting %s" % self.name
+
+class ProjectManager(models.Manager):
+ def create_project(self, name, release):
+ prj = self.model(name = name, bitbake_version = release.bitbake_version, release = release)
+ prj.save()
+
+ for defaultconf in ToasterSetting.objects.filter(name__startswith="DEFCONF_"):
+ name = defaultconf.name[8:]
+ ProjectVariable.objects.create( project = prj,
+ name = name,
+ value = defaultconf.value)
+
+
+ for rdl in release.releasedefaultlayer_set.all():
+ lv = Layer_Version.objects.filter(layer__name = rdl.layer_name, up_branch__name = release.branch_name)[0].get_equivalents_wpriority(prj)[0]
+ ProjectLayer.objects.create( project = prj,
+ layercommit = lv,
+ optional = False )
+
+ return prj
+
+ def create(self, *args, **kwargs):
+ raise Exception("Invalid call to Project.objects.create. Use Project.objects.create_project() to create a project")
+
+ def get_or_create(self, *args, **kwargs):
+ raise Exception("Invalid call to Project.objects.get_or_create. Use Project.objects.create_project() to create a project")
class Project(models.Model):
+ search_allowed_fields = ['name', 'short_description', 'release__name', 'release__branch_name']
name = models.CharField(max_length=100)
+ short_description = models.CharField(max_length=50, blank=True)
+ bitbake_version = models.ForeignKey('BitbakeVersion')
+ release = models.ForeignKey("Release")
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
+ # This is a horrible hack; since Toaster has no "User" model available when
+ # running in interactive mode, we can't reference the field here directly
+ # Instead, we keep a possible null reference to the User id, as not to force
+ # hard links to possibly missing models
+ user_id = models.IntegerField(null = True)
+ objects = ProjectManager()
+
+ def __unicode__(self):
+ return "%s (%s, %s)" % (self.name, self.release, self.bitbake_version)
+
+ # returns a queryset of compatible layers for a project
+ def compatible_layerversions(self, release = None, layer_name = None):
+ if release == None:
+ release = self.release
+ # layers on the same branch or layers specifically set for this project
+ queryset = Layer_Version.objects.filter((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self))
+ if layer_name is not None:
+ # we select only a layer name
+ queryset = queryset.filter(layer__name = layer_name)
+
+ # order by layer version priority
+ queryset = queryset.filter(layer_source__releaselayersourcepriority__release = release).order_by("-layer_source__releaselayersourcepriority__priority")
+
+ return queryset
+
+ # returns a set of layer-equivalent set of layers already in project
+ def projectlayer_equivalent_set(self):
+ return [j for i in [x.layercommit.get_equivalents_wpriority(self) for x in self.projectlayer_set.all()] for j in i]
+
+ def schedule_build(self):
+ from bldcontrol.models import BuildRequest, BRTarget, BRLayer, BRVariable, BRBitbake
+ br = BuildRequest.objects.create(project = self)
+ try:
+
+ BRBitbake.objects.create(req = br,
+ giturl = self.bitbake_version.giturl,
+ commit = self.bitbake_version.branch,
+ dirpath = self.bitbake_version.dirpath)
+
+ for l in self.projectlayer_set.all().order_by("pk"):
+ commit = l.layercommit.commit
+ print("ii Building layer ", l.layercommit.layer.name, " at commit ", commit)
+ if l.layercommit.up_branch:
+ commit = l.layercommit.up_branch.name
+ print("ii Building layer ", l.layercommit.layer.name, " at upbranch ", commit)
+ if l.layercommit.branch:
+ commit = l.layercommit.branch
+ print("ii Building layer ", l.layercommit.layer.name, " at actual_branch ", commit)
+ BRLayer.objects.create(req = br, name = l.layercommit.layer.name, giturl = l.layercommit.layer.vcs_url, commit = commit, dirpath = l.layercommit.dirpath)
+ for t in self.projecttarget_set.all():
+ BRTarget.objects.create(req = br, target = t.target, task = t.task)
+ for v in self.projectvariable_set.all():
+ BRVariable.objects.create(req = br, name = v.name, value = v.value)
+
+ br.state = BuildRequest.REQ_QUEUED
+ br.save()
+ except Exception as e:
+ br.delete()
+ raise e
+ return br
class Build(models.Model):
SUCCEEDED = 0
@@ -55,15 +176,60 @@ class Build(models.Model):
build_name = models.CharField(max_length=100)
bitbake_version = models.CharField(max_length=50)
+ def completeper(self):
+ tf = Task.objects.filter(build = self)
+ tfc = tf.count()
+ if tfc > 0:
+ completeper = tf.exclude(order__isnull=True).count()*100/tf.count()
+ else:
+ completeper = 0
+ return completeper
+
+ def eta(self):
+ from django.utils import timezone
+ eta = timezone.now()
+ completeper = self.completeper()
+ if self.completeper() > 0:
+ eta = timezone.now() + ((timezone.now() - self.started_on)*(100-completeper)/completeper)
+ return eta
+
+
def get_sorted_target_list(self):
tgts = Target.objects.filter(build_id = self.id).order_by( 'target' );
return( tgts );
+ @property
+ def toaster_exceptions(self):
+ return self.logmessage_set.filter(level=LogMessage.EXCEPTION)
+
+
+# an Artifact is anything that results from a Build, and may be of interest to the user, and is not stored elsewhere
+class BuildArtifact(models.Model):
+ build = models.ForeignKey(Build)
+ file_name = models.FilePathField()
+ file_size = models.IntegerField()
+
+
+ def get_local_file_name(self):
+ try:
+ deploydir = Variable.objects.get(build = self.build, variable_name="DEPLOY_DIR").variable_value
+ return self.file_name[len(deploydir)+1:]
+ except:
+ raise
+
+ return self.file_name
+
+
+ def is_available(self):
+ if settings.MANAGED and build.project is not None:
+ return build.buildrequest.environment.has_artifact(file_path)
+ return False
+
class ProjectTarget(models.Model):
project = models.ForeignKey(Project)
target = models.CharField(max_length=100)
+ task = models.CharField(max_length=100, null=True)
-@python_2_unicode_compatible
class Target(models.Model):
search_allowed_fields = ['target', 'file_name']
build = models.ForeignKey(Build)
@@ -75,7 +241,7 @@ class Target(models.Model):
def package_count(self):
return Target_Installed_Package.objects.filter(target_id__exact=self.id).count()
- def __str__(self):
+ def __unicode__(self):
return self.target
class Target_Image_File(models.Model):
@@ -237,7 +403,7 @@ class Package(models.Model):
installed_name = models.CharField(max_length=100, default='')
version = models.CharField(max_length=100, blank=True)
revision = models.CharField(max_length=32, blank=True)
- summary = models.CharField(max_length=200, blank=True)
+ summary = models.TextField(blank=True)
description = models.TextField(blank=True)
size = models.IntegerField(default=0)
installed_size = models.IntegerField(default=0)
@@ -270,10 +436,10 @@ class Package_Dependency(models.Model):
(TYPE_RREPLACES, "replaces"),
(TYPE_RCONFLICTS, "conflicts"),
)
- ''' Indexed by dep_type, in view order, key for short name and help
+ """ Indexed by dep_type, in view order, key for short name and help
description which when viewed will be printf'd with the
package name.
- '''
+ """
DEPENDS_DICT = {
TYPE_RDEPENDS : ("depends", "%s is required to run %s"),
TYPE_TRDEPENDS : ("depends", "%s is required to run %s"),
@@ -301,11 +467,16 @@ class Package_File(models.Model):
size = models.IntegerField()
class Recipe(models.Model):
- search_allowed_fields = ['name', 'version', 'file_path', 'section', 'license', 'layer_version__layer__name', 'layer_version__branch', 'layer_version__commit', 'layer_version__layer__local_path']
- name = models.CharField(max_length=100, blank=True)
- version = models.CharField(max_length=100, blank=True)
+ search_allowed_fields = ['name', 'version', 'file_path', 'section', 'description', 'license', 'layer_version__layer__name', 'layer_version__branch', 'layer_version__commit', 'layer_version__layer__local_path', 'layer_version__layer_source__name']
+
+ layer_source = models.ForeignKey('LayerSource', default = None, null = True) # from where did we get this recipe
+ up_id = models.IntegerField(null = True, default = None) # id of entry in the source
+ up_date = models.DateTimeField(null = True, default = None)
+
+ name = models.CharField(max_length=100, blank=True) # pn
+ version = models.CharField(max_length=100, blank=True) # pv
layer_version = models.ForeignKey('Layer_Version', related_name='recipe_layer_version')
- summary = models.CharField(max_length=100, blank=True)
+ summary = models.TextField(blank=True)
description = models.TextField(blank=True)
section = models.CharField(max_length=100, blank=True)
license = models.CharField(max_length=200, blank=True)
@@ -313,6 +484,30 @@ class Recipe(models.Model):
bugtracker = models.URLField(blank=True)
file_path = models.FilePathField(max_length=255)
+ def get_vcs_link_url(self):
+ if self.layer_version.layer.vcs_web_file_base_url is None:
+ return ""
+ return self.layer_version.layer.vcs_web_file_base_url.replace('%path%', self.file_path).replace('%branch%', self.layer_version.up_branch.name)
+
+ def get_layersource_view_url(self):
+ if self.layer_source is None:
+ return ""
+
+ url = self.layer_source.get_object_view(self.layer_version.up_branch, "recipes", self.name)
+ return url
+
+ def __unicode__(self):
+ return "Recipe " + self.name + ":" + self.version
+
+ def get_local_path(self):
+ if settings.MANAGED and self.layer_version.build.project is not None:
+ return self.file_path[len(self.layer_version.layer.local_path)+1:]
+
+ return self.file_path
+
+ class Meta:
+ unique_together = ("layer_version", "file_path")
+
class Recipe_DependencyManager(models.Manager):
use_for_related_fields = True
@@ -332,25 +527,472 @@ class Recipe_Dependency(models.Model):
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
objects = Recipe_DependencyManager()
-class ProjectLayer(models.Model):
- project = models.ForeignKey(Project)
- name = models.CharField(max_length = 100)
- giturl = models.CharField(max_length = 254)
- commit = models.CharField(max_length = 254)
+class Machine(models.Model):
+ search_allowed_fields = ["name", "description"]
+ layer_source = models.ForeignKey('LayerSource', default = None, null = True) # from where did we get this machine
+ up_id = models.IntegerField(null = True, default = None) # id of entry in the source
+ up_date = models.DateTimeField(null = True, default = None)
+
+ layer_version = models.ForeignKey('Layer_Version')
+ name = models.CharField(max_length=255)
+ description = models.CharField(max_length=255)
+
+ def __unicode__(self):
+ return "Machine " + self.name + "(" + self.description + ")"
+
+ class Meta:
+ unique_together = ("layer_source", "up_id")
+
+
+from django.db.models.base import ModelBase
+
+class InheritanceMetaclass(ModelBase):
+ def __call__(cls, *args, **kwargs):
+ obj = super(InheritanceMetaclass, cls).__call__(*args, **kwargs)
+ return obj.get_object()
+
+
+class LayerSource(models.Model):
+ __metaclass__ = InheritanceMetaclass
+
+ class Meta:
+ unique_together = (('sourcetype', 'apiurl'), )
+
+ TYPE_LOCAL = 0
+ TYPE_LAYERINDEX = 1
+ TYPE_IMPORTED = 2
+ SOURCE_TYPE = (
+ (TYPE_LOCAL, "local"),
+ (TYPE_LAYERINDEX, "layerindex"),
+ (TYPE_IMPORTED, "imported"),
+ )
+
+ name = models.CharField(max_length=63, unique = True)
+ sourcetype = models.IntegerField(choices=SOURCE_TYPE)
+ apiurl = models.CharField(max_length=255, null=True, default=None)
+
+ def update(self):
+ """
+ Updates the local database information from the upstream layer source
+ """
+ raise Exception("Abstract, update() must be implemented by all LayerSource-derived classes (object is %s)" % str(vars(self)))
+
+ def save(self, *args, **kwargs):
+ if isinstance(self, LocalLayerSource):
+ self.sourcetype = LayerSource.TYPE_LOCAL
+ elif isinstance(self, LayerIndexLayerSource):
+ self.sourcetype = LayerSource.TYPE_LAYERINDEX
+ elif isinstance(self, ImportedLayerSource):
+ self.sourcetype = LayerSource.TYPE_IMPORTED
+ elif self.sourcetype == None:
+ raise Exception("Unknown LayerSource-derived class. If you added a new layer source type, fill out all code stubs.")
+ return super(LayerSource, self).save(*args, **kwargs)
+
+ def get_object(self):
+ if self.sourcetype == LayerSource.TYPE_LOCAL:
+ self.__class__ = LocalLayerSource
+ elif self.sourcetype == LayerSource.TYPE_LAYERINDEX:
+ self.__class__ = LayerIndexLayerSource
+ elif self.sourcetype == LayerSource.TYPE_IMPORTED:
+ self.__class__ = ImportedLayerSource
+ else:
+ raise Exception("Unknown LayerSource type. If you added a new layer source type, fill out all code stubs.")
+ return self
+
+ def __unicode__(self):
+ return "%s (%s)" % (self.name, self.sourcetype)
+
+
+class LocalLayerSource(LayerSource):
+ class Meta(LayerSource._meta.__class__):
+ proxy = True
+
+ def __init__(self, *args, **kwargs):
+ super(LocalLayerSource, self).__init__(args, kwargs)
+ self.sourcetype = LayerSource.TYPE_LOCAL
+
+ def update(self):
+ """
+ Fetches layer, recipe and machine information from local repository
+ """
+ pass
+
+class ImportedLayerSource(LayerSource):
+ class Meta(LayerSource._meta.__class__):
+ proxy = True
+
+ def __init__(self, *args, **kwargs):
+ super(ImportedLayerSource, self).__init__(args, kwargs)
+ self.sourcetype = LayerSource.TYPE_IMPORTED
+
+ def update(self):
+ """
+ Fetches layer, recipe and machine information from local repository
+ """
+ pass
+
+
+class LayerIndexLayerSource(LayerSource):
+ class Meta(LayerSource._meta.__class__):
+ proxy = True
+
+ def __init__(self, *args, **kwargs):
+ super(LayerIndexLayerSource, self).__init__(args, kwargs)
+ self.sourcetype = LayerSource.TYPE_LAYERINDEX
+
+ def get_object_view(self, branch, objectype, upid):
+ if self != branch.layer_source:
+ raise Exception("Invalid branch specification")
+ return self.apiurl + "../branch/" + branch.name + "/" + objectype + "/?q=" + str(upid)
+
+ def update(self):
+ """
+ Fetches layer, recipe and machine information from remote repository
+ """
+ assert self.apiurl is not None
+ from django.db import IntegrityError
+
+ import httplib, urlparse, json
+ import os
+ proxy_settings = os.environ.get("http_proxy", None)
+
+ def _get_json_response(apiurl = self.apiurl):
+ conn = None
+ _parsedurl = urlparse.urlparse(apiurl)
+ path = _parsedurl.path
+ query = _parsedurl.query
+ def parse_url(url):
+ parsedurl = urlparse.urlparse(url)
+ try:
+ (host, port) = parsedurl.netloc.split(":")
+ except ValueError:
+ host = parsedurl.netloc
+ port = None
+
+ if port is None:
+ port = 80
+ else:
+ port = int(port)
+ return (host, port)
+
+ if proxy_settings is None:
+ host, port = parse_url(apiurl)
+ conn = httplib.HTTPConnection(host, port)
+ conn.request("GET", path + "?" + query)
+ else:
+ host, port = parse_url(proxy_settings)
+ conn = httplib.HTTPConnection(host, port)
+ conn.request("GET", apiurl)
+
+ r = conn.getresponse()
+ if r.status != 200:
+ raise Exception("Failed to read " + path + ": %d %s" % (r.status, r.reason))
+ return json.loads(r.read())
+
+ # verify we can get the basic api
+ try:
+ apilinks = _get_json_response()
+ except Exception as e:
+ import traceback
+ if proxy_settings is not None:
+ print "EE: Using proxy ", proxy_settings
+ print "EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc(e))
+ return
+
+ # update branches; only those that we already have names listed in the Releases table
+ whitelist_branch_names = map(lambda x: x.branch_name, Release.objects.all())
+
+ branches_info = _get_json_response(apilinks['branches']
+ + "?filter=name:%s" % "OR".join(whitelist_branch_names))
+ for bi in branches_info:
+ b, created = Branch.objects.get_or_create(layer_source = self, name = bi['name'])
+ b.up_id = bi['id']
+ b.up_date = bi['updated']
+ b.name = bi['name']
+ b.short_description = bi['short_description']
+ b.save()
+
+ # update layers
+ layers_info = _get_json_response(apilinks['layerItems'])
+ for li in layers_info:
+ l, created = Layer.objects.get_or_create(layer_source = self, name = li['name'])
+ l.up_id = li['id']
+ l.up_date = li['updated']
+ l.vcs_url = li['vcs_url']
+ l.vcs_web_url = li['vcs_web_url']
+ l.vcs_web_tree_base_url = li['vcs_web_tree_base_url']
+ l.vcs_web_file_base_url = li['vcs_web_file_base_url']
+ l.summary = li['summary']
+ l.description = li['description']
+ l.save()
+
+ # update layerbranches/layer_versions
+ layerbranches_info = _get_json_response(apilinks['layerBranches']
+ + "?filter=branch:%s" % "OR".join(map(lambda x: str(x.up_id), [i for i in Branch.objects.filter(layer_source = self) if i.up_id is not None] ))
+ )
+ for lbi in layerbranches_info:
+ lv, created = Layer_Version.objects.get_or_create(layer_source = self,
+ up_id = lbi['id'],
+ layer=Layer.objects.get(layer_source = self, up_id = lbi['layer'])
+ )
+
+ lv.up_date = lbi['updated']
+ lv.up_branch = Branch.objects.get(layer_source = self, up_id = lbi['branch'])
+ lv.branch = lbi['actual_branch']
+ lv.commit = lbi['actual_branch']
+ lv.dirpath = lbi['vcs_subdir']
+ lv.save()
+
+ # update layer dependencies
+ layerdependencies_info = _get_json_response(apilinks['layerDependencies'])
+ dependlist = {}
+ for ldi in layerdependencies_info:
+ try:
+ lv = Layer_Version.objects.get(layer_source = self, up_id = ldi['layerbranch'])
+ except Layer_Version.DoesNotExist as e:
+ continue
+
+ if lv not in dependlist:
+ dependlist[lv] = []
+ try:
+ dependlist[lv].append(Layer_Version.objects.get(layer_source = self, layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
+ except Layer_Version.DoesNotExist as e:
+ print "Cannot find layer version ", self, ldi['dependency'], lv.up_branch
+ raise e
+
+ for lv in dependlist:
+ LayerVersionDependency.objects.filter(layer_version = lv).delete()
+ for lvd in dependlist[lv]:
+ LayerVersionDependency.objects.get_or_create(layer_version = lv, depends_on = lvd)
+
+
+ # update machines
+ machines_info = _get_json_response(apilinks['machines']
+ + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
+ )
+ for mi in machines_info:
+ mo, created = Machine.objects.get_or_create(layer_source = self, up_id = mi['id'], layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch']))
+ mo.up_date = mi['updated']
+ mo.name = mi['name']
+ mo.description = mi['description']
+ mo.save()
+
+ # update recipes; paginate by layer version / layer branch
+ recipes_info = _get_json_response(apilinks['recipes']
+ + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
+ )
+ for ri in recipes_info:
+ try:
+ ro, created = Recipe.objects.get_or_create(layer_source = self, up_id = ri['id'], layer_version = Layer_Version.objects.get(layer_source = self, up_id = ri['layerbranch']))
+ ro.up_date = ri['updated']
+ ro.name = ri['pn']
+ ro.version = ri['pv']
+ ro.summary = ri['summary']
+ ro.description = ri['description']
+ ro.section = ri['section']
+ ro.license = ri['license']
+ ro.homepage = ri['homepage']
+ ro.bugtracker = ri['bugtracker']
+ ro.file_path = ri['filepath'] + "/" + ri['filename']
+ ro.save()
+ except:
+ print "Duplicate Recipe, ignoring: ", vars(ro)
+ pass
+ pass
+
+class BitbakeVersion(models.Model):
+
+ name = models.CharField(max_length=32, unique = True)
+ giturl = GitURLField()
+ branch = models.CharField(max_length=32)
+ dirpath = models.CharField(max_length=255)
+
+ def __unicode__(self):
+ return "%s (%s)" % (self.name, self.branch)
+
+
+class Release(models.Model):
+ """ A release is a project template, used to pre-populate Project settings with a configuration set """
+ name = models.CharField(max_length=32, unique = True)
+ description = models.CharField(max_length=255)
+ bitbake_version = models.ForeignKey(BitbakeVersion)
+ branch_name = models.CharField(max_length=50, default = "")
+ helptext = models.TextField(null=True)
+
+ def __unicode__(self):
+ return "%s (%s)" % (self.name, self.branch_name)
+
+class ReleaseLayerSourcePriority(models.Model):
+ """ Each release selects layers from the set up layer sources, ordered by priority """
+ release = models.ForeignKey("Release")
+ layer_source = models.ForeignKey("LayerSource")
+ priority = models.IntegerField(default = 0)
+
+ def __unicode__(self):
+ return "%s-%s:%d" % (self.release.name, self.layer_source.name, self.priority)
+ class Meta:
+ unique_together = (('release', 'layer_source'),)
+
+
+class ReleaseDefaultLayer(models.Model):
+ release = models.ForeignKey(Release)
+ layer_name = models.CharField(max_length=100, default="")
+
+
+# Branch class is synced with layerindex.Branch, branches can only come from remote layer indexes
+class Branch(models.Model):
+ layer_source = models.ForeignKey('LayerSource', null = True, default = True)
+ up_id = models.IntegerField(null = True, default = None) # id of branch in the source
+ up_date = models.DateTimeField(null = True, default = None)
+
+ name = models.CharField(max_length=50)
+ short_description = models.CharField(max_length=50, blank=True)
+
+ class Meta:
+ verbose_name_plural = "Branches"
+ unique_together = (('layer_source', 'name'),('layer_source', 'up_id'))
+
+ def __unicode__(self):
+ return self.name
+
+
+# Layer class synced with layerindex.LayerItem
class Layer(models.Model):
+ layer_source = models.ForeignKey(LayerSource, null = True, default = None) # from where did we got this layer
+ up_id = models.IntegerField(null = True, default = None) # id of layer in the remote source
+ up_date = models.DateTimeField(null = True, default = None)
+
name = models.CharField(max_length=100)
- local_path = models.FilePathField(max_length=255)
+ local_path = models.FilePathField(max_length=255, null = True, default = None)
layer_index_url = models.URLField()
+ vcs_url = GitURLField(default = None, null = True)
+ vcs_web_url = models.URLField(null = True, default = None)
+ vcs_web_tree_base_url = models.URLField(null = True, default = None)
+ vcs_web_file_base_url = models.URLField(null = True, default = None)
+ summary = models.TextField(help_text='One-line description of the layer', null = True, default = None)
+ description = models.TextField(null = True, default = None)
+ def __unicode__(self):
+ return "%s / %s " % (self.name, self.layer_source)
+
+ class Meta:
+ unique_together = (("layer_source", "up_id"), ("layer_source", "name"))
+
+
+# LayerCommit class is synced with layerindex.LayerBranch
class Layer_Version(models.Model):
- build = models.ForeignKey(Build, related_name='layer_version_build')
+ search_allowed_fields = ["layer__name", "layer__summary", "layer__description", "layer__vcs_url", "dirpath", "up_branch__name", "commit", "branch"]
+ build = models.ForeignKey(Build, related_name='layer_version_build', default = None, null = True)
layer = models.ForeignKey(Layer, related_name='layer_version_layer')
- branch = models.CharField(max_length=50)
- commit = models.CharField(max_length=100)
- priority = models.IntegerField()
+ layer_source = models.ForeignKey(LayerSource, null = True, default = None) # from where did we get this Layer Version
+ up_id = models.IntegerField(null = True, default = None) # id of layerbranch in the remote source
+ up_date = models.DateTimeField(null = True, default = None)
+ up_branch = models.ForeignKey(Branch, null = True, default = None)
+
+ branch = models.CharField(max_length=80) # LayerBranch.actual_branch
+ commit = models.CharField(max_length=100) # LayerBranch.vcs_last_rev
+ dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir
+ priority = models.IntegerField(default = 0) # if -1, this is a default layer
+
+ project = models.ForeignKey('Project', null = True, default = None) # Set if this layer is project-specific; always set for imported layers, and project-set branches
+
+ # code lifted, with adaptations, from the layerindex-web application https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/
+ def _handle_url_path(self, base_url, path):
+ import re
+ if base_url:
+ if self.dirpath:
+ if path:
+ extra_path = self.dirpath + '/' + path
+ # Normalise out ../ in path for usage URL
+ extra_path = posixpath.normpath(extra_path)
+ # Minor workaround to handle case where subdirectory has been added between branches
+ # (should probably support usage URL per branch to handle this... sigh...)
+ if extra_path.startswith('../'):
+ extra_path = extra_path[3:]
+ else:
+ extra_path = self.dirpath
+ else:
+ extra_path = path
+ branchname = self.up_branch.name
+ url = base_url.replace('%branch%', branchname)
+
+ # If there's a % in the path (e.g. a wildcard bbappend) we need to encode it
+ if extra_path:
+ extra_path = extra_path.replace('%', '%25')
+
+ if '%path%' in base_url:
+ if extra_path:
+ url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '\\1', url)
+ else:
+ url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '', url)
+ return url.replace('%path%', extra_path)
+ else:
+ return url + extra_path
+ return None
+
+ def get_vcs_link_url(self):
+ if self.layer.vcs_web_url is None:
+ return None
+ return self.layer.vcs_web_url
+
+ def get_vcs_file_link_url(self, file_path=""):
+ if self.layer.vcs_web_file_base_url is None:
+ return None
+ return self._handle_url_path(self.layer.vcs_web_file_base_url, file_path)
+
+ def get_vcs_dirpath_link_url(self):
+ if self.layer.vcs_web_tree_base_url is None:
+ return None
+ return self._handle_url_path(self.layer.vcs_web_tree_base_url, '')
+
+ def get_equivalents_wpriority(self, project):
+ """ Returns an ordered layerversion list that satisfies a LayerVersionDependency using the layer name and the current Project Releases' LayerSource priority """
+ def _get_ls_priority(ls):
+ try:
+ return ls.releaselayersourcepriority_set.get(release=project.release).priority
+ except ReleaseLayerSourcePriority.DoesNotExist:
+ raise
+ return sorted(
+ Layer_Version.objects.filter( layer__name = self.layer.name, up_branch__name = self.up_branch.name ),
+ key = lambda x: _get_ls_priority(x.layer_source),
+ reverse = True)
+
+ def get_vcs_reference(self):
+ if self.commit is not None and len(self.commit) > 0:
+ return self.commit
+ if self.branch is not None and len(self.branch) > 0:
+ return self.branch
+ return self.up_branch.name
+
+ def __unicode__(self):
+ return str(self.layer) + " (" + self.commit +")"
+
+ class Meta:
+ unique_together = ("layer_source", "up_id")
+
+class LayerVersionDependency(models.Model):
+ layer_source = models.ForeignKey(LayerSource, null = True, default = None) # from where did we got this layer
+ up_id = models.IntegerField(null = True, default = None) # id of layerbranch in the remote source
+
+ layer_version = models.ForeignKey(Layer_Version, related_name="dependencies")
+ depends_on = models.ForeignKey(Layer_Version, related_name="dependees")
+
+ class Meta:
+ unique_together = ("layer_source", "up_id")
+
+class ProjectLayer(models.Model):
+ project = models.ForeignKey(Project)
+ layercommit = models.ForeignKey(Layer_Version, null=True)
+ optional = models.BooleanField(default = True)
+
+ def __unicode__(self):
+ return "%s, %s" % (self.project.name, self.layercommit)
+
+ class Meta:
+ unique_together = (("project", "layercommit"),)
class ProjectVariable(models.Model):
project = models.ForeignKey(Project)
@@ -384,13 +1026,15 @@ class HelpText(models.Model):
text = models.TextField()
class LogMessage(models.Model):
+ EXCEPTION = -1 # used to signal self-toaster-exceptions
INFO = 0
WARNING = 1
ERROR = 2
LOG_LEVEL = ( (INFO, "info"),
(WARNING, "warn"),
- (ERROR, "error") )
+ (ERROR, "error"),
+ (EXCEPTION, "toaster exception"))
build = models.ForeignKey(Build)
task = models.ForeignKey(Task, blank = True, null=True)
diff --git a/bitbake/lib/toaster/orm/tests.py b/bitbake/lib/toaster/orm/tests.py
new file mode 100644
index 0000000000..b965d8e50e
--- /dev/null
+++ b/bitbake/lib/toaster/orm/tests.py
@@ -0,0 +1,36 @@
+from django.test import TestCase
+from orm.models import LocalLayerSource, LayerIndexLayerSource, ImportedLayerSource, LayerSource
+from orm.models import Branch
+
+class LayerSourceVerifyInheritanceSaveLoad(TestCase):
+ def test_object_creation(self):
+ lls = LayerSource.objects.create(name = "a1", sourcetype = LayerSource.TYPE_LOCAL, apiurl = "")
+ lils = LayerSource.objects.create(name = "a2", sourcetype = LayerSource.TYPE_LAYERINDEX, apiurl = "")
+ imls = LayerSource.objects.create(name = "a3", sourcetype = LayerSource.TYPE_IMPORTED, apiurl = "")
+
+ import pprint
+ pprint.pprint([(x.__class__,vars(x)) for x in LayerSource.objects.all()])
+
+ self.assertTrue(True in map(lambda x: isinstance(x, LocalLayerSource), LayerSource.objects.all()))
+ self.assertTrue(True in map(lambda x: isinstance(x, LayerIndexLayerSource), LayerSource.objects.all()))
+ self.assertTrue(True in map(lambda x: isinstance(x, ImportedLayerSource), LayerSource.objects.all()))
+
+ def test_duplicate_error(self):
+ def duplicate():
+ LayerSource.objects.create(name = "a1", sourcetype = LayerSource.TYPE_LOCAL, apiurl = "")
+ LayerSource.objects.create(name = "a1", sourcetype = LayerSource.TYPE_LOCAL, apiurl = "")
+
+ self.assertRaises(Exception, duplicate)
+
+
+
+class LILSUpdateTestCase(TestCase):
+ def test_update(self):
+ lils = LayerSource.objects.create(name = "b1", sourcetype = LayerSource.TYPE_LAYERINDEX, apiurl = "http://adamian-desk.local:8080/layerindex/api/")
+ lils.update()
+
+ # run second update
+ # lils.update()
+
+ # print vars(lils)
+ #print map(lambda x: vars(x), Branch.objects.all())
diff --git a/bitbake/lib/toaster/orm/urls.py b/bitbake/lib/toaster/orm/urls.py
new file mode 100644
index 0000000000..961bc19070
--- /dev/null
+++ b/bitbake/lib/toaster/orm/urls.py
@@ -0,0 +1,27 @@
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+from django.conf.urls import patterns, include, url
+from django.views.generic import RedirectView
+
+urlpatterns = patterns('orm.views',
+ # landing point for pushing a bitbake_eventlog.json file to this toaster instace
+ url(r'^eventfile$', 'eventfile', name='eventfile'),
+ )
+
diff --git a/bitbake/lib/toaster/orm/views.py b/bitbake/lib/toaster/orm/views.py
new file mode 100644
index 0000000000..97d792b99e
--- /dev/null
+++ b/bitbake/lib/toaster/orm/views.py
@@ -0,0 +1,60 @@
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+from django.views.decorators.cache import cache_control
+from django.core.urlresolvers import reverse
+from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
+from django.http import HttpResponseBadRequest, HttpResponse
+from django.utils import timezone
+from django.utils.html import escape
+from datetime import timedelta
+from django.utils import formats
+from toastergui.templatetags.projecttags import json as jsonfilter
+import json
+import os
+import tempfile
+import subprocess
+import toastermain
+from django.views.decorators.csrf import csrf_exempt
+
+
+@csrf_exempt
+def eventfile(request):
+ """ Receives a file by POST, and runs toaster-eventreply on this file """
+ if request.method != "POST":
+ return HttpResponseBadRequest("This API only accepts POST requests. Post a file with:\n\ncurl -F eventlog=@bitbake_eventlog.json http[s]://[server-address]/orm/eventfile\n", content_type="text/plain;utf8")
+
+ # write temporary file
+ (handle, abstemppath) = tempfile.mkstemp(dir="/tmp/")
+ with os.fdopen(handle, "w") as tmpfile:
+ for chunk in request.FILES['eventlog'].chunks():
+ tmpfile.write(chunk)
+ tmpfile.close()
+
+ # compute the path to "bitbake/bin/toaster-eventreplay"
+ from os.path import dirname as DN
+ import_script = os.path.join(DN(DN(DN(DN(os.path.abspath(__file__))))), "bin/toaster-eventreplay")
+ if not os.path.exists(import_script):
+ raise Exception("script missing %s" % import_script)
+ scriptenv = os.environ.copy()
+ scriptenv["DATABASE_URL"] = toastermain.settings.getDATABASE_URL()
+
+ # run the data loading process and return the results
+ (out, err) = subprocess.Popen([import_script, abstemppath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=scriptenv).communicate()
+ os.remove(abstemppath)
+ return HttpResponse("%s\n%s" % (out, err), content_type="text/plain;utf8")
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index 2c283feccf..10952547b4 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -8,10 +8,15 @@
/* Styles for the help information */
.get-help { color: #CCCCCC; }
-.get-help:hover { color: #999999; cursor: pointer; }
+.get-help:hover, .icon-plus-sign:hover { color: #999999; cursor: pointer; }
.get-help-blue { color: #3A87AD; }
.get-help-blue:hover { color: #005580; cursor: pointer; }
-.manual { margin-top: 11px; }
+.get-help-yellow { color: #C09853; }
+.get-help-yellow:hover { color: #B38942; cursor: pointer; }
+.get-help-red { color: #B94A48; font-size: 16px; padding-left: 2px; }
+.get-help-red:hover { color: #943A38; cursor: pointer; }
+.build-form .get-help { margin-left: 5px; }
+.manual { margin: 11px 15px;}
.heading-help { font-size: 14px; }
/* Styles for the external link */
@@ -33,7 +38,7 @@ dd code, .alert code { white-space: pre-wrap; word-break: break-all; word-wrap:
dd ul { list-style-type: none; margin: 0px; }
dt, dd {line-height: 25px; }
dd li { line-height: 25px; }
-dd p { line-height: 20px; }
+.item-info dd { line-height: 20px; margin-bottom: 10px; }
/* Style the filter modal dialogs */
.modal { width: 800px; margin-left: -400px; }
@@ -44,6 +49,7 @@ dd p { line-height: 20px; }
/* Some extra space before headings when needed */
.details { margin-top: 30px; }
+.air { margin-top: 30px; }
/* Required classes for the highlight behaviour in tables */
.highlight { -webkit-animation: target-fade 10s 1; -moz-animation: target-fade 10s 1; animation: target-fade 10s 1; }
@@ -55,11 +61,12 @@ dd p { line-height: 20px; }
.tooltip { z-index: 2000 !important; }
/* Override default Twitter Boostrap styles for anchor tags inside tables */
-td a { color: #333333; }
-td a:hover { color: #000000; text-decoration: underline; }
+td a, td a > code { color: #333333; }
+td code { white-space: normal; }
+td a:hover, td a > code:hover { color: #000000; text-decoration: underline; }
/* Override default Twitter Bootstrap styles for tr.error */
-.table tbody tr.error > td { background-color: #FFFFFF; } /* override default Bootstrap behaviour */
+.table tbody tr.error > td { background-color: transparent; } /* override default Bootstrap behaviour */
.table-hover tbody tr.error:hover > td { background-color: #F5F5F5;} /* override default Bootstrap behaviour */
/* Right justify Bootstrap table columns for size fields */
@@ -96,6 +103,10 @@ th > a, th > span { font-weight: normal; }
.content-directory a:hover { color: #005580; text-decoration: underline; }
.symlink { color: #CCCCCC; }
+/* Styles for the navbar actions */
+.btn-group + .btn-group { margin-right: 10px; }
+.navbar-inner > .btn-group { margin-top: 6px; }
+
/* Other styles */
.dropdown-menu { padding: 10px; }
select { width: auto; }
@@ -103,7 +114,11 @@ select { width: auto; }
.top-air { margin-top: 40px;}
.progress { margin-bottom: 0px; }
.lead .badge { font-size: 18px; font-weight: normal; border-radius: 15px; padding: 9px; }
+.lead ol > li, .lead ul > li {
+ line-height: 35px;
+}
.well > .lead, .alert .lead { margin-bottom: 0px; }
+.well-transparent { background-color: transparent; }
.no-results { margin: 10px 0; }
.task-name { margin-left: 7px; }
.icon-hand-right {color: #CCCCCC; }
@@ -116,17 +131,104 @@ select { width: auto; }
/* make tables Chrome-happy (me, not so much) */
#otable { table-layout: fixed; word-wrap: break-word; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* styles for the new build button */
+.new-build .btn-primary { padding: 4px 30px; }
+.new-build .alert { margin-top: 10px; }
+.new-build .alert p { margin-top: 10px; }
+
+/* styles for showing the project name in build mode */
+.project-name { padding-top: 0; }
+.project-name .label { font-weight: normal; margin-bottom: 5px; margin-left: -15px; padding: 5px; }
+
+/* Remove bottom margin for forms inside modal dialogs */
+#dependencies_modal_form { margin-bottom: 0px; }
+
+/* Configuration styles */
+.icon-trash { color: #B94A48; font-size: 16px; padding-left: 2px; }
+.icon-trash:hover { color: #943A38; text-decoration: none; cursor: pointer; }
+.icon-pencil, .icon-download-alt, .icon-refresh, .icon-star-empty, .icon-star, .icon-tasks { font-size: 16px; color: #0088CC; padding-left: 2px; }
+.icon-pencil:hover, .icon-download-alt:hover, .icon-refresh:hover, .icon-star-empty:hover, .icon-star:hover, .icon-tasks:hover { color: #005580; text-decoration: none; cursor: pointer; }
+.icon-share { padding-left: 2px; }
+.alert-success .icon-refresh, .alert-success .icon-tasks { color: #468847; }
+.alert-success .icon-refresh:hover, .alert-success .icon-tasks:hover { color: #347132; }
+.alert-error .icon-refresh, .alert-error .icon-tasks { color: #b94a48; }
+.alert-error .icon-refresh:hover, .alert-error .icon-tasks:hover { color: #943A38; }
+.configuration-list li, .configuration-list label { line-height: 35px; font-size: 21px; font-weight: 200; margin-bottom: 0px;}
+.configuration-list { font-size: 16px; margin-bottom: 1.5em; }
+.configuration-list i { font-size: 16px; }
+/*.configuration-layers { height: 135px; overflow: scroll; }*/
+.counter { font-weight: normal; }
+.well-alert { background-color: #FCF8E3; border: 1px solid #FBEED5; border-radius: 4px; }
+.well-alert > .lead { color: #C09853; padding-bottom: .75em; }
+.configuration-alert { margin-bottom: 0px; padding: 8px 14px; }
+.configuration-alert p { margin-bottom: 0px; }
+fieldset { padding-left: 19px; }
+.project-form { margin-top: 10px; }
+.add-layers .btn-block + .btn-block, .build .btn-block + .btn-block { margin-top: 0px; }
+input.huge { font-size: 17.5px; padding: 11px 19px; }
+.build-form { margin-bottom: 0px; }
+.build-form .input-append { margin-bottom: 0px; }
+.build-form .btn-large { padding: 11px 35px; }
+.build-form p { font-size:17.5px ;margin:12px 0 0 10px;}
+#layer-container form, #target-container form { margin-bottom: 0px; }
+.btn-primary .icon-question-sign, .btn-danger .icon-question-sign { color: #fff; }
+.btn-primary .icon-question-sign:hover, .btn-danger .icon-question-sign:hover { color: #999; }
+a code { color: #0088CC; }
+a code:hover { color: #005580; }
+.localconf { font-size: 17.5px; margin-top: 40px; }
+.localconf code { font-size: 17.5px; }
+#add-layer-dependencies { margin-top: 5px; }
+.link-action { font-size: 17.5px; margin-top: 40px; }
+.link-action code { font-size: 17.5px; }
+.artifact { width: 9em; }
+.control-group { margin-bottom: 0px; }
+#project-details form { margin: 0px; }
+dd form { margin: 10px 0 0 0; }
+dl textarea { resize: vertical; }
+.navbar-fixed-top { z-index: 1; }
+.popover { z-index: 2; }
+.btn-danger .icon-trash { color: #fff; }
+.bbappends { list-style-type: none; margin-left: 0; }
+.bbappends li { line-height: 25px; }
+.configuration-list input[type="checkbox"] { margin-top:13px;margin-right:10px; }
+.alert input[type="checkbox"] { margin-top: 0px; margin-right: 3px; }
+.alert ol { padding: 10px 0px 0px 20px; }
+.alert ol > li { line-height: 35px; }
+.dl-vertical form { margin-top: 10px; }
+.scrolling { border: 1px solid #dddddd; height: 154px; overflow: auto; padding: 8px; width: 27.5%; margin-bottom: 10px; }
+.lead .help-block { font-size: 14px; line-height: 20px; font-weight: normal; }
+.button-place .btn { margin: 0 0 20px 0; }
+.tooltip-inner { max-width: 250px; }
+.new-build { padding: 20px; }
+.new-build li { line-height: 30px; }
+.new-build h6 { margin: 10px 0 0 0; color: #5a5a5a; }
+.new-build h3 { margin: 0; color: #5a5a5a; }
+.new-build form { margin: 5px 0 0; }
+.new-build .input-append { margin-bottom: 0; }
+#build-selected { margin-top: 15px; }
+div.add-deps { margin-top: 15px; }
+
+
+.animate-repeat {
+ list-style:none;
+ box-sizing:border-box;
+}
+
+.animate-repeat.ng-move,
+.animate-repeat.ng-enter,
+.animate-repeat.ng-leave {
+ -webkit-transition:all linear 0.5s;
+ transition:all linear 0.5s;
+}
+
+.animate-repeat.ng-leave.ng-leave-active,
+.animate-repeat.ng-move,
+.animate-repeat.ng-enter {
+ opacity:0;
+}
+
+.animate-repeat.ng-leave,
+.animate-repeat.ng-enter.ng-enter-active {
+ opacity:1;
+}
+.tab-pane table { margin-top: 10px; }
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular-animate.min.js b/bitbake/lib/toaster/toastergui/static/js/angular-animate.min.js
new file mode 100644
index 0000000000..591544a51a
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular-animate.min.js
@@ -0,0 +1,28 @@
+/*
+ AngularJS v1.2.23
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(F,e,O){'use strict';e.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(G,s,g){g=g.ngAnimateChildren;e.isString(g)&&0===g.length?s.data("$$ngAnimateChildren",!0):G.$watch(g,function(e){s.data("$$ngAnimateChildren",!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,s){return function(g){return e(function(){g()})}}]).config(["$provide","$animateProvider",function(G,s){function g(e){for(var g=0;g<e.length;g++){var l=e[g];if(l.nodeType==aa)return l}}
+function B(l){return e.element(g(l))}var m=e.noop,u=e.forEach,P=s.$$selectors,aa=1,l="$$ngAnimateState",V="$$ngAnimateChildren",J="ng-animate",n={running:!0};G.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document",function(z,F,$,R,E,H,O){function K(a){var b=a.data(l)||{};b.running=!0;a.data(l,b)}function L(a){if(a){var b=[],c={};a=a.substr(1).split(".");($.transitions||$.animations)&&b.push(F.get(P[""]));for(var d=0;d<a.length;d++){var f=
+a[d],e=P[f];e&&!c[f]&&(b.push(F.get(e)),c[f]=!0)}return b}}function G(a,b,c){function d(a,b){var c=a[b],d=a["before"+b.charAt(0).toUpperCase()+b.substr(1)];if(c||d)return"leave"==b&&(d=c,c=null),n.push({event:b,fn:c}),h.push({event:b,fn:d}),!0}function f(b,d,e){var f=[];u(b,function(a){a.fn&&f.push(a)});var g=0;u(f,function(b,l){var C=function(){a:{if(d){(d[l]||m)();if(++g<f.length)break a;d=null}e()}};switch(b.event){case "setClass":d.push(b.fn(a,A,k,C));break;case "addClass":d.push(b.fn(a,A||c,
+C));break;case "removeClass":d.push(b.fn(a,k||c,C));break;default:d.push(b.fn(a,C))}});d&&0===d.length&&e()}var g=a[0];if(g){var l="setClass"==b,p=l||"addClass"==b||"removeClass"==b,A,k;e.isArray(c)&&(A=c[0],k=c[1],c=A+" "+k);var x=a.attr("class")+" "+c;if(M(x)){var t=m,w=[],h=[],q=m,y=[],n=[],x=(" "+x).replace(/\s+/g,".");u(L(x),function(a){!d(a,b)&&l&&(d(a,"addClass"),d(a,"removeClass"))});return{node:g,event:b,className:c,isClassBased:p,isSetClassOperation:l,before:function(a){t=a;f(h,w,function(){t=
+m;a()})},after:function(a){q=a;f(n,y,function(){q=m;a()})},cancel:function(){w&&(u(w,function(a){(a||m)(!0)}),t(!0));y&&(u(y,function(a){(a||m)(!0)}),q(!0))}}}}}function r(a,b,c,d,f,g,n){function p(d){var e="$animate:"+d;q&&(q[e]&&0<q[e].length)&&E(function(){c.triggerHandler(e,{event:a,className:b})})}function A(){p("before")}function m(){p("after")}function x(){p("close");n&&E(function(){n()})}function t(){t.hasBeenRun||(t.hasBeenRun=!0,g())}function w(){if(!w.hasBeenRun){w.hasBeenRun=!0;var d=
+c.data(l);d&&(h&&h.isClassBased?k(c,b):(E(function(){var d=c.data(l)||{};r==d.index&&k(c,b,a)}),c.data(l,d)));x()}}var h=G(c,a,b);if(h){b=h.className;var q=e.element._data(h.node),q=q&&q.events;d||(d=f?f.parent():c.parent());var y=c.data(l)||{};f=y.active||{};var z=y.totalActive||0,C=y.last,D;h.isClassBased&&(D=y.running||y.disabled||C&&!C.isClassBased);if(D||N(c,d))t(),A(),m(),w();else{d=!1;if(0<z){D=[];if(h.isClassBased)"setClass"==C.event?(D.push(C),k(c,b)):f[b]&&(v=f[b],v.event==a?d=!0:(D.push(v),
+k(c,b)));else if("leave"==a&&f["ng-leave"])d=!0;else{for(var v in f)D.push(f[v]),k(c,v);f={};z=0}0<D.length&&u(D,function(a){a.cancel()})}!h.isClassBased||(h.isSetClassOperation||d)||(d="addClass"==a==c.hasClass(b));if(d)t(),A(),m(),x();else{if("leave"==a)c.one("$destroy",function(a){a=e.element(this);var b=a.data(l);b&&(b=b.active["ng-leave"])&&(b.cancel(),k(a,"ng-leave"))});c.addClass(J);var r=Y++;z++;f[b]=h;c.data(l,{last:h,active:f,index:r,totalActive:z});A();h.before(function(d){var e=c.data(l);
+d=d||!e||!e.active[b]||h.isClassBased&&e.active[b].event!=a;t();!0===d?w():(m(),h.after(w))})}}}else t(),A(),m(),w()}function T(a){if(a=g(a))a=e.isFunction(a.getElementsByClassName)?a.getElementsByClassName(J):a.querySelectorAll("."+J),u(a,function(a){a=e.element(a);(a=a.data(l))&&a.active&&u(a.active,function(a){a.cancel()})})}function k(a,b){if(g(a)==g(R))n.disabled||(n.running=!1,n.structural=!1);else if(b){var c=a.data(l)||{},d=!0===b;!d&&(c.active&&c.active[b])&&(c.totalActive--,delete c.active[b]);
+if(d||!c.totalActive)a.removeClass(J),a.removeData(l)}}function N(a,b){if(n.disabled)return!0;if(g(a)==g(R))return n.running;var c,d,f;do{if(0===b.length)break;var m=g(b)==g(R),k=m?n:b.data(l)||{};if(k.disabled)return!0;m&&(f=!0);!1!==c&&(m=b.data(V),e.isDefined(m)&&(c=m));d=d||k.running||k.last&&!k.last.isClassBased}while(b=b.parent());return!f||!c&&d}var Y=0;R.data(l,n);H.$$postDigest(function(){H.$$postDigest(function(){n.running=!1})});var Q=s.classNameFilter(),M=Q?function(a){return Q.test(a)}:
+function(){return!0};return{enter:function(a,b,c,d){a=e.element(a);b=b&&e.element(b);c=c&&e.element(c);K(a);z.enter(a,b,c);H.$$postDigest(function(){a=B(a);r("enter","ng-enter",a,b,c,m,d)})},leave:function(a,b){a=e.element(a);T(a);K(a);H.$$postDigest(function(){r("leave","ng-leave",B(a),null,null,function(){z.leave(a)},b)})},move:function(a,b,c,d){a=e.element(a);b=b&&e.element(b);c=c&&e.element(c);T(a);K(a);z.move(a,b,c);H.$$postDigest(function(){a=B(a);r("move","ng-move",a,b,c,m,d)})},addClass:function(a,
+b,c){a=e.element(a);a=B(a);r("addClass",b,a,null,null,function(){z.addClass(a,b)},c)},removeClass:function(a,b,c){a=e.element(a);a=B(a);r("removeClass",b,a,null,null,function(){z.removeClass(a,b)},c)},setClass:function(a,b,c,d){a=e.element(a);a=B(a);r("setClass",[b,c],a,null,null,function(){z.setClass(a,b,c)},d)},enabled:function(a,b){switch(arguments.length){case 2:if(a)k(b);else{var c=b.data(l)||{};c.disabled=!0;b.data(l,c)}break;case 1:n.disabled=!a;break;default:a=!n.disabled}return!!a}}}]);s.register("",
+["$window","$sniffer","$timeout","$$animateReflow",function(l,n,s,B){function E(a,U){S&&S();W.push(U);S=B(function(){u(W,function(a){a()});W=[];S=null;v={}})}function H(a,U){var b=g(a);a=e.element(b);Z.push(a);b=Date.now()+U;b<=da||(s.cancel(ca),da=b,ca=s(function(){G(Z);Z=[]},U,!1))}function G(a){u(a,function(a){(a=a.data(q))&&(a.closeAnimationFn||m)()})}function K(a,b){var c=b?v[b]:null;if(!c){var d=0,e=0,f=0,g=0,m,k,h,q;u(a,function(a){if(a.nodeType==aa){a=l.getComputedStyle(a)||{};h=a[I+P];d=
+Math.max(L(h),d);q=a[I+x];m=a[I+t];e=Math.max(L(m),e);k=a[p+t];g=Math.max(L(k),g);var b=L(a[p+P]);0<b&&(b*=parseInt(a[p+w],10)||1);f=Math.max(b,f)}});c={total:0,transitionPropertyStyle:q,transitionDurationStyle:h,transitionDelayStyle:m,transitionDelay:e,transitionDuration:d,animationDelayStyle:k,animationDelay:g,animationDuration:f};b&&(v[b]=c)}return c}function L(a){var b=0;a=e.isString(a)?a.split(/\s*,\s*/):[];u(a,function(a){b=Math.max(parseFloat(a)||0,b)});return b}function J(a){var b=a.parent(),
+c=b.data(h);c||(b.data(h,++ba),c=ba);return c+"-"+g(a).getAttribute("class")}function r(a,b,c,d){var e=J(b),f=e+" "+c,l=v[f]?++v[f].total:0,k={};if(0<l){var h=c+"-stagger",k=e+" "+h;(e=!v[k])&&b.addClass(h);k=K(b,k);e&&b.removeClass(h)}d=d||function(a){return a()};b.addClass(c);var h=b.data(q)||{},n=d(function(){return K(b,f)});d=n.transitionDuration;e=n.animationDuration;if(0===d&&0===e)return b.removeClass(c),!1;b.data(q,{running:h.running||0,itemIndex:l,stagger:k,timings:n,closeAnimationFn:m});
+a=0<h.running||"setClass"==a;0<d&&T(b,c,a);0<e&&(0<k.animationDelay&&0===k.animationDuration)&&(g(b).style[p]="none 0s");return!0}function T(a,b,c){"ng-enter"!=b&&("ng-move"!=b&&"ng-leave"!=b)&&c?a.addClass(y):g(a).style[I+x]="none"}function k(a,b){var c=I+x,d=g(a);d.style[c]&&0<d.style[c].length&&(d.style[c]="");a.removeClass(y)}function N(a){var b=p;a=g(a);a.style[b]&&0<a.style[b].length&&(a.style[b]="")}function Y(a,b,d,e){function k(a){b.off(x,l);b.removeClass(m);c(b,d);a=g(b);for(var e in s)a.style.removeProperty(s[e])}
+function l(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(V));Math.max(a-z,0)>=y&&b>=v&&e()}var h=g(b);a=b.data(q);if(-1!=h.getAttribute("class").indexOf(d)&&a){var m="";u(d.split(" "),function(a,b){m+=(0<b?" ":"")+a+"-active"});var n=a.stagger,p=a.timings,t=a.itemIndex,v=Math.max(p.transitionDuration,p.animationDuration),w=Math.max(p.transitionDelay,p.animationDelay),y=w*D,z=Date.now(),x=A+" "+X,r="",s=[];if(0<p.transitionDuration){var B=
+p.transitionPropertyStyle;-1==B.indexOf("all")&&(r+=f+"transition-property: "+B+";",r+=f+"transition-duration: "+p.transitionDurationStyle+";",s.push(f+"transition-property"),s.push(f+"transition-duration"))}0<t&&(0<n.transitionDelay&&0===n.transitionDuration&&(r+=f+"transition-delay: "+Q(p.transitionDelayStyle,n.transitionDelay,t)+"; ",s.push(f+"transition-delay")),0<n.animationDelay&&0===n.animationDuration&&(r+=f+"animation-delay: "+Q(p.animationDelayStyle,n.animationDelay,t)+"; ",s.push(f+"animation-delay")));
+0<s.length&&(p=h.getAttribute("style")||"",h.setAttribute("style",p+"; "+r));b.on(x,l);b.addClass(m);a.closeAnimationFn=function(){k();e()};h=(t*(Math.max(n.animationDelay,n.transitionDelay)||0)+(w+v)*C)*D;a.running++;H(b,h);return k}e()}function Q(a,b,c){var d="";u(a.split(","),function(a,e){d+=(0<e?",":"")+(c*b+parseInt(a,10))+"s"});return d}function M(a,b,d,e){if(r(a,b,d,e))return function(a){a&&c(b,d)}}function a(a,b,d,e){if(b.data(q))return Y(a,b,d,e);c(b,d);e()}function b(b,c,d,e){var f=M(b,
+c,d);if(f){var g=f;E(c,function(){k(c,d);N(c);g=a(b,c,d,e)});return function(a){(g||m)(a)}}e()}function c(a,b){a.removeClass(b);var c=a.data(q);c&&(c.running&&c.running--,c.running&&0!==c.running||a.removeData(q))}function d(a,b){var c="";a=e.isArray(a)?a:a.split(/\s+/);u(a,function(a,d){a&&0<a.length&&(c+=(0<d?" ":"")+a+b)});return c}var f="",I,X,p,A;F.ontransitionend===O&&F.onwebkittransitionend!==O?(f="-webkit-",I="WebkitTransition",X="webkitTransitionEnd transitionend"):(I="transition",X="transitionend");
+F.onanimationend===O&&F.onwebkitanimationend!==O?(f="-webkit-",p="WebkitAnimation",A="webkitAnimationEnd animationend"):(p="animation",A="animationend");var P="Duration",x="Property",t="Delay",w="IterationCount",h="$$ngAnimateKey",q="$$ngAnimateCSS3Data",y="ng-animate-block-transitions",V=3,C=1.5,D=1E3,v={},ba=0,W=[],S,ca=null,da=0,Z=[];return{enter:function(a,c){return b("enter",a,"ng-enter",c)},leave:function(a,c){return b("leave",a,"ng-leave",c)},move:function(a,c){return b("move",a,"ng-move",
+c)},beforeSetClass:function(a,b,c,e){var f=d(c,"-remove")+" "+d(b,"-add"),g=M("setClass",a,f,function(d){var e=a.attr("class");a.removeClass(c);a.addClass(b);d=d();a.attr("class",e);return d});if(g)return E(a,function(){k(a,f);N(a);e()}),g;e()},beforeAddClass:function(a,b,c){var e=M("addClass",a,d(b,"-add"),function(c){a.addClass(b);c=c();a.removeClass(b);return c});if(e)return E(a,function(){k(a,b);N(a);c()}),e;c()},setClass:function(b,c,e,f){e=d(e,"-remove");c=d(c,"-add");return a("setClass",b,
+e+" "+c,f)},addClass:function(b,c,e){return a("addClass",b,d(c,"-add"),e)},beforeRemoveClass:function(a,b,c){var e=M("removeClass",a,d(b,"-remove"),function(c){var d=a.attr("class");a.removeClass(b);c=c();a.attr("class",d);return c});if(e)return E(a,function(){k(a,b);N(a);c()}),e;c()},removeClass:function(b,c,e){return a("removeClass",b,d(c,"-remove"),e)}}}])}])})(window,window.angular);
+//# sourceMappingURL=angular-animate.min.js.map
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular-cookies.min.js b/bitbake/lib/toaster/toastergui/static/js/angular-cookies.min.js
new file mode 100644
index 0000000000..24a1d50016
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular-cookies.min.js
@@ -0,0 +1,8 @@
+/*
+ AngularJS v1.2.23
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore",
+["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular);
+//# sourceMappingURL=angular-cookies.min.js.map
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular-route.min.js b/bitbake/lib/toaster/toastergui/static/js/angular-route.min.js
new file mode 100644
index 0000000000..ef8d614e18
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular-route.min.js
@@ -0,0 +1,14 @@
+/*
+ AngularJS v1.2.23
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(n,e,A){'use strict';function x(s,g,h){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,w){function y(){p&&(p.remove(),p=null);k&&(k.$destroy(),k=null);l&&(h.leave(l,function(){p=null}),p=l,l=null)}function v(){var b=s.current&&s.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),d=s.current;l=w(b,function(d){h.enter(d,null,l||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||g()});y()});k=d.scope=b;k.$emit("$viewContentLoaded");k.$eval(u)}else y()}
+var k,l,p,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",v);v()}}}function z(e,g,h){return{restrict:"ECA",priority:-400,link:function(a,c){var b=h.current,f=b.locals;c.html(f.$template);var w=e(c.contents());b.controller&&(f.$scope=a,f=g(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));w(a)}}}n=e.module("ngRoute",["ng"]).provider("$route",function(){function s(a,c){return e.extend(new (e.extend(function(){},
+{prototype:a})),c)}function g(a,e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},h=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var h={};this.when=function(a,c){h[a]=e.extend({reloadOnSearch:!0},c,a&&g(a,c));if(a){var b=
+"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";h[b]=e.extend({redirectTo:a},g(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,g,n,v,k){function l(){var d=p(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!u)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)u=!1,a.$broadcast("$routeChangeStart",
+d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?g.get(d):g.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=k.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=
+b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(h,function(f,h){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var k=1,p=g.length;k<p;++k){var n=q[k-1],r=g[k];n&&r&&(l[n.name]=r)}q=l}else q=null;
+else q=null;q=a=q}q&&(b=s(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||h[null]&&s(h[null],{params:{},pathParams:{}})}function t(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var u=!1,r={routes:h,reload:function(){u=!0;a.$evalAsync(l)}};a.$on("$locationChangeSuccess",l);return r}]});n.provider("$routeParams",function(){this.$get=function(){return{}}});
+n.directive("ngView",x);n.directive("ngView",z);x.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular);
+//# sourceMappingURL=angular-route.min.js.map
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular-sanitize.min.js b/bitbake/lib/toaster/toastergui/static/js/angular-sanitize.min.js
new file mode 100644
index 0000000000..e10308b6ff
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular-sanitize.min.js
@@ -0,0 +1,15 @@
+/*
+ AngularJS v1.2.23
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(q,g,r){'use strict';function F(a){var d=[];t(d,g.noop).chars(a);return d.join("")}function m(a){var d={};a=a.split(",");var c;for(c=0;c<a.length;c++)d[a[c]]=!0;return d}function G(a,d){function c(a,b,c,h){b=g.lowercase(b);if(u[b])for(;f.last()&&v[f.last()];)e("",f.last());w[b]&&f.last()==b&&e("",b);(h=x[b]||!!h)||f.push(b);var n={};c.replace(H,function(a,b,d,c,e){n[b]=s(d||c||e||"")});d.start&&d.start(b,n,h)}function e(a,b){var c=0,e;if(b=g.lowercase(b))for(c=f.length-1;0<=c&&f[c]!=b;c--);
+if(0<=c){for(e=f.length-1;e>=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,l,f=[],n=a,h;for(f.last=function(){return f[f.length-1]};a;){h="";l=!0;if(f.last()&&y[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(I,"$1").replace(J,"$1");d.chars&&d.chars(s(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&&d.comment(a.substring(4,
+b)),a=a.substring(b+3),l=!1);else if(z.test(a)){if(b=a.match(z))a=a.replace(b[0],""),l=!1}else if(K.test(a)){if(b=a.match(A))a=a.substring(b[0].length),b[0].replace(A,e),l=!1}else L.test(a)&&((b=a.match(B))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(B,c)),l=!1):(h+="<",a=a.substring(1)));l&&(b=a.indexOf("<"),h+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(s(h)))}if(a==n)throw M("badparse",a);n=a}e()}function s(a){if(!a)return"";var d=N.exec(a);a=d[1];var c=d[3];if(d=d[2])p.innerHTML=
+d.replace(/</g,"&lt;"),d="textContent"in p?p.textContent:p.innerText;return a+d+c}function C(a){return a.replace(/&/g,"&amp;").replace(O,function(a){var c=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(c-55296)+(a-56320)+65536)+";"}).replace(P,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(a,d){var c=!1,e=g.bind(a,a.push);return{start:function(a,l,f){a=g.lowercase(a);!c&&y[a]&&(c=a);c||!0!==D[a]||(e("<"),e(a),g.forEach(l,function(c,f){var k=
+g.lowercase(f),l="img"===a&&"src"===k||"background"===k;!0!==Q[k]||!0===E[k]&&!d(c,l)||(e(" "),e(f),e('="'),e(C(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=g.lowercase(a);c||!0!==D[a]||(e("</"),e(a),e(">"));a==c&&(c=!1)},chars:function(a){c||e(C(a))}}}var M=g.$$minErr("$sanitize"),B=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,A=/^<\/\s*([\w:-]+)[^>]*>/,H=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,L=/^</,
+K=/^<\//,I=/\x3c!--(.*?)--\x3e/g,z=/<!DOCTYPE([^>]*?)>/i,J=/<!\[CDATA\[(.*?)]]\x3e/g,O=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P=/([^\#-~| |!])/g,x=m("area,br,col,hr,img,wbr");q=m("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");r=m("rp,rt");var w=g.extend({},r,q),u=g.extend({},q,m("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),v=g.extend({},r,m("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
+y=m("script,style"),D=g.extend({},x,u,v,w),E=m("background,cite,href,longdesc,src,usemap"),Q=g.extend({},E,m("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),p=document.createElement("pre"),N=/^(\s*)([\s\S]*?)(\s*)$/;g.module("ngSanitize",[]).provider("$sanitize",
+function(){this.$get=["$$sanitizeUri",function(a){return function(d){var c=[];G(d,t(c,function(c,b){return!/^unsafe/.test(a(c,b))}));return c.join("")}}]});g.module("ngSanitize").filter("linky",["$sanitize",function(a){var d=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,c=/^mailto:/;return function(e,b){function l(a){a&&k.push(F(a))}function f(a,c){k.push("<a ");g.isDefined(b)&&(k.push('target="'),k.push(b),k.push('" '));k.push('href="');k.push(a);k.push('">');l(c);k.push("</a>")}
+if(!e)return e;for(var n,h=e,k=[],m,p;n=h.match(d);)m=n[0],n[2]==n[3]&&(m="mailto:"+m),p=n.index,l(h.substr(0,p)),f(m,n[0].replace(c,"")),h=h.substring(p+n[0].length);l(h);return a(k.join(""))}}])})(window,window.angular);
+//# sourceMappingURL=angular-sanitize.min.js.map
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular.min.js b/bitbake/lib/toaster/toastergui/static/js/angular.min.js
new file mode 100644
index 0000000000..22af422a19
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular.min.js
@@ -0,0 +1,215 @@
+/*
+ AngularJS v1.2.23
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(Q,X,t){'use strict';function x(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.23/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function fb(b){if(null==b||Fa(b))return!1;
+var a=b.length;return 1===b.nodeType&&a?!0:z(b)||H(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function r(b,a,c){var d;if(b)if(P(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(H(b)||fb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else if(b.forEach&&b.forEach!==r)b.forEach(a,c);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Zb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Tc(b,
+a,c){for(var d=Zb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function $b(b){return function(a,c){b(c,a)}}function gb(){for(var b=la.length,a;b;){b--;a=la[b].charCodeAt(0);if(57==a)return la[b]="A",la.join("");if(90==a)la[b]="0";else return la[b]=String.fromCharCode(a+1),la.join("")}la.unshift("0");return la.join("")}function ac(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function B(b){var a=b.$$hashKey;r(arguments,function(a){a!==b&&r(a,function(a,c){b[c]=a})});ac(b,a);return b}function Z(b){return parseInt(b,
+10)}function bc(b,a){return B(new (B(function(){},{prototype:b})),a)}function y(){}function Ga(b){return b}function $(b){return function(){return b}}function D(b){return"undefined"===typeof b}function A(b){return"undefined"!==typeof b}function T(b){return null!=b&&"object"===typeof b}function z(b){return"string"===typeof b}function Ab(b){return"number"===typeof b}function sa(b){return"[object Date]"===ya.call(b)}function P(b){return"function"===typeof b}function hb(b){return"[object RegExp]"===ya.call(b)}
+function Fa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Uc(b){return!(!b||!(b.nodeName||b.prop&&b.attr&&b.find))}function Vc(b,a,c){var d=[];r(b,function(b,f,g){d.push(a.call(c,b,f,g))});return d}function Qa(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ra(b,a){var c=Qa(b,a);0<=c&&b.splice(c,1);return a}function Ha(b,a,c,d){if(Fa(b)||b&&b.$evalAsync&&b.$watch)throw Sa("cpws");if(a){if(b===a)throw Sa("cpi");c=c||[];
+d=d||[];if(T(b)){var e=Qa(c,b);if(-1!==e)return d[e];c.push(b);d.push(a)}if(H(b))for(var f=a.length=0;f<b.length;f++)e=Ha(b[f],null,c,d),T(b[f])&&(c.push(b[f]),d.push(e)),a.push(e);else{var g=a.$$hashKey;H(a)?a.length=0:r(a,function(b,c){delete a[c]});for(f in b)e=Ha(b[f],null,c,d),T(b[f])&&(c.push(b[f]),d.push(e)),a[f]=e;ac(a,g)}}else if(a=b)H(b)?a=Ha(b,[],c,d):sa(b)?a=new Date(b.getTime()):hb(b)?(a=RegExp(b.source,b.toString().match(/[^\/]*$/)[0]),a.lastIndex=b.lastIndex):T(b)&&(a=Ha(b,{},c,d));
+return a}function ga(b,a){if(H(b)){a=a||[];for(var c=0;c<b.length;c++)a[c]=b[c]}else if(T(b))for(c in a=a||{},b)!ib.call(b,c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(a[c]=b[c]);return a||b}function za(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&"object"==c)if(H(b)){if(!H(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!za(b[d],a[d]))return!1;return!0}}else{if(sa(b))return sa(a)?isNaN(b.getTime())&&isNaN(a.getTime())||b.getTime()===
+a.getTime():!1;if(hb(b)&&hb(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||Fa(b)||Fa(a)||H(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!P(b[d])){if(!za(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==t&&!P(a[d]))return!1;return!0}return!1}function Bb(b,a){var c=2<arguments.length?Aa.call(arguments,2):[];return!P(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(Aa.call(arguments,
+0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Wc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=t:Fa(a)?c="$WINDOW":a&&X===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function ta(b,a){return"undefined"===typeof b?t:JSON.stringify(b,Wc,a?" ":null)}function cc(b){return z(b)?JSON.parse(b):b}function Ta(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=N(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;
+return b}function ha(b){b=u(b).clone();try{b.empty()}catch(a){}var c=u("<div>").append(b).html();try{return 3===b[0].nodeType?N(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+N(b)})}catch(d){return N(c)}}function dc(b){try{return decodeURIComponent(b)}catch(a){}}function ec(b){var a={},c,d;r((b||"").split("&"),function(b){b&&(c=b.replace(/\+/g,"%20").split("="),d=dc(c[0]),A(d)&&(b=A(c[1])?dc(c[1]):!0,ib.call(a,d)?H(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Cb(b){var a=
+[];r(b,function(b,d){H(b)?r(b,function(b){a.push(Ba(d,!0)+(!0===b?"":"="+Ba(b,!0)))}):a.push(Ba(d,!0)+(!0===b?"":"="+Ba(b,!0)))});return a.length?a.join("&"):""}function jb(b){return Ba(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Ba(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Xc(b,a){function c(a){a&&d.push(a)}var d=[b],e,f,g=["ng:app","ng-app","x-ng-app",
+"data-ng-app"],k=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(g,function(a){g[a]=!0;c(X.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(r(b.querySelectorAll("."+a),c),r(b.querySelectorAll("."+a+"\\:"),c),r(b.querySelectorAll("["+a+"]"),c))});r(d,function(a){if(!e){var b=k.exec(" "+a.className+" ");b?(e=a,f=(b[2]||"").replace(/\s+/g,",")):r(a.attributes,function(b){!e&&g[b.name]&&(e=a,f=b.value)})}});e&&a(e,f?[f]:[])}function fc(b,a){var c=function(){b=u(b);if(b.injector()){var c=b[0]===X?
+"document":ha(b);throw Sa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=gc(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(Q&&!d.test(Q.name))return c();Q.name=Q.name.replace(d,"");Ua.resumeBootstrap=function(b){r(b,function(b){a.push(b)});c()}}function kb(b,a){a=
+a||"_";return b.replace(Yc,function(b,d){return(d?a:"")+b.toLowerCase()})}function Db(b,a,c){if(!b)throw Sa("areq",a||"?",c||"required");return b}function Va(b,a,c){c&&H(b)&&(b=b[b.length-1]);Db(P(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ca(b,a){if("hasOwnProperty"===b)throw Sa("badname",a);}function hc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g<f;g++)d=a[g],b&&(b=(e=b)[d]);return!c&&P(b)?Bb(e,b):b}function Eb(b){var a=
+b[0];b=b[b.length-1];if(a===b)return u(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return u(c)}function Zc(b){var a=x("$injector"),c=x("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||x;return b.module||(b.module=function(){var b={};return function(e,f,g){if("hasOwnProperty"===e)throw c("badname","module");f&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!f)throw a("nomod",
+e);var c=[],d=[],l=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:f,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide","constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};g&&l(g);return n}())}}())}
+function $c(b){B(b,{bootstrap:fc,copy:Ha,extend:B,equals:za,element:u,forEach:r,injector:gc,noop:y,bind:Bb,toJson:ta,fromJson:cc,identity:Ga,isUndefined:D,isDefined:A,isString:z,isFunction:P,isObject:T,isNumber:Ab,isElement:Uc,isArray:H,version:ad,isDate:sa,lowercase:N,uppercase:Ia,callbacks:{counter:0},$$minErr:x,$$csp:Wa});Xa=Zc(Q);try{Xa("ngLocale")}catch(a){Xa("ngLocale",[]).provider("$locale",bd)}Xa("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:cd});a.provider("$compile",
+ic).directive({a:dd,input:jc,textarea:jc,form:ed,script:fd,select:gd,style:hd,option:id,ngBind:jd,ngBindHtml:kd,ngBindTemplate:ld,ngClass:md,ngClassEven:nd,ngClassOdd:od,ngCloak:pd,ngController:qd,ngForm:rd,ngHide:sd,ngIf:td,ngInclude:ud,ngInit:vd,ngNonBindable:wd,ngPluralize:xd,ngRepeat:yd,ngShow:zd,ngStyle:Ad,ngSwitch:Bd,ngSwitchWhen:Cd,ngSwitchDefault:Dd,ngOptions:Ed,ngTransclude:Fd,ngModel:Gd,ngList:Hd,ngChange:Id,required:kc,ngRequired:kc,ngValue:Jd}).directive({ngInclude:Kd}).directive(Fb).directive(lc);
+a.provider({$anchorScroll:Ld,$animate:Md,$browser:Nd,$cacheFactory:Od,$controller:Pd,$document:Qd,$exceptionHandler:Rd,$filter:mc,$interpolate:Sd,$interval:Td,$http:Ud,$httpBackend:Vd,$location:Wd,$log:Xd,$parse:Yd,$rootScope:Zd,$q:$d,$sce:ae,$sceDelegate:be,$sniffer:ce,$templateCache:de,$timeout:ee,$window:fe,$$rAF:ge,$$asyncCallback:he})}])}function Ya(b){return b.replace(ie,function(a,b,d,e){return e?d.toUpperCase():d}).replace(je,"Moz$1")}function Gb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:
+[this],m=a,h,l,n,p,q,s;if(!d||null!=b)for(;e.length;)for(h=e.shift(),l=0,n=h.length;l<n;l++)for(p=u(h[l]),m?p.triggerHandler("$destroy"):m=!m,q=0,p=(s=p.children()).length;q<p;q++)e.push(Da(s[q]));return f.apply(this,arguments)}var f=Da.fn[b],f=f.$original||f;e.$original=f;Da.fn[b]=e}function S(b){if(b instanceof S)return b;z(b)&&(b=aa(b));if(!(this instanceof S)){if(z(b)&&"<"!=b.charAt(0))throw Hb("nosel");return new S(b)}if(z(b)){var a=b;b=X;var c;if(c=ke.exec(a))b=[b.createElement(c[1])];else{var d=
+b,e;b=d.createDocumentFragment();c=[];if(Ib.test(a)){d=b.appendChild(d.createElement("div"));e=(le.exec(a)||["",""])[1].toLowerCase();e=ba[e]||ba._default;d.innerHTML="<div>&#160;</div>"+e[1]+a.replace(me,"<$1></$2>")+e[2];d.removeChild(d.firstChild);for(a=e[0];a--;)d=d.lastChild;a=0;for(e=d.childNodes.length;a<e;++a)c.push(d.childNodes[a]);d=b.firstChild;d.textContent=""}else c.push(d.createTextNode(a));b.textContent="";b.innerHTML="";b=c}Jb(this,b);u(X.createDocumentFragment()).append(this)}else Jb(this,
+b)}function Kb(b){return b.cloneNode(!0)}function Ja(b){Lb(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Ja(b[a])}function nc(b,a,c,d){if(A(d))throw Hb("offargs");var e=ma(b,"events");ma(b,"handle")&&(D(a)?r(e,function(a,c){Za(b,c,a);delete e[c]}):r(a.split(" "),function(a){D(c)?(Za(b,a,e[a]),delete e[a]):Ra(e[a]||[],c)}))}function Lb(b,a){var c=b.ng339,d=$a[c];d&&(a?delete $a[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),nc(b)),delete $a[c],b.ng339=t))}function ma(b,a,c){var d=
+b.ng339,d=$a[d||-1];if(A(c))d||(b.ng339=d=++ne,d=$a[d]={}),d[a]=c;else return d&&d[a]}function Mb(b,a,c){var d=ma(b,"data"),e=A(c),f=!e&&A(a),g=f&&!T(a);d||g||ma(b,"data",d={});if(e)d[a]=c;else if(f){if(g)return d&&d[a];B(d,a)}else return d}function Nb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function lb(b,a){a&&b.setAttribute&&r(a.split(" "),function(a){b.setAttribute("class",aa((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g,
+" ").replace(" "+aa(a)+" "," ")))})}function mb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(a.split(" "),function(a){a=aa(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",aa(c))}}function Jb(b,a){if(a){a=a.nodeName||!A(a.length)||Fa(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function oc(b,a){return nb(b,"$"+(a||"ngController")+"Controller")}function nb(b,a,c){9==b.nodeType&&(b=b.documentElement);for(a=H(a)?a:[a];b;){for(var d=
+0,e=a.length;d<e;d++)if((c=u.data(b,a[d]))!==t)return c;b=b.parentNode||11===b.nodeType&&b.host}}function pc(b){for(var a=0,c=b.childNodes;a<c.length;a++)Ja(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function qc(b,a){var c=ob[a.toLowerCase()];return c&&rc[b.nodeName]&&c}function oe(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||X);if(D(c.defaultPrevented)){var f=
+c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;f.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var g=ga(a[e||c.type]||[]);r(g,function(a){a.call(b,c)});8>=R?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ka(b,a){var c=typeof b,d;"function"==c||"object"==c&&null!==b?"function"==typeof(d=
+b.$$hashKey)?d=b.$$hashKey():d===t&&(d=b.$$hashKey=(a||gb)()):d=b;return c+":"+d}function ab(b,a){if(a){var c=0;this.nextUid=function(){return++c}}r(b,this.put,this)}function sc(b){var a,c;"function"===typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(pe,""),c=c.match(qe),r(c[1].split(re),function(b){b.replace(se,function(b,c,d){a.push(d)})})),b.$inject=a):H(b)?(c=b.length-1,Va(b[c],"fn"),a=b.slice(0,c)):Va(b,"fn",!0);return a}function gc(b){function a(a){return function(b,c){if(T(b))r(b,
+$b(a));else return a(b,c)}}function c(a,b){Ca(a,"service");if(P(b)||H(b))b=n.instantiate(b);if(!b.$get)throw bb("pget",a);return l[a+k]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,f,k;r(a,function(a){if(!h.get(a)){h.put(a,!0);try{if(z(a))for(c=Xa(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,f=0,k=d.length;f<k;f++){var g=d[f],m=n.get(g[0]);m[g[1]].apply(m,g[2])}else P(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):Va(a,"module")}catch(l){throw H(a)&&(a=
+a[a.length-1]),l.message&&(l.stack&&-1==l.stack.indexOf(l.message))&&(l=l.message+"\n"+l.stack),bb("modulerr",a,l.stack||l.message||l);}}});return b}function f(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===g)throw bb("cdep",d+" <- "+m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=g,a[d]=b(d)}catch(e){throw a[d]===g&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var f=[],k=sc(a),g,m,h;m=0;for(g=k.length;m<g;m++){h=k[m];if("string"!==typeof h)throw bb("itkn",h);f.push(e&&e.hasOwnProperty(h)?
+e[h]:c(h))}H(a)&&(a=a[g]);return a.apply(b,f)}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(H(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return T(e)||P(e)?e:c},get:c,annotate:sc,has:function(b){return l.hasOwnProperty(b+k)||a.hasOwnProperty(b)}}}var g={},k="Provider",m=[],h=new ab([],!0),l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,$(b))}),constant:a(function(a,
+b){Ca(a,"constant");l[a]=b;p[a]=b}),decorator:function(a,b){var c=n.get(a+k),d=c.$get;c.$get=function(){var a=q.invoke(d,c);return q.invoke(b,null,{$delegate:a})}}}},n=l.$injector=f(l,function(){throw bb("unpr",m.join(" <- "));}),p={},q=p.$injector=f(p,function(a){a=n.get(a+k);return q.invoke(a.$get,a)});r(e(b),function(a){q.invoke(a||y)});return q}function Ld(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;
+r(a,function(a){b||"a"!==N(a.nodeName)||(b=a)});return b}function f(){var b=c.hash(),d;b?(d=g.getElementById(b))?d.scrollIntoView():(d=e(g.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var g=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(f)});return f}]}function he(){this.$get=["$$rAF","$timeout",function(b,a){return b.supported?function(a){return b(a)}:function(b){return a(b,0,!1)}}]}function te(b,a,c,d){function e(a){try{a.apply(null,
+Aa.call(arguments,1))}finally{if(s--,0===s)for(;L.length;)try{L.pop()()}catch(b){c.error(b)}}}function f(a,b){(function ca(){r(v,function(a){a()});C=b(ca,a)})()}function g(){w=null;O!=k.url()&&(O=k.url(),r(da,function(a){a(k.url())}))}var k=this,m=a[0],h=b.location,l=b.history,n=b.setTimeout,p=b.clearTimeout,q={};k.isMock=!1;var s=0,L=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){s++};k.notifyWhenNoOutstandingRequests=function(a){r(v,function(a){a()});0===s?a():L.push(a)};
+var v=[],C;k.addPollFn=function(a){D(C)&&f(100,n);v.push(a);return a};var O=h.href,I=a.find("base"),w=null;k.url=function(a,c){h!==b.location&&(h=b.location);l!==b.history&&(l=b.history);if(a){if(O!=a)return O=a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),I.attr("href",I.attr("href"))):(w=a,c?h.replace(a):h.href=a),k}else return w||h.href.replace(/%27/g,"'")};var da=[],K=!1;k.onUrlChange=function(a){if(!K){if(d.history)u(b).on("popstate",g);if(d.hashchange)u(b).on("hashchange",g);
+else k.addPollFn(g);K=!0}da.push(a);return a};k.baseHref=function(){var a=I.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var W={},ea="",J=k.baseHref();k.cookies=function(a,b){var d,e,f,k;if(a)b===t?m.cookie=escape(a)+"=;path="+J+";expires=Thu, 01 Jan 1970 00:00:00 GMT":z(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+J).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==ea)for(ea=m.cookie,
+d=ea.split("; "),W={},f=0;f<d.length;f++)e=d[f],k=e.indexOf("="),0<k&&(a=unescape(e.substring(0,k)),W[a]===t&&(W[a]=unescape(e.substring(k+1))));return W}};k.defer=function(a,b){var c;s++;c=n(function(){delete q[c];e(a)},b||0);q[c]=!0;return c};k.defer.cancel=function(a){return q[a]?(delete q[a],p(a),e(y),!0):!1}}function Nd(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new te(b,d,a,c)}]}function Od(){this.$get=function(){function b(b,d){function e(a){a!=n&&(p?p==a&&
+(p=a.n):p=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw x("$cacheFactory")("iid",b);var g=0,k=B({},d,{id:b}),m={},h=d&&d.capacity||Number.MAX_VALUE,l={},n=null,p=null;return a[b]={put:function(a,b){if(h<Number.MAX_VALUE){var c=l[a]||(l[a]={key:a});e(c)}if(!D(b))return a in m||g++,m[a]=b,g>h&&this.remove(p.key),b},get:function(a){if(h<Number.MAX_VALUE){var b=l[a];if(!b)return;e(b)}return m[a]},remove:function(a){if(h<Number.MAX_VALUE){var b=l[a];if(!b)return;
+b==n&&(n=b.p);b==p&&(p=b.n);f(b.n,b.p);delete l[a]}delete m[a];g--},removeAll:function(){m={};g=0;l={};n=p=null},destroy:function(){l=k=m=null;delete a[b]},info:function(){return B({},k,{size:g})}}}var a={};b.info=function(){var b={};r(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function de(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function ic(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,f=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,
+g=/^(on[a-z]+|formaction)$/;this.directive=function m(a,e){Ca(a,"directive");z(a)?(Db(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];r(c[a],function(c,f){try{var g=b.invoke(c);P(g)?g={compile:$(g)}:!g.compile&&g.link&&(g.compile=$(g.link));g.priority=g.priority||0;g.index=f;g.name=g.name||a;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(m){d(m)}});return e}])),c[a].push(e)):r(a,$b(m));
+return this};this.aHrefSanitizationWhitelist=function(b){return A(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return A(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,l,n,p,q,s,L,v,C,O,I){function w(a,b,c,d,e){a instanceof
+u||(a=u(a));r(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var f=K(a,b,a,c,d,e);da(a,"ng-scope");return function(b,c,d,e){Db(b,"scope");var g=c?La.clone.call(a):a;r(d,function(a,b){g.data("$"+b+"Controller",a)});d=0;for(var m=g.length;d<m;d++){var h=g[d].nodeType;1!==h&&9!==h||g.eq(d).data("$scope",b)}c&&c(g,b);f&&f(b,g,g,e);return g}}function da(a,b){try{a.addClass(b)}catch(c){}}function K(a,b,c,d,e,f){function g(a,c,d,e){var f,h,l,q,n,
+p,s;f=c.length;var M=Array(f);for(q=0;q<f;q++)M[q]=c[q];p=q=0;for(n=m.length;q<n;p++)h=M[p],c=m[q++],f=m[q++],c?(c.scope?(l=a.$new(),u.data(h,"$scope",l)):l=a,s=c.transcludeOnThisElement?W(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?W(a,b):null,c(f,l,h,d,s)):f&&f(a,h.childNodes,t,e)}for(var m=[],h,l,q,n,p=0;p<a.length;p++)h=new Ob,l=ea(a[p],[],h,0===p?d:t,e),(f=l.length?F(l,a[p],h,b,c,null,[],[],f):null)&&f.scope&&da(h.$$element,"ng-scope"),h=f&&f.terminal||!(q=a[p].childNodes)||!q.length?
+null:K(q,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b),m.push(f,h),n=n||f||h,f=null;return n?g:null}function W(a,b,c){return function(d,e,f){var g=!1;d||(d=a.$new(),g=d.$$transcluded=!0);e=b(d,e,f,c);if(g)e.on("$destroy",function(){d.$destroy()});return e}}function ea(a,b,c,d,g){var h=c.$attr,m;switch(a.nodeType){case 1:ca(b,na(Ma(a).toLowerCase()),"E",d,g);for(var l,q,n,p=a.attributes,s=0,L=p&&p.length;s<L;s++){var C=!1,O=!1;l=p[s];if(!R||8<=R||l.specified){m=l.name;q=
+aa(l.value);l=na(m);if(n=V.test(l))m=kb(l.substr(6),"-");var v=l.replace(/(Start|End)$/,"");l===v+"Start"&&(C=m,O=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));l=na(m.toLowerCase());h[l]=m;if(n||!c.hasOwnProperty(l))c[l]=q,qc(a,l)&&(c[l]=!0);Q(a,b,q,l);ca(b,l,"A",d,g,C,O)}}a=a.className;if(z(a)&&""!==a)for(;m=f.exec(a);)l=na(m[2]),ca(b,l,"C",d,g)&&(c[l]=aa(m[3])),a=a.substr(m.index+m[0].length);break;case 3:x(b,a.nodeValue);break;case 8:try{if(m=e.exec(a.nodeValue))l=na(m[1]),ca(b,l,"M",
+d,g)&&(c[l]=aa(m[2]))}catch(w){}}b.sort(D);return b}function J(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ia("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return u(d)}function E(a,b,c){return function(d,e,f,g,m){e=J(e[0],b,c);return a(d,e,f,g,m)}}function F(a,c,d,e,f,g,m,n,p){function L(a,b,c,d){if(a){c&&(a=E(a,c,d));a.require=G.require;a.directiveName=oa;if(K===G||G.$$isolateScope)a=
+tc(a,{isolateScope:!0});m.push(a)}if(b){c&&(b=E(b,c,d));b.require=G.require;b.directiveName=oa;if(K===G||G.$$isolateScope)b=tc(b,{isolateScope:!0});n.push(b)}}function C(a,b,c,d){var e,f="data",g=!1;if(z(b)){for(;"^"==(e=b.charAt(0))||"?"==e;)b=b.substr(1),"^"==e&&(f="inheritedData"),g=g||"?"==e;e=null;d&&"data"===f&&(e=d[b]);e=e||c[f]("$"+b+"Controller");if(!e&&!g)throw ia("ctreq",b,a);}else H(b)&&(e=[],r(b,function(b){e.push(C(a,b,c,d))}));return e}function O(a,e,f,g,p){function L(a,b){var c;2>
+arguments.length&&(b=a,a=t);Ea&&(c=ea);return p(a,b,c)}var v,M,w,I,E,J,ea={},qb;v=c===f?d:ga(d,new Ob(u(f),d.$attr));M=v.$$element;if(K){var Na=/^\s*([@=&])(\??)\s*(\w*)\s*$/;J=e.$new(!0);!F||F!==K&&F!==K.$$originalDirective?M.data("$isolateScopeNoTemplate",J):M.data("$isolateScope",J);da(M,"ng-isolate-scope");r(K.scope,function(a,c){var d=a.match(Na)||[],f=d[3]||c,g="?"==d[2],d=d[1],m,l,n,p;J.$$isolateBindings[c]=d+f;switch(d){case "@":v.$observe(f,function(a){J[c]=a});v.$$observers[f].$$scope=e;
+v[f]&&(J[c]=b(v[f])(e));break;case "=":if(g&&!v[f])break;l=q(v[f]);p=l.literal?za:function(a,b){return a===b||a!==a&&b!==b};n=l.assign||function(){m=J[c]=l(e);throw ia("nonassign",v[f],K.name);};m=J[c]=l(e);J.$watch(function(){var a=l(e);p(a,J[c])||(p(a,m)?n(e,a=J[c]):J[c]=a);return m=a},null,l.literal);break;case "&":l=q(v[f]);J[c]=function(a){return l(e,a)};break;default:throw ia("iscp",K.name,c,a);}})}qb=p&&L;W&&r(W,function(a){var b={$scope:a===K||a.$$isolateScope?J:e,$element:M,$attrs:v,$transclude:qb},
+c;E=a.controller;"@"==E&&(E=v[a.name]);c=s(E,b);ea[a.name]=c;Ea||M.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});g=0;for(w=m.length;g<w;g++)try{I=m[g],I(I.isolateScope?J:e,M,v,I.require&&C(I.directiveName,I.require,M,ea),qb)}catch(ca){l(ca,ha(M))}g=e;K&&(K.template||null===K.templateUrl)&&(g=J);a&&a(g,f.childNodes,t,p);for(g=n.length-1;0<=g;g--)try{I=n[g],I(I.isolateScope?J:e,M,v,I.require&&C(I.directiveName,I.require,M,ea),qb)}catch(pb){l(pb,ha(M))}}p=p||{};for(var v=
+-Number.MAX_VALUE,I,W=p.controllerDirectives,K=p.newIsolateScopeDirective,F=p.templateDirective,ca=p.nonTlbTranscludeDirective,D=!1,B=!1,Ea=p.hasElementTranscludeDirective,x=d.$$element=u(c),G,oa,U,S=e,R,Q=0,pa=a.length;Q<pa;Q++){G=a[Q];var V=G.$$start,Y=G.$$end;V&&(x=J(c,V,Y));U=t;if(v>G.priority)break;if(U=G.scope)I=I||G,G.templateUrl||(N("new/isolated scope",K,G,x),T(U)&&(K=G));oa=G.name;!G.templateUrl&&G.controller&&(U=G.controller,W=W||{},N("'"+oa+"' controller",W[oa],G,x),W[oa]=G);if(U=G.transclude)D=
+!0,G.$$tlb||(N("transclusion",ca,G,x),ca=G),"element"==U?(Ea=!0,v=G.priority,U=x,x=d.$$element=u(X.createComment(" "+oa+": "+d[oa]+" ")),c=x[0],Na(f,Aa.call(U,0),c),S=w(U,e,v,g&&g.name,{nonTlbTranscludeDirective:ca})):(U=u(Kb(c)).contents(),x.empty(),S=w(U,e));if(G.template)if(B=!0,N("template",F,G,x),F=G,U=P(G.template)?G.template(x,d):G.template,U=Z(U),G.replace){g=G;U=Ib.test(U)?u(aa(U)):[];c=U[0];if(1!=U.length||1!==c.nodeType)throw ia("tplrt",oa,"");Na(f,x,c);pa={$attr:{}};U=ea(c,[],pa);var $=
+a.splice(Q+1,a.length-(Q+1));K&&pb(U);a=a.concat(U).concat($);A(d,pa);pa=a.length}else x.html(U);if(G.templateUrl)B=!0,N("template",F,G,x),F=G,G.replace&&(g=G),O=y(a.splice(Q,a.length-Q),x,d,f,D&&S,m,n,{controllerDirectives:W,newIsolateScopeDirective:K,templateDirective:F,nonTlbTranscludeDirective:ca}),pa=a.length;else if(G.compile)try{R=G.compile(x,d,S),P(R)?L(null,R,V,Y):R&&L(R.pre,R.post,V,Y)}catch(ba){l(ba,ha(x))}G.terminal&&(O.terminal=!0,v=Math.max(v,G.priority))}O.scope=I&&!0===I.scope;O.transcludeOnThisElement=
+D;O.templateOnThisElement=B;O.transclude=S;p.hasElementTranscludeDirective=Ea;return O}function pb(a){for(var b=0,c=a.length;b<c;b++)a[b]=bc(a[b],{$$isolateScope:!0})}function ca(b,e,f,g,h,q,n){if(e===h)return null;h=null;if(c.hasOwnProperty(e)){var p;e=a.get(e+d);for(var s=0,v=e.length;s<v;s++)try{p=e[s],(g===t||g>p.priority)&&-1!=p.restrict.indexOf(f)&&(q&&(p=bc(p,{$$start:q,$$end:n})),b.push(p),h=p)}catch(L){l(L)}}return h}function A(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;r(a,function(d,e){"$"!=
+e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,f){"class"==f?(da(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function y(a,b,c,d,e,f,g,m){var h=[],l,q,s=b[0],v=a.shift(),L=B({},v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),O=P(v.templateUrl)?v.templateUrl(b,c):v.templateUrl;
+b.empty();n.get(C.getTrustedResourceUrl(O),{cache:p}).success(function(n){var p,C;n=Z(n);if(v.replace){n=Ib.test(n)?u(aa(n)):[];p=n[0];if(1!=n.length||1!==p.nodeType)throw ia("tplrt",v.name,O);n={$attr:{}};Na(d,b,p);var w=ea(p,[],n);T(v.scope)&&pb(w);a=w.concat(a);A(c,n)}else p=s,b.html(n);a.unshift(L);l=F(a,p,c,e,b,v,f,g,m);r(d,function(a,c){a==p&&(d[c]=b[0])});for(q=K(b[0].childNodes,e);h.length;){n=h.shift();C=h.shift();var I=h.shift(),E=h.shift(),w=b[0];if(C!==s){var J=C.className;m.hasElementTranscludeDirective&&
+v.replace||(w=Kb(p));Na(I,u(C),w);da(u(w),J)}C=l.transcludeOnThisElement?W(n,l.transclude,E):E;l(q,n,w,d,C)}h=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){a=e;h?(h.push(b),h.push(c),h.push(d),h.push(a)):(l.transcludeOnThisElement&&(a=W(b,l.transclude,e)),l(q,b,c,d,a))}}function D(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function N(a,b,c,d){if(b)throw ia("multidir",b.name,c.name,a,ha(d));}function x(a,
+c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){var b=a.parent().length;b&&da(a.parent(),"ng-binding");return function(a,c){var e=c.parent(),f=e.data("$binding")||[];f.push(d);e.data("$binding",f);b||da(e,"ng-binding");a.$watch(d,function(a){c[0].nodeValue=a})}}})}function S(a,b){if("srcdoc"==b)return C.HTML;var c=Ma(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return C.RESOURCE_URL}function Q(a,c,d,e){var f=b(d,!0);if(f){if("multiple"===e&&"SELECT"===
+Ma(a))throw ia("selmulti",ha(a));c.push({priority:100,compile:function(){return{pre:function(c,d,m){d=m.$$observers||(m.$$observers={});if(g.test(e))throw ia("nodomevents");if(f=b(m[e],!0,S(a,e)))m[e]=f(c),(d[e]||(d[e]=[])).$$inter=!0,(m.$$observers&&m.$$observers[e].$$scope||c).$watch(f,function(a,b){"class"===e&&a!=b?m.$updateClass(a,b):m.$set(e,a)})}}}})}}function Na(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,m;if(a)for(g=0,m=a.length;g<m;g++)if(a[g]==d){a[g++]=c;m=g+e-1;for(var h=a.length;g<
+h;g++,m++)m<h?a[g]=a[m]:delete a[g];a.length-=e-1;break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);c[u.expando]=d[u.expando];d=1;for(e=b.length;d<e;d++)f=b[d],u(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function tc(a,b){return B(function(){return a.apply(null,arguments)},a,b)}var Ob=function(a,b){this.$$element=a;this.$attr=b||{}};Ob.prototype={$normalize:na,$addClass:function(a){a&&0<a.length&&O.addClass(this.$$element,a)},$removeClass:function(a){a&&0<
+a.length&&O.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=uc(a,b),d=uc(b,a);0===c.length?O.removeClass(this.$$element,d):0===d.length?O.addClass(this.$$element,c):O.setClass(this.$$element,c,d)},$set:function(a,b,c,d){var e=qc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=kb(a,"-"));e=Ma(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=b=I(b,"src"===a);!1!==c&&(null===b||b===t?this.$$element.removeAttr(d):
+this.$$element.attr(d,b));(c=this.$$observers)&&r(c[a],function(a){try{a(b)}catch(c){l(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var pa=b.startSymbol(),Ea=b.endSymbol(),Z="{{"==pa||"}}"==Ea?Ga:function(a){return a.replace(/\{\{/g,pa).replace(/}}/g,Ea)},V=/^ngAttr[A-Z]/;return w}]}function na(b){return Ya(b.replace(ue,""))}function uc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),
+f=0;a:for(;f<d.length;f++){for(var g=d[f],k=0;k<e.length;k++)if(g==e[k])continue a;c+=(0<c.length?" ":"")+g}return c}function Pd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){Ca(a,"controller");T(a)?B(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,f){var g,k,m;z(e)&&(g=e.match(a),k=g[1],m=g[3],e=b.hasOwnProperty(k)?b[k]:hc(f.$scope,k,!0)||hc(d,k,!0),Va(e,k,!0));g=c.instantiate(e,f);if(m){if(!f||"object"!==typeof f.$scope)throw x("$controller")("noscp",
+k||e.name,m);f.$scope[m]=g}return g}}]}function Qd(){this.$get=["$window",function(b){return u(b.document)}]}function Rd(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function vc(b){var a={},c,d,e;if(!b)return a;r(b.split("\n"),function(b){e=b.indexOf(":");c=N(aa(b.substr(0,e)));d=aa(b.substr(e+1));c&&(a[c]=a[c]?a[c]+", "+d:d)});return a}function wc(b){var a=T(b)?b:t;return function(c){a||(a=vc(b));return c?a[N(c)]||null:a}}function xc(b,a,c){if(P(c))return c(b,
+a);r(c,function(c){b=c(b,a)});return b}function Ud(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){z(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=cc(d)));return d}],transformRequest:[function(a){return T(a)&&"[object File]"!==ya.call(a)&&"[object Blob]"!==ya.call(a)?ta(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ga(d),put:ga(d),patch:ga(d)},xsrfCookieName:"XSRF-TOKEN",
+xsrfHeaderName:"X-XSRF-TOKEN"},f=this.interceptors=[],g=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,p){function q(a){function b(a){var d=B({},a,{data:xc(a.data,a.headers,c.transformResponse)});return 200<=a.status&&300>a.status?d:n.reject(d)}var c={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},d=function(a){var b=e.headers,c=B({},a.headers),d,f,b=B({},b.common,b[N(a.method)]);
+a:for(d in b){a=N(d);for(f in c)if(N(f)===a)continue a;c[d]=b[d]}(function(a){var b;r(a,function(c,d){P(c)&&(b=c(),null!=b?a[d]=b:delete a[d])})})(c);return c}(a);B(c,a);c.headers=d;c.method=Ia(c.method);var f=[function(a){d=a.headers;var c=xc(a.data,wc(d),a.transformRequest);D(c)&&r(d,function(a,b){"content-type"===N(b)&&delete d[b]});D(a.withCredentials)&&!D(e.withCredentials)&&(a.withCredentials=e.withCredentials);return s(a,c,d).then(b,b)},t],g=n.when(c);for(r(C,function(a){(a.request||a.requestError)&&
+f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var m=f.shift(),g=g.then(a,m)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,c)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,c)});return g};return g}function s(c,f,g){function h(a,b,c,e){E&&(200<=a&&300>a?E.put(u,[a,b,vc(c),e]):E.remove(u));p(b,a,c,e);d.$$phase||d.$apply()}function p(a,b,d,e){b=Math.max(b,0);(200<=
+b&&300>b?C.resolve:C.reject)({data:a,status:b,headers:wc(d),config:c,statusText:e})}function s(){var a=Qa(q.pendingRequests,c);-1!==a&&q.pendingRequests.splice(a,1)}var C=n.defer(),r=C.promise,E,F,u=L(c.url,c.params);q.pendingRequests.push(c);r.then(s,s);!c.cache&&!e.cache||(!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method)||(E=T(c.cache)?c.cache:T(e.cache)?e.cache:v);if(E)if(F=E.get(u),A(F)){if(F&&P(F.then))return F.then(s,s),F;H(F)?p(F[1],F[0],ga(F[2]),F[3]):p(F,200,{},"OK")}else E.put(u,r);D(F)&&
+((F=Pb(c.url)?b.cookies()[c.xsrfCookieName||e.xsrfCookieName]:t)&&(g[c.xsrfHeaderName||e.xsrfHeaderName]=F),a(c.method,u,f,h,g,c.timeout,c.withCredentials,c.responseType));return r}function L(a,b){if(!b)return a;var c=[];Tc(b,function(a,b){null===a||D(a)||(H(a)||(a=[a]),r(a,function(a){T(a)&&(sa(a)?a=a.toISOString():T(a)&&(a=ta(a)));c.push(Ba(b)+"="+Ba(a))}))});0<c.length&&(a+=(-1==a.indexOf("?")?"?":"&")+c.join("&"));return a}var v=c("$http"),C=[];r(f,function(a){C.unshift(z(a)?p.get(a):p.invoke(a))});
+r(g,function(a,b){var c=z(a)?p.get(a):p.invoke(a);C.splice(b,0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});q.pendingRequests=[];(function(a){r(arguments,function(a){q[a]=function(b,c){return q(B(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){q[a]=function(b,c,d){return q(B(d||{},{method:a,url:b,data:c}))}})})("post","put");q.defaults=e;return q}]}function ve(b){if(8>=R&&(!b.match(/^(get|post|head|put|delete|options)$/i)||
+!Q.XMLHttpRequest))return new Q.ActiveXObject("Microsoft.XMLHTTP");if(Q.XMLHttpRequest)return new Q.XMLHttpRequest;throw x("$httpBackend")("noxhr");}function Vd(){this.$get=["$browser","$window","$document",function(b,a,c){return we(b,ve,b.defer,a.angular.callbacks,c[0])}]}function we(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),g=null;f.type="text/javascript";f.src=a;f.async=!0;g=function(a){Za(f,"load",g);Za(f,"error",g);e.body.removeChild(f);f=null;var k=-1,s="unknown";a&&("load"!==
+a.type||d[b].called||(a={type:"error"}),s=a.type,k="error"===a.type?404:200);c&&c(k,s)};rb(f,"load",g);rb(f,"error",g);8>=R&&(f.onreadystatechange=function(){z(f.readyState)&&/loaded|complete/.test(f.readyState)&&(f.onreadystatechange=null,g({type:"load"}))});e.body.appendChild(f);return g}var g=-1;return function(e,m,h,l,n,p,q,s){function L(){C=g;I&&I();w&&w.abort()}function v(a,d,e,f,g){K&&c.cancel(K);I=w=null;0===d&&(d=e?200:"file"==ua(m).protocol?404:0);a(1223===d?204:d,e,f,g||"");b.$$completeOutstandingRequest(y)}
+var C;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==N(e)){var O="_"+(d.counter++).toString(36);d[O]=function(a){d[O].data=a;d[O].called=!0};var I=f(m.replace("JSON_CALLBACK","angular.callbacks."+O),O,function(a,b){v(l,a,d[O].data,"",b);d[O]=y})}else{var w=a(e);w.open(e,m,!0);r(n,function(a,b){A(a)&&w.setRequestHeader(b,a)});w.onreadystatechange=function(){if(w&&4==w.readyState){var a=null,b=null,c="";C!==g&&(a=w.getAllResponseHeaders(),b="response"in w?w.response:w.responseText);C===g&&
+10>R||(c=w.statusText);v(l,C||w.status,b,a,c)}};q&&(w.withCredentials=!0);if(s)try{w.responseType=s}catch(da){if("json"!==s)throw da;}w.send(h||null)}if(0<p)var K=c(L,p);else p&&P(p.then)&&p.then(L)}}function Sd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(f,h,l){for(var n,p,q=0,s=[],L=f.length,v=!1,C=[];q<L;)-1!=(n=f.indexOf(b,q))&&-1!=(p=f.indexOf(a,
+n+g))?(q!=n&&s.push(f.substring(q,n)),s.push(q=c(v=f.substring(n+g,p))),q.exp=v,q=p+k,v=!0):(q!=L&&s.push(f.substring(q)),q=L);(L=s.length)||(s.push(""),L=1);if(l&&1<s.length)throw yc("noconcat",f);if(!h||v)return C.length=L,q=function(a){try{for(var b=0,c=L,g;b<c;b++){if("function"==typeof(g=s[b]))if(g=g(a),g=l?e.getTrusted(l,g):e.valueOf(g),null==g)g="";else switch(typeof g){case "string":break;case "number":g=""+g;break;default:g=ta(g)}C[b]=g}return C.join("")}catch(k){a=yc("interr",f,k.toString()),
+d(a)}},q.exp=f,q.parts=s,q}var g=b.length,k=a.length;f.startSymbol=function(){return b};f.endSymbol=function(){return a};return f}]}function Td(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,g,k,m){var h=a.setInterval,l=a.clearInterval,n=c.defer(),p=n.promise,q=0,s=A(m)&&!m;k=A(k)?k:0;p.then(null,null,d);p.$$intervalId=h(function(){n.notify(q++);0<k&&q>=k&&(n.resolve(q),l(p.$$intervalId),delete e[p.$$intervalId]);s||b.$apply()},g);e[p.$$intervalId]=n;return p}var e={};d.cancel=
+function(b){return b&&b.$$intervalId in e?(e[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete e[b.$$intervalId],!0):!1};return d}]}function bd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),
+SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function Qb(b){b=b.split("/");for(var a=b.length;a--;)b[a]=
+jb(b[a]);return b.join("/")}function zc(b,a,c){b=ua(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=Z(b.port)||xe[b.protocol]||null}function Ac(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ua(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=ec(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function qa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function cb(b){var a=
+b.indexOf("#");return-1==a?b:b.substr(0,a)}function Rb(b){return b.substr(0,cb(b).lastIndexOf("/")+1)}function Bc(b,a){this.$$html5=!0;a=a||"";var c=Rb(b);zc(b,this,b);this.$$parse=function(a){var e=qa(c,a);if(!z(e))throw Sb("ipthprfx",a,c);Ac(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Cb(this.$$search),b=this.$$hash?"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;
+if((e=qa(b,d))!==t)return d=e,(e=qa(a,e))!==t?c+(qa("/",e)||e):b+d;if((e=qa(c,d))!==t)return c+e;if(c==d+"/")return c}}function Tb(b,a){var c=Rb(b);zc(b,this,b);this.$$parse=function(d){var e=qa(b,d)||qa(c,d),e="#"==e.charAt(0)?qa(a,e):this.$$html5?e:"";if(!z(e))throw Sb("ihshprfx",d,a);Ac(e,this,b);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Cb(this.$$search),e=this.$$hash?
+"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(cb(b)==cb(a))return a}}function Ub(b,a){this.$$html5=!0;Tb.apply(this,arguments);var c=Rb(b);this.$$rewrite=function(d){var e;if(b==cb(d))return d;if(e=qa(c,d))return b+a+e;if(c===d+"/")return c};this.$$compose=function(){var c=Cb(this.$$search),e=this.$$hash?"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function sb(b){return function(){return this[b]}}
+function Cc(b,a){return function(c){if(D(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Wd(){var b="",a=!1;this.hashPrefix=function(a){return A(a)?(b=a,this):b};this.html5Mode=function(b){return A(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,f){function g(a){c.$broadcast("$locationChangeSuccess",k.absUrl(),a)}var k,m,h=d.baseHref(),l=d.url(),n;a?(n=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(h||"/"),m=e.history?Bc:Ub):(n=
+cb(l),m=Tb);k=new m(n,"#"+b);k.$$parse(k.$$rewrite(l));var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var e=u(a.target);"a"!==N(e[0].nodeName);)if(e[0]===f[0]||!(e=e.parent())[0])return;var g=e.prop("href");T(g)&&"[object SVGAnimatedString]"===g.toString()&&(g=ua(g.animVal).href);if(!p.test(g)){if(m===Ub){var h=e.attr("href")||e.attr("xlink:href");if(h&&0>h.indexOf("://"))if(g="#"+b,"/"==h[0])g=n+g+h;else if("#"==h[0])g=n+g+(k.path()||"/")+h;
+else{var l=k.path().split("/"),h=h.split("/");2!==l.length||l[1]||(l.length=1);for(var q=0;q<h.length;q++)"."!=h[q]&&(".."==h[q]?l.pop():h[q].length&&l.push(h[q]));g=n+g+l.join("/")}}l=k.$$rewrite(g);g&&(!e.attr("target")&&l&&!a.isDefaultPrevented())&&(a.preventDefault(),l!=d.url()&&(k.$$parse(l),c.$apply(),Q.angular["ff-684208-preventDefault"]=!0))}}});k.absUrl()!=l&&d.url(k.absUrl(),!0);d.onUrlChange(function(a){k.absUrl()!=a&&(c.$evalAsync(function(){var b=k.absUrl();k.$$parse(a);c.$broadcast("$locationChangeStart",
+a,b).defaultPrevented?(k.$$parse(b),d.url(b)):g(b)}),c.$$phase||c.$digest())});var q=0;c.$watch(function(){var a=d.url(),b=k.$$replace;q&&a==k.absUrl()||(q++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",k.absUrl(),a).defaultPrevented?k.$$parse(a):(d.url(k.absUrl(),b),g(a))}));k.$$replace=!1;return q});return k}]}function Xd(){var b=!0,a=this;this.debugEnabled=function(a){return A(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&
+-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||y;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];r(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ja(b,
+a){if("__defineGetter__"===b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===b||"__proto__"===b)throw ka("isecfld",a);return b}function Oa(b,a){if(b){if(b.constructor===b)throw ka("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw ka("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw ka("isecdom",a);if(b===Object)throw ka("isecobj",a);}return b}function tb(b,a,c,d,e){e=e||{};a=a.split(".");for(var f,g=0;1<a.length;g++){f=ja(a.shift(),d);
+var k=b[f];k||(k={},b[f]=k);b=k;b.then&&e.unwrapPromises&&(va(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===t&&(b.$$v={}),b=b.$$v)}f=ja(a.shift(),d);Oa(b,d);Oa(b[f],d);return b[f]=c}function Dc(b,a,c,d,e,f,g){ja(b,f);ja(a,f);ja(c,f);ja(d,f);ja(e,f);return g.unwrapPromises?function(g,m){var h=m&&m.hasOwnProperty(b)?m:g,l;if(null==h)return h;(h=h[b])&&h.then&&(va(f),"$$v"in h||(l=h,l.$$v=t,l.then(function(a){l.$$v=a})),h=h.$$v);if(!a)return h;if(null==h)return t;(h=h[a])&&h.then&&
+(va(f),"$$v"in h||(l=h,l.$$v=t,l.then(function(a){l.$$v=a})),h=h.$$v);if(!c)return h;if(null==h)return t;(h=h[c])&&h.then&&(va(f),"$$v"in h||(l=h,l.$$v=t,l.then(function(a){l.$$v=a})),h=h.$$v);if(!d)return h;if(null==h)return t;(h=h[d])&&h.then&&(va(f),"$$v"in h||(l=h,l.$$v=t,l.then(function(a){l.$$v=a})),h=h.$$v);if(!e)return h;if(null==h)return t;(h=h[e])&&h.then&&(va(f),"$$v"in h||(l=h,l.$$v=t,l.then(function(a){l.$$v=a})),h=h.$$v);return h}:function(f,g){var h=g&&g.hasOwnProperty(b)?g:f;if(null==
+h)return h;h=h[b];if(!a)return h;if(null==h)return t;h=h[a];if(!c)return h;if(null==h)return t;h=h[c];if(!d)return h;if(null==h)return t;h=h[d];return e?null==h?t:h=h[e]:h}}function Ec(b,a,c){if(Vb.hasOwnProperty(b))return Vb[b];var d=b.split("."),e=d.length,f;if(a.csp)f=6>e?Dc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,f){var g=0,k;do k=Dc(d[g++],d[g++],d[g++],d[g++],d[g++],c,a)(b,f),f=t,b=k;while(g<e);return k};else{var g="var p;\n";r(d,function(b,d){ja(b,c);g+="if(s == null) return undefined;\ns="+
+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var g=g+"return s;",k=new Function("s","k","pw",g);k.toString=$(g);f=a.unwrapPromises?function(a,b){return k(a,b,va)}:k}"hasOwnProperty"!==b&&(Vb[b]=f);return f}function Yd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=
+function(b){return A(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return A(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;va=function(b){a.logPromiseWarnings&&!Fc.hasOwnProperty(b)&&(Fc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];
+e=new Wb(a);e=(new db(e,c,a)).parse(d);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return y}}}]}function $d(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return ye(function(a){b.$evalAsync(a)},a)}]}function ye(b,a){function c(a){return a}function d(a){return g(a)}var e=function(){var g=[],h,l;return l={resolve:function(a){if(g){var c=g;g=t;h=f(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],h.then(a[0],a[1],a[2])})}},reject:function(a){l.resolve(k(a))},
+notify:function(a){if(g){var c=g;g.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,f,k){var l=e(),L=function(d){try{l.resolve((P(b)?b:c)(d))}catch(e){l.reject(e),a(e)}},v=function(b){try{l.resolve((P(f)?f:d)(b))}catch(c){l.reject(c),a(c)}},C=function(b){try{l.notify((P(k)?k:c)(b))}catch(d){a(d)}};g?g.push([L,v,C]):h.then(L,v,C);return l.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):
+d.reject(a);return d.promise}function d(e,f){var g=null;try{g=(a||c)()}catch(k){return b(k,!1)}return g&&P(g.then)?g.then(function(){return b(e,f)},function(a){return b(a,!1)}):b(e,f)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},f=function(a){return a&&P(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},g=function(a){var b=e();b.reject(a);return b.promise},k=function(c){return{then:function(f,g){var k=e();b(function(){try{k.resolve((P(g)?
+g:d)(c))}catch(b){k.reject(b),a(b)}});return k.promise}}};return{defer:e,reject:g,when:function(k,h,l,n){var p=e(),q,s=function(b){try{return(P(h)?h:c)(b)}catch(d){return a(d),g(d)}},L=function(b){try{return(P(l)?l:d)(b)}catch(c){return a(c),g(c)}},v=function(b){try{return(P(n)?n:c)(b)}catch(d){a(d)}};b(function(){f(k).then(function(a){q||(q=!0,p.resolve(f(a).then(s,L,v)))},function(a){q||(q=!0,p.resolve(L(a)))},function(a){q||p.notify(v(a))})});return p.promise},all:function(a){var b=e(),c=0,d=H(a)?
+[]:{};r(a,function(a,e){c++;f(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function ge(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:
+function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};f.supported=e;return f}]}function Zd(){var b=10,a=x("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,e,f,g){function k(){this.$id=gb();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=
+[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}function m(b){if(p.$$phase)throw a("inprog",p.$$phase);p.$$phase=b}function h(a,b){var c=f(a);Va(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}k.prototype={constructor:k,$new:function(a){a?(a=new k,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(this.$$childScopeClass||(this.$$childScopeClass=
+function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$id=gb();this.$$childScopeClass=null},this.$$childScopeClass.prototype=this),a=new this.$$childScopeClass);a["this"]=a;a.$parent=this;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=h(a,"watch"),f=this.$$watchers,g={fn:b,last:n,get:e,exp:a,
+eq:!!d};c=null;if(!P(b)){var k=h(b||y,"listener");g.fn=function(a,b,c){k(c)}}if("string"==typeof a&&e.constant){var m=g.fn;g.fn=function(a,b,c){m.call(this,a,b,c);Ra(f,g)}}f||(f=this.$$watchers=[]);f.unshift(g);return function(){Ra(f,g);c=null}},$watchCollection:function(a,b){var c=this,d,e,g,k=1<b.length,h=0,m=f(a),l=[],p={},n=!0,r=0;return this.$watch(function(){d=m(c);var a,b,f;if(T(d))if(fb(d))for(e!==l&&(e=l,r=e.length=0,h++),a=d.length,r!==a&&(h++,e.length=r=a),b=0;b<a;b++)f=e[b]!==e[b]&&d[b]!==
+d[b],f||e[b]===d[b]||(h++,e[b]=d[b]);else{e!==p&&(e=p={},r=0,h++);a=0;for(b in d)d.hasOwnProperty(b)&&(a++,e.hasOwnProperty(b)?(f=e[b]!==e[b]&&d[b]!==d[b],f||e[b]===d[b]||(h++,e[b]=d[b])):(r++,e[b]=d[b],h++));if(r>a)for(b in h++,e)e.hasOwnProperty(b)&&!d.hasOwnProperty(b)&&(r--,delete e[b])}else e!==d&&(e=d,h++);return h},function(){n?(n=!1,b(d,d,c)):b(d,g,c);if(k)if(T(d))if(fb(d)){g=Array(d.length);for(var a=0;a<d.length;a++)g[a]=d[a]}else for(a in g={},d)ib.call(d,a)&&(g[a]=d[a]);else g=d})},$digest:function(){var d,
+f,g,k,h=this.$$asyncQueue,l=this.$$postDigestQueue,r,w,t=b,K,W=[],u,J,E;m("$digest");c=null;do{w=!1;for(K=this;h.length;){try{E=h.shift(),E.scope.$eval(E.expression)}catch(F){p.$$phase=null,e(F)}c=null}a:do{if(k=K.$$watchers)for(r=k.length;r--;)try{if(d=k[r])if((f=d.get(K))!==(g=d.last)&&!(d.eq?za(f,g):"number"===typeof f&&"number"===typeof g&&isNaN(f)&&isNaN(g)))w=!0,c=d,d.last=d.eq?Ha(f,null):f,d.fn(f,g===n?f:g,K),5>t&&(u=4-t,W[u]||(W[u]=[]),J=P(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,
+J+="; newVal: "+ta(f)+"; oldVal: "+ta(g),W[u].push(J));else if(d===c){w=!1;break a}}catch(A){p.$$phase=null,e(A)}if(!(k=K.$$childHead||K!==this&&K.$$nextSibling))for(;K!==this&&!(k=K.$$nextSibling);)K=K.$parent}while(K=k);if((w||h.length)&&!t--)throw p.$$phase=null,a("infdig",b,ta(W));}while(w||h.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(x){e(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==p&&(r(this.$$listenerCount,
+Bb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=y,this.$on=
+this.$watch=function(){return y})}},$eval:function(a,b){return f(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length||g.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=
+c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[Qa(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,k={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){k.defaultPrevented=!0},defaultPrevented:!1},h=[k].concat(Aa.call(arguments,1)),m,l;do{d=f.$$listeners[a]||c;k.currentScope=f;m=0;for(l=d.length;m<l;m++)if(d[m])try{d[m].apply(null,h)}catch(p){e(p)}else d.splice(m,
+1),m--,l--;if(g)break;f=f.$parent}while(f);return k},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(Aa.call(arguments,1)),k,h;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];k=0;for(h=d.length;k<h;k++)if(d[k])try{d[k].apply(null,g)}catch(m){e(m)}else d.splice(k,1),k--,h--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};
+var p=new k;return p}]}function cd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file):|data:image\/)/;this.aHrefSanitizationWhitelist=function(a){return A(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return A(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;if(!R||8<=R)if(f=ua(c).href,""!==f&&!f.match(e))return"unsafe:"+f;return c}}}function ze(b){if("self"===b)return b;if(z(b)){if(-1<b.indexOf("***"))throw wa("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,
+"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(hb(b))return RegExp("^"+b.source+"$");throw wa("imatcher");}function Gc(b){var a=[];A(b)&&r(b,function(b){a.push(ze(b))});return a}function be(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=Gc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=Gc(b));return a};this.$get=["$injector",function(c){function d(a){var b=
+function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw wa("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));var f=d(),g={};g[fa.HTML]=d(f);g[fa.CSS]=d(f);g[fa.URL]=d(f);g[fa.JS]=d(f);g[fa.RESOURCE_URL]=d(g[fa.URL]);return{trustAs:function(a,b){var c=g.hasOwnProperty(a)?g[a]:null;if(!c)throw wa("icontext",
+a,b);if(null===b||b===t||""===b)return b;if("string"!==typeof b)throw wa("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===t||""===d)return d;var f=g.hasOwnProperty(c)?g[c]:null;if(f&&d instanceof f)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var f=ua(d.toString()),l,n,p=!1;l=0;for(n=b.length;l<n;l++)if("self"===b[l]?Pb(f):b[l].exec(f.href)){p=!0;break}if(p)for(l=0,n=a.length;l<n;l++)if("self"===a[l]?Pb(f):a[l].exec(f.href)){p=!1;break}if(p)return d;throw wa("insecurl",
+d.toString());}if(c===fa.HTML)return e(d);throw wa("unsafe");},valueOf:function(a){return a instanceof f?a.$$unwrapTrustedValue():a}}}]}function ae(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw wa("iequirks");var e=ga(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},
+e.valueOf=Ga);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var f=e.parseAs,g=e.getTrusted,k=e.trustAs;r(fa,function(a,b){var c=N(b);e[Ya("parse_as_"+c)]=function(b){return f(a,b)};e[Ya("get_trusted_"+c)]=function(b){return g(a,b)};e[Ya("trust_as_"+c)]=function(b){return k(a,b)}});return e}]}function ce(){this.$get=["$window","$document",function(b,a){var c={},d=Z((/android (\d+)/.exec(N((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||
+{}).userAgent),f=a[0]||{},g=f.documentMode,k,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,h=f.body&&f.body.style,l=!1,n=!1;if(h){for(var p in h)if(l=m.exec(p)){k=l[0];k=k.substr(0,1).toUpperCase()+k.substr(1);break}k||(k="WebkitOpacity"in h&&"webkit");l=!!("transition"in h||k+"Transition"in h);n=!!("animation"in h||k+"Animation"in h);!d||l&&n||(l=z(f.body.style.webkitTransition),n=z(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!g||7<
+g),hasEvent:function(a){if("input"==a&&9==R)return!1;if(D(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:Wa(),vendorPrefix:k,transitions:l,animations:n,android:d,msie:R,msieDocumentMode:g}}]}function ee(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,k,m){var h=c.defer(),l=h.promise,n=A(m)&&!m;k=a.defer(function(){try{h.resolve(e())}catch(a){h.reject(a),d(a)}finally{delete f[l.$$timeoutId]}n||b.$apply()},k);l.$$timeoutId=k;f[k]=h;
+return l}var f={};e.cancel=function(b){return b&&b.$$timeoutId in f?(f[b.$$timeoutId].reject("canceled"),delete f[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ua(b,a){var c=b;R&&(V.setAttribute("href",c),c=V.href);V.setAttribute("href",c);return{href:V.href,protocol:V.protocol?V.protocol.replace(/:$/,""):"",host:V.host,search:V.search?V.search.replace(/^\?/,""):"",hash:V.hash?V.hash.replace(/^#/,""):"",hostname:V.hostname,port:V.port,pathname:"/"===V.pathname.charAt(0)?V.pathname:
+"/"+V.pathname}}function Pb(b){b=z(b)?ua(b):b;return b.protocol===Hc.protocol&&b.host===Hc.host}function fe(){this.$get=$(Q)}function mc(b){function a(d,e){if(T(d)){var f={};r(d,function(b,c){f[c]=a(c,b)});return f}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Ic);a("date",Jc);a("filter",Ae);a("json",Be);a("limitTo",Ce);a("lowercase",De);a("number",Kc);a("orderBy",Lc);a("uppercase",Ee)}function Ae(){return function(b,
+a,c){if(!H(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Ua.equals(a,b)}:function(a,b){if(a&&b&&"object"===typeof a&&"object"===typeof b){for(var d in a)if("$"!==d.charAt(0)&&ib.call(a,d)&&c(a[d],b[d]))return!0;return!1}b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var f=function(a,b){if("string"==typeof b&&"!"===b.charAt(0))return!f(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,
+b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&f(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(f(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var g in a)(function(b){"undefined"!==typeof a[b]&&e.push(function(c){return f("$"==b?c:c&&c[b],a[b])})})(g);break;case "function":e.push(a);break;default:return b}d=[];for(g=0;g<b.length;g++){var k=
+b[g];e.check(k)&&d.push(k)}return d}}function Ic(b){var a=b.NUMBER_FORMATS;return function(b,d){D(d)&&(d=a.CURRENCY_SYM);return Mc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Kc(b){var a=b.NUMBER_FORMATS;return function(b,d){return Mc(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Mc(b,a,c,d,e){if(null==b||!isFinite(b)||T(b))return"";var f=0>b;b=Math.abs(b);var g=b+"",k="",m=[],h=!1;if(-1!==g.indexOf("e")){var l=g.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&
+l[3]>e+1?(g="0",b=0):(k=g,h=!0)}if(h)0<e&&(-1<b&&1>b)&&(k=b.toFixed(e));else{g=(g.split(Nc)[1]||"").length;D(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);b=(""+b).split(Nc);g=b[0];b=b[1]||"";var l=0,n=a.lgSize,p=a.gSize;if(g.length>=n+p)for(l=g.length-n,h=0;h<l;h++)0===(l-h)%p&&0!==h&&(k+=c),k+=g.charAt(h);for(h=l;h<g.length;h++)0===(g.length-h)%n&&0!==h&&(k+=c),k+=g.charAt(h);for(;b.length<e;)b+="0";e&&"0"!==e&&(k+=d+b.substr(0,e))}m.push(f?
+a.negPre:a.posPre);m.push(k);m.push(f?a.negSuf:a.posSuf);return m.join("")}function Xb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function Y(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Xb(e,a,d)}}function ub(b,a){return function(c,d){var e=c["get"+b](),f=Ia(a?"SHORT"+b:b);return d[f][e]}}function Jc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:
+a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Z(b[9]+b[10]),g=Z(b[9]+b[11]));k.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));f=Z(b[4]||0)-f;g=Z(b[5]||0)-g;k=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,f,g,k,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var f="",g=[],k,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;z(c)&&(c=Fe.test(c)?Z(c):a(c));Ab(c)&&(c=new Date(c));if(!sa(c))return c;
+for(;e;)(m=Ge.exec(e))?(g=g.concat(Aa.call(m,1)),e=g.pop()):(g.push(e),e=null);r(g,function(a){k=He[a];f+=k?k(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return f}}function Be(){return function(b){return ta(b,!0)}}function Ce(){return function(b,a){if(!H(b)&&!z(b))return b;a=Infinity===Math.abs(Number(a))?Number(a):Z(a);if(z(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,e=a):(d=b.length+a,e=b.length);
+for(;d<e;d++)c.push(b[d]);return c}}function Lc(b){return function(a,c,d){function e(a,b){return Ta(b)?function(b,c){return a(c,b)}:a}function f(a,b){var c=typeof a,d=typeof b;return c==d?(sa(a)&&sa(b)&&(a=a.valueOf(),b=b.valueOf()),"string"==c&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!H(a)||!c)return a;c=H(c)?c:[c];c=Vc(c,function(a){var c=!1,d=a||Ga;if(z(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a);if(d.constant){var g=d();return e(function(a,
+b){return f(a[g],b[g])},c)}}return e(function(a,b){return f(d(a),d(b))},c)});for(var g=[],k=0;k<a.length;k++)g.push(a[k]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function xa(b){P(b)&&(b={link:b});b.restrict=b.restrict||"AC";return $(b)}function Oc(b,a,c,d){function e(a,c){c=c?"-"+kb(c,"-"):"";d.removeClass(b,(a?vb:wb)+c);d.addClass(b,(a?wb:vb)+c)}var f=this,g=b.parent().controller("form")||xb,k=0,m=f.$error={},h=[];f.$name=a.name||
+a.ngForm;f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;g.$addControl(f);b.addClass(Pa);e(!0);f.$addControl=function(a){Ca(a.$name,"input");h.push(a);a.$name&&(f[a.$name]=a)};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];r(m,function(b,c){f.$setValidity(c,!0,a)});Ra(h,a)};f.$setValidity=function(a,b,c){var d=m[a];if(b)d&&(Ra(d,c),d.length||(k--,k||(e(b),f.$valid=!0,f.$invalid=!1),m[a]=!1,e(!0,a),g.$setValidity(a,!0,f)));else{k||e(b);if(d){if(-1!=Qa(d,c))return}else m[a]=
+d=[],k++,e(!1,a),g.$setValidity(a,!1,f);d.push(c);f.$valid=!1;f.$invalid=!0}};f.$setDirty=function(){d.removeClass(b,Pa);d.addClass(b,yb);f.$dirty=!0;f.$pristine=!1;g.$setDirty()};f.$setPristine=function(){d.removeClass(b,yb);d.addClass(b,Pa);f.$dirty=!1;f.$pristine=!0;r(h,function(a){a.$setPristine()})}}function ra(b,a,c,d){b.$setValidity(a,c);return c?d:t}function Pc(b,a){var c,d;if(a)for(c=0;c<a.length;++c)if(d=a[c],b[d])return!0;return!1}function Ie(b,a,c,d,e){T(e)&&(b.$$hasNativeValidators=!0,
+b.$parsers.push(function(f){if(b.$error[a]||Pc(e,d)||!Pc(e,c))return f;b.$setValidity(a,!1)}))}function zb(b,a,c,d,e,f){var g=a.prop(Je),k=a[0].placeholder,m={},h=N(a[0].type);d.$$validityState=g;if(!e.android){var l=!1;a.on("compositionstart",function(a){l=!0});a.on("compositionend",function(){l=!1;n()})}var n=function(e){if(!l){var f=a.val();if(R&&"input"===(e||m).type&&a[0].placeholder!==k)k=a[0].placeholder;else if("password"!==h&&Ta(c.ngTrim||"T")&&(f=aa(f)),e=g&&d.$$hasNativeValidators,d.$viewValue!==
+f||""===f&&e)b.$$phase?d.$setViewValue(f):b.$apply(function(){d.$setViewValue(f)})}};if(e.hasEvent("input"))a.on("input",n);else{var p,q=function(){p||(p=f.defer(function(){n();p=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||q()});if(e.hasEvent("paste"))a.on("paste cut",q)}a.on("change",n);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var s=c.ngPattern;s&&((e=s.match(/^\/(.*)\/([gim]*)$/))?(s=RegExp(e[1],e[2]),e=function(a){return ra(d,
+"pattern",d.$isEmpty(a)||s.test(a),a)}):e=function(c){var e=b.$eval(s);if(!e||!e.test)throw x("ngPattern")("noregexp",s,e,ha(a));return ra(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var r=Z(c.ngMinlength);e=function(a){return ra(d,"minlength",d.$isEmpty(a)||a.length>=r,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var v=Z(c.ngMaxlength);e=function(a){return ra(d,"maxlength",d.$isEmpty(a)||a.length<=v,a)};d.$parsers.push(e);
+d.$formatters.push(e)}}function Yb(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],l=0;l<b.length;l++)if(e==b[l])continue a;c.push(e)}return c}function e(a){if(!H(a)){if(z(a))return a.split(" ");if(T(a)){var b=[];r(a,function(a,c){a&&(b=b.concat(c.split(" ")))});return b}}return a}return{restrict:"AC",link:function(f,g,k){function m(a,b){var c=g.data("$classCounts")||{},d=[];r(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<
+b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function h(b){if(!0===a||f.$index%2===a){var h=e(b||[]);if(!l){var q=m(h,1);k.$addClass(q)}else if(!za(b,l)){var s=e(l),q=d(h,s),h=d(s,h),h=m(h,-1),q=m(q,1);0===q.length?c.removeClass(g,h):0===h.length?c.addClass(g,q):c.setClass(g,q,h)}}l=ga(b)}var l;f.$watch(k[b],h,!0);k.$observe("class",function(a){h(f.$eval(k[b]))});"ngClass"!==b&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var h=e(f.$eval(k[b]));g===a?(g=m(h,1),k.$addClass(g)):
+(g=m(h,-1),k.$removeClass(g))}})}}}]}var Je="validity",N=function(b){return z(b)?b.toLowerCase():b},ib=Object.prototype.hasOwnProperty,Ia=function(b){return z(b)?b.toUpperCase():b},R,u,Da,Aa=[].slice,Ke=[].push,ya=Object.prototype.toString,Sa=x("ng"),Ua=Q.angular||(Q.angular={}),Xa,Ma,la=["0","0","0"];R=Z((/msie (\d+)/.exec(N(navigator.userAgent))||[])[1]);isNaN(R)&&(R=Z((/trident\/.*; rv:(\d+)/.exec(N(navigator.userAgent))||[])[1]));y.$inject=[];Ga.$inject=[];var H=function(){return P(Array.isArray)?
+Array.isArray:function(b){return"[object Array]"===ya.call(b)}}(),aa=function(){return String.prototype.trim?function(b){return z(b)?b.trim():b}:function(b){return z(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ma=9>R?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Wa=function(){if(A(Wa.isActive_))return Wa.isActive_;var b=!(!X.querySelector("[ng-csp]")&&!X.querySelector("[data-ng-csp]"));
+if(!b)try{new Function("")}catch(a){b=!0}return Wa.isActive_=b},Yc=/[A-Z]/g,ad={full:"1.2.23",major:1,minor:2,dot:23,codeName:"superficial-malady"};S.expando="ng339";var $a=S.cache={},ne=1,rb=Q.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Za=Q.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};S._data=function(b){return this.cache[b[this.expando]]||{}};var ie=/([\:\-\_]+(.))/g,
+je=/^moz([A-Z])/,Hb=x("jqLite"),ke=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Ib=/<|&#?\w+;/,le=/<([\w:]+)/,me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ba.optgroup=ba.option;ba.tbody=ba.tfoot=ba.colgroup=ba.caption=ba.thead;ba.th=
+ba.td;var La=S.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===X.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),S(Q).on("load",a))},toString:function(){var b=[];r(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?u(this[b]):u(this[this.length+b])},length:0,push:Ke,sort:[].sort,splice:[].splice},ob={};r("multiple selected checked disabled readOnly required open".split(" "),function(b){ob[N(b)]=b});var rc={};r("input select option textarea button form details".split(" "),
+function(b){rc[Ia(b)]=!0});r({data:Mb,removeData:Lb},function(b,a){S[a]=b});r({data:Mb,inheritedData:nb,scope:function(b){return u.data(b,"$scope")||nb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return u.data(b,"$isolateScope")||u.data(b,"$isolateScopeNoTemplate")},controller:oc,injector:function(b){return nb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Nb,css:function(b,a,c){a=Ya(a);if(A(c))b.style[a]=c;else{var d;8>=R&&(d=b.currentStyle&&b.currentStyle[a],
+""===d&&(d="auto"));d=d||b.style[a];8>=R&&(d=""===d?t:d);return d}},attr:function(b,a,c){var d=N(a);if(ob[d])if(A(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||y).specified?d:t;else if(A(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?t:b},prop:function(b,a,c){if(A(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(D(d))return e?b[e]:"";b[e]=d}var a=[];9>R?(a[1]=
+"innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(D(a)){if("SELECT"===Ma(b)&&b.multiple){var c=[];r(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(D(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Ja(d[c]);b.innerHTML=a},empty:pc},function(b,a){S.prototype[a]=function(a,d){var e,f,g=this.length;if(b!==pc&&(2==b.length&&b!==Nb&&b!==oc?a:d)===t){if(T(a)){for(e=
+0;e<g;e++)if(b===Mb)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;g=e===t?Math.min(g,1):g;for(f=0;f<g;f++){var k=b(this[f],a,d);e=e?e+k:k}return e}for(e=0;e<g;e++)b(this[e],a,d);return this}});r({removeData:Lb,dealoc:Ja,on:function a(c,d,e,f){if(A(f))throw Hb("onargs");var g=ma(c,"events"),k=ma(c,"handle");g||ma(c,"events",g={});k||ma(c,"handle",k=oe(c,g));r(d.split(" "),function(d){var f=g[d];if(!f){if("mouseenter"==d||"mouseleave"==d){var l=X.body.contains||X.body.compareDocumentPosition?
+function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};g[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||k(a,d)})}else rb(c,d,k),g[d]=[];f=g[d]}f.push(e)})},off:nc,one:function(a,c,d){a=u(a);a.on(c,function f(){a.off(c,
+d);a.off(c,f)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Ja(a);r(new S(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];r(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,c){r(new S(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=a.firstChild;r(new S(c),function(c){a.insertBefore(c,
+d)})}},wrap:function(a,c){c=u(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Ja(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;r(new S(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:mb,removeClass:lb,toggleClass:function(a,c,d){c&&r(c.split(" "),function(c){var f=d;D(f)&&(f=!Nb(a,c));(f?mb:lb)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;
+for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Kb,triggerHandler:function(a,c,d){var e,f;e=c.type||c;var g=(ma(a,"events")||{})[e];g&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopPropagation:y,type:e,target:a},c.type&&(e=B(e,c)),c=ga(g),f=d?[e].concat(d):[e],r(c,function(c){c.apply(a,f)}))}},function(a,c){S.prototype[c]=
+function(c,e,f){for(var g,k=0;k<this.length;k++)D(g)?(g=a(this[k],c,e,f),A(g)&&(g=u(g))):Jb(g,a(this[k],c,e,f));return A(g)?g:this};S.prototype.bind=S.prototype.on;S.prototype.unbind=S.prototype.off});ab.prototype={put:function(a,c){this[Ka(a,this.nextUid)]=c},get:function(a){return this[Ka(a,this.nextUid)]},remove:function(a){var c=this[a=Ka(a,this.nextUid)];delete this[a];return c}};var qe=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,re=/,/,se=/^\s*(_?)(\S+?)\1\s*$/,pe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,
+bb=x("$injector"),Le=x("$animate"),Md=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Le("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout","$$asyncCallback",function(a,d){return{enter:function(a,c,g,k){g?g.after(a):(c&&c[0]||(c=g.parent()),c.append(a));k&&
+d(k)},leave:function(a,c){a.remove();c&&d(c)},move:function(a,c,d,k){this.enter(a,c,d,k)},addClass:function(a,c,g){c=z(c)?c:H(c)?c.join(" "):"";r(a,function(a){mb(a,c)});g&&d(g)},removeClass:function(a,c,g){c=z(c)?c:H(c)?c.join(" "):"";r(a,function(a){lb(a,c)});g&&d(g)},setClass:function(a,c,g,k){r(a,function(a){mb(a,c);lb(a,g)});k&&d(k)},enabled:y}}]}],ia=x("$compile");ic.$inject=["$provide","$$sanitizeUriProvider"];var ue=/^(x[\:\-_]|data[\:\-_])/i,yc=x("$interpolate"),Me=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
+xe={http:80,https:443,ftp:21},Sb=x("$location");Ub.prototype=Tb.prototype=Bc.prototype={$$html5:!1,$$replace:!1,absUrl:sb("$$absUrl"),url:function(a,c){if(D(a))return this.$$url;var d=Me.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:sb("$$protocol"),host:sb("$$host"),port:sb("$$port"),path:Cc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;
+case 1:if(z(a))this.$$search=ec(a);else if(T(a))r(a,function(c,e){null==c&&delete a[e]}),this.$$search=a;else throw Sb("isrcharg");break;default:D(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:Cc("$$hash",Ga),replace:function(){this.$$replace=!0;return this}};var ka=x("$parse"),Fc={},va,Ne=Function.prototype.call,Oe=Function.prototype.apply,Qc=Function.prototype.bind,eb={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},
+undefined:y,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return A(d)?A(e)?d+e:d:A(e)?e:t},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(A(d)?d:0)-(A(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":y,"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,
+c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Pe={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Wb=function(a){this.options=a};Wb.prototype=
+{constructor:Wb,lex:function(a){this.text=a;this.index=0;this.ch=t;this.lastCh=":";for(this.tokens=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{a=
+this.ch+this.peek();var c=a+this.peek(2),d=eb[this.ch],e=eb[a],f=eb[c];f?(this.tokens.push({index:this.index,text:c,fn:f}),this.index+=3):e?(this.tokens.push({index:this.index,text:a,fn:e}),this.index+=2):d?(this.tokens.push({index:this.index,text:this.ch,fn:d}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=
+a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=A(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ka("lexerr",a,c,this.text);
+},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=N(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,literal:!0,constant:!0,fn:function(){return a}})},
+readIdent:function(){for(var a=this,c="",d=this.index,e,f,g,k;this.index<this.text.length;){k=this.text.charAt(this.index);if("."===k||this.isIdent(k)||this.isNumber(k))"."===k&&(e=this.index),c+=k;else break;this.index++}if(e)for(f=this.index;f<this.text.length;){k=this.text.charAt(f);if("("===k){g=c.substr(e-d+1);c=c.substr(0,e-d);this.index=f;break}if(this.isWhitespace(k))f++;else break}d={index:d,text:c};if(eb.hasOwnProperty(c))d.fn=eb[c],d.literal=!0,d.constant=!0;else{var m=Ec(c,this.options,
+this.text);d.fn=B(function(a,c){return m(a,c)},{assign:function(d,e){return tb(d,c,e,a.text,a.options)}})}this.tokens.push(d);g&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:g}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var g=this.text.charAt(this.index),e=e+g;if(f)"u"===g?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=
+4,d+=String.fromCharCode(parseInt(f,16))):d+=Pe[g]||g,f=!1;else if("\\"===g)f=!0;else{if(g===a){this.index++;this.tokens.push({index:c,text:e,string:d,literal:!0,constant:!0,fn:function(){return d}});return}d+=g}this.index++}this.throwError("Unterminated quote",c)}};var db=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};db.ZERO=B(function(){return 0},{constant:!0});db.prototype={constructor:db,parse:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.statements();0!==this.tokens.length&&
+this.throwError("is an unexpected token",this.tokens[0]);a.literal=!!a.literal;a.constant=!!a.constant;return a},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);a.literal=!!c.literal;a.constant=!!c.constant}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):
+"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw ka("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw ka("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var f=this.tokens[0],g=f.text;if(g===a||g===c||g===d||g===e||!(a||c||d||e))return f}return!1},expect:function(a,c,d,e){return(a=this.peek(a,
+c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return B(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return B(function(e,f){return a(e,f)?c(e,f):d(e,f)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return B(function(e,f){return c(e,f,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&
+!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,f=0;f<a.length;f++){var g=a[f];g&&(e=g(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=function(a,e,k){k=[k];for(var m=0;m<d.length;m++)k.push(d[m](a,
+e));return c.apply(a,k)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,f){return a.assign(d,c(d,f),f)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.assignment();if(d=this.expect(":"))return this.ternaryFn(a,c,this.assignment());
+this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},relational:function(){var a=this.additive(),c;if(c=this.expect("<",
+">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(db.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):
+this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=Ec(d,this.options,this.text);return B(function(c,d,k){return e(k||a(c,d))},{assign:function(e,g,k){(k=a(e,k))||a.assign(e,k={});return tb(k,d,g,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return B(function(e,f){var g=a(e,f),k=d(e,f),m;ja(k,c.text);if(!g)return t;(g=Oa(g[k],c.text))&&(g.then&&c.options.unwrapPromises)&&(m=g,"$$v"in g||(m.$$v=t,m.then(function(a){m.$$v=a})),g=
+g.$$v);return g},{assign:function(e,f,g){var k=ja(d(e,g),c.text);(g=Oa(a(e,g),c.text))||a.assign(e,g={});return g[k]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(f,g){for(var k=[],m=c?c(f,g):f,h=0;h<d.length;h++)k.push(d[h](f,g));h=a(f,g,m)||y;Oa(m,e.text);var l=e.text;if(h){if(h.constructor===h)throw ka("isecfn",l);if(h===Ne||h===Oe||Qc&&h===Qc)throw ka("isecff",l);}k=h.apply?
+h.apply(m,k):h(k[0],k[1],k[2],k[3],k[4]);return Oa(k,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{if(this.peek("]"))break;var d=this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return B(function(c,d){for(var g=[],k=0;k<a.length;k++)g.push(a[k](c,d));return g},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;var d=this.expect(),d=d.string||d.text;this.consume(":");
+var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return B(function(c,d){for(var e={},m=0;m<a.length;m++){var h=a[m];e[h.key]=h.value(c,d)}return e},{literal:!0,constant:c})}};var Vb={},wa=x("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},V=X.createElement("a"),Hc=ua(Q.location.href,!0);mc.$inject=["$provide"];Ic.$inject=["$locale"];Kc.$inject=["$locale"];var Nc=".",He={yyyy:Y("FullYear",4),yy:Y("FullYear",
+2,0,!0),y:Y("FullYear",1),MMMM:ub("Month"),MMM:ub("Month",!0),MM:Y("Month",2,1),M:Y("Month",1,1),dd:Y("Date",2),d:Y("Date",1),HH:Y("Hours",2),H:Y("Hours",1),hh:Y("Hours",2,-12),h:Y("Hours",1,-12),mm:Y("Minutes",2),m:Y("Minutes",1),ss:Y("Seconds",2),s:Y("Seconds",1),sss:Y("Milliseconds",3),EEEE:ub("Day"),EEE:ub("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Xb(Math[0<a?"floor":"ceil"](a/60),2)+Xb(Math.abs(a%60),
+2))}},Ge=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Fe=/^\-?\d+$/;Jc.$inject=["$locale"];var De=$(N),Ee=$(Ia);Lc.$inject=["$parse"];var dd=$({restrict:"E",compile:function(a,c){8>=R&&(c.href||c.name||c.$set("href",""),a.append(X.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var f="[object SVGAnimatedString]"===ya.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}),Fb={};r(ob,function(a,
+c){if("multiple"!=a){var d=na("ng-"+c);Fb[d]=function(){return{priority:100,link:function(a,f,g){a.$watch(g[d],function(a){g.$set(c,!!a)})}}}}});r(["src","srcset","href"],function(a){var c=na("ng-"+a);Fb[c]=function(){return{priority:99,link:function(d,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===ya.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$observe(c,function(c){c?(f.$set(k,c),R&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}});var xb={$addControl:y,
+$removeControl:y,$setValidity:y,$setDirty:y,$setPristine:y};Oc.$inject=["$element","$attrs","$scope","$animate"];var Rc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Oc,compile:function(){return{pre:function(a,e,f,g){if(!f.action){var k=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};rb(e[0],"submit",k);e.on("$destroy",function(){c(function(){Za(e[0],"submit",k)},0,!1)})}var m=e.parent().controller("form"),h=f.name||f.ngForm;h&&tb(a,
+h,g,h);if(m)e.on("$destroy",function(){m.$removeControl(g);h&&tb(a,h,t,h);B(g,xb)})}}}}}]},ed=Rc(),rd=Rc(!0),Qe=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Re=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Se=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sc={text:zb,number:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||Se.test(a))return e.$setValidity("number",!0),""===
+a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return t});Ie(e,"number",Te,null,e.$$validityState);e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return ra(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return ra(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return ra(e,"number",e.$isEmpty(a)||Ab(a),a)})},
+url:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);a=function(a){return ra(e,"url",e.$isEmpty(a)||Qe.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);a=function(a){return ra(e,"email",e.$isEmpty(a)||Re.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){D(d.name)&&c.attr("name",gb());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",
+e.$render)},checkbox:function(a,c,d,e){var f=d.ngTrueValue,g=d.ngFalseValue;z(f)||(f=!0);z(g)||(g=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==f};e.$formatters.push(function(a){return a===f});e.$parsers.push(function(a){return a?f:g})},hidden:y,button:y,submit:y,reset:y,file:y},Te=["badInput"],jc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,
+e,f,g){g&&(Sc[N(f.type)]||Sc.text)(d,e,f,g,c,a)}}}],wb="ng-valid",vb="ng-invalid",Pa="ng-pristine",yb="ng-dirty",Ue=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(a,c,d,e,f,g){function k(a,c){c=c?"-"+kb(c,"-"):"";g.removeClass(e,(a?vb:wb)+c);g.addClass(e,(a?wb:vb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var m=f(d.ngModel),
+h=m.assign;if(!h)throw x("ngModel")("nonassign",d.ngModel,ha(e));this.$render=y;this.$isEmpty=function(a){return D(a)||""===a||null===a||a!==a};var l=e.inheritedData("$formController")||xb,n=0,p=this.$error={};e.addClass(Pa);k(!0);this.$setValidity=function(a,c){p[a]!==!c&&(c?(p[a]&&n--,n||(k(!0),this.$valid=!0,this.$invalid=!1)):(k(!1),this.$invalid=!0,this.$valid=!1,n++),p[a]=!c,k(c,a),l.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;g.removeClass(e,yb);g.addClass(e,
+Pa)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,g.removeClass(e,Pa),g.addClass(e,yb),l.$setDirty());r(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,h(a,d),r(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var q=this;a.$watch(function(){var c=m(a);if(q.$modelValue!==c){var d=q.$formatters,e=d.length;for(q.$modelValue=c;e--;)c=d[e](c);q.$viewValue!==c&&(q.$viewValue=c,q.$render())}return c})}],Gd=
+function(){return{require:["ngModel","^?form"],controller:Ue,link:function(a,c,d,e){var f=e[0],g=e[1]||xb;g.$addControl(f);a.$on("$destroy",function(){g.$removeControl(f)})}}},Id=$({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),kc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var f=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(f);
+e.$parsers.unshift(f);d.$observe("required",function(){f(e.$viewValue)})}}}},Hd=function(){return{require:"ngModel",link:function(a,c,d,e){var f=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!D(a)){var c=[];a&&r(a.split(f),function(a){a&&c.push(aa(a))});return c}});e.$formatters.push(function(a){return H(a)?a.join(", "):t});e.$isEmpty=function(a){return!a||!a.length}}}},Ve=/^(true|false|\d+)$/,Jd=function(){return{priority:100,compile:function(a,c){return Ve.test(c.ngValue)?
+function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},jd=xa({compile:function(a){a.addClass("ng-binding");return function(a,d,e){d.data("$binding",e.ngBind);a.$watch(e.ngBind,function(a){d.text(a==t?"":a)})}}}),ld=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],kd=["$sce","$parse",function(a,c){return{compile:function(d){d.addClass("ng-binding");
+return function(d,f,g){f.data("$binding",g.ngBindHtml);var k=c(g.ngBindHtml);d.$watch(function(){return(k(d)||"").toString()},function(c){f.html(a.getTrustedHtml(k(d))||"")})}}}}],md=Yb("",!0),od=Yb("Odd",0),nd=Yb("Even",1),pd=xa({compile:function(a,c){c.$set("ngCloak",t);a.removeClass("ng-cloak")}}),qd=[function(){return{scope:!0,controller:"@",priority:500}}],lc={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
+function(a){var c=na("ng-"+a);lc[c]=["$parse",function(d){return{compile:function(e,f){var g=d(f[c]);return function(c,d){d.on(N(a),function(a){c.$apply(function(){g(c,{$event:a})})})}}}}]});var td=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var k,m,h;c.$watch(e.ngIf,function(f){Ta(f)?m||(m=c.$new(),g(m,function(c){c[c.length++]=X.createComment(" end ngIf: "+e.ngIf+" ");k={clone:c};a.enter(c,d.parent(),d)})):(h&&(h.remove(),
+h=null),m&&(m.$destroy(),m=null),k&&(h=Eb(k.clone),a.leave(h,function(){h=null}),k=null))})}}}],ud=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,f){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ua.noop,compile:function(g,k){var m=k.ngInclude||k.src,h=k.onload||"",l=k.autoscroll;return function(g,k,q,r,L){var v=0,t,u,I,w=function(){u&&(u.remove(),u=null);t&&(t.$destroy(),t=null);I&&(e.leave(I,function(){u=null}),u=I,I=null)};g.$watch(f.parseAsResourceUrl(m),
+function(f){var m=function(){!A(l)||l&&!g.$eval(l)||d()},q=++v;f?(a.get(f,{cache:c}).success(function(a){if(q===v){var c=g.$new();r.template=a;a=L(c,function(a){w();e.enter(a,null,k,m)});t=c;I=a;t.$emit("$includeContentLoaded");g.$eval(h)}}).error(function(){q===v&&w()}),g.$emit("$includeContentRequested")):(w(),r.template=null)})}}}}],Kd=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){d.html(f.template);a(d.contents())(c)}}}],vd=xa({priority:450,
+compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),wd=xa({terminal:!0,priority:1E3}),xd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,f,g){var k=g.count,m=g.$attr.when&&f.attr(g.$attr.when),h=g.offset||0,l=e.$eval(m)||{},n={},p=c.startSymbol(),q=c.endSymbol(),s=/^when(Minus)?(.+)$/;r(g,function(a,c){s.test(c)&&(l[N(c.replace("when","").replace("Minus","-"))]=f.attr(g.$attr[c]))});r(l,function(a,e){n[e]=c(a.replace(d,p+k+"-"+h+q))});e.$watch(function(){var c=
+parseFloat(e.$eval(k));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-h));return n[c](e,f,!0)},function(a){f.text(a)})}}}],yd=["$parse","$animate",function(a,c){var d=x("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,f,g,k,m){var h=g.ngRepeat,l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,p,q,s,t,v,C={$id:Ka};if(!l)throw d("iexp",h);g=l[1];k=l[2];(l=l[3])?(n=a(l),p=function(a,c,d){v&&(C[v]=a);C[t]=c;C.$index=d;return n(e,
+C)}):(q=function(a,c){return Ka(c)},s=function(a){return a});l=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",g);t=l[3]||l[1];v=l[2];var A={};e.$watchCollection(k,function(a){var g,k,l=f[0],n,C={},J,E,F,x,z,y,H=[];if(fb(a))z=a,n=p||q;else{n=p||s;z=[];for(F in a)a.hasOwnProperty(F)&&"$"!=F.charAt(0)&&z.push(F);z.sort()}J=z.length;k=H.length=z.length;for(g=0;g<k;g++)if(F=a===z?g:z[g],x=a[F],x=n(F,x,g),Ca(x,"`track by` id"),A.hasOwnProperty(x))y=A[x],delete A[x],C[x]=
+y,H[g]=y;else{if(C.hasOwnProperty(x))throw r(H,function(a){a&&a.scope&&(A[a.id]=a)}),d("dupes",h,x);H[g]={id:x};C[x]=!1}for(F in A)A.hasOwnProperty(F)&&(y=A[F],g=Eb(y.clone),c.leave(g),r(g,function(a){a.$$NG_REMOVED=!0}),y.scope.$destroy());g=0;for(k=z.length;g<k;g++){F=a===z?g:z[g];x=a[F];y=H[g];H[g-1]&&(l=H[g-1].clone[H[g-1].clone.length-1]);if(y.scope){E=y.scope;n=l;do n=n.nextSibling;while(n&&n.$$NG_REMOVED);y.clone[0]!=n&&c.move(Eb(y.clone),null,u(l));l=y.clone[y.clone.length-1]}else E=e.$new();
+E[t]=x;v&&(E[v]=F);E.$index=g;E.$first=0===g;E.$last=g===J-1;E.$middle=!(E.$first||E.$last);E.$odd=!(E.$even=0===(g&1));y.scope||m(E,function(a){a[a.length++]=X.createComment(" end ngRepeat: "+h+" ");c.enter(a,null,u(l));l=a;y.scope=E;y.clone=a;C[y.id]=y})}A=C})}}}],zd=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Ta(c)?"removeClass":"addClass"](d,"ng-hide")})}}],sd=["$animate",function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Ta(c)?"addClass":"removeClass"](d,
+"ng-hide")})}}],Ad=xa(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Bd=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var g=[],k=[],m=[],h=[];c.$watch(e.ngSwitch||e.on,function(d){var n,p;n=0;for(p=m.length;n<p;++n)m[n].remove();n=m.length=0;for(p=h.length;n<p;++n){var q=k[n];h[n].$destroy();m[n]=q;a.leave(q,function(){m.splice(n,1)})}k.length=0;h.length=
+0;if(g=f.cases["!"+d]||f.cases["?"])c.$eval(e.change),r(g,function(d){var e=c.$new();h.push(e);d.transclude(e,function(c){var e=d.element;k.push(c);a.enter(c,e.parent(),e)})})})}}}],Cd=xa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,f){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),Dd=xa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,f){e.cases["?"]=e.cases["?"]||
+[];e.cases["?"].push({transclude:f,element:c})}}),Fd=xa({link:function(a,c,d,e,f){if(!f)throw x("ngTransclude")("orphan",ha(c));f(function(a){c.empty();c.append(a)})}}),fd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],We=x("ngOptions"),Ed=$({terminal:!0}),gd=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
+e={$setViewValue:y};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var m=this,h={},l=e,n;m.databound=d.ngModel;m.init=function(a,c,d){l=a;n=d};m.addOption=function(c){Ca(c,'"option value"');h[c]=!0;l.$viewValue==c&&(a.val(c),n.parent()&&n.remove())};m.removeOption=function(a){this.hasOption(a)&&(delete h[a],l.$viewValue==a&&this.renderUnknownOption(a))};m.renderUnknownOption=function(c){c="? "+Ka(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",
+!0)};m.hasOption=function(a){return h.hasOwnProperty(a)};c.$on("$destroy",function(){m.renderUnknownOption=y})}],link:function(e,g,k,m){function h(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(z.parent()&&z.remove(),c.val(a),""===a&&v.prop("selected",!0)):D(a)&&v?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){z.parent()&&z.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new ab(d.$viewValue);r(c.find("option"),
+function(c){c.selected=A(a.get(c.value))})};a.$watch(function(){za(e,d.$viewValue)||(e=ga(d.$viewValue),d.$render())});c.on("change",function(){a.$apply(function(){var a=[];r(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function k(){var a={"":[]},c=[""],d,h,s,t,w;s=g.$modelValue;t=v(e)||[];var E=n?Zb(t):t,I,M,B;M={};B=!1;if(q)if(h=g.$modelValue,u&&H(h))for(B=new ab([]),d={},w=0;w<h.length;w++)d[m]=h[w],B.put(u(e,d),h[w]);else B=new ab(h);w=B;
+var D,J;for(B=0;I=E.length,B<I;B++){h=B;if(n){h=E[B];if("$"===h.charAt(0))continue;M[n]=h}M[m]=t[h];d=p(e,M)||"";(h=a[d])||(h=a[d]=[],c.push(d));q?d=A(w.remove(u?u(e,M):r(e,M))):(u?(d={},d[m]=s,d=u(e,d)===u(e,M)):d=s===r(e,M),w=w||d);D=l(e,M);D=A(D)?D:"";h.push({id:u?u(e,M):n?E[B]:B,label:D,selected:d})}q||(x||null===s?a[""].unshift({id:"",label:"",selected:!w}):w||a[""].unshift({id:"?",label:"",selected:!0}));M=0;for(E=c.length;M<E;M++){d=c[M];h=a[d];z.length<=M?(s={element:y.clone().attr("label",
+d),label:h.label},t=[s],z.push(t),f.append(s.element)):(t=z[M],s=t[0],s.label!=d&&s.element.attr("label",s.label=d));D=null;B=0;for(I=h.length;B<I;B++)d=h[B],(w=t[B+1])?(D=w.element,w.label!==d.label&&D.text(w.label=d.label),w.id!==d.id&&D.val(w.id=d.id),D[0].selected!==d.selected&&(D.prop("selected",w.selected=d.selected),R&&D.prop("selected",w.selected))):(""===d.id&&x?J=x:(J=C.clone()).val(d.id).prop("selected",d.selected).attr("selected",d.selected).text(d.label),t.push({element:J,label:d.label,
+id:d.id,selected:d.selected}),D?D.after(J):s.element.append(J),D=J);for(B++;t.length>B;)t.pop().element.remove()}for(;z.length>M;)z.pop()[0].element.remove()}var h;if(!(h=s.match(d)))throw We("iexp",s,ha(f));var l=c(h[2]||h[1]),m=h[4]||h[6],n=h[5],p=c(h[3]||""),r=c(h[2]?h[1]:m),v=c(h[7]),u=h[8]?c(h[8]):null,z=[[{element:f,label:""}]];x&&(a(x)(e),x.removeClass("ng-scope"),x.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=v(e)||[],d={},h,l,p,s,w,x,y;if(q)for(l=[],s=0,x=z.length;s<
+x;s++)for(a=z[s],p=1,w=a.length;p<w;p++){if((h=a[p].element)[0].selected){h=h.val();n&&(d[n]=h);if(u)for(y=0;y<c.length&&(d[m]=c[y],u(e,d)!=h);y++);else d[m]=c[h];l.push(r(e,d))}}else if(h=f.val(),"?"==h)l=t;else if(""===h)l=null;else if(u)for(y=0;y<c.length;y++){if(d[m]=c[y],u(e,d)==h){l=r(e,d);break}}else d[m]=c[h],n&&(d[n]=h),l=r(e,d);g.$setViewValue(l);k()})});g.$render=k;e.$watchCollection(v,k);q&&e.$watchCollection(function(){return g.$modelValue},k)}if(m[1]){var p=m[0];m=m[1];var q=k.multiple,
+s=k.ngOptions,x=!1,v,C=u(X.createElement("option")),y=u(X.createElement("optgroup")),z=C.clone();k=0;for(var w=g.children(),B=w.length;k<B;k++)if(""===w[k].value){v=x=w.eq(k);break}p.init(m,x,z);q&&(m.$isEmpty=function(a){return!a||0===a.length});s?n(e,g,m):q?l(e,g,m):h(e,g,m,p)}}}}],id=["$interpolate",function(a){var c={addOption:y,removeOption:y};return{restrict:"E",priority:100,compile:function(d,e){if(D(e.value)){var f=a(d.text(),!0);f||e.$set("value",d.text())}return function(a,d,e){var h=d.parent(),
+l=h.data("$selectController")||h.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;f?a.$watch(f,function(a,c){e.$set("value",a);a!==c&&l.removeOption(c);l.addOption(a)}):l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}],hd=$({restrict:"E",terminal:!0});Q.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):((Da=Q.jQuery)&&Da.fn.on?(u=Da,B(Da.fn,{scope:La.scope,isolateScope:La.isolateScope,controller:La.controller,injector:La.injector,
+inheritedData:La.inheritedData}),Gb("remove",!0,!0,!1),Gb("empty",!1,!1,!1),Gb("html",!1,!1,!0)):u=S,Ua.element=u,$c(Ua),u(X).ready(function(){Xc(X,fc)}))})(window,document);!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}.ng-hide-add-active,.ng-hide-remove{display:block!important;}</style>');
+//# sourceMappingURL=angular.min.js.map
diff --git a/bitbake/lib/toaster/toastergui/static/js/angular.min.js.map b/bitbake/lib/toaster/toastergui/static/js/angular.min.js.map
new file mode 100644
index 0000000000..8aa40d383c
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/angular.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular.min.js",
+"lineCount":214,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAmBC,CAAnB,CAA8B,CA8BvCC,QAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,SAAAA,EAAAA,CAAAA,IAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,CAAAA,uCAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,OAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,CAAAA,kBAAAA,CAAAA,UAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,SAAAA,EAAAA,QAAAA,CAAAA,aAAAA,CAAAA,EAAAA,CAAAA,CAAAA,WAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,QAAAA,EAAAA,MAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,UAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CA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AA,CAA9C,CAEA,CADAA,EAAA,CAAwB,OAAxB,CAAiC,CAAA,CAAjC,CAAwC,CAAA,CAAxC,CAA+C,CAAA,CAA/C,CACA,CAAAA,EAAA,CAAwB,MAAxB,CAAgC,CAAA,CAAhC,CAAuC,CAAA,CAAvC,CAA8C,CAAA,CAA9C,CAbF,EAeE3K,CAfF,CAeW8L,CAi+nBX,CA/9nBA7I,EAAAlD,QA+9nBA,CA/9nBkBC,CA+9nBlB,CAFA4F,EAAA,CAAmB3C,EAAnB,CAEA,CAAAjD,CAAA,CAAOxH,CAAP,CAAA+7C,MAAA,CAAuB,QAAQ,EAAG,CAChCjzC,EAAA,CAAY9I,CAAZ,CAAsB+I,EAAtB,CADgC,CAAlC,CAZA,CA16qBqC,CAAtC,CAAA,CA07qBEhJ,MA17qBF,CA07qBUC,QA17qBV,CA47qBD,EAACD,MAAA0K,QAAAmpD,MAAA,EAAD,EAA2B7zD,MAAA0K,QAAAlD,QAAA,CAAuBvH,QAAvB,CAAAkE,KAAA,CAAsC,MAAtC,CAAA25C,QAAA,CAAsD,oVAAtD;",
+"sources":["angular.js"],
+"names":["window","document","undefined","minErr","isArrayLike","obj","isWindow","length","nodeType","isString","isArray","forEach","iterator","context","key","isFunction","hasOwnProperty","call","sortedKeys","keys","push","sort","forEachSorted","i","reverseParams","iteratorFn","value","nextUid","index","uid","digit","charCodeAt","join","String","fromCharCode","unshift","setHashKey","h","$$hashKey","extend","dst","arguments","int","str","parseInt","inherit","parent","extra","noop","identity","$","valueFn","isUndefined","isDefined","isObject","isNumber","isDate","toString","isRegExp","location","alert","setInterval","isElement","node","nodeName","prop","attr","find","map","results","list","indexOf","array","arrayRemove","splice","copy","source","destination","stackSource","stackDest","$evalAsync","$watch","ngMinErr","result","Date","getTime","RegExp","match","lastIndex","shallowCopy","src","charAt","equals","o1","o2","t1","t2","isNaN","keySet","bind","self","fn","curryArgs","slice","startIndex","apply","concat","toJsonReplacer","val","toJson","pretty","JSON","stringify","fromJson","json","parse","toBoolean","v","lowercase","startingTag","element","jqLite","clone","empty","e","elemHtml","append","html","TEXT_NODE","replace","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","key_value","split","toKeyValue","parts","arrayValue","encodeUriQuery","encodeUriSegment","pctEncodeSpaces","encodeURIComponent","angularInit","bootstrap","elements","appElement","module","names","NG_APP_CLASS_REGEXP","name","getElementById","querySelectorAll","exec","className","attributes","modules","doBootstrap","injector","tag","$provide","createInjector","invoke","scope","compile","animate","$apply","data","NG_DEFER_BOOTSTRAP","test","angular","resumeBootstrap","angular.resumeBootstrap","extraModules","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","constructor","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockElements","nodes","startNode","endNode","nextSibling","setupModuleLoader","$injectorMinErr","$$minErr","factory","requires","configFn","invokeLater","provider","method","insertMethod","invokeQueue","moduleInstance","runBlocks","config","run","block","publishExternalAPI","version","uppercase","csp","angularModule","$LocaleProvider","ngModule","$$SanitizeUriProvider","$CompileProvider","directive","htmlAnchorDirective","inputDirective","formDirective","scriptDirective","selectDirective","styleDirective","optionDirective","ngBindDirective","ngBindHtmlDirective","ngBindTemplateDirective","ngClassDirective","ngClassEvenDirective","ngClassOddDirective","ngCloakDirective","ngControllerDirective","ngFormDirective","ngHideDirective","ngIfDirective","ngIncludeDirective","ngInitDirective","ngNonBindableDirective","ngPluralizeDirective","ngRepeatDirective","ngShowDirective","ngStyleDirective","ngSwitchDirective","ngSwitchWhenDirective","ngSwitchDefaultDirective","ngOptionsDirective","ngTranscludeDirective","ngModelDirective","ngListDirective","ngChangeDirective","requiredDirective","ngValueDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$AnchorScrollProvider","$AnimateProvider","$BrowserProvider","$CacheFactoryProvider","$ControllerProvider","$DocumentProvider","$ExceptionHandlerProvider","$FilterProvider","$InterpolateProvider","$IntervalProvider","$HttpProvider","$HttpBackendProvider","$LocationProvider","$LogProvider","$ParseProvider","$RootScopeProvider","$QProvider","$SceProvider","$SceDelegateProvider","$SnifferProvider","$TemplateCacheProvider","$TimeoutProvider","$WindowProvider","$$RAFProvider","$$AsyncCallbackProvider","camelCase","SPECIAL_CHARS_REGEXP","_","offset","toUpperCase","MOZ_HACK_REGEXP","jqLitePatchJQueryRemove","dispatchThis","filterElems","getterIfNoArguments","removePatch","param","filter","fireEvent","set","setIndex","setLength","childIndex","children","shift","triggerHandler","childLength","jQuery","originalJqFn","$original","JQLite","trim","jqLiteMinErr","parsed","SINGLE_TAG_REGEXP","fragment","createDocumentFragment","HTML_REGEXP","tmp","appendChild","createElement","TAG_NAME_REGEXP","wrap","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","removeChild","firstChild","lastChild","j","jj","childNodes","textContent","createTextNode","jqLiteAddNodes","jqLiteClone","cloneNode","jqLiteDealoc","jqLiteRemoveData","jqLiteOff","type","unsupported","events","jqLiteExpandoStore","handle","eventHandler","removeEventListenerFn","expandoId","ng339","expandoStore","jqCache","$destroy","jqId","jqLiteData","isSetter","keyDefined","isSimpleGetter","jqLiteHasClass","selector","getAttribute","jqLiteRemoveClass","cssClasses","setAttribute","cssClass","jqLiteAddClass","existingClasses","root","jqLiteController","jqLiteInheritedData","documentElement","ii","parentNode","host","jqLiteEmpty","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","createEventHandler","event","preventDefault","event.preventDefault","returnValue","stopPropagation","event.stopPropagation","cancelBubble","target","srcElement","defaultPrevented","prevent","isDefaultPrevented","event.isDefaultPrevented","eventHandlersCopy","msie","elem","hashKey","nextUidFn","objType","HashMap","isolatedUid","this.nextUid","put","annotate","$inject","fnText","STRIP_COMMENTS","argDecl","FN_ARGS","FN_ARG_SPLIT","FN_ARG","all","underscore","last","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","$get","providerCache","providerSuffix","factoryFn","loadModules","moduleFn","loadedModules","get","_runBlocks","_invokeQueue","invokeArgs","message","stack","createInternalInjector","cache","getService","serviceName","INSTANTIATING","err","locals","args","Type","Constructor","returnedValue","prototype","instance","has","service","$injector","constant","instanceCache","decorator","decorFn","origProvider","orig$get","origProvider.$get","origInstance","instanceInjector","servicename","autoScrollingEnabled","disableAutoScrolling","this.disableAutoScrolling","$window","$location","$rootScope","getFirstAnchor","scroll","hash","elm","scrollIntoView","getElementsByName","scrollTo","autoScrollWatch","autoScrollWatchAction","$$rAF","$timeout","supported","Browser","$log","$sniffer","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","error","startPoller","interval","setTimeout","check","pollFns","pollFn","pollTimeout","fireUrlChange","newLocation","lastBrowserUrl","url","urlChangeListeners","listener","rawDocument","history","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","self.$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","self.notifyWhenNoOutstandingRequests","callback","addPollFn","self.addPollFn","href","baseElement","self.url","replaceState","pushState","urlChangeInit","onUrlChange","self.onUrlChange","on","hashchange","baseHref","self.baseHref","lastCookies","lastCookieString","cookiePath","cookies","self.cookies","cookieLength","cookie","escape","warn","cookieArray","unescape","substring","defer","self.defer","delay","timeoutId","cancel","self.defer.cancel","deferId","$document","this.$get","cacheFactory","cacheId","options","refresh","entry","freshEnd","staleEnd","n","link","p","nextEntry","prevEntry","caches","size","stats","capacity","Number","MAX_VALUE","lruHash","lruEntry","remove","removeAll","destroy","info","cacheFactory.info","cacheFactory.get","$cacheFactory","$$sanitizeUriProvider","hasDirectives","Suffix","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","EVENT_HANDLER_ATTR_REGEXP","this.directive","registerDirective","directiveFactory","$exceptionHandler","directives","priority","require","controller","restrict","aHrefSanitizationWhitelist","this.aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","this.imgSrcSanitizationWhitelist","$interpolate","$http","$templateCache","$parse","$controller","$sce","$animate","$$sanitizeUri","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","nodeValue","compositeLinkFn","compileNodes","safeAddClass","publicLinkFn","cloneConnectFn","transcludeControllers","parentBoundTranscludeFn","$linkNode","JQLitePrototype","eq","$element","addClass","nodeList","$rootElement","childLinkFn","childScope","childBoundTranscludeFn","nodeListLength","stableNodeList","Array","linkFns","nodeLinkFn","$new","transcludeOnThisElement","createBoundTranscludeFn","transclude","templateOnThisElement","attrs","linkFnFound","Attributes","collectDirectives","applyDirectivesToNode","$$element","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","scopeCreated","$$transcluded","attrsMap","$attr","addDirective","directiveNormalize","nodeName_","isNgAttr","nAttrs","attrStartName","attrEndName","specified","ngAttrName","NG_ATTR_BINDING","substr","directiveNName","nName","addAttrInterpolateDirective","addTextInterpolateDirective","byPriority","groupScan","attrStart","attrEnd","depth","hasAttribute","$compileMinErr","groupElementsLinkFnWrapper","linkFn","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","directiveName","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","getControllers","elementControllers","retrievalMethod","optional","linkNode","controllersBoundTransclude","cloneAttachFn","hasElementTranscludeDirective","isolateScope","LOCAL_REGEXP","templateDirective","$$originalDirective","definition","scopeName","attrName","mode","lastValue","parentGet","parentSet","compare","$$isolateBindings","$observe","$$observers","$$scope","literal","a","b","assign","parentValueWatch","parentValue","controllerDirectives","controllerInstance","controllerAs","$scope","scopeToChild","template","templateUrl","terminalPriority","newScopeDirective","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","$template","childTranscludeFn","$$start","$$end","directiveValue","assertNoDuplicate","$$tlb","createComment","replaceWith","replaceDirective","contents","denormalizeTemplate","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectivesAsIsolate","mergeTemplateAttributes","compileTemplateUrl","Math","max","tDirectives","startAttrName","endAttrName","srcAttr","dstAttr","$set","tAttrs","linkQueue","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","getTrustedResourceUrl","success","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","oldClasses","response","code","headers","delayedNodeLinkFn","ignoreChildLinkFn","rootElement","diff","what","previousDirective","text","interpolateFn","textInterpolateCompileFn","templateNode","hasCompileParent","textInterpolateLinkFn","bindings","interpolateFnWatchAction","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","attrInterpolatePreLinkFn","$$inter","newValue","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","replaceChild","expando","k","kk","annotation","$addClass","classVal","$removeClass","removeClass","newClasses","toAdd","tokenDifference","toRemove","setClass","writeAttr","booleanKey","removeAttr","listeners","startSymbol","endSymbol","PREFIX_REGEXP","str1","str2","values","tokens1","tokens2","token","CNTRL_REG","register","this.register","expression","identifier","exception","cause","parseHeaders","line","headersGetter","headersObj","transformData","fns","JSON_START","JSON_END","PROTECTION_PREFIX","CONTENT_TYPE_APPLICATION_JSON","defaults","d","interceptorFactories","interceptors","responseInterceptorFactories","responseInterceptors","$httpBackend","$browser","$q","requestConfig","transformResponse","resp","status","reject","transformRequest","mergeHeaders","defHeaders","reqHeaders","defHeaderName","reqHeaderName","common","lowercaseDefHeaderName","execHeaders","headerContent","headerFn","header","chain","serverRequest","reqData","withCredentials","sendReq","then","promise","when","reversedInterceptors","interceptor","request","requestError","responseError","thenFn","rejectFn","promise.success","promise.error","done","headersString","statusText","resolvePromise","$$phase","deferred","resolve","removePendingReq","idx","pendingRequests","cachedResp","buildUrl","params","defaultCache","xsrfValue","urlIsSameOrigin","xsrfCookieName","xsrfHeaderName","timeout","responseType","toISOString","interceptorFactory","responseFn","createShortMethods","createShortMethodsWithData","createXhr","XMLHttpRequest","ActiveXObject","createHttpBackend","callbacks","$browserDefer","jsonpReq","callbackId","script","async","body","called","addEventListenerFn","onreadystatechange","script.onreadystatechange","readyState","ABORTED","timeoutRequest","jsonpDone","xhr","abort","completeRequest","urlResolve","protocol","counter","open","setRequestHeader","xhr.onreadystatechange","responseHeaders","getAllResponseHeaders","responseText","send","this.startSymbol","this.endSymbol","mustHaveExpression","trustedContext","endIndex","hasInterpolation","startSymbolLength","exp","endSymbolLength","$interpolateMinErr","part","getTrusted","valueOf","newErr","$interpolate.startSymbol","$interpolate.endSymbol","count","invokeApply","clearInterval","iteration","skipApply","$$intervalId","tick","notify","intervals","interval.cancel","short","pluralCat","num","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","appBase","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","relativeUrl","prefixed","$$path","pathname","$$search","search","$$hash","beginsWith","begin","whole","stripHash","stripFile","lastIndexOf","LocationHtml5Url","basePrefix","$$html5","appBaseNoFile","$$parse","this.$$parse","pathUrl","$locationMinErr","$$compose","this.$$compose","$$url","$$absUrl","$$rewrite","this.$$rewrite","appUrl","prevAppUrl","LocationHashbangUrl","hashPrefix","withoutBaseUrl","withoutHashUrl","windowsFilePathExp","firstPathSegmentMatch","LocationHashbangInHtml5Url","locationGetter","property","locationGetterSetter","preprocess","html5Mode","this.hashPrefix","prefix","this.html5Mode","afterLocationChange","oldUrl","$broadcast","absUrl","LocationMode","initialUrl","IGNORE_URI_REGEXP","ctrlKey","metaKey","which","absHref","animVal","rewrittenUrl","newUrl","$digest","changeCounter","$locationWatch","currentReplace","$$replace","debug","debugEnabled","this.debugEnabled","flag","formatError","Error","sourceURL","consoleLog","console","logFn","log","hasApply","arg1","arg2","ensureSafeMemberName","fullExpression","$parseMinErr","ensureSafeObject","Object","setter","setValue","fullExp","propertyObj","unwrapPromises","promiseWarning","$$v","cspSafeGetterFn","key0","key1","key2","key3","key4","cspSafePromiseEnabledGetter","pathVal","cspSafeGetter","getterFn","getterFnCache","pathKeys","pathKeysLength","evaledFnGetter","Function","$parseOptions","this.unwrapPromises","logPromiseWarnings","this.logPromiseWarnings","$filter","promiseWarningCache","parsedExpression","lexer","Lexer","parser","Parser","qFactory","nextTick","exceptionHandler","defaultCallback","defaultErrback","pending","ref","createInternalRejectedPromise","progress","errback","progressback","wrappedCallback","wrappedErrback","wrappedProgressback","catch","finally","makePromise","resolved","handleCallback","isResolved","callbackOutput","promises","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","id","timer","TTL","$rootScopeMinErr","lastDirtyWatch","digestTtl","this.digestTtl","Scope","$id","$parent","$$watchers","$$nextSibling","$$prevSibling","$$childHead","$$childTail","$root","$$destroyed","$$asyncQueue","$$postDigestQueue","$$listeners","$$listenerCount","beginPhase","phase","compileToFn","decrementListenerCount","current","initWatchVal","isolate","child","$$childScopeClass","this.$$childScopeClass","watchExp","objectEquality","watcher","listenFn","watcher.fn","newVal","oldVal","originalFn","deregisterWatch","$watchCollection","veryOldValue","trackVeryOldValue","changeDetected","objGetter","internalArray","internalObject","initRun","oldLength","$watchCollectionWatch","newLength","bothNaN","$watchCollectionAction","watch","watchers","asyncQueue","postDigestQueue","dirty","ttl","watchLog","logIdx","logMsg","asyncTask","$eval","next","$on","this.$watch","expr","$$postDigest","namedListeners","$emit","listenerArgs","array1","currentScope","sanitizeUri","uri","isImage","regex","normalizedVal","adjustMatcher","matcher","$sceMinErr","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","this.resourceUrlWhitelist","this.resourceUrlBlacklist","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","this.$$unwrapTrustedValue","holderType.prototype.valueOf","holderType.prototype.toString","htmlSanitizer","trustedValueHolderBase","byType","CSS","URL","JS","trustAs","maybeTrusted","allowed","enabled","this.enabled","$sceDelegate","msieDocumentMode","sce","isEnabled","sce.isEnabled","sce.getTrusted","parseAs","sce.parseAs","sceParseAsTrusted","enumValue","lName","eventSupport","android","userAgent","navigator","boxee","documentMode","vendorPrefix","vendorRegex","bodyStyle","style","transitions","animations","webkitTransition","webkitAnimation","hasEvent","divElm","deferreds","$$timeoutId","timeout.cancel","base","urlParsingNode","requestUrl","originUrl","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","comparatorType","predicates","predicates.check","objKey","filtered","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","CURRENCY_SYM","formatNumber","PATTERNS","GROUP_SEP","DECIMAL_SEP","number","fractionSize","pattern","groupSep","decimalSep","isFinite","isNegative","abs","numStr","formatedText","hasExponent","toFixed","fractionLen","min","minFrac","maxFrac","round","fraction","lgroup","lgSize","group","gSize","negPre","posPre","negSuf","posSuf","padNumber","digits","neg","dateGetter","date","dateStrGetter","shortForm","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","m","s","ms","parseFloat","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","DATE_FORMATS","object","input","limit","Infinity","out","sortPredicate","reverseOrder","reverseComparator","comp","descending","v1","v2","predicate","arrayCopy","ngDirective","FormController","toggleValidCss","isValid","validationErrorKey","INVALID_CLASS","VALID_CLASS","form","parentForm","nullFormCtrl","invalidCount","errors","$error","controls","$name","ngForm","$dirty","$pristine","$valid","$invalid","$addControl","PRISTINE_CLASS","form.$addControl","control","$removeControl","form.$removeControl","queue","validationToken","$setValidity","form.$setValidity","$setDirty","form.$setDirty","DIRTY_CLASS","$setPristine","form.$setPristine","validate","ctrl","validatorName","validity","testFlags","flags","addNativeHtml5Validators","badFlags","ignoreFlags","$$hasNativeValidators","$parsers","validator","textInputType","VALIDITY_STATE_PROPERTY","placeholder","noevent","$$validityState","composing","ev","ngTrim","revalidate","$viewValue","$setViewValue","deferListener","keyCode","$render","ctrl.$render","$isEmpty","ngPattern","patternValidator","patternObj","$formatters","ngMinlength","minlength","minLengthValidator","ngMaxlength","maxlength","maxLengthValidator","classDirective","arrayDifference","arrayClasses","classes","digestClassCounts","classCounts","classesToUpdate","ngClassWatchAction","$index","old$index","mod","isActive_","active","querySelector","addEventListener","attachEvent","removeEventListener","detachEvent","_data","JQLite._data","optgroup","option","tbody","tfoot","colgroup","caption","thead","th","td","ready","trigger","fired","removeAttribute","css","currentStyle","lowercasedName","getNamedItem","ret","getText","textProp","NODE_TYPE_TEXT_PROPERTY","$dv","multiple","selected","nodeCount","onFn","eventFns","contains","compareDocumentPosition","adown","bup","eventmap","related","relatedTarget","one","off","replaceNode","insertBefore","contentDocument","prepend","wrapNode","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","handlerArgs","eventName","eventFnsCopy","arg3","unbind","$animateMinErr","$$selectors","classNameFilter","this.classNameFilter","$$classNameFilter","$$asyncCallback","enter","leave","move","add","PATH_MATCH","paramValue","CALL","APPLY","BIND","OPERATORS","null","true","false","+","-","*","/","%","^","===","!==","==","!=","<",">","<=",">=","&&","||","&","|","!","ESCAPE","lex","ch","lastCh","tokens","is","readString","peek","readNumber","isIdent","readIdent","isWhitespace","ch2","ch3","fn2","fn3","throwError","chars","was","isExpOperator","start","end","colStr","peekCh","ident","lastDot","peekIndex","methodName","quote","rawString","hex","rep","ZERO","statements","primary","expect","filterChain","consume","arrayDeclaration","functionCall","objectIndex","fieldAccess","msg","peekToken","e1","e2","e3","e4","t","unaryFn","right","ternaryFn","left","middle","binaryFn","statement","argsFn","fnInvoke","assignment","ternary","logicalOR","logicalAND","equality","relational","additive","multiplicative","unary","field","o","indexFn","contextGetter","fnPtr","elementFns","allConstant","elementFn","keyValues","ampmGetter","getHours","AMPMS","timeZoneGetter","zone","getTimezoneOffset","paddedZone","xlinkHref","propName","normalized","ngBooleanAttrWatchAction","formDirectiveFactory","isNgForm","formElement","action","preventDefaultListener","parentFormCtrl","alias","URL_REGEXP","EMAIL_REGEXP","NUMBER_REGEXP","inputType","numberInputType","numberBadFlags","minValidator","maxValidator","urlInputType","urlValidator","emailInputType","emailValidator","radioInputType","checked","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","ctrl.$isEmpty","NgModelController","$modelValue","NaN","$viewChangeListeners","ngModelGet","ngModel","ngModelSet","this.$isEmpty","inheritedData","this.$setValidity","this.$setPristine","this.$setViewValue","ngModelWatch","formatters","ctrls","modelCtrl","formCtrl","ngChange","required","ngList","viewValue","CONSTANT_VALUE_REGEXP","tpl","tplAttr","ngValue","ngValueConstantLink","ngValueLink","valueWatchAction","templateElement","ngBind","ngBindWatchAction","ngBindTemplate","tElement","ngBindHtml","getStringValue","ngBindHtmlWatchAction","getTrustedHtml","ngEventHandler","$transclude","previousElements","ngIf","ngIfWatchAction","$anchorScroll","srcExp","ngInclude","onloadExp","onload","autoScrollExp","autoscroll","previousElement","currentElement","cleanupLastIncludeContent","parseAsResourceUrl","ngIncludeWatchAction","afterAnimation","thisChangeId","newScope","$compile","ngInit","BRACE","numberExp","whenExp","whens","whensExpFns","isWhen","attributeName","ngPluralizeWatch","ngPluralizeWatchAction","ngRepeatMinErr","ngRepeat","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","valueIdentifier","keyIdentifier","hashFnLocals","lhs","rhs","trackByExp","lastBlockMap","ngRepeatAction","collection","previousNode","nextNode","nextBlockMap","arrayLength","collectionKeys","nextBlockOrder","trackByIdFn","trackById","$first","$last","$middle","$odd","$even","ngShow","ngShowWatchAction","ngHide","ngHideWatchAction","ngStyle","ngStyleWatchAction","newStyles","oldStyles","ngSwitchController","cases","selectedTranscludes","selectedElements","selectedScopes","ngSwitch","ngSwitchWatchAction","change","selectedTransclude","selectedScope","caseElement","anchor","ngSwitchWhen","$attrs","ngOptionsMinErr","NG_OPTIONS_REGEXP","nullModelCtrl","optionsMap","ngModelCtrl","unknownOption","databound","init","self.init","ngModelCtrl_","nullOption_","unknownOption_","addOption","self.addOption","removeOption","self.removeOption","hasOption","renderUnknownOption","self.renderUnknownOption","unknownVal","self.hasOption","setupAsSingle","selectElement","selectCtrl","ngModelCtrl.$render","emptyOption","setupAsMultiple","lastView","items","selectMultipleWatch","setupAsOptions","render","optionGroups","optionGroupNames","optionGroupName","optionGroup","existingParent","existingOptions","existingOption","modelValue","valuesFn","keyName","groupIndex","selectedSet","trackFn","trackIndex","valueName","lastElement","groupByFn","modelCast","label","displayFn","nullOption","groupLength","optionGroupsCache","optGroupTemplate","optionTemplate","optionsExp","track","optionElement","ngOptions","ngModelCtrl.$isEmpty","nullSelectCtrl","selectCtrlName","interpolateWatchAction","$$csp"]
+}
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
new file mode 100644
index 0000000000..619ad287c4
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -0,0 +1,134 @@
+
+
+function basePageInit (ctx) {
+
+ var newBuildButton = $("#new-build-button");
+ /* Hide the button if we're on the project,newproject or importlyaer page
+ * or if there are no projects yet defined
+ */
+ if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){
+ newBuildButton.hide();
+ return;
+ }
+
+ /* Hide the change project icon when there is only one project */
+ if (ctx.numProjects == 1){
+ $('#project .icon-pencil').hide();
+ }
+
+ newBuildButton.show().removeAttr("disabled");
+
+ _checkProjectBuildable()
+ _setupNewBuildButton();
+
+
+ function _checkProjectBuildable(){
+ if (ctx.projectId == undefined)
+ return;
+
+ libtoaster.getProjectInfo(ctx.projectInfoUrl, ctx.projectId,
+ function(data){
+ if (data.machine.name == undefined || data.layers.length == 0) {
+ /* we can't build anything with out a machine and some layers */
+ $("#new-build-button #targets-form").hide();
+ $("#new-build-button .alert").show();
+ } else {
+ $("#new-build-button #targets-form").show();
+ $("#new-build-button .alert").hide();
+ }
+ }, null);
+ }
+
+ function _setupNewBuildButton() {
+ /* Setup New build button */
+ var newBuildProjectInput = $("#new-build-button #project-name-input");
+ var newBuildTargetBuildBtn = $("#new-build-button #build-button");
+ var newBuildTargetInput = $("#new-build-button #build-target-input");
+ var newBuildProjectSaveBtn = $("#new-build-button #save-project-button");
+ var selectedTarget;
+ var selectedProject;
+
+ /* If we don't have a current project then present the set project
+ * form.
+ */
+ if (ctx.projectId == undefined) {
+ $('#change-project-form').show();
+ $('#project .icon-pencil').hide();
+ }
+
+ libtoaster.makeTypeahead(newBuildTargetInput, ctx.xhrDataTypeaheadUrl, { type : "targets", project_id: ctx.projectId }, function(item){
+ /* successfully selected a target */
+ selectedTarget = item;
+ });
+
+
+ libtoaster.makeTypeahead(newBuildProjectInput, ctx.xhrDataTypeaheadUrl, { type : "projects" }, function(item){
+ /* successfully selected a project */
+ newBuildProjectSaveBtn.removeAttr("disabled");
+ selectedProject = item;
+ });
+
+ /* Any typing in the input apart from enter key is going to invalidate
+ * the value that has been set by selecting a suggestion from the typeahead
+ */
+ newBuildProjectInput.keyup(function(event) {
+ if (event.keyCode == 13)
+ return;
+ newBuildProjectSaveBtn.attr("disabled", "disabled");
+ });
+
+ newBuildTargetInput.keyup(function() {
+ if ($(this).val().length == 0)
+ newBuildTargetBuildBtn.attr("disabled", "disabled");
+ else
+ newBuildTargetBuildBtn.removeAttr("disabled");
+ });
+
+ newBuildTargetBuildBtn.click(function() {
+ if (!newBuildTargetInput.val())
+ return;
+
+ /* fire and forget */
+ libtoaster.startABuild(ctx.projectBuildUrl, ctx.projectId, selectedTarget.name, null, null);
+ window.location.replace(ctx.projectPageUrl+ctx.projectId);
+ });
+
+ newBuildProjectSaveBtn.click(function() {
+ ctx.projectId = selectedProject.id
+ /* Update the typeahead project_id paramater */
+ _checkProjectBuildable();
+ newBuildTargetInput.data('typeahead').options.xhrParams.project_id = ctx.projectId;
+ newBuildTargetInput.val("");
+
+ $("#new-build-button #project a").text(selectedProject.name).attr('href', ctx.projectPageUrl+ctx.projectId);
+ $("#new-build-button .alert a").attr('href', ctx.projectPageUrl+ctx.projectId);
+
+
+ $("#change-project-form").slideUp({ 'complete' : function() {
+ $("#new-build-button #project").show();
+ }});
+ });
+
+ $('#new-build-button #project .icon-pencil').click(function() {
+ newBuildProjectSaveBtn.attr("disabled", "disabled");
+ newBuildProjectInput.val($("#new-build-button #project a").text());
+ $(this).parent().hide();
+ $("#change-project-form").slideDown();
+ });
+
+ $("#new-build-button #cancel-change-project").click(function() {
+ $("#change-project-form").hide(function(){
+ $('#new-build-button #project').show();
+ });
+
+ newBuildProjectInput.val("");
+ newBuildProjectSaveBtn.attr("disabled", "disabled");
+ });
+
+ /* Keep the dropdown open even unless we click outside the dropdown area */
+ $(".new-build").click (function(event) {
+ event.stopPropagation();
+ });
+ };
+
+}
diff --git a/bitbake/lib/toaster/toastergui/static/js/bootstrap.min.js b/bitbake/lib/toaster/toastergui/static/js/bootstrap.min.js
index e4f481784e..848258d380 100644
--- a/bitbake/lib/toaster/toastergui/static/js/bootstrap.min.js
+++ b/bitbake/lib/toaster/toastergui/static/js/bootstrap.min.js
@@ -1,7 +1,6 @@
/*!
- * Bootstrap v3.0.3 (http://getbootstrap.com)
- * Copyright 2013 Twitter, Inc.
- * Licensed under http://www.apache.org/licenses/LICENSE-2.0
- */
-
-if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
+* Bootstrap.js by @fat & @mdo
+* Copyright 2013 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file
diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js
new file mode 100644
index 0000000000..d6e140ffdc
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js
@@ -0,0 +1,289 @@
+"use strict"
+
+function importLayerPageInit (ctx) {
+
+ var layerDepBtn = $("#add-layer-dependency-btn");
+ var importAndAddBtn = $("#import-and-add-btn");
+ var layerNameInput = $("#import-layer-name");
+ var vcsURLInput = $("#layer-git-repo-url");
+ var gitRefInput = $("#layer-git-ref");
+ var layerDepInput = $("#layer-dependency");
+ var layerNameCtrl = $("#layer-name-ctrl");
+ var duplicatedLayerName = $("#duplicated-layer-name-hint");
+
+ var layerDeps = {};
+ var layerDepsDeps = {};
+ var currentLayerDepSelection;
+ var validLayerName = /^(\w|-)+$/;
+
+ $("#new-project-button").hide();
+
+ libtoaster.makeTypeahead(layerDepInput, ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" }, function(item){
+ currentLayerDepSelection = item;
+
+ layerDepBtn.removeAttr("disabled");
+ });
+
+
+ /* We automatically add "openembedded-core" layer for convenience as a
+ * dependency as pretty much all layers depend on this one
+ */
+ $.getJSON(ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" , value: "openembedded-core" }, function(layer) {
+ if (layer.list.length == 1) {
+ currentLayerDepSelection = layer.list[0];
+ layerDepBtn.click();
+ }
+ });
+
+ layerDepBtn.click(function(){
+ if (currentLayerDepSelection == undefined)
+ return;
+
+ layerDeps[currentLayerDepSelection.id] = currentLayerDepSelection;
+
+ /* Make a list item for the new layer dependency */
+ var newLayerDep = $("<li><a></a><span class=\"icon-trash\" data-toggle=\"tooltip\" title=\"Delete\"></span></li>");
+
+ newLayerDep.data('layer-id', currentLayerDepSelection.id);
+ newLayerDep.children("span").tooltip();
+
+ var link = newLayerDep.children("a");
+ link.attr("href", ctx.layerDetailsUrl+String(currentLayerDepSelection.id));
+ link.text(currentLayerDepSelection.name);
+ link.tooltip({title: currentLayerDepSelection.tooltip, placement: "right"});
+
+ var trashItem = newLayerDep.children("span");
+ trashItem.click(function () {
+ var toRemove = $(this).parent().data('layer-id');
+ delete layerDeps[toRemove];
+ $(this).parent().fadeOut(function (){
+ $(this).remove();
+ });
+ });
+
+ $("#layer-deps-list").append(newLayerDep);
+
+ libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, currentLayerDepSelection.id, function (data){
+ /* These are the dependencies of the layer added as a dependency */
+ if (data.list.length > 0) {
+ currentLayerDepSelection.url = ctx.layerDetailsUrl+currentLayerDepSelection.id;
+ layerDeps[currentLayerDepSelection.id].deps = data.list
+ }
+
+ /* Clear the current selection */
+ layerDepInput.val("");
+ currentLayerDepSelection = undefined;
+ layerDepBtn.attr("disabled","disabled");
+ }, null);
+ });
+
+ importAndAddBtn.click(function(){
+ /* This is a list of the names from layerDeps for the layer deps
+ * modal dialog body
+ */
+ var depNames = [];
+
+ /* arrray of all layer dep ids includes parent and child deps */
+ var allDeps = [];
+
+ /* temporary object to use to do a reduce on the dependencies for each
+ * layer dependency added
+ */
+ var depDeps = {};
+
+ /* the layers that have dependencies have an extra property "deps"
+ * look in this for each layer and reduce this to a unquie object
+ * of deps.
+ */
+ for (var key in layerDeps){
+ if (layerDeps[key].hasOwnProperty('deps')){
+ for (var dep in layerDeps[key].deps){
+ var layer = layerDeps[key].deps[dep];
+ depDeps[layer.id] = layer;
+ }
+ }
+ depNames.push(layerDeps[key].name);
+ allDeps.push(layerDeps[key].id);
+ }
+
+ /* we actually want it as an array so convert it now */
+ var depDepsArray = [];
+ for (var key in depDeps)
+ depDepsArray.push (depDeps[key]);
+
+ if (depDepsArray.length > 0) {
+ var layer = { name: layerNameInput.val(), url: "#", id: -1 };
+ var title = "Layer";
+ var body = "<strong>"+layer.name+"</strong>'s dependencies ("+
+ depNames.join(", ")+"</span>) require some layers that are not added to your project. Select the ones you want to add:</p>";
+
+ show_layer_deps_modal(ctx.projectId, layer, depDepsArray, title, body, false, function(selected){
+ /* Add the accepted dependencies to the allDeps array */
+ if (selected.length > 0){
+ allDeps = allDeps.concat (selected);
+ }
+ import_and_add ();
+ });
+ } else {
+ import_and_add ();
+ }
+
+ function import_and_add () {
+ /* convert to a csv of all the deps to be added */
+ var layerDepsCsv = allDeps.join(",");
+
+ var layerData = {
+ name: layerNameInput.val(),
+ vcs_url: vcsURLInput.val(),
+ git_ref: gitRefInput.val(),
+ summary: $("#layer-summary").val(),
+ dir_path: $("#layer-subdir").val(),
+ project_id: ctx.projectId,
+ layer_deps: layerDepsCsv,
+ };
+
+ $.ajax({
+ type: "POST",
+ url: ctx.xhrImportLayerUrl,
+ data: layerData,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (data) {
+ if (data.error != "ok") {
+ show_error_message(data, layerData);
+ console.log(data.error);
+ } else {
+ /* Success layer import now go to the project page */
+ $.cookie('layer-imported-alert', JSON.stringify(data), { path: '/'});
+ window.location.replace(ctx.projectPageUrl+'#/layerimported');
+ }
+ },
+ error: function (data) {
+ console.log("Call failed");
+ console.log(data);
+ }
+ });
+ }
+ });
+
+ function show_error_message(error, layerData) {
+
+ var errorMsg = $("#import-error").fadeIn();
+ var errorType = error.error;
+ var body = errorMsg.children("p");
+ var title = errorMsg.children("h3");
+ var optionsList = errorMsg.children("ul");
+ var invalidLayerRevision = $("#invalid-layer-revision-hint");
+ var layerRevisionCtrl = $("#layer-revision-ctrl");
+
+ /* remove any existing items */
+ optionsList.children().each(function(){ $(this).remove(); });
+ body.text("");
+ title.text("");
+ invalidLayerRevision.hide();
+ layerNameCtrl.removeClass("error");
+ layerRevisionCtrl.removeClass("error");
+
+ switch (errorType){
+ case 'hint-layer-version-exists':
+ title.text("This layer already exists");
+ body.html("A layer <strong>"+layerData.name+"</strong> already exists with this Git repository URL and this revision. You can:");
+ optionsList.append("<li>Import <strong>"+layerData.name+"</strong> with a different revision </li>");
+ optionsList.append("<li>or <a href=\""+ctx.layerDetailsUrl+error.existing_layer_version+"/\" >change the revision of the existing layer</a></li>");
+
+ layerRevisionCtrl.addClass("error");
+
+ invalidLayerRevision.html("A layer <strong>"+layerData.name+"</strong> already exists with this revision.<br />You can import <strong>"+layerData.name+"</strong> with a different revision");
+ invalidLayerRevision.show();
+ break;
+
+ case 'hint-layer-exists-with-different-url':
+ title.text("This layer already exists");
+ body.html("A layer <strong>"+layerData.name+"</strong> already exists with a different Git repository URL:<p style='margin-top:10px;'><strong>"+error.current_url+"</strong></p><p>You can:</p>");
+ optionsList.append("<li>Import the layer under a different name</li>");
+ optionsList.append("<li>or <a href=\""+ctx.layerDetailsUrl+error.current_id+"/\" >change the Git repository URL of the existing layer</a></li>");
+ duplicatedLayerName.html("A layer <strong>"+layerData.name+"</strong> already exists with a different Git repository URL.<br />To import this layer give it a different name.");
+ duplicatedLayerName.show();
+ layerNameCtrl.addClass("error");
+ break;
+
+ case 'hint-layer-exists':
+ title.text("This layer already exists");
+ body.html("A layer <strong>"+layerData.name+"</strong> already exists. You can:");
+ optionsList.append("<li>Import the layer under a different name</li>");
+ break;
+ default:
+ title.text("Error")
+ body.text(data.error);
+ }
+ }
+
+ function enable_import_btn (enabled) {
+ var importAndAddHint = $("#import-and-add-hint");
+
+ if (enabled) {
+ importAndAddBtn.removeAttr("disabled");
+ importAndAddHint.hide();
+ return;
+ }
+
+ importAndAddBtn.attr("disabled", "disabled");
+ importAndAddHint.show();
+ }
+
+ function check_form() {
+ var valid = false;
+ var inputs = $("input:required");
+
+ for (var i=0; i<inputs.length; i++){
+ if (!(valid = inputs[i].value)){
+ enable_import_btn(false);
+ break;
+ }
+ }
+
+ if (valid)
+ enable_import_btn(true);
+ }
+
+ vcsURLInput.keyup(function() {
+ check_form();
+ });
+
+ gitRefInput.keyup(function() {
+ check_form();
+ });
+
+ layerNameInput.keyup(function() {
+ if ($(this).val() && !validLayerName.test($(this).val())){
+ layerNameCtrl.addClass("error")
+ $("#invalid-layer-name-hint").show();
+ enable_import_btn(false);
+ return;
+ }
+
+ /* Don't remove the error class if we're displaying the error for another
+ * reason.
+ */
+ if (!duplicatedLayerName.is(":visible"))
+ layerNameCtrl.removeClass("error")
+
+ $("#invalid-layer-name-hint").hide();
+ check_form();
+ });
+
+ /* Have a guess at the layer name */
+ vcsURLInput.focusout(function (){
+ /* If we a layer name specified don't overwrite it or if there isn't a
+ * url typed in yet return
+ */
+ if (layerNameInput.val() || !$(this).val())
+ return;
+
+ if ($(this).val().search("/")){
+ var urlPts = $(this).val().split("/");
+ var suggestion = urlPts[urlPts.length-1].replace(".git","");
+ layerNameInput.val(suggestion);
+ }
+ });
+
+}
diff --git a/bitbake/lib/toaster/toastergui/static/js/jquery-ui.js b/bitbake/lib/toaster/toastergui/static/js/jquery-ui.js
deleted file mode 100644
index 7b727e7435..0000000000
--- a/bitbake/lib/toaster/toastergui/static/js/jquery-ui.js
+++ /dev/null
@@ -1,15003 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
- version: "1.10.3",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- focus: (function( orig ) {
- return function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- orig.apply( this, arguments );
- };
- })( $.fn.focus ),
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.support.selectstart = "onselectstart" in document.createElement( "div" );
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use $.widget() extensions instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- }
-});
-
-})( jQuery );
-
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-})( jQuery );
-
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.10.3",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown."+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click."+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("."+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.10.3",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
- this.element[0].style.position = "relative";
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css( "position" );
- this.scrollParent = this.helper.scrollParent();
- this.offsetParent = this.helper.offsetParent();
- this.offsetParentCssPosition = this.offsetParent.css( "position" );
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- //Reset scroll cache
- this.offset.scroll = false;
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- this._setContainment();
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
- // reset any necessary cached properties (see #5009)
- if ( this.offsetParentCssPosition === "fixed" ) {
- this.offset.parent = this._getParentOffset();
- }
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var that = this,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
- return false;
- }
-
- if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
- return this.options.handle ?
- !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
- true;
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
-
- if(!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- //This needs to be actually done for all browsers, since pageX/pageY includes this information
- //Ugly IE fix
- if((this.offsetParent[0] === document.body) ||
- (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var over, c, ce,
- o = this.options;
-
- if ( !o.containment ) {
- this.containment = null;
- return;
- }
-
- if ( o.containment === "window" ) {
- this.containment = [
- $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
- $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment === "document") {
- this.containment = [
- 0,
- 0,
- $( document ).width() - this.helperProportions.width - this.margins.left,
- ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment.constructor === Array ) {
- this.containment = o.containment;
- return;
- }
-
- if ( o.containment === "parent" ) {
- o.containment = this.helper[ 0 ].parentNode;
- }
-
- c = $( o.containment );
- ce = c[ 0 ];
-
- if( !ce ) {
- return;
- }
-
- over = c.css( "overflow" ) !== "hidden";
-
- this.containment = [
- ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
- ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
- ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
- ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
-
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
-
- //Cache the scroll
- if (!this.offset.scroll) {
- this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
- }
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var containment, co, top, left,
- o = this.options,
- scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
- pageX = event.pageX,
- pageY = event.pageY;
-
- //Cache the scroll
- if (!this.offset.scroll) {
- this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- // If we are not dragging yet, we won't check for options
- if ( this.originalPosition ) {
- if ( this.containment ) {
- if ( this.relative_container ){
- co = this.relative_container.offset();
- containment = [
- this.containment[ 0 ] + co.left,
- this.containment[ 1 ] + co.top,
- this.containment[ 2 ] + co.left,
- this.containment[ 3 ] + co.top
- ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) {
- pageX = containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < containment[1]) {
- pageY = containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > containment[2]) {
- pageX = containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > containment[3]) {
- pageY = containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- //The absolute position has to be recalculated after plugins
- if(type === "drag") {
- this.positionAbs = this._convertPositionTo("absolute");
- }
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function() {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, "ui-sortable");
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("ui-draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
- if(this.shouldRevert) {
- this.instance.options.revert = this.shouldRevert;
- }
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper === "original") {
- this.instance.currentItem.css({ top: "auto", left: "auto" });
- }
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), that = this;
-
- $.each(inst.sortables, function() {
-
- var innermostIntersecting = false,
- thisSortable = this;
-
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this !== thisSortable &&
- this.instance._intersectsWith(this.instance.containerCache) &&
- $.contains(thisSortable.instance.element[0], this.instance.element[0])
- ) {
- innermostIntersecting = false;
- }
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) {
- this.instance._mouseDrag(event);
- }
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger("out", event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) {
- this.instance.placeholder.remove();
- }
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- }
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function() {
- var t = $("body"), o = $(this).data("ui-draggable").options;
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function() {
- var o = $(this).data("ui-draggable").options;
- if (o._cursor) {
- $("body").css("cursor", o._cursor);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function() {
- var i = $(this).data("ui-draggable");
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
- i.overflowOffset = i.scrollParent.offset();
- }
- },
- drag: function( event ) {
-
- var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
-
- if(!o.axis || o.axis !== "x") {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
- }
-
- } else {
-
- if(!o.axis || o.axis !== "x") {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(i, event);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function() {
-
- var i = $(this).data("ui-draggable"),
- o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $o = $t.offset();
- if(this !== i.element[0]) {
- i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- }
- });
-
- },
- drag: function(event, ui) {
-
- var ts, bs, ls, rs, l, r, t, b, i, first,
- inst = $(this).data("ui-draggable"),
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- l = inst.snapElements[i].left;
- r = l + inst.snapElements[i].width;
- t = inst.snapElements[i].top;
- b = t + inst.snapElements[i].height;
-
- if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
- if(inst.snapElements[i].snapping) {
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode !== "inner") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- rs = Math.abs(r - x1) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if(o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- rs = Math.abs(r - x2) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function() {
- var min,
- o = this.data("ui-draggable").options,
- group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
-
- if (!group.length) { return; }
-
- min = parseInt($(group[0]).css("zIndex"), 10) || 0;
- $(group).each(function(i) {
- $(this).css("zIndex", min + i);
- });
- this.css("zIndex", (min + group.length));
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.droppable", {
- version: "1.10.3",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var i = 0,
- drop = $.ui.ddmanager.droppables[this.options.scope];
-
- for ( ; i < drop.length; i++ ) {
- if ( drop[i] === this ) {
- drop.splice(i, 1);
- }
- }
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key === "accept") {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.addClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("activate", event, this.ui(draggable));
- }
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("deactivate", event, this.ui(draggable));
- }
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.addClass(this.options.hoverClass);
- }
- this._trigger("over", event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("out", event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return false;
- }
-
- this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, "ui-droppable");
- if(
- inst.options.greedy &&
- !inst.options.disabled &&
- inst.options.scope === draggable.options.scope &&
- inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
- $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) {
- return false;
- }
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("drop", event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) {
- return false;
- }
-
- var draggableLeft, draggableTop,
- x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case "fit":
- return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
- case "intersect":
- return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
- x2 - (draggable.helperProportions.width / 2) < r && // Left Half
- t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
- y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- case "pointer":
- draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
- return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
- case "touch":
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- default:
- return false;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function(t, event) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[t.options.scope] || [],
- type = event ? event.type : null, // workaround for #2317
- list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
-
- droppablesLoop: for (i = 0; i < m.length; i++) {
-
- //No disabled and non-accepted
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for (j=0; j < list.length; j++) {
- if(list[j] === m[i].element[0]) {
- m[i].proportions.height = 0;
- continue droppablesLoop;
- }
- }
-
- m[i].visible = m[i].element.css("display") !== "none";
- if(!m[i].visible) {
- continue;
- }
-
- //Activate the droppable if used directly from draggables
- if(type === "mousedown") {
- m[i]._activate.call(m[i], event);
- }
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- // Create a copy of the droppables in case the list changes during the drop (#9116)
- $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
-
- if(!this.options) {
- return;
- }
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
- dropped = this._drop.call(this, event) || dropped;
- }
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) {
- $.ui.ddmanager.prepareOffsets(draggable, event);
- }
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect(draggable, this, this.options.tolerance),
- c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
- if(!c) {
- return;
- }
-
- if (this.options.greedy) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents(":data(ui-droppable)").filter(function () {
- return $.data(this, "ui-droppable").options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], "ui-droppable");
- parentInstance.greedyChild = (c === "isover");
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c === "isover") {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c === "isout") {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-function num(v) {
- return parseInt(v, 10) || 0;
-}
-
-function isNumber(value) {
- return !isNaN(parseInt(value, 10));
-}
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.10.3",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- // See #7960
- zIndex: 90,
-
- // callbacks
- resize: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- var n, i, handle, axis, hname,
- that = this,
- o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
- });
-
- //Wrap the element if it cannot hold child nodes
- if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
-
- //Create a wrapper element and set the wrapper to the new current internal element
- this.element.wrap(
- $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
- position: this.element.css("position"),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css("top"),
- left: this.element.css("left")
- })
- );
-
- //Overwrite the original this.element
- this.element = this.element.parent().data(
- "ui-resizable", this.element.data("ui-resizable")
- );
-
- this.elementIsWrapper = true;
-
- //Move margins to the wrapper
- this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
- this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
- //Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css("resize");
- this.originalElement.css("resize", "none");
-
- //Push the actual element to our proportionallyResize internal array
- this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
-
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css("margin") });
-
- // fix handlers offset
- this._proportionallyResize();
-
- }
-
- this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" });
- if(this.handles.constructor === String) {
-
- if ( this.handles === "all") {
- this.handles = "n,e,s,w,se,sw,ne,nw";
- }
-
- n = this.handles.split(",");
- this.handles = {};
-
- for(i = 0; i < n.length; i++) {
-
- handle = $.trim(n[i]);
- hname = "ui-resizable-"+handle;
- axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
-
- // Apply zIndex to all handles - see #7960
- axis.css({ zIndex: o.zIndex });
-
- //TODO : What's going on here?
- if ("se" === handle) {
- axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
- }
-
- //Insert into internal handles object and append to element
- this.handles[handle] = ".ui-resizable-"+handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- var i, axis, padPos, padWrapper;
-
- target = target || this.element;
-
- for(i in this.handles) {
-
- if(this.handles[i].constructor === String) {
- this.handles[i] = $(this.handles[i], this.element).show();
- }
-
- //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
-
- axis = $(this.handles[i], this.element);
-
- //Checking the correct pad and border
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- //The padding type i have to apply...
- padPos = [ "padding",
- /ne|nw|n/.test(i) ? "Top" :
- /se|sw|s/.test(i) ? "Bottom" :
- /^e$/.test(i) ? "Right" : "Left" ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
-
- }
-
- //TODO: What's that good for? There's not anything to be executed left
- if(!$(this.handles[i]).length) {
- continue;
- }
- }
- };
-
- //TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = $(".ui-resizable-handle", this.element)
- .disableSelection();
-
- //Matching axis name
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className) {
- axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- }
- //Axis, default = se
- that.axis = axis && axis[1] ? axis[1] : "se";
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) {
- return;
- }
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function(){
- if (o.disabled) {
- return;
- }
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- //Initialize the mouse interaction
- this._mouseInit();
-
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var wrapper,
- _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
- };
-
- //TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css("position"),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css("top"),
- left: wrapper.css("left")
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css("resize", this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var i, handle,
- capture = false;
-
- for (i in this.handles) {
- handle = $(this.handles[i])[0];
- if (handle === event.target || $.contains(handle, event.target)) {
- capture = true;
- }
- }
-
- return !this.options.disabled && capture;
- },
-
- _mouseStart: function(event) {
-
- var curleft, curtop, cursor,
- o = this.options,
- iniPos = this.element.position(),
- el = this.element;
-
- this.resizing = true;
-
- // bugfix for http://dev.jquery.com/ticket/1749
- if ( (/absolute/).test( el.css("position") ) ) {
- el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
- } else if (el.is(".ui-draggable")) {
- el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
- }
-
- this._renderProxy();
-
- curleft = num(this.helper.css("left"));
- curtop = num(this.helper.css("top"));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- //Store needed variables
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalPosition = { left: curleft, top: curtop };
- this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- //Aspect Ratio
- this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
-
- cursor = $(".ui-resizable-" + this.axis).css("cursor");
- $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- //Increase performance, avoid regex
- var data,
- el = this.helper, props = {},
- smp = this.originalMousePosition,
- a = this.axis,
- prevTop = this.position.top,
- prevLeft = this.position.left,
- prevWidth = this.size.width,
- prevHeight = this.size.height,
- dx = (event.pageX-smp.left)||0,
- dy = (event.pageY-smp.top)||0,
- trigger = this._change[a];
-
- if (!trigger) {
- return false;
- }
-
- // Calculate the attrs that will be change
- data = trigger.apply(this, [event, dx, dy]);
-
- // Put this in the mouseDrag handler since the user can start pressing shift while resizing
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey) {
- data = this._updateRatio(data, event);
- }
-
- data = this._respectSize(data, event);
-
- this._updateCache(data);
-
- // plugins callbacks need to be called first
- this._propagate("resize", event);
-
- if (this.position.top !== prevTop) {
- props.top = this.position.top + "px";
- }
- if (this.position.left !== prevLeft) {
- props.left = this.position.left + "px";
- }
- if (this.size.width !== prevWidth) {
- props.width = this.size.width + "px";
- }
- if (this.size.height !== prevHeight) {
- props.height = this.size.height + "px";
- }
- el.css(props);
-
- if (!this._helper && this._proportionallyResizeElements.length) {
- this._proportionallyResize();
- }
-
- // Call the user callback if the element was resized
- if ( ! $.isEmptyObject(props) ) {
- this._trigger("resize", event, this.ui());
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var pr, ista, soffseth, soffsetw, s, left, top,
- o = this.options, that = this;
-
- if(this._helper) {
-
- pr = this._proportionallyResizeElements;
- ista = pr.length && (/textarea/i).test(pr[0].nodeName);
- soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) };
- left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
- top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate) {
- this.element.css($.extend(s, { top: top, left: left }));
- }
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) {
- this._proportionallyResize();
- }
- }
-
- $("body").css("cursor", "auto");
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) {
- this.helper.remove();
- }
-
- return false;
-
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
- o = this.options;
-
- b = {
- minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if(this._aspectRatio || forceAspectRatio) {
- // We want to create an enclosing box whose aspect ration is the requested one
- // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if(pMinWidth > b.minWidth) {
- b.minWidth = pMinWidth;
- }
- if(pMinHeight > b.minHeight) {
- b.minHeight = pMinHeight;
- }
- if(pMaxWidth < b.maxWidth) {
- b.maxWidth = pMaxWidth;
- }
- if(pMaxHeight < b.maxHeight) {
- b.maxHeight = pMaxHeight;
- }
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- this.offset = this.helper.offset();
- if (isNumber(data.left)) {
- this.position.left = data.left;
- }
- if (isNumber(data.top)) {
- this.position.top = data.top;
- }
- if (isNumber(data.height)) {
- this.size.height = data.height;
- }
- if (isNumber(data.width)) {
- this.size.width = data.width;
- }
- },
-
- _updateRatio: function( data ) {
-
- var cpos = this.position,
- csize = this.size,
- a = this.axis;
-
- if (isNumber(data.height)) {
- data.width = (data.height * this.aspectRatio);
- } else if (isNumber(data.width)) {
- data.height = (data.width / this.aspectRatio);
- }
-
- if (a === "sw") {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a === "nw") {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function( data ) {
-
- var o = this._vBoundaries,
- a = this.axis,
- ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
- dw = this.originalPosition.left + this.originalSize.width,
- dh = this.position.top + this.size.height,
- cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
- if (isminw) {
- data.width = o.minWidth;
- }
- if (isminh) {
- data.height = o.minHeight;
- }
- if (ismaxw) {
- data.width = o.maxWidth;
- }
- if (ismaxh) {
- data.height = o.maxHeight;
- }
-
- if (isminw && cw) {
- data.left = dw - o.minWidth;
- }
- if (ismaxw && cw) {
- data.left = dw - o.maxWidth;
- }
- if (isminh && ch) {
- data.top = dh - o.minHeight;
- }
- if (ismaxh && ch) {
- data.top = dh - o.maxHeight;
- }
-
- // fixing jump error on top/left - bug #2330
- if (!data.width && !data.height && !data.left && data.top) {
- data.top = null;
- } else if (!data.width && !data.height && !data.top && data.left) {
- data.left = null;
- }
-
- return data;
- },
-
- _proportionallyResize: function() {
-
- if (!this._proportionallyResizeElements.length) {
- return;
- }
-
- var i, j, borders, paddings, prel,
- element = this.helper || this.element;
-
- for ( i=0; i < this._proportionallyResizeElements.length; i++) {
-
- prel = this._proportionallyResizeElements[i];
-
- if (!this.borderDif) {
- this.borderDif = [];
- borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
- paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
-
- for ( j = 0; j < borders.length; j++ ) {
- this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
- }
- }
-
- prel.css({
- height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
- width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
- });
-
- }
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if(this._helper) {
-
- this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() - 1,
- height: this.element.outerHeight() - 1,
- position: "absolute",
- left: this.elementOffset.left +"px",
- top: this.elementOffset.top +"px",
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [event, this.ui()]);
- (n !== "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function( event ) {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- pr = that._proportionallyResizeElements,
- ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width,
- style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css("width"), 10),
- height: parseInt(that.element.css("height"), 10),
- top: parseInt(that.element.css("top"), 10),
- left: parseInt(that.element.css("left"), 10)
- };
-
- if (pr && pr.length) {
- $(pr[0]).css({ width: data.width, height: data.height });
- }
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function() {
- var element, p, co, ch, cw, width, height,
- that = $(this).data("ui-resizable"),
- o = that.options,
- el = that.element,
- oc = o.containment,
- ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
-
- if (!ce) {
- return;
- }
-
- that.containerElement = $(ce);
-
- if (/document/.test(oc) || oc === document) {
- that.containerOffset = { left: 0, top: 0 };
- that.containerPosition = { left: 0, top: 0 };
-
- that.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
- // i'm a node, so compute top, left, right, bottom
- else {
- element = $(ce);
- p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
-
- co = that.containerOffset;
- ch = that.containerSize.height;
- cw = that.containerSize.width;
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
- height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- that.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function( event ) {
- var woset, hoset, isParent, isOffsetRelative,
- that = $(this).data("ui-resizable"),
- o = that.options,
- co = that.containerOffset, cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey,
- cop = { top:0, left:0 }, ce = that.containerElement;
-
- if (ce[0] !== document && (/static/).test(ce.css("position"))) {
- cop = co;
- }
-
- if (cp.left < (that._helper ? co.left : 0)) {
- that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
- if (pRatio) {
- that.size.height = that.size.width / that.aspectRatio;
- }
- that.position.left = o.helper ? co.left : 0;
- }
-
- if (cp.top < (that._helper ? co.top : 0)) {
- that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
- if (pRatio) {
- that.size.width = that.size.height * that.aspectRatio;
- }
- that.position.top = that._helper ? co.top : 0;
- }
-
- that.offset.left = that.parentData.left+that.position.left;
- that.offset.top = that.parentData.top+that.position.top;
-
- woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
- hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
-
- isParent = that.containerElement.get(0) === that.element.parent().get(0);
- isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
-
- if(isParent && isOffsetRelative) {
- woset -= that.parentData.left;
- }
-
- if (woset + that.size.width >= that.parentData.width) {
- that.size.width = that.parentData.width - woset;
- if (pRatio) {
- that.size.height = that.size.width / that.aspectRatio;
- }
- }
-
- if (hoset + that.size.height >= that.parentData.height) {
- that.size.height = that.parentData.height - hoset;
- if (pRatio) {
- that.size.width = that.size.height * that.aspectRatio;
- }
- }
- },
-
- stop: function(){
- var that = $(this).data("ui-resizable"),
- o = that.options,
- co = that.containerOffset,
- cop = that.containerPosition,
- ce = that.containerElement,
- helper = $(that.helper),
- ho = helper.offset(),
- w = helper.outerWidth() - that.sizeDiff.width,
- h = helper.outerHeight() - that.sizeDiff.height;
-
- if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- }
-
- if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- }
-
- }
-});
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function () {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- _store = function (exp) {
- $(exp).each(function() {
- var el = $(this);
- el.data("ui-resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function (event, ui) {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- os = that.originalSize,
- op = that.originalPosition,
- delta = {
- height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
- },
-
- _alsoResize = function (exp, c) {
- $(exp).each(function() {
- var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
- css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
-
- $.each(css, function (i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0) {
- style[prop] = sum || null;
- }
- });
-
- el.css(style);
- });
- };
-
- if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function () {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function() {
-
- var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
- .addClass("ui-resizable-ghost")
- .addClass(typeof o.ghost === "string" ? o.ghost : "");
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function(){
- var that = $(this).data("ui-resizable");
- if (that.ghost) {
- that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
- }
- },
-
- stop: function() {
- var that = $(this).data("ui-resizable");
- if (that.ghost && that.helper) {
- that.helper.get(0).removeChild(that.ghost.get(0));
- }
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function() {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- cs = that.size,
- os = that.originalSize,
- op = that.originalPosition,
- a = that.axis,
- grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
- gridX = (grid[0]||1),
- gridY = (grid[1]||1),
- ox = Math.round((cs.width - os.width) / gridX) * gridX,
- oy = Math.round((cs.height - os.height) / gridY) * gridY,
- newWidth = os.width + ox,
- newHeight = os.height + oy,
- isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
- isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
- isMinWidth = o.minWidth && (o.minWidth > newWidth),
- isMinHeight = o.minHeight && (o.minHeight > newHeight);
-
- o.grid = grid;
-
- if (isMinWidth) {
- newWidth = newWidth + gridX;
- }
- if (isMinHeight) {
- newHeight = newHeight + gridY;
- }
- if (isMaxWidth) {
- newWidth = newWidth - gridX;
- }
- if (isMaxHeight) {
- newHeight = newHeight - gridY;
- }
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- } else if (/^(ne)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else if (/^(sw)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.left = op.left - ox;
- } else {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
- }
- }
-
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.10.3",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass("ui-selected"),
- selecting: $this.hasClass("ui-selecting"),
- unselecting: $this.hasClass("ui-unselecting")
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled) {
- return;
- }
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
- }
-
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
-
- if (options.tolerance === "touch") {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance === "fit") {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
- } else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-/*jshint loopfunc: true */
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-function isFloating(item) {
- return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
-}
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.10.3",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
- if(this === event.target) {
- validHandle = true;
- }
- });
- if(!validHandle) {
- return false;
- }
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var i, body,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if( o.cursor && o.cursor !== "auto" ) { // cursor option
- body = this.document.find( "body" );
-
- // support: IE
- this.storedCursor = body.css( "cursor" );
- body.css( "cursor", o.cursor );
-
- this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) {
- this._storedOpacity = this.helper.css("opacity");
- }
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) {
- this._storedZIndex = this.helper.css("zIndex");
- }
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
- this.overflowOffset = this.scrollParent.offset();
- }
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions) {
- this._cacheHelperProportions();
- }
-
-
- //Post "activate" events to possible containers
- if( !noActivation ) {
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
-
- //Rearrange
- for (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
- }
-
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset(),
- axis = this.options.axis,
- animation = {};
-
- if ( !axis || axis === "x" ) {
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
- }
- if ( !axis || axis === "y" ) {
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
- }
- this.reverting = true;
- $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- str = [];
- o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
- if (res) {
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
- }
- });
-
- if(!str.length && o.key) {
- str.push(o.key + "=");
- }
-
- return str.join("&");
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- ret = [];
-
- o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
- isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
- isOverElement = isOverElementHeight && isOverElementWidth;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement) {
- return false;
- }
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta !== 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta !== 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
- }
- }
- }
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
- for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- }
- }
- }
-
- for (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
- continue;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- p = t.offset();
- item.left = p.left;
- item.top = p.top;
- }
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var nodeName = that.currentItem[0].nodeName.toLowerCase(),
- element = $( "<" + nodeName + ">", that.document[0] )
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper");
-
- if ( nodeName === "tr" ) {
- that.currentItem.children().each(function() {
- $( "<td>&#160;</td>", that.document[0] )
- .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
- .appendTo( element );
- });
- } else if ( nodeName === "img" ) {
- element.attr( "src", that.currentItem.attr( "src" ) );
- }
-
- if ( !className ) {
- element.css( "visibility", "hidden" );
- }
-
- return element;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) {
- return;
- }
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) {
- return;
- }
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- if (!this.containers[innermostIndex].containerCache.over) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- floating = innermostContainer.floating || isFloating(this.currentItem);
- posProperty = floating ? "left" : "top";
- sizeProperty = floating ? "width" : "height";
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
- if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
- continue;
- }
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- if(this.currentContainer === this.containers[innermostIndex]) {
- return;
- }
-
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
- this.currentContainer = this.containers[innermostIndex];
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var ce, co, over,
- o = this.options;
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) {
- pageX = this.containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < this.containment[1]) {
- pageY = this.containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > this.containment[2]) {
- pageX = this.containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > this.containment[3]) {
- pageY = this.containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
- }
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- }
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if ( this.storedCursor ) {
- this.document.find( "body" ).css( "cursor", this.storedCursor );
- this.storedStylesheet.remove();
- }
- if(this._storedOpacity) {
- this.helper.css("opacity", this._storedOpacity);
- }
- if(this._storedZIndex) {
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
- }
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] !== this.currentItem[0]) {
- this.helper.remove();
- }
- this.helper = null;
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-
-(function($, undefined) {
-
-var dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- addClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.addClass ),
-
- removeClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return arguments.length > 1 ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.removeClass ),
-
- toggleClass: (function( orig ) {
- return function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return orig.apply( this, arguments );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- };
- })( $.fn.toggleClass ),
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.10.3",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardAnimationOption( option ) {
- // Valid standard speeds (nothing, number, named speed)
- if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
- return true;
- }
-
- // Invalid strings - treat as "normal" speed
- if ( typeof option === "string" && !$.effects.effect[ option ] ) {
- return true;
- }
-
- // Complete callback
- if ( $.isFunction( option ) ) {
- return true;
- }
-
- // Options hash (but not naming an effect)
- if ( typeof option === "object" && !option.effect ) {
- return true;
- }
-
- // Didn't match any standard API
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // If the element already has the correct final state, delegate to
- // the core methods so the internal tracking of "olddisplay" works.
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- elem[ mode ]();
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- show: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.show ),
-
- hide: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.hide ),
-
- toggle: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.toggle ),
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-var uid = 0,
- hideProps = {},
- showProps = {};
-
-hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
- hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
-showProps.height = showProps.paddingTop = showProps.paddingBottom =
- showProps.borderTopWidth = showProps.borderBottomWidth = "show";
-
-$.widget( "ui.accordion", {
- version: "1.10.3",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- _create: function() {
- var options = this.options;
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
- // ARIA
- .attr( "role", "tablist" );
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
-
- this._processPanels();
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this._refresh();
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- panel: !this.active.length ? $() : this.active.next(),
- content: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- /*jshint maxcomplexity:15*/
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown : function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var options = this.options;
- this._processPanels();
-
- // was collapsed or no panel
- if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
- options.active = false;
- this.active = $();
- // active false only when collapsible is true
- } else if ( options.active === false ) {
- this._activate( 0 );
- // was active, but active panel is gone
- } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- // all remaining panel are disabled
- if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
- options.active = false;
- this.active = $();
- // activate previous panel
- } else {
- this._activate( Math.max( 0, options.active - 1 ) );
- }
- // was active, active panel still exists
- } else {
- // make sure active index is correct
- options.active = this.headers.index( this.active );
- }
-
- this._destroyIcons();
-
- this._refresh();
- },
-
- _processPanels: function() {
- this.headers = this.element.find( this.options.header )
- .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
-
- this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .filter(":not(.ui-accordion-content-active)")
- .hide();
- },
-
- _refresh: function() {
- var maxHeight,
- options = this.options,
- heightStyle = options.heightStyle,
- parent = this.element.parent(),
- accordionId = this.accordionId = "ui-accordion-" +
- (this.element.attr( "id" ) || ++uid);
-
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
- .removeClass( "ui-corner-all" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this.headers
- .attr( "role", "tab" )
- .each(function( i ) {
- var header = $( this ),
- headerId = header.attr( "id" ),
- panel = header.next(),
- panelId = panel.attr( "id" );
- if ( !headerId ) {
- headerId = accordionId + "-header-" + i;
- header.attr( "id", headerId );
- }
- if ( !panelId ) {
- panelId = accordionId + "-panel-" + i;
- panel.attr( "id", panelId );
- }
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
-
- this._createIcons();
-
- this._setupEvents( options.event );
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {
- keydown: "_keydown"
- };
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.headers.add( this.headers.next() ) );
- this._on( this.headers, events );
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._hoverable( this.headers );
- this._focusable( this.headers );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- toHide.prev().attr( "aria-selected", "false" );
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- })
- .prev()
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- adjust += fx.now;
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[0].className = toHide.parent()[0].className;
- }
-
- this._trigger( "activate", null, data );
- }
-});
-
-})( jQuery );
-
-(function( $, undefined ) {
-
-// used to prevent race conditions with remote data sources
-var requestIndex = 0;
-
-$.widget( "ui.autocomplete", {
- version: "1.10.3",
- defaultElement: "<input>",
- options: {
- appendTo: null,
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
- nodeName = this.element[0].nodeName.toLowerCase(),
- isTextarea = nodeName === "textarea",
- isInput = nodeName === "input";
-
- this.isMultiLine =
- // Textareas are always multi-line
- isTextarea ? true :
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- isInput ? false :
- // All other element types are determined by whether or not they're contentEditable
- this.element.prop( "isContentEditable" );
-
- this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- /*jshint maxcomplexity:15*/
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- case keyCode.NUMPAD_ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- this._value( this.term );
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- event.preventDefault();
- }
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete ui-front" )
- .appendTo( this._appendTo() )
- .menu({
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .hide()
- .data( "ui-menu" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- // support: Firefox
- // Prevent accidental activation of menu items in Firefox (#7024 #9118)
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- var item = ui.item.data( "ui-autocomplete-item" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- } else {
- // Normally the input is populated with the item's value as the
- // menu is navigated, causing screen readers to notice a change and
- // announce the item. Since the focus event was canceled, this doesn't
- // happen, so we update the live region so that screen readers can
- // still notice the change and announce it.
- this.liveRegion.text( item.value );
- }
- },
- menuselect: function( event, ui ) {
- var item = ui.item.data( "ui-autocomplete-item" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[0] !== this.document[0].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "polite"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .insertBefore( this.element );
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this._appendTo() );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[0].body;
- }
-
- return element;
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray(this.options.source) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response( [] );
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
- // only search if the value has changed
- if ( this.term !== this._value() ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var that = this,
- index = ++requestIndex;
-
- return function( content ) {
- if ( index === requestIndex ) {
- that.__response( content );
- }
-
- that.pending--;
- if ( !that.pending ) {
- that.element.removeClass( "ui-autocomplete-loading" );
- }
- };
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[0].label && items[0].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend({
- label: item.label || item.value,
- value: item.value || item.label
- }, item );
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element.empty();
- this._renderMenu( ul, items );
- this.isNewMenu = true;
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ));
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" )
- .append( $( "<a>" ).text( item.label ) )
- .appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
- this._value( this.term );
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
- },
- filter: function(array, term) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
- return $.grep( array, function(value) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.text( message );
- }
-});
-
-}( jQuery ));
-
-(function( $, undefined ) {
-
-var lastActive, startXPos, startYPos, clickDragged,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- stateClasses = "ui-state-hover ui-state-active ",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var form = $( this );
- setTimeout(function() {
- form.find( ":ui-button" ).button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- name = name.replace( /'/g, "\\'" );
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "']" );
- } else {
- radios = $( "[name='" + name + "']", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.10.3",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "",
- focusClass = "ui-state-focus";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- this.element
- .bind( "focus" + this.eventNamespace, function() {
- // no need to check disabled, focus won't be triggered anyway
- that.buttonElement.addClass( focusClass );
- })
- .bind( "blur" + this.eventNamespace, function() {
- that.buttonElement.removeClass( focusClass );
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- if ( clickDragged ) {
- return;
- }
- that.refresh();
- });
- // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
- // prevents issue where button state changes but checkbox/radio checked state
- // does not in Firefox (see ticket #6970)
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- clickDragged = false;
- startXPos = event.pageX;
- startYPos = event.pageY;
- })
- .bind( "mouseup" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
- clickDragged = true;
- }
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- // see #8559, we bind to blur here in case the button element loses
- // focus between keydown and keyup, it would be left in an "active" state
- .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- // TODO: pull out $.Widget's handling for the disabled option into
- // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
- // be overridden by individual plugins
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- } else {
- this.element.prop( "disabled", false );
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.10.3",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl";
-
- this.buttons = this.element.find( this.options.items )
- .filter( ":ui-button" )
- .button( "refresh" )
- .end()
- .not( ":ui-button" )
- .button()
- .end()
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-}( jQuery ) );
-
-(function( $, undefined ) {
-
-$.extend($.ui, { datepicker: { version: "1.10.3" } });
-
-var PROP_NAME = "datepicker",
- instActive;
-
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
- this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
- this._appendClass = "ui-datepicker-append"; // The name of the append marker class
- this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
- this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
- this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
- this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
- this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
- this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[""] = { // Default regional settings
- closeText: "Done", // Display text for close link
- prevText: "Prev", // Display text for previous month link
- nextText: "Next", // Display text for next month link
- currentText: "Today", // Display text for current month link
- monthNames: ["January","February","March","April","May","June",
- "July","August","September","October","November","December"], // Names of months for drop-down and formatting
- monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
- dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
- dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
- dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
- weekHeader: "Wk", // Column header for week of the year
- dateFormat: "mm/dd/yy", // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: "" // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: "focus", // "focus" for popup on focus,
- // "button" for trigger button, or "both" for either
- showAnim: "fadeIn", // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: "", // Display text following the input box, e.g. showing the format
- buttonText: "...", // Text for trigger button
- buttonImage: "", // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: "c-10:c+10", // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: "+10", // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with "+" for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: "fast", // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: "", // Selector for an alternate field to store selected dates into
- altFormat: "", // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional[""]);
- this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: "hasDatepicker",
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- * @param settings object - the new settings to use as defaults (anonymous object)
- * @return the manager object
- */
- setDefaults: function(settings) {
- extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- * @param settings object - the new settings to use for this date picker instance (anonymous)
- */
- _attachDatepicker: function(target, settings) {
- var nodeName, inline, inst;
- nodeName = target.nodeName.toLowerCase();
- inline = (nodeName === "div" || nodeName === "span");
- if (!target.id) {
- this.uuid += 1;
- target.id = "dp" + this.uuid;
- }
- inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {});
- if (nodeName === "input") {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName)) {
- return;
- }
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp);
- this._autoSize(inst);
- $.data(target, PROP_NAME, inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var showOn, buttonText, buttonImage,
- appendText = this._get(inst, "appendText"),
- isRTL = this._get(inst, "isRTL");
-
- if (inst.append) {
- inst.append.remove();
- }
- if (appendText) {
- inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
- input[isRTL ? "before" : "after"](inst.append);
- }
-
- input.unbind("focus", this._showDatepicker);
-
- if (inst.trigger) {
- inst.trigger.remove();
- }
-
- showOn = this._get(inst, "showOn");
- if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- }
- if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
- buttonText = this._get(inst, "buttonText");
- buttonImage = this._get(inst, "buttonImage");
- inst.trigger = $(this._get(inst, "buttonImageOnly") ?
- $("<img/>").addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $("<button type='button'></button>").addClass(this._triggerClass).
- html(!buttonImage ? buttonText : $("<img/>").attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? "before" : "after"](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
- $.datepicker._hideDatepicker();
- } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else {
- $.datepicker._showDatepicker(input[0]);
- }
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, "autoSize") && !inst.inline) {
- var findMax, max, maxI, i,
- date = new Date(2009, 12 - 1, 20), // Ensure double digits
- dateFormat = this._get(inst, "dateFormat");
-
- if (dateFormat.match(/[DM]/)) {
- findMax = function(names) {
- max = 0;
- maxI = 0;
- for (i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- "monthNames" : "monthNamesShort"))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- "dayNames" : "dayNamesShort"))) + 20 - date.getDay());
- }
- inst.input.attr("size", this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName)) {
- return;
- }
- divSpan.addClass(this.markerClassName).append(inst.dpDiv);
- $.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- * @param input element - ignored
- * @param date string or Date - the initial date to display
- * @param onSelect function - the function to call when a date is selected
- * @param settings object - update the dialog date picker instance's settings (anonymous object)
- * @param pos int[2] - coordinates for the dialog's position within the screen or
- * event - with x/y coordinates or
- * leave empty for default (screen centre)
- * @return the manager object
- */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var id, browserWidth, browserHeight, scrollX, scrollY,
- inst = this._dialogInst; // internal instance
-
- if (!inst) {
- this.uuid += 1;
- id = "dp" + this.uuid;
- this._dialogInput = $("<input type='text' id='" + id +
- "' style='position: absolute; top: -100px; width: 0px;'/>");
- this._dialogInput.keydown(this._doKeyDown);
- $("body").append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], PROP_NAME, inst);
- }
- extendRemove(inst.settings, settings || {});
- date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- browserWidth = document.documentElement.clientWidth;
- browserHeight = document.documentElement.clientHeight;
- scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI) {
- $.blockUI(this.dpDiv);
- }
- $.data(this._dialogInput[0], PROP_NAME, inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- * @param target element - the target input field or division or span
- */
- _destroyDatepicker: function(target) {
- var nodeName,
- $target = $(target),
- inst = $.data(target, PROP_NAME);
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- $.removeData(target, PROP_NAME);
- if (nodeName === "input") {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind("focus", this._showDatepicker).
- unbind("keydown", this._doKeyDown).
- unbind("keypress", this._doKeyPress).
- unbind("keyup", this._doKeyUp);
- } else if (nodeName === "div" || nodeName === "span") {
- $target.removeClass(this.markerClassName).empty();
- }
- },
-
- /* Enable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _enableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, PROP_NAME);
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = false;
- inst.trigger.filter("button").
- each(function() { this.disabled = false; }).end().
- filter("img").css({opacity: "1.0", cursor: ""});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().removeClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _disableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, PROP_NAME);
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = true;
- inst.trigger.filter("button").
- each(function() { this.disabled = true; }).end().
- filter("img").css({opacity: "0.5", cursor: "default"});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().addClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- * @param target element - the target input field or division or span
- * @return boolean - true if disabled, false if enabled
- */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] === target) {
- return true;
- }
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- * @param target element - the target input field or division or span
- * @return object - the associated instance data
- * @throws error if a jQuery problem getting data
- */
- _getInst: function(target) {
- try {
- return $.data(target, PROP_NAME);
- }
- catch (err) {
- throw "Missing instance data for this datepicker";
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- * @param name object - the new settings to update or
- * string - the name of the setting to change or retrieve,
- * when retrieving also "all" for all instance settings or
- * "defaults" for all global defaults
- * @param value any - the new value for the setting
- * (omit if above is an object or to retrieve a value)
- */
- _optionDatepicker: function(target, name, value) {
- var settings, date, minDate, maxDate,
- inst = this._getInst(target);
-
- if (arguments.length === 2 && typeof name === "string") {
- return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name === "all" ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
-
- settings = name || {};
- if (typeof name === "string") {
- settings = {};
- settings[name] = value;
- }
-
- if (inst) {
- if (this._curInst === inst) {
- this._hideDatepicker();
- }
-
- date = this._getDateDatepicker(target, true);
- minDate = this._getMinMaxDate(inst, "min");
- maxDate = this._getMinMaxDate(inst, "max");
- extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
- inst.settings.minDate = this._formatDate(inst, minDate);
- }
- if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- }
- if ( "disabled" in settings ) {
- if ( settings.disabled ) {
- this._disableDatepicker(target);
- } else {
- this._enableDatepicker(target);
- }
- }
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- * @param target element - the target input field or division or span
- * @param date Date - the new date
- */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- * @param target element - the target input field or division or span
- * @param noDefault boolean - true if no default date is to be used
- * @return Date - the current date
- */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline) {
- this._setDateFromField(inst, noDefault);
- }
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var onSelect, dateStr, sel,
- inst = $.datepicker._getInst(event.target),
- handled = true,
- isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
-
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing) {
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
- $.datepicker._currentClass + ")", inst.dpDiv);
- if (sel[0]) {
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- }
-
- onSelect = $.datepicker._get(inst, "onSelect");
- if (onSelect) {
- dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- } else {
- $.datepicker._hideDatepicker();
- }
-
- return false; // don't submit the form
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) {
- $.datepicker._clearDate(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) {
- $.datepicker._gotoToday(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, -7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, +7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- } else {
- handled = false;
- }
-
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var chars, chr,
- inst = $.datepicker._getInst(event.target);
-
- if ($.datepicker._get(inst, "constrainInput")) {
- chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
- chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var date,
- inst = $.datepicker._getInst(event.target);
-
- if (inst.input.val() !== inst.lastVal) {
- try {
- date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
-
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- * If false returned from beforeShow event handler do not show.
- * @param input element - the input field attached to the date picker or
- * event - if triggered by focus
- */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
- input = $("input", input.parentNode)[0];
- }
-
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
- return;
- }
-
- var inst, beforeShow, beforeShowSettings, isFixed,
- offset, showAnim, duration;
-
- inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
-
- beforeShow = $.datepicker._get(inst, "beforeShow");
- beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- return;
- }
- extendRemove(inst.settings, beforeShowSettings);
-
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
-
- if ($.datepicker._inDialog) { // hide cursor
- input.value = "";
- }
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
-
- isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css("position") === "fixed";
- return !isFixed;
- });
-
- offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- "static" : (isFixed ? "fixed" : "absolute")), display: "none",
- left: offset.left + "px", top: offset.top + "px"});
-
- if (!inst.inline) {
- showAnim = $.datepicker._get(inst, "showAnim");
- duration = $.datepicker._get(inst, "duration");
- inst.dpDiv.zIndex($(input).zIndex()+1);
- $.datepicker._datepickerShowing = true;
-
- if ( $.effects && $.effects.effect[ showAnim ] ) {
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
- } else {
- inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
- }
-
- if ( $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
- inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
-
- var origyearshtml,
- numMonths = this._getNumberOfMonths(inst),
- cols = numMonths[1],
- width = 17;
-
- inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
- if (cols > 1) {
- inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
- }
- inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
- "Class"]("ui-datepicker-multi");
- inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
- "Class"]("ui-datepicker-rtl");
-
- if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- // Support: IE and jQuery <1.9
- _shouldFocusInput: function( inst ) {
- return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth(),
- dpHeight = inst.dpDiv.outerHeight(),
- inputWidth = inst.input ? inst.input.outerWidth() : 0,
- inputHeight = inst.input ? inst.input.outerHeight() : 0,
- viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
- viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var position,
- inst = this._getInst(obj),
- isRTL = this._get(inst, "isRTL");
-
- while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? "previousSibling" : "nextSibling"];
- }
-
- position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- * @param input element - the input field attached to the date picker
- */
- _hideDatepicker: function(input) {
- var showAnim, duration, postProcess, onClose,
- inst = this._curInst;
-
- if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
- return;
- }
-
- if (this._datepickerShowing) {
- showAnim = this._get(inst, "showAnim");
- duration = this._get(inst, "duration");
- postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
- } else {
- inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
- (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
- }
-
- if (!showAnim) {
- postProcess();
- }
- this._datepickerShowing = false;
-
- onClose = this._get(inst, "onClose");
- if (onClose) {
- onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
- }
-
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
- if ($.blockUI) {
- $.unblockUI();
- $("body").append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst) {
- return;
- }
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
- $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
- $.datepicker._hideDatepicker();
- }
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var date,
- target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._get(inst, "gotoCurrent") && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- } else {
- date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- inst["selected" + (period === "M" ? "Month" : "Year")] =
- inst["draw" + (period === "M" ? "Month" : "Year")] =
- parseInt(select.options[select.selectedIndex].value,10);
-
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var inst,
- target = $(id);
-
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
-
- inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $("a", td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- this._selectDate(target, "");
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var onSelect,
- target = $(id),
- inst = this._getInst(target[0]);
-
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input) {
- inst.input.val(dateStr);
- }
- this._updateAlternate(inst);
-
- onSelect = this._get(inst, "onSelect");
- if (onSelect) {
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- } else if (inst.input) {
- inst.input.trigger("change"); // fire the change event
- }
-
- if (inst.inline){
- this._updateDatepicker(inst);
- } else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) !== "object") {
- inst.input.focus(); // restore focus
- }
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altFormat, date, dateStr,
- altField = this._get(inst, "altField");
-
- if (altField) { // update alternate field too
- altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
- date = this._getDate(inst);
- dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- * @param date Date - the date to customise
- * @return [boolean, string] - is this date selectable?, what is its CSS class?
- */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ""];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- * @param date Date - the date to get the week for
- * @return number - the number of the week within the year that contains this date
- */
- iso8601Week: function(date) {
- var time,
- checkDate = new Date(date.getTime());
-
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
-
- time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- * See formatDate below for the possible formats.
- *
- * @param format string - the expected format of the date
- * @param value string - the date in the above format
- * @param settings Object - attributes include:
- * shortYearCutoff number - the cutoff year for determining the century (optional)
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return Date - the extracted date value or null if value is blank
- */
- parseDate: function (format, value, settings) {
- if (format == null || value == null) {
- throw "Invalid arguments";
- }
-
- value = (typeof value === "object" ? value.toString() : value + "");
- if (value === "") {
- return null;
- }
-
- var iFormat, dim, extra,
- iValue = 0,
- shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
- shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- year = -1,
- month = -1,
- day = -1,
- doy = -1,
- literal = false,
- date,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Extract a number from the string value
- getNumber = function(match) {
- var isDoubled = lookAhead(match),
- size = (match === "@" ? 14 : (match === "!" ? 20 :
- (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
- digits = new RegExp("^\\d{1," + size + "}"),
- num = value.substring(iValue).match(digits);
- if (!num) {
- throw "Missing number at position " + iValue;
- }
- iValue += num[0].length;
- return parseInt(num[0], 10);
- },
- // Extract a name from the string value and convert to an index
- getName = function(match, shortNames, longNames) {
- var index = -1,
- names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
-
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index !== -1) {
- return index + 1;
- } else {
- throw "Unknown name at position " + iValue;
- }
- },
- // Confirm that a literal character matches the string value
- checkLiteral = function() {
- if (value.charAt(iValue) !== format.charAt(iFormat)) {
- throw "Unexpected literal at position " + iValue;
- }
- iValue++;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- checkLiteral();
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- day = getNumber("d");
- break;
- case "D":
- getName("D", dayNamesShort, dayNames);
- break;
- case "o":
- doy = getNumber("o");
- break;
- case "m":
- month = getNumber("m");
- break;
- case "M":
- month = getName("M", monthNamesShort, monthNames);
- break;
- case "y":
- year = getNumber("y");
- break;
- case "@":
- date = new Date(getNumber("@"));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "!":
- date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'")){
- checkLiteral();
- } else {
- literal = true;
- }
- break;
- default:
- checkLiteral();
- }
- }
- }
-
- if (iValue < value.length){
- extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
-
- if (year === -1) {
- year = new Date().getFullYear();
- } else if (year < 100) {
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- }
-
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim) {
- break;
- }
- month++;
- day -= dim;
- } while (true);
- }
-
- date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
- throw "Invalid date"; // E.g. 31/02/00
- }
- return date;
- },
-
- /* Standard date formats. */
- ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
- COOKIE: "D, dd M yy",
- ISO_8601: "yy-mm-dd",
- RFC_822: "D, d M y",
- RFC_850: "DD, dd-M-y",
- RFC_1036: "D, d M y",
- RFC_1123: "D, d M yy",
- RFC_2822: "D, d M yy",
- RSS: "D, d M y", // RFC 822
- TICKS: "!",
- TIMESTAMP: "@",
- W3C: "yy-mm-dd", // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- * The format can be combinations of the following:
- * d - day of month (no leading zero)
- * dd - day of month (two digit)
- * o - day of year (no leading zeros)
- * oo - day of year (three digit)
- * D - day name short
- * DD - day name long
- * m - month of year (no leading zero)
- * mm - month of year (two digit)
- * M - month name short
- * MM - month name long
- * y - year (two digit)
- * yy - year (four digit)
- * @ - Unix timestamp (ms since 01/01/1970)
- * ! - Windows ticks (100ns since 01/01/0001)
- * "..." - literal text
- * '' - single quote
- *
- * @param format string - the desired format of the date
- * @param date Date - the date value to format
- * @param settings Object - attributes include:
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return string - the date in the above format
- */
- formatDate: function (format, date, settings) {
- if (!date) {
- return "";
- }
-
- var iFormat,
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Format a number, with leading zero if necessary
- formatNumber = function(match, value, len) {
- var num = "" + value;
- if (lookAhead(match)) {
- while (num.length < len) {
- num = "0" + num;
- }
- }
- return num;
- },
- // Format a name, short or long as requested
- formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- },
- output = "",
- literal = false;
-
- if (date) {
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- output += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- output += formatNumber("d", date.getDate(), 2);
- break;
- case "D":
- output += formatName("D", date.getDay(), dayNamesShort, dayNames);
- break;
- case "o":
- output += formatNumber("o",
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case "m":
- output += formatNumber("m", date.getMonth() + 1, 2);
- break;
- case "M":
- output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
- break;
- case "y":
- output += (lookAhead("y") ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
- break;
- case "@":
- output += date.getTime();
- break;
- case "!":
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'")) {
- output += "'";
- } else {
- literal = true;
- }
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var iFormat,
- chars = "",
- literal = false,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- chars += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d": case "m": case "y": case "@":
- chars += "0123456789";
- break;
- case "D": case "M":
- return null; // Accept anything
- case "'":
- if (lookAhead("'")) {
- chars += "'";
- } else {
- literal = true;
- }
- break;
- default:
- chars += format.charAt(iFormat);
- }
- }
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() === inst.lastVal) {
- return;
- }
-
- var dateFormat = this._get(inst, "dateFormat"),
- dates = inst.lastVal = inst.input ? inst.input.val() : null,
- defaultDate = this._getDefaultDate(inst),
- date = defaultDate,
- settings = this._getFormatConfig(inst);
-
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- dates = (noDefault ? "" : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- },
- offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
-
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date(),
- year = date.getFullYear(),
- month = date.getMonth(),
- day = date.getDate(),
- pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
- matches = pattern.exec(offset);
-
- while (matches) {
- switch (matches[2] || "d") {
- case "d" : case "D" :
- day += parseInt(matches[1],10); break;
- case "w" : case "W" :
- day += parseInt(matches[1],10) * 7; break;
- case "m" : case "M" :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case "y": case "Y" :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- },
- newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
- (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
-
- newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- * Hours may be non-zero on daylight saving cut-over:
- * > 12 when midnight changeover, but then cannot generate
- * midnight datetime, so jump to 1AM, otherwise reset.
- * @param date (Date) the date to check
- * @return (Date) the corrected date
- */
- _daylightSavingAdjust: function(date) {
- if (!date) {
- return null;
- }
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date,
- origMonth = inst.selectedMonth,
- origYear = inst.selectedYear,
- newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
-
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
- this._notifyChange(inst);
- }
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? "" : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, "stepMonths"),
- id = "#" + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find("[data-handler]").map(function () {
- var handler = {
- prev: function () {
- $.datepicker._adjustDate(id, -stepMonths, "M");
- },
- next: function () {
- $.datepicker._adjustDate(id, +stepMonths, "M");
- },
- hide: function () {
- $.datepicker._hideDatepicker();
- },
- today: function () {
- $.datepicker._gotoToday(id);
- },
- selectDay: function () {
- $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
- return false;
- },
- selectMonth: function () {
- $.datepicker._selectMonthYear(id, this, "M");
- return false;
- },
- selectYear: function () {
- $.datepicker._selectMonthYear(id, this, "Y");
- return false;
- }
- };
- $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
- controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
- monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
- selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
- cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
- printDate, dRow, tbody, daySettings, otherMonth, unselectable,
- tempDate = new Date(),
- today = this._daylightSavingAdjust(
- new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
- isRTL = this._get(inst, "isRTL"),
- showButtonPanel = this._get(inst, "showButtonPanel"),
- hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
- navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
- numMonths = this._getNumberOfMonths(inst),
- showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
- stepMonths = this._get(inst, "stepMonths"),
- isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
- currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- drawMonth = inst.drawMonth - showCurrentAtPos,
- drawYear = inst.drawYear;
-
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
-
- prevText = this._get(inst, "prevText");
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
- " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
-
- nextText = this._get(inst, "nextText");
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
- " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
-
- currentText = this._get(inst, "currentText");
- gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
-
- controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
- this._get(inst, "closeText") + "</button>" : "");
-
- buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
- (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
- ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
-
- firstDay = parseInt(this._get(inst, "firstDay"),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
-
- showWeek = this._get(inst, "showWeek");
- dayNames = this._get(inst, "dayNames");
- dayNamesMin = this._get(inst, "dayNamesMin");
- monthNames = this._get(inst, "monthNames");
- monthNamesShort = this._get(inst, "monthNamesShort");
- beforeShowDay = this._get(inst, "beforeShowDay");
- showOtherMonths = this._get(inst, "showOtherMonths");
- selectOtherMonths = this._get(inst, "selectOtherMonths");
- defaultDate = this._getDefaultDate(inst);
- html = "";
- dow;
- for (row = 0; row < numMonths[0]; row++) {
- group = "";
- this.maxRows = 4;
- for (col = 0; col < numMonths[1]; col++) {
- selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- cornerClass = " ui-corner-all";
- calender = "";
- if (isMultiMonth) {
- calender += "<div class='ui-datepicker-group";
- if (numMonths[1] > 1) {
- switch (col) {
- case 0: calender += " ui-datepicker-group-first";
- cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
- case numMonths[1]-1: calender += " ui-datepicker-group-last";
- cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
- default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
- }
- }
- calender += "'>";
- }
- calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
- (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
- (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- "</div><table class='ui-datepicker-calendar'><thead>" +
- "<tr>";
- thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
- for (dow = 0; dow < 7; dow++) { // days of the week
- day = (dow + firstDay) % 7;
- thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
- "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
- }
- calender += thead + "</tr></thead><tbody>";
- daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- }
- leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += "<tr>";
- tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
- this._get(inst, "calculateWeek")(printDate) + "</td>");
- for (dow = 0; dow < 7; dow++) { // create date picker days
- daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
- otherMonth = (printDate.getMonth() !== drawMonth);
- unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += "<td class='" +
- ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
- (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
- ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- " " + this._dayOverClass : "") + // highlight selected day
- (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
- (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
- (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
- (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
- (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
- (otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
- (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
- (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
- (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
- (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
- "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + "</tr>";
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
- ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
- group += calender;
- }
- html += group;
- }
- html += buttonPanel;
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
-
- var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
- changeMonth = this._get(inst, "changeMonth"),
- changeYear = this._get(inst, "changeYear"),
- showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
- html = "<div class='ui-datepicker-title'>",
- monthHtml = "";
-
- // month selection
- if (secondary || !changeMonth) {
- monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
- } else {
- inMinYear = (minDate && minDate.getFullYear() === drawYear);
- inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
- monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
- for ( month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
- monthHtml += "<option value='" + month + "'" +
- (month === drawMonth ? " selected='selected'" : "") +
- ">" + monthNamesShort[month] + "</option>";
- }
- }
- monthHtml += "</select>";
- }
-
- if (!showMonthAfterYear) {
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
- }
-
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = "";
- if (secondary || !changeYear) {
- html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
- } else {
- // determine range of years to display
- years = this._get(inst, "yearRange").split(":");
- thisYear = new Date().getFullYear();
- determineYear = function(value) {
- var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- year = determineYear(years[0]);
- endYear = Math.max(year, determineYear(years[1] || ""));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
- for (; year <= endYear; year++) {
- inst.yearshtml += "<option value='" + year + "'" +
- (year === drawYear ? " selected='selected'" : "") +
- ">" + year + "</option>";
- }
- inst.yearshtml += "</select>";
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
-
- html += this._get(inst, "yearSuffix");
- if (showMonthAfterYear) {
- html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
- }
- html += "</div>"; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period === "Y" ? offset : 0),
- month = inst.drawMonth + (period === "M" ? offset : 0),
- day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
- date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
-
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period === "M" || period === "Y") {
- this._notifyChange(inst);
- }
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- newDate = (minDate && date < minDate ? minDate : date);
- return (maxDate && newDate > maxDate ? maxDate : newDate);
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, "onChangeMonthYear");
- if (onChange) {
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- }
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, "numberOfMonths");
- return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst),
- date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
-
- if (offset < 0) {
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- }
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var yearSplit, currentYear,
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- minYear = null,
- maxYear = null,
- years = this._get(inst, "yearRange");
- if (years){
- yearSplit = years.split(":");
- currentYear = new Date().getFullYear();
- minYear = parseInt(yearSplit[0], 10);
- maxYear = parseInt(yearSplit[1], 10);
- if ( yearSplit[0].match(/[+\-].*/) ) {
- minYear += currentYear;
- }
- if ( yearSplit[1].match(/[+\-].*/) ) {
- maxYear += currentYear;
- }
- }
-
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()) &&
- (!minYear || date.getFullYear() >= minYear) &&
- (!maxYear || date.getFullYear() <= maxYear));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, "shortYearCutoff");
- shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
- monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day === "object" ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function bindHover(dpDiv) {
- var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
- return dpDiv.delegate(selector, "mouseout", function() {
- $(this).removeClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).removeClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).removeClass("ui-datepicker-next-hover");
- }
- })
- .delegate(selector, "mouseover", function(){
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
- $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
- $(this).addClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).addClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).addClass("ui-datepicker-next-hover");
- }
- }
- });
-}
-
-/* jQuery extend now ignores nulls! */
-function extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props) {
- if (props[name] == null) {
- target[name] = props[name];
- }
- }
- return target;
-}
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick);
- $.datepicker.initialized = true;
- }
-
- /* Append datepicker main container to body if not exist. */
- if ($("#"+$.datepicker._mainDivId).length === 0) {
- $("body").append($.datepicker.dpDiv);
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- return this.each(function() {
- typeof options === "string" ?
- $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.10.3";
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-var sizeRelatedOptions = {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
- resizableRelatedOptions = {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- };
-
-$.widget( "ui.dialog", {
- version: "1.10.3",
- options: {
- appendTo: "body",
- autoOpen: true,
- buttons: [],
- closeOnEscape: true,
- closeText: "close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: null,
- maxWidth: null,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // Ensure the titlebar is always visible
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- title: null,
- width: 300,
-
- // callbacks
- beforeClose: null,
- close: null,
- drag: null,
- dragStart: null,
- dragStop: null,
- focus: null,
- open: null,
- resize: null,
- resizeStart: null,
- resizeStop: null
- },
-
- _create: function() {
- this.originalCss = {
- display: this.element[0].style.display,
- width: this.element[0].style.width,
- minHeight: this.element[0].style.minHeight,
- maxHeight: this.element[0].style.maxHeight,
- height: this.element[0].style.height
- };
- this.originalPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.originalTitle = this.element.attr("title");
- this.options.title = this.options.title || this.originalTitle;
-
- this._createWrapper();
-
- this.element
- .show()
- .removeAttr("title")
- .addClass("ui-dialog-content ui-widget-content")
- .appendTo( this.uiDialog );
-
- this._createTitlebar();
- this._createButtonPane();
-
- if ( this.options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( this.options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._isOpen = false;
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
- if ( element && (element.jquery || element.nodeType) ) {
- return $( element );
- }
- return this.document.find( element || "body" ).eq( 0 );
- },
-
- _destroy: function() {
- var next,
- originalPosition = this.originalPosition;
-
- this._destroyOverlay();
-
- this.element
- .removeUniqueId()
- .removeClass("ui-dialog-content ui-widget-content")
- .css( this.originalCss )
- // Without detaching first, the following becomes really slow
- .detach();
-
- this.uiDialog.stop( true, true ).remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = originalPosition.parent.children().eq( originalPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[0] !== this.element[0] ) {
- next.before( this.element );
- } else {
- originalPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- disable: $.noop,
- enable: $.noop,
-
- close: function( event ) {
- var that = this;
-
- if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
- return;
- }
-
- this._isOpen = false;
- this._destroyOverlay();
-
- if ( !this.opener.filter(":focusable").focus().length ) {
- // Hiding a focused element doesn't trigger blur in WebKit
- // so in case we have nothing to focus on, explicitly blur the active element
- // https://bugs.webkit.org/show_bug.cgi?id=47182
- $( this.document[0].activeElement ).blur();
- }
-
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- moveToTop: function() {
- this._moveToTop();
- },
-
- _moveToTop: function( event, silent ) {
- var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length;
- if ( moved && !silent ) {
- this._trigger( "focus", event );
- }
- return moved;
- },
-
- open: function() {
- var that = this;
- if ( this._isOpen ) {
- if ( this._moveToTop() ) {
- this._focusTabbable();
- }
- return;
- }
-
- this._isOpen = true;
- this.opener = $( this.document[0].activeElement );
-
- this._size();
- this._position();
- this._createOverlay();
- this._moveToTop( null, true );
- this._show( this.uiDialog, this.options.show, function() {
- that._focusTabbable();
- that._trigger("focus");
- });
-
- this._trigger("open");
- },
-
- _focusTabbable: function() {
- // Set focus to the first match:
- // 1. First element inside the dialog matching [autofocus]
- // 2. Tabbable element inside the content element
- // 3. Tabbable element inside the buttonpane
- // 4. The close button
- // 5. The dialog itself
- var hasFocus = this.element.find("[autofocus]");
- if ( !hasFocus.length ) {
- hasFocus = this.element.find(":tabbable");
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find(":tabbable");
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogTitlebarClose.filter(":tabbable");
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialog;
- }
- hasFocus.eq( 0 ).focus();
- },
-
- _keepFocus: function( event ) {
- function checkFocus() {
- var activeElement = this.document[0].activeElement,
- isActive = this.uiDialog[0] === activeElement ||
- $.contains( this.uiDialog[0], activeElement );
- if ( !isActive ) {
- this._focusTabbable();
- }
- }
- event.preventDefault();
- checkFocus.call( this );
- // support: IE
- // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
- // so we check again later
- this._delay( checkFocus );
- },
-
- _createWrapper: function() {
- this.uiDialog = $("<div>")
- .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
- this.options.dialogClass )
- .hide()
- .attr({
- // Setting tabIndex makes the div focusable
- tabIndex: -1,
- role: "dialog"
- })
- .appendTo( this._appendTo() );
-
- this._on( this.uiDialog, {
- keydown: function( event ) {
- if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- event.preventDefault();
- this.close( event );
- return;
- }
-
- // prevent tabbing out of dialogs
- if ( event.keyCode !== $.ui.keyCode.TAB ) {
- return;
- }
- var tabbables = this.uiDialog.find(":tabbable"),
- first = tabbables.filter(":first"),
- last = tabbables.filter(":last");
-
- if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
- first.focus( 1 );
- event.preventDefault();
- } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
- last.focus( 1 );
- event.preventDefault();
- }
- },
- mousedown: function( event ) {
- if ( this._moveToTop( event ) ) {
- this._focusTabbable();
- }
- }
- });
-
- // We assume that any existing aria-describedby attribute means
- // that the dialog content is marked up properly
- // otherwise we brute force the content as the description
- if ( !this.element.find("[aria-describedby]").length ) {
- this.uiDialog.attr({
- "aria-describedby": this.element.uniqueId().attr("id")
- });
- }
- },
-
- _createTitlebar: function() {
- var uiDialogTitle;
-
- this.uiDialogTitlebar = $("<div>")
- .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
- .prependTo( this.uiDialog );
- this._on( this.uiDialogTitlebar, {
- mousedown: function( event ) {
- // Don't prevent click on close button (#8838)
- // Focusing a dialog that is partially scrolled out of view
- // causes the browser to scroll it into view, preventing the click event
- if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) {
- // Dialog isn't getting focus when dragging (#8063)
- this.uiDialog.focus();
- }
- }
- });
-
- this.uiDialogTitlebarClose = $("<button></button>")
- .button({
- label: this.options.closeText,
- icons: {
- primary: "ui-icon-closethick"
- },
- text: false
- })
- .addClass("ui-dialog-titlebar-close")
- .appendTo( this.uiDialogTitlebar );
- this._on( this.uiDialogTitlebarClose, {
- click: function( event ) {
- event.preventDefault();
- this.close( event );
- }
- });
-
- uiDialogTitle = $("<span>")
- .uniqueId()
- .addClass("ui-dialog-title")
- .prependTo( this.uiDialogTitlebar );
- this._title( uiDialogTitle );
-
- this.uiDialog.attr({
- "aria-labelledby": uiDialogTitle.attr("id")
- });
- },
-
- _title: function( title ) {
- if ( !this.options.title ) {
- title.html("&#160;");
- }
- title.text( this.options.title );
- },
-
- _createButtonPane: function() {
- this.uiDialogButtonPane = $("<div>")
- .addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
-
- this.uiButtonSet = $("<div>")
- .addClass("ui-dialog-buttonset")
- .appendTo( this.uiDialogButtonPane );
-
- this._createButtons();
- },
-
- _createButtons: function() {
- var that = this,
- buttons = this.options.buttons;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
- this.uiDialog.removeClass("ui-dialog-buttons");
- return;
- }
-
- $.each( buttons, function( name, props ) {
- var click, buttonOptions;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[0], arguments );
- };
- buttonOptions = {
- icons: props.icons,
- text: props.showText
- };
- delete props.icons;
- delete props.showText;
- $( "<button></button>", props )
- .button( buttonOptions )
- .appendTo( that.uiButtonSet );
- });
- this.uiDialog.addClass("ui-dialog-buttons");
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this ).addClass("ui-dialog-dragging");
- that._blockFrames();
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- options.position = [
- ui.position.left - that.document.scrollLeft(),
- ui.position.top - that.document.scrollTop()
- ];
- $( this ).removeClass("ui-dialog-dragging");
- that._unblockFrames();
- that._trigger( "dragStop", event, filteredUi( ui ) );
- }
- });
- },
-
- _makeResizable: function() {
- var that = this,
- options = this.options,
- handles = options.resizable,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css("position"),
- resizeHandles = typeof handles === "string" ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass("ui-dialog-resizing");
- that._blockFrames();
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- options.height = $( this ).height();
- options.width = $( this ).width();
- $( this ).removeClass("ui-dialog-resizing");
- that._unblockFrames();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- }
- })
- .css( "position", position );
- },
-
- _minHeight: function() {
- var options = this.options;
-
- return options.height === "auto" ?
- options.minHeight :
- Math.min( options.minHeight, options.height );
- },
-
- _position: function() {
- // Need to show the dialog to get the actual offset in the position plugin
- var isVisible = this.uiDialog.is(":visible");
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( this.options.position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resize = false,
- resizableOptions = {};
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- this._position();
- }
- if ( this.uiDialog.is(":data(ui-resizable)") ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- /*jshint maxcomplexity:15*/
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- if ( key === "dialogClass" ) {
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( value );
- }
-
- if ( key === "disabled" ) {
- return;
- }
-
- this._super( key, value );
-
- if ( key === "appendTo" ) {
- this.uiDialog.appendTo( this._appendTo() );
- }
-
- if ( key === "buttons" ) {
- this._createButtons();
- }
-
- if ( key === "closeText" ) {
- this.uiDialogTitlebarClose.button({
- // Ensure that we always pass a string
- label: "" + value
- });
- }
-
- if ( key === "draggable" ) {
- isDraggable = uiDialog.is(":data(ui-draggable)");
- if ( isDraggable && !value ) {
- uiDialog.draggable("destroy");
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- }
-
- if ( key === "position" ) {
- this._position();
- }
-
- if ( key === "resizable" ) {
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is(":data(ui-resizable)");
- if ( isResizable && !value ) {
- uiDialog.resizable("destroy");
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable();
- }
- }
-
- if ( key === "title" ) {
- this._title( this.uiDialogTitlebar.find(".ui-dialog-title") );
- }
- },
-
- _size: function() {
- // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- // divs will both have width and height set, so we need to reset them
- var nonContentHeight, minContentHeight, maxContentHeight,
- options = this.options;
-
- // Reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- maxHeight: "none",
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
- maxContentHeight = typeof options.maxHeight === "number" ?
- Math.max( 0, options.maxHeight - nonContentHeight ) :
- "none";
-
- if ( options.height === "auto" ) {
- this.element.css({
- minHeight: minContentHeight,
- maxHeight: maxContentHeight,
- height: "auto"
- });
- } else {
- this.element.height( Math.max( 0, options.height - nonContentHeight ) );
- }
-
- if (this.uiDialog.is(":data(ui-resizable)") ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- },
-
- _blockFrames: function() {
- this.iframeBlocks = this.document.find( "iframe" ).map(function() {
- var iframe = $( this );
-
- return $( "<div>" )
- .css({
- position: "absolute",
- width: iframe.outerWidth(),
- height: iframe.outerHeight()
- })
- .appendTo( iframe.parent() )
- .offset( iframe.offset() )[0];
- });
- },
-
- _unblockFrames: function() {
- if ( this.iframeBlocks ) {
- this.iframeBlocks.remove();
- delete this.iframeBlocks;
- }
- },
-
- _allowInteraction: function( event ) {
- if ( $( event.target ).closest(".ui-dialog").length ) {
- return true;
- }
-
- // TODO: Remove hack when datepicker implements
- // the .ui-front logic (#8989)
- return !!$( event.target ).closest(".ui-datepicker").length;
- },
-
- _createOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- var that = this,
- widgetFullName = this.widgetFullName;
- if ( !$.ui.dialog.overlayInstances ) {
- // Prevent use of anchors and inputs.
- // We use a delay in case the overlay is created from an
- // event that we're going to be cancelling. (#2804)
- this._delay(function() {
- // Handle .dialog().dialog("close") (#4065)
- if ( $.ui.dialog.overlayInstances ) {
- this.document.bind( "focusin.dialog", function( event ) {
- if ( !that._allowInteraction( event ) ) {
- event.preventDefault();
- $(".ui-dialog:visible:last .ui-dialog-content")
- .data( widgetFullName )._focusTabbable();
- }
- });
- }
- });
- }
-
- this.overlay = $("<div>")
- .addClass("ui-widget-overlay ui-front")
- .appendTo( this._appendTo() );
- this._on( this.overlay, {
- mousedown: "_keepFocus"
- });
- $.ui.dialog.overlayInstances++;
- },
-
- _destroyOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- if ( this.overlay ) {
- $.ui.dialog.overlayInstances--;
-
- if ( !$.ui.dialog.overlayInstances ) {
- this.document.unbind( "focusin.dialog" );
- }
- this.overlay.remove();
- this.overlay = null;
- }
- }
-});
-
-$.ui.dialog.overlayInstances = 0;
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // position option with array notation
- // just override with old implementation
- $.widget( "ui.dialog", $.ui.dialog, {
- _position: function() {
- var position = this.options.position,
- myAt = [],
- offset = [ 0, 0 ],
- isVisible;
-
- if ( position ) {
- if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
- myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
- if ( myAt.length === 1 ) {
- myAt[1] = myAt[0];
- }
-
- $.each( [ "left", "top" ], function( i, offsetPosition ) {
- if ( +myAt[ i ] === myAt[ i ] ) {
- offset[ i ] = myAt[ i ];
- myAt[ i ] = offsetPosition;
- }
- });
-
- position = {
- my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
- myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
- at: myAt.join(" ")
- };
- }
-
- position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
- } else {
- position = $.ui.dialog.prototype.options.position;
- }
-
- // need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is(":visible");
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- }
- });
-}
-
-}( jQuery ) );
-
-(function( $, undefined ) {
-
-var rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/;
-
-$.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( ! motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-})( jQuery );
-
-(function( $, undefined ) {
-
-$.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-$.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || ["middle","center"];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-$.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function(){
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round(o.duration/anims),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop ,
- left: endPosition.left - fixLeft ,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( "<div class='ui-effects-transfer'></div>" )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop ,
- left: startPosition.left - fixLeft ,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.widget( "ui.menu", {
- version: "1.10.3",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- menus: "ul",
- position: {
- my: "left top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
- // flag used to prevent firing of the click handler
- // as the event bubbles up through nested menus
- this.mouseHandled = false;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- })
- // need to catch all clicks on disabled menu
- // not possible through _on
- .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
- if ( this.options.disabled ) {
- event.preventDefault();
- }
- }, this ));
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-state-disabled > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item:has(a)": function( event ) {
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- this.mouseHandled = true;
-
- this.select( event );
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) ) {
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( !$( event.target ).closest( ".ui-menu" ).length ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- this.mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).addBack()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .children( "a" )
- .removeUniqueId()
- .removeClass( "ui-corner-all ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- /*jshint maxcomplexity:20*/
- var match, prev, character, skip, regex,
- preventDefault = true;
-
- function escape( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- }
-
- if ( match.length ) {
- this.focus( event, match );
- if ( match.length > 1 ) {
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.prev( "a" ),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
-
- // Don't refresh list items that are already adapted
- menus.children( ":not(.ui-menu-item):has(a)" )
- .addClass( "ui-menu-item" )
- .attr( "role", "presentation" )
- .children( "a" )
- .uniqueId()
- .addClass( "ui-corner-all" )
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
- menus.children( ":not(.ui-menu-item)" ).each(function() {
- var item = $( this );
- // hyphen, em dash, en dash
- if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Add aria-disabled attribute to any disabled menu item
- menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.element.find( ".ui-menu-icon" )
- .removeClass( this.options.icons.submenu )
- .addClass( value.submenu );
- }
- this._super( key, value );
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.children( "a" ).addClass( "ui-state-focus" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .children( "a:first" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.height();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.children( "a" ).removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( "a.ui-state-active" )
- .removeClass( "ui-state-active" );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .children( ".ui-menu-item" )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- }
-});
-
-}( jQuery ));
-
-(function( $, undefined ) {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-function getDimensions( elem ) {
- var raw = elem[0];
- if ( raw.nodeType === 9 ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: 0, left: 0 }
- };
- }
- if ( $.isWindow( raw ) ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
- };
- }
- if ( raw.preventDefault ) {
- return {
- width: 0,
- height: 0,
- offset: { top: raw.pageY, left: raw.pageX }
- };
- }
- return {
- width: elem.outerWidth(),
- height: elem.outerHeight(),
- offset: elem.offset()
- };
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
- return {
- element: withinElement,
- isWindow: isWindow,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- dimensions = getDimensions( target );
- if ( target[0].preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- }
- targetWidth = dimensions.width;
- targetHeight = dimensions.height;
- targetOffset = dimensions.offset;
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !$.support.offsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem : elem
- });
- }
- });
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-}( jQuery ) );
-
-(function( $, undefined ) {
-
-$.widget( "ui.progressbar", {
- version: "1.10.3",
- options: {
- max: 100,
- value: 0,
-
- change: null,
- complete: null
- },
-
- min: 0,
-
- _create: function() {
- // Constrain initial value
- this.oldValue = this.options.value = this._constrainedValue();
-
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- // Only set static values, aria-valuenow and aria-valuemax are
- // set inside _refreshValue()
- role: "progressbar",
- "aria-valuemin": this.min
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this.options.value;
- }
-
- this.options.value = this._constrainedValue( newValue );
- this._refreshValue();
- },
-
- _constrainedValue: function( newValue ) {
- if ( newValue === undefined ) {
- newValue = this.options.value;
- }
-
- this.indeterminate = newValue === false;
-
- // sanitize value
- if ( typeof newValue !== "number" ) {
- newValue = 0;
- }
-
- return this.indeterminate ? false :
- Math.min( this.options.max, Math.max( this.min, newValue ) );
- },
-
- _setOptions: function( options ) {
- // Ensure "value" option is set after other values (like max)
- var value = options.value;
- delete options.value;
-
- this._super( options );
-
- this.options.value = this._constrainedValue( value );
- this._refreshValue();
- },
-
- _setOption: function( key, value ) {
- if ( key === "max" ) {
- // Don't allow a max less than min
- value = Math.max( this.min, value );
- }
-
- this._super( key, value );
- },
-
- _percentage: function() {
- return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
- },
-
- _refreshValue: function() {
- var value = this.options.value,
- percentage = this._percentage();
-
- this.valueDiv
- .toggle( this.indeterminate || value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
-
- this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
-
- if ( this.indeterminate ) {
- this.element.removeAttr( "aria-valuenow" );
- if ( !this.overlayDiv ) {
- this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
- }
- } else {
- this.element.attr({
- "aria-valuemax": this.options.max,
- "aria-valuenow": value
- });
- if ( this.overlayDiv ) {
- this.overlayDiv.remove();
- this.overlayDiv = null;
- }
- }
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
- if ( value === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-});
-
-})( jQuery );
-
-(function( $, undefined ) {
-
-// number of pages in a slider
-// (how many times can you page up/down to go through the whole range)
-var numPages = 5;
-
-$.widget( "ui.slider", $.ui.mouse, {
- version: "1.10.3",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null,
-
- // callbacks
- change: null,
- slide: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all");
-
- this._refresh();
- this._setOption( "disabled", this.options.disabled );
-
- this._animateOff = false;
- },
-
- _refresh: function() {
- this._createRange();
- this._createHandles();
- this._setupEvents();
- this._refreshValue();
- },
-
- _createHandles: function() {
- var i, handleCount,
- options = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
- handles = [];
-
- handleCount = ( options.values && options.values.length ) || 1;
-
- if ( existingHandles.length > handleCount ) {
- existingHandles.slice( handleCount ).remove();
- existingHandles = existingHandles.slice( 0, handleCount );
- }
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
- },
-
- _createRange: function() {
- var options = this.options,
- classes = "";
-
- if ( options.range ) {
- if ( options.range === true ) {
- if ( !options.values ) {
- options.values = [ this._valueMin(), this._valueMin() ];
- } else if ( options.values.length && options.values.length !== 2 ) {
- options.values = [ options.values[0], options.values[0] ];
- } else if ( $.isArray( options.values ) ) {
- options.values = options.values.slice(0);
- }
- }
-
- if ( !this.range || !this.range.length ) {
- this.range = $( "<div></div>" )
- .appendTo( this.element );
-
- classes = "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header ui-corner-all";
- } else {
- this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
- // Handle range switching from true to min/max
- .css({
- "left": "",
- "bottom": ""
- });
- }
-
- this.range.addClass( classes +
- ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
- } else {
- this.range = $([]);
- }
- },
-
- _setupEvents: function() {
- var elements = this.handles.add( this.range ).filter( "a" );
- this._off( elements );
- this._on( elements, this._handleEvents );
- this._hoverable( elements );
- this._focusable( elements );
- },
-
- _destroy: function() {
- this.handles.remove();
- this.range.remove();
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if (( distance > thisDistance ) ||
- ( distance === thisDistance &&
- (i === that._lastChangedValue || that.values(i) === o.min ))) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal, true );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- //store the last changed value index for reference when handles overlap
- this._lastChangedValue = index;
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( key === "range" && this.options.range === true ) {
- if ( value === "min" ) {
- this.options.value = this._values( 0 );
- this.options.values = null;
- } else if ( value === "max" ) {
- this.options.value = this._values( this.options.values.length-1 );
- this.options.values = null;
- }
- }
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- $.Widget.prototype._setOption.apply( this, arguments );
-
- switch ( key ) {
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "min":
- case "max":
- this._animateOff = true;
- this._refreshValue();
- this._animateOff = false;
- break;
- case "range":
- this._animateOff = true;
- this._refresh();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else if ( this.options.values && this.options.values.length ) {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i+= 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- } else {
- return [];
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.options.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- },
-
- _handleEvents: {
- keydown: function( event ) {
- /*jshint maxcomplexity:25*/
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- click: function( event ) {
- event.preventDefault();
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- }
-
-});
-
-}(jQuery));
-
-(function( $ ) {
-
-function modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-$.widget( "ui.spinner", {
- version: "1.10.3",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // format the value, but don't constrain
- this._value( this.element.val(), true );
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._stop();
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
- if ( key === "icons" ) {
- this.buttons.first().find( ".ui-icon" )
- .removeClass( this.options.icons.up )
- .addClass( value.up );
- this.buttons.last().find( ".ui-icon" )
- .removeClass( this.options.icons.down )
- .addClass( value.down );
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- this.buttons.button( "disable" );
- } else {
- this.element.prop( "disabled", false );
- this.buttons.button( "enable" );
- }
- }
- },
-
- _setOptions: modifier(function( options ) {
- this._super( options );
- this._value( this.element.val() );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * this.options.step );
- this._stop();
- }
- },
-
- stepDown: modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * -this.options.step );
- this._stop();
- }
- },
-
- pageUp: modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-}( jQuery ) );
-
-(function( $, undefined ) {
-
-var tabId = 0,
- rhash = /#.*$/;
-
-function getNextTabId() {
- return ++tabId;
-}
-
-function isLocal( anchor ) {
- return anchor.hash.length > 1 &&
- decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
- decodeURIComponent( location.href.replace( rhash, "" ) );
-}
-
-$.widget( "ui.tabs", {
- version: "1.10.3",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _create: function() {
- var that = this,
- options = this.options;
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible )
- // Prevent users from focusing disabled tabs via click
- .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this._processTabs();
- options.active = this._initialActive();
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _initialActive: function() {
- var active = this.options.active,
- collapsible = this.options.collapsible,
- locationHash = location.hash.substring( 1 );
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = collapsible ? false : 0;
- }
- }
-
- // don't allow collapsible: false and active: false
- if ( !collapsible && active === false && this.anchors.length ) {
- active = 0;
- }
-
- return active;
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- /*jshint maxcomplexity:15*/
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control key will prevent automatic activation
- if ( !event.ctrlKey ) {
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _tabId: function( tab ) {
- return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" );
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( isLocal( anchor ) ) {
- selector = anchor.hash;
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- panelId = that._tabId( tab );
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": selector.substring( 1 ),
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {
- click: function( event ) {
- event.preventDefault();
- }
- };
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- maxHeight -= this.element.outerHeight() - this.element.height();
-
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- eventData.oldTab.attr( "aria-selected", "false" );
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- eventData.newTab.attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li
- .attr( "aria-controls", prev )
- .removeData( "ui-tabs-aria-controls" );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- };
-
- // not remote
- if ( isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .success(function( response ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
- }, 1 );
- })
- .complete(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- }, 1 );
- });
- }
- },
-
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-})( jQuery );
-
-(function( $ ) {
-
-var increments = 0;
-
-function addDescribedBy( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
-}
-
-function removeDescribedBy( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
-}
-
-$.widget( "ui.tooltip", {
- version: "1.10.3",
- options: {
- content: function() {
- // support: IE<9, Opera in jQuery <1.7
- // .text() can't accept undefined, so coerce to a string
- var title = $( this ).attr( "title" ) || "";
- // Escape title, since we're going from an attribute to raw HTML
- return $( "<a>" ).text( title ).html();
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, element ) {
- that._updateContent( element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .attr( "title", "" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
- // ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltip, events, delayedShow,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltip = this._find( target );
- if ( tooltip.length ) {
- tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltip = this._tooltip( target );
- addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = this.delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
-
- events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- },
- remove: function() {
- this._removeTooltip( tooltip );
- }
- };
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltip = this._find( target );
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( this.closing ) {
- return;
- }
-
- // Clear the interval for delayed tracking tooltips
- clearInterval( this.delayedShow );
-
- // only set title if we had one before (see comment in _open())
- if ( target.data( "ui-tooltip-title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- removeDescribedBy( target );
-
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
- // Remove 'remove' binding only on delegated targets
- if ( target[0] !== this.element[0] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- this.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- this.closing = false;
- },
-
- _tooltip: function( element ) {
- var id = "ui-tooltip-" + increments++,
- tooltip = $( "<div>" )
- .attr({
- id: id,
- role: "tooltip"
- })
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) );
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
- tooltip.appendTo( this.document[0].body );
- this.tooltips[ id ] = element;
- return tooltip;
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? $( "#" + id ) : $();
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- element.removeData( "ui-tooltip-title" );
- }
- });
- }
-});
-
-}( jQuery ) );
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
new file mode 100644
index 0000000000..2793225d0c
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -0,0 +1,400 @@
+"use strict"
+
+function layerDetailsPageInit (ctx) {
+
+ var layerDepInput = $("#layer-dep-input");
+ var layerDepBtn = $("#add-layer-dependency-btn");
+ var layerDepsList = $("#layer-deps-list");
+ var currentLayerDepSelection;
+ var addRmLayerBtn = $("#add-remove-layer-btn");
+
+ /* setup the dependencies typeahead */
+ libtoaster.makeTypeahead(layerDepInput, ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" }, function(item){
+ currentLayerDepSelection = item;
+
+ layerDepBtn.removeAttr("disabled");
+ });
+
+ function addRemoveDep(depLayerId, add, doneCb) {
+ var data = { layer_version_id : ctx.layerVersion.id };
+ if (add)
+ data.add_dep = depLayerId;
+ else
+ data.rm_dep = depLayerId;
+
+ $.ajax({
+ type: "POST",
+ url: ctx.xhrUpdateLayerUrl,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (data) {
+ if (data.error != "ok") {
+ console.warn(data.error);
+ } else {
+ doneCb();
+ }
+ },
+ error: function (data) {
+ console.warn("Call failed");
+ console.warn(data);
+ }
+ });
+ }
+
+ function layerRemoveClick() {
+ var toRemove = $(this).parent().data('layer-id');
+ var layerDepItem = $(this);
+
+ addRemoveDep(toRemove, false, function(){
+ layerDepItem.parent().fadeOut(function (){
+ layerDepItem.remove();
+ });
+ });
+ }
+
+ /* Add dependency layer button click handler */
+ layerDepBtn.click(function(){
+ if (currentLayerDepSelection == undefined)
+ return;
+
+ addRemoveDep(currentLayerDepSelection.id, true, function(){
+ /* Make a list item for the new layer dependency */
+ var newLayerDep = $("<li><a></a><span class=\"icon-trash\" data-toggle=\"tooltip\" title=\"Delete\"></span></li>");
+
+ newLayerDep.data('layer-id', currentLayerDepSelection.id);
+ newLayerDep.children("span").tooltip();
+
+ var link = newLayerDep.children("a");
+ link.attr("href", ctx.layerDetailsUrl+String(currentLayerDepSelection.id));
+ link.text(currentLayerDepSelection.name);
+ link.tooltip({title: currentLayerDepSelection.tooltip, placement: "right"});
+
+ /* Connect up the tash icon */
+ var trashItem = newLayerDep.children("span");
+ trashItem.click(layerRemoveClick);
+
+ layerDepsList.append(newLayerDep);
+ /* Clear the current selection */
+ layerDepInput.val("");
+ currentLayerDepSelection = undefined;
+ layerDepBtn.attr("disabled","disabled");
+ });
+ });
+
+ $(".icon-pencil").click(function (){
+ var mParent = $(this).parent("dd");
+ mParent.prev().css("margin-top", "10px");
+ mParent.children("form").slideDown();
+ var currentVal = mParent.children(".current-value");
+ currentVal.hide();
+ /* Set the current value to the input field */
+ mParent.find("textarea,input").val(currentVal.text());
+ /* Hides the "Not set" text */
+ mParent.children(".muted").hide();
+ /* We're editing so hide the delete icon */
+ mParent.children(".delete-current-value").hide();
+ mParent.find(".cancel").show();
+ $(this).hide();
+ });
+
+ $(".delete-current-value").click(function(){
+ var mParent = $(this).parent("dd");
+ mParent.find("input").val("");
+ mParent.find("textarea").val("");
+ mParent.find(".change-btn").click();
+ });
+
+ $(".cancel").click(function(){
+ var mParent = $(this).parents("dd");
+ $(this).hide();
+ mParent.children("form").slideUp(function(){
+ mParent.children(".current-value").show();
+ /* Show the "Not set" text if we ended up with no value */
+ if (!mParent.children(".current-value").html()){
+ mParent.children(".muted").fadeIn();
+ mParent.children(".delete-current-value").hide();
+ } else {
+ mParent.children(".delete-current-value").show();
+ }
+
+ mParent.children(".icon-pencil").show();
+ mParent.prev().css("margin-top", "0px");
+ });
+ });
+
+ $(".build-target-btn").click(function(){
+ /* fire a build */
+ var target = $(this).data('target-name');
+ libtoaster.startABuild(ctx.projectBuildUrl, ctx.projectId, target, null, null);
+ window.location.replace(ctx.projectPageUrl);
+ });
+
+ $(".select-machine-btn").click(function(){
+ var data = { machineName : $(this).data('machine-name') };
+ libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
+ function (){
+ window.location.replace(ctx.projectPageUrl);
+ }, null);
+ });
+
+ function defaultAddBtnText(){
+ var text = " Add the "+ctx.layerVersion.name+" layer to your project";
+ addRmLayerBtn.text(text);
+ addRmLayerBtn.prepend("<span class=\"icon-plus\"></span>");
+ addRmLayerBtn.removeClass("btn-danger");
+ }
+
+ $("#details-tab").on('show', function(){
+ if (!ctx.layerVersion.inCurrentPrj)
+ defaultAddBtnText();
+
+ window.location.hash = "details";
+ });
+
+ function targetsTabShow(){
+ if (!ctx.layerVersion.inCurrentPrj){
+ if (ctx.numTargets > 0) {
+ var text = " Add the "+ctx.layerVersion.name+" layer to your project "+
+ "to enable these targets";
+ addRmLayerBtn.text(text);
+ addRmLayerBtn.prepend("<span class=\"icon-plus\"></span>");
+ } else {
+ defaultAddBtnText();
+ }
+ }
+
+ window.location.hash = "targets";
+ }
+
+ $("#targets-tab").on('show', targetsTabShow);
+
+ function machinesTabShow(){
+ if (!ctx.layerVersion.inCurrentPrj) {
+ if (ctx.numMachines > 0){
+ var text = " Add the "+ctx.layerVersion.name+" layer to your project " +
+ "to enable these machines";
+ addRmLayerBtn.text(text);
+ addRmLayerBtn.prepend("<span class=\"icon-plus\"></span>");
+ } else {
+ defaultAddBtnText();
+ }
+ }
+
+ window.location.hash = "machines";
+ }
+
+ $("#machines-tab").on('show', machinesTabShow);
+
+ $(".pagesize").change(function(){
+ var search = libtoaster.parseUrlParams();
+ search.limit = this.value;
+
+ window.location.search = libtoaster.dumpsUrlParams(search);
+ });
+
+ /* Enables the Build target and Select Machine buttons and switches the
+ * add/remove button
+ */
+ function setLayerInCurrentPrj(added, depsList) {
+ ctx.layerVersion.inCurrentPrj = added;
+ var alertMsg = $("#alert-msg");
+ /* Reset alert message */
+ alertMsg.text("");
+
+ if (added){
+ /* enable and switch all the button states */
+ $(".build-target-btn").removeAttr("disabled");
+ $(".select-machine-btn").removeAttr("disabled");
+ addRmLayerBtn.addClass("btn-danger");
+ addRmLayerBtn.data('directive', "remove");
+ addRmLayerBtn.text(" Delete the "+ctx.layerVersion.name+" layer from your project");
+ addRmLayerBtn.prepend("<span class=\"icon-trash\"></span>");
+
+ if (depsList) {
+ alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span> and its dependencies ");
+
+ /* Build the layer deps list */
+ depsList.map(function(layer, i){
+ var link = $("<a></a>");
+
+ link.attr("href", layer.layerdetailurl);
+ link.text(layer.name);
+ link.tooltip({title: layer.tooltip});
+
+ if (i != 0)
+ alertMsg.append(", ");
+
+ alertMsg.append(link);
+ });
+ } else {
+ alertMsg.append("You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span>");
+ }
+ } else {
+ /* disable and switch all the button states */
+ $(".build-target-btn").attr("disabled","disabled");
+ $(".select-machine-btn").attr("disabled", "disabled");
+ addRmLayerBtn.removeClass("btn-danger");
+ addRmLayerBtn.data('directive', "add");
+
+ /* "special" handler so that we get the correct button text which depends
+ * on which tab is currently visible. Unfortunately we can't just call
+ * tab('show') as if it's already visible it doesn't run the event.
+ */
+ switch ($(".nav-pills .active a").prop('id')){
+ case 'machines-tab':
+ machinesTabShow();
+ break;
+ case 'targets-tab':
+ targetsTabShow();
+ break;
+ default:
+ defaultAddBtnText();
+ break;
+ }
+
+ alertMsg.append("You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span>");
+ }
+
+ alertMsg.children("#layer-affected-name").html("<strong>" + ctx.layerVersion.name + "</strong>");
+ alertMsg.children("#project-affected-name").text(ctx.projectName);
+ alertMsg.children("#project-affected-name").attr("href", ctx.projectPageUrl);
+ $("#alert-area").show();
+ }
+
+ /* Add or remove this layer from the project */
+ addRmLayerBtn.click(function() {
+ var directive = $(this).data('directive');
+
+ if (directive == 'add') {
+ /* If adding get the deps for this layer */
+ libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, ctx.layerVersion.id, function (data) {
+ /* got result for dependencies */
+ if (data.list.length == 0){
+ var editData = { layerAdd : ctx.layerVersion.id };
+ libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData,
+ function() {
+ setLayerInCurrentPrj(true);
+ });
+ return;
+ } else {
+ /* The add deps will include this layer so no need to add it
+ * separately.
+ */
+ show_layer_deps_modal(ctx.projectId, ctx.layerVersion, data.list, null, null, true, function () {
+ /* Success add deps and layer */
+ setLayerInCurrentPrj(true, data.list);
+ });
+ }
+ }, null);
+ } else if (directive == 'remove') {
+ var editData = { layerDel : ctx.layerVersion.id };
+
+ libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData,
+ function () {
+ /* Success removed layer */
+ //window.location.reload();
+ setLayerInCurrentPrj(false);
+ }, function () {
+ console.warn ("Removing layer from project failed");
+ });
+ }
+ });
+
+ /* Handler for all of the Change buttons */
+ $(".change-btn").click(function(){
+ var mParent = $(this).parent();
+ var prop = $(this).data('layer-prop');
+
+ /* We have inputs, select and textareas to potentially grab the value
+ * from.
+ */
+ var entryElement = mParent.find("input");
+ if (entryElement.length == 0)
+ entryElement = mParent.find("textarea");
+ if (entryElement.length == 0) {
+ console.warn("Could not find element to get data from for this change");
+ return;
+ }
+
+ var data = { layer_version_id: ctx.layerVersion.id };
+ data[prop] = entryElement.val();
+
+ $.ajax({
+ type: "POST",
+ url: ctx.xhrUpdateLayerUrl,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (data) {
+ if (data.error != "ok") {
+ console.warn(data.error);
+ } else {
+ /* success layer property changed */
+ var inputArea = mParent.parents("dd");
+ var text;
+
+ text = entryElement.val();
+
+ /* Hide the "Not set" text if it's visible */
+ inputArea.find(".muted").hide();
+ inputArea.find(".current-value").text(text);
+ /* Same behaviour as cancel in that we hide the form/show current
+ * value.
+ */
+ inputArea.find(".cancel").click();
+ }
+ },
+ error: function (data) {
+ console.warn("Call failed");
+ console.warn(data);
+ }
+ });
+ });
+
+ /* Disable the change button when we have no data in the input */
+ $("dl input, dl textarea").keyup(function() {
+ if ($(this).val().length == 0)
+ $(this).parent().children(".change-btn").attr("disabled", "disabled");
+ else
+ $(this).parent().children(".change-btn").removeAttr("disabled");
+ });
+
+ /* This checks to see if the dt's dd has data in it or if the change data
+ * form is visible, otherwise hide it
+ */
+ $("dl").children().each(function (){
+ if ($(this).is("dt")) {
+ var dd = $(this).next("dd");
+ if (!dd.children("form:visible")|| !dd.find(".current-value").html()){
+ if (ctx.layerVersion.sourceId == 3){
+ /* There's no current value and the layer is editable
+ * so show the "Not set" and hide the delete icon
+ */
+ dd.find(".muted").show();
+ dd.find(".delete-current-value").hide();
+ } else {
+ /* We're not viewing an editable layer so hide the empty dd/dl pair */
+ $(this).hide();
+ dd.hide();
+ }
+ }
+ }
+ });
+
+ /* Clear the current search selection and reload the results */
+ $(".target-search-clear").click(function(){
+ $("#target-search").val("");
+ $(this).parents("form").submit();
+ });
+
+ $(".machine-search-clear").click(function(){
+ $("#machine-search").val("");
+ $(this).parents("form").submit();
+ });
+
+
+ layerDepsList.find(".icon-trash").click(layerRemoveClick);
+ layerDepsList.find("a").tooltip();
+ $(".icon-trash").tooltip();
+ $(".commit").tooltip();
+
+}
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
new file mode 100644
index 0000000000..04264cd8ba
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -0,0 +1,387 @@
+
+/* All shared functionality to go in libtoaster object.
+ * This object really just helps readability since we can then have
+ * a traceable namespace.
+ */
+var libtoaster = (function (){
+
+ /* makeTypeahead parameters
+ * elementSelector: JQuery elementSelector string
+ * xhrUrl: the url to get the JSON from expects JSON in the form:
+ * { "list": [ { "name": "test", "detail" : "a test thing" }, .... ] }
+ * xhrParams: the data/parameters to pass to the getJSON url e.g.
+ * { 'type' : 'projects' } the text typed will be passed as 'value'.
+ * selectedCB: function to call once an item has been selected one
+ * arg of the item.
+ */
+ function _makeTypeahead (jQElement, xhrUrl, xhrParams, selectedCB) {
+
+ jQElement.typeahead({
+ source: function(query, process){
+ xhrParams.value = query;
+ $.getJSON(xhrUrl, this.options.xhrParams, function(data){
+ if (data.error != "ok") {
+ console.log("Error getting data from server "+data.error);
+ return;
+ }
+
+ return process (data.list);
+ });
+ },
+ updater: function(item) {
+ var itemObj = this.$menu.find('.active').data('itemObject');
+ selectedCB(itemObj);
+ return item;
+ },
+ matcher: function(item) { return ~item.name.toLowerCase().indexOf(this.query.toLowerCase()); },
+ highlighter: function (item) {
+ if (item.hasOwnProperty('detail'))
+ /* Use jquery to escape the value as text into a span */
+ return $('<span></span>').text(item.name+' '+item.detail).get(0);
+ return $('<span></span>').text(item.name).get(0);
+ },
+ sorter: function (items) { return items; },
+ xhrUrl: xhrUrl,
+ xhrParams: xhrParams,
+ });
+
+
+ /* Copy of bootstrap's render func but sets selectedObject value */
+ function customRenderFunc (items) {
+ var that = this;
+
+ items = $(items).map(function (i, item) {
+ i = $(that.options.item).attr('data-value', item.name).data('itemObject', item);
+ i.find('a').html(that.highlighter(item));
+ return i[0];
+ });
+
+ items.first().addClass('active');
+ this.$menu.html(items);
+ return this;
+ }
+
+ jQElement.data('typeahead').render = customRenderFunc;
+ };
+
+ /*
+ * url - the url of the xhr build */
+ function _startABuild (url, project_id, targets, onsuccess, onfail) {
+ var data;
+
+ if (project_id)
+ data = 'project_id='+project_id+'&targets='+targets;
+ else
+ data = 'targets='+targets;
+
+ $.ajax( {
+ type: "POST",
+ url: url,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ console.warn("Call failed");
+ console.warn(_data);
+ if (onfail) onfail(data);
+ } });
+ };
+
+ /* Get a project's configuration info */
+ function _getProjectInfo(url, projectId, onsuccess, onfail){
+ $.ajax({
+ type: "POST",
+ url: url,
+ data: { project_id : projectId },
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ console.warn(_data);
+ if (onfail) onfail(data);
+ }
+ });
+ };
+
+ /* Properties for data can be:
+ * layerDel (csv)
+ * layerAdd (csv)
+ * projectName
+ * projectVersion
+ * machineName
+ */
+ function _editProject(url, projectId, data, onSuccess, onFail){
+ $.ajax({
+ type: "POST",
+ url: url,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (data) {
+ if (data.error != "ok") {
+ console.log(data.error);
+ if (onFail != undefined)
+ onFail(data);
+ } else {
+ if (onSuccess != undefined)
+ onSuccess(data);
+ }
+ },
+ error: function (data) {
+ console.log("Call failed");
+ console.log(data);
+ }
+ });
+ };
+
+ function _getLayerDepsForProject(xhrDataTypeaheadUrl, projectId, layerId, onSuccess, onFail){
+ /* Check for dependencies not in the current project */
+ $.getJSON(xhrDataTypeaheadUrl,
+ { type: 'layerdeps', 'value': layerId , project_id: projectId },
+ function(data) {
+ if (data.error != "ok") {
+ console.log(data.error);
+ if (onFail != undefined)
+ onFail(data);
+ } else {
+ onSuccess(data);
+ }
+ }, function() {
+ console.log("E: Failed to make request");
+ });
+ };
+
+ /* parses the query string of the current window.location to an object */
+ function _parseUrlParams() {
+ string = window.location.search
+ string = string.substr(1);
+ stringArray = string.split ("&");
+ obj = {};
+
+ for (i in stringArray) {
+ keyVal = stringArray[i].split ("=");
+ obj[keyVal[0]] = keyVal[1];
+ }
+
+ return obj;
+ };
+
+ /* takes a flat object and outputs it as a query string
+ * e.g. the output of dumpsUrlParams
+ */
+ function _dumpsUrlParams(obj) {
+ var str = "?";
+
+ for (key in obj){
+ if (!obj[key])
+ continue;
+
+ str += key+ "="+obj[key].toString();
+ str += "&";
+ }
+
+ return str;
+ };
+
+
+ return {
+ reload_params : reload_params,
+ startABuild : _startABuild,
+ makeTypeahead : _makeTypeahead,
+ getProjectInfo: _getProjectInfo,
+ getLayerDepsForProject : _getLayerDepsForProject,
+ editProject : _editProject,
+ debug: false,
+ parseUrlParams : _parseUrlParams,
+ dumpsUrlParams : _dumpsUrlParams,
+ }
+})();
+
+/* keep this in the global scope for compatability */
+function reload_params(params) {
+ uri = window.location.href;
+ splitlist = uri.split("?");
+ url = splitlist[0], parameters=splitlist[1];
+ // deserialize the call parameters
+ if(parameters){
+ cparams = parameters.split("&");
+ }else{
+ cparams = []
+ }
+ nparams = {}
+ for (i = 0; i < cparams.length; i++) {
+ temp = cparams[i].split("=");
+ nparams[temp[0]] = temp[1];
+ }
+ // update parameter values
+ for (i in params) {
+ nparams[encodeURIComponent(i)] = encodeURIComponent(params[i]);
+ }
+ // serialize the structure
+ callparams = []
+ for (i in nparams) {
+ callparams.push(i+"="+nparams[i]);
+ }
+ window.location.href = url+"?"+callparams.join('&');
+}
+
+
+/* Things that happen for all pages */
+$(document).ready(function() {
+
+ /* If we don't have a console object which might be the case in some
+ * browsers, no-op it to avoid undefined errors.
+ */
+ if (!window.console) {
+ window.console = {};
+ window.console.warn = function() {};
+ window.console.error = function() {};
+ }
+
+ /*
+ * PrettyPrint plugin.
+ *
+ */
+ // Init
+ prettyPrint();
+
+ // Prevent invalid links from jumping page scroll
+ $('a[href=#]').click(function() {
+ return false;
+ });
+
+
+ /* Belen's additions */
+
+ // turn Edit columns dropdown into a multiselect menu
+ $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
+ e.stopPropagation();
+ });
+
+ // enable popovers in any table cells that contain an anchor with the
+ // .btn class applied, and make sure popovers work on click, are mutually
+ // exclusive and they close when your click outside their area
+
+ $('html').click(function(e){
+ $('td > a.btn').popover('hide');
+ });
+
+ $('td > a.btn').popover({
+ html:true,
+ placement:'left',
+ container:'body',
+ trigger:'manual'
+ }).click(function(e){
+ $('td > a.btn').not(this).popover('hide');
+ // ideally we would use 'toggle' here
+ // but it seems buggy in our Bootstrap version
+ $(this).popover('show');
+ e.stopPropagation();
+ });
+
+ // enable tooltips for applied filters
+ $('th a.btn-primary').tooltip({container:'body', html:true, placement:'bottom', delay:{hide:1500}});
+
+ // hide applied filter tooltip when you click on the filter button
+ $('th a.btn-primary').click(function () {
+ $('.tooltip').hide();
+ });
+
+ // enable help information tooltip
+ $(".get-help").tooltip({container:'body', html:true, delay:{show:300}});
+
+ // show help bubble only on hover inside tables
+ $(".hover-help").css("visibility","hidden");
+ $("th, td").hover(function () {
+ $(this).find(".hover-help").css("visibility","visible");
+ });
+ $("th, td").mouseleave(function () {
+ $(this).find(".hover-help").css("visibility","hidden");
+ });
+
+ // show task type and outcome in task details pages
+ $(".task-info").tooltip({ container: 'body', html: true, delay: {show: 200}, placement: 'right' });
+
+ // initialise the tooltips for the icon-pencil icons
+ $(".icon-pencil").tooltip({ container: 'body', html: true, delay: {show: 400}, title: "Change" });
+
+ // linking directly to tabs
+ $(function(){
+ var hash = window.location.hash;
+ hash && $('ul.nav a[href="' + hash + '"]').tab('show');
+
+ $('.nav-tabs a').click(function (e) {
+ $(this).tab('show');
+ $('body').scrollTop();
+ });
+ });
+
+ // toggle for long content (variables, python stack trace, etc)
+ $('.full, .full-hide').hide();
+ $('.full-show').click(function(){
+ $('.full').slideDown(function(){
+ $('.full-hide').show();
+ });
+ $(this).hide();
+ });
+ $('.full-hide').click(function(){
+ $(this).hide();
+ $('.full').slideUp(function(){
+ $('.full-show').show();
+ });
+ });
+
+ //toggle the errors and warnings sections
+ $('.show-errors').click(function() {
+ $('#collapse-errors').addClass('in');
+ });
+ $('.toggle-errors').click(function() {
+ $('#collapse-errors').toggleClass('in');
+ });
+ $('.show-warnings').click(function() {
+ $('#collapse-warnings').addClass('in');
+ });
+ $('.toggle-warnings').click(function() {
+ $('#collapse-warnings').toggleClass('in');
+ });
+ $('.show-exceptions').click(function() {
+ $('#collapse-exceptions').addClass('in');
+ });
+ $('.toggle-exceptions').click(function() {
+ $('#collapse-exceptions').toggleClass('in');
+ });
+
+ //show warnings section when requested from the previous page
+ if (location.href.search('#warnings') > -1) {
+ $('#collapse-warnings').addClass('in');
+ }
+
+ function check_for_duplicate_ids () {
+ /* warn about duplicate element ids */
+ var ids = {};
+ $("[id]").each(function() {
+ if (this.id && ids[this.id]) {
+ console.warn('Duplicate element id #'+this.id);
+ }
+ ids[this.id] = true;
+ });
+ }
+
+ if (libtoaster.debug) {
+ check_for_duplicate_ids();
+ } else {
+ /* Debug is false so supress warnings by overriding the functions */
+ window.console.warn = function () {};
+ window.console.error = function () {};
+ }
+});
diff --git a/bitbake/lib/toaster/toastergui/static/js/main.js b/bitbake/lib/toaster/toastergui/static/js/main.js
deleted file mode 100644
index eef6b468f4..0000000000
--- a/bitbake/lib/toaster/toastergui/static/js/main.js
+++ /dev/null
@@ -1,111 +0,0 @@
-$(document).ready(function() {
-
- /*
- * PrettyPrint plugin.
- *
- */
- // Init
- prettyPrint();
-
- // Prevent invalid links from jumping page scroll
- $('a[href=#]').click(function() {
- return false;
- });
-
-
- /* Belen's additions */
-
- // turn Edit columns dropdown into a multiselect menu
- $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
- e.stopPropagation();
- });
-
- // enable popovers in any table cells that contain an anchor with the
- // .btn class applied, and make sure popovers work on click, are mutually
- // exclusive and they close when your click outside their area
-
- $('html').click(function(e){
- $('td > a.btn').popover('hide');
- });
-
- $('td > a.btn').popover({
- html:true,
- placement:'left',
- container:'body',
- trigger:'manual'
- }).click(function(e){
- $('td > a.btn').not(this).popover('hide');
- // ideally we would use 'toggle' here
- // but it seems buggy in our Bootstrap version
- $(this).popover('show');
- e.stopPropagation();
- });
-
- // enable tooltips for applied filters
- $('th a.btn-primary').tooltip({container:'body', html:true, placement:'bottom', delay:{hide:1500}});
-
- // hide applied filter tooltip when you click on the filter button
- $('th a.btn-primary').click(function () {
- $('.tooltip').hide();
- });
-
- // enable help information tooltip
- $(".get-help").tooltip({container:'body', html:true, delay:{show:300}});
-
- // show help bubble only on hover inside tables
- $(".hover-help").css("visibility","hidden");
- $("th, td").hover(function () {
- $(this).find(".hover-help").css("visibility","visible");
- });
- $("th, td").mouseleave(function () {
- $(this).find(".hover-help").css("visibility","hidden");
- });
-
- // show task type and outcome in task details pages
- $(".task-info").tooltip({ container: 'body', html: true, delay: {show: 200}, placement: 'right' });
-
- // linking directly to tabs
- $(function(){
- var hash = window.location.hash;
- hash && $('ul.nav a[href="' + hash + '"]').tab('show');
-
- $('.nav-tabs a').click(function (e) {
- $(this).tab('show');
- $('body').scrollTop();
- });
- });
-
- // toggle for long content (variables, python stack trace, etc)
- $('.full, .full-hide').hide();
- $('.full-show').click(function(){
- $('.full').slideDown(function(){
- $('.full-hide').show();
- });
- $(this).hide();
- });
- $('.full-hide').click(function(){
- $(this).hide();
- $('.full').slideUp(function(){
- $('.full-show').show();
- });
- });
-
- //toggle the errors and warnings sections
- $('.show-errors').click(function() {
- $('#collapse-errors').addClass('in');
- });
- $('.toggle-errors').click(function() {
- $('#collapse-errors').toggleClass('in');
- });
- $('.show-warnings').click(function() {
- $('#collapse-warnings').addClass('in');
- });
- $('.toggle-warnings').click(function() {
- $('#collapse-warnings').toggleClass('in');
- });
- //show warnings section when requested from the previous page
- if (location.href.search('#warnings') > -1) {
- $('#collapse-warnings').addClass('in');
- }
-
-});
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
new file mode 100644
index 0000000000..bee3c56be2
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
@@ -0,0 +1,807 @@
+// vim: set tabstop=4 expandtab ai:
+// BitBake Toaster Implementation
+//
+// Copyright (C) 2013 Intel Corporation
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+angular_formpost = function($httpProvider) {
+ // Use x-www-form-urlencoded Content-Type
+ // By Ezekiel Victor, http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/, no license, with attribution
+ $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
+
+ /**
+ * The workhorse; converts an object to x-www-form-urlencoded serialization.
+ * @param {Object} obj
+ * @return {String}
+ */
+ var param = function(obj) {
+ var query = '', name, value, fullSubName, subName, subValue, innerObj, i;
+
+ for(name in obj) {
+ value = obj[name];
+
+ if(value instanceof Array) {
+ for(i=0; i<value.length; ++i) {
+ subValue = value[i];
+ fullSubName = name + '[' + i + ']';
+ innerObj = {};
+ innerObj[fullSubName] = subValue;
+ query += param(innerObj) + '&';
+ }
+ }
+ else if(value instanceof Object) {
+ for(subName in value) {
+ subValue = value[subName];
+ fullSubName = name + '[' + subName + ']';
+ innerObj = {};
+ innerObj[fullSubName] = subValue;
+ query += param(innerObj) + '&';
+ }
+ }
+ else if(value !== undefined && value !== null)
+ query += encodeURIComponent(name) + '=' + encodeURIComponent(value) + '&';
+ }
+
+ return query.length ? query.substr(0, query.length - 1) : query;
+ };
+
+ // Override $http service's default transformRequest
+ $httpProvider.defaults.transformRequest = [function(data) {
+ return angular.isObject(data) && String(data) !== '[object File]' ? param(data) : data;
+ }];
+}
+
+
+/**
+ * Helper to execute callback on elements from array differences; useful for incremental UI updating.
+ * @param {Array} oldArray
+ * @param {Array} newArray
+ * @param {function} compareElements
+ * @param {function} onAdded
+ * @param {function} onDeleted
+ *
+ * no return
+ */
+function _diffArrays(existingArray, newArray, compareElements, onAdded, onDeleted ) {
+ var added = [];
+ var removed = [];
+ newArray.forEach( function( newElement, newIndex, _newArray) {
+ var existingIndex = existingArray.findIndex(function ( existingElement, _existingIndex, _existingArray ) {
+ return compareElements(newElement, existingElement);
+ });
+ if (existingIndex < 0 && onAdded) { added.push(newElement); }
+ });
+ existingArray.forEach( function( existingElement, existingIndex, _existingArray) {
+ var newIndex = newArray.findIndex(function ( newElement, _newIndex, _newArray ) {
+ return compareElements(newElement, existingElement);
+ });
+ if (newIndex < 0 && onDeleted) { removed.push(existingElement); }
+ });
+
+ if (onAdded) {
+ added.map(onAdded);
+ }
+
+ if (onDeleted) {
+ removed.map(onDeleted);
+ }
+
+}
+
+// add Array findIndex if not there
+
+if (Array.prototype.findIndex === undefined) {
+ Array.prototype.findIndex = function (callback) {
+ var i = 0;
+ for ( i = 0; i < this.length; i++ )
+ if (callback(this[i], i, this)) return i;
+ return -1;
+ }
+}
+
+var projectApp = angular.module('project', ['ngCookies', 'ngAnimate', 'ui.bootstrap', 'ngRoute', 'ngSanitize'], angular_formpost);
+
+// modify the template tag markers to prevent conflicts with Django
+projectApp.config(function($interpolateProvider) {
+ $interpolateProvider.startSymbol("{[");
+ $interpolateProvider.endSymbol("]}");
+});
+
+
+// add time interval to HH:mm filter
+projectApp.filter('timediff', function() {
+ return function(input) {
+ function pad(j) {
+ if (parseInt(j) < 10) {return "0" + j}
+ return j;
+ }
+ seconds = parseInt(input);
+ minutes = Math.floor(seconds / 60);
+ seconds = seconds - minutes * 60;
+ hours = Math.floor(seconds / 3600);
+ seconds = seconds - hours * 3600;
+ return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds);
+ }
+});
+
+/**
+ * main controller for the project page
+ */
+
+projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $location, $cookies, $cookieStore, $q, $sce, $anchorScroll, $animate, $sanitize) {
+
+ /**
+ * Retrieves text suggestions for text-edit drop down autocomplete boxes
+ */
+
+ $scope.getAutocompleteSuggestions = function(type, currentValue) {
+ var deffered = $q.defer();
+
+ $http({method:"GET", url: $scope.urls.xhr_datatypeahead, params : { type: type, value: currentValue}})
+ .success(function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ deffered.reject(_data.error);
+ }
+ deffered.resolve(_data.list);
+ });
+
+ return deffered.promise;
+ }
+
+ var inXHRcall = false;
+
+ /**
+ * XHR call wrapper that automatically handles errors and auto-updates the page content to reflect project state on server side.
+ */
+ $scope._makeXHRCall = function(callparams) {
+ if (inXHRcall) {
+ if (callparams.data === undefined) {
+ // we simply skip the data refresh calls
+ console.warn("TRC1: race on XHR, aborted");
+ return;
+ } else {
+ // we return a promise that we'll solve by reissuing the command later
+ var delayed = $q.defer();
+ console.warn("TRC2: race on XHR, delayed");
+ $interval(function () {$scope._makeXHRCall(callparams).then(function (d) { delayed.resolve(d); });}, 100, 1);
+
+ return delayed.promise;
+ }
+
+ }
+ var deffered = $q.defer();
+
+ if (undefined === callparams.headers) { callparams.headers = {} };
+ callparams.headers['X-CSRFToken'] = $cookies.csrftoken;
+
+ $http(callparams).success(function(_data, _status, _headers, _config) {
+ if (_data.error != "ok") {
+ console.warn("Failed XHR request (" + _status + "): " + _data.error);
+ console.error("Failed XHR request: ", _data, _status, _headers, _config);
+ // stop refreshing hte page
+ $interval.cancel($scope.pollHandle);
+ deffered.reject(_data.error);
+ }
+ else {
+ if (_data.layers !== undefined) {
+
+ var addedLayers = [];
+ var deletedLayers = [];
+
+ // step 1 - delete entries not found
+ $scope.layers.forEach(function (elem) {
+ if (-1 == _data.layers.findIndex(function (elemX) { return elemX.id == elem.id && elemX.name == elem.name; })) {
+ deletedLayers.push(elem);
+ }
+ });
+ deletedLayers.forEach(function (elem) {
+ $scope.layers.splice($scope.layers.indexOf(elem),1);
+ });
+ // step 2 - merge new entries
+ _data.layers.forEach(function (elem) {
+ var found = false;
+ var i;
+ for (i = 0 ; i < $scope.layers.length; i ++) {
+ if ($scope.layers[i].orderid < elem.orderid) continue;
+ if ($scope.layers[i].orderid == elem.orderid) {
+ found = true; break;
+ }
+ if ($scope.layers[i].orderid > elem.orderid) break;
+ }
+ if (!found) {
+ $scope.layers.splice(i, 0, elem);
+ addedLayers.push(elem);
+ }
+ });
+
+ // step 3 - display alerts.
+ if (addedLayers.length > 0) {
+ $scope.displayAlert($scope.zone2alerts, "You have added <b>"+addedLayers.length+"</b> layer" + ((addedLayers.length>1)?"s: ":": ") + addedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>" }).join(", "), "alert-info");
+ // invalidate error layer data based on current layers
+ $scope.layersForTargets = {};
+ }
+ if (deletedLayers.length > 0) {
+ $scope.displayAlert($scope.zone2alerts, "You have deleted <b>"+deletedLayers.length+"</b> layer" + ((deletedLayers.length>1)?"s: ":": ") + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>" }).join(", "), "alert-info");
+ // invalidate error layer data based on current layers
+ $scope.layersForTargets = {};
+ }
+
+ }
+
+
+ if (_data.builds !== undefined) {
+ var toDelete = [];
+ // step 1 - delete entries not found
+ $scope.builds.forEach(function (elem) {
+ if (-1 == _data.builds.findIndex(function (elemX) { return elemX.id == elem.id && elemX.status == elem.status; })) {
+ toDelete.push(elem);
+ }
+ });
+ toDelete.forEach(function (elem) {
+ $scope.builds.splice($scope.builds.indexOf(elem),1);
+ });
+ // step 2 - merge new entries
+ _data.builds.forEach(function (elem) {
+ var found = false;
+ var i = 0;
+ for (i = 0 ; i < $scope.builds.length; i ++) {
+ if ($scope.builds[i].id > elem.id) continue;
+ if ($scope.builds[i].id == elem.id) { found=true; break;}
+ if ($scope.builds[i].id < elem.id) break;
+ }
+ if (!found) {
+ $scope.builds.splice(i, 0, elem);
+ }
+ });
+ // step 3 - merge "Canceled" builds
+ $scope.canceledBuilds.forEach(function (elem) {
+ // mock the build object
+ var found = false;
+ var i = 0;
+ for (i = 0; i < $scope.builds.length; i ++) {
+ if ($scope.builds[i].id > elem.id) continue;
+ if ($scope.builds[i].id == elem.id) { found=true; break;}
+ if ($scope.builds[i].id < elem.id) break;
+ }
+ if (!found) {
+ $scope.builds.splice(i, 0, elem);
+ }
+ });
+
+ $scope.fetchLayersForTargets();
+ }
+ if (_data.targets !== undefined) {
+ $scope.targets = _data.targets;
+ }
+ if (_data.machine !== undefined) {
+ $scope.machine = _data.machine;
+ }
+ if (_data.user !== undefined) {
+ $scope.user = _data.user;
+ }
+
+ if (_data.prj !== undefined) {
+ $scope.project = _data.prj;
+
+ // update breadcrumb, outside the controller
+ $('#project_name').text($scope.project.name);
+ }
+
+ $scope.validateData();
+ inXHRcall = false;
+ deffered.resolve(_data);
+ }
+ }).error(function(_data, _status, _headers, _config) {
+ if (_status == 0) {
+ // the server has gone away
+ alert("The server is not responding. The application will terminate now")
+ $interval.cancel($scope.pollHandle);
+ }
+ else {
+ console.error("Failed HTTP XHR request: ", _data, _status, _headers, _config);
+ inXHRcall = false;
+ deffered.reject(_data.error);
+ }
+ });
+
+ return deffered.promise;
+ }
+
+ $scope.layeralert = undefined;
+ /**
+ * Verifies and shows user alerts on invalid project data
+ */
+
+ $scope.validateData = function () {
+ if ($scope.layers.length == 0) {
+ $scope.layeralert = $scope.displayAlert($scope.zone1alerts, "You need to add some layers to this project. <a href=\""+$scope.urls.layers+"\">View all layers available in Toaster</a> or <a href=\""+$scope.urls.importlayer+"\">import a layer</a>");
+ } else {
+ if ($scope.layeralert != undefined) {
+ $scope.layeralert.close();
+ $scope.layeralert = undefined;
+ }
+ }
+ }
+
+ $scope.buildExistingTarget = function(targets) {
+ $scope.buildTargetList(targets.map(function(v,i,a){return v.target}));
+ }
+
+ $scope.buildTargetList = function(targetlist) {
+ var oldTargetName = $scope.targetName;
+ $scope.targetName = targetlist.join(' ');
+ $scope.buildNamedTarget();
+ $scope.targetName = oldTargetName;
+ }
+
+ $scope.buildNamedTarget = function(target) {
+ if ($scope.targetName === undefined && $scope.targetName1 === undefined){
+ console.warn("No target defined, please type in a target name");
+ return;
+ }
+
+ $scope.sanitizeTargetName();
+
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_build,
+ data : {
+ targets: $scope.safeTargetName,
+ }
+ }).then(function (data) {
+ console.warn("TRC3: received ", data);
+ $scope.targetName = undefined;
+ $scope.targetName1 = undefined;
+ $location.hash('buildslist');
+ // call $anchorScroll()
+ $anchorScroll();
+ });
+ }
+
+ $scope.sanitizeTargetName = function() {
+ $scope.safeTargetName = undefined;
+ if (undefined === $scope.targetName) $scope.safeTargetName = $scope.targetName1;
+ if (undefined === $scope.targetName1) $scope.safeTargetName = $scope.targetName;
+
+ if (undefined === $scope.safeTargetName) return;
+
+ $scope.safeTargetName = $scope.safeTargetName.replace(/\[.*\]/, '').trim();
+ }
+
+ $scope.buildCancel = function(build) {
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_build,
+ data: {
+ buildCancel: build.id,
+ }
+ }).then( function () {
+ build['status'] = "deleted";
+ $scope.canceledBuilds.push(build);
+ });
+ }
+
+ $scope.buildDelete = function(build) {
+ $scope.canceledBuilds.splice($scope.canceledBuilds.indexOf(build), 1);
+ }
+
+
+ $scope.onLayerSelect = function (item, model, label) {
+ $scope.layerAddId = item.id;
+ }
+
+
+ $scope.layerAddById = function (id) {
+ $scope.layerAddId = id;
+ $scope.layerAdd();
+ }
+
+ $scope.layerAdd = function() {
+
+ $http({method:"GET", url: $scope.urls.xhr_datatypeahead, params : { type: "layerdeps", value: $scope.layerAddId }})
+ .success(function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ if (_data.list.length > 0) {
+ // activate modal
+ var modalInstance = $modal.open({
+ templateUrl: 'dependencies_modal',
+ controller: function ($scope, $modalInstance, items, layerAddName) {
+ $scope.items = items;
+ $scope.layerAddName = layerAddName;
+ $scope.selectedItems = (function () { s = {}; for (var i = 0; i < items.length; i++) { s[items[i].id] = true; };return s; })();
+
+ $scope.ok = function() {
+ console.warn("TRC4: scope selected is ", $scope.selectedItems);
+ $modalInstance.close(Object.keys($scope.selectedItems).filter(function (e) { return $scope.selectedItems[e];}));
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+
+ $scope.update = function() {
+ console.warn("TRC5: updated ", $scope.selectedItems);
+ };
+ },
+ resolve: {
+ items: function () {
+ return _data.list;
+ },
+ layerAddName: function () {
+ return $scope.layerAddName;
+ },
+ }
+ });
+
+ modalInstance.result.then(function (selectedArray) {
+ selectedArray.push($scope.layerAddId);
+ console.warn("TRC6: selected", selectedArray);
+
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_edit,
+ data: {
+ layerAdd: selectedArray.join(","),
+ }
+ }).then(function () {
+ $scope.layerAddName = undefined;
+ });
+ });
+ }
+ else {
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_edit,
+ data: {
+ layerAdd: $scope.layerAddId,
+ }
+ }).then(function () {
+ $scope.layerAddName = undefined;
+ });
+ }
+ }
+ });
+ }
+
+ $scope.layerDel = function(id) {
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_edit,
+ data: {
+ layerDel: id,
+ }
+ });
+ }
+
+
+ /**
+ * Verifies if a project settings change would trigger layer updates. If user confirmation is needed,
+ * a modal dialog will prompt the user to ack the changes. If not, the editProjectSettings() function is called directly.
+ *
+ * Only "versionlayers" change for is supported (and hardcoded) for now.
+ */
+
+ $scope.testProjectSettingsChange = function(elementid) {
+ if (elementid != '#change-project-version') throw "Not implemented";
+
+ $http({method:"GET", url: $scope.urls.xhr_datatypeahead, params : { type: "versionlayers", value: $scope.projectVersion }}).
+ success(function (_data) {
+ if (_data.error != "ok") {
+ alert (_data.error);
+ }
+ else {
+ if (_data.list.length > 0) {
+ // activate modal
+ var modalInstance = $modal.open({
+ templateUrl: 'change_version_modal',
+ controller: function ($scope, $modalInstance, items, releaseName) {
+ $scope.items = items;
+ $scope.releaseName = releaseName;
+
+ $scope.ok = function() {
+ $modalInstance.close();
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+
+ },
+ resolve: {
+ items: function () {
+ return _data.list;
+ },
+ releaseName: function () {
+ return $scope.releases.filter(function (e) { if (e.id == $scope.projectVersion) return e;})[0].name;
+ },
+ }
+ });
+
+ modalInstance.result.then(function () { $scope.editProjectSettings(elementid)});
+ } else {
+ $scope.editProjectSettings(elementid);
+ }
+ }
+ });
+ }
+
+ /**
+ * Performs changes to project settings, and updates the user interface accordingly.
+ */
+
+ $scope.editProjectSettings = function(elementid) {
+ var data = {};
+ console.warn("TRC7: editProjectSettings with ", elementid);
+ var alertText = undefined;
+ var alertZone = undefined;
+ var oldLayers = [];
+
+ switch(elementid) {
+ case '#select-machine':
+ alertText = "You have changed the machine to: <strong>" + $scope.machineName + "</strong>";
+ alertZone = $scope.zone2alerts;
+ data['machineName'] = $scope.machineName;
+ break;
+ case '#change-project-name':
+ data['projectName'] = $scope.projectName;
+ alertText = "You have changed the project name to: <strong>" + $scope.projectName + "</strong>";
+ alertZone = $scope.zone3alerts;
+ break;
+ case '#change-project-version':
+ data['projectVersion'] = $scope.projectVersion;
+ alertText = "You have changed the release to: ";
+ alertZone = $scope.zone3alerts;
+ // save old layers
+ oldLayers = $scope.layers.slice(0);
+ break;
+ default:
+ throw "FIXME: implement conversion for element " + elementid;
+ }
+
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_edit, data: data,
+ }).then( function (_data) {
+ $scope.toggle(elementid);
+ if (data['projectVersion'] != undefined) {
+ alertText += "<strong>" + $scope.project.release.desc + "</strong>. ";
+ }
+ if (elementid == '#change-project-version') {
+ $scope.layersForTargets = {}; // invalidate error layers for the targets, since layers changed
+
+ // requirement https://bugzilla.yoctoproject.org/attachment.cgi?id=2229, notification for changed version to include layers
+ $scope.zone2alerts.forEach(function (e) { e.close() });
+ alertText += "This has caused the following changes in your project layers:<ul>"
+
+
+ // warnings - this is executed AFTER the generic XHRCall handling is done; at this point,
+ if (_data.layers !== undefined) {
+ // show added/deleted layer notifications; scope.layers is already updated by this point.
+ var addedLayers = [];
+ var deletedLayers = [];
+ _diffArrays( oldLayers, $scope.layers, function (e, f) { return e.id == f.id },
+ function (e) {addedLayers.push(e); },
+ function (e) {deletedLayers.push(e); });
+
+ // some of the deleted layers are actually replaced (changed) layers
+ var changedLayers = [];
+ deletedLayers.forEach(function (e) {
+ if ( -1 < addedLayers.findIndex(function (f) { return f.name == e.name })) {
+ changedLayers.push(e);
+ }
+ });
+
+ changedLayers.forEach(function (e) {
+ deletedLayers.splice(deletedLayers.indexOf(e), 1);
+ });
+
+ if (addedLayers.length > 0) {
+ alertText += "<li><strong>"+addedLayers.length+"</strong> layer" + ((addedLayers.length>1)?"s changed: ":" changed: ") + addedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>" }).join(", ") + "</li>";
+ }
+ if (deletedLayers.length > 0) {
+ alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s deleted: ":"deleted: ") + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>" }).join(", ") + "</li>";
+ }
+
+ }
+ alertText += "</ul>";
+ }
+ $scope.displayAlert(alertZone, alertText, "alert-info");
+ });
+ }
+
+
+ /**
+ * Extracts a command passed through the local path in location, and executes/updates UI based on the command
+ */
+
+ $scope.updateDisplayWithCommands = function() {
+ cmd = $location.path();
+
+ function _cmdExecuteWithParam(param, f) {
+ if (cmd.indexOf(param)==0) {
+ if (cmd.indexOf("=") > -1) {
+ var parameter = cmd.split("=", 2)[1];
+ if (parameter != undefined && parameter.length > 0) {
+ f(parameter);
+ }
+ } else {
+ f();
+ };
+ }
+ }
+
+ _cmdExecuteWithParam("/newproject", function () {
+ $scope.displayAlert($scope.zone1alerts,
+ "Your project <strong>" + $scope.project.name +
+ "</strong> has been created. You can now <a href=\""+ $scope.urls.layers +
+ "\">add layers</a> and <a href=\""+ $scope.urls.targets +
+ "\">select targets</a> you want to build.", "alert-success");
+ });
+
+ _cmdExecuteWithParam("/layerimported", function (layer) {
+ var imported = $cookieStore.get("layer-imported-alert");
+ var text;
+
+ if (!imported)
+ return;
+
+ if (imported.deps_added.length == 0) {
+ text = "You have imported <strong><a href=\""+$scope.urls.layer+
+ imported.imported_layer.id+"\">"+imported.imported_layer.name+
+ "</a></strong> and added it to your project.";
+ } else {
+ var links = "<a href=\""+$scope.urls.layer+
+ imported.imported_layer.id+"\">"+imported.imported_layer.name+
+ "</a>, ";
+
+ imported.deps_added.map (function(item, index){
+ links +="<a href=\""+$scope.urls.layer+item.id+"\" >"+item.name+
+ "</a>";
+ /*If we're at the last element we don't want the trailing comma */
+ if (imported.deps_added[index+1] != undefined)
+ links += ", ";
+ });
+
+ /* Length + 1 here to do deps + the imported layer */
+ text = "You have imported <strong><a href=\""+$scope.urls.layer+
+ imported.imported_layer.id+"\">"+imported.imported_layer.name+
+ "</a></strong> and added <strong>"+(imported.deps_added.length+1)+
+ "</strong> layers to your project: <strong>"+links+"</strong>";
+ }
+
+ $scope.displayAlert($scope.zone2alerts, text, "alert-info");
+ // This doesn't work
+ $cookieStore.remove("layer-imported-alert");
+ //use jquery plugin instead
+ $.removeCookie("layer-imported-alert", { path: "/"});
+ });
+
+ _cmdExecuteWithParam("/targetbuild=", function (targets) {
+ var oldTargetName = $scope.targetName;
+ $scope.targetName = targets.split(",").join(" ");
+ $scope.targetNamedBuild();
+ $scope.targetName = oldTargetName;
+ });
+
+ _cmdExecuteWithParam("/machineselect=", function (machine) {
+ $scope.machineName = machine;
+ $scope.toggle('#select-machine');
+ });
+
+
+ _cmdExecuteWithParam("/layeradd=", function (layer) {
+ angular.forEach(layer.split(","), function (l) {
+ $scope.layerAddId = l;
+ $scope.layerAdd();
+ });
+ });
+ }
+
+ /**
+ * Utility function to display an alert to the user
+ */
+
+ $scope.displayAlert = function(zone, text, type) {
+ if (zone.maxid === undefined) { zone.maxid = 0; }
+ var crtid = zone.maxid ++;
+ angular.forEach(zone, function (o) { o.close() });
+ o = {
+ id: crtid, text: text, type: type,
+ close: function() {
+ zone.splice((function(id){ for (var i = 0; i < zone.length; i++) if (id == zone[i].id) { return i}; return undefined;})(crtid), 1);
+ },
+ }
+ zone.push(o);
+ return o;
+ }
+
+ /**
+ * Toggles display items between label and input box (the edit pencil icon) on selected settings in project page
+ */
+
+ $scope.toggle = function(id) {
+ $scope.projectName = $scope.project.name;
+ $scope.projectVersion = $scope.project.release.id;
+ $scope.machineName = $scope.machine.name;
+
+ angular.element(id).toggle();
+ angular.element(id+"-opposite").toggle();
+ }
+
+ /**
+ * Functionality related to "Most build targets"
+ */
+
+ $scope.enableBuildSelectedTargets = function () {
+ var keys = Object.keys($scope.mostBuiltTargets);
+ keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
+ return keys.length == 0;
+ }
+
+ $scope.buildSelectedTargets = function () {
+ var keys = Object.keys($scope.mostBuiltTargets);
+ keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
+
+ $scope.buildTargetList(keys);
+ for (var i = 0; i < keys.length; i++)
+ {
+ $scope.mostBuiltTargets[keys[i]] = 0;
+ }
+ }
+
+ /**
+ * Helper function to deal with error string recognition and manipulation
+ */
+
+ $scope.getTargetNameFromErrorMsg = function (msg) {
+ targets = msg.split(" ").splice(2).map(function (v) { return v.replace(/'/g, '')})
+ return targets;
+ }
+
+ $scope.fetchLayersForTargets = function () {
+ $scope.builds.forEach(function (buildrequest) {
+ buildrequest.errors.forEach(function (error) {
+ if (error.msg.indexOf("Nothin") == 0) {
+ $scope.getTargetNameFromErrorMsg(error.msg).forEach(function (target) {
+ if ($scope.layersForTargets[target] === undefined)
+ $scope.getAutocompleteSuggestions("layers4target", target).then( function (list) {
+ $scope.layersForTargets[target] = list;
+ })
+ })
+ }
+ })
+ })
+ }
+
+
+ /**
+ * Page init code - just init variables and set the automated refresh
+ */
+
+ $scope.init = function() {
+ $scope.canceledBuilds = [];
+ $scope.layersForTargets = {};
+ $scope.fetchLayersForTargets();
+ $scope.pollHandle = $interval(function () { $scope._makeXHRCall({method: "GET", url: $scope.urls.xhr_edit, data: undefined});}, 2000, 0);
+ }
+
+});
+
+
+var s = undefined;
+
+function test_set_alert(text) {
+ s = angular.element("div#main").scope();
+ s.displayAlert(s.zone3alerts, text);
+ console.warn("TRC8: zone3alerts", s.zone3alerts);
+ s.$digest();
+}
diff --git a/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.js b/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.js
new file mode 100644
index 0000000000..fa6a861317
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.js
@@ -0,0 +1,10 @@
+/*
+ * angular-ui-bootstrap
+ * http://angular-ui.github.io/bootstrap/
+
+ * Version: 0.11.0 - 2014-05-01
+ * License: MIT
+ */
+angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},f=document.createElement("trans"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},h={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(a){return{link:function(b,c,d){function e(b){function d(){j===e&&(j=void 0)}var e=a(c,b);return j&&j.cancel(),j=e,e.then(d,d),e}function f(){k?(k=!1,g()):(c.removeClass("collapse").addClass("collapsing"),e({height:c[0].scrollHeight+"px"}).then(g))}function g(){c.removeClass("collapsing"),c.addClass("collapse in"),c.css({height:"auto"})}function h(){if(k)k=!1,i(),c.css({height:0});else{c.css({height:c[0].scrollHeight+"px"});{c[0].offsetWidth}c.removeClass("collapse in").addClass("collapsing"),e({height:0}).then(i)}}function i(){c.removeClass("collapsing"),c.addClass("collapse")}var j,k=!0;b.$watch(d.collapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch("isOpen",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable="close"in b}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(a,b,c){b.addClass("ng-binding").data("$binding",c.bindHtmlUnsafe),a.$watch(c.bindHtmlUnsafe,function(a){b.html(a||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$transition",function(a,b,c){function d(){e();var c=+a.interval;!isNaN(c)&&c>=0&&(g=b(f,c))}function e(){g&&(b.cancel(g),g=null)}function f(){h?(a.next(),d()):a.pause()}var g,h,i=this,j=i.slides=a.slides=[],k=-1;i.currentSlide=null;var l=!1;i.select=a.select=function(e,f){function g(){if(!l){if(i.currentSlide&&angular.isString(f)&&!a.noTransition&&e.$element){e.$element.addClass(f);{e.$element[0].offsetWidth}angular.forEach(j,function(a){angular.extend(a,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(e,{direction:f,active:!0,entering:!0}),angular.extend(i.currentSlide||{},{direction:f,leaving:!0}),a.$currentTransition=c(e.$element,{}),function(b,c){a.$currentTransition.then(function(){h(b,c)},function(){h(b,c)})}(e,i.currentSlide)}else h(e,i.currentSlide);i.currentSlide=e,k=m,d()}}function h(b,c){angular.extend(b,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(c||{},{direction:"",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var m=j.indexOf(e);void 0===f&&(f=m>k?"next":"prev"),e&&e!==i.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),b(g)):g())},a.$on("$destroy",function(){l=!0}),i.indexOfSlide=function(a){return j.indexOf(a)},a.next=function(){var b=(k+1)%j.length;return a.$currentTransition?void 0:i.select(j[b],"next")},a.prev=function(){var b=0>k-1?j.length-1:k-1;return a.$currentTransition?void 0:i.select(j[b],"prev")},a.isActive=function(a){return i.currentSlide===a},a.$watch("interval",d),a.$on("$destroy",e),a.play=function(){h||(h=!0,d())},a.pause=function(){a.noPause||(h=!1,e())},i.addSlide=function(b,c){b.$element=c,j.push(b),1===j.length||b.active?(i.select(j[j.length-1]),1==j.length&&a.play()):b.active=!1},i.removeSlide=function(a){var b=j.indexOf(a);j.splice(b,1),j.length>0&&a.active?i.select(b>=j.length?j[b-1]:j[b]):k>b&&k--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(a,b){function c(a,b,c){return 1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}this.parsers={};var d={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join("|")}};this.createParser=function(a){var c=[],e=a.split("");return angular.forEach(d,function(b,d){var f=a.indexOf(d);if(f>-1){a=a.split(""),e[f]="("+b.regex+")",a[f]="$";for(var g=f+1,h=f+d.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,apply:b.apply})}}),{regex:new RegExp("^"+e.join("")+"$"),map:b(c,"index")}},this.parse=function(b,d){if(!angular.isString(b))return b;d=a.DATETIME_FORMATS[d]||d,this.parsers[d]||(this.parsers[d]=this.createParser(d));var e=this.parsers[d],f=e.regex,g=e.map,h=b.match(f);if(h&&h.length){for(var i,j={year:1900,month:0,date:1,hours:0},k=1,l=h.length;l>k;k++){var m=g[k-1];m.apply&&m.apply.call(j,h[k])}return c(j.year,j.month,j.date)&&(i=new Date(j.year,j.month,j.date,j.hours)),i}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(c,e){i[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):h[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=h[d]?new Date(h[d]):null}),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(b.initDate)?a.$parent.$eval(b.initDate):new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$modelValue){var a=new Date(j.$modelValue),b=!isNaN(a);b?this.activeDate=a:f.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),j.$setValidity("date",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$modelValue?new Date(j.$modelValue):null;j.$setValidity("date-disabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$modelValue?new Date(j.$modelValue):null;return{date:a,label:g(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$modelValue?new Date(j.$modelValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var k=function(){e(function(){i.element[0].focus()},0,!1)};a.$on("datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate),k()}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):(a.toggleMode("up"===c?1:-1),k())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive("daypicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){var c=new Array(b),d=new Date(a),e=0;for(d.setHours(12);b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+"-"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,"EEEE")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=h(b.rows[0][0].date),p=b.rows.length;b.weekNumbers.push(o++)<p;);}},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},e.handleKeyDown=function(a){var b=e.activeDate.getDate();if("left"===a)b-=1;else if("up"===a)b-=7;else if("right"===a)b+=1;else if("down"===a)b+=7;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getMonth()+("pageup"===a?-1:1);e.activeDate.setMonth(c,1),b=Math.min(f(e.activeDate.getFullYear(),e.activeDate.getMonth()),b)}else"home"===a?b=1:"end"===a&&(b=f(e.activeDate.getFullYear(),e.activeDate.getMonth()));e.activeDate.setDate(b)},e.refreshView()}}}]).directive("monthpicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(b,c,d,e){e.step={years:1},e.element=c,e._refreshView=function(){for(var c=new Array(12),d=e.activeDate.getFullYear(),f=0;12>f;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+"-"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+"-"+c});a.title=[b[0].label,b[f-1].label].join(" - "),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+"Text"]||g[a+"Text"]},j.$observe("datepickerPopup",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");q.attr({"ng-model":"date","ng-change":"dateSelection()"});var r=angular.element(q.children()[0]);j.datepickerOptions&&angular.forEach(h.$parent.$eval(j.datepickerOptions),function(a,b){r.attr(l(b),a)}),angular.forEach(["minDate","maxDate"],function(a){j[a]&&(h.$parent.$watch(b(j[a]),function(b){h[a]=b}),r.attr(l(a),a))}),j.dateDisabled&&r.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),k.$parsers.unshift(m),h.dateSelection=function(a){angular.isDefined(a)&&(h.date=a),k.$setViewValue(h.date),k.$render(),o&&(h.isOpen=!1,i[0].focus())},i.bind("input change keyup",function(){h.$apply(function(){h.date=k.$modelValue})}),k.$render=function(){var a=k.$viewValue?e(k.$viewValue,n):"";i.val(a),h.date=m(k.$modelValue)};var s=function(a){h.isOpen&&a.target!==i[0]&&h.$apply(function(){h.isOpen=!1})},t=function(a){h.keydown(a)};i.bind("keydown",t),h.keydown=function(a){27===a.which?(a.preventDefault(),a.stopPropagation(),h.close()):40!==a.which||h.isOpen||(h.isOpen=!0)},h.$watch("isOpen",function(a){a?(h.$broadcast("datepicker.focus"),h.position=p?d.offset(i):d.position(i),h.position.top=h.position.top+i.prop("offsetHeight"),c.bind("click",s)):c.unbind("click",s)}),h.select=function(a){if("today"===a){var b=new Date;angular.isDate(k.$modelValue)?(a=new Date(k.$modelValue),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}h.dateSelection(a)},h.close=function(){h.isOpen=!1,i[0].focus()};var u=a(q)(h);p?c.find("body").append(u):i.after(u),h.$on("$destroy",function(){u.remove(),i.unbind("keydown",t),c.unbind("click",s)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(a,b){b.bind("click",function(a){a.preventDefault(),a.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(a){var b=null;this.open=function(e){b||(a.bind("click",c),a.bind("keydown",d)),b&&b!==e&&(b.isOpen=!1),b=e},this.close=function(e){b===e&&(b=null,a.unbind("click",c),a.unbind("keydown",d))};var c=function(a){a&&a.isDefaultPrevented()||b.$apply(function(){b.isOpen=!1})},d=function(a){27===a.which&&(b.focusToggleElement(),c())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(a,b,c,d,e,f){var g,h=this,i=a.$new(),j=d.openClass,k=angular.noop,l=b.onToggle?c(b.onToggle):angular.noop;this.init=function(d){h.$element=d,b.isOpen&&(g=c(b.isOpen),k=g.assign,a.$watch(g,function(a){i.isOpen=!!a}))},this.toggle=function(a){return i.isOpen=arguments.length?!!a:!i.isOpen},this.isOpen=function(){return i.isOpen},i.focusToggleElement=function(){h.toggleElement&&h.toggleElement[0].focus()},i.$watch("isOpen",function(b,c){f[b?"addClass":"removeClass"](h.$element,j),b?(i.focusToggleElement(),e.open(i)):e.close(i),k(a,b),angular.isDefined(b)&&b!==c&&l(a,{open:!!b})}),a.$on("$locationChangeSuccess",function(){i.isOpen=!1}),a.$on("$destroy",function(){i.$destroy()})}]).directive("dropdown",function(){return{restrict:"CA",controller:"DropdownController",link:function(a,b,c,d){d.init(b)}}}).directive("dropdownToggle",function(){return{restrict:"CA",require:"?^dropdown",link:function(a,b,c,d){if(d){d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}).directive("modalBackdrop",["$timeout",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(b){b.animate=!1,a(function(){b.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(a,b){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(c,d,e){d.addClass(e.windowClass||""),c.size=e.size,b(function(){c.animate=!0,d[0].focus()}),c.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!=c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))}}}}]).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(a,b,c,d,e,f){function g(){for(var a=-1,b=n.keys(),c=0;c<b.length;c++)n.get(b[c]).value.backdrop&&(a=c);return a}function h(a){var b=c.find("body").eq(0),d=n.get(a).value;n.remove(a),j(d.modalDomEl,d.modalScope,300,function(){d.modalScope.$destroy(),b.toggleClass(m,n.length()>0),i()})}function i(){if(k&&-1==g()){var a=l;j(k,l,150,function(){a.$destroy(),a=null}),k=void 0,l=void 0}}function j(c,d,e,f){function g(){g.done||(g.done=!0,c.remove(),f&&f())}d.animate=!1;var h=a.transitionEndEventName;if(h){var i=b(g,e);c.bind(h,function(){b.cancel(i),g(),d.$apply()})}else b(g,0)}var k,l,m="modal-open",n=f.createNew(),o={};return e.$watch(g,function(a){l&&(l.index=a)}),c.bind("keydown",function(a){var b;27===a.which&&(b=n.top(),b&&b.value.keyboard&&(a.preventDefault(),e.$apply(function(){o.dismiss(b.key,"escape key press")})))}),o.open=function(a,b){n.add(a,{deferred:b.deferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard});var f=c.find("body").eq(0),h=g();h>=0&&!k&&(l=e.$new(!0),l.index=h,k=d("<div modal-backdrop></div>")(l),f.append(k));var i=angular.element("<div modal-window></div>");i.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,size:b.size,index:n.length()-1,animate:"animate"}).html(b.content);var j=d(i)(b.scope);n.top().value.modalDomEl=j,f.append(j),f.addClass(m)},o.close=function(a,b){var c=n.get(a).value;c&&(c.deferred.resolve(b),h(a))},o.dismiss=function(a,b){var c=n.get(a).value;c&&(c.deferred.reject(b),h(a))},o.dismissAll=function(a){for(var b=this.getTop();b;)this.dismiss(b.key,a),b=this.getTop()},o.getTop=function(){return n.top()},o}]).provider("$modal",function(){var a={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(f,g){e=f,this.config=g,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=g.itemsPerPage},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b){a.page!==b&&b>0&&b<=a.totalPages&&(e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages},a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function a(a){var b=/[A-Z]/g,c="-";
+return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0},c={mouseenter:"mouseleave",click:"click",focus:"blur"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate",function(e,f,g,h,i,j,k){return function(e,l,m){function n(a){var b=a||o.trigger||m,d=c[b]||b;return{show:b,hide:d}}var o=angular.extend({},b,d),p=a(e),q=k.startSymbol(),r=k.endSymbol(),s="<div "+p+'-popup title="'+q+"tt_title"+r+'" content="'+q+"tt_content"+r+'" placement="'+q+"tt_placement"+r+'" animation="tt_animation" is-open="tt_isOpen"></div>';return{restrict:"EA",scope:!0,compile:function(){var a=f(s);return function(b,c,d){function f(){b.tt_isOpen?m():k()}function k(){(!y||b.$eval(d[l+"Enable"]))&&(b.tt_popupDelay?v||(v=g(p,b.tt_popupDelay,!1),v.then(function(a){a()})):p()())}function m(){b.$apply(function(){q()})}function p(){return v=null,u&&(g.cancel(u),u=null),b.tt_content?(r(),t.css({top:0,left:0,display:"block"}),w?i.find("body").append(t):c.after(t),z(),b.tt_isOpen=!0,b.$digest(),z):angular.noop}function q(){b.tt_isOpen=!1,g.cancel(v),v=null,b.tt_animation?u||(u=g(s,500)):s()}function r(){t&&s(),t=a(b,function(){}),b.$digest()}function s(){u=null,t&&(t.remove(),t=null)}var t,u,v,w=angular.isDefined(o.appendToBody)?o.appendToBody:!1,x=n(void 0),y=angular.isDefined(d[l+"Enable"]),z=function(){var a=j.positionElements(c,t,b.tt_placement,w);a.top+="px",a.left+="px",t.css(a)};b.tt_isOpen=!1,d.$observe(e,function(a){b.tt_content=a,!a&&b.tt_isOpen&&q()}),d.$observe(l+"Title",function(a){b.tt_title=a}),d.$observe(l+"Placement",function(a){b.tt_placement=angular.isDefined(a)?a:o.placement}),d.$observe(l+"PopupDelay",function(a){var c=parseInt(a,10);b.tt_popupDelay=isNaN(c)?o.popupDelay:c});var A=function(){c.unbind(x.show,k),c.unbind(x.hide,m)};d.$observe(l+"Trigger",function(a){A(),x=n(a),x.show===x.hide?c.bind(x.show,f):(c.bind(x.show,k),c.bind(x.hide,m))});var B=b.$eval(d[l+"Animation"]);b.tt_animation=angular.isDefined(B)?!!B:o.animation,d.$observe(l+"AppendToBody",function(a){w=angular.isDefined(a)?h(a)(b):w}),w&&b.$on("$locationChangeSuccess",function(){b.tt_isOpen&&q()}),b.$on("$destroy",function(){g.cancel(u),g.cancel(v),A(),s()})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(a){return a("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max,this.addBar=function(b,c){e||c.css({transition:"none"}),this.bars.push(b),b.$watch("value",function(c){b.percent=+(100*c/a.max).toFixed(2)}),b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(f)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff},a[b]);return a},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect())}),a.active=!0,a.onSelect()},b.addTab=function(a){c.push(a),1===c.length?a.active=!0:a.active&&b.select(a)},b.removeTab=function(a){var d=c.indexOf(a);if(a.active&&c.length>1){var e=d==c.length-1?d-1:d+1;b.select(c[e])}c.splice(d,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("tab",["$parse",function(a){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(b,c,d){return function(b,c,e,f){b.$watch("active",function(a){a&&f.select(b)}),b.disabled=!1,e.disabled&&b.$parent.$watch(a(e.disabled),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},f.addTab(b),b.$on("$destroy",function(){f.removeTab(b)}),b.$transcludeFn=d}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}]).directive("tabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(a,b,c,d,e,f){function g(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===p[1]&&(b+=12)),b):void 0}function h(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function i(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a}function j(a){k(),o.$setViewValue(new Date(n)),l(a)}function k(){o.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function l(b){var c=n.getHours(),d=n.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:i(c),a.minutes="m"===b?d:i(d),a.meridian=n.getHours()<12?p[0]:p[1]}function m(a){var b=new Date(n.getTime()+6e4*a);n.setHours(b.getHours(),b.getMinutes()),j()}var n=new Date,o={$setViewValue:angular.noop},p=angular.isDefined(b.meridians)?a.$parent.$eval(b.meridians):f.meridians||e.DATETIME_FORMATS.AMPMS;this.init=function(c,d){o=c,o.$render=this.render;var e=d.eq(0),g=d.eq(1),h=angular.isDefined(b.mousewheel)?a.$parent.$eval(b.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(e,g),a.readonlyInput=angular.isDefined(b.readonlyInput)?a.$parent.$eval(b.readonlyInput):f.readonlyInput,this.setupInputEvents(e,g)};var q=f.hourStep;b.hourStep&&a.$parent.$watch(c(b.hourStep),function(a){q=parseInt(a,10)});var r=f.minuteStep;b.minuteStep&&a.$parent.$watch(c(b.minuteStep),function(a){r=parseInt(a,10)}),a.showMeridian=f.showMeridian,b.showMeridian&&a.$parent.$watch(c(b.showMeridian),function(b){if(a.showMeridian=!!b,o.$error.time){var c=g(),d=h();angular.isDefined(c)&&angular.isDefined(d)&&(n.setHours(c),j())}else l()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){o.$setViewValue(null),o.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=g();angular.isDefined(a)?(n.setHours(a),j("h")):d(!0)},b.bind("blur",function(){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=i(a.hours)})}),a.updateMinutes=function(){var a=h();angular.isDefined(a)?(n.setMinutes(a),j("m")):d(void 0,!0)},c.bind("blur",function(){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=i(a.minutes)})})},this.render=function(){var a=o.$modelValue?new Date(o.$modelValue):null;isNaN(a)?(o.$setValidity("time",!1),d.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(a&&(n=a),k(),l())},a.incrementHours=function(){m(60*q)},a.decrementHours=function(){m(60*-q)},a.incrementMinutes=function(){m(r)},a.decrementMinutes=function(){m(-r)},a.toggleMeridian=function(){m(720*(n.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(a){var b=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(a,b,c,d,e,f,g){var h=[9,13,27,38,40];return{require:"ngModel",link:function(i,j,k,l){var m,n=i.$eval(k.typeaheadMinLength)||1,o=i.$eval(k.typeaheadWaitMs)||0,p=i.$eval(k.typeaheadEditable)!==!1,q=b(k.typeaheadLoading).assign||angular.noop,r=b(k.typeaheadOnSelect),s=k.typeaheadInputFormatter?b(k.typeaheadInputFormatter):void 0,t=k.typeaheadAppendToBody?i.$eval(k.typeaheadAppendToBody):!1,u=b(k.ngModel).assign,v=g.parse(k.typeahead),w=i.$new();i.$on("$destroy",function(){w.$destroy()});var x="typeahead-"+w.$id+"-"+Math.floor(1e4*Math.random());j.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":x});var y=angular.element("<div typeahead-popup></div>");y.attr({id:x,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(k.typeaheadTemplateUrl)&&y.attr("template-url",k.typeaheadTemplateUrl);var z=function(){w.matches=[],w.activeIdx=-1,j.attr("aria-expanded",!1)},A=function(a){return x+"-option-"+a};w.$watch("activeIdx",function(a){0>a?j.removeAttr("aria-activedescendant"):j.attr("aria-activedescendant",A(a))});var B=function(a){var b={$viewValue:a};q(i,!0),c.when(v.source(i,b)).then(function(c){var d=a===l.$viewValue;if(d&&m)if(c.length>0){w.activeIdx=0,w.matches.length=0;for(var e=0;e<c.length;e++)b[v.itemName]=c[e],w.matches.push({id:A(e),label:v.viewMapper(w,b),model:c[e]});w.query=a,w.position=t?f.offset(j):f.position(j),w.position.top=w.position.top+j.prop("offsetHeight"),j.attr("aria-expanded",!0)}else z();d&&q(i,!1)},function(){z(),q(i,!1)})};z(),w.query=void 0;var C;l.$parsers.unshift(function(a){return m=!0,a&&a.length>=n?o>0?(C&&d.cancel(C),C=d(function(){B(a)},o)):B(a):(q(i,!1),z()),p?a:a?void l.$setValidity("editable",!1):(l.$setValidity("editable",!0),a)}),l.$formatters.push(function(a){var b,c,d={};return s?(d.$model=a,s(i,d)):(d[v.itemName]=a,b=v.viewMapper(i,d),d[v.itemName]=void 0,c=v.viewMapper(i,d),b!==c?b:a)}),w.select=function(a){var b,c,e={};e[v.itemName]=c=w.matches[a].model,b=v.modelMapper(i,e),u(i,b),l.$setValidity("editable",!0),r(i,{$item:c,$model:b,$label:v.viewMapper(i,e)}),z(),d(function(){j[0].focus()},0,!1)},j.bind("keydown",function(a){0!==w.matches.length&&-1!==h.indexOf(a.which)&&(a.preventDefault(),40===a.which?(w.activeIdx=(w.activeIdx+1)%w.matches.length,w.$digest()):38===a.which?(w.activeIdx=(w.activeIdx?w.activeIdx:w.matches.length)-1,w.$digest()):13===a.which||9===a.which?w.$apply(function(){w.select(w.activeIdx)}):27===a.which&&(a.stopPropagation(),z(),w.$digest()))}),j.bind("blur",function(){m=!1});var D=function(a){j[0]!==a.target&&(z(),w.$digest())};e.bind("click",D),i.$on("$destroy",function(){e.unbind("click",D)});var E=a(y)(w);t?e.find("body").append(E):j.after(E)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(a,b,c,d){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(e,f,g){var h=d(g.templateUrl)(e.$parent)||"template/typeahead/typeahead-match.html";a.get(h,{cache:b}).success(function(a){f.replaceWith(c(a.trim())(e))})}}}]).filter("typeaheadHighlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c?(""+b).replace(new RegExp(a(c),"gi"),"<strong>$&</strong>"):b}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse" collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'<div class="alert" ng-class="{\'alert-{{type || \'warning\'}}\': true, \'alert-dismissable\': closeable}" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-show="showWeeks" class="text-center"></th>\n <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" style="padding:10px 9px 2px">\n <span class="btn-group">\n <button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'<div class="modal-backdrop fade"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" ng-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset-titles.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset-titles.html","<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n</ul>\n")}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'\n<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center">\n <td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td>:</td>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n </tr>\n <tr class="text-center">\n <td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-if="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>')
+}]); \ No newline at end of file
diff --git a/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.min.js b/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.min.js
new file mode 100644
index 0000000000..fa6a861317
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/static/js/ui-bootstrap-tpls-0.11.0.min.js
@@ -0,0 +1,10 @@
+/*
+ * angular-ui-bootstrap
+ * http://angular-ui.github.io/bootstrap/
+
+ * Version: 0.11.0 - 2014-05-01
+ * License: MIT
+ */
+angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},f=document.createElement("trans"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},h={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(a){return{link:function(b,c,d){function e(b){function d(){j===e&&(j=void 0)}var e=a(c,b);return j&&j.cancel(),j=e,e.then(d,d),e}function f(){k?(k=!1,g()):(c.removeClass("collapse").addClass("collapsing"),e({height:c[0].scrollHeight+"px"}).then(g))}function g(){c.removeClass("collapsing"),c.addClass("collapse in"),c.css({height:"auto"})}function h(){if(k)k=!1,i(),c.css({height:0});else{c.css({height:c[0].scrollHeight+"px"});{c[0].offsetWidth}c.removeClass("collapse in").addClass("collapsing"),e({height:0}).then(i)}}function i(){c.removeClass("collapsing"),c.addClass("collapse")}var j,k=!0;b.$watch(d.collapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch("isOpen",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable="close"in b}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(a,b,c){b.addClass("ng-binding").data("$binding",c.bindHtmlUnsafe),a.$watch(c.bindHtmlUnsafe,function(a){b.html(a||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$transition",function(a,b,c){function d(){e();var c=+a.interval;!isNaN(c)&&c>=0&&(g=b(f,c))}function e(){g&&(b.cancel(g),g=null)}function f(){h?(a.next(),d()):a.pause()}var g,h,i=this,j=i.slides=a.slides=[],k=-1;i.currentSlide=null;var l=!1;i.select=a.select=function(e,f){function g(){if(!l){if(i.currentSlide&&angular.isString(f)&&!a.noTransition&&e.$element){e.$element.addClass(f);{e.$element[0].offsetWidth}angular.forEach(j,function(a){angular.extend(a,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(e,{direction:f,active:!0,entering:!0}),angular.extend(i.currentSlide||{},{direction:f,leaving:!0}),a.$currentTransition=c(e.$element,{}),function(b,c){a.$currentTransition.then(function(){h(b,c)},function(){h(b,c)})}(e,i.currentSlide)}else h(e,i.currentSlide);i.currentSlide=e,k=m,d()}}function h(b,c){angular.extend(b,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(c||{},{direction:"",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var m=j.indexOf(e);void 0===f&&(f=m>k?"next":"prev"),e&&e!==i.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),b(g)):g())},a.$on("$destroy",function(){l=!0}),i.indexOfSlide=function(a){return j.indexOf(a)},a.next=function(){var b=(k+1)%j.length;return a.$currentTransition?void 0:i.select(j[b],"next")},a.prev=function(){var b=0>k-1?j.length-1:k-1;return a.$currentTransition?void 0:i.select(j[b],"prev")},a.isActive=function(a){return i.currentSlide===a},a.$watch("interval",d),a.$on("$destroy",e),a.play=function(){h||(h=!0,d())},a.pause=function(){a.noPause||(h=!1,e())},i.addSlide=function(b,c){b.$element=c,j.push(b),1===j.length||b.active?(i.select(j[j.length-1]),1==j.length&&a.play()):b.active=!1},i.removeSlide=function(a){var b=j.indexOf(a);j.splice(b,1),j.length>0&&a.active?i.select(b>=j.length?j[b-1]:j[b]):k>b&&k--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(a,b){function c(a,b,c){return 1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}this.parsers={};var d={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join("|")}};this.createParser=function(a){var c=[],e=a.split("");return angular.forEach(d,function(b,d){var f=a.indexOf(d);if(f>-1){a=a.split(""),e[f]="("+b.regex+")",a[f]="$";for(var g=f+1,h=f+d.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,apply:b.apply})}}),{regex:new RegExp("^"+e.join("")+"$"),map:b(c,"index")}},this.parse=function(b,d){if(!angular.isString(b))return b;d=a.DATETIME_FORMATS[d]||d,this.parsers[d]||(this.parsers[d]=this.createParser(d));var e=this.parsers[d],f=e.regex,g=e.map,h=b.match(f);if(h&&h.length){for(var i,j={year:1900,month:0,date:1,hours:0},k=1,l=h.length;l>k;k++){var m=g[k-1];m.apply&&m.apply.call(j,h[k])}return c(j.year,j.month,j.date)&&(i=new Date(j.year,j.month,j.date,j.hours)),i}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(c,e){i[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):h[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=h[d]?new Date(h[d]):null}),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(b.initDate)?a.$parent.$eval(b.initDate):new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$modelValue){var a=new Date(j.$modelValue),b=!isNaN(a);b?this.activeDate=a:f.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),j.$setValidity("date",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$modelValue?new Date(j.$modelValue):null;j.$setValidity("date-disabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$modelValue?new Date(j.$modelValue):null;return{date:a,label:g(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$modelValue?new Date(j.$modelValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var k=function(){e(function(){i.element[0].focus()},0,!1)};a.$on("datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate),k()}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):(a.toggleMode("up"===c?1:-1),k())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive("daypicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){var c=new Array(b),d=new Date(a),e=0;for(d.setHours(12);b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+"-"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,"EEEE")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=h(b.rows[0][0].date),p=b.rows.length;b.weekNumbers.push(o++)<p;);}},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},e.handleKeyDown=function(a){var b=e.activeDate.getDate();if("left"===a)b-=1;else if("up"===a)b-=7;else if("right"===a)b+=1;else if("down"===a)b+=7;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getMonth()+("pageup"===a?-1:1);e.activeDate.setMonth(c,1),b=Math.min(f(e.activeDate.getFullYear(),e.activeDate.getMonth()),b)}else"home"===a?b=1:"end"===a&&(b=f(e.activeDate.getFullYear(),e.activeDate.getMonth()));e.activeDate.setDate(b)},e.refreshView()}}}]).directive("monthpicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(b,c,d,e){e.step={years:1},e.element=c,e._refreshView=function(){for(var c=new Array(12),d=e.activeDate.getFullYear(),f=0;12>f;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+"-"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+"-"+c});a.title=[b[0].label,b[f-1].label].join(" - "),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+"Text"]||g[a+"Text"]},j.$observe("datepickerPopup",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");q.attr({"ng-model":"date","ng-change":"dateSelection()"});var r=angular.element(q.children()[0]);j.datepickerOptions&&angular.forEach(h.$parent.$eval(j.datepickerOptions),function(a,b){r.attr(l(b),a)}),angular.forEach(["minDate","maxDate"],function(a){j[a]&&(h.$parent.$watch(b(j[a]),function(b){h[a]=b}),r.attr(l(a),a))}),j.dateDisabled&&r.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),k.$parsers.unshift(m),h.dateSelection=function(a){angular.isDefined(a)&&(h.date=a),k.$setViewValue(h.date),k.$render(),o&&(h.isOpen=!1,i[0].focus())},i.bind("input change keyup",function(){h.$apply(function(){h.date=k.$modelValue})}),k.$render=function(){var a=k.$viewValue?e(k.$viewValue,n):"";i.val(a),h.date=m(k.$modelValue)};var s=function(a){h.isOpen&&a.target!==i[0]&&h.$apply(function(){h.isOpen=!1})},t=function(a){h.keydown(a)};i.bind("keydown",t),h.keydown=function(a){27===a.which?(a.preventDefault(),a.stopPropagation(),h.close()):40!==a.which||h.isOpen||(h.isOpen=!0)},h.$watch("isOpen",function(a){a?(h.$broadcast("datepicker.focus"),h.position=p?d.offset(i):d.position(i),h.position.top=h.position.top+i.prop("offsetHeight"),c.bind("click",s)):c.unbind("click",s)}),h.select=function(a){if("today"===a){var b=new Date;angular.isDate(k.$modelValue)?(a=new Date(k.$modelValue),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}h.dateSelection(a)},h.close=function(){h.isOpen=!1,i[0].focus()};var u=a(q)(h);p?c.find("body").append(u):i.after(u),h.$on("$destroy",function(){u.remove(),i.unbind("keydown",t),c.unbind("click",s)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(a,b){b.bind("click",function(a){a.preventDefault(),a.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(a){var b=null;this.open=function(e){b||(a.bind("click",c),a.bind("keydown",d)),b&&b!==e&&(b.isOpen=!1),b=e},this.close=function(e){b===e&&(b=null,a.unbind("click",c),a.unbind("keydown",d))};var c=function(a){a&&a.isDefaultPrevented()||b.$apply(function(){b.isOpen=!1})},d=function(a){27===a.which&&(b.focusToggleElement(),c())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(a,b,c,d,e,f){var g,h=this,i=a.$new(),j=d.openClass,k=angular.noop,l=b.onToggle?c(b.onToggle):angular.noop;this.init=function(d){h.$element=d,b.isOpen&&(g=c(b.isOpen),k=g.assign,a.$watch(g,function(a){i.isOpen=!!a}))},this.toggle=function(a){return i.isOpen=arguments.length?!!a:!i.isOpen},this.isOpen=function(){return i.isOpen},i.focusToggleElement=function(){h.toggleElement&&h.toggleElement[0].focus()},i.$watch("isOpen",function(b,c){f[b?"addClass":"removeClass"](h.$element,j),b?(i.focusToggleElement(),e.open(i)):e.close(i),k(a,b),angular.isDefined(b)&&b!==c&&l(a,{open:!!b})}),a.$on("$locationChangeSuccess",function(){i.isOpen=!1}),a.$on("$destroy",function(){i.$destroy()})}]).directive("dropdown",function(){return{restrict:"CA",controller:"DropdownController",link:function(a,b,c,d){d.init(b)}}}).directive("dropdownToggle",function(){return{restrict:"CA",require:"?^dropdown",link:function(a,b,c,d){if(d){d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}).directive("modalBackdrop",["$timeout",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(b){b.animate=!1,a(function(){b.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(a,b){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(c,d,e){d.addClass(e.windowClass||""),c.size=e.size,b(function(){c.animate=!0,d[0].focus()}),c.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!=c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))}}}}]).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(a,b,c,d,e,f){function g(){for(var a=-1,b=n.keys(),c=0;c<b.length;c++)n.get(b[c]).value.backdrop&&(a=c);return a}function h(a){var b=c.find("body").eq(0),d=n.get(a).value;n.remove(a),j(d.modalDomEl,d.modalScope,300,function(){d.modalScope.$destroy(),b.toggleClass(m,n.length()>0),i()})}function i(){if(k&&-1==g()){var a=l;j(k,l,150,function(){a.$destroy(),a=null}),k=void 0,l=void 0}}function j(c,d,e,f){function g(){g.done||(g.done=!0,c.remove(),f&&f())}d.animate=!1;var h=a.transitionEndEventName;if(h){var i=b(g,e);c.bind(h,function(){b.cancel(i),g(),d.$apply()})}else b(g,0)}var k,l,m="modal-open",n=f.createNew(),o={};return e.$watch(g,function(a){l&&(l.index=a)}),c.bind("keydown",function(a){var b;27===a.which&&(b=n.top(),b&&b.value.keyboard&&(a.preventDefault(),e.$apply(function(){o.dismiss(b.key,"escape key press")})))}),o.open=function(a,b){n.add(a,{deferred:b.deferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard});var f=c.find("body").eq(0),h=g();h>=0&&!k&&(l=e.$new(!0),l.index=h,k=d("<div modal-backdrop></div>")(l),f.append(k));var i=angular.element("<div modal-window></div>");i.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,size:b.size,index:n.length()-1,animate:"animate"}).html(b.content);var j=d(i)(b.scope);n.top().value.modalDomEl=j,f.append(j),f.addClass(m)},o.close=function(a,b){var c=n.get(a).value;c&&(c.deferred.resolve(b),h(a))},o.dismiss=function(a,b){var c=n.get(a).value;c&&(c.deferred.reject(b),h(a))},o.dismissAll=function(a){for(var b=this.getTop();b;)this.dismiss(b.key,a),b=this.getTop()},o.getTop=function(){return n.top()},o}]).provider("$modal",function(){var a={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(f,g){e=f,this.config=g,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=g.itemsPerPage},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b){a.page!==b&&b>0&&b<=a.totalPages&&(e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages},a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function a(a){var b=/[A-Z]/g,c="-";
+return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0},c={mouseenter:"mouseleave",click:"click",focus:"blur"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate",function(e,f,g,h,i,j,k){return function(e,l,m){function n(a){var b=a||o.trigger||m,d=c[b]||b;return{show:b,hide:d}}var o=angular.extend({},b,d),p=a(e),q=k.startSymbol(),r=k.endSymbol(),s="<div "+p+'-popup title="'+q+"tt_title"+r+'" content="'+q+"tt_content"+r+'" placement="'+q+"tt_placement"+r+'" animation="tt_animation" is-open="tt_isOpen"></div>';return{restrict:"EA",scope:!0,compile:function(){var a=f(s);return function(b,c,d){function f(){b.tt_isOpen?m():k()}function k(){(!y||b.$eval(d[l+"Enable"]))&&(b.tt_popupDelay?v||(v=g(p,b.tt_popupDelay,!1),v.then(function(a){a()})):p()())}function m(){b.$apply(function(){q()})}function p(){return v=null,u&&(g.cancel(u),u=null),b.tt_content?(r(),t.css({top:0,left:0,display:"block"}),w?i.find("body").append(t):c.after(t),z(),b.tt_isOpen=!0,b.$digest(),z):angular.noop}function q(){b.tt_isOpen=!1,g.cancel(v),v=null,b.tt_animation?u||(u=g(s,500)):s()}function r(){t&&s(),t=a(b,function(){}),b.$digest()}function s(){u=null,t&&(t.remove(),t=null)}var t,u,v,w=angular.isDefined(o.appendToBody)?o.appendToBody:!1,x=n(void 0),y=angular.isDefined(d[l+"Enable"]),z=function(){var a=j.positionElements(c,t,b.tt_placement,w);a.top+="px",a.left+="px",t.css(a)};b.tt_isOpen=!1,d.$observe(e,function(a){b.tt_content=a,!a&&b.tt_isOpen&&q()}),d.$observe(l+"Title",function(a){b.tt_title=a}),d.$observe(l+"Placement",function(a){b.tt_placement=angular.isDefined(a)?a:o.placement}),d.$observe(l+"PopupDelay",function(a){var c=parseInt(a,10);b.tt_popupDelay=isNaN(c)?o.popupDelay:c});var A=function(){c.unbind(x.show,k),c.unbind(x.hide,m)};d.$observe(l+"Trigger",function(a){A(),x=n(a),x.show===x.hide?c.bind(x.show,f):(c.bind(x.show,k),c.bind(x.hide,m))});var B=b.$eval(d[l+"Animation"]);b.tt_animation=angular.isDefined(B)?!!B:o.animation,d.$observe(l+"AppendToBody",function(a){w=angular.isDefined(a)?h(a)(b):w}),w&&b.$on("$locationChangeSuccess",function(){b.tt_isOpen&&q()}),b.$on("$destroy",function(){g.cancel(u),g.cancel(v),A(),s()})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(a){return a("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max,this.addBar=function(b,c){e||c.css({transition:"none"}),this.bars.push(b),b.$watch("value",function(c){b.percent=+(100*c/a.max).toFixed(2)}),b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(f)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff},a[b]);return a},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect())}),a.active=!0,a.onSelect()},b.addTab=function(a){c.push(a),1===c.length?a.active=!0:a.active&&b.select(a)},b.removeTab=function(a){var d=c.indexOf(a);if(a.active&&c.length>1){var e=d==c.length-1?d-1:d+1;b.select(c[e])}c.splice(d,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("tab",["$parse",function(a){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(b,c,d){return function(b,c,e,f){b.$watch("active",function(a){a&&f.select(b)}),b.disabled=!1,e.disabled&&b.$parent.$watch(a(e.disabled),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},f.addTab(b),b.$on("$destroy",function(){f.removeTab(b)}),b.$transcludeFn=d}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}]).directive("tabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(a,b,c,d,e,f){function g(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===p[1]&&(b+=12)),b):void 0}function h(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function i(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a}function j(a){k(),o.$setViewValue(new Date(n)),l(a)}function k(){o.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function l(b){var c=n.getHours(),d=n.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:i(c),a.minutes="m"===b?d:i(d),a.meridian=n.getHours()<12?p[0]:p[1]}function m(a){var b=new Date(n.getTime()+6e4*a);n.setHours(b.getHours(),b.getMinutes()),j()}var n=new Date,o={$setViewValue:angular.noop},p=angular.isDefined(b.meridians)?a.$parent.$eval(b.meridians):f.meridians||e.DATETIME_FORMATS.AMPMS;this.init=function(c,d){o=c,o.$render=this.render;var e=d.eq(0),g=d.eq(1),h=angular.isDefined(b.mousewheel)?a.$parent.$eval(b.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(e,g),a.readonlyInput=angular.isDefined(b.readonlyInput)?a.$parent.$eval(b.readonlyInput):f.readonlyInput,this.setupInputEvents(e,g)};var q=f.hourStep;b.hourStep&&a.$parent.$watch(c(b.hourStep),function(a){q=parseInt(a,10)});var r=f.minuteStep;b.minuteStep&&a.$parent.$watch(c(b.minuteStep),function(a){r=parseInt(a,10)}),a.showMeridian=f.showMeridian,b.showMeridian&&a.$parent.$watch(c(b.showMeridian),function(b){if(a.showMeridian=!!b,o.$error.time){var c=g(),d=h();angular.isDefined(c)&&angular.isDefined(d)&&(n.setHours(c),j())}else l()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){o.$setViewValue(null),o.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=g();angular.isDefined(a)?(n.setHours(a),j("h")):d(!0)},b.bind("blur",function(){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=i(a.hours)})}),a.updateMinutes=function(){var a=h();angular.isDefined(a)?(n.setMinutes(a),j("m")):d(void 0,!0)},c.bind("blur",function(){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=i(a.minutes)})})},this.render=function(){var a=o.$modelValue?new Date(o.$modelValue):null;isNaN(a)?(o.$setValidity("time",!1),d.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(a&&(n=a),k(),l())},a.incrementHours=function(){m(60*q)},a.decrementHours=function(){m(60*-q)},a.incrementMinutes=function(){m(r)},a.decrementMinutes=function(){m(-r)},a.toggleMeridian=function(){m(720*(n.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(a){var b=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(a,b,c,d,e,f,g){var h=[9,13,27,38,40];return{require:"ngModel",link:function(i,j,k,l){var m,n=i.$eval(k.typeaheadMinLength)||1,o=i.$eval(k.typeaheadWaitMs)||0,p=i.$eval(k.typeaheadEditable)!==!1,q=b(k.typeaheadLoading).assign||angular.noop,r=b(k.typeaheadOnSelect),s=k.typeaheadInputFormatter?b(k.typeaheadInputFormatter):void 0,t=k.typeaheadAppendToBody?i.$eval(k.typeaheadAppendToBody):!1,u=b(k.ngModel).assign,v=g.parse(k.typeahead),w=i.$new();i.$on("$destroy",function(){w.$destroy()});var x="typeahead-"+w.$id+"-"+Math.floor(1e4*Math.random());j.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":x});var y=angular.element("<div typeahead-popup></div>");y.attr({id:x,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(k.typeaheadTemplateUrl)&&y.attr("template-url",k.typeaheadTemplateUrl);var z=function(){w.matches=[],w.activeIdx=-1,j.attr("aria-expanded",!1)},A=function(a){return x+"-option-"+a};w.$watch("activeIdx",function(a){0>a?j.removeAttr("aria-activedescendant"):j.attr("aria-activedescendant",A(a))});var B=function(a){var b={$viewValue:a};q(i,!0),c.when(v.source(i,b)).then(function(c){var d=a===l.$viewValue;if(d&&m)if(c.length>0){w.activeIdx=0,w.matches.length=0;for(var e=0;e<c.length;e++)b[v.itemName]=c[e],w.matches.push({id:A(e),label:v.viewMapper(w,b),model:c[e]});w.query=a,w.position=t?f.offset(j):f.position(j),w.position.top=w.position.top+j.prop("offsetHeight"),j.attr("aria-expanded",!0)}else z();d&&q(i,!1)},function(){z(),q(i,!1)})};z(),w.query=void 0;var C;l.$parsers.unshift(function(a){return m=!0,a&&a.length>=n?o>0?(C&&d.cancel(C),C=d(function(){B(a)},o)):B(a):(q(i,!1),z()),p?a:a?void l.$setValidity("editable",!1):(l.$setValidity("editable",!0),a)}),l.$formatters.push(function(a){var b,c,d={};return s?(d.$model=a,s(i,d)):(d[v.itemName]=a,b=v.viewMapper(i,d),d[v.itemName]=void 0,c=v.viewMapper(i,d),b!==c?b:a)}),w.select=function(a){var b,c,e={};e[v.itemName]=c=w.matches[a].model,b=v.modelMapper(i,e),u(i,b),l.$setValidity("editable",!0),r(i,{$item:c,$model:b,$label:v.viewMapper(i,e)}),z(),d(function(){j[0].focus()},0,!1)},j.bind("keydown",function(a){0!==w.matches.length&&-1!==h.indexOf(a.which)&&(a.preventDefault(),40===a.which?(w.activeIdx=(w.activeIdx+1)%w.matches.length,w.$digest()):38===a.which?(w.activeIdx=(w.activeIdx?w.activeIdx:w.matches.length)-1,w.$digest()):13===a.which||9===a.which?w.$apply(function(){w.select(w.activeIdx)}):27===a.which&&(a.stopPropagation(),z(),w.$digest()))}),j.bind("blur",function(){m=!1});var D=function(a){j[0]!==a.target&&(z(),w.$digest())};e.bind("click",D),i.$on("$destroy",function(){e.unbind("click",D)});var E=a(y)(w);t?e.find("body").append(E):j.after(E)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(a,b,c,d){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(e,f,g){var h=d(g.templateUrl)(e.$parent)||"template/typeahead/typeahead-match.html";a.get(h,{cache:b}).success(function(a){f.replaceWith(c(a.trim())(e))})}}}]).filter("typeaheadHighlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c?(""+b).replace(new RegExp(a(c),"gi"),"<strong>$&</strong>"):b}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse" collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'<div class="alert" ng-class="{\'alert-{{type || \'warning\'}}\': true, \'alert-dismissable\': closeable}" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-show="showWeeks" class="text-center"></th>\n <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" style="padding:10px 9px 2px">\n <span class="btn-group">\n <button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'<div class="modal-backdrop fade"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" ng-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset-titles.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset-titles.html","<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n</ul>\n")}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'\n<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center">\n <td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td>:</td>\n <td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n </td>\n <td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n </tr>\n <tr class="text-center">\n <td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-if="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>')
+}]); \ No newline at end of file
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 9ca9c9ac3b..e95b5e0cac 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -1,14 +1,16 @@
<!DOCTYPE html>
{% load static %}
-<html>
+<html lang="en">
<head>
<title>{% if objectname %} {{objectname|title}} - {% endif %}Toaster</title>
-<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css">
-<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'>
-<link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'>
-<link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'>
-<link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'>
+<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
+<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
+<link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
+<link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'/>
+<link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script src="{% static 'js/jquery-2.0.3.min.js' %}">
</script>
<script src="{% static 'js/jquery.cookie.js' %}">
@@ -17,36 +19,35 @@
</script>
<script src="{% static 'js/prettify.js' %}">
</script>
-<script src="{% static 'js/main.js' %}">
+<script src="{% static 'js/libtoaster.js' %}">
</script>
+{% if DEBUG %}
+<script>
+ libtoaster.debug = true;
+ </script>
+{% endif %}
+<script src="{% static 'js/base.js' %}"></script>
+{%if MANAGED %}
+<script>
+ $(document).ready(function () {
+ /* Vars needed for base.js */
+ var ctx = {};
+ ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}";
+ ctx.projectBuildUrl = "{% url 'xhr_build' %}";
+ ctx.projectPageUrl = "{% url 'project' %}";
+ ctx.projectInfoUrl = "{% url 'xhr_projectinfo' %}";
+ ctx.numProjects = {{projects|length}};
+ {% if project %}
+ ctx.projectId = {{project.id}};
+ {% endif %}
+ ctx.currentUrl = "{{request.path|escapejs}}";
+
+ basePageInit(ctx);
+ });
+</script>
+{% endif %}
<script>
-function reload_params(params) {
- uri = window.location.href;
- splitlist = uri.split("?");
- url = splitlist[0], parameters=splitlist[1];
- // deserialize the call parameters
- if(parameters){
- cparams = parameters.split("&");
- }else{
- cparams = []
- }
- nparams = {}
- for (i = 0; i < cparams.length; i++) {
- temp = cparams[i].split("=");
- nparams[temp[0]] = temp[1];
- }
- // update parameter values
- for (i in params) {
- nparams[encodeURIComponent(i)] = encodeURIComponent(params[i]);
- }
- // serialize the structure
- callparams = []
- for (i in nparams) {
- callparams.push(i+"="+nparams[i]);
- }
- window.location.href = url+"?"+callparams.join('&');
-}
</script>
{% block extraheadcontent %}
@@ -62,6 +63,51 @@ function reload_params(params) {
<i class="icon-book"></i>
Toaster manual
</a>
+ {%if MANAGED %}
+ <div class="btn-group pull-right">
+ <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
+ </div>
+ <!-- New build popover -->
+ <div class="btn-group pull-right" id="new-build-button">
+ <button class="btn dropdown-toggle" data-toggle="dropdown">
+ New build
+ <i class="icon-caret-down"></i>
+ </button>
+ <ul class="dropdown-menu new-build multi-select">
+ <li>
+ <h3>New build</h3>
+ <h6>Project:</h6>
+ <span id="project">
+ <a class="lead" href="{% if project.id %}{% url 'project' project.id %}{% endif %}">{{project.name}}</a>
+ <i class="icon-pencil"></i>
+ </span>
+ <form id="change-project-form" style="display:none;">
+ <div class="input-append">
+ <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
+ <button id="save-project-button" class="btn" type="button">Save</button>
+ <a href="#" id="cancel-change-project" class="btn btn-link">Cancel</a>
+ </div>
+ <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
+ </form>
+ </li>
+ <div class="alert" style="display:none">
+ This project's configuration is incomplete,<br/>so you cannot run builds.<br/>
+ <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
+ </div>
+ <li id="targets-form">
+ <h6>Target(s):</h6>
+ <form>
+ <input type="text" class="input-xlarge" id="build-target-input" placeholder="Type a target name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" />
+ <div>
+ <a class="btn btn-primary" id="build-button" disabled="disabled" data-project-id="{{project.id}}">Build</a>
+ </div>
+ </form>
+ </li>
+ </ul>
+ </div>
+
+ {%endif%}
+
</div>
</div>
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
index 5149768517..c8e217e9dd 100755..100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
@@ -7,7 +7,10 @@
<div class="section">
<ul class="breadcrumb" id="breadcrumb">
<li><a href="{% url 'all-builds' %}">All builds</a></li>
- <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
+ {% if MANAGED and build.project %}
+ <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
+ {%endif%}
+ <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%}{%if not MANAGED %}{{build.machine}}{%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
{% block localbreadcrumb %}{% endblock %}
</ul>
<script>
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index 46110519e9..c03f1b4015 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -8,11 +8,14 @@
<!-- Breadcrumbs -->
<div class="section">
<ul class="breadcrumb" id="breadcrumb">
-<li><a href="{% url 'all-builds' %}">All builds</a></li>
+ <li><a href="{% url 'all-builds' %}">All builds</a></li>
+ {% if MANAGED and build.project %}
+ <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
+ {%endif%}
<li>
{% block parentbreadcrumb %}
<a href="{%url 'builddashboard' build.pk%}">
- {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+ {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {%if not MANAGED %}{{build.machine}}{% endif %} ({{build.completed_on|date:"d/m/y H:i"}})
</a>
{% endblock %}
</li>
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
new file mode 100644
index 0000000000..e1409252eb
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -0,0 +1,39 @@
+{% extends "base.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% block pagecontent %}
+
+
+ <div class="row-fluid">
+<!-- Breadcrumbs -->
+ <div class="section">
+ <ul class="breadcrumb" id="breadcrumb">
+ <li><a href="{% url 'all-builds' %}">All builds</a></li>
+ {% block parentbreadcrumb %}
+ {% if project %}
+ <li>
+ <a href="{%url 'project' project.id %}"><span id="project_name">{{project.name}}</span>
+ </a>
+ </li>
+ {% endif %}
+ {% endblock %}
+ {% block localbreadcrumb %}{% endblock %}
+ </ul>
+ <script>
+ $( function () {
+ $('#breadcrumb > li').append("<span class=\"divider\">→</span>");
+ $('#breadcrumb > li:last').addClass("active");
+ $('#breadcrumb > li:last > span').remove();
+ });
+ </script>
+ </div>
+
+ <!-- Begin main page container -->
+ {% block projectinfomain %}{% endblock %}
+ <!-- End main container -->
+
+ </div>
+
+
+{% endblock %}
+
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html b/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html
index ac14363798..d48ad92020 100644
--- a/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html
@@ -23,13 +23,14 @@
{%endif%}
</ul>
<div class="pull-right">
- <span class="help-inline" style="padding-top:5px;">Show rows:</span>
- <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
- {% with "2 5 10 25 50 100" as list%}
- {% for i in list.split %}<option{%if i == request.GET.count %} selected{%endif%}>{{i}}</option>
- {% endfor %}
- {% endwith %}
- </select>
+ <span class="help-inline" style="padding-top:5px;">Show rows:</span>
+ <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ <option value="{{i}}">{{i}}</option>
+ {% endfor %}
+ {% endwith %}
+ </select>
</div>
</div>
@@ -40,22 +41,33 @@
// we load cookies for the column display
save = $.cookie('_displaycols_{{objectname}}');
- if (save != undefined) {
- setting = save.split(';');
- for ( i = 0; i < setting.length; i++) {
- if (setting[i].length > 0) {
- splitlist = setting[i].split(':');
- id = splitlist[0], v = splitlist[1];
- if (v == 'true') {
- $('.chbxtoggle#'+id).prop('checked', true);
- }
- else {
- $('.chbxtoggle#'+id).prop('checked', false);
+ if (save != undefined) {
+ setting = save.split(';');
+ for ( i = 0; i < setting.length; i++) {
+ if (setting[i].length > 0) {
+ splitlist = setting[i].split(':');
+ id = splitlist[0], v = splitlist[1];
+ if (v == 'true') {
+ $('.chbxtoggle#'+id).prop('checked', true);
+ }
+ else {
+ $('.chbxtoggle#'+id).prop('checked', false);
+ }
}
}
}
+
+ // load cookie for number of entries to be displayed on page
+ if ({{request.GET.count}} != "") {
+ pagesize = {{request.GET.count}};
+ } else {
+ pagesize = $.cookie('_count');
}
+ $('.pagesize option').prop('selected', false)
+ .filter('[value="' + pagesize + '"]')
+ .attr('selected', true);
+
$('.chbxtoggle').each(function () {
showhideTableColumn($(this).attr('id'), $(this).is(':checked'))
});
@@ -72,8 +84,9 @@
$('.progress, .lead span').tooltip({container:'table', placement:'top'});
$(".pagesize").change(function () {
- console.log("page size change");
- reload_params({"count":$(this).val()}); ;
+ // save cookie with pagesize
+ $.cookie("_count", $(this).val(), { path : $(location).attr('pathname') });
+ reload_params({"count":$(this).val()});
});
});
</script>
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 1231e1f924..92a3b50801 100644
--- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -156,6 +156,13 @@
showhideImmediateTableAction( clname, sh, orderkey );
}
+ //
+ // saves a cookie with selected order field
+ //
+ function saveOrderCookie( orderfield ) {
+ $.cookie("orderby", orderfield, { path: $(location).attr('pathname') });
+ }
+
</script>
<!-- control header -->
@@ -168,6 +175,7 @@
<button class="btn" type="submit" value="Search">Search</button>
</form>
<div class="pull-right">
+ {% block custombuttons%} {% endblock %}
{% if tablecols %}
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
@@ -204,10 +212,11 @@
<span class="divider-vertical"></span>
<span class="help-inline" style="padding-top:5px;">Show rows:</span>
<select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
- {% with "2 5 10 25 50 100" as list%}
-{% for i in list.split %} <option{%if i == request.GET.count %} selected{%endif%}>{{i}}</option>
- {% endfor %}
- {% endwith %}
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ <option value="{{i}}">{{i}}</option>
+ {% endfor %}
+ {% endwith %}
</select>
</div>
</div>
@@ -221,7 +230,7 @@
<tr>
{% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
{%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
- {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" >{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
+ {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" onclick="saveOrderCookie('{{tc.orderfield}}')">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
{%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
{%if tc.filter%}<div class="btn-group pull-right">
<a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini {%if request.GET.filter%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter and tc.filter.options|filtered_tooltip:request.GET.filter %} title="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=javascript:reload_params({'filter':''})>Show all {% if filter_search_display %}{{filter_search_display}}{% else %}{{objectname}}{% endif %}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a>
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html b/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html
new file mode 100644
index 0000000000..d517179592
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html
@@ -0,0 +1,16 @@
+{% extends "basetable_top.html" %}
+
+{%block custombuttons %}
+{% if MANAGED %}
+ <div class="btn-group builds-projects">
+ <button class="btn dropdown-toggle" data-toggle="dropdown">
+ <span class="selection">Show all builds</span>
+ <i class="icon-caret-down"></i>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="{% url 'all-builds'%}">Show all builds</a></li>
+ <li><a href="{% url 'all-projects'%}">Show all projects</a></li>
+ </ul>
+ </div>
+{% endif %}
+{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top_layers.html b/bitbake/lib/toaster/toastergui/templates/basetable_top_layers.html
new file mode 100644
index 0000000000..bd6e7dd2de
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top_layers.html
@@ -0,0 +1,5 @@
+{% extends "basetable_top.html" %}
+
+{%block custombuttons %}
+ <a class="btn" href="{% url 'importlayer' %}" style="margin-right:5px;">Import layer</a>
+{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top_projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/basetable_top_projectbuilds.html
new file mode 100644
index 0000000000..bfefff5e33
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top_projectbuilds.html
@@ -0,0 +1,16 @@
+{% extends "basetable_top.html" %}
+
+{%block custombuttons %}
+{% if MANAGED %}
+ <div class="btn-group builds-projects">
+ <button class="btn dropdown-toggle" data-toggle="dropdown">
+ <span class="selection">Show all projects</span>
+ <i class="icon-caret-down"></i>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="{% url 'all-builds'%}">Show all builds</a></li>
+ <li><a href="{% url 'all-projects'%}">Show all projects</a></li>
+ </ul>
+ </div>
+{% endif %}
+{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html
index faabd22f8b..e71e38feb9 100644
--- a/bitbake/lib/toaster/toastergui/templates/build.html
+++ b/bitbake/lib/toaster/toastergui/templates/build.html
@@ -6,83 +6,11 @@
{% block pagecontent %}
<div class="row-fluid">
- {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
- <!-- Empty - no data in database -->
- <div class="hero-unit span12">
- <button type="button" class="close" data-dismiss="alert">&times;</button>
- <div class="row-fluid">
- <div class="span6">
- <h1>This is Toaster</h1>
- <p>A web interface to <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="http://www.yoctoproject.org">Yocto Project</a> build system.</p>
- <p class="hero-actions">
- <a class="btn btn-primary btn-large" href="https://www.yoctoproject.org/documentation/toaster-manual">Show me the manual</a>
- <a class="btn btn-large" href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">I want to contribute</a>
- </p>
- </div>
- <div class="span5">
- <a href="http://www.yoctoproject.org"><img src="{% static 'img/toaster.png' %}" class="thumbnail" alt="Yocto Project"/> </a>
- </div>
- </div>
- </div>
- {% endif %}
- {%if mru.count > 0%}
- <div class="page-header top-air">
- <h1>
- Recent Builds
- </h1>
- </div>
- {% for build in mru %}
- <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}">
- <div class="row-fluid">
- <div class="lead span5">
- {%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}
- {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
- <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
- {% endif %}
- <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|naturaltime}})</span>
- {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
- </a>
- {% endif %}
- </div>
- {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
- <div class="span2 lead">
- {% if build.errors_no %}
- <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
- {% endif %}
- </div>
- <div class="span2 lead">
- {% if build.warnings_no %}
- <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
- {% endif %}
- </div>
- <div class="lead pull-right">
- Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
- </div>
- {%endif%}{%if build.outcome == build.IN_PROGRESS %}
- <div class="span4">
- <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
- <div style="width: {{build.completeper}}%;" class="bar"></div>
- </div>
- </div>
- <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div>
- {%endif%}
- </div>
- </div>
+ {% include "mrb_section.html" %}
- {% endfor %}{%endif%}
- {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
- <!-- Empty - no data in database -->
- {% if mru.count == 0 %}
- <div class="page-header top-air">
- <h1>All builds</h1>
- </div>
- <div class="alert alert-info lead">
- Toaster has not recorded any builds yet. Go build something with <a href="http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#test-run">Knotty</a> or <a href="https://www.yoctoproject.org/documentation/hob-manual">Hob</a>
- </div>
- {% endif %}
- {% else %}
+ {% if 1 %}
<div class="page-header top-air">
<h1>
{% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
@@ -108,7 +36,7 @@
{% else %}
- {% include "basetable_top.html" %}
+ {% include "basetable_top_buildprojects.html" %}
<!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
{% for build in objects %}
<tr class="data">
@@ -117,16 +45,46 @@
<td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
<td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
<td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
- <td class="failed_tasks error">{% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}<a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>{% elif exectask.count > 1%}<a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>{%endif%}</td>
- <td class="errors_no">{% if build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td>
+ <td class="failed_tasks error">
+ {% query build.task_build outcome=4 order__gt=0 as exectask%}
+ {% if exectask.count == 1 %}
+ <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
+ {% elif exectask.count > 1%}
+ <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
+ {%endif%}
+ </td>
+ <td class="errors_no">
+ {% if build.errors_no %}
+ <a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
+ </a>
+ {% endif %}
+ {%endif%}
+ </td>
<td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
<td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
- <td class="log">{{build.cooker_log_path}}</td>
+ {% if not MANAGED or not build.project %}
+ <td class="log">{{build.cooker_log_path}}</td>
+ {% endif %}
<td class="output">
{% if build.outcome == build.SUCCEEDED %}
<a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
{% endif %}
</td>
+ {% if MANAGED %}
+ <td class="project">
+ {% if build.project %}
+ <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a>
+ {% endif %}
+ </td>
+ {% endif %}
</tr>
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index acf4d0a361..2458cdb6d1 100644
--- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -39,6 +39,14 @@
<span class="pull-right">Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a></span>
{%endif%}
</div>
+ {% if build.toaster_exceptions.count > 0 %}
+ <div class="row">
+ <small class="pull-right">
+ <i class="icon-question-sign get-help get-help-blue" title="" data-original-title="Toaster exceptions do not affect your build: only the operation of Toaster"></i>
+ <a class="show-exceptions" href="#exceptions">Toaster threw {{build.toaster_exceptions.count}} exception{{build.toaster_exceptions.count|pluralize}}</a>
+ </small>
+ </div>
+ {% endif %}
</div>
</div>
@@ -46,6 +54,9 @@
<div class="accordion span10 pull-right" id="errors">
<div class="accordion-group">
<div class="accordion-heading">
+ {% if MANAGED and build.project %}
+ <a class="btn btn-large pull-right" href="{% url 'build_artifact' build.id "cookerlog" build.id %}" style="margin:15px;">Download build log</a>
+ {% endif %}
<a class="accordion-toggle error toggle-errors">
<h2 id="error-toggle">
<i class="icon-minus-sign"></i>
@@ -60,7 +71,8 @@
<div class="alert alert-error">
<pre>{{error.message}}</pre>
</div>
- {% endif %}{% endfor %}
+ {% endif %}
+ {% endfor %}
</div>
</div>
</div>
@@ -70,23 +82,23 @@
{%if build.outcome == build.SUCCEEDED%}
<!-- built images -->
+{% if hasImages %}
<div class="row-fluid span10 pull-right">
- {% if hasImages %}
- <h2>Images</h2>
- {% for target in targets %}
+ <h2>Images</h2>
+ {% for target in targets %}
{% if target.target.is_image %}
- <div class="well dashboard-section">
- <h3><a href="{% url 'target' build.pk target.target.pk %}">{{target.target}}</a>
+ <div class="well dashboard-section">
+ <h3><a href="{% url 'target' build.pk target.target.pk %}">{{target.target}}</a>
</h3>
- <dl class="dl-horizontal">
- <dt>Packages included</dt>
- <dd><a href="{% url 'target' build.pk target.target.pk %}">{{target.npkg}}</a></dd>
- <dt>Total package size</dt>
- <dd>{{target.pkgsz|filtered_filesizeformat}}</dd>
+ <dl class="dl-horizontal">
+ <dt>Packages included</dt>
+ <dd><a href="{% url 'target' build.pk target.target.pk %}">{{target.npkg}}</a></dd>
+ <dt>Total package size</dt>
+ <dd>{{target.pkgsz|filtered_filesizeformat}}</dd>
{% if target.targetHasNoImages %}
- </dl>
- <div class="row-fluid">
- <div class="alert alert-info span7">
+ </dl>
+ <div class="row-fluid">
+ <div class="alert alert-info span7">
<p>
<b>This build did not create any image files</b>
</p>
@@ -99,38 +111,81 @@
license manifest information</a> in Toaster.
</p>
</div>
- </div>
+ </div>
{% else %}
- <dt>
- <i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i>
- <a href="{% url 'targetpkg' build.pk target.target.pk %}">License manifest</a>
- </dt>
- <dd><code>{{target.target.license_manifest_path}}</code></dd>
- <dt>
- <i class="icon-question-sign get-help" title="Image files are stored in <code>/build/tmp/deploy/images/</code>"></i>
- Image files
- </dt>
- <dd>
- <ul>
+ <dt>
+ <i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i>
+
+ {% if MANAGED and build.project %}
+ License manifest
+ {% else %}
+ <a href="{% url 'targetpkg' build.pk target.target.pk %}">License manifest</a>
+ {% endif %}
+ </dt>
+ {% if MANAGED and build.project %}
+ <dd>
+ <a href="{% url 'targetpkg' build.pk target.target.pk %}">View in Toaster</a> |
+ <a href="{% url 'build_artifact' build.pk 'licensemanifest' target.target.pk %}">Download</a></dd>
+ {% else %}
+ <dd><code>{{target.target.license_manifest_path}}</code></dd>
+ {% endif %}
+ <dt>
+ <i class="icon-question-sign get-help" title="Image files are stored in <code>/build/tmp/deploy/images/</code>"></i>
+ Image files
+ </dt>
+ <dd>
+ <ul>
{% for i in target.imageFiles %}
- <li>{{i.path}}
- ({{i.size|filtered_filesizeformat}})</li>
+ {% if build.project %}
+ <li><a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">{{i.path}}</a>
+ {% else %}
+ <li>{{i.path}}
+ {% endif %}
+ ({{i.size|filtered_filesizeformat}})</li>
{% endfor %}
- </ul>
- </dd>
- </dl>
+ </ul>
+ </dd>
+ </dl>
{% endif %}
- </div>
+ </div>
{% endif %}
- {% endfor %}
-
- {% endif %}
+ {% endfor %}
</div>
+{% endif %}
{%else%}
<!-- error dump -->
{%endif%}
+<!-- other artifacts -->
+{% if build.buildartifact_set.all.count > 0 %}
+<div class="row-fluid span10 pull-right">
+<h2>Other artifacts</h2>
+
+ <div class="well dashboard-section">
+ <dl class="dl-horizontal">
+ <dt>
+ <i class="icon-question-sign get-help" title="Build artifacts discovered in <i>tmp/deploy/images</i>. Usually kernel images and kernel modules."></i>
+ Other artifacts</dt>
+ <dd><div>
+ {% for ba in build.buildartifact_set.all|dictsort:"file_name" %}
+ {% if MANAGED and build.project %}
+ <a href="{%url 'build_artifact' build.id 'buildartifact' ba.id %}">
+ {% endif %}
+ {{ba.get_local_file_name}}
+ {% if MANAGED and build.project %}
+ </a>
+ {% endif %}
+
+ ({{ba.file_size|filtered_filesizeformat}}) <br/>
+ {% endfor %}
+ </div>
+ </dd>
+
+ </div>
+
+</div>
+{% endif %}
<!-- build summary -->
<div class="row-fluid span10 pull-right">
<h2>Build summary</h2>
@@ -145,6 +200,27 @@
<div class="well span4 dashboard-section">
<h4><a href="{%url 'tasks' build.pk%}">Tasks</a></h4>
<dl>
+ {% query build.task_build outcome=4 order__gt=0 as exectask%}
+ {% if exectask.count > 0 %}
+ <dt>Failed tasks</dt>
+ <dd>
+ {% if exectask.count == 1 %}
+ <a class="error" href="{% url "task" build.id exectask.0.id %}">
+ {{exectask.0.recipe.name}}
+ <span class="task-name">{{exectask.0.task_name}}</span>
+
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
+
+ </a>
+ {% elif exectask.count > 1%}
+ <a class="error" href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>
+ {% endif %}
+ </dd>
+ {% endif %}
<dt>Total number of tasks</dt><dd><a href="{% url 'tasks' build.pk %}">{% query build.task_build order__gt=0 as alltasks %}{{alltasks.count}}</a></dd>
<dt>
Tasks executed
@@ -154,12 +230,12 @@
<dt>
Tasks not executed
<i class="icon-question-sign get-help" title="'Not executed' tasks don't need to run because their outcome is provided by another task"></i>
- </dt>
+ </dt>
<dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A0&amp;count=25&amp;search=&amp;page=1&amp;orderby=order%3A%2B">{% query build.task_build task_executed=0 order__gt=0 as noexectask%}{{noexectask.count}}</a></dd>
<dt>
Reuse
<i class="icon-question-sign get-help" title="The percentage of 'not executed' tasks over the total number of tasks, which is a measure of the efficiency of your build"></i>
- </dt>
+ </dt>
<dd>
{% query build.task_build order__gt=0 as texec %}
{% if noexectask.count|multiply:100|divide:texec.count < 0 %}
@@ -206,6 +282,33 @@
</div>
{% endif %}
+
+{% if build.toaster_exceptions.count > 0 %}
+<div class="accordion span10 pull-right" id="exceptions">
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle exception toggle-exceptions">
+ <h2 id="exception-toggle">
+ <i class="icon-warning-sign"></i>
+ {{build.toaster_exceptions.count}} Toaster exception{{build.toaster_exceptions.count|pluralize}}
+ </h2>
+ </a>
+ </div>
+ <div class="accordion-body collapse" id="collapse-exceptions">
+ <div class="accordion-inner">
+ <div class="span10">
+ {% for exception in build.toaster_exceptions %}
+ <div class="alert alert-exception">
+ <pre>{{exception.message}}</pre>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{% endif %}
+
<script type="text/javascript">
$(document).ready(function() {
//show warnings section when requested from the previous page
diff --git a/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
new file mode 100644
index 0000000000..2a4571f42e
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
@@ -0,0 +1,67 @@
+{% extends "baseprojectpage.html" %}
+
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li> {{buildrequest.get_sorted_target_list.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} {{buildrequest.get_machine}} ({{buildrequest.updated|date:"d/m/y H:i"}}) </li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <!-- begin content -->
+
+ <div class="row-fluid">
+
+ <!-- end left sidebar container -->
+ <!-- Begin right container -->
+ <div class="span10">
+ <div class="page-header">
+ <h1>
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} {{buildrequest.get_machine}} </span>
+
+ </h1>
+ </div>
+ <div class="alert alert-error">
+ <p class="lead">
+ <strong>Failed</strong>
+ on {{ buildrequest.updated|date:'d/m/y H:i' }}
+ with
+
+ <i class="icon-minus-sign error" style="margin-left:6px;"></i>
+ <strong><a class="error accordion-toggle toggle-errors" href="#errors">
+ {{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}
+ </a></strong>
+ <span class="pull-right">Build time: {{buildrequest.get_duration|sectohms}}</span>
+ </p>
+ </div>
+
+ <div class="accordion" id="errors" name="errors">
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle error toggle-errors">
+ <h2>
+ <i class="icon-minus-sign"></i>
+ {{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}
+ </h2>
+ </a>
+ </div>
+ <div class="accordion-body collapse in" id="collapse-errors">
+ <div class="accordion-inner">
+ <div class="span10">
+ {% for error in buildrequest.brerror_set.all %}
+ <div class="alert alert-error">
+ ERROR: <div class="air well"><pre>{{error.errmsg}}</pre></div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div> <!-- end of row-fluid -->
+
+
+{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/configuration.html b/bitbake/lib/toaster/toastergui/templates/configuration.html
index 49a6a89d5c..d3b34a2096 100644
--- a/bitbake/lib/toaster/toastergui/templates/configuration.html
+++ b/bitbake/lib/toaster/toastergui/templates/configuration.html
@@ -50,7 +50,9 @@
<th>Layer</th>
<th>Layer branch</th>
<th>Layer commit</th>
- <th>Layer directory</th>
+ {% if not MANAGED or not build.project %}
+ <th>Layer directory</th>
+ {% endif %}
</tr>
</thead>
<tbody>{% for lv in build.layer_version_build.all|dictsort:"layer.name" %}
@@ -61,7 +63,9 @@
<li>{{lv.commit}}</li> </ul>">
{{lv.commit|truncatechars:13}}
</a></td>
+ {% if not MANAGED or not build.project %}
<td>{{lv.layer.local_path}}</td>
+ {% endif %}
</tr>{% endfor %}
</tbody>
</table>
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
index 90ffd3de6c..fe70e7143e 100644
--- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
+++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
@@ -18,10 +18,10 @@
{% for option in f.options %}
{% if option.2 %}
<label class="radio">
- <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} ({{option.2}})
+ <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} (<span id="{{option.1}}_count">{{option.2}}</span>)
{% else %}
<label class="radio muted">
- <input type="radio" name="filter" disabled {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} ({{option.2}})
+ <input type="radio" name="filter" disabled {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} (<span id="{{option.1}}_count">{{option.2}}</span>)
{% endif %}
{% if option.3 %}<i class="icon-question-sign get-help" data-placement="right" title="{{option.3}}"></i>{% endif %}
</label>
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
new file mode 100644
index 0000000000..a4d8ee1ebd
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -0,0 +1,116 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% load static %}
+
+{% block localbreadcrumb %}
+<li>Import layer</li>
+{% endblock %}
+
+{% block projectinfomain %}
+
+ <script src="{% static 'js/importlayer.js' %}"></script>
+ <script>
+ $(document).ready(function (){
+ var ctx = {
+ xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
+ layerDetailsUrl : "{% url 'layerdetails' %}",
+ xhrImportLayerUrl : "{% url 'xhr_importlayer' %}",
+ xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
+ projectPageUrl : "{% url 'project' project.id %}",
+ projectId : {{project.id}}
+ };
+
+ try {
+ importLayerPageInit(ctx);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+ </script>
+
+ <div class="page-header">
+ <h1>Import layer</h1>
+ </div>
+
+ {% include "layers_dep_modal.html" %}
+ <form>
+ {% if project %}
+ <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span>
+ {% endif %}
+ <fieldset class="air">
+ <legend>Layer repository information</legend>
+ <div class="alert alert-error" id="import-error" style="display:none">
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
+ <h3></h3>
+ <p></p>
+ <ul></ul>
+ </div>
+
+ <div class="control-group" id="layer-name-ctrl">
+ <label class="control-label" for="import-layer-name">
+ Layer name
+ <span class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes" />
+ </label>
+ <div class="controls">
+ <input id="import-layer-name" type="text" required autofocus>
+ <span class="help-inline" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span>
+ <span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span>
+ </div>
+
+ </div>
+
+ <label for="layer-git-repo-url" class="project-form">
+ Git repository URL
+ <span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." />
+ </label>
+
+ <input type="text" id="layer-git-repo-url" class="input-xxlarge" required>
+ <label class="project-form" for="layer-subdir">
+ Repository subdirectory
+ <span class="muted">(optional)</span>
+ <span class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)" />
+ </label>
+ <input type="text" id="layer-subdir">
+
+ <div class="control-group" id="layer-revision-ctrl">
+ <label class="control-label" for="layer-git-ref">Revision
+ <span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span>
+ </label>
+ <div class="controls">
+ <input type="text" class="span4" id="layer-git-ref" required>
+ <span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span>
+ </div>
+ </div>
+
+ <label class="project-form" for="layer-description">Layer description
+ <span class="muted">(optional)</span>
+ <span class="icon-question-sign get-help" title="A short layer explanation" />
+ </label>
+ <textarea id="layer-description" class="input-xxlarge"></textarea>
+
+ </fieldset>
+ <fieldset class="air">
+ <legend>
+ Layer dependencies
+ <span class="muted">(optional)</span>
+ <span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon" />
+ </legend>
+ <ul class="unstyled configuration-list" id="layer-deps-list">
+ </ul>
+ <div class="input-append">
+ <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" placeholder="Type a layer name" id="layer-dependency" class="input-xlarge">
+ <a class="btn" type="button" id="add-layer-dependency-btn" disabled>
+ Add layer
+ </a>
+ </div>
+ <span class="help-inline">You can only add layers Toaster knows about</span>
+ </fieldset>
+ <div class="form-actions" id="form-actions">
+ <button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button>
+ <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span>
+ </div>
+ </form>
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/landing.html b/bitbake/lib/toaster/toastergui/templates/landing.html
new file mode 100644
index 0000000000..071edf86ef
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/landing.html
@@ -0,0 +1,66 @@
+{% extends "base.html" %}
+
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block pagecontent %}
+
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <!-- Empty - no data in database -->
+ <div class="hero-unit span12">
+ <button class="close" data-dismiss="alert" type="button">
+ ×
+ </button>
+ <div class="row-fluid">
+ <div class="span6">
+ <h1>
+ This is Toaster
+ </h1>
+ <p>
+ A web interface to
+ <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">
+ BitBake
+ </a>
+ , the
+ <a href="http://www.yoctoproject.org">
+ Yocto Project
+ </a>
+ build system.
+ </p>
+ <p class="hero-actions">
+ <a class="btn btn-primary btn-large" href="https://www.yoctoproject.org/documentation/toaster-manual">
+ Show me the manual
+ </a>
+ <a class="btn btn-large" href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">
+ I want to contribute
+ </a>
+ </p>
+ </div>
+ <div class="span5">
+ <a href="http://www.yoctoproject.org">
+ <img alt="Yocto Project" class="thumbnail" src="/static/img/toaster.png"/>
+ </a>
+ </div>
+ </div>
+ </div>
+ <!-- Empty - no data in database -->
+ <div class="page-header top-air">
+ <h1>
+ All builds
+ </h1>
+ </div>
+ <div class="alert alert-info lead">
+ Toaster has not recorded any builds yet. Go build something with
+ <a href="http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#test-run">
+ Knotty
+ </a>
+ or
+ <a href="https://www.yoctoproject.org/documentation/hob-manual">
+ Hob
+ </a>
+ </div>
+ </div>
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
new file mode 100644
index 0000000000..4ffd07152c
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -0,0 +1,489 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% load static %}
+{% block localbreadcrumb %}
+<li><a href="{% url 'layers' %}">All layers</a></li>
+<li>
+ {{layerversion.layer.name}} ({{layerversion.commit|truncatechars:13}})
+</li>
+{% endblock %}
+{% block projectinfomain %}
+
+
+<script src="{% static 'js/layerdetails.js' %}"></script>
+<script>
+
+ $(document).ready(function (){
+ var ctx = {
+ projectBuildUrl : "{% url 'xhr_build' %}",
+ layerDetailsUrl : "{% url 'layerdetails' %}",
+ projectPageUrl : "{% url 'project' project.id %}",
+ xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
+ xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
+ xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
+ projectId : {{project.id}},
+ projectName : "{{project.name}}",
+ numTargets : {{total_targets}},
+ numMachines: {{machines|length}},
+ layerVersion : {
+ name : "{{layerversion.layer.name}}",
+ id : {{layerversion.id}},
+ commit: "{{layerversion.commit}}",
+ inCurrentPrj : {{layer_in_project}},
+ url : "{% url 'layerdetails' layerversion.id %}",
+ sourceId: {{layerversion.layer_source_id}},
+ }
+ };
+
+ try {
+ layerDetailsPageInit(ctx);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+</script>
+
+{# If this is not an imported layer then hide the edit ui #}
+{% if layerversion.layer_source_id != 3 %}
+<style>
+ .icon-pencil {
+ display:none;
+ }
+.delete-current-value{
+ display: none;
+}
+ li .icon-trash {
+ display:none;
+ }
+ .add-deps {
+ display:none;
+ }
+</style>
+{% endif %}
+
+{% include "layers_dep_modal.html" %}
+ <div class="row-fluid span11">
+ <div class="page-header">
+ <h1>{{layerversion.layer.name}} <small class="commit" data-toggle="tooltip" title="{{layerversion.commit}}">({{layerversion.commit|truncatechars:13}})</small></h1>
+ </div>
+ </div>
+
+ <div class="row-fluid span7 tabbable">
+ <div class="alert alert-info lead" id="alert-area" style="display:none">
+ <button type="button" class="close" id="dismiss-alert" data-dismiss="alert">&times;</button>
+ <span id="alert-msg"></span>
+ </div>
+ <ul class="nav nav-pills">
+ <li class="active">
+ <a data-toggle="tab" href="#information" id="details-tab">Layer details</a>
+ </li>
+ <li>
+ <a data-toggle="tab" href="#targets" id="targets-tab">Targets ({{total_targets}})</a>
+ </li>
+ <li>
+ <a data-toggle="tab" href="#machines" id="machines-tab">Machines ({{total_machines}})</a>
+ </li>
+ </ul>
+ <div class="tab-content">
+ <span class="button-place">
+ {% if layer_in_project == 0 %}
+ <button id="add-remove-layer-btn" data-directive="add" class="btn btn-large btn-block">
+ <span class="icon-plus"></span>
+ Add the {{layerversion.layer.name}} layer to your project
+ </button>
+ {% else %}
+ <button id="add-remove-layer-btn" data-directive="remove" class="btn btn-block btn-large btn-danger">
+ <span class="icon-trash"></span>
+ Delete the {{layerversion.layer.name}} layer from your project
+ </button>
+ {% endif %}
+ </span>
+
+ <!-- layer details pane -->
+ <div name="information" id="information" class="tab-pane active">
+ <dl class="dl-horizontal">
+ <dt class="">
+ <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository"></i>
+ Repository URL
+ </dt>
+ <dd>
+ <span class="current-value">{{layerversion.layer.vcs_url}}</span>
+ {% if layerversion.get_vcs_link_url %}
+ <a href="{{layerversion.get_vcs_link_url}}/" class="icon-share get-info"></a>
+ {% endif %}
+ <form id="change-repo-form" class="control-group" style="display:none">
+ <div class="input-append">
+ <input type="text" class="input-xlarge" value="{{layerversion.layer.vcs_url}}">
+ <button data-layer-prop="vcs_url" class="btn change-btn" type="button">Save</button>
+ <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
+ </div>
+ </form>
+ <i class="icon-pencil" ></i>
+ </dd>
+ <dt>
+ <i class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></i>
+ Repository subdirectory
+ </dt>
+ <dd>
+ <span class="muted" style="display:none">Not set</span>
+ <span class="current-value">{{layerversion.dirpath}}</span>
+ {% if layerversion.get_vcs_dirpath_link_url %}
+ <a href="{{layerversion.get_vcs_dirpath_link_url}}" class="icon-share get-info"></a>
+ {% endif %}
+ <form id="change-subdir-form" style="display:none;">
+ <div class="input-append">
+ <input type="text" value="{{layerversion.dirpath}}">
+ <button data-layer-prop="dirpath" class="btn change-btn" type="button">Save</button>
+ <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
+ </div>
+ </form>
+ <i id="change-subdir" class="icon-pencil"></i>
+ <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
+ </dd>
+ <dt>Brach, tag or commit</dt>
+ <dd>
+ <span class="current-value">{{layerversion.commit}}</span>
+ <form style="display:none;">
+ <div class="input-append">
+ <input type="text" value="{{layerversion.commit}}">
+ <button data-layer-prop="commit" class="btn change-btn" type="button">Save</button>
+ <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
+ </div>
+ </form>
+ <i class="icon-pencil"></i>
+ </dd>
+ <dt>
+ <i class="icon-question-sign get-help" title="Other layers this layer depends upon"></i>
+ Layer dependencies
+ </dt>
+ <dd>
+ <ul class="unstyled" id="layer-deps-list">
+ {% for ld in layerversion.dependencies.all %}
+ <span class="current-value">
+ <li data-layer-id="{{ld.depends_on.id}}">
+ <!-- TODO use ld.depends_on.get_vcs_reference instead of commit -->
+ <a data-toggle="tooltip" title="{{ld.depends_on.layer.vcs_url}} | {{ld.depends_on.commit}}" href="{% url 'layerdetails' ld.depends_on.id %}">{{ld.depends_on.layer.name}}</a>
+ <span class="icon-trash " data-toggle="tooltip" title="Delete"></span>
+ </li>
+ </span>
+ {% endfor %}
+ </ul>
+ <div class="input-append add-deps">
+ <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" placeholder="Type a layer name" id="layer-dep-input">
+ <a class="btn" type="button" id="add-layer-dependency-btn" disabled>
+ Add layer
+ </a>
+ </div>
+ <span class="help-block add-deps">You can only add layers Toaster knows about</span>
+ </dd>
+ </dl>
+ </div>
+ <!-- targets tab -->
+ <div name="targets" id="targets" class="tab-pane">
+ {% if total_targets == 0 %}
+ <div class="alert alert-info">
+ There is no target information for the <strong> {{layerversion.layer.name}} </strong> layer.
+ </div>
+ {% else %}
+
+ <div class="row-fluid">
+
+ {% if targets.paginator.count == 0 %}
+ <div class="alert">
+ <h3>No targets found</h3>
+ {% endif %}
+
+ {# only show the search form if we have more than 10 results #}
+ {% if targets.paginator.count > 10 or request.GET.targets_search %}
+ {% if targets.paginator.count == 0 %}
+ <form class="input-append">
+ {% else %}
+ <form class="navbar-search input-append pull-left">
+ {% endif %}
+
+ <input type="text" id="target-search" name="targets_search" placeholder="Search targets" class="input-xlarge" value="{{request.GET.targets_search}}">
+ {% if request.GET.targets_search %}
+ <a class="add-on btn target-search-clear">
+ <i class="icon-remove"></i>
+ </a>
+ {% endif %}
+ <button type="submit" class="btn">Search</button>
+ {% if targets.paginator.count == 0 %}
+ <button type="submit" class="btn btn-link target-search-clear">Show all targets</a>
+ {% endif %}
+ </form>
+ {% endif %}
+
+ {% if targets.paginator.count == 0 %}
+ <!-- end alert -->
+ </div>
+ <!-- end row-fluid -->
+ </div>
+ {% else %}
+
+ {% if total_targets > 10 %}
+ <div class="pull-right">
+ <span class="help-inline" style="padding-top:5px;">Show rows:</span>
+ <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ {% if request.session.limit == i %}
+ <option value="{{i}}" selected>{{i}}</option>
+ {% else %}
+ <option value="{{i}}">{{i}}</option>
+ {% endif %}
+ {% endfor %}
+ {% endwith %}
+ </select>
+ </div>
+ {% endif %}
+ </div>
+
+ <table class="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th>
+ <i class="icon-question-sign get-help" title="Information about a single piece of software, including where to download the source, configuration options, how to compile the source files and how to package the compiled output"></i>
+ Target
+ {% if request.GET.targets_search %}
+ <span class="badge badge-info">{{targets.paginator.count}}</span>
+ {% endif %}
+ </th>
+ <th>
+ <i class="icon-question-sign get-help" title="The recipe version and revision"></i>
+ Target version
+ </th>
+ <th class="span4">Description</th>
+ <th class="span2">Build target</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for target in targets %}
+ <tr>
+ <td>
+ {{target.name}}
+ {% if target.up_id %}
+ <a href="{{target.get_layersource_view_url}}" class="icon-share get-info" target="_blank"></a>
+ {% endif %}
+ </td>
+ <td>{{target.version}}</td>
+ <td>{{target.summary}}</td>
+ <td><button class="btn btn-block build-target-btn" data-target-name="{{target.name}}" {% if layer_in_project == 0 %}disabled="disabled"{% endif %} >Build target</button></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if total_targets > 10 %}
+ <!-- Show pagination controls -->
+ <div class="pagination">
+ <ul>
+ {%if targets.has_previous %}
+ <li><a href="?tpage={{targets.previous_page_number}}{{request.GET.limit}}#targets">&laquo;</a></li>
+ {%else%}
+ <li class="disabled"><a href="#">&laquo;</a></li>
+ {%endif%}
+ {% for i in targets.paginator.page_range %}
+ <li {%if i == targets.number %} class="active" {%endif%}><a href="?tpage={{i}}#targets">{{i}}</a></li>
+ {% endfor %}
+ {%if targets.has_next%}
+ <li><a href="?tpage={{targets.next_page_number}}#targets">&raquo;</a></li>
+ {%else%}
+ <li class="disabled"><a href="#">&raquo;</a></li>
+ {%endif%}
+ </ul>
+ <div class="pull-right">
+ <span class="help-inline" style="padding-bottom:10px;">Show rows:</span>
+ <select class="pagesize">
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ {% if request.session.limit == i %}
+ <option value="{{i}}" selected>{{i}}</option>
+ {% else %}
+ <option value="{{i}}">{{i}}</option>
+ {% endif %}
+ {% endfor %}
+ {% endwith %}
+ </select>
+ </div>
+ </div>
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ </div>
+
+
+ <div name="machines" id="machines" class="tab-pane">
+ {% if total_machines == 0 %}
+ <div class="alert alert-info">
+ There is no machine information for the <strong>{{layerversion.layer.name}}</strong> layer.
+ </div>
+ {% else %}
+
+ <div class="row-fluid">
+
+ {% if machines.paginator.count == 0 %}
+ <div class="alert">
+ <h3>No machines found</h3>
+ {% endif %}
+
+ {# only show the search form if we have more than 10 results #}
+ {% if machines.paginator.count > 10 or request.GET.machines_search %}
+ {% if machines.paginator.count == 0 %}
+ <form class="input-append">
+ {% else %}
+ <form class="navbar-search input-append pull-left">
+ {% endif %}
+
+ <input type="text" id="machine-search" name="machines_search" placeholder="Search machines" class="input-xlarge" value="{{request.GET.machines_search}}">
+ {% if request.GET.machines_search %}
+ <a class="add-on btn machine-search-clear">
+ <i class="icon-remove"></i>
+ </a>
+ {% endif %}
+ <button type="submit" class="btn">Search</button>
+ {% if machines.paginator.count == 0 %}
+ <button type="submit" class="btn btn-link machine-search-clear">Show all machines</a>
+ {% endif %}
+ </form>
+ {% endif %}
+
+ {% if machines.paginator.count == 0 %}
+ <!-- end alert -->
+ </div>
+ <!-- end row-fluid -->
+ </div>
+
+ {% else %}
+
+ {% if total_machines > 10 %}
+ <div class="pull-right">
+ <span class="help-inline" style="padding-top:5px;">Show rows:</span>
+ <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ {% if request.session.limit == i %}
+ <option value="{{i}}" selected>{{i}}</option>
+ {% else %}
+ <option value="{{i}}">{{i}}</option>
+ {% endif %}
+ {% endfor %}
+ {% endwith %}
+ </select>
+ </div>
+ {% endif %}
+
+ </div>
+
+ <table class="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th>
+ <i class="icon-question-sign get-help" title="The machine is the hardware for which you are building"></i>
+ Machine
+ {% if request.GET.machines_search %}
+ <span class="badge badge-info">{{machines.paginator.count}}</span>
+ {% endif %}
+ </th>
+ <th>Description</th>
+ <th class="span2">Select machine</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for machine in machines %}
+ <tr>
+ <td>{{machine.name}}</td>
+ <td>{{machine.description}}</td>
+ <td><button class="btn btn-block select-machine-btn" data-machine-name="{{machine.name}}" {% if layer_in_project == 0 %}disabled="disabled"{% endif %}}>Select machine</button></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if total_machines > 10 %}
+ <!-- Show pagination controls -->
+ <div class="pagination">
+ <ul>
+ {%if machines.has_previous %}
+ <li><a href="?mpage={{machines.previous_page_number}}{{request.GET.limit}}#machines">&laquo;</a></li>
+ {%else%}
+ <li class="disabled"><a href="#">&laquo;</a></li>
+ {%endif%}
+ {% for i in machines.paginator.page_range %}
+ <li {%if i == machines.number %} class="active" {%endif%}><a href="?mpage={{i}}#machines">{{i}}</a></li>
+ {% endfor %}
+ {%if machines.has_next%}
+ <li><a href="?mpage={{machines.next_page_number}}#machines">&raquo;</a></li>
+ {%else%}
+ <li class="disabled"><a href="#">&raquo;</a></li>
+ {%endif%}
+ </ul>
+ <div class="pull-right">
+ <span class="help-inline" style="padding-bottom:10px;">Show rows:</span>
+ <select class="pagesize">
+ {% with "10 25 50 100 150" as list%}
+ {% for i in list.split %}
+ {% if request.session.limit == i %}
+ <option value="{{i}}" selected>{{i}}</option>
+ {% else %}
+ <option value="{{i}}">{{i}}</option>
+ {% endif %}
+ {% endfor %}
+ {% endwith %}
+ </select>
+ </div>
+ </div>
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ <div class="row-fluid span4 well">
+ <h2>About {{layerversion.layer.name}}</h2>
+ <dl class="item-info">
+
+ <dt>
+ Summary
+ <i class="icon-question-sign get-help" title="One-line description of the layer"></i>
+ </dt>
+ <dd>
+ <span class="muted" style="display:none">Not set</span>
+ <span class="current-value">{{layerversion.layer.summary}}</span>
+ <form style="display:none; margin-bottom:20px">
+ <textarea class="span12" rows="2">{% if layerversion.layer.summary %}{{layerversion.layer.summary}}{% endif %}</textarea>
+ <button class="btn change-btn" data-layer-prop="summary" type="button">Save</button>
+ <a href="#" class="btn btn-link cancel">Cancel</a>
+ </form>
+ <i class="icon-pencil"></i>
+ <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
+ </dd>
+ <dt>
+ Description
+ </dt>
+ <dd>
+ <span class="muted" style="display:none">Not set</span>
+ <span class="current-value">{{layerversion.layer.description}}</span>
+ <form style="display:none; margin-bottom:20px">
+ <textarea class="span12" rows="6">{% if layerversion.layer.description %}{{layerversion.layer.description}}{% endif %}</textarea>
+ <button class="btn change-btn" data-layer-prop="description" type="button" >Save</button>
+ <a href="#" class="btn btn-link cancel">Cancel</a>
+ </form>
+ <i class="icon-pencil"></i>
+ <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
+ </dd>
+ </dd>
+ {% if layerversion.layer.up_id %}
+ <dt>Layer index</dt>
+ <dd>
+ <a href="http://layers.openembedded.org/layerindex/branch/{{layerversion.up_branch.name}}/layer/{{layerversion.layer.name}}"/>layer index link</a>
+
+ </dd>
+ {% endif %}
+
+ </dl>
+ </div>
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html
new file mode 100644
index 0000000000..33160e5968
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
@@ -0,0 +1,288 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Layers</li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <div class="page-header">
+ <h1>
+ {% if request.GET.filter and total_count > 0 or request.GET.search and total_count > 0 %}
+ {{total_count}} layer{{total_count|pluralize}} found
+ {% elif request.GET.filter and total_count == 0 or request.GET.search and total_count == 0 %}
+ No layers found
+ {%else%}
+ All layers
+ {%endif%}
+ <i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with {{project.release.name}} that Toaster knows about."></i>
+ </h1>
+ </div>
+
+ <div id="zone1alerts">
+ </div>
+
+{% if objects.paginator.count == 0 %}
+ <div class="row-fluid">
+ <div class="alert">
+ <form class="no-results input-append" id="searchform">
+ <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
+ <button class="btn" type="submit" value="Search">Search</button>
+ <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all layers</button>
+ </form>
+ </div>
+ </div>
+
+{% else %}
+
+{% include "basetable_top_layers.html" %}
+ {% for o in objects %}
+ <tr class="data">
+ <td class="layer"><a href="{% url 'layerdetails' o.id %}">{{o.layer.name}}</a></td>
+ <td class="description">{% if o.layer.summary %}{{o.layer.summary}}{%endif%}</td>
+ <td class="source"><a href="{% url 'layerdetails' o.pk %}">{{o.layer_source.name}}</a></td>
+ <td class="git-repo"><a href="{% url 'layerdetails' o.pk %}"><code>{{o.layer.vcs_url}}</code></a>
+ {% if o.get_vcs_link_url %}
+ <a target="_blank" href="{{ o.get_vcs_link_url }}"><i class="icon-share get-info"></i></a>
+ {% endif %}
+ </td>
+ <td class="git-subdir" style="display: table-cell;"><a href="{% url 'layerdetails' o.pk %}"><code>{{o.dirpath}}</code></a>
+ {% if o.dirpath and o.get_vcs_dirpath_link_url %}
+ <a target="_blank" href="{{ o.get_vcs_dirpath_link_url }}"><i class="icon-share get-info"></i></a>
+ {% endif %}
+ </td>
+ <td class="branch">
+ {% if o.branch %}
+ {{o.branch}}
+ {% else %}
+ {{o.up_branch.name}}
+ <i class="icon-question-sign get-help hover-help" title="Your builds will use the tip of the branch you have cloned or downloaded to your computer, so nothing will be fetched"></i>
+ {% endif %}
+ </td>
+ <td class="dependencies">
+ {% with ods=o.dependencies.all%}
+ {% if ods.count %}
+ <a class="btn"
+ title="<a href='{% url "layerdetails" o.pk %}'>{{o.layer.name}}</a> dependencies"
+ data-content="<ul class='unstyled'>
+ {% for i in ods%}
+ <li><a href='{% url "layerdetails" i.depends_on.pk %}'>{{i.depends_on.layer.name}}</a></li>
+ {% endfor %}
+ </ul>">
+ {{ods.count}}
+ </a>
+ {% endif %}
+ {% endwith %}
+ </td>
+ {% if project %}
+ <td class="add-del-layers" value="{{o.pk}}">
+ <div id="layer-tooltip-{{o.pk}}" style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner">layer was modified</div>
+ <button id="layer-del-{{o.pk}}" class="btn btn-danger btn-block remove-layer layerbtn" style="display:none;" onclick="layerDel({{o.pk}}, '{{o.layer.name}}', '{%url 'layerdetails' o.pk%}')" >
+ <i class="icon-trash"></i>
+ Delete layer
+ </button>
+ <button id="layer-add-{{o.pk}}" class="btn btn-block layerbtn" style="display:none;" onclick="layerAdd({{o.pk}}, '{{o.layer.name}}', '{%url 'layerdetails' o.pk%}')" title="layer added">
+ <i class="icon-plus"></i>
+ Add layer
+ </button>
+ </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+{% include "basetable_bottom.html" %}
+
+ <!-- Modals -->
+
+ <!-- 'Layer dependencies modal' -->
+ <div id="dependencies_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
+ <form id="dependencies_modal_form">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span class="layer-name"></span> dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p><strong class="layer-name"></strong> depends on some layers that are not added to your project. Select the ones you want to add:</p>
+ <ul class="unstyled" id="dependencies_list">
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" type="submit">Add layers</button>
+ <button class="btn" type="reset" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+
+{% if project %}
+<script>
+
+var tooltipUpdateText;
+
+function _makeXHREditCall(data, onsuccess, onfail) {
+ $.ajax( {
+ type: "POST",
+ url: "{% url 'xhr_projectedit' project.id %}",
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ updateButtons(_data.layers.map(function (e) {return e.id}));
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ console.warn("Call failed");
+ console.warn(_data);
+ }
+ });
+}
+
+function updateLayerCountLabels (amount) {
+ /* Update the filter labels */
+ var countLabel = $("#projectlayer__project\\:{{project.id}}_count");
+ countLabel.text(Number(countLabel.text())+amount);
+
+ var countLabelRemaining = $("#projectlayer__project\\:NOT{{project.id}}_count");
+ countLabelRemaining.text(Number(countLabelRemaining.text())-amount);
+}
+
+
+function layerDel(layerId, layerName, layerURL) {
+ tooltipUpdateText = "1 layer deleted";
+ _makeXHREditCall({ 'layerDel': layerId }, function () {
+ updateLayerCountLabels(-1);
+
+ show_alert("You have deleted <strong>1</strong> layer from <a href=\"{% url 'project' project.id%}\">{{project.name}}</a>: <a href=\""+layerURL+"\">" + layerName +"</a>");
+ });
+}
+
+function show_alert(text, cls) {
+ $("#zone1alerts").html("<div class=\"alert alert-info lead\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" + text + "</div>");
+}
+
+function show_dependencies_modal(layerId, layerName, layerURL, dependencies) {
+ // update layer name
+ $('.layer-name').text(layerName);
+ var deplistHtml = "";
+ for (var i = 0; i < dependencies.length; i++) {
+ deplistHtml += "<li><label class=\"checkbox\"><input name=\"dependencies\" value=\""
+ deplistHtml += dependencies[i].id;
+ deplistHtml +="\" type=\"checkbox\" checked=\"checked\"/>";
+ deplistHtml += dependencies[i].name;
+ deplistHtml += "</label></li>";
+ }
+ $('#dependencies_list').html(deplistHtml);
+
+ var selected = [layerId];
+ var layer_link_list = "<a href='"+layerURL+"'>"+layerName+"</a>";
+
+ $("#dependencies_modal_form").submit(function (e) {
+ e.preventDefault();
+ $("input[name='dependencies']:checked").map(function () { selected.push(parseInt($(this).val()))});
+ if (selected.length > 1) {
+ tooltipUpdateText = "" + selected.length + " layers added";
+ } else {
+ tooltipUpdateText = "1 layer added";
+ }
+
+ for (var i = 0; i < selected.length; i++) {
+ for (var j = 0; j < dependencies.length; j++) {
+ if (dependencies[j].id == selected[i]) {
+ layer_link_list+= ", <a href='"+dependencies[j].layerdetailurl+"'>"+dependencies[j].name+"</a>"
+ break;
+ }
+ }
+ }
+
+ $('#dependencies_modal').modal('hide');
+
+ {% if project %}
+ _makeXHREditCall({ 'layerAdd': selected.join(",") }, function () {
+ show_alert("You have added <strong>"+selected.length+"</strong> layers to <a href=\"{% url 'project' project.id%}\">{{project.name}}</a>: " + layer_link_list);
+ });
+ {% endif %}
+
+ });
+ $('#dependencies_modal').modal('show');
+}
+
+
+function layerAdd(layerId, layerName, layerURL) {
+ $.ajax({
+ url: '{% url "xhr_datatypeahead" %}',
+ data: {'type': 'layerdeps','value':layerId},
+ success: function(_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ updateLayerCountLabels(_data.list.length+1);
+
+ if (_data.list.length > 0) {
+ show_dependencies_modal(layerId, layerName, layerURL, _data.list);
+ }
+ else {
+ tooltipUpdateText = "1 layer added";
+ _makeXHREditCall({ 'layerAdd': layerId }, function () {
+ show_alert("You have added <strong>1</strong> layer to <a href=\"{% url 'project' project.id%}\">{{project.name}}</a>: <a href=\""+layerURL+"\">" + layerName +"</a>");
+ });
+ }
+ }
+ }
+ })
+}
+
+function button_set(id, state) {
+ var tohide, toshow;
+ if (state == "add")
+ {
+ tohide = "#layer-del-";
+ toshow = "#layer-add-";
+ }
+ else if (state == "del")
+ {
+ tohide = "#layer-add-";
+ toshow = "#layer-del-";
+ }
+
+
+ var previouslyvisible = $(tohide + id).is(":visible");
+ if (previouslyvisible) {
+ $(tohide + id).fadeOut( function() {
+ $("#layer-tooltip-" + id).text(tooltipUpdateText);
+ $("#layer-tooltip-" + id).fadeIn().delay(2000).fadeOut(function(){
+ $(toshow + id).delay(300).fadeIn();
+ });
+ });
+ } else {
+ $(tohide + id).hide();
+ $("#layer-tooltip-" + id).hide();
+ $(toshow + id).show();
+ }
+};
+
+function updateButtons(projectLayers) {
+ var displayedLayers = [];
+ $(".add-del-layers").map(function () { displayedLayers.push(parseInt($(this).attr('value')))});
+ for (var i=0; i < displayedLayers.length; i++) {
+ if (projectLayers.indexOf(displayedLayers[i]) > -1) {
+ button_set(displayedLayers[i], "del");
+ }
+ else {
+ button_set(displayedLayers[i], "add");
+ }
+ }
+}
+
+$(document).ready(function (){
+ $('.layerbtn').tooltip({ trigger: 'manual' });
+ updateButtons({{projectlayerset}});
+});
+
+</script>
+{%endif%}
+
+{%endif%}
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layers_dep_modal.html b/bitbake/lib/toaster/toastergui/templates/layers_dep_modal.html
new file mode 100644
index 0000000000..8222027d4f
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/layers_dep_modal.html
@@ -0,0 +1,99 @@
+<!-- 'Layer dependencies modal' -->
+ <div id="dependencies_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
+ <form id="dependencies_modal_form">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span id="title"></span> dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p id="body-text"> <strong id="layer-name"></strong> depends on some layers that are not added to your project. Select the ones you want to add:</p>
+ <ul class="unstyled" id="dependencies_list">
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" type="submit">Add layers</button>
+ <button class="btn" type="reset" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+
+<script>
+ /* projectId: current project
+ * layer: Object representing the parent layer { id: .. name: ... url }
+ * dependencies: array of dependency layer objects { id: .. name: ..}
+ * title: optional override for title
+ * body: optional override for body
+ * addToProject: Whether to add layers to project on accept
+ * successAdd: function to run on success
+ */
+function show_layer_deps_modal(projectId, layer, dependencies, title, body, addToProject, successAdd) {
+
+ // update layer name
+ if (title) {
+ $('#dependencies_modal #title').text(title);
+ } else {
+ $('#dependencies_modal #title').text(layer.name);
+ }
+
+ if (body) {
+ $("#dependencies_modal #body-text").html(body);
+ } else {
+ $("#dependencies_modal #layer-name").text(layer.name);
+ }
+
+ var deplistHtml = "";
+ for (var i = 0; i < dependencies.length; i++) {
+ deplistHtml += "<li><label class=\"checkbox\"><input name=\"dependencies\" value=\"";
+ deplistHtml += dependencies[i].id;
+ deplistHtml +="\" type=\"checkbox\" checked=\"checked\"/>";
+ deplistHtml += dependencies[i].name;
+ deplistHtml += "</label></li>";
+ }
+ $('#dependencies_list').html(deplistHtml);
+
+ var selected = [];
+ /* -1 is a special dummy Id which we use when the layer isn't yet in the
+ * system, normally we would add the current layer to the selection.
+ */
+ if (layer.id != -1)
+ selected.push(layer.id);
+
+ var layer_link_list = "<a href='"+layer.url+"'>"+layer.name+"</a>";
+
+ $("#dependencies_modal_form").submit(function (e) {
+ e.preventDefault();
+ $("input[name='dependencies']:checked").map(function () { selected.push(parseInt($(this).val()))});
+ if (selected.length > 1) {
+ tooltipUpdateText = "" + selected.length + " layers added";
+ } else {
+ tooltipUpdateText = "1 layer added";
+ }
+
+ for (var i = 0; i < selected.length; i++) {
+ for (var j = 0; j < dependencies.length; j++) {
+ if (dependencies[j].id == selected[i]) {
+ layer_link_list+= ", <a href='"+dependencies[j].layerdetailurl+"'>"+dependencies[j].name+"</a>"
+ break;
+ }
+ }
+ }
+
+ $('#dependencies_modal').modal('hide');
+
+ if (addToProject) {
+ var editProjectUrl = "{% url 'xhr_projectedit' project.id %}";
+ libtoaster.editProject(editProjectUrl, projectId, { 'layerAdd': selected.join(",") }, function () {
+ if (successAdd) {
+ successAdd(selected);
+ }
+ }, function () {
+ console.log ("Adding layers to project failed");
+ });
+ } else {
+ successAdd(selected);
+ }
+ });
+
+ $('#dependencies_modal').modal('show');
+}
+</script>
diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html
new file mode 100644
index 0000000000..18e7485d50
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/machines.html
@@ -0,0 +1,63 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Machines</li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <div class="page-header">
+ <h1>
+ All machines
+ <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
+ </h1>
+ </div>
+ <!--div class="alert">
+ <div class="input-append" style="margin-bottom:0px;">
+ <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" />
+ <a class="add-on btn">
+ <i class="icon-remove"></i>
+ </a>
+ <button class="btn" type="button">Search</button>
+ <a class="btn btn-link" href="#">Show all targets</a>
+ </div>
+ </div-->
+ <div id="target-added" class="alert alert-info lead" style="display:none;"></div>
+ <div id="target-removed" class="alert alert-info lead" style="display:none;">
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
+ <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
+ </div>
+
+
+{% include "basetable_top.html" %}
+ {% for o in objects %}
+ <tr class="data">
+ <td class="machine">
+ {{o.name}}
+ <a machine="_blank" href="http://layers.openembedded.org/layerindex/branch/master/machines/?q=3g-router-image"><i class="icon-share get-info"></i></a>
+ </td>
+ <td class="description">{{o.description}}</td>
+ <td class="machine-file">
+ <code>{{o.file_path}}</code>
+ <a href="http://github.com/embeddedgeeks/meta-embeddedgeeks/blob/master/machines-core/images/3g-router-image.bb" machine="_blank"><i class="icon-share get-info"></i></a>
+ </td>
+ <td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td>
+ <td class="source">{{o.layer_source.name}}</td>
+ <td class="branch">{{o.layer_version.commit}}</td>
+ <td class="build">
+ <a id="build-machine" href="project-with-machines.html?machine=3g-router-image" class="btn btn-block" style="display:none;">
+ Build machine
+ </a>
+ <a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added">
+ <i class="icon-plus"></i>
+ Add layer
+ <i class="icon-question-sign get-help" title="To build this machine, you must first add the meta-embeddedgeeks layer to your project"></i>
+ </a>
+ </td>
+ </tr>
+ {% endfor %}
+
+{% include "basetable_bottom.html" %}
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html
new file mode 100644
index 0000000000..183be760ae
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/managed_builds.html
@@ -0,0 +1,135 @@
+{% extends "base.html" %}
+
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block pagecontent %}
+<div class="row-fluid">
+
+ {% include "managed_mrb_section.html" %}
+
+
+ {% if 1 %}
+ <div class="page-header top-air">
+ <h1>
+ {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
+ {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
+ {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
+ No builds found
+ {%else%}
+ All builds
+ {%endif%}
+ </h1>
+ </div>
+
+ {% if objects.paginator.count == 0 %}
+ <div class="row-fluid">
+ <div class="alert">
+ <form class="no-results input-append" id="searchform">
+ <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
+ <button class="btn" type="submit" value="Search">Search</button>
+ <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
+ </form>
+ </div>
+ </div>
+
+
+ {% else %} {# We have builds to display #}
+ {% include "basetable_top_buildprojects.html" %}
+ <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
+ {% for buildrequest in objects %}{% if buildrequest.build %} {% with build=buildrequest.build %} {# if we have a build, just display it #}
+ <tr class="data">
+ <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
+ <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
+ <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
+ <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
+ <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
+ <td class="failed_tasks error">
+ {% query build.task_build outcome=4 order__gt=0 as exectask%}
+ {% if exectask.count == 1 %}
+ <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
+ {% elif exectask.count > 1%}
+ <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
+ {%endif%}
+ </td>
+ <td class="errors_no">
+ {% if build.errors_no %}
+ <a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ {% if MANAGED and build.project and build.buildartifact_set.count %}
+ <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
+ </a>
+ {% endif %}
+ {%endif%}
+ </td>
+ <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
+ <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
+ {% if not MANAGED or not build.project %}
+ <td class="log">{{build.cooker_log_path}}</td>
+ {% endif %}
+ <td class="output">
+ {% if build.outcome == build.SUCCEEDED %}
+ <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
+ {% endif %}
+ </td>
+ {% if MANAGED %}
+ <td class="project">
+ {% if build.project %}
+ <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a>
+ {% endif %}
+ </td>
+ {% endif %}
+ </tr>
+
+
+ {%endwith%}
+ {% else %} {# we don't have a build for this build request, mask the data with build request data #}
+
+
+
+ <tr class="data">
+ <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
+ <td class="target">
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}"><span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
+ </td>
+ <td class="machine">
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a>
+ </td>
+ <td class="started_on">
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a>
+ </td>
+ <td class="completed_on">
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.updated|date:"d/m/y H:i"}}</a>
+ </td>
+ <td class="failed_tasks error">
+ </td>
+ <td class="errors_no">
+ <a class="errors_no error" href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}#errors">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a>
+ </td>
+ <td class="warnings_no">
+ </td>
+ <td class="time">
+ {{br.timespent.total_seconds|sectohms}}
+ </td>
+ <td class="output"> {# we have no output here #}
+ </td>
+ <td class="project">
+ <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a>
+ </td>
+ </tr>
+ {%endif%}
+ {% endfor %}
+
+
+ {% include "basetable_bottom.html" %}
+ {% endif %} {# objects.paginator.count #}
+{% endif %} {# empty #}
+</div><!-- end row-fluid-->
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html
new file mode 100644
index 0000000000..d2ffdcdc3d
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html
@@ -0,0 +1,190 @@
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+
+{%if mru.count > 0%}
+
+ <div class="page-header top-air">
+ <h1>
+ Latest builds
+ </h1>
+ </div>
+ <div id="latest-builds">
+ {% for buildrequest in mru %}{% with build=buildrequest.build %}
+
+ {% if build %} {# if we have a build, just display it #}
+
+ <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} ">
+ {% if MANAGED and build.project %}
+ <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span>
+ {% endif %}
+
+ <div class="row-fluid">
+ <div class="span3 lead">
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
+ {% endif %}
+ <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%}
+ </span>
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ </a>
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if build.completed_on|format_build_date %}
+ {{ build.completed_on|date:'d/m/y H:i' }}
+ {% else %}
+ {{ build.completed_on|date:'H:i' }}
+ {% endif %}
+ </div>
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ <div class="span2 lead">
+ {% if build.errors_no %}
+ <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if build.warnings_no %}
+ <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
+ {% endif %}
+ </div>
+ <div class="lead ">
+ <span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}">
+ Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
+ </span>
+ {% if build.project %}
+ <button class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
+ {% endif %}
+ </div>
+ {%endif%}
+ {%if build.outcome == build.IN_PROGRESS %}
+ <div class="span4">
+ <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
+ <div style="width: {{build.completeper}}%;" class="bar"></div>
+ </div>
+ </div>
+ <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div>
+ {%endif%}
+ </div>
+ </div>
+
+ {% else %} {# we use the project's page recent build design #}
+
+
+
+
+ <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %} project-name">
+ <span class="label label-danger"> {{buildrequest.project.name}} </span>
+ <div class="row-fluid">
+
+ {% if buildrequest.state == buildrequest.REQ_FAILED %}
+ <div class="span3 lead">
+ <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk%}" class="error">
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ </a>
+ </div>
+ <div class="span2 lead">
+ {% if buildrequest.updated|format_build_date %}
+ {{ buildrequest.updated|date:'d/m/y H:i' }}
+ {% else %}
+ {{ buildrequest.updated|date:'H:i' }}
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if buildrequest.brerror_set.all.count %}
+ <i class="icon-minus-sign red"></i> <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk %}#errors" class="error">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a>
+ {% endif %}
+ </div>
+ <div class="span2 lead"> {# there are no warnings for buildrequests #}
+ </div>
+ <div class="lead ">
+ <span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}">
+ Build time: <a href="{% url 'buildrequestdetails' buildrequest.project.id buildrequest.pk %}">{{ buildrequest.get_duration|sectohms }}</a>
+ </span>
+ <button class="btn btn-danger pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' buildrequest.project.id as bpi%}{{bpi|json}}, {{buildrequest.project.name|json}}, {{buildrequest.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
+
+ </div>
+
+
+ {% elif buildrequest.state == buildrequest.REQ_QUEUED %}
+
+ <div class="lead span5">
+
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ </div>
+ <div class="span4 lead" >Build queued
+ <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i>
+ </div>
+
+ {% elif buildrequest.state == buildrequest.REQ_CREATED %}
+
+ <div class="lead span3">
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ </div>
+ <div class="span6" >
+ <span class="lead">Creating build</span>
+ </div>
+
+ {% elif buildrequest.state == buildrequest.REQ_INPROGRESS %}
+
+ <div class="lead span5">
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ </div>
+ <div class="span4 lead">
+ Checking out layers
+ </div>
+ {% else %}
+
+ <div>FIXME!</div>
+
+ {% endif %}
+ <div class="lead pull-right">
+ </div>
+ </div>
+ </div>
+
+
+
+ {% endif %} {# this ends the build request most recent build section #}
+
+{%endwith%}{% endfor %}
+ </div>
+
+<script>
+
+function _makeXHRBuildCall(url, data, onsuccess, onfail) {
+ $.ajax( {
+ type: "POST",
+ url: url,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ alert(_data.error);
+ } else {
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ alert("Call failed");
+ console.log(_data);
+ if (onfail) onfail(data);
+ } });
+}
+
+
+function scheduleBuild(url, projectName, buildlist) {
+ console.log("scheduleBuild");
+ _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) {
+
+ $('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' +
+ '<div class="span4 lead">' + buildlist.join(" ") +
+ '</div><div class="span4 lead pull-right">Build queued. Your build will start shortly.</div></div></div>');
+ });
+}
+
+</script>
+
+{%endif%}
+
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
new file mode 100644
index 0000000000..432955ab88
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -0,0 +1,108 @@
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+
+{%if mru.count > 0%}
+
+ <div class="page-header top-air">
+ <h1>
+ Latest builds
+ </h1>
+ </div>
+ <div id="latest-builds">
+ {% for build in mru %}
+ <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} ">
+ {% if MANAGED and build.project %}
+ <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span>
+ {% endif %}
+
+ <div class="row-fluid">
+ <div class="span3 lead">
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
+ {% endif %}
+ <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%}
+ </span>
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ </a>
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if build.completed_on|format_build_date %}
+ {{ build.completed_on|date:'d/m/y H:i' }}
+ {% else %}
+ {{ build.completed_on|date:'H:i' }}
+ {% endif %}
+ </div>
+ {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
+ <div class="span2 lead">
+ {% if build.errors_no %}
+ <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if build.warnings_no %}
+ <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
+ {% endif %}
+ </div>
+ <div class="lead ">
+ <span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}">
+ Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
+ </span>
+ {% if MANAGED and build.project %}
+ <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick="scheduleBuild({% url 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})">Run again</a>
+ {% endif %}
+ </div>
+ {%endif%}
+ {%if build.outcome == build.IN_PROGRESS %}
+ <div class="span4">
+ <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
+ <div style="width: {{build.completeper}}%;" class="bar"></div>
+ </div>
+ </div>
+ <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div>
+ {%endif%}
+ </div>
+ </div>
+
+ {% endfor %}
+ </div>
+
+<script>
+
+function _makeXHRBuildCall(url, data, onsuccess, onfail) {
+ $.ajax( {
+ type: "POST",
+ url: url,
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ console.warn("Call failed");
+ console.warn(_data);
+ if (onfail) onfail(data);
+ } });
+}
+
+
+function scheduleBuild(url, projectName, buildlist) {
+ console.warn("scheduleBuild");
+ _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) {
+
+ $('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' +
+ '<div class="span4 lead">' + buildlist.join(" ") +
+ '</div><div class="span4 lead pull-right">Build queued. Your build will start shortly.</div></div></div>');
+ });
+}
+
+</script>
+
+{%endif%}
+
diff --git a/bitbake/lib/toaster/toastergui/templates/newproject.html b/bitbake/lib/toaster/toastergui/templates/newproject.html
new file mode 100644
index 0000000000..0265564762
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/newproject.html
@@ -0,0 +1,99 @@
+{% extends "base.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% block pagecontent %}
+<div class="row-fluid">
+ <div class="page-header">
+ <h1>Create a new project</h1>
+ </div>
+ <div class="container-fluid">
+ {% if alert %}
+ <div class="alert alert-error row-fluid" role="alert">{{alert}}</div>
+ {% endif %}
+ </div>
+ {% if releases.count > 0 %}
+ <form method="POST">{% csrf_token %}
+ <fieldset>
+ <label>Project name <span class="muted">(required)</span></label>
+ <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
+ {% if releases.count > 1 %}
+ <label class="project-form">
+ Release
+ <i class="icon-question-sign get-help" title="The version of the build system you want to use"></i>
+ </label>
+ <select name="projectversion" id="projectversion">
+ {% for release in releases %}
+ <option value="{{release.id}}"
+ {%if defaultbranch == release.name %}
+ selected
+ {%endif%}
+
+ >{{release.description}}</option>
+ {% endfor %}
+ </select>
+ {% for release in releases %}
+ <div class="row-fluid helptext" id="description-{{release.id}}" style="display: none">
+ <span class="help-block span5">{{release.helptext|safe}}</span>
+ </div>
+ {% endfor %}
+ {% else %}
+ <input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
+ {% endif %}
+
+ </fieldset>
+
+ <div class="form-actions">
+ <input type="submit" class="btn btn-primary btn-large" value="Create project"></input>
+ <span class="help-inline" style="vertical-align:middle;">To create a project, you need to enter a project name</span>
+ </div>
+ </form>
+ {% else %}
+ <br/>
+ <div class="alert alert-warning row-fluid span6">
+ <h3>No releases configured</h3>
+ <p>
+ It looks like Toaster releases have not been configured properly. Contact the person who set up Toaster, and tell them about it.
+ </p>
+ <p>
+ If you are the Toaster administrator, we are sorry: setting up Toaster is not easy.
+ <ul>
+ <li><a href="{% url 'admin:orm_release_changelist' %}">Log in to the Django administration interface</a> and check the "Releases" section.</li>
+ <li>Check out the <a href="https://wiki.yoctoproject.org/wiki/Setting_up_a_hosted_managed_mode_for_Toaster#Releases">documentation about configuring releases</a></li>
+ </ul>
+ </p>
+ </div>
+ {% endif %}
+
+ </div>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ // hide the new project button
+ $("#new-project-button").hide();
+ $('.btn-primary').attr('disabled', 'disabled');
+
+ // enable submit button when all required fields are populated
+ $("input#new-project-name").keyup(function() {
+ if ($("input#new-project-name").val().length > 0 ){
+ $('.btn-primary').removeAttr('disabled');
+ $(".help-inline").css('visibility','hidden');
+ }
+ else {
+ $('.btn-primary').attr('disabled', 'disabled');
+ $(".help-inline").css('visibility','visible');
+ }
+ });
+
+ // show relevant help text for the selected release
+ var selected_release = $('select').val();
+ $("#description-" + selected_release).show();
+
+
+ $('select').change(function(){
+ var new_release = $('select').val();
+ $(".helptext").hide();
+ $('#description-' + new_release).fadeIn();
+ });
+ })
+ </script>
+</div>
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/package_detail_base.html b/bitbake/lib/toaster/toastergui/templates/package_detail_base.html
index cd015d3555..ad75454310 100644
--- a/bitbake/lib/toaster/toastergui/templates/package_detail_base.html
+++ b/bitbake/lib/toaster/toastergui/templates/package_detail_base.html
@@ -54,7 +54,7 @@
<h2>Package information</h2>
<!-- info presented as definition list -->
- <dl>
+ <dl class="item-info">
<dt>
Size
<i class="icon-question-sign get-help" title="The size of the package"></i>
@@ -135,11 +135,14 @@
</dt>
<dd class="iscommit">{{package.recipe.layer_version.commit}}</dd>
+
+ {% if not MANAGED or not build.project %}
<dt>
Layer directory
<i class="icon-question-sign get-help" title="Path to the layer providing the recipe that builds this package"></i>
</dt>
<dd><code>{{package.recipe.layer_version.layer.local_path}}</code></dd>
+ {% endif %}
</dl>
</div> <!-- row4 well -->
{% endblock twocolumns %}
diff --git a/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html b/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
index a36464cad5..4ba472f2d6 100644
--- a/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
+++ b/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
@@ -15,7 +15,7 @@
<div class="tab-content">
<div class="tab-pane active" id="brought-in-by">
- {% ifequal reverse_deps|length 0 %}
+ {% ifequal reverse_count 0 %}
<div class="alert alert-info">
<strong>{{package.fullpackagespec}}</strong> has no reverse runtime dependencies.
</div>
@@ -29,7 +29,7 @@
<a href="{% url 'package_included_detail' build.id target.id reverse_dep.package_id %}">
{{reverse_dep.package.name}}
</a>
- <script>fmtAliasHelp("{{reverse_dep.name}}", "{{reverse_dep.alias}}", true)</script>
+ <script>fmtAliasHelp("{{reverse_dep.package.name}}", "{{reverse_dep.alias}}", true)</script>
</td>
{% else %}
<td>
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
new file mode 100644
index 0000000000..3b75d1934c
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -0,0 +1,435 @@
+{% extends "baseprojectpage.html" %}
+<!--
+vim: expandtab tabstop=2
+-->
+{% load projecttags %}
+{% load humanize %}
+{% load static %}
+
+
+{% block projectinfomain %}
+<script src="{% static "js/angular.min.js" %}"></script>
+<script src="{% static "js/angular-animate.min.js" %}"></script>
+<script src="{% static "js/angular-cookies.min.js" %}"></script>
+<script src="{% static "js/angular-route.min.js" %}"></script>
+<script src="{% static "js/angular-sanitize.min.js" %}"></script>
+<script src="{% static "js/ui-bootstrap-tpls-0.11.0.js" %}"></script>
+
+
+<div id="main" role="main" ng-app="project" ng-controller="prjCtrl" class="top-padded">
+
+
+ <!-- project name -->
+ <div class="page-header">
+ <h1>{[project.name]}</h1>
+ </div>
+
+ <!-- alerts section 1-->
+ <div ng-repeat="a in zone1alerts">
+ <div class="alert alert-dismissible lead" role="alert" ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span></button>
+ <span ng-bind-html="a.text"></span>
+ </div>
+ </div>
+
+ <!-- custom templates for ng -->
+
+ <script type="text/ng-template" id="suggestion_details">
+ <a> {[match.model.name]} {[match.model.detail]} </a>
+ </script>
+
+ <!-- modal dialogs -->
+ <script type="text/ng-template" id="dependencies_modal">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span ng-bind="layerAddName"></span> dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p><strong>{[layerAddName]}</strong> depends on some layers that are not added to your project. Select the ones you want to add:</p>
+ <ul class="unstyled">
+ <li ng-repeat="ld in items">
+ <label class="checkbox">
+ <input type="checkbox" ng-model="selectedItems[ld.id]"> {[ld.name]}
+ </label>
+ </li>
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">Add layers</button>
+ <button class="btn" ng-click="cancel()">Cancel</button>
+ </div>
+ </form>
+ </script>
+
+
+ <script type="text/ng-template" id="change_version_modal">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3>Changing release to {[releaseName]}</h3>
+ </div>
+ <div class="modal-body">
+ <p>The following project layers do not exist for {[releaseName]}:</p>
+ <ul>
+ <li ng-repeat="i in items"><span class="layer-info" data-toggle="tooltip" tooltip="{[i.detail]}">{[i.name]}</span></li>
+ </ul>
+ <p>If you change the release to {[releaseName]}, the above layers will be deleted from your project layers.</p>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">Change release and delete layers</button>
+ <button class="btn" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="target_display">
+ <div ng-switch on="t.task.length">
+ <div ng-switch-when="0">{[t.target]}</div>
+ <div ng-switch-default>{[t.target]}:{[t.task]}</div>
+ </div>
+ </script>
+
+
+ <!-- build form -->
+ <div class="well">
+ <form class="build-form" ng-submit="buildNamedTarget()">
+ <div class="input-append controls">
+ <input type="text" class="huge input-xxlarge" placeholder="Type the target(s) you want to build" autocomplete="off" ng-model="targetName" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length"/>
+ <button type="submit" class="btn btn-large btn-primary" ng-disabled="!targetName.length">
+ Build
+ </button>
+ </div>
+ <i class="icon-question-sign get-help get-help-blue" title="Type the name of one or more targets you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a target name, like so: <code>core-image-minimal:do_build</code>"></i>
+ <p>
+ <a href="{% url 'all-targets' %}">
+ View all targets
+ </a>
+ {% if completedbuilds.count %}
+ | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a>
+ {% endif %}
+ </p>
+ </form>
+ </div>
+
+
+ <!-- latest builds list -->
+
+ <a id="buildslist"></a>
+ <h2 class="air" ng-if="builds.length">Latest builds</h2>
+ <div class="animate-repeat alert" ng-repeat="b in builds track by b.id" ng-class="{'queued':'alert-info', 'deleted':'alert-info', 'in progress': 'alert-info', 'failed':'alert-error', 'completed':{'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.build[0].status]}[b.status]">
+ <div class="row-fluid">
+ <switch ng-switch="b.status">
+
+ <case ng-switch-when="failed">
+ <div class="lead span3"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span></div>
+ <div >
+ <button class="btn pull-right btn-danger" ng-click="buildExistingTarget(b.targets)">Run again</button>
+ </div>
+ <div class="row-fluid">
+ <div class="air well" ng-repeat="e in b.errors">
+ <pre>{[e.msg]}</pre>
+ <ngif ng-if="e.msg.indexOf('Nothin') == 0">
+ <div ng-repeat="t in getTargetNameFromErrorMsg(e.msg)">
+ <p class="lead">The target <strong>{[t]}</strong> is not provided by any of your project layers.</p>
+ <p> Your build has failed because the target <strong>{[t]}</strong> is not provided by any of your project layers.</p>
+ <ngif ng-if="layersForTargets[t].length > 0">
+ <p>The following layers provide this target. You could add one of them to your project.</p>
+ <button class="btn btn-danger add-layer-with-dependencies" ng-repeat="l in layersForTargets[t]" ng-click="layerAddById(l.id)">Add {[l.name]}</button>
+ </ngif>
+ </div>
+ </ngif>
+ <ngif ng-if="e.msg.indexOf('Nothin') != 0">
+ <p>
+ Please contact your system administrator to help troubleshoot this error.
+ </p>
+ </ngif>
+ </div>
+ </div>
+ </case>
+
+ <case ng-switch-when="queued">
+ <div class="lead span5"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span> </div>
+ <div class="span4 lead" >Build queued
+ <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i>
+ </div>
+ <button class="btn pull-right btn-info" ng-click="buildCancel(b)">Cancel</button>
+ </case>
+
+ <case ng-switch-when="created">
+ <div class="lead span3"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span> </div>
+ <div class="span6" >
+ <span class="lead">Creating build</span>
+ </div>
+ <button class="btn pull-right btn-info" ng-click="buildCancel(b)">Cancel</button>
+ </case>
+
+ <case ng-switch-when="deleted">
+ <div class="lead span3"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span> </div>
+ <div class="span6" id="{[b.id]}-deleted" >
+ <span class="lead">Build deleted</span>
+ </div>
+ <button class="btn pull-right btn-info" ng-click="buildDelete(b)">Close</button>
+ </case>
+
+
+ <case ng-switch-when="in progress">
+ <switch ng-switch="b.build.length">
+ <case ng-switch-when="0">
+ <div class="lead span5"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span> </div>
+ <div class="span4 lead">
+ Checking out layers
+ </div>
+ </case>
+ <case ng-switch-default="">
+ <div class="lead span3"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span> </div>
+ <div class="span4 offset1" >
+ <div class="progress" style="margin-top:5px;" data-toggle="tooltip" tooltip="{[b.build[0].completeper]}% of tasks complete">
+ <div style="width: {[b.build[0].completeper]}%;" class="bar"></div>
+ </div>
+ </div>
+ <div class="text-right lead">ETA: {[b.build[0].eta|date:"HH:mm:ss"]}</div>
+ </case>
+ </case>
+
+
+ <case ng-switch-when="completed">
+ <div class="lead span3"><a class="success" href="{[b.build[0].build_page_url]}"><span ng-repeat="t in b.targets" ng-include src="'target_display'"></span></a></div>
+ <div class="span2 lead">
+ <ngif ng-if="b.build[0].completed_on - todaydate > 0">
+ {[b.build[0].completed_on|date:'HH:mm']}
+ </ngif>
+ <ngif ng-if="b.build[0].completed_on - todaydate < 0">
+ {[b.build[0].completed_on|date:'dd/MM/yy HH:mm']}
+ </ngif>
+ </div>
+ <div class="span2">
+ <ngif ng-if="b.build[0].errors">
+ <span>
+ <i class="icon-minus-sign red lead"></i>
+ <a href="{[b.build[0].build_page_url]}#errors" class="lead error">{[b.build[0].errors]}
+ <ng-pluralize count="b.build[0].errors" when="{'1':'error','other':'errors'}"></ng-pluralize></a>
+ </span>
+ </ngif>
+ </div>
+ <div class="span2">
+ <ngif ng-if="b.build[0].warnings">
+ <span>
+ <i class="icon-warning-sign yellow lead"></i>
+ <a href="{[b.build[0].build_page_url]}#warnings" class="lead warning">{[b.build[0].warnings]}
+ <ng-pluralize count="b.build[0].warnings" when="{'1':'warning','other':'warnings'}"></ng-pluralize></a>
+ </span>
+ </ngif>
+ </div>
+ <div> <span class="lead">Build time: <a href="{[b.build[0].build_time_page_url]}">{[b.build[0].build_time|timediff]}</a></span>
+ <button class="btn pull-right" ng-class="{'Succeeded': 'btn-success', 'Failed': 'btn-danger'}[b.build[0].status]"
+ ng-click="buildExistingTarget(b.targets)">Run again</button>
+
+ </div>
+ </case>
+
+
+ <case ng-switch-default="">
+ <div>FIXME!</div>
+ </case>
+ </switch>
+ <div class="lead pull-right">
+ </div>
+ </div>
+ </div>
+
+ <h2 class="air">Project configuration</h2>
+
+ <!-- alerts section 2 -->
+ <div ng-repeat="a in zone2alerts">
+ <div class="alert alert-dismissible lead" role="alert" ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span></button>
+ <span ng-bind-html="a.text"></span>
+ </div>
+ </div>
+
+ <div class="row-fluid">
+
+ <!-- project layers -->
+ <div id="layer-container" class="well well-transparent span4">
+ <h3>
+ Layers <span class="muted counter">({[layers.length]})</span>
+ <i class="icon-question-sign get-help heading-help" title="OpenEmbedded organises metadata into modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>"></i>
+ </h3>
+ <div class="alert" ng-if="!layers.length">
+ <b>You need to add some layers </b>
+ <p>
+ You can:
+ <ul>
+ <li> <a href="{% url 'layers'%}">View all layers available in Toaster</a>
+ <li> <a href="{% url 'importlayer' %}">Import a layer</a>
+ <li> <a href="https://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the manual</a>
+ </ul>
+ Or type a layer name below.
+ </p>
+ </div>
+ <form ng-submit="layerAdd()">
+ <div class="input-append">
+ <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" ng-model="layerAddName" typeahead="e.name for e in getAutocompleteSuggestions('layers', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" typeahead-on-select="onLayerSelect($item, $model, $label)" typeahead-editable="false" ng-class="{ 'has-error': layerAddName.$invalid }" />
+ <input type="submit" id="add-layer" class="btn" value="Add" ng-disabled="!layerAddName.length"/>
+ </div>
+ {% csrf_token %}
+ </form>
+ <p><a href="{% url 'layers' %}">View all layers</a> | <a href="{% url 'importlayer' %}">Import layer</a></p>
+ <ul class="unstyled configuration-list">
+ <li ng-repeat="l in layers track by l.id" class="animate-repeat">
+ <a href="{[l.layerdetailurl]}" target="_#" class="layer-info" data-toggle="tooltip" tooltip="{[l.giturl]} | {[l.branch.name]}">{[l.name]}</a>
+ <i class="icon-trash" ng-click="layerDel(l.id)" tooltip="Delete"></i>
+ </li>
+ </ul>
+ </div>
+
+
+ <!-- project targets -->
+ <div id="target-container" class="well well-transparent span4">
+ <h3>
+ Targets
+ <i class="icon-question-sign get-help heading-help" title="What you build, often a recipe producing a root file system file (an image). Something like <code>core-image-minimal</code> or <code>core-image-sato</code>"></i>
+ </h3>
+ <form ng-submit="buildNamedTarget()">
+ <div class="input-append">
+ <input type="text" class="input-xlarge" placeholder="Type the target(s) you want to build" autocomplete="off" data-minLength="1" ng-model="targetName1" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length">
+ <button type="submit" class="btn btn-primary" ng-disabled="!targetName1.length">
+ Build </button>
+ </div>
+ {% csrf_token %}
+ </form>
+ <p>
+ <a href="{% url 'all-targets' %}">View all targets</a></p>
+ <div ng-if="frequenttargets.length">
+ <h4 class="air">
+ Most built targets
+ </h4>
+ <ul class="unstyled configuration-list">
+ <li ng-repeat="t in frequenttargets">
+ <label class="checkbox">
+ <input type="checkbox" ng-model="mostBuiltTargets[t]">{[t]}
+ </label>
+ </li>
+ </ul>
+ <button class="btn btn-large btn-primary" ng-disabled="enableBuildSelectedTargets()" ng-click="buildSelectedTargets()">Build selected targets</button>
+ </div>
+ </div>
+
+ <!-- project configuration -->
+ <div id="machine-distro" class="well well-transparent span4">
+ <h3>
+ Machine
+ <i class="icon-question-sign get-help heading-help" title="The machine is the hardware for which you want to build. You can only set one machine per project"></i>
+ </h3>
+ <p class="lead" id="select-machine-opposite">
+ <span>{[machine.name]}</span>
+ <i id="change-machine" class="icon-pencil" ng-click="toggle('#select-machine')"></i>
+ </p>
+ <div id="select-machine" style="display: none">
+ <div class="alert alert-info">
+ <strong>Machine changes have a big impact on build outcome.</strong>
+ You cannot really compare the builds for the new machine with the previous ones.
+ </div>
+ <form ng-submit="editProjectSettings('#select-machine')" class="input-append">
+ <input type="text" id="machine" autocomplete="off" ng-model="machineName" typeahead="m.name for m in getAutocompleteSuggestions('machines', $viewValue)"/>
+ <input type="submit" id="apply-change-machine" class="btn" type="button" ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"></input>
+ <input type="reset" id="cancel-machine" class="btn btn-link" ng-click="toggle('#select-machine')" value="Cancel"></input>
+ {% csrf_token %}
+ </form>
+ <p><a href="{% url 'machines' %}" class="link">View all machines</a></p>
+ </div>
+ <p class="link-action">
+ <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
+ <i data-original-title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair" class="icon-question-sign get-help heading-help" title=""></i>
+ </p>
+ </div>
+ </div>
+
+
+ <h2>Project details</h2>
+
+ <!-- alerts section 3 -->
+ <div ng-repeat="a in zone3alerts">
+ <div class="alert alert-dismissible lead" role="alert" ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span></button>
+ <span ng-bind-html="a.text"></span>
+ </div>
+ </div>
+
+
+ <div id="project-details" class="well well-transparent">
+ <h3>Project name</h3>
+ <p class="lead" id="change-project-name-opposite">
+ <span >{[project.name]}</span>
+ <i class="icon-pencil" ng-click="toggle('#change-project-name')" ></i>
+ </p>
+ <div id="change-project-name" style="display:none;">
+ <form ng-submit="editProjectSettings('#change-project-name')" class="input-append">
+ <input type="text" class="input-xlarge" id="type-project-name" ng-model="projectName">
+ <input type="submit" class="btn" value="Save" ng-disabled="project.name == projectName"/>
+ <input type="reset" class="btn btn-link" value="Cancel" ng-click="toggle('#change-project-name')">
+ </form>
+ </div>
+
+
+ <h3>
+ Release
+ <i class="icon-question-sign get-help heading-help" title="The version of the build system you want to use"></i>
+ </h3>
+ <p class="lead" id="change-project-version-opposite">
+ <span id="project-version">{[project.release.desc]}</span>
+ <i id="change-version" class="icon-pencil" ng-click="toggle('#change-project-version')" ></i>
+ </p>
+ <div class="div-inline" id="change-project-version" style="display:none;">
+ <form ng-submit="testProjectSettingsChange('#change-project-version')" class="input-append">
+ <select id="select-version" ng-model="projectVersion">
+ <option ng-repeat="r in releases" value="{[r.id]}" ng-selected="r.id == project.release.id">{[r.description]}</option>
+ </select>
+ <input type="submit" class="btn" style="margin-left:5px;" value="Save" ng-disabled="project.release.id == projectVersion"/>
+ <input type="reset" class="btn btn-link" value="Cancel" ng-click="toggle('#change-project-version')" ng-disabled="project.release.id == projectVersion"/>
+
+ </form>
+ </div>
+ </div>
+
+<!-- end main -->
+</div>
+
+
+<!-- load application logic !-->
+<script src="{% static "js/projectapp.js" %}"></script>
+
+<!-- dump initial data for use in the angular app -->
+<script>
+angular.element(document).ready(function() {
+ scope = angular.element("#main").scope();
+ scope.urls = {};
+ scope.urls.xhr_build = "{% url 'xhr_projectbuild' project.id %}";
+ scope.urls.xhr_edit = "{% url 'xhr_projectedit' project.id %}";
+ scope.urls.xhr_datatypeahead = "{% url 'xhr_datatypeahead' %}";
+ scope.urls.layers = "{% url 'layers' %}";
+ scope.urls.targets = "{% url 'targets' %}";
+ scope.urls.importlayer = "{% url 'importlayer'%}";
+ scope.urls.layer = "{% url 'layerdetails' %}";
+ scope.project = {{prj|json}};
+ scope.builds = {{builds|json}};
+ scope.layers = {{layers|json}};
+ scope.targets = {{targets|json}};
+ scope.frequenttargets = {{freqtargets|json}};
+ scope.machine = {{machine|json}};
+ scope.releases = {{releases|json}};
+
+ var now = (new Date()).getTime();
+ scope.todaydate = now - (now % 86400000);
+
+ scope.zone1alerts = [];
+ scope.zone2alerts = [];
+ scope.zone3alerts = [];
+
+ scope.mostBuiltTargets = {};
+
+ scope.updateDisplayWithCommands();
+ scope.validateData();
+
+ scope.init();
+ scope.$digest();
+
+ });
+</script>
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
new file mode 100644
index 0000000000..2a8bd58f34
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -0,0 +1,125 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Project builds</li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <div class="page-header">
+ <h1>
+ {% if objects.paginator.count == 0 %}
+ No builds found
+
+ {% else %}
+ {% if request.GET.filter or request.GET.search %}
+ {{objects.paginator.count}} builds found
+ {% else %}
+ Project builds <small>({{objects.paginator.count}})</small>
+ {% endif %}
+ {% endif %}
+ <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
+ </h1>
+ </div>
+
+
+ {% if objects.paginator.count == 0 %}
+ <div class="row-fluid">
+ <div class="alert">
+ <form class="no-results input-append" id="searchform">
+ <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
+ <button class="btn" type="submit" value="Search">Search</button>
+ <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
+ </form>
+ </div>
+ </div>
+
+
+ {% else %}
+
+ {% include "basetable_top.html" %}
+ <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
+ {% for br in objects %}{% if br.build %} {% with build=br.build %} {# if we have a build, just display it #}
+ <tr class="data">
+ <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
+ <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
+ <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
+ <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
+ <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
+ <td class="failed_tasks error">
+ {% query build.task_build outcome=4 order__gt=0 as exectask%}
+ {% if exectask.count == 1 %}
+ <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
+ {% elif exectask.count > 1%}
+ <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
+ {%endif%}
+ </td>
+ <td class="errors_no">
+ {% if build.errors_no %}
+ <a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
+ <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
+ </a>
+ {% endif %}
+ {%endif%}
+ </td>
+ <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
+ <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
+ {% if not MANAGED or not build.project %}
+ <td class="log">{{build.cooker_log_path}}</td>
+ {% endif %}
+ <td class="output">
+ {% if build.outcome == build.SUCCEEDED %}
+ <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
+ {% endif %}
+ </td>
+ </tr>
+
+
+ {%endwith%}
+ {% else %} {# we don't have a build for this build request, mask the data with build request data #}
+
+
+
+ <tr class="data">
+ <td class="outcome">{% if br.state == br.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
+ <td class="target">
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}"><span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
+ </td>
+ <td class="machine">
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.machine}}</a>
+ </td>
+ <td class="started_on">
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.created|date:"d/m/y H:i"}}</a>
+ </td>
+ <td class="completed_on">
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.updated|date:"d/m/y H:i"}}</a>
+ </td>
+ <td class="failed_tasks error">
+ </td>
+ <td class="errors_no">
+ <a class="errors_no error" href="{% url "buildrequestdetails" br.project.id br.id %}#errors">{{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}</a>
+ </td>
+ <td class="warnings_no">
+ </td>
+ <td class="time">
+ {{br.timespent.total_seconds|sectohms}}
+ </td>
+ <td class="output"> {# we have no output here #}
+ </td>
+ </tr>
+ {%endif%}
+ {% endfor %}
+
+
+ {% include "basetable_bottom.html" %}
+{% endif %}
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
new file mode 100644
index 0000000000..edcad1821f
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -0,0 +1,661 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Configuration variables</li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <div class="page-header">
+ <h1>Configuration variables</h1>
+ </div>
+
+ <div style="padding-left:19px;">
+
+ <dl class="dl-vertical">
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">DISTRO</span>
+ <i class="icon-question-sign get-help" title="The short name of the distribution. If the variable is blank, meta/conf/distro/defaultsetup.conf will be used. <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-DISTRO' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead">
+ <span id="distro">{{distro}}</span>
+ <i class="icon-pencil" id="change-distro-icon"></i>
+ <form id="change-distro-form" style="display:none;">
+ <div class="input-append">
+ <input type="text" id="new-distro" value="{{distro}}">
+ <button id="apply-change-distro" class="btn" type="button">Save</button>
+ <button id="cancel-change-distro" type="button" class="btn btn-link">Cancel</button>
+ </div>
+ </form>
+ </dd>
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">IMAGE_FSTYPES</span>
+ <i class="icon-question-sign get-help" title="Formats of root file system images that you want to have created <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-IMAGE_FSTYPES' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead">
+ <span id="image_fstypes">{{fstypes}}</span>
+ <i class="icon-pencil" id="change-image_fstypes-icon"></i>
+ <form id="change-image_fstypes-form" style="display:none;">
+ <input id="filter-image_fstypes" type="text" placeholder="Search image types" class="span4">
+ <div id="all-image_fstypes" class="scrolling">
+ </div>
+ <button id="apply-change-image_fstypes" type="button" class="btn">Save</button>
+ <button id="cancel-change-image_fstypes" type="button" class="btn btn-link">Cancel</button>
+ </form>
+ </dd>
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span>
+ <i class="icon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in <strong>all of them</strong> <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-IMAGE_INSTALL' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead muted">
+ <span id="image_install">{% if image_install_append %}{{image_install_append}}{%else%}Not set{%endif%}</span>
+ <i class="icon-pencil" id="change-image_install-icon"></i>
+ <i class="icon-trash" id="delete-image_install-icon" style="display:none;"></i>
+ <form id="change-image_install-form" style="display:none;">
+ <div class="row-fluid">
+ <span class="help-block span4">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span>
+ </div>
+ <div class="input-append">
+ <input type="text" class="input-xlarge" id="new-image_install" placeholder="Type one or more package names">
+ <button id="apply-change-image_install" class="btn" type="button">Save</button>
+ <button id="cancel-change-image_install" type="button" class="btn btn-link">Cancel</button>
+ </div>
+ </form>
+ </dd>
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">PACKAGE_CLASSES</span>
+ <i class="icon-question-sign get-help" title="Specifies the package manager to use when packaging data <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-PACKAGE_CLASSES' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead">
+ <span id="package_classes">{{package_classes}}</span>
+ <i id="change-package_classes-icon" class="icon-pencil"></i>
+ <form id="change-package_classes-form" style="display:none;">
+ <label>
+ Root file system package format
+ <i class="icon-question-sign get-help" title="The package format used to generate the root file system. Options are <code>dev</code>, <code>ipk</code> and <code>rpm</code>"></i>
+ </label>
+ <select id="package_classes-select">
+ <option>package_dev</option>
+ <option>package_ipk</option>
+ <option>package_rpm</option>
+ </select>
+ <label>
+ Additional package formats
+ <i class="icon-question-sign get-help" title="Extra package formats to build"></i>
+ </label>
+ <label class="checkbox" id="package_class_1">
+ <input type="checkbox" id="package_class_1_input"> package_dev
+ </label>
+ <label class="checkbox" id="package_class_2">
+ <input type="checkbox" id="package_class_2_input"> package_ipk
+ </label>
+ <div style="padding-top:10px;">
+ <button id="apply-change-package_classes" type="button" class="btn">Save</button>
+ <button id="cancel-change-package_classes" type="button" class="btn btn-link">Cancel</button>
+ </div>
+ </form>
+ </dd>
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">SDKMACHINE</span>
+ <i class="icon-question-sign get-help" title="Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SDKMACHINE' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead">
+ <span id="sdkmachine">{{sdk_machine}}</span>
+ <i id="change-sdkmachine-icon" class="icon-pencil"></i>
+ <form id="change-sdkmachine-form" style="display:none;">
+ <label class="radio">
+ <input type="radio" name="sdkmachine" value="i686">
+ i686
+ </label>
+ <label class="radio">
+ <input type="radio" name="sdkmachine" value="x86_64">
+ x86_64
+ </label>
+ <div style="padding-top:10px;">
+ <button id="apply-change-sdkmachine" type="button" class="btn">Save</button>
+ <button id="cancel-change-sdkmachine" type="button" class="btn btn-link">Cancel</button>
+ </div>
+ </form>
+ </dd>
+
+ </dl>
+
+ <!-- <ul class="unstyled configuration-list" id="configvar-list"> -->
+ <dl id="configvar-list">
+ <!-- the added configuration variables are inserted here -->
+ </dl>
+
+ <!-- pass the fstypes list, black list, and externally managed variables here -->
+ {% for fstype in vars_fstypes %}
+ <input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}">
+ {% endfor %}
+ {% for b in vars_blacklist %}
+ <input type="hidden" class="js-config-blacklist-name" value="{{b}}">
+ {% endfor %}
+ {% for b in vars_managed %}
+ <input type="hidden" class="js-config-var-managed-name" value="{{b}}">
+ {% endfor %}
+
+ <div class="row-fluid">
+ <form id="variable-form">
+ <fieldset style="padding-left:0px;">
+ <legend>Add variable</legend>
+ <div class="span3" style="margin-left:0px;">
+ <span id="add-configvar-name-div" class="control-group">
+ <label>
+ Variable
+ <i title="" class="icon-question-sign get-help"
+ data-original-title="Variable names are case sensitive,
+ cannot have spaces, and can only include letters, numbers, underscores
+ and dashes"></i>
+ </label>
+ <input type="text" placeholder="Type variable name" id="variable">
+ <span class="help-block error" id="new-variable-error-message"></span>
+ </span>
+ <label>Value</label>
+ <input id="value" type="text" placeholder="Type variable value"><p>
+ <div class="input-append" style="display:block;margin-top:10px;">
+ <button id="add-configvar-button" class="btn save" type="button" disabled>Add variable</button>
+ </div>
+ </div>
+ <div class="span5 help-block">
+ <h5>Some variables are reserved from Toaster</h5>
+ <p>Toaster cannot set any variables that impact 1) the configuration of the build servers,
+ or 2) where artifacts produced by the build are stored. Such variables include: </p>
+ <p>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-BB_DISKMON_DIRS" target="_blank">BB_DISKMON_DIRS</a></code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
+ <code>CVS_PROXY_HOST</code>
+ <code>CVS_PROXY_PORT</code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-DL_DIR" target="_blank">DL_DIR</a></code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_DIR" target="_blank">SSTATE_DIR</a></code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_MIRRORS" target="_blank">SSTATE_MIRRORS</a></code>
+ <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
+ <p>Plus the following standard shell environment variables:</p>
+ <p><code>http_proxy</code> <code>ftp_proxy</code> <code>https_proxy</code> <code>all_proxy</code></p>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+
+ </div>
+
+ <script>
+
+ // validate new variable name
+ function validate_new_variable_name() {
+ var variable = $("input#variable")[0].value;
+ var value = $("input#value")[0].value;
+
+ // presumed innocence
+ $('#new-variable-error-message').html("");
+ var error_msg = ""
+
+ var existing_configvars = document.getElementsByClassName('js-config-var-name');
+ for (var i = 0, length = existing_configvars.length; i < length; i++) {
+ if (existing_configvars[i].innerHTML == variable) {
+ error_msg = "This variable is already set in this page, edit its value instead";
+ }
+ }
+
+ var blacklist_configvars = document.getElementsByClassName('js-config-blacklist-name');
+ for (var i = 0, length = blacklist_configvars.length; i < length; i++) {
+ if (blacklist_configvars[i].value == variable) {
+ error_msg = "You cannot edit this variable in Toaster because it is set by the build servers";
+ }
+ }
+
+ var bad_chars = /[^a-zA-Z0-9\-_]/.test(variable);
+ var has_spaces = (0 <= variable.indexOf(" "));
+ var only_spaces = (0 < variable.length) && (0 == variable.trim().length);
+
+ if (only_spaces) {
+ error_msg = "A valid variable name cannot include spaces";
+ } else if (bad_chars && has_spaces) {
+ error_msg = "A valid variable name can only include letters, numbers, underscores, dashes, and cannot include spaces";
+ } else if (bad_chars) {
+ error_msg = "A valid variable name can only include letters, numbers, underscores, and dashes";
+ }
+
+ if ("" != error_msg) {
+ $('#new-variable-error-message').html(error_msg);
+ $(".save").attr("disabled","disabled");
+
+ var d = document.getElementById("add-configvar-name-div");
+ d.className = d.className + " control-group error";
+
+ return false;
+ }
+
+ var d = document.getElementById("add-configvar-name-div");
+ d.className = d.className.replace(" control-group error","");
+ return true;
+ }
+
+ // Preset or reset the Package Class checkbox labels
+ function updatePackageClassCheckboxes() {
+ if ($('select').val() == 'package_dev') {
+ $('#package_class_1').html('<input type="checkbox" id="package_class_1_input"> package_ipk');
+ $('#package_class_2').html('<input type="checkbox" id="package_class_2_input"> package_rpm');
+ }
+ if ($('select').val() == 'package_ipk') {
+ $('#package_class_1').html('<input type="checkbox" id="package_class_1_input"> package_dev');
+ $('#package_class_2').html('<input type="checkbox" id="package_class_2_input"> package_rpm');
+ }
+ if ($('select').val() == 'package_rpm') {
+ $('#package_class_1').html('<input type="checkbox" id="package_class_1_input"> package_dev');
+ $('#package_class_2').html('<input type="checkbox" id="package_class_2_input"> package_ipk');
+ }
+ }
+
+ // Re-assert handlers when the page is served and/or refreshed via Ajax
+ function setEventHandlersForDynamicElements() {
+
+ // change variable value
+ $('.js-icon-pencil-config_var').click(function (evt) {
+ var pk = evt.target.attributes["x-data"].value;
+ var current_val = $("span#config_var_"+pk).html();
+ $('.js-icon-pencil-config_var, .js-icon-trash-config_var, #config_var_'+pk).hide();
+ $("#change-config_var-form_"+pk).slideDown();
+ $("input#new-config_var_"+pk)[0].value = current_val;
+ });
+
+ $('.js-cancel-change-config_var').click(function (evt) {
+ var pk = evt.target.attributes["x-data"].value;
+ $("#change-config_var-form_"+pk).slideUp(function() {
+ $('.js-icon-pencil-config_var, .js-icon-trash-config_var, #config_var_'+pk).show();
+ });
+ });
+
+ $(".js-new-config_var").keyup(function(){
+ if ($(this).val().length == 0) {
+ $(".js-apply-change-config_var").attr("disabled","disabled");
+ }
+ else {
+ $(".js-apply-change-config_var").removeAttr("disabled");
+ }
+ });
+
+ $('.js-apply-change-config_var').click(function (evt) {
+ var xdata = evt.target.attributes["x-data"].value.split(":");
+ var pk = xdata[0];
+ var variable = xdata[1];
+ var val = $('#new-config_var_'+pk).val();
+ postEditAjaxRequest({"configvarChange" : variable+':'+val});
+ $('#config_var_'+pk).parent().removeClass('muted');
+ $("#change-config_var-form_"+pk).slideUp(function() {
+ $('.js-icon-pencil-config_var, .js-icon-trash-config_var, #config_var_'+pk).show();
+ });
+ });
+
+ // delete variable
+ $(".js-icon-trash-config_var").click(function (evt) {
+ var xdata = evt.target.attributes["x-data"].value.split(":");
+ var pk = xdata[0];
+ $('#config_var_entry_'+pk).slideUp(function() {
+ //$('#config_var_entry_'+pk).show();
+ });
+ postEditAjaxRequest({"configvarDel": evt.target.attributes["x-data"].value});
+ });
+
+ }
+
+ function onEditPageUpdate(data) {
+ // update targets
+ var i; var orightml = "";
+
+ var configvars_sorted = data.configvars.sort(function(a, b){return a[0] > b[0]});
+
+ var managed_configvars = document.getElementsByClassName('js-config-var-managed-name');
+
+ for (i = 0; i < configvars_sorted.length; i++) {
+ // skip if the variable name has a special context (not user defined)
+ var var_context=undefined;
+ for (var j = 0, length = managed_configvars.length; j < length; j++) {
+ if ((managed_configvars[j].innerHTML == configvars_sorted[i][0]) ||
+ (managed_configvars[j].value == configvars_sorted[i][0]) ) {
+ var_context='m';
+ }
+ }
+ if (var_context == undefined) {
+ orightml += '<dt id="config_var_entry_'+configvars_sorted[i][2]+'"><span class="js-config-var-name">'+configvars_sorted[i][0]+'</span><i class="icon-trash js-icon-trash-config_var" x-data="'+configvars_sorted[i][2]+'"></i> </dt>'
+ orightml += '<dd class="lead">'
+ orightml += ' <span id="config_var_'+configvars_sorted[i][2]+'">'+configvars_sorted[i][1]+'</span>'
+ orightml += ' <i class="icon-pencil js-icon-pencil-config_var" x-data="'+configvars_sorted[i][2]+'"></i>'
+ orightml += ' <form id="change-config_var-form_'+configvars_sorted[i][2]+'" style="display:none;">'
+ orightml += ' <div class="input-append">'
+ orightml += ' <input type="text" class="input-xlarge js-new-config_var" id="new-config_var_'+configvars_sorted[i][2]+'" value="">'
+ orightml += ' <button class="btn js-apply-change-config_var" type="button" x-data="'+configvars_sorted[i][2]+':'+configvars_sorted[i][0]+'" disabled>Save</button>'
+ orightml += ' <button type="button" class="btn btn-link js-cancel-change-config_var" x-data="'+configvars_sorted[i][2]+'">Cancel</button>'
+ orightml += ' </div>'
+ orightml += ' </form>'
+ orightml += '</dd>'
+ }
+ }
+
+ // update configvars list
+ $("dl#configvar-list").html(orightml);
+
+ // re-assert these event handlers
+ setEventHandlersForDynamicElements();
+ }
+
+ function onEditAjaxSuccess(data, textstatus) {
+ // console.log("XHR returned:", data, "(" + textstatus + ")");
+ if (data.error != "ok") {
+ alert("error on request:\n" + data.error);
+ return;
+ }
+ onEditPageUpdate(data);
+ }
+
+ function onEditAjaxError(jqXHR, textstatus, error) {
+ alert("XHR errored:\n" + error + "\n(" + textstatus + ")");
+ // re-assert the event handlers
+ }
+
+ function postEditAjaxRequest(reqdata) {
+ var ajax = $.ajax({
+ type:"POST",
+ data: $.param(reqdata),
+ url:"{% url 'xhr_configvaredit' project.id%}",
+ headers: { 'X-CSRFToken': $.cookie("csrftoken")},
+ success: onEditAjaxSuccess,
+ error: onEditAjaxError,
+ })
+ }
+
+
+ $(document).ready(function() {
+
+ //
+ // Register handlers for static elements
+ //
+
+ // change distro variable
+ $('#change-distro-icon').click(function() {
+ $('#change-distro-icon, #distro').hide();
+ $("#change-distro-form").slideDown();
+ });
+
+ $('#cancel-change-distro').click(function(){
+ $("#change-distro-form").slideUp(function() {
+ $('#distro, #change-distro-icon').show();
+ });
+ });
+
+ $("#new-distro").keyup(function(){
+ if ($(this).val().length == 0) {
+ $("#apply-change-distro").attr("disabled","disabled");
+ }
+ else {
+ $("#apply-change-distro").removeAttr("disabled");
+ }
+ });
+
+ $('#apply-change-distro').click(function(){
+ //$('#repo').parent().removeClass('highlight-go');
+ var name = $('#new-distro').val();
+ postEditAjaxRequest({"configvarChange" : 'DISTRO:'+name});
+ $('#distro').html(name);
+ $("#change-distro-form").slideUp(function () {
+ $('#distro, #change-distro-icon').show();
+ });
+ });
+
+
+ // change IMAGE_FSTYPES variable
+ $('#change-image_fstypes-icon').click(function() {
+ $('#change-image_fstypes-icon, #image_fstypes').hide();
+ $("#change-image_fstypes-form").slideDown();
+ // avoid false substring matches by including space separators
+ var html = "";
+ var fstypes = " " + document.getElementById("image_fstypes").innerHTML + " ";
+ var fstypes_list = document.getElementsByClassName('js-checkbox-fstypes-list');
+ // Add the checked boxes first
+ if (" " != fstypes) {
+ for (var i = 0, length = fstypes_list.length; i < length; i++) {
+ if (0 <= fstypes.indexOf(" "+fstypes_list[i].value+" ")) {
+ html += '<label class="checkbox"><input type="checkbox" class="fs-checkbox-fstypes" value="'+fstypes_list[i].value+'" checked="checked">'+fstypes_list[i].value+'</label>\n';
+ }
+ }
+ }
+ // Add the un-checked boxes second
+ for (var i = 0, length = fstypes_list.length; i < length; i++) {
+ if (0 > fstypes.indexOf(" "+fstypes_list[i].value+" ")) {
+ html += '<label class="checkbox"><input type="checkbox" class="fs-checkbox-fstypes" value="'+fstypes_list[i].value+'">'+fstypes_list[i].value+'</label>\n';
+ }
+ }
+ document.getElementById("all-image_fstypes").innerHTML = html;
+ });
+
+ $('#cancel-change-image_fstypes').click(function(){
+ $("#change-image_fstypes-form").slideUp(function() {
+ $('#image_fstypes, #change-image_fstypes-icon').show();
+ });
+ });
+
+ $('#apply-change-image_fstypes').click(function(){
+ var fstypes = '';
+ var checkboxes = document.getElementsByClassName('fs-checkbox-fstypes');
+ for (var i = 0, length = checkboxes.length; i < length; i++) {
+ if (checkboxes[i].checked) {
+ fstypes += checkboxes[i].value + ' ';
+ }
+ }
+ fstypes = fstypes.trim();
+
+ postEditAjaxRequest({"configvarChange" : 'IMAGE_FSTYPES:'+fstypes});
+ $('#image_fstypes').html(fstypes);
+ $('#image_fstypes').parent().removeClass('muted');
+
+ $("#change-image_fstypes-form").slideUp(function() {
+ $('#image_fstypes, #change-image_fstypes-icon').show();
+ });
+ });
+
+
+ // change IMAGE_INSTALL_append variable
+ $('#change-image_install-icon').click(function() {
+ $('#change-image_install-icon, #delete-image_install-icon, #image_install').hide();
+ $("#change-image_install-form").slideDown();
+ });
+
+ $('#cancel-change-image_install').click(function(){
+ $("#change-image_install-form").slideUp(function() {
+ $('#image_install, #change-image_install-icon').show();
+ });
+ });
+
+ $("#new-image_install").keyup(function(){
+ if ($(this).val().length == 0) {
+ $("#apply-change-image_install").attr("disabled","disabled");
+ }
+ else {
+ $("#apply-change-image_install").removeAttr("disabled");
+ }
+ });
+
+ $('#apply-change-image_install').click(function(){
+ var name = $('#new-image_install').val();
+ postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+name});
+ $('#image_install').html(name);
+ $('#image_install').parent().removeClass('muted');
+ $("#change-image_install-form").slideUp(function () {
+ $('#image_install, #change-image_install-icon').show();
+ if (name.length > -1) {
+ $('#delete-image_install-icon').show();
+ }
+ });
+ });
+
+ // delete IMAGE_INSTALL_append variable value
+ $('#delete-image_install-icon').click(function(){
+ $(this).tooltip('hide');
+ postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''});
+ $('#image_install').parent().fadeOut(1000, function(){
+ $('#image_install').parent().addClass('muted');
+ $('#image_install').html('Not set');
+ $('#delete-image_install-icon').hide();
+ $('#image_install').parent().fadeIn(1000);
+ });
+ });
+
+
+ // change PACKAGE_CLASSES variable
+ $('#change-package_classes-icon').click(function() {
+ $('#change-package_classes-icon, #package_classes').hide();
+ $("#change-package_classes-form").slideDown();
+
+ // initialize the pulldown and checkboxes
+ var value = document.getElementById("package_classes").innerHTML;
+ if (0 == value.indexOf("package_dev")) {
+ $('select').selectedIndex = 0;
+ updatePackageClassCheckboxes();
+ if (0 < value.indexOf("package_ipk")) {document.getElementById("package_class_1_input").checked = true};
+ if (0 < value.indexOf("package_rpm")) {document.getElementById("package_class_2_input").checked = true};
+ }
+ if (0 == value.indexOf("package_ipk")) {
+ $('select').selectedIndex = 1;
+ updatePackageClassCheckboxes();
+ if (0 < value.indexOf("package_dev")) {document.getElementById("package_class_1_input").checked = true;};
+ if (0 < value.indexOf("package_rpm")) {document.getElementById("package_class_2_input").checked = true;};
+ }
+ if (0 == value.indexOf("package_rpm")) {
+ $('select').selectedIndex = 2;
+ updatePackageClassCheckboxes();
+ if (0 < value.indexOf("package_dev")) {document.getElementById("#package_class_1_input").checked = true;};
+ if (0 < value.indexOf("package_ipk")) {document.getElementById("#package_class_2_input").checked = true;};
+ }
+ });
+
+ $('#cancel-change-package_classes').click(function(){
+ $("#change-package_classes-form").slideUp(function() {
+ $('#package_classes, #change-package_classes-icon').show();
+ });
+ });
+
+ $('select').change(function() {
+ updatePackageClassCheckboxes();
+ });
+
+ $('#apply-change-package_classes').click(function(){
+ var e = document.getElementById("package_classes-select");
+ var val = e.options[e.selectedIndex].text;
+
+ pc1_checked = document.getElementById("package_class_1_input").checked;
+ pc2_checked = document.getElementById("package_class_2_input").checked;
+ if (val == "package_dev") {
+ if (pc1_checked) val = val + " package_ipk";
+ if (pc2_checked) val = val + " package_rpm";
+ }
+ if (val == "package_ipk") {
+ if (pc1_checked) val = val + " package_dev";
+ if (pc2_checked) val = val + " package_rpm";
+ }
+ if (val == "package_rpm") {
+ if (pc1_checked) val = val + " package_dev";
+ if (pc2_checked) val = val + " package_ipk";
+ }
+
+ $('#package_classes').html(val);
+ //$('#package_classes').parent().removeClass('muted');
+ postEditAjaxRequest({"configvarChange" : 'PACKAGE_CLASSES:'+val});
+ $("#change-package_classes-form").slideUp(function() {
+ $('#package_classes, #change-package_classes-icon').show();
+ });
+ });
+
+
+ // change SDKMACHINE variable
+ $('#change-sdkmachine-icon').click(function() {
+ var current_value = document.getElementById("sdkmachine").innerHTML;
+ var radios = document.getElementsByName('sdkmachine');
+ for (var i = 0, length = radios.length; i < length; i++) {
+ radios[i].checked = false;
+ if (radios[i].value == current_value) {
+ radios[i].checked = true;
+ }
+ }
+ $('#change-sdkmachine-icon, #sdkmachine').hide();
+ $("#change-sdkmachine-form").slideDown();
+ });
+
+ $('#cancel-change-sdkmachine').click(function(){
+ $("#change-sdkmachine-form").slideUp(function() {
+ $('#sdkmachine, #change-sdkmachine-icon').show();
+ });
+ });
+
+ $('#apply-change-sdkmachine').click(function(){
+ var value="";
+ var radios = document.getElementsByName('sdkmachine');
+ for (var i = 0, length = radios.length; i < length; i++) {
+ if (radios[i].checked) {
+ // do whatever you want with the checked radio
+ value=radios[i].value;
+ break;
+ }
+ }
+ postEditAjaxRequest({"configvarChange" : 'SDKMACHINE:'+value});
+ $('#sdkmachine').html(value);
+ $("#change-sdkmachine-form").slideUp(function() {
+ $('#sdkmachine, #change-sdkmachine-icon').show();
+ });
+
+ });
+
+
+ // add new variable
+ $("button#add-configvar-button").click( function (evt) {
+ var variable = $("input#variable")[0].value;
+ var value = $("input#value")[0].value;
+
+ if (validate_new_variable_name()) {
+ postEditAjaxRequest({"configvarAdd" : variable+':'+value});
+
+ // clear the previous values
+ $("input#variable")[0].value = "";
+ $("input#value")[0].value = "";
+
+ }
+ });
+
+ // validate new variable name
+ $("input#variable").focusout( function (evt) {
+ validate_new_variable_name();
+ });
+
+ //activate / deactivate save added variable button
+ $("#variable, #value").keyup(function() {
+ if ( $("#variable").val().length > 0 && $("#value").val().trim().length > 0 ) {
+ $(".save").removeAttr("disabled");
+ }
+ else {
+ $(".save").attr("disabled","disabled");
+ }
+ });
+
+ //
+ // draw and register the dynamic configuration variables and handlers
+ //
+
+ var data = {
+ configvars : []
+ };
+ {% for c in configvars %}
+ data.configvars.push([ "{{c.name}}","{{c.value}}","{{c.pk}}" ]);
+ {% if '' != vars_context|get_dict_value:c.name %}
+ data.vars_context[ "{{c.name}}" ] = "{{vars_context|get_dict_value:c.name }}";
+ {% endif %}
+ {% endfor %}
+
+ // draw these elements and assert their event handlers
+ onEditPageUpdate(data);
+ });
+
+ </script>
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html
new file mode 100644
index 0000000000..0396e25a3a
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projects.html
@@ -0,0 +1,36 @@
+{% extends "base.html" %}
+
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block pagecontent %}
+
+
+ {% include "mrb_section.html" %}
+
+
+ <div class="page-header top-air">
+ <h1>
+ All projects
+ </h1>
+ </div>
+
+{% include "basetable_top_projectbuilds.html" %}
+ {% for o in objects %}
+ <tr class="data">
+ <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td>
+ <td><a href="{% url 'project' o.id %}">{{o.release.name}}</a></td>
+ <td>{{o.get_current_machine_name}}</td>
+ <td>{{o.get_number_of_builds}}</td>
+ <td class="loutcome">{{o.get_last_outcome}}</td>
+ <td class="ltarget">{{o.get_last_target}}</td>
+ <td class="lerrors">{{o.get_last_errors}}</td>
+ <td class="lwarnings">{{o.get_last_warnings}}</td>
+ <td class="limagefiles">{{o.get_last_imgfiles}}</td>
+ <td class="updated">{{o.updated|date:"d/m/y H:i"}}</td>
+ </tr>
+ {% endfor %}
+{% include "basetable_bottom.html" %}
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe.html b/bitbake/lib/toaster/toastergui/templates/recipe.html
index a830ba9fb8..d91768df3b 100644
--- a/bitbake/lib/toaster/toastergui/templates/recipe.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipe.html
@@ -52,16 +52,19 @@
Layer
</dt>
<dd>{{layer.name}}</dd>
+
+ {% if not MANAGED or not build.project %}
<dt>
<i class="icon-question-sign get-help" title="Path to the layer providing the recipe"></i>
Layer directory
</dt>
<dd><code>{{layer.local_path}}</code></dd>
+ {% endif %}
<dt>
<i class="icon-question-sign get-help" title="Path to the recipe .bb file"></i>
Recipe file
</dt>
- <dd><code>{{object.file_path}}</code></dd>
+ <dd><code>{{object.get_local_path}}</code></dd>
{% if layer_version.branch %}
<dt>
<i class="icon-question-sign get-help" title="The Git branch of the layer providing the recipe"></i>
@@ -126,6 +129,12 @@
<td>
{% ifnotequal task.sstate_result task.SSTATE_NA %}
<a {{ task|task_color }} href="{% url "task" build.pk task.pk %}">{{task.get_sstate_result_display}}</a>
+ {% if MANAGED and build.project and task.outcome = task.OUTCOME_FAILED %}
+ <a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
+
{% endifnotequal %}
</td>
@@ -241,14 +250,14 @@
<div class="row span4 well">
<h2>About {{object.name}}</h2>
- <dl>
+ <dl class="item-info">
{% if object.summary %}
<dt>Summary</dt>
- <dd><p>{{object.summary}}</p></dd>
+ <dd>{{object.summary}}</dd>
{% endif %}
{% if object.description %}
<dt>Description</dt>
- <dd><p>{{object.description}}</dd>
+ <dd>{{object.description}}</dd>
{% endif %}
{% if object.homepage %}
<dt>Homepage</dt>
diff --git a/bitbake/lib/toaster/toastergui/templates/recipes.html b/bitbake/lib/toaster/toastergui/templates/recipes.html
index 791a487a81..889e676b45 100755..100644
--- a/bitbake/lib/toaster/toastergui/templates/recipes.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipes.html
@@ -98,8 +98,11 @@
{{recipe.layer_version.commit|truncatechars:13}}
</a>
</td>
- <!-- Layer directory -->
- <td class="layer_version__layer__local_path">{{recipe.layer_version.layer.local_path}}</td>
+
+ {% if not MANAGED or not build.project %}
+ <!-- Layer directory -->
+ <td class="layer_version__layer__local_path">{{recipe.layer_version.layer.local_path}}</td>
+ {% endif %}
</tr>
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/target.html b/bitbake/lib/toaster/toastergui/templates/target.html
index 564fd27162..1309b52dad 100644
--- a/bitbake/lib/toaster/toastergui/templates/target.html
+++ b/bitbake/lib/toaster/toastergui/templates/target.html
@@ -65,6 +65,7 @@
{% include "basetable_top.html" %}
{% for package in objects %}
<tr>
+ {# order of the table data must match the columns defined in template's context tablecols #}
<td class="package_name">
<a href="{% url 'package_included_detail' build.id target.id package.id %}">
{{package.name}}
@@ -79,16 +80,17 @@
{{package.version|filtered_packageversion:package.revision}}
</a>
</td>
+ <td class="license">
+ {{package.license}}
+ </td>
<td class="size sizecol">
{{package.size|filtered_installedsize:package.installed_size|filtered_filesizeformat}}
</td>
+
<td class="size_over_total sizecol">
{{package|filter_sizeovertotal:packages_sum}}
</td>
- <td class="license">
- {{package.license}}
- </td>
- <td class="depends">
+ <td class="depends">
{% with deps=package.runtime_dependencies %}
{% with deps_count=deps|length %}
{% if deps_count > 0 %}
@@ -150,9 +152,11 @@
{{package.recipe.layer_version.commit|truncatechars:13}}
</a>
</td>
- <td class="layer_directory">
- {{ package.recipe.layer_version.layer.local_path }}
- </td>
+ {% if not MANAGED or not build.project %}
+ <td class="layer_directory">
+ {{ package.recipe.layer_version.layer.local_path }}
+ </td>
+ {% endif %}
</tr>
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html
new file mode 100644
index 0000000000..590ecb9a0e
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/targets.html
@@ -0,0 +1,270 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Targets</li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <div class="page-header">
+ <h1>
+ {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
+ {{objects.paginator.count}} target{{objects.paginator.count|pluralize}} found
+ {% elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
+ No targets found
+ {%else%}
+ All targets
+ {%endif%}
+ <i class="icon-question-sign get-help heading-help" title="This page lists all the targets compatible with " + {{project.release.name}} + " that Toaster knows about."></i>
+ </h1>
+ </div>
+
+ <div id="zone1alerts">
+
+ </div>
+
+{% if objects.paginator.count == 0 %}
+ <div class="row-fluid">
+ <div class="alert">
+ <form class="no-results input-append" id="searchform">
+ <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
+ <button class="btn" type="submit" value="Search">Search</button>
+ <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all targets</button>
+ </form>
+ </div>
+ </div>
+
+{% else %}
+
+{% include "basetable_top.html" %}
+ {% for o in objects %}
+ <tr class="data">
+ <td class="target">
+ {{o.name}}
+ <a target="_blank" href="{{o.get_layersource_view_url}}"><i class="icon-share get-info"></i></a>
+ </td>
+ <td class="version">{{o.version}}</td>
+ <td class="description">{% if o.description %}{{o.description}}{% else %}{{o.summary}}{%endif%}</td>
+ <td class="recipe-file">
+ <code>{{o.file_path}}</code>
+ <a href="{{o.get_vcs_link_url}}{{o.file_path}}" target="_blank"><i class="icon-share get-info"></i></a>
+ </td>
+ <td class="target-section">{{o.section}}</td>
+ <td class="license">{{o.license}}</td>
+ <td class="layer"><a href="{% url 'layerdetails' o.layer_version.id%}">{{o.layer_version.layer.name}}</a></td>
+ <td class="source">{{o.layer_source.name}}</td>
+ <td class="branch">
+ {% if o.layer_version.up_branch %}
+ {{o.layer_version.up_branch.name}}
+ {% else %}
+ <a class="btn"
+ data-content="<ul class='unstyled'>
+ <li>{{o.layer_version.commit}}</li>
+ </ul>">
+ {{o.layer_version.commit|truncatechars:13}}
+ </a>
+ {% endif %}
+ </td>
+ <td class="add-layer" value="{{o.pk}}" layerversion_id="{{o.layer_version.pk}}">
+ <div id="layer-tooltip-{{o.pk}}" style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner">layer was modified</div>
+ <a href="{% url 'project' project.id %}#/targetbuild={{o.name}}" id="target-build-{{o.pk}}" class="btn btn-block remove-layer" style="display:none;" >
+ Build target
+ </a>
+ <a id="layer-add-{{o.pk}}" class="btn btn-block" style="display:none;" href="javascript:layerAdd({{o.layer_version.pk}}, '{{o.layer_version.layer.name}}', '{%url 'layerdetails' o.layer_version.pk%}', {{o.pk}})" >
+ <i class="icon-plus"></i>
+ Add layer
+ <i title="" class="icon-question-sign get-help" data-original-title="To build this target, you must first add the {{o.layer_version.layer.name}} layer to your project"></i>
+ </a>
+ </td>
+ </tr>
+ {% endfor %}
+{% include "basetable_bottom.html" %}
+
+ <!-- Modals -->
+
+ <!-- 'Layer dependencies modal' -->
+ <div id="dependencies_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
+ <form id="dependencies_modal_form">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span class="layer-name"></span> dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p><strong class="layer-name"></strong> depends on some layers that are not added to your project. Select the ones you want to add:</p>
+ <ul class="unstyled" id="dependencies_list">
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" type="submit">Add layers</button>
+ <button class="btn" type="reset" data-dismiss="modal">Cancel</button>
+ </div>
+ </form>
+ </div>
+
+{% endif %}
+
+{% if project %}
+<script>
+
+var tooltipUpdateText;
+
+function _makeXHREditCall(data, onsuccess, onfail) {
+ $.ajax( {
+ type: "POST",
+ url: "{% url 'xhr_projectedit' project.id %}",
+ data: data,
+ headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+ success: function (_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ updateButtons(_data.layers.map(function (e) {return e.id}));
+ if (onsuccess != undefined) onsuccess(_data);
+ }
+ },
+ error: function (_data) {
+ console.warn("Call failed");
+ console.warn(_data);
+ }
+ });
+}
+
+function show_alert(text, cls) {
+ $("#zone1alerts").html("<div class=\"alert alert-info lead\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" + text + "</div>");
+}
+
+
+function show_dependencies_modal(layerId, layerName, layerURL, dependencies) {
+ // update layer name
+ $('.layer-name').text(layerName);
+ var deplistHtml = "";
+ for (var i = 0; i < dependencies.length; i++) {
+ deplistHtml += "<li><label class=\"checkbox\"><input name=\"dependencies\" value=\""
+ deplistHtml += dependencies[i].id;
+ deplistHtml +="\" type=\"checkbox\" checked=\"checked\"/>";
+ deplistHtml += dependencies[i].name;
+ deplistHtml += "</label></li>";
+ }
+ $('#dependencies_list').html(deplistHtml);
+
+ var selected = [layerId];
+ var layer_link_list = undefined;
+
+ $("#dependencies_modal_form").submit(function (e) {
+ e.preventDefault();
+ $("input[name='dependencies']:checked").map(function () { selected.push(parseInt($(this).val()))});
+ layer_link_list = "<a href='"+layerURL+"'>"+layerName+"</a>";
+ if (selected.length > 1) {
+ tooltipUpdateText = "" + selected.length + " layers added";
+ } else {
+ tooltipUpdateText = "1 layer added";
+ }
+
+ for (var i = 0; i < selected.length; i++) {
+ for (var j = 0; j < dependencies.length; j++) {
+ if (dependencies[j].id == selected[i]) {
+ layer_link_list+= ", <a href='"+dependencies[j].layerdetailurl+"'>"+dependencies[j].name+"</a>"
+ break;
+ }
+ }
+ }
+
+ $('#dependencies_modal').modal('hide');
+
+ {% if project %}
+ _makeXHREditCall({ 'layerAdd': selected.join(",") }, function onXHRSuccess() {
+ show_alert("You have added <strong>"+selected.length+"</strong> layer(s) to <a href=\"{% url 'project' project.id%}\">{{project.name}}</a>: " + layer_link_list);
+ });
+ {% endif %}
+
+ });
+ $('#dependencies_modal').modal('show');
+}
+
+function updateLayerCountLabels (amount) {
+ /* Update the filter labels */
+ var countLabel = $("#layer_version__projectlayer__project\\:{{project.id}}_count");
+ countLabel.text(Number(countLabel.text())+amount);
+
+ var countLabelRemaining = $("#layer_version__projectlayer__project\\:NOT{{project.id}}_count");
+ countLabelRemaining.text(Number(countLabelRemaining.text())-amount);
+}
+
+var pressedButton = undefined;
+
+function layerAdd(layerId, layerName, layerURL, pressedButtonId) {
+ pressedButton = pressedButtonId;
+ $.ajax({
+ url: '{% url "xhr_datatypeahead" %}',
+ data: {'type': 'layerdeps','value':layerId},
+ success: function(_data) {
+ if (_data.error != "ok") {
+ console.warn(_data.error);
+ } else {
+ updateLayerCountLabels(_data.list.length+1);
+
+ if (_data.list.length > 0) {
+ show_dependencies_modal(layerId, layerName, layerURL, _data.list);
+ }
+ else {
+ tooltipUpdateText = "1 layer added";
+ _makeXHREditCall({ 'layerAdd': layerId }, function () {
+ show_alert("You have added <strong>1</strong> layer to <a href=\"{% url 'project' project.id%}\">{{project.name}}</a>: <a href=\""+layerURL+"\">" + layerName +"</a>");
+ });
+ }
+ }
+ }
+ })
+}
+
+function buttonSet(id, state) {
+ var tohide, toshow;
+ if (state == "add")
+ {
+ toshow = "#layer-add-";
+ tohide = "#target-build-";
+ }
+ else if (state == "build")
+ {
+ tohide = "#layer-add-";
+ toshow = "#target-build-";
+ }
+
+ var previouslyvisible = $(tohide + id).is(":visible");
+ if (previouslyvisible && id == pressedButton) {
+ $(tohide + id).fadeOut( function() {
+ $("#layer-tooltip-" + id).text(tooltipUpdateText);
+ $("#layer-tooltip-" + id).fadeIn().delay(2000).fadeOut(function(){
+ $(toshow + id).delay(300).fadeIn();
+ });
+ });
+ } else {
+ $(tohide + id).hide();
+ $("#layer-tooltip-" + id).hide();
+ $(toshow + id).show();
+ }
+};
+
+
+function updateButtons(projectLayers) {
+ var displayedLayers = [];
+ $(".add-layer").map(function () { displayedLayers.push( { "l": parseInt($(this).attr('layerversion_id')), "i": parseInt($(this).attr('value'))})});
+ for (var i=0; i < displayedLayers.length; i++) {
+ if (projectLayers.indexOf(displayedLayers[i].l) > -1) {
+ buttonSet(displayedLayers[i].i, "build");
+ }
+ else {
+ buttonSet(displayedLayers[i].i, "add");
+ }
+ }
+}
+
+$(document).ready(function (){
+ updateButtons({{projectlayerset}});
+});
+
+</script>
+{%endif%}
+
+{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/task.html b/bitbake/lib/toaster/toastergui/templates/task.html
index 3c4a3d4893..09fd25b259 100644
--- a/bitbake/lib/toaster/toastergui/templates/task.html
+++ b/bitbake/lib/toaster/toastergui/templates/task.html
@@ -24,13 +24,17 @@
{# executed tasks outcome #}
<dl class="dl-horizontal">
{% if task.logfile %}
+ {% if MANAGED and build.project %}
+ <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download task log</a>
+ {% else %}
<dt>
<i class="icon-question-sign get-help" title="Path the task log file"></i> Log file
</dt>
<dd>
- <code>{{task.logfile}}</code>
+ <code>{{task.logfile}}</code>
</dd>
{% endif %}
+ {% endif %}
{# show stack trace for failed task #}
{% if task.outcome == task.OUTCOME_FAILED and log_head %}
<h3>Python stack trace</h3>
@@ -82,6 +86,9 @@
</td>
<td>
<a href="{%url "task" match.build.pk match.pk%}">{{match.task_name}}</a>
+ {% if task.get_description %}
+ <i class="icon-question-sign get-help hover-help" title="{{task.get_description}}"></i>
+ {% endif %}
</td>
<td>
<a href="{%url "task" match.build.pk match.pk%}">{{match.get_executed_display}}</a>
@@ -105,7 +112,7 @@
{% elif task.outcome == task.OUTCOME_COVERED %}
<dl class="dl-horizontal">
<dt>
- <i class="icon-question-sign get-help" title="The task providing the outcome of this task"></i> Task covered by
+ <i class="icon-question-sign get-help" title="The task(s) providing the outcome of this task"></i> Task covered by
</dt>
<dd>
<ul>
@@ -184,6 +191,9 @@
<strong>Failed</strong> to restore output from sstate cache. The file was found but could not be unpacked.
</div>
<dl class="dl-horizontal">
+ {% if MANAGED and build.project %}
+ <a href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download log</a>
+ {% else %}
<dt>
<i class="icon-question-sign get-help" title="Path to the cache attempt log file"></i>
Log file
@@ -194,6 +204,7 @@
Time (secs)
</dt>
<dd>{{task.elapsed_time|format_none_and_zero}}</dd>
+ {% endif %}
</dl>
<div class="alert alert-info">
Running the real task instead.
@@ -261,8 +272,8 @@
Time (secs)
</dt>
<dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
- {% endif %}
- {% if task.cpu_usage > 0 %}
+ {% endif %}
+ {% if task.cpu_usage > 0 %}
<dt>
<i class="icon-question-sign get-help" title="The percentage of task CPU utilization"></i>
CPU usage
diff --git a/bitbake/lib/toaster/toastergui/templates/tasks.html b/bitbake/lib/toaster/toastergui/templates/tasks.html
index d0c6f4e326..4cbcc5ed68 100644
--- a/bitbake/lib/toaster/toastergui/templates/tasks.html
+++ b/bitbake/lib/toaster/toastergui/templates/tasks.html
@@ -94,6 +94,11 @@
<td class="outcome">
<a href="{%url "task" build.pk task.pk%} ">{{task.get_outcome_display}} </a>
<i class="icon-question-sign get-help hover-help" title="{{task.get_outcome_help}}"></i>
+ {% if MANAGED and build.project and task.outcome = task.OUTCOME_FAILED %}
+ <a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
+ <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
+ </a>
+ {% endif %}
</td>
<td class="cache_attempt">
<a href="{%url "task" build.pk task.pk%} ">{{task.get_sstate_result_display|format_none_and_zero}}</a>
@@ -107,9 +112,12 @@
<td class="disk_io">
{{task.disk_io|format_none_and_zero}}
</td>
+
+ {% if not MANAGED or not build.project %}
<td class="task_log">
{{task.logfile}}
</td>
+ {% endif %}
</tr>
{% endfor %}
@@ -124,10 +132,10 @@
// enable blue hightlight animation for the order link
if (location.href.search('#') > -1) {
var task_order = location.href.split('#')[1];
- $("#" + task_order).addClass("highlight");
+ $("#" + task_order).addClass("highlight");
}
});
-
+
</script>
{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index be75b214ac..276c6eb098 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -24,6 +24,8 @@ import re
from django import template
from django.utils import timezone
from django.template.defaultfilters import filesizeformat
+import json as JsonLib
+from django.utils.safestring import mark_safe
register = template.Library()
@@ -40,6 +42,19 @@ def sectohms(time):
hours = int(tdsec / 3600)
return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60)
+
+@register.filter(name = 'mapselect')
+def mapselect(value, argument):
+ return map(lambda x: vars(x)[argument], value)
+
+
+@register.filter(name = "json")
+def json(value):
+ # JSON spec says that "\/" is functionally identical to "/" to allow for HTML-tag embedding in JSON strings
+ # unfortunately, I can't find any option in the json module to turn on forward-slash escaping, so we do
+ # it manually here
+ return mark_safe(JsonLib.dumps(value, ensure_ascii=False).replace('</', '<\\/'))
+
@register.assignment_tag
def query(qs, **kwargs):
""" template tag which allows queryset filtering. Usage:
@@ -50,6 +65,25 @@ def query(qs, **kwargs):
"""
return qs.filter(**kwargs)
+
+@register.filter("whitespace_slice")
+def whitespace_space_filter(value, arg):
+ try:
+ bits = []
+ for x in arg.split(":"):
+ if len(x) == 0:
+ bits.append(None)
+ else:
+ # convert numeric value to the first whitespace after
+ first_whitespace = value.find(" ", int(x))
+ if first_whitespace == -1:
+ bits.append(int(x))
+ else:
+ bits.append(first_whitespace)
+ return value[slice(*bits)]
+ except (ValueError, TypeError):
+ raise
+
@register.filter
def divide(value, arg):
if int(arg) == 0:
@@ -142,7 +176,7 @@ def variable_parent_name(value):
"""
value=re.sub('_\$.*', '', value)
return re.sub('_[a-z].*', '', value)
-
+
@register.filter
def filter_setin_files(file_list,matchstr):
""" filter/search the 'set in' file lists. Note
@@ -150,7 +184,7 @@ def filter_setin_files(file_list,matchstr):
the <p> marks, but this is safe as the data
is file paths
"""
-
+
# no filters, show last file (if any)
if matchstr == ":":
if file_list:
@@ -162,24 +196,24 @@ def filter_setin_files(file_list,matchstr):
htmlstr=""
# match only filters
if search == '':
- for i in range(len(file_list)):
+ for i in range(len(file_list)):
if re.search(filter, file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
return htmlstr
-
+
# match only search string, plus always last file
if filter == "":
- for i in range(len(file_list)-1):
+ for i in range(len(file_list)-1):
if re.search(search,file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
if htmlstr.find(file_list[len(file_list)-1].file_name) < 0:
htmlstr += file_list[len(file_list)-1].file_name
return htmlstr
-
+
# match filter or search string
- for i in range(len(file_list)):
+ for i in range(len(file_list)):
if re.search(filter, file_list[i].file_name) or re.search(search,file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
@@ -218,7 +252,7 @@ def filtered_packageversion(version, revision):
else ""
"""
return "" if (not version or version == "") else version if (not revision or revision == "") else version + "-" + revision
-
+
@register.filter
def filter_sizeovertotal(package_object, total_size):
""" Return the % size of the package over the total size argument
@@ -227,7 +261,7 @@ def filter_sizeovertotal(package_object, total_size):
size = package_object.installed_size
if size == None or size == '':
size = package_object.size
-
+
return '{:.1%}'.format(float(size)/float(total_size))
from django.utils.safestring import mark_safe
@@ -253,3 +287,11 @@ def get_dict_value(dictionary, key):
return dictionary[key]
except (KeyError, IndexError):
return ''
+
+@register.filter
+def format_build_date(completed_on):
+ now = timezone.now()
+ delta = now - completed_on
+
+ if delta.days >= 1:
+ return True
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 9b583f217b..1c83090f58 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -21,6 +21,8 @@ from django.views.generic import RedirectView
urlpatterns = patterns('toastergui.views',
# landing page
+ url(r'^landing/$', 'landing', name='landing'),
+
url(r'^builds/$', 'builds', name='all-builds'),
# build info navigation
url(r'^build/(?P<build_id>\d+)$', 'builddashboard', name="builddashboard"),
@@ -57,14 +59,47 @@ urlpatterns = patterns('toastergui.views',
url(r'^build/(?P<build_id>\d+)/cpuusage$', 'cpuusage', name='cpuusage'),
url(r'^build/(?P<build_id>\d+)/diskio$', 'diskio', name='diskio'),
- # image information dir - not yet implemented
+ # image information dir
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packagefile/(?P<packagefile_id>\d+)$',
'image_information_dir', name='image_information_dir'),
+ # build download artifact
+ url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', 'build_artifact', name="build_artifact"),
+
# urls not linked from the dashboard
- url(r'^layers/$', 'layer', name='all-layers'),
url(r'^layerversions/(?P<layerversion_id>\d+)/recipes/.*$', 'layer_versions_recipes', name='layer_versions_recipes'),
+
+ # project URLs
+ url(r'^newproject/$', 'newproject', name='newproject'),
+ url(r'^importlayer/$', 'importlayer', name='importlayer'),
+
+ url(r'^layers/$', 'layers', name='layers'),
+ url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'),
+ url(r'^layer/$', 'layerdetails', name='layerdetails'),
+ url(r'^targets/$', 'targets', name='all-targets'),
+ url(r'^machines/$', 'machines', name='machines'),
+
+ url(r'^projects/$', 'projects', name='all-projects'),
+
+ url(r'^project/$', 'project', name='project'),
+ url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
+ url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
+ url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'),
+
+ url(r'^xhr_build/$', 'xhr_build', name='xhr_build'),
+ url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'),
+ url(r'^xhr_projectinfo/$', 'xhr_projectinfo', name='xhr_projectinfo'),
+ url(r'^xhr_projectedit/(?P<pid>\d+)/$', 'xhr_projectedit', name='xhr_projectedit'),
+ url(r'^xhr_configvaredit/(?P<pid>\d+)/$', 'xhr_configvaredit', name='xhr_configvaredit'),
+
+ url(r'^xhr_datatypeahead/$', 'xhr_datatypeahead', name='xhr_datatypeahead'),
+ url(r'^xhr_importlayer/$', 'xhr_importlayer', name='xhr_importlayer'),
+ url(r'^xhr_updatelayer/$', 'xhr_updatelayer', name='xhr_updatelayer'),
+
+ # dashboard for failed build requests
+ url(r'^project/(?P<pid>\d+)/buildrequest/(?P<brid>\d+)$', 'buildrequestdetails', name='buildrequestdetails'),
+
# default redirection
- url(r'^$', RedirectView.as_view( url= 'builds/')),
+ url(r'^$', RedirectView.as_view( url= 'landing')),
)
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 68e981a50e..6ccbf5452d 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -20,20 +20,58 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import operator,re
+import HTMLParser
-from django.db.models import Q, Sum
+from django.db.models import Q, Sum, Count
+from django.db import IntegrityError
from django.shortcuts import render, redirect
from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
-from orm.models import Target_Installed_Package, Target_File, Target_Image_File
+from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact
from django.views.decorators.cache import cache_control
+from django.core.urlresolvers import reverse
+from django.core.exceptions import MultipleObjectsReturned
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
-from django.http import HttpResponseBadRequest
+from django.http import HttpResponseBadRequest, HttpResponseNotFound
from django.utils import timezone
+from django.utils.html import escape
from datetime import timedelta
from django.utils import formats
+from toastergui.templatetags.projecttags import json as jsonfilter
import json
+# all new sessions should come through the landing page;
+# determine in which mode we are running in, and redirect appropriately
+def landing(request):
+ if toastermain.settings.MANAGED and Build.objects.count() == 0 and Project.objects.count() > 0:
+ return redirect(reverse('all-projects'), permanent = False)
+
+ if Build.objects.all().count() > 0:
+ return redirect(reverse('all-builds'), permanent = False)
+
+ return render(request, 'landing.html')
+
+# returns a list for most recent builds; for use in the Project page, xhr_ updates, and other places, as needed
+def _project_recent_build_list(prj):
+ return map(lambda x: {
+ "id": x.pk,
+ "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.brtarget_set.all()),
+ "status": x.get_state_display(),
+ "errors": map(lambda y: {"type": y.errtype, "msg": y.errmsg, "tb": y.traceback}, x.brerror_set.exclude(errmsg__contains="Command Failed")),
+ "build" : map( lambda y: {"id": y.pk,
+ "status": y.get_outcome_display(),
+ "completed_on" : y.completed_on.strftime('%s')+"000",
+ "build_time" : (y.completed_on - y.started_on).total_seconds(),
+ "build_page_url" : reverse('builddashboard', args=(y.pk,)),
+ 'build_time_page_url': reverse('buildtime', args=(y.pk,)),
+ "errors": y.errors_no,
+ "warnings": y.warnings_no,
+ "completeper": y.completeper(),
+ "eta": y.eta().strftime('%s')+"000"}, Build.objects.filter(buildrequest = x)),
+ }, list(prj.buildrequest_set.filter(Q(state__lt=BuildRequest.REQ_COMPLETED) or Q(state=BuildRequest.REQ_DELETED)).order_by("-pk")) +
+ list(prj.buildrequest_set.filter(state__in=[BuildRequest.REQ_COMPLETED, BuildRequest.REQ_FAILED]).order_by("-pk")[:3]))
+
+
def _build_page_range(paginator, index = 1):
try:
page = paginator.page(index)
@@ -68,19 +106,19 @@ def _verify_parameters(g, mandatory_parameters):
def _redirect_parameters(view, g, mandatory_parameters, *args, **kwargs):
import urllib
- from django.core.urlresolvers import reverse
url = reverse(view, kwargs=kwargs)
params = {}
for i in g:
params[i] = g[i]
for i in mandatory_parameters:
if not i in params:
- params[i] = mandatory_parameters[i]
+ params[i] = urllib.unquote(str(mandatory_parameters[i]))
return redirect(url + "?%s" % urllib.urlencode(params), *args, **kwargs)
FIELD_SEPARATOR = ":"
-VALUE_SEPARATOR = "!"
+AND_VALUE_SEPARATOR = "!"
+OR_VALUE_SEPARATOR = "|"
DESCENDING = "-"
def __get_q_for_val(name, value):
@@ -89,20 +127,31 @@ def __get_q_for_val(name, value):
if "AND" in value:
return reduce(operator.and_, map(lambda x: __get_q_for_val(name, x), [ x for x in value.split("AND") ]))
if value.startswith("NOT"):
- kwargs = { name : value.strip("NOT") }
+ value = value[3:]
+ if value == 'None':
+ value = None
+ kwargs = { name : value }
return ~Q(**kwargs)
else:
+ if value == 'None':
+ value = None
kwargs = { name : value }
return Q(**kwargs)
def _get_filtering_query(filter_string):
search_terms = filter_string.split(FIELD_SEPARATOR)
- keys = search_terms[0].split(VALUE_SEPARATOR)
- values = search_terms[1].split(VALUE_SEPARATOR)
+ and_keys = search_terms[0].split(AND_VALUE_SEPARATOR)
+ and_values = search_terms[1].split(AND_VALUE_SEPARATOR)
- querydict = dict(zip(keys, values))
- return reduce(operator.and_, map(lambda x: __get_q_for_val(x, querydict[x]), [k for k in querydict]))
+ and_query = []
+ for kv in zip(and_keys, and_values):
+ or_keys = kv[0].split(OR_VALUE_SEPARATOR)
+ or_values = kv[1].split(OR_VALUE_SEPARATOR)
+ querydict = dict(zip(or_keys, or_values))
+ and_query.append(reduce(operator.or_, map(lambda x: __get_q_for_val(x, querydict[x]), [k for k in querydict])))
+
+ return reduce(operator.and_, [k for k in and_query])
def _get_toggle_order(request, orderkey, reverse = False):
if reverse:
@@ -132,13 +181,13 @@ def _validate_input(input, model):
return None, invalid
# Check we have an equal number of terms both sides of the colon
- if len(input_list[0].split(VALUE_SEPARATOR)) != len(input_list[1].split(VALUE_SEPARATOR)):
+ if len(input_list[0].split(AND_VALUE_SEPARATOR)) != len(input_list[1].split(AND_VALUE_SEPARATOR)):
invalid = "Not all arg names got values"
return None, invalid + str(input_list)
# Check we are looking for a valid field
valid_fields = model._meta.get_all_field_names()
- for field in input_list[0].split(VALUE_SEPARATOR):
+ for field in input_list[0].split(AND_VALUE_SEPARATOR):
if not reduce(lambda x, y: x or y, map(lambda x: field.startswith(x), [ x for x in valid_fields ])):
return None, (field, [ x for x in valid_fields ])
@@ -154,6 +203,7 @@ def _get_search_results(search_term, queryset, model):
search_objects.append(reduce(operator.or_, q_map))
search_object = reduce(operator.and_, search_objects)
+ print "search objects", search_object
queryset = queryset.filter(search_object)
return queryset
@@ -178,6 +228,7 @@ def _search_tuple(request, model):
def _get_queryset(model, queryset, filter_string, search_term, ordering_string, ordering_secondary=''):
if filter_string:
filter_query = _get_filtering_query(filter_string)
+# raise Exception(filter_query)
queryset = queryset.filter(filter_query)
else:
queryset = queryset.all()
@@ -199,186 +250,22 @@ def _get_queryset(model, queryset, filter_string, search_term, ordering_string,
# insure only distinct records (e.g. from multiple search hits) are returned
return queryset.distinct()
+# returns the value of entries per page and the name of the applied sorting field.
+# if the value is given explicitly as a GET parameter it will be the first selected,
+# otherwise the cookie value will be used.
+def _get_parameters_values(request, default_count, default_order):
+ pagesize = request.GET.get('count', request.COOKIES.get('count', default_count))
+ orderby = request.GET.get('orderby', request.COOKIES.get('orderby', default_order))
+ return (pagesize, orderby)
-# shows the "all builds" page
-def builds(request):
- template = 'build.html'
- # define here what parameters the view needs in the GET portion in order to
- # be able to display something. 'count' and 'page' are mandatory for all views
- # that use paginators.
- mandatory_parameters = { 'count': 10, 'page' : 1, 'orderby' : 'completed_on:-' };
- retval = _verify_parameters( request.GET, mandatory_parameters )
- if retval:
- return _redirect_parameters( 'all-builds', request.GET, mandatory_parameters)
-
- # boilerplate code that takes a request for an object type and returns a queryset
- # for that object type. copypasta for all needed table searches
- (filter_string, search_term, ordering_string) = _search_tuple(request, Build)
- queryset_all = Build.objects.exclude(outcome = Build.IN_PROGRESS)
- queryset_with_search = _get_queryset(Build, queryset_all, None, search_term, ordering_string, '-completed_on')
- queryset = _get_queryset(Build, queryset_all, filter_string, search_term, ordering_string, '-completed_on')
-
- # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
- build_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
-
- # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
- build_mru = Build.objects.filter(completed_on__gte=(timezone.now()-timedelta(hours=24))).order_by("-started_on")[:3]
- for b in [ x for x in build_mru if x.outcome == Build.IN_PROGRESS ]:
- tf = Task.objects.filter(build = b)
- tfc = tf.count()
- if tfc > 0:
- b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count()
- else:
- b.completeper = 0
-
- b.eta = 0
- if b.completeper > 0:
- b.eta = timezone.now() + ((timezone.now() - b.started_on)*(100-b.completeper)/b.completeper)
-
- # set up list of fstypes for each build
- fstypes_map = {};
- for build in build_info:
- targets = Target.objects.filter( build_id = build.id )
- comma = "";
- extensions = "";
- for t in targets:
- if ( not t.is_image ):
- continue
- tif = Target_Image_File.objects.filter( target_id = t.id )
- for i in tif:
- s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
- if s == i.file_name:
- s=re.sub('.*\.', '', i.file_name)
- if None == re.search(s,extensions):
- extensions += comma + s
- comma = ", "
- fstypes_map[build.id]=extensions
-
- # send the data to the template
- context = {
- # specific info for
- 'mru' : build_mru,
- # TODO: common objects for all table views, adapt as needed
- 'objects' : build_info,
- 'objectname' : "builds",
- 'default_orderby' : 'completed_on:-',
- 'fstypes' : fstypes_map,
- 'search_term' : search_term,
- 'total_count' : queryset_with_search.count(),
- # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
- 'tablecols' : [
- {'name': 'Outcome', # column with a single filter
- 'qhelp' : "The outcome tells you if a build successfully completed or failed", # the help button content
- 'dclass' : "span2", # indication about column width; comes from the design
- 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending
- 'ordericon':_get_toggle_order_icon(request, "outcome"),
- # filter field will set a filter on that column with the specs in the filter description
- # the class field in the filter has no relation with clclass; the control different aspects of the UI
- # still, it is recommended for the values to be identical for easy tracking in the generated HTML
- 'filter' : {'class' : 'outcome',
- 'label': 'Show:',
- 'options' : [
- ('Successful builds', 'outcome:' + str(Build.SUCCEEDED), queryset_with_search.filter(outcome=str(Build.SUCCEEDED)).count()), # this is the field search expression
- ('Failed builds', 'outcome:'+ str(Build.FAILED), queryset_with_search.filter(outcome=str(Build.FAILED)).count()),
- ]
- }
- },
- {'name': 'Target', # default column, disabled box, with just the name in the list
- 'qhelp': "This is the build target or build targets (i.e. one or more recipes or image recipes)",
- 'orderfield': _get_toggle_order(request, "target__target"),
- 'ordericon':_get_toggle_order_icon(request, "target__target"),
- },
- {'name': 'Machine',
- 'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
- 'orderfield': _get_toggle_order(request, "machine"),
- 'ordericon':_get_toggle_order_icon(request, "machine"),
- 'dclass': 'span3'
- }, # a slightly wider column
- {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
- 'qhelp': "The date and time you started the build",
- 'orderfield': _get_toggle_order(request, "started_on", True),
- 'ordericon':_get_toggle_order_icon(request, "started_on"),
- 'filter' : {'class' : 'started_on',
- 'label': 'Show:',
- 'options' : [
- ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now().strftime("%Y-%m-%d")).count()),
- ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")).count()),
- ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")).count()),
- ]
- }
- },
- {'name': 'Completed on',
- 'qhelp': "The date and time the build finished",
- 'orderfield': _get_toggle_order(request, "completed_on", True),
- 'ordericon':_get_toggle_order_icon(request, "completed_on"),
- 'orderkey' : 'completed_on',
- 'filter' : {'class' : 'completed_on',
- 'label': 'Show:',
- 'options' : [
- ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now().strftime("%Y-%m-%d")).count()),
- ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")).count()),
- ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")).count()),
- ]
- }
- },
- {'name': 'Failed tasks', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox
- 'qhelp': "How many tasks failed during the build",
- 'filter' : {'class' : 'failed_tasks',
- 'label': 'Show:',
- 'options' : [
- ('Builds with failed tasks', 'task_build__outcome:4', queryset_with_search.filter(task_build__outcome=4).count()),
- ('Builds without failed tasks', 'task_build__outcome:NOT4', queryset_with_search.filter(~Q(task_build__outcome=4)).count()),
- ]
- }
- },
- {'name': 'Errors', 'clclass': 'errors_no',
- 'qhelp': "How many errors were encountered during the build (if any)",
- 'orderfield': _get_toggle_order(request, "errors_no", True),
- 'ordericon':_get_toggle_order_icon(request, "errors_no"),
- 'orderkey' : 'errors_no',
- 'filter' : {'class' : 'errors_no',
- 'label': 'Show:',
- 'options' : [
- ('Builds with errors', 'errors_no__gte:1', queryset_with_search.filter(errors_no__gte=1).count()),
- ('Builds without errors', 'errors_no:0', queryset_with_search.filter(errors_no=0).count()),
- ]
- }
- },
- {'name': 'Warnings', 'clclass': 'warnings_no',
- 'qhelp': "How many warnings were encountered during the build (if any)",
- 'orderfield': _get_toggle_order(request, "warnings_no", True),
- 'ordericon':_get_toggle_order_icon(request, "warnings_no"),
- 'orderkey' : 'warnings_no',
- 'filter' : {'class' : 'warnings_no',
- 'label': 'Show:',
- 'options' : [
- ('Builds with warnings','warnings_no__gte:1', queryset_with_search.filter(warnings_no__gte=1).count()),
- ('Builds without warnings','warnings_no:0', queryset_with_search.filter(warnings_no=0).count()),
- ]
- }
- },
- {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
- 'qhelp': "How long it took the build to finish",
- 'orderfield': _get_toggle_order(request, "timespent", True),
- 'ordericon':_get_toggle_order_icon(request, "timespent"),
- 'orderkey' : 'timespent',
- },
- {'name': 'Log',
- 'dclass': "span4",
- 'qhelp': "Path to the build main log file",
- 'clclass': 'log', 'hidden': 1,
- 'orderfield': _get_toggle_order(request, "cooker_log_path"),
- 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
- 'orderkey' : 'cooker_log_path',
- },
- {'name': 'Output', 'clclass': 'output',
- 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
- # TODO: compute image fstypes from Target_Image_File
- },
- ]
- }
- return render(request, template, context)
+# set cookies for parameters. this is usefull in case parameters are set
+# manually from the GET values of the link
+def _save_parameters_cookies(response, pagesize, orderby, request):
+ html_parser = HTMLParser.HTMLParser()
+ response.set_cookie(key='count', value=pagesize, path=request.path)
+ response.set_cookie(key='orderby', value=html_parser.unescape(orderby), path=request.path)
+ return response
##
@@ -390,7 +277,7 @@ def builddashboard( request, build_id ):
template = "builddashboard.html"
if Build.objects.filter( pk=build_id ).count( ) == 0 :
return redirect( builds )
- build = Build.objects.filter( pk = build_id )[ 0 ];
+ build = Build.objects.get( pk = build_id );
layerVersionId = Layer_Version.objects.filter( build = build_id );
recipeCount = Recipe.objects.filter( layer_version__id__in = layerVersionId ).count( );
tgts = Target.objects.filter( build_id = build_id ).order_by( 'target' );
@@ -410,12 +297,8 @@ def builddashboard( request, build_id ):
hasImages = True
npkg = 0
pkgsz = 0
- pid= 0
- tp = Target_Installed_Package.objects.filter( target_id = t.id )
package = None
- for p in tp:
- pid = p.package_id
- package = Package.objects.get( pk = p.package_id )
+ for package in Package.objects.filter(id__in = [x.package_id for x in t.target_installed_package_set.all()]):
pkgsz = pkgsz + package.size
if ( package.installed_name ):
npkg = npkg + 1
@@ -428,8 +311,8 @@ def builddashboard( request, build_id ):
if ( ndx < 0 ):
ndx = 0;
f = i.file_name[ ndx + 1: ]
- imageFiles.append({ 'path': f, 'size' : i.file_size })
- if ( t.is_image and
+ imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size })
+ if ( t.is_image and
(( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
targetHasNoImages = True
elem[ 'imageFiles' ] = imageFiles
@@ -446,6 +329,8 @@ def builddashboard( request, build_id ):
if ( p.installed_name ):
packageCount = packageCount + 1
+ logmessages = list(LogMessage.objects.filter( build = build_id ))
+
context = {
'build' : build,
'hasImages' : hasImages,
@@ -453,7 +338,7 @@ def builddashboard( request, build_id ):
'targets' : targets,
'recipecount' : recipeCount,
'packagecount' : packageCount,
- 'logmessages' : LogMessage.objects.filter( build = build_id ),
+ 'logmessages' : logmessages,
}
return render( request, template, context )
@@ -516,8 +401,8 @@ def task( request, build_id, task_id ):
}
if request.GET.get( 'show_matches', "" ):
context[ 'showing_matches' ] = True
- context[ 'matching_tasks' ] = Task.objects.filter(
- sstate_checksum=task.sstate_checksum ).filter(
+ context[ 'matching_tasks' ] = Task.objects.filter(
+ sstate_checksum=task.sstate_checksum ).filter(
build__completed_on__lt=task.build.completed_on).exclude(
order__isnull=True).exclude(outcome=Task.OUTCOME_NA).order_by('-build__completed_on')
@@ -529,14 +414,14 @@ def recipe(request, build_id, recipe_id):
if Recipe.objects.filter(pk=recipe_id).count() == 0 :
return redirect(builds)
- object = Recipe.objects.filter(pk=recipe_id)[0]
- layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0]
- layer = Layer.objects.filter(pk=layer_version.layer_id)[0]
+ object = Recipe.objects.get(pk=recipe_id)
+ layer_version = Layer_Version.objects.get(pk=object.layer_version_id)
+ layer = Layer.objects.get(pk=layer_version.layer_id)
tasks = Task.objects.filter(recipe_id = recipe_id, build_id = build_id).exclude(order__isnull=True).exclude(task_name__endswith='_setscene').exclude(outcome=Task.OUTCOME_NA)
packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id).filter(size__gte=0)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'object' : object,
'layer_version' : layer_version,
'layer' : layer,
@@ -547,25 +432,27 @@ def recipe(request, build_id, recipe_id):
def target_common( request, build_id, target_id, variant ):
template = "target.html"
- default_orderby = 'name:+';
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'name:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby': orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
- return _redirect_parameters(
- variant, request.GET, mandatory_parameters,
+ return _redirect_parameters(
+ variant, request.GET, mandatory_parameters,
build_id = build_id, target_id = target_id )
( filter_string, search_term, ordering_string ) = _search_tuple( request, Package )
# FUTURE: get rid of nested sub-queries replacing with ManyToMany field
queryset = Package.objects.filter(
- size__gte = 0,
+ size__gte = 0,
id__in = Target_Installed_Package.objects.filter(
target_id=target_id ).values( 'package_id' ))
packages_sum = queryset.aggregate( Sum( 'installed_size' ))
queryset = _get_queryset(
Package, queryset, filter_string, search_term, ordering_string, 'name' )
- packages = _build_page_range( Paginator(
- queryset, request.GET.get( 'count', 25 )),request.GET.get( 'page', 1 ))
+ packages = _build_page_range( Paginator(queryset, pagesize), request.GET.get( 'page', 1 ))
+
+
+ build = Build.objects.get( pk = build_id )
# bring in package dependencies
for p in packages.object_list:
@@ -599,8 +486,6 @@ def target_common( request, build_id, target_id, variant ):
tc_sizePercentage = {
'name' : 'Size over total (%)',
'qhelp' : 'Proportion of the overall size represented by this package',
- 'orderfield' : _get_toggle_order( request, "size" ),
- 'ordericon' : _get_toggle_order_icon( request, "size" ),
'clclass' : 'size_over_total',
'hidden' : 1,
}
@@ -629,8 +514,7 @@ eans multiple licenses exist that cover different parts of the source',
tc_dependencies[ "hidden" ] = 1
tc_rdependencies = {
'name' : 'Reverse dependencies',
- 'qhelp' : 'Package run-time reverse dependencies (i.e. which other packages depend on t\
-his package',
+ 'qhelp' : 'Package run-time reverse dependencies (i.e. which other packages depend on this package',
'clclass' : 'brought_in_by',
}
if ( variant == 'target' ):
@@ -642,6 +526,7 @@ his package',
'qhelp' : 'The name of the recipe building the package',
'orderfield' : _get_toggle_order( request, "recipe__name" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__name" ),
+ 'orderkey' : "recipe__name",
'clclass' : 'recipe_name',
'hidden' : 0,
}
@@ -656,6 +541,7 @@ his package',
'qhelp' : 'The name of the layer providing the recipe that builds the package',
'orderfield' : _get_toggle_order( request, "recipe__layer_version__layer__name" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__layer__name" ),
+ 'orderkey' : "recipe__layer_version__layer__name",
'clclass' : 'layer_name',
'hidden' : 1,
}
@@ -664,6 +550,7 @@ his package',
'qhelp' : 'The Git branch of the layer providing the recipe that builds the package',
'orderfield' : _get_toggle_order( request, "recipe__layer_version__branch" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__branch" ),
+ 'orderkey' : "recipe__layer_version__branch",
'clclass' : 'layer_branch',
'hidden' : 1,
}
@@ -673,23 +560,15 @@ his package',
'clclass' : 'layer_commit',
'hidden' : 1,
}
- tc_layerDir = {
- 'name':'Layer directory',
- 'qhelp':'Location in disk of the layer providing the recipe that builds the package',
- 'orderfield' : _get_toggle_order( request, "recipe__layer_version__layer__local_path" ),
- 'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__layer__local_path" )\
-,
- 'clclass' : 'layer_directory',
- 'hidden' : 1,
- }
- context = {
+
+ context = {
'objectname': variant,
- 'build' : Build.objects.filter( pk = build_id )[ 0 ],
+ 'build' : build,
'target' : Target.objects.filter( pk = target_id )[ 0 ],
'objects' : packages,
'packages_sum' : packages_sum[ 'installed_size__sum' ],
'object_search_display': "packages included",
- 'default_orderby' : default_orderby,
+ 'default_orderby' : orderby,
'tablecols' : [
tc_package,
tc_packageVersion,
@@ -703,10 +582,25 @@ his package',
tc_layer,
tc_layerBranch,
tc_layerCommit,
- tc_layerDir,
]
}
- return( render( request, template, context ))
+
+ if not toastermain.settings.MANAGED or build.project is None:
+
+ tc_layerDir = {
+ 'name':'Layer directory',
+ 'qhelp':'Location in disk of the layer providing the recipe that builds the package',
+ 'orderfield' : _get_toggle_order( request, "recipe__layer_version__layer__local_path" ),
+ 'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__layer__local_path" ),
+ 'orderkey' : "recipe__layer_version__layer__local_path",
+ 'clclass' : 'layer_directory',
+ 'hidden' : 1,
+ }
+ context['tablecols'].append(tc_layerDir)
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def target( request, build_id, target_id ):
return( target_common( request, build_id, target_id, "target" ))
@@ -729,7 +623,6 @@ class LazyEncoder(json.JSONEncoder):
return super(LazyEncoder, self).default(obj)
from toastergui.templatetags.projecttags import filtered_filesizeformat
-from django import template
import os
def _get_dir_entries(build_id, target_id, start):
node_str = {
@@ -784,9 +677,7 @@ def _get_dir_entries(build_id, target_id, start):
# don't use resolved path from above, show immediate link-to
if o.sym_target_id != "" and o.sym_target_id != None:
entry['link_to'] = Target_File.objects.get(pk=o.sym_target_id).path
- t = template.Template('{% load projecttags %} {{ size|filtered_filesizeformat }}')
- c = template.Context({'size': o.size})
- entry['size'] = str(t.render(c))
+ entry['size'] = filtered_filesizeformat(o.size)
if entry['link_to'] != None:
entry['permission'] = node_str[o.inodetype] + o.permission
else:
@@ -795,13 +686,16 @@ def _get_dir_entries(build_id, target_id, start):
entry['group'] = o.group
response.append(entry)
- except:
+ except Exception as e:
+ print "Exception ", e
+ import traceback
+ traceback.print_exc(e)
pass
# sort by directories first, then by name
rsorted = sorted(response, key=lambda entry : entry['name'])
rsorted = sorted(rsorted, key=lambda entry : entry['isdir'], reverse=True)
- return json.dumps(rsorted, cls=LazyEncoder)
+ return json.dumps(rsorted, cls=LazyEncoder).replace('</', '<\\/')
def dirinfo(request, build_id, target_id, file_path=None):
template = "dirinfo.html"
@@ -824,8 +718,8 @@ def dirinfo(request, build_id, target_id, file_path=None):
if head != sep:
dir_list.insert(0, head)
- context = { 'build': Build.objects.filter(pk=build_id)[0],
- 'target': Target.objects.filter(pk=target_id)[0],
+ context = { 'build': Build.objects.get(pk=build_id),
+ 'target': Target.objects.get(pk=target_id),
'packages_sum': packages_sum['installed_size__sum'],
'objects': objects,
'dir_list': dir_list,
@@ -888,32 +782,31 @@ def tasks_common(request, build_id, variant, task_anchor):
title_variant='Time'
object_search_display="time data"
filter_search_display="tasks"
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'elapsed_time:-'};
- default_orderby = 'elapsed_time:-';
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'elapsed_time:-')
elif 'diskio' == variant:
title_variant='Disk I/O'
object_search_display="disk I/O data"
filter_search_display="tasks"
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'disk_io:-'};
- default_orderby = 'disk_io:-';
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'disk_io:-')
elif 'cpuusage' == variant:
title_variant='CPU usage'
object_search_display="CPU usage data"
filter_search_display="tasks"
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'cpu_usage:-'};
- default_orderby = 'cpu_usage:-';
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'cpu_usage:-')
else :
title_variant='Tasks'
object_search_display="tasks"
filter_search_display="tasks"
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'order:+'};
- default_orderby = 'order:+';
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'order:+')
+
+
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby': orderby }
template = 'tasks.html'
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
if task_anchor:
- mandatory_parameters['anchor']=task_anchor
+ mandatory_parameters['anchor']=task_anchor
return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
(filter_string, search_term, ordering_string) = _search_tuple(request, Task)
queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA)
@@ -927,22 +820,22 @@ def tasks_common(request, build_id, variant, task_anchor):
else:
queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order')
- # compute the anchor's page
+ # compute the anchor's page
if anchor:
- request.GET = request.GET.copy()
+ request.GET = request.GET.copy()
del request.GET['anchor']
i=0
a=int(anchor)
- count_per_page=int(request.GET.get('count', 100))
+ count_per_page=int(pagesize)
for task in queryset.iterator():
if a == task.order:
- new_page= (i / count_per_page ) + 1
- request.GET.__setitem__('page', new_page)
- mandatory_parameters['page']=new_page
- return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
+ new_page= (i / count_per_page ) + 1
+ request.GET.__setitem__('page', new_page)
+ mandatory_parameters['page']=new_page
+ return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
i += 1
- tasks = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
+ tasks = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1))
# define (and modify by variants) the 'tablecols' members
tc_order={
@@ -1066,14 +959,15 @@ def tasks_common(request, build_id, variant, task_anchor):
}
if 'diskio' == variant: tc_diskio['hidden']='0'; del tc_diskio['clclass']; tc_cache['hidden']='1';
+ build = Build.objects.get(pk=build_id)
context = { 'objectname': variant,
'object_search_display': object_search_display,
'filter_search_display': filter_search_display,
'title': title_variant,
- 'build': Build.objects.filter(pk=build_id)[0],
+ 'build': build,
'objects': tasks,
- 'default_orderby' : default_orderby,
+ 'default_orderby' : orderby,
'search_term': search_term,
'total_count': queryset_with_search.count(),
'tablecols':[
@@ -1087,10 +981,15 @@ def tasks_common(request, build_id, variant, task_anchor):
tc_time,
tc_cpu,
tc_diskio,
- tc_log,
]}
- return render(request, template, context)
+
+ if not toastermain.settings.MANAGED or build.project is None:
+ context['tablecols'].append(tc_log)
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def tasks(request, build_id):
return tasks_common(request, build_id, 'tasks', '')
@@ -1110,7 +1009,8 @@ def cpuusage(request, build_id):
def recipes(request, build_id):
template = 'recipes.html'
- mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'name:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 100, 'name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
return _redirect_parameters( 'recipes', request.GET, mandatory_parameters, build_id = build_id)
@@ -1118,7 +1018,7 @@ def recipes(request, build_id):
queryset = Recipe.objects.filter(layer_version__id__in=Layer_Version.objects.filter(build=build_id))
queryset = _get_queryset(Recipe, queryset, filter_string, search_term, ordering_string, 'name')
- recipes = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
+ recipes = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1))
# prefetch the forward and reverse recipe dependencies
deps = { }; revs = { }
@@ -1133,9 +1033,11 @@ def recipes(request, build_id):
revlist.append(recipe_dep)
revs[recipe.id] = revlist
+ build = Build.objects.get(pk=build_id)
+
context = {
'objectname': 'recipes',
- 'build': Build.objects.filter(pk=build_id)[0],
+ 'build': build,
'objects': recipes,
'default_orderby' : 'name:+',
'recipe_deps' : deps,
@@ -1206,6 +1108,11 @@ def recipes(request, build_id):
'qhelp':'The Git commit of the layer providing the recipe',
'clclass': 'layer_version__layer__commit', 'hidden': 1,
},
+ ]
+ }
+
+ if not toastermain.settings.MANAGED or build.project is None:
+ context['tablecols'].append(
{
'name':'Layer directory',
'qhelp':'Path to the layer prodiving the recipe',
@@ -1213,26 +1120,34 @@ def recipes(request, build_id):
'ordericon':_get_toggle_order_icon(request, "layer_version__layer__local_path"),
'orderkey' : 'layer_version__layer__local_path',
'clclass': 'layer_version__layer__local_path', 'hidden': 1,
- },
- ]
- }
+ })
- return render(request, template, context)
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def configuration(request, build_id):
template = 'configuration.html'
variables = Variable.objects.filter(build=build_id)
- BB_VERSION=variables.filter(variable_name='BB_VERSION')[0].variable_value
- BUILD_SYS=variables.filter(variable_name='BUILD_SYS')[0].variable_value
- NATIVELSBSTRING=variables.filter(variable_name='NATIVELSBSTRING')[0].variable_value
- TARGET_SYS=variables.filter(variable_name='TARGET_SYS')[0].variable_value
- MACHINE=variables.filter(variable_name='MACHINE')[0].variable_value
- DISTRO=variables.filter(variable_name='DISTRO')[0].variable_value
- DISTRO_VERSION=variables.filter(variable_name='DISTRO_VERSION')[0].variable_value
- TUNE_FEATURES=variables.filter(variable_name='TUNE_FEATURES')[0].variable_value
- TARGET_FPU=variables.filter(variable_name='TARGET_FPU')[0].variable_value
+
+ def _get_variable_or_empty(variable_name):
+ from django.core.exceptions import ObjectDoesNotExist
+ try:
+ return variables.get(variable_name=variable_name).variable_value
+ except ObjectDoesNotExist:
+ return ''
+
+ BB_VERSION=_get_variable_or_empty(variable_name='BB_VERSION')
+ BUILD_SYS=_get_variable_or_empty(variable_name='BUILD_SYS')
+ NATIVELSBSTRING=_get_variable_or_empty(variable_name='NATIVELSBSTRING')
+ TARGET_SYS=_get_variable_or_empty(variable_name='TARGET_SYS')
+ MACHINE=_get_variable_or_empty(variable_name='MACHINE')
+ DISTRO=_get_variable_or_empty(variable_name='DISTRO')
+ DISTRO_VERSION=_get_variable_or_empty(variable_name='DISTRO_VERSION')
+ TUNE_FEATURES=_get_variable_or_empty(variable_name='TUNE_FEATURES')
+ TARGET_FPU=_get_variable_or_empty(variable_name='TARGET_FPU')
targets = Target.objects.filter(build=build_id)
@@ -1240,7 +1155,7 @@ def configuration(request, build_id):
'objectname': 'configuration',
'object_search_display':'variables',
'filter_search_display':'variables',
- 'build': Build.objects.filter(pk=build_id)[0],
+ 'build': Build.objects.get(pk=build_id),
'BB_VERSION':BB_VERSION,
'BUILD_SYS':BUILD_SYS,
'NATIVELSBSTRING':NATIVELSBSTRING,
@@ -1257,7 +1172,8 @@ def configuration(request, build_id):
def configvars(request, build_id):
template = 'configvars.html'
- mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'variable_name:+', 'filter':'description__regex:.+'};
+ (pagesize, orderby) = _get_parameters_values(request, 100, 'variable_name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby, 'filter' : 'description__regex:.+' }
retval = _verify_parameters( request.GET, mandatory_parameters )
(filter_string, search_term, ordering_string) = _search_tuple(request, Variable)
if retval:
@@ -1272,7 +1188,7 @@ def configvars(request, build_id):
# remove records where the value is empty AND there are no history files
queryset = queryset.exclude(variable_value='',vhistory__file_name__isnull=True)
- variables = _build_page_range(Paginator(queryset, request.GET.get('count', 50)), request.GET.get('page', 1))
+ variables = _build_page_range(Paginator(queryset, pagesize), request.GET.get('page', 1))
# show all matching files (not just the last one)
file_filter= search_term + ":"
@@ -1284,14 +1200,14 @@ def configvars(request, build_id):
file_filter += 'conf/distro/'
if filter_string.find('/bitbake.conf') > 0:
file_filter += '/bitbake.conf'
- build_dir=re.sub("/tmp/log/.*","",Build.objects.filter(pk=build_id)[0].cooker_log_path)
+ build_dir=re.sub("/tmp/log/.*","",Build.objects.get(pk=build_id).cooker_log_path)
context = {
'objectname': 'configvars',
'object_search_display':'BitBake variables',
'filter_search_display':'variables',
'file_filter': file_filter,
- 'build': Build.objects.filter(pk=build_id)[0],
+ 'build': Build.objects.get(pk=build_id),
'objects' : variables,
'total_count':queryset_with_search.count(),
'default_orderby' : 'variable_name:+',
@@ -1338,12 +1254,14 @@ def configvars(request, build_id):
],
}
- return render(request, template, context)
-
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def bpackage(request, build_id):
template = 'bpackage.html'
- mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'name:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 100, 'name:+')
+ mandatory_parameters = { 'count' : pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
return _redirect_parameters( 'packages', request.GET, mandatory_parameters, build_id = build_id)
@@ -1351,11 +1269,11 @@ def bpackage(request, build_id):
queryset = Package.objects.filter(build = build_id).filter(size__gte=0)
queryset = _get_queryset(Package, queryset, filter_string, search_term, ordering_string, 'name')
- packages = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
+ packages = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1))
context = {
'objectname': 'packages built',
- 'build': Build.objects.filter(pk=build_id)[0],
+ 'build': Build.objects.get(pk=build_id),
'objects' : packages,
'default_orderby' : 'name:+',
'tablecols':[
@@ -1431,18 +1349,20 @@ def bpackage(request, build_id):
]
}
- return render(request, template, context)
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def bfile(request, build_id, package_id):
template = 'bfile.html'
files = Package_File.objects.filter(package = package_id)
- context = {'build': Build.objects.filter(pk=build_id)[0], 'objects' : files}
+ context = {'build': Build.objects.get(pk=build_id), 'objects' : files}
return render(request, template, context)
def tpackage(request, build_id, target_id):
template = 'package.html'
packages = map(lambda x: x.package, list(Target_Installed_Package.objects.filter(target=target_id)))
- context = {'build': Build.objects.filter(pk=build_id)[0], 'objects' : packages}
+ context = {'build': Build.objects.get(pk=build_id), 'objects' : packages}
return render(request, template, context)
def layer(request):
@@ -1464,7 +1384,7 @@ def layer_versions_recipes(request, layerversion_id):
recipes = Recipe.objects.filter(layer_version__id = layerversion_id)
context = {'objects': recipes,
- 'layer_version' : Layer_Version.objects.filter( id = layerversion_id )[0]
+ 'layer_version' : Layer_Version.objects.get( id = layerversion_id )
}
return render(request, template, context)
@@ -1586,7 +1506,8 @@ def package_built_detail(request, build_id, package_id):
# follow convention for pagination w/ search although not used for this view
queryset = Package_File.objects.filter(package_id__exact=package_id)
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'path:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'path:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
return _redirect_parameters( 'package_built_detail', request.GET, mandatory_parameters, build_id = build_id, package_id = package_id)
@@ -1594,10 +1515,10 @@ def package_built_detail(request, build_id, package_id):
(filter_string, search_term, ordering_string) = _search_tuple(request, Package_File)
paths = _get_queryset(Package_File, queryset, filter_string, search_term, ordering_string, 'path')
- package = Package.objects.filter(pk=package_id)[0]
+ package = Package.objects.get(pk=package_id)
package.fullpackagespec = _get_fullpackagespec(package)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'package' : package,
'dependency_count' : _get_package_dependency_count(package, -1, False),
'objects' : paths,
@@ -1617,18 +1538,21 @@ def package_built_detail(request, build_id, package_id):
}
if paths.all().count() < 2:
context['disable_sort'] = True;
- return render(request, template, context)
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def package_built_dependencies(request, build_id, package_id):
template = "package_built_dependencies.html"
if Build.objects.filter(pk=build_id).count() == 0 :
return redirect(builds)
- package = Package.objects.filter(pk=package_id)[0]
+ package = Package.objects.get(pk=package_id)
package.fullpackagespec = _get_fullpackagespec(package)
dependencies = _get_package_dependencies(package_id)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'package' : package,
'runtime_deps' : dependencies['runtime_deps'],
'other_deps' : dependencies['other_deps'],
@@ -1642,9 +1566,9 @@ def package_included_detail(request, build_id, target_id, package_id):
if Build.objects.filter(pk=build_id).count() == 0 :
return redirect(builds)
-
# follow convention for pagination w/ search although not used for this view
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'path:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'path:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
return _redirect_parameters( 'package_included_detail', request.GET, mandatory_parameters, build_id = build_id, target_id = target_id, package_id = package_id)
@@ -1653,12 +1577,12 @@ def package_included_detail(request, build_id, target_id, package_id):
queryset = Package_File.objects.filter(package_id__exact=package_id)
paths = _get_queryset(Package_File, queryset, filter_string, search_term, ordering_string, 'path')
- package = Package.objects.filter(pk=package_id)[0]
+ package = Package.objects.get(pk=package_id)
package.fullpackagespec = _get_fullpackagespec(package)
package.alias = _get_package_alias(package)
- target = Target.objects.filter(pk=target_id)[0]
+ target = Target.objects.get(pk=target_id)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'target' : target,
'package' : package,
'reverse_count' : _get_package_reverse_dep_count(package, target_id),
@@ -1679,22 +1603,24 @@ def package_included_detail(request, build_id, target_id, package_id):
]
}
if paths.all().count() < 2:
- context['disable_sort'] = True;
- return render(request, template, context)
+ context['disable_sort'] = True
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def package_included_dependencies(request, build_id, target_id, package_id):
template = "package_included_dependencies.html"
if Build.objects.filter(pk=build_id).count() == 0 :
return redirect(builds)
- package = Package.objects.filter(pk=package_id)[0]
+ package = Package.objects.get(pk=package_id)
package.fullpackagespec = _get_fullpackagespec(package)
package.alias = _get_package_alias(package)
- target = Target.objects.filter(pk=target_id)[0]
+ target = Target.objects.get(pk=target_id)
dependencies = _get_package_dependencies(package_id, target_id)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'package' : package,
'target' : target,
'runtime_deps' : dependencies['runtime_deps'],
@@ -1709,7 +1635,8 @@ def package_included_reverse_dependencies(request, build_id, target_id, package_
if Build.objects.filter(pk=build_id).count() == 0 :
return redirect(builds)
- mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'package__name:+'};
+ (pagesize, orderby) = _get_parameters_values(request, 25, 'package__name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby': orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
return _redirect_parameters( 'package_included_reverse_dependencies', request.GET, mandatory_parameters, build_id = build_id, target_id = target_id, package_id = package_id)
@@ -1718,16 +1645,16 @@ def package_included_reverse_dependencies(request, build_id, target_id, package_
queryset = Package_Dependency.objects.select_related('depends_on__name', 'depends_on__size').filter(depends_on=package_id, target_id=target_id, dep_type=Package_Dependency.TYPE_TRDEPENDS)
objects = _get_queryset(Package_Dependency, queryset, filter_string, search_term, ordering_string, 'package__name')
- package = Package.objects.filter(pk=package_id)[0]
+ package = Package.objects.get(pk=package_id)
package.fullpackagespec = _get_fullpackagespec(package)
package.alias = _get_package_alias(package)
- target = Target.objects.filter(pk=target_id)[0]
+ target = Target.objects.get(pk=target_id)
for o in objects:
if o.package.version != '':
o.package.version += '-' + o.package.revision
o.alias = _get_package_alias(o.package)
context = {
- 'build' : Build.objects.filter(pk=build_id)[0],
+ 'build' : Build.objects.get(pk=build_id),
'package' : package,
'target' : target,
'objects' : objects,
@@ -1751,10 +1678,1610 @@ def package_included_reverse_dependencies(request, build_id, target_id, package_
]
}
if objects.all().count() < 2:
- context['disable_sort'] = True;
- return render(request, template, context)
+ context['disable_sort'] = True
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
def image_information_dir(request, build_id, target_id, packagefile_id):
# stubbed for now
return redirect(builds)
+
+import toastermain.settings
+
+
+# we have a set of functions if we're in managed mode, or
+# a default "page not available" simple functions for interactive mode
+if toastermain.settings.MANAGED:
+
+ from django.contrib.auth.models import User
+ from django.contrib.auth import authenticate, login
+ from django.contrib.auth.decorators import login_required
+
+ from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
+ from orm.models import Branch, LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency
+ from bldcontrol.models import BuildRequest
+
+ import traceback
+
+ class BadParameterException(Exception): pass # error thrown on invalid POST requests
+
+ # the context processor that supplies data used across all the pages
+ def managedcontextprocessor(request):
+ ret = {
+ "projects": Project.objects.all(),
+ "MANAGED" : toastermain.settings.MANAGED,
+ "DEBUG" : toastermain.settings.DEBUG
+ }
+ if 'project_id' in request.session:
+ try:
+ ret['project'] = Project.objects.get(pk = request.session['project_id'])
+ except Project.DoesNotExist:
+ del request.session['project_id']
+ return ret
+
+
+ class InvalidRequestException(Exception):
+ def __init__(self, response):
+ self.response = response
+
+
+ # shows the "all builds" page for managed mode; it displays build requests (at least started!) instead of actual builds
+ def builds(request):
+ template = 'managed_builds.html'
+ # define here what parameters the view needs in the GET portion in order to
+ # be able to display something. 'count' and 'page' are mandatory for all views
+ # that use paginators.
+
+ buildrequests = BuildRequest.objects.exclude(state__lte = BuildRequest.REQ_INPROGRESS).exclude(state=BuildRequest.REQ_DELETED)
+
+ try:
+ context, pagesize, orderby = _build_list_helper(request, buildrequests)
+ except InvalidRequestException as e:
+ return _redirect_parameters( builds, request.GET, e.response)
+
+ context['tablecols'].append(
+ {'name': 'Project', 'clclass': 'projectx',
+ 'filter': {'class': 'project',
+ 'label': 'Project:',
+ 'options': map(lambda x: (x.name,'project:%d' % x.id,x.build_set.filter(outcome__lt=BuildRequest.REQ_INPROGRESS).count()), Project.objects.all()),
+
+ }
+ }
+ )
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
+
+
+
+ # helper function, to be used on "all builds" and "project builds" pages
+ def _build_list_helper(request, buildrequests):
+ # ATTN: we use here the ordering parameters for interactive mode; the translation for BuildRequest fields will happen below
+ default_orderby = 'completed_on:-'
+ (pagesize, orderby) = _get_parameters_values(request, 10, default_orderby)
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ raise InvalidRequestException(mandatory_parameters)
+
+ orig_orderby = orderby
+ # translate interactive mode ordering to managed mode ordering
+ ordering_params = orderby.split(":")
+ if ordering_params[0] == "completed_on":
+ ordering_params[0] = "updated"
+ if ordering_params[0] == "started_on":
+ ordering_params[0] = "created"
+ if ordering_params[0] == "errors_no":
+ ordering_params[0] = "build__errors_no"
+ if ordering_params[0] == "warnings_no":
+ ordering_params[0] = "build__warnings_no"
+ if ordering_params[0] == "machine":
+ ordering_params[0] = "build__machine"
+ if ordering_params[0] == "target__target":
+ ordering_params[0] = "brtarget__target"
+ if ordering_params[0] == "timespent":
+ ordering_params[0] = "id"
+ orderby = default_orderby
+
+ request.GET = request.GET.copy() # get a mutable copy of the GET QueryDict
+ request.GET['orderby'] = ":".join(ordering_params)
+
+ # boilerplate code that takes a request for an object type and returns a queryset
+ # for that object type. copypasta for all needed table searches
+ (filter_string, search_term, ordering_string) = _search_tuple(request, BuildRequest)
+ # we don't display in-progress or deleted builds
+ queryset_all = buildrequests.exclude(state = BuildRequest.REQ_DELETED)
+ queryset_all = queryset_all.annotate(Count('brerror'))
+ queryset_with_search = _get_queryset(BuildRequest, queryset_all, filter_string, search_term, ordering_string, '-updated')
+
+
+ # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
+ build_info = _build_page_range(Paginator(queryset_with_search, pagesize), request.GET.get('page', 1))
+
+ # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
+ # most recent build is like projects' most recent builds, but across all projects
+ build_mru = BuildRequest.objects.all()
+ build_mru = list(build_mru.filter(Q(state__lt=BuildRequest.REQ_COMPLETED) or Q(state=BuildRequest.REQ_DELETED)).order_by("-pk")) + list(build_mru.filter(state__in=[BuildRequest.REQ_COMPLETED, BuildRequest.REQ_FAILED]).order_by("-pk")[:3])
+
+ fstypes_map = {};
+ for build_request in build_info:
+ # set display variables for build request
+ build_request.machine = build_request.brvariable_set.get(name="MACHINE").value
+ build_request.timespent = build_request.updated - build_request.created
+
+ # set up list of fstypes for each build
+ if build_request.build is None:
+ continue
+ targets = Target.objects.filter( build_id = build_request.build.id )
+ comma = "";
+ extensions = "";
+ for t in targets:
+ if ( not t.is_image ):
+ continue
+ tif = Target_Image_File.objects.filter( target_id = t.id )
+ for i in tif:
+ s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
+ if s == i.file_name:
+ s=re.sub('.*\.', '', i.file_name)
+ if None == re.search(s,extensions):
+ extensions += comma + s
+ comma = ", "
+ fstypes_map[build_request.build.id]=extensions
+
+
+ # send the data to the template
+ context = {
+ # specific info for
+ 'mru' : build_mru,
+ # TODO: common objects for all table views, adapt as needed
+ 'objects' : build_info,
+ 'objectname' : "builds",
+ 'default_orderby' : 'updated:-',
+ 'fstypes' : fstypes_map,
+ 'search_term' : search_term,
+ 'total_count' : queryset_with_search.count(),
+ # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
+ 'tablecols' : [
+ {'name': 'Outcome', # column with a single filter
+ 'qhelp' : "The outcome tells you if a build successfully completed or failed", # the help button content
+ 'dclass' : "span2", # indication about column width; comes from the design
+ 'orderfield': _get_toggle_order(request, "state"), # adds ordering by the field value; default ascending unless clicked from ascending into descending
+ 'ordericon':_get_toggle_order_icon(request, "state"),
+ # filter field will set a filter on that column with the specs in the filter description
+ # the class field in the filter has no relation with clclass; the control different aspects of the UI
+ # still, it is recommended for the values to be identical for easy tracking in the generated HTML
+ 'filter' : {'class' : 'outcome',
+ 'label': 'Show:',
+ 'options' : [
+ ('Successful builds', 'state:' + str(BuildRequest.REQ_COMPLETED), queryset_all.filter(state=str(BuildRequest.REQ_COMPLETED)).count()), # this is the field search expression
+ ('Failed builds', 'state:'+ str(BuildRequest.REQ_FAILED), queryset_all.filter(state=str(BuildRequest.REQ_FAILED)).count()),
+ ]
+ }
+ },
+ {'name': 'Target', # default column, disabled box, with just the name in the list
+ 'qhelp': "This is the build target or build targets (i.e. one or more recipes or image recipes)",
+ 'orderfield': _get_toggle_order(request, "brtarget__target"),
+ 'ordericon':_get_toggle_order_icon(request, "brtarget__target"),
+ },
+ {'name': 'Machine',
+ 'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
+ 'orderfield': _get_toggle_order(request, "build__machine"),
+ 'ordericon':_get_toggle_order_icon(request, "build__machine"),
+ 'dclass': 'span3'
+ }, # a slightly wider column
+ {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
+ 'qhelp': "The date and time you started the build",
+ 'orderfield': _get_toggle_order(request, "created", True),
+ 'ordericon':_get_toggle_order_icon(request, "created"),
+ 'filter' : {'class' : 'created',
+ 'label': 'Show:',
+ 'options' : [
+ ("Today's builds" , 'created__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_all.filter(created__gte=timezone.now()).count()),
+ ("Yesterday's builds", 'created__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_all.filter(created__gte=(timezone.now()-timedelta(hours=24))).count()),
+ ("This week's builds", 'created__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_all.filter(created__gte=(timezone.now()-timedelta(days=7))).count()),
+ ]
+ }
+ },
+ {'name': 'Completed on',
+ 'qhelp': "The date and time the build finished",
+ 'orderfield': _get_toggle_order(request, "updated", True),
+ 'ordericon':_get_toggle_order_icon(request, "updated"),
+ 'orderkey' : 'updated',
+ 'filter' : {'class' : 'updated',
+ 'label': 'Show:',
+ 'options' : [
+ ("Today's builds", 'updated__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_all.filter(updated__gte=timezone.now()).count()),
+ ("Yesterday's builds", 'updated__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_all.filter(updated__gte=(timezone.now()-timedelta(hours=24))).count()),
+ ("This week's builds", 'updated__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_all.filter(updated__gte=(timezone.now()-timedelta(days=7))).count()),
+ ]
+ }
+ },
+ {'name': 'Failed tasks', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox
+ 'qhelp': "How many tasks failed during the build",
+ 'filter' : {'class' : 'failed_tasks',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with failed tasks', 'build__task_build__outcome:%d' % Task.OUTCOME_FAILED,
+ queryset_all.filter(build__task_build__outcome=Task.OUTCOME_FAILED).count()),
+ ('Builds without failed tasks', 'build__task_build__outcome:%d' % Task.OUTCOME_FAILED,
+ queryset_all.filter(~Q(build__task_build__outcome=Task.OUTCOME_FAILED)).count()),
+ ]
+ }
+ },
+ {'name': 'Errors', 'clclass': 'errors_no',
+ 'qhelp': "How many errors were encountered during the build (if any)",
+ 'orderfield': _get_toggle_order(request, "build__errors_no", True),
+ 'ordericon':_get_toggle_order_icon(request, "build__errors_no"),
+ 'orderkey' : 'errors_no',
+ 'filter' : {'class' : 'errors_no',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with errors', 'build|build__errors_no__gt:None|0',
+ queryset_all.filter(Q(build=None) | Q(build__errors_no__gt=0)).count()),
+ ('Builds without errors', 'build__errors_no:0',
+ queryset_all.filter(build__errors_no=0).count()),
+ ]
+ }
+ },
+ {'name': 'Warnings', 'clclass': 'warnings_no',
+ 'qhelp': "How many warnings were encountered during the build (if any)",
+ 'orderfield': _get_toggle_order(request, "build__warnings_no", True),
+ 'ordericon':_get_toggle_order_icon(request, "build__warnings_no"),
+ 'orderkey' : 'build__warnings_no',
+ 'filter' : {'class' : 'build__warnings_no',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with warnings','build__warnings_no__gte:1', queryset_all.filter(build__warnings_no__gte=1).count()),
+ ('Builds without warnings','build__warnings_no:0', queryset_all.filter(build__warnings_no=0).count()),
+ ]
+ }
+ },
+ {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
+ 'qhelp': "How long it took the build to finish",
+# 'orderfield': _get_toggle_order(request, "timespent", True),
+# 'ordericon':_get_toggle_order_icon(request, "timespent"),
+ 'orderkey' : 'timespent',
+ },
+ {'name': 'Image files', 'clclass': 'output',
+ 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
+ # TODO: compute image fstypes from Target_Image_File
+ },
+ ]
+ }
+ return context, pagesize, orderby
+
+ # new project
+ def newproject(request):
+ template = "newproject.html"
+ context = {
+ 'email': request.user.email if request.user.is_authenticated() else '',
+ 'username': request.user.username if request.user.is_authenticated() else '',
+ 'releases': Release.objects.order_by("description"),
+ }
+
+ try:
+ context['defaultbranch'] = ToasterSetting.objects.get(name = "DEFAULT_RELEASE").value
+ except ToasterSetting.DoesNotExist:
+ pass
+
+ if request.method == "GET":
+ # render new project page
+ return render(request, template, context)
+ elif request.method == "POST":
+ mandatory_fields = ['projectname', 'projectversion']
+ try:
+ # make sure we have values for all mandatory_fields
+ if reduce( lambda x, y: x or y, map(lambda x: len(request.POST.get(x, '')) == 0, mandatory_fields)):
+ # set alert for missing fields
+ raise BadParameterException("Fields missing: " +
+ ", ".join([x for x in mandatory_fields if len(request.POST.get(x, '')) == 0 ]))
+
+ if not request.user.is_authenticated():
+ user = authenticate(username = request.POST.get('username', '_anonuser'), password = 'nopass')
+ if user is None:
+ user = User.objects.create_user(username = request.POST.get('username', '_anonuser'), email = request.POST.get('email', ''), password = "nopass")
+
+ user = authenticate(username = user.username, password = 'nopass')
+ login(request, user)
+
+ # save the project
+ prj = Project.objects.create_project(name = request.POST['projectname'], release = Release.objects.get(pk = request.POST['projectversion']))
+ prj.user_id = request.user.pk
+ prj.save()
+ return redirect(reverse(project, args=(prj.pk,)) + "#/newproject")
+
+ except (IntegrityError, BadParameterException) as e:
+ # fill in page with previously submitted values
+ map(lambda x: context.__setitem__(x, request.POST.get(x, "-- missing")), mandatory_fields)
+ if isinstance(e, IntegrityError) and "username" in str(e):
+ context['alert'] = "Your chosen username is already used"
+ else:
+ context['alert'] = str(e)
+ return render(request, template, context)
+
+ raise Exception("Invalid HTTP method for this page")
+
+
+
+ # Shows the edit project page
+ def project(request, pid):
+ template = "project.html"
+ try:
+ prj = Project.objects.get(id = pid)
+ except Project.DoesNotExist:
+ return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>")
+
+ try:
+ puser = User.objects.get(id = prj.user_id)
+ except User.DoesNotExist:
+ puser = None
+
+ # we use implicit knowledge of the current user's project to filter layer information, e.g.
+ request.session['project_id'] = prj.id
+
+ from collections import Counter
+ freqtargets = []
+ try:
+ freqtargets += map(lambda x: x.target, reduce(lambda x, y: x + y, map(lambda x: list(x.target_set.all()), Build.objects.filter(project = prj, outcome__lt = Build.IN_PROGRESS))))
+ freqtargets += map(lambda x: x.target, reduce(lambda x, y: x + y, map(lambda x: list(x.brtarget_set.all()), BuildRequest.objects.filter(project = prj, state__lte = BuildRequest.REQ_QUEUED))))
+ except TypeError:
+ pass
+ freqtargets = Counter(freqtargets)
+ freqtargets = sorted(freqtargets, key = lambda x: freqtargets[x])
+
+ context = {
+ "project" : prj,
+ "completedbuilds": BuildRequest.objects.filter(project_id = pid).exclude(state__lte = BuildRequest.REQ_INPROGRESS).exclude(state=BuildRequest.REQ_DELETED),
+ "prj" : {"name": prj.name, "release": { "id": prj.release.pk, "name": prj.release.name, "desc": prj.release.description}},
+ #"buildrequests" : prj.buildrequest_set.filter(state=BuildRequest.REQ_QUEUED),
+ "builds" : _project_recent_build_list(prj),
+ "layers" : map(lambda x: {
+ "id": x.layercommit.pk,
+ "orderid": x.pk,
+ "name" : x.layercommit.layer.name,
+ "giturl": x.layercommit.layer.vcs_url,
+ "url": x.layercommit.layer.layer_index_url,
+ "layerdetailurl": reverse("layerdetails", args=(x.layercommit.pk,)),
+ # This branch name is actually the release
+ "branch" : { "name" : x.layercommit.commit, "layersource" : x.layercommit.up_branch.layer_source.name}},
+ prj.projectlayer_set.all().order_by("id")),
+ "targets" : map(lambda x: {"target" : x.target, "task" : x.task, "pk": x.pk}, prj.projecttarget_set.all()),
+ "freqtargets": freqtargets,
+ "releases": map(lambda x: {"id": x.pk, "name": x.name, "description":x.description}, Release.objects.all()),
+ }
+ try:
+ context["machine"] = {"name": prj.projectvariable_set.get(name="MACHINE").value}
+ except ProjectVariable.DoesNotExist:
+ context["machine"] = None
+ try:
+ context["distro"] = prj.projectvariable_set.get(name="DISTRO").value
+ except ProjectVariable.DoesNotExist:
+ context["distro"] = "-- not set yet"
+
+ response = render(request, template, context)
+ response['Cache-Control'] = "no-cache, must-revalidate, no-store"
+ response['Pragma'] = "no-cache"
+ return response
+
+ # This is a wrapper for xhr_projectbuild which allows for a project id
+ # which only becomes known client side.
+ def xhr_build(request):
+ if request.POST.has_key("project_id"):
+ pid = request.POST['project_id']
+ return xhr_projectbuild(request, pid)
+ else:
+ raise BadParameterException("invalid project id")
+
+ def xhr_projectbuild(request, pid):
+ try:
+ if request.method != "POST":
+ raise BadParameterException("invalid method")
+ request.session['project_id'] = pid
+ prj = Project.objects.get(id = pid)
+
+
+ if 'buildCancel' in request.POST:
+ for i in request.POST['buildCancel'].strip().split(" "):
+ try:
+ br = BuildRequest.objects.select_for_update().get(project = prj, pk = i, state__lte = BuildRequest.REQ_QUEUED)
+ br.state = BuildRequest.REQ_DELETED
+ br.save()
+ except BuildRequest.DoesNotExist:
+ pass
+
+ if 'buildDelete' in request.POST:
+ for i in request.POST['buildDelete'].strip().split(" "):
+ try:
+ br = BuildRequest.objects.select_for_update().get(project = prj, pk = i, state__lte = BuildRequest.REQ_DELETED).delete()
+ except BuildRequest.DoesNotExist:
+ pass
+
+ if 'targets' in request.POST:
+ ProjectTarget.objects.filter(project = prj).delete()
+ s = str(request.POST['targets'])
+ for t in s.translate(None, ";%|\"").split(" "):
+ if ":" in t:
+ target, task = t.split(":")
+ else:
+ target = t
+ task = ""
+ ProjectTarget.objects.create(project = prj, target = target, task = task)
+
+ br = prj.schedule_build()
+
+ return HttpResponse(jsonfilter({"error":"ok",
+ "builds" : _project_recent_build_list(prj),
+ }), content_type = "application/json")
+ except Exception as e:
+ return HttpResponse(jsonfilter({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
+
+ # This is a wraper for xhr_projectedit which allows for a project id
+ # which only becomes known client side
+ def xhr_projectinfo(request):
+ if request.POST.has_key("project_id") == False:
+ raise BadParameterException("invalid project id")
+
+ return xhr_projectedit(request, request.POST['project_id'])
+
+ def xhr_projectedit(request, pid):
+ try:
+ prj = Project.objects.get(id = pid)
+ # add layers
+ if 'layerAdd' in request.POST:
+ for lc in Layer_Version.objects.filter(pk__in=request.POST['layerAdd'].split(",")):
+ ProjectLayer.objects.get_or_create(project = prj, layercommit = lc)
+
+ # remove layers
+ if 'layerDel' in request.POST:
+ for t in request.POST['layerDel'].strip().split(" "):
+ pt = ProjectLayer.objects.filter(project = prj, layercommit_id = int(t)).delete()
+
+ if 'projectName' in request.POST:
+ prj.name = request.POST['projectName']
+ prj.save();
+
+ if 'projectVersion' in request.POST:
+ prj.release = Release.objects.get(pk = request.POST['projectVersion'])
+ # we need to change the bitbake version
+ prj.bitbake_version = prj.release.bitbake_version
+ prj.save()
+ # we need to change the layers
+ for i in prj.projectlayer_set.all():
+ # find and add a similarly-named layer on the new branch
+ try:
+ lv = prj.compatible_layerversions(layer_name = i.layercommit.layer.name)[0]
+ ProjectLayer.objects.get_or_create(project = prj, layercommit = lv)
+ except IndexError:
+ pass
+ finally:
+ # get rid of the old entry
+ i.delete()
+
+ if 'machineName' in request.POST:
+ machinevar = prj.projectvariable_set.get(name="MACHINE")
+ machinevar.value=request.POST['machineName']
+ machinevar.save()
+
+ # return all project settings
+ return HttpResponse(jsonfilter( {
+ "error": "ok",
+ "layers" : map(lambda x: {"id": x.layercommit.pk, "orderid" : x.pk, "name" : x.layercommit.layer.name, "giturl" : x.layercommit.layer.vcs_url, "url": x.layercommit.layer.layer_index_url, "layerdetailurl": reverse("layerdetails", args=(x.layercommit.layer.pk,)), "branch" : { "name" : x.layercommit.up_branch.name, "layersource" : x.layercommit.up_branch.layer_source.name}}, prj.projectlayer_set.all().order_by("id")),
+ "builds" : _project_recent_build_list(prj),
+ "variables": map(lambda x: (x.name, x.value), prj.projectvariable_set.all()),
+ "machine": {"name": prj.projectvariable_set.get(name="MACHINE").value},
+ "prj": {"name": prj.name, "release": { "id": prj.release.pk, "name": prj.release.name, "desc": prj.release.description}},
+ }), content_type = "application/json")
+
+ except Exception as e:
+ return HttpResponse(jsonfilter({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
+
+
+ from django.views.decorators.csrf import csrf_exempt
+ @csrf_exempt
+ def xhr_datatypeahead(request):
+ try:
+ prj = None
+ if request.GET.has_key('project_id'):
+ prj = Project.objects.get(pk = request.GET['project_id'])
+ elif 'project_id' in request.session:
+ prj = Project.objects.get(pk = request.session['project_id'])
+ else:
+ raise Exception("No valid project selected")
+
+
+ def _lv_to_dict(x):
+ return {"id": x.pk, "name": x.layer.name, "tooltip": x.layer.vcs_url+" | "+x.commit,
+ "detail": "(" + x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.up_branch.name+")"),
+ "giturl": x.layer.vcs_url, "layerdetailurl" : reverse('layerdetails', args=(x.pk,))}
+
+
+ # returns layers for current project release that are not in the project set, matching the name
+ if request.GET['type'] == "layers":
+ # all layers for the current project
+ queryset_all = prj.compatible_layerversions().filter(layer__name__icontains=request.GET.get('value',''))
+
+ # but not layers with equivalent layers already in project
+ if not request.GET.has_key('include_added'):
+ queryset_all = queryset_all.exclude(pk__in = [x.id for x in prj.projectlayer_equivalent_set()])[:8]
+
+ # and show only the selected layers for this project
+ final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all])
+
+ return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, final_list) }), content_type = "application/json")
+
+
+ # returns layer dependencies for a layer, excluding current project layers
+ if request.GET['type'] == "layerdeps":
+ queryset = prj.compatible_layerversions().exclude(pk__in = [x.id for x in prj.projectlayer_equivalent_set()]).filter(
+ layer__name__in = [ x.depends_on.layer.name for x in LayerVersionDependency.objects.filter(layer_version_id = request.GET['value'])])
+
+ final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset])
+
+ return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, final_list) }), content_type = "application/json")
+
+
+
+ # returns layer versions that would be deleted on the new release__pk
+ if request.GET['type'] == "versionlayers":
+ if not 'project_id' in request.session:
+ raise Exception("This call cannot makes no sense outside a project context")
+
+ retval = []
+ for i in prj.projectlayer_set.all():
+ lv = prj.compatible_layerversions(release = Release.objects.get(pk=request.GET['value'])).filter(layer__name = i.layercommit.layer.name)
+ # there is no layer_version with the new release id, and the same name
+ if lv.count() < 1:
+ retval.append(i)
+
+ return HttpResponse(jsonfilter( {"error":"ok",
+ "list" : map( _lv_to_dict, map(lambda x: x.layercommit, retval ))
+ }), content_type = "application/json")
+
+
+ # returns layer versions that provide the named targets
+ if request.GET['type'] == "layers4target":
+ # we returnd ata only if the recipe can't be provided by the current project layer set
+ if reduce(lambda x, y: x + y, [x.recipe_layer_version.filter(name="anki").count() for x in prj.projectlayer_equivalent_set()], 0):
+ final_list = []
+ else:
+ queryset_all = prj.compatible_layerversions().filter(recipe_layer_version__name = request.GET.get('value', '__none__'))
+
+ # exclude layers in the project
+ queryset_all = queryset_all.exclude(pk__in = [x.id for x in prj.projectlayer_equivalent_set()])
+
+ # and show only the selected layers for this project
+ final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all])
+
+ return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, final_list) }), content_type = "application/json")
+
+ # returns targets provided by current project layers
+ if request.GET['type'] == "targets":
+ queryset_all = Recipe.objects.all()
+ layer_equivalent_set = []
+ for i in prj.projectlayer_set.all():
+ layer_equivalent_set += i.layercommit.get_equivalents_wpriority(prj)
+ queryset_all = queryset_all.filter(layer_version__in = layer_equivalent_set)
+ return HttpResponse(jsonfilter({ "error":"ok",
+ "list" : map ( lambda x: {"id": x.pk, "name": x.name, "detail":"[" + x.layer_version.layer.name+ (" | " + x.layer_version.up_branch.name + "]" if x.layer_version.up_branch is not None else "]")},
+ queryset_all.filter(name__icontains=request.GET.get('value',''))[:8]),
+
+ }), content_type = "application/json")
+
+ # returns machines provided by the current project layers
+ if request.GET['type'] == "machines":
+ queryset_all = Machine.objects.all()
+ if 'project_id' in request.session:
+ queryset_all = queryset_all.filter(layer_version__in = prj.projectlayer_equivalent_set())
+
+ return HttpResponse(jsonfilter({ "error":"ok",
+ "list" : map ( lambda x: {"id": x.pk, "name": x.name, "detail":"[" + x.layer_version.layer.name+ (" | " + x.layer_version.up_branch.name + "]" if x.layer_version.up_branch is not None else "]")},
+ queryset_all.filter(name__icontains=request.GET.get('value',''))[:8]),
+
+ }), content_type = "application/json")
+
+ # returns all projects
+ if request.GET['type'] == "projects":
+ queryset_all = Project.objects.all()
+ ret = { "error": "ok",
+ "list": map (lambda x: {"id":x.pk, "name": x.name},
+ queryset_all.filter(name__icontains=request.GET.get('value',''))[:8])}
+
+ return HttpResponse(jsonfilter(ret), content_type = "application/json")
+
+ raise Exception("Unknown request! " + request.GET.get('type', "No parameter supplied"))
+ except Exception as e:
+ return HttpResponse(jsonfilter({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
+
+
+ def xhr_configvaredit(request, pid):
+ try:
+ prj = Project.objects.get(id = pid)
+ # add conf variables
+ if 'configvarAdd' in request.POST:
+ t=request.POST['configvarAdd'].strip()
+ if ":" in t:
+ variable, value = t.split(":")
+ else:
+ variable = t
+ value = ""
+
+ pt, created = ProjectVariable.objects.get_or_create(project = prj, name = variable, value = value)
+ # change conf variables
+ if 'configvarChange' in request.POST:
+ t=request.POST['configvarChange'].strip()
+ if ":" in t:
+ variable, value = t.split(":")
+ else:
+ variable = t
+ value = ""
+
+ try:
+ pt = ProjectVariable.objects.get(project = prj, name = variable)
+ pt.value=value
+ pt.save()
+ except ObjectDoesNotExist:
+ print("the entry doesn't exist.")
+ # remove conf variables
+ if 'configvarDel' in request.POST:
+ t=request.POST['configvarDel'].strip()
+ pt = ProjectVariable.objects.get(pk = int(t)).delete()
+
+ # return all project settings
+ vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context()
+ return HttpResponse(json.dumps( {
+ "error": "ok",
+ 'configvars' : map(lambda x: (x.name, x.value, x.pk), ProjectVariable.objects.filter(project_id = pid).all()),
+ 'distro' : ProjectVariable.objects.get(project = prj, name = "DISTRO").value,
+ 'fstypes' : ProjectVariable.objects.get(project = prj, name = "IMAGE_FSTYPES").value,
+ 'image_install_append': ProjectVariable.objects.get(project = prj, name = "IMAGE_INSTALL_append").value,
+ 'package_classes': ProjectVariable.objects.get(project = prj, name = "PACKAGE_CLASSES").value,
+ 'sdk_machine' : ProjectVariable.objects.get(project = prj, name = "SDKMACHINE").value,
+ }), content_type = "application/json")
+
+ except Exception as e:
+ return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
+
+
+ def xhr_importlayer(request):
+ if (not request.POST.has_key('vcs_url') or
+ not request.POST.has_key('name') or
+ not request.POST.has_key('git_ref') or
+ not request.POST.has_key('project_id')):
+ return HttpResponse(jsonfilter({"error": "Missing parameters; requires vcs_url, name, git_ref and project_id"}), content_type = "application/json")
+
+ layers_added = [];
+
+ # Rudimentary check for any possible html tags
+ if "<" in request.POST:
+ return HttpResponse(jsonfilter({"error": "Invalid character <"}), content_type = "application/json")
+
+ prj = Project.objects.get(pk=request.POST['project_id'])
+
+ # Strip trailing/leading whitespace from all values
+ # put into a new dict because POST one is immutable
+ post_data = dict()
+ for key,val in request.POST.iteritems():
+ post_data[key] = val.strip()
+
+
+ # We need to know what release the current project is so that we
+ # can set the imported layer's up_branch_id
+ prj_branch_name = Release.objects.get(pk=prj.release_id).branch_name
+ up_branch, branch_created = Branch.objects.get_or_create(name=prj_branch_name, layer_source_id=LayerSource.TYPE_IMPORTED)
+
+ layer_source = LayerSource.objects.get(sourcetype=LayerSource.TYPE_IMPORTED)
+ try:
+ layer, layer_created = Layer.objects.get_or_create(name=post_data['name'])
+ except MultipleObjectsReturned:
+ return HttpResponse(jsonfilter({"error": "hint-layer-exists"}), content_type = "application/json")
+
+ if layer:
+ if layer_created:
+ layer.layer_source = layer_source
+ layer.vcs_url = post_data['vcs_url']
+ if post_data.has_key('summary'):
+ layer.summary = layer.description = post_data['summary']
+
+ layer.up_date = timezone.now()
+ layer.save()
+ else:
+ # We have an existing layer by this name, let's see if the git
+ # url is the same, if it is then we can just create a new layer
+ # version for this layer. Otherwise we need to bail out.
+ if layer.vcs_url != post_data['vcs_url']:
+ return HttpResponse(jsonfilter({"error": "hint-layer-exists-with-different-url" , "current_url" : layer.vcs_url, "current_id": layer.id }), content_type = "application/json")
+
+
+ layer_version, version_created = Layer_Version.objects.get_or_create(layer_source=layer_source, layer=layer, project=prj, up_branch_id=up_branch.id,branch=post_data['git_ref'], commit=post_data['git_ref'], dirpath=post_data['dir_path'])
+
+ if layer_version:
+ if not version_created:
+ return HttpResponse(jsonfilter({"error": "hint-layer-version-exists", "existing_layer_version": layer_version.id }), content_type = "application/json")
+
+ layer_version.up_date = timezone.now()
+ layer_version.save()
+
+ # Add the dependencies specified for this new layer
+ if (post_data.has_key("layer_deps") and
+ version_created and
+ len(post_data["layer_deps"]) > 0):
+ for layer_dep_id in post_data["layer_deps"].split(","):
+
+ layer_dep_obj = Layer_Version.objects.get(pk=layer_dep_id)
+ LayerVersionDependency.objects.get_or_create(layer_version=layer_version, depends_on=layer_dep_obj)
+ # Now add them to the project, we could get an execption
+ # if the project now contains the exact
+ # dependency already (like modified on another page)
+ try:
+ prj_layer, prj_layer_created = ProjectLayer.objects.get_or_create(layercommit=layer_dep_obj, project=prj)
+ except:
+ continue
+
+ if prj_layer_created:
+ layers_added.append({'id': layer_dep_obj.id, 'name': Layer.objects.get(id=layer_dep_obj.layer_id).name})
+
+
+ # If an old layer version exists in our project then remove it
+ for prj_layers in ProjectLayer.objects.filter(project=prj):
+ dup_layer_v = Layer_Version.objects.filter(id=prj_layers.layercommit_id, layer_id=layer.id)
+ if len(dup_layer_v) >0 :
+ prj_layers.delete()
+
+ # finally add the imported layer (version id) to the project
+ ProjectLayer.objects.create(layercommit=layer_version, project=prj,optional=1)
+
+ else:
+ # We didn't create a layer version so back out now and clean up.
+ if layer_created:
+ layer.delete()
+
+ return HttpResponse(jsonfilter({"error": "Uncaught error: Could not create layer version"}), content_type = "application/json")
+
+
+ return HttpResponse(jsonfilter({"error": "ok", "imported_layer" : { "name" : layer.name, "id": layer_version.id }, "deps_added": layers_added }), content_type = "application/json")
+
+ def xhr_updatelayer(request):
+
+ def error_response(error):
+ return HttpResponse(jsonfilter({"error": error}), content_type = "application/json")
+
+ if not request.POST.has_key("layer_version_id"):
+ return error_response("Please specify a layer version id")
+ try:
+ layer_version_id = request.POST["layer_version_id"]
+ layer_version = Layer_Version.objects.get(id=layer_version_id)
+ except:
+ return error_response("Cannot find layer to update")
+
+
+ if request.POST.has_key("vcs_url"):
+ layer_version.layer.vcs_url = request.POST["vcs_url"]
+ if request.POST.has_key("dirpath"):
+ layer_version.dirpath = request.POST["dirpath"]
+ if request.POST.has_key("commit"):
+ layer_version.commit = request.POST["commit"]
+ if request.POST.has_key("up_branch"):
+ layer_version.up_branch_id = int(request.POST["up_branch"])
+
+ if request.POST.has_key("add_dep"):
+ lvd = LayerVersionDependency(layer_version=layer_version, depends_on_id=request.POST["add_dep"])
+ lvd.save()
+
+ if request.POST.has_key("rm_dep"):
+ rm_dep = LayerVersionDependency.objects.get(layer_version=layer_version, depends_on_id=request.POST["rm_dep"])
+ rm_dep.delete()
+
+ if request.POST.has_key("summary"):
+ layer_version.layer.summary = request.POST["summary"]
+ if request.POST.has_key("description"):
+ layer_version.layer.description = request.POST["description"]
+
+ try:
+ layer_version.layer.save()
+ layer_version.save()
+ except:
+ return error_response("Could not update layer version entry")
+
+ return HttpResponse(jsonfilter({"error": "ok",}), content_type = "application/json")
+
+
+
+ def importlayer(request):
+ template = "importlayer.html"
+ context = {
+ }
+ return render(request, template, context)
+
+
+ def layers(request):
+ if not 'project_id' in request.session:
+ raise Exception("invalid page: cannot show page without a project")
+
+ template = "layers.html"
+ # define here what parameters the view needs in the GET portion in order to
+ # be able to display something. 'count' and 'page' are mandatory for all views
+ # that use paginators.
+ (pagesize, orderby) = _get_parameters_values(request, 100, 'layer__name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby };
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ return _redirect_parameters( 'layers', request.GET, mandatory_parameters)
+
+ # boilerplate code that takes a request for an object type and returns a queryset
+ # for that object type. copypasta for all needed table searches
+ (filter_string, search_term, ordering_string) = _search_tuple(request, Layer_Version)
+
+ prj = Project.objects.get(pk = request.session['project_id'])
+
+ queryset_all = prj.compatible_layerversions()
+
+ queryset_all = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name')
+
+ object_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all])
+ object_list = list(object_list)
+
+
+ # retrieve the objects that will be displayed in the table; layers a paginator and gets a page range to display
+ layer_info = _build_page_range(Paginator(object_list, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+ context = {
+ 'projectlayerset' : jsonfilter(map(lambda x: x.layercommit.id, prj.projectlayer_set.all())),
+ 'objects' : layer_info,
+ 'objectname' : "layers",
+ 'default_orderby' : 'layer__name:+',
+ 'total_count': len(object_list),
+
+ 'tablecols' : [
+ { 'name': 'Layer',
+ 'orderfield': _get_toggle_order(request, "layer__name"),
+ 'ordericon' : _get_toggle_order_icon(request, "layer__name"),
+ },
+ { 'name': 'Description',
+ 'dclass': 'span4',
+ 'clclass': 'description',
+ },
+ { 'name': 'Layer source',
+ 'clclass': 'source',
+ 'qhelp': "Where the layer is coming from, for example, if it's part of the OpenEmbedded collection of layers or if it's a layer you have imported",
+ 'orderfield': _get_toggle_order(request, "layer_source__name"),
+ 'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey' : "layer_source__name",
+ 'filter': {
+ 'class': 'layer',
+ 'label': 'Show:',
+ 'options': map(lambda x: (x.name + " layers", 'layer_source__pk:' + str(x.id), queryset_all.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
+ }
+ },
+ { 'name': 'Git repository URL',
+ 'dclass': 'span6',
+ 'clclass': 'git-repo', 'hidden': 1,
+ 'qhelp': "The Git repository for the layer source code",
+ },
+ { 'name': 'Subdirectory',
+ 'clclass': 'git-subdir',
+ 'hidden': 1,
+ 'qhelp': "The layer directory within the Git repository",
+ },
+ { 'name': 'Branch, tag o commit',
+ 'clclass': 'branch',
+ 'qhelp': "The Git branch of the layer. For the layers from the OpenEmbedded source, the branch matches the Yocto Project version you selected for this project",
+ },
+ { 'name': 'Dependencies',
+ 'clclass': 'dependencies',
+ 'qhelp': "Other layers a layer depends upon",
+ },
+ { 'name': 'Add | Delete',
+ 'dclass': 'span2',
+ 'qhelp': "Add or delete layers to / from your project ",
+ 'filter': {
+ 'class': 'add-del-layers',
+ 'label': 'Show:',
+ 'options': [
+ ('Layers added to this project', "projectlayer__project:" + str(prj.id), queryset_all.filter(projectlayer__project = prj.id).count()),
+ ('Layers not added to this project', "projectlayer__project:NOT" + str(prj.id), queryset_all.exclude(projectlayer__project = prj.id).count()),
+ ]
+
+ }
+ },
+ ]
+ }
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+
+ return response
+
+ def layerdetails(request, layerid):
+ template = "layerdetails.html"
+ limit = 10
+
+ if request.GET.has_key("limit"):
+ request.session['limit'] = request.GET['limit']
+
+ if request.session.has_key('limit'):
+ limit = request.session['limit']
+
+ layer_version = Layer_Version.objects.get(pk = layerid)
+
+ # Targets tab query functionality
+ if request.GET.has_key('targets_search'):
+ targets = Paginator(Recipe.objects.filter(layer_version=layer_version,name__icontains=request.GET['targets_search']).order_by("name"), limit)
+ else:
+ targets = Paginator(Recipe.objects.filter(layer_version=layer_version).order_by("name"), limit)
+
+ if request.GET.has_key("tpage"):
+ try:
+ targets = targets.page(request.GET['tpage'])
+ except EmptyPage:
+ targets = targets.page(targets.num_pages)
+ else:
+ targets = targets.page(1)
+
+ # Machines tab query functionality
+ if request.GET.has_key('machines_search'):
+ machines = Paginator(Machine.objects.filter(layer_version=layer_version,name__icontains=request.GET['machines_search']).order_by("name"), limit)
+ else:
+ machines = Paginator(Machine.objects.filter(layer_version=layer_version).order_by("name"), limit)
+
+ if request.GET.has_key("mpage"):
+ try:
+ machines = machines.page(request.GET['mpage'])
+ except EmptyPage:
+ machines = machines.page(machines.num_pages)
+ else:
+ machines = machines.page(1)
+
+ context = {
+ 'layerversion': layer_version,
+ 'layer_in_project' : ProjectLayer.objects.filter(project_id=request.session['project_id'],layercommit=layerid).count(),
+ 'machines': machines,
+ 'targets': targets,
+ 'total_targets': Recipe.objects.filter(layer_version=layer_version).count(),
+
+ 'total_machines': Machine.objects.filter(layer_version=layer_version).count(),
+ }
+ return render(request, template, context)
+
+ def targets(request):
+ if not 'project_id' in request.session:
+ raise Exception("invalid page: cannot show page without a project")
+
+ template = 'targets.html'
+ (pagesize, orderby) = _get_parameters_values(request, 100, 'name:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ return _redirect_parameters( 'all-targets', request.GET, mandatory_parameters)
+ (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
+
+ prj = Project.objects.get(pk = request.session['project_id'])
+ queryset_all = Recipe.objects.filter(Q(layer_version__up_branch__name= prj.release.name) | Q(layer_version__build__in = prj.build_set.all())).filter(name__regex=r'.{1,}.*')
+
+ queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name')
+
+ queryset_with_search.prefetch_related("layer_source")
+
+ # retrieve the objects that will be displayed in the table; targets a paginator and gets a page range to display
+ target_info = _build_page_range(Paginator(queryset_with_search, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+ context = {
+ 'projectlayerset' : jsonfilter(map(lambda x: x.layercommit.id, prj.projectlayer_set.all())),
+ 'objects' : target_info,
+ 'objectname' : "targets",
+ 'default_orderby' : 'name:+',
+ 'total_count': queryset_with_search.count(),
+
+ 'tablecols' : [
+ { 'name': 'Target',
+ 'orderfield': _get_toggle_order(request, "name"),
+ 'ordericon' : _get_toggle_order_icon(request, "name"),
+ },
+ { 'name': 'Target version',
+ 'dclass': 'span2',
+ },
+ { 'name': 'Description',
+ 'dclass': 'span5',
+ 'clclass': 'description',
+ },
+ { 'name': 'Recipe file',
+ 'clclass': 'recipe-file',
+ 'hidden': 1,
+ 'dclass': 'span5',
+ },
+ { 'name': 'Section',
+ 'clclass': 'target-section',
+ 'hidden': 1,
+ 'orderfield': _get_toggle_order(request, "section"),
+ 'ordericon': _get_toggle_order_icon(request, "section"),
+ 'orderkey': "section",
+ },
+ { 'name': 'License',
+ 'clclass': 'license',
+ 'hidden': 1,
+ 'orderfield': _get_toggle_order(request, "license"),
+ 'ordericon': _get_toggle_order_icon(request, "license"),
+ 'orderkey': "license",
+ },
+ { 'name': 'Layer',
+ 'clclass': 'layer',
+ 'orderfield': _get_toggle_order(request, "layer_version__layer__name"),
+ 'ordericon': _get_toggle_order_icon(request, "layer_version__layer__name"),
+ 'orderkey': "layer_version__layer__name",
+ },
+ { 'name': 'Layer source',
+ 'clclass': 'source',
+ 'qhelp': "Where the target is coming from, for example, if it's part of the OpenEmbedded collection of targets or if it's a target you have imported",
+ 'orderfield': _get_toggle_order(request, "layer_source__name"),
+ 'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey': "layer_source__name",
+ 'filter': {
+ 'class': 'target',
+ 'label': 'Show:',
+ 'options': map(lambda x: ("Targets provided by " + x.name + " layers", 'layer_source__pk:' + str(x.id), queryset_with_search.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
+ }
+ },
+ { 'name': 'Branch, tag or commit',
+ 'clclass': 'branch',
+ 'hidden': 1,
+ },
+ ]
+ }
+
+ if 'project_id' in request.session:
+ context['tablecols'] += [
+ { 'name': 'Build',
+ 'dclass': 'span2',
+ 'qhelp': "Add or delete targets to / from your project ",
+ 'filter': {
+ 'class': 'add-layer',
+ 'label': 'Show:',
+ 'options': [
+ ('Targets provided by layers added to this project', "layer_version__projectlayer__project:" + str(prj.id), queryset_with_search.filter(layer_version__projectlayer__project = prj.id).count()),
+ ('Targets provided by layers not added to this project', "layer_version__projectlayer__project:NOT" + str(prj.id), queryset_with_search.exclude(layer_version__projectlayer__project = prj.id).count()),
+ ]
+
+ }
+ }, ]
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+
+ return response
+
+ def machines(request):
+ template = "machines.html"
+ # define here what parameters the view needs in the GET portion in order to
+ # be able to display something. 'count' and 'page' are mandatory for all views
+ # that use paginators.
+ mandatory_parameters = { 'count': 10, 'page' : 1, 'orderby' : 'name:+' };
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ return _redirect_parameters( 'machines', request.GET, mandatory_parameters)
+
+ # boilerplate code that takes a request for an object type and returns a queryset
+ # for that object type. copypasta for all needed table searches
+ (filter_string, search_term, ordering_string) = _search_tuple(request, Machine)
+
+ queryset_all = Machine.objects.all()
+# if 'project_id' in request.session:
+# queryset_all = queryset_all.filter(Q(layer_version__up_branch__name = Project.objects.get(request.session['project_id']).release.branch_name) | Q(layer_version__build__in = Project.objects.get(request.session['project_id']).build_set.all()))
+
+ queryset_with_search = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, '-name')
+ queryset = _get_queryset(Machine, queryset_all, filter_string, search_term, ordering_string, '-name')
+
+ # retrieve the objects that will be displayed in the table; machines a paginator and gets a page range to display
+ machine_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+ context = {
+ 'objects' : machine_info,
+ 'objectname' : "machines",
+ 'default_orderby' : 'name:+',
+ 'total_count': queryset_with_search.count(),
+
+ 'tablecols' : [
+ { 'name': 'Machine',
+ 'orderfield': _get_toggle_order(request, "name"),
+ 'ordericon' : _get_toggle_order_icon(request, "name"),
+ },
+ { 'name': 'Description',
+ 'dclass': 'span5',
+ 'clclass': 'description',
+ },
+ { 'name': 'Machine file',
+ 'clclass': 'machine-file',
+ 'hidden': 1,
+ },
+ { 'name': 'Layer',
+ 'clclass': 'layer',
+ },
+ { 'name': 'Layer source',
+ 'clclass': 'source',
+ 'qhelp': "Where the machine is coming from, for example, if it's part of the OpenEmbedded collection of machines or if it's a machine you have imported",
+ 'orderfield': _get_toggle_order(request, "layer_source__name"),
+ 'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey': "layer_source__name",
+ 'filter': {
+ 'class': 'machine',
+ 'label': 'Show:',
+ 'options': map(lambda x: (x.name, 'layer_source__pk:' + str(x.id), queryset_with_search.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
+ }
+ },
+ { 'name': 'Branch, tag or commit',
+ 'clclass': 'branch',
+ 'hidden': 1,
+ },
+ { 'name': 'Select',
+ 'dclass': 'span2',
+ 'qhelp': "Add or delete machines to / from your project ",
+ },
+
+ ]
+ }
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+
+ return response
+
+
+ def get_project_configvars_context():
+ # Vars managed outside of this view
+ vars_managed = {
+ 'MACHINE'
+ }
+
+ vars_blacklist = {
+ 'DL_DR','PARALLEL_MAKE','BB_NUMBER_THREADS','SSTATE_DIR',
+ 'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT',
+ 'DL_DIR','PARALLEL_MAKE','SSTATE_DIR','SSTATE_DIR','SSTATE_MIRRORS','TMPDIR',
+ 'all_proxy','ftp_proxy','http_proxy ','https_proxy'
+ }
+
+ vars_fstypes = {
+ 'btrfs','cpio','cpio.gz','cpio.lz4','cpio.lzma','cpio.xz','cramfs',
+ 'elf','ext2','ext2.bz2','ext2.gz','ext2.lzma' 'ext3','ext3.gz','hddimg',
+ 'iso','jffs2','jffs2.sum','squashfs','squashfs-lzo','squashfs-xz','tar.bz2',
+ 'tar.lz4','tar.xz','tartar.gz','ubi','ubifs','vmdk'
+ }
+
+ return(vars_managed,sorted(vars_fstypes),vars_blacklist)
+
+ def projectconf(request, pid):
+ template = "projectconf.html"
+
+ try:
+ prj = Project.objects.get(id = pid)
+ except Project.DoesNotExist:
+ return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>")
+
+ vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context()
+ context = {
+ 'configvars': ProjectVariable.objects.filter(project_id = pid).all(),
+ 'vars_managed': vars_managed,
+ 'vars_fstypes': vars_fstypes,
+ 'vars_blacklist': vars_blacklist,
+ }
+
+ try:
+ context['distro'] = ProjectVariable.objects.get(project = prj, name = "DISTRO").value
+ except ProjectVariable.DoesNotExist:
+ pass
+ try:
+ context['fstypes'] = ProjectVariable.objects.get(project = prj, name = "IMAGE_FSTYPES").value
+ except ProjectVariable.DoesNotExist:
+ pass
+ try:
+ context['image_install_append'] = ProjectVariable.objects.get(project = prj, name = "IMAGE_INSTALL_append").value
+ except ProjectVariable.DoesNotExist:
+ pass
+ try:
+ context['package_classes'] = ProjectVariable.objects.get(project = prj, name = "PACKAGE_CLASSES").value
+ except ProjectVariable.DoesNotExist:
+ pass
+ try:
+ context['sdk_machine'] = ProjectVariable.objects.get(project = prj, name = "SDKMACHINE").value
+ except ProjectVariable.DoesNotExist:
+ pass
+
+ return render(request, template, context)
+
+ def projectbuilds(request, pid):
+ template = 'projectbuilds.html'
+ buildrequests = BuildRequest.objects.filter(project_id = pid).exclude(state__lte = BuildRequest.REQ_INPROGRESS).exclude(state=BuildRequest.REQ_DELETED)
+
+ try:
+ context, pagesize, orderby = _build_list_helper(request, buildrequests)
+ except InvalidRequestException as e:
+ return _redirect_parameters(projectbuilds, request.GET, e.response, pid = pid)
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+
+ return response
+
+
+ def _file_name_for_artifact(b, artifact_type, artifact_id):
+ file_name = None
+ # Target_Image_File file_name
+ if artifact_type == "imagefile":
+ file_name = Target_Image_File.objects.get(target__build = b, pk = artifact_id).file_name
+
+ elif artifact_type == "cookerlog":
+ file_name = b.cooker_log_path
+
+ elif artifact_type == "buildartifact":
+ file_name = BuildArtifact.objects.get(build = b, pk = artifact_id).file_name
+
+ elif artifact_type == "licensemanifest":
+ file_name = Target.objects.get(build = b, pk = artifact_id).license_manifest_path
+
+ elif artifact_type == "tasklogfile":
+ file_name = Task.objects.get(build = b, pk = artifact_id).logfile
+
+ elif artifact_type == "logmessagefile":
+ file_name = LogMessage.objects.get(build = b, pk = artifact_id).pathname
+ else:
+ raise Exception("FIXME: artifact type %s not implemented" % (artifact_type))
+
+ return file_name
+
+
+ def build_artifact(request, build_id, artifact_type, artifact_id):
+ b = Build.objects.get(pk=build_id)
+ if b.buildrequest is None or b.buildrequest.environment is None:
+ raise Exception("Artifact not available for download (missing build request or build environment)")
+
+ file_name = _file_name_for_artifact(b, artifact_type, artifact_id)
+ fsock = None
+ content_type='application/force-download'
+
+ if file_name is None:
+ raise Exception("Could not handle artifact %s id %s" % (artifact_type, artifact_id))
+ else:
+ content_type = b.buildrequest.environment.get_artifact_type(file_name)
+ fsock = b.buildrequest.environment.get_artifact(file_name)
+ file_name = os.path.basename(file_name) # we assume that the build environment system has the same path conventions as host
+
+ response = HttpResponse(fsock, content_type = content_type)
+
+ # returns a file from the environment
+ response['Content-Disposition'] = 'attachment; filename=' + file_name
+ return response
+
+
+
+ def projects(request):
+ template="projects.html"
+
+ (pagesize, orderby) = _get_parameters_values(request, 10, 'updated:+')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ return _redirect_parameters( 'all-projects', request.GET, mandatory_parameters)
+
+ queryset_all = Project.objects.all()
+
+ # boilerplate code that takes a request for an object type and returns a queryset
+ # for that object type. copypasta for all needed table searches
+ (filter_string, search_term, ordering_string) = _search_tuple(request, Project)
+ queryset_with_search = _get_queryset(Project, queryset_all, None, search_term, ordering_string, '-updated')
+ queryset = _get_queryset(Project, queryset_all, filter_string, search_term, ordering_string, '-updated')
+
+ # retrieve the objects that will be displayed in the table; projects a paginator and gets a page range to display
+ project_info = _build_page_range(Paginator(queryset, pagesize), request.GET.get('page', 1))
+
+ # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
+ build_mru = Build.objects.order_by("-started_on")[:3]
+
+
+
+ context = {
+ 'mru' : build_mru,
+
+ 'objects' : project_info,
+ 'objectname' : "projects",
+ 'default_orderby' : 'id:-',
+ 'search_term' : search_term,
+ 'total_count' : queryset_with_search.count(),
+ 'tablecols': [
+ {'name': 'Project',
+ 'orderfield': _get_toggle_order(request, "name"),
+ 'ordericon':_get_toggle_order_icon(request, "name"),
+ 'orderkey' : 'name',
+ },
+ {'name': 'Release',
+ 'qhelp' : "The version of the build system used by the project",
+ 'orderfield': _get_toggle_order(request, "release__name"),
+ 'ordericon':_get_toggle_order_icon(request, "release__name"),
+ 'orderkey' : 'release__name',
+ },
+ {'name': 'Machine',
+ 'qhelp': "The hardware currently selected for the project",
+ },
+ {'name': 'Number of builds',
+ 'qhelp': "How many builds have been run for the project",
+ },
+ {'name': 'Last outcome', 'clclass': 'loutcome',
+ 'qhelp': "Tells you if the last project build completed successfully or failed",
+ },
+ {'name': 'Last target', 'clclass': 'ltarget',
+ 'qhelp': "The last project build target(s): one or more recipes or image recipes",
+ },
+ {'name': 'Last errors', 'clclass': 'lerrors',
+ 'qhelp': "How many errors were encountered during the last project build (if any)",
+ },
+ {'name': 'Last warnings', 'clclass': 'lwarnings',
+ 'qhelp': "How many warnigns were encountered during the last project build (if any)",
+ },
+ {'name': 'Last image files', 'clclass': 'limagefiles', 'hidden': 1,
+ 'qhelp': "The root file system types produced by the last project build",
+ },
+ {'name': 'Last updated', 'clclass': 'updated',
+ 'orderfield': _get_toggle_order(request, "updated"),
+ 'ordericon':_get_toggle_order_icon(request, "updated"),
+ 'orderkey' : 'updated',
+ }
+ ]
+ }
+ return render(request, template, context)
+
+ def buildrequestdetails(request, pid, brid):
+ template = "buildrequestdetails.html"
+ context = {
+ 'buildrequest' : BuildRequest.objects.get(pk = brid, project_id = pid)
+ }
+ return render(request, template, context)
+
+
+else:
+ # these are pages that are NOT available in interactive mode
+ def managedcontextprocessor(request):
+ return {
+ "projects": [],
+ "MANAGED" : toastermain.settings.MANAGED,
+ "DEBUG" : toastermain.settings.DEBUG
+ }
+
+
+ # shows the "all builds" page for interactive mode; this is the old code, simply moved
+ def builds(request):
+ template = 'build.html'
+ # define here what parameters the view needs in the GET portion in order to
+ # be able to display something. 'count' and 'page' are mandatory for all views
+ # that use paginators.
+ (pagesize, orderby) = _get_parameters_values(request, 10, 'completed_on:-')
+ mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
+ retval = _verify_parameters( request.GET, mandatory_parameters )
+ if retval:
+ return _redirect_parameters( 'all-builds', request.GET, mandatory_parameters)
+
+ # boilerplate code that takes a request for an object type and returns a queryset
+ # for that object type. copypasta for all needed table searches
+ (filter_string, search_term, ordering_string) = _search_tuple(request, Build)
+ queryset_all = Build.objects.exclude(outcome = Build.IN_PROGRESS)
+ queryset_with_search = _get_queryset(Build, queryset_all, None, search_term, ordering_string, '-completed_on')
+ queryset = _get_queryset(Build, queryset_all, filter_string, search_term, ordering_string, '-completed_on')
+
+ # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
+ build_info = _build_page_range(Paginator(queryset, pagesize), request.GET.get('page', 1))
+
+ # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
+ build_mru = Build.objects.order_by("-started_on")[:3]
+
+ # set up list of fstypes for each build
+ fstypes_map = {};
+ for build in build_info:
+ targets = Target.objects.filter( build_id = build.id )
+ comma = "";
+ extensions = "";
+ for t in targets:
+ if ( not t.is_image ):
+ continue
+ tif = Target_Image_File.objects.filter( target_id = t.id )
+ for i in tif:
+ s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
+ if s == i.file_name:
+ s=re.sub('.*\.', '', i.file_name)
+ if None == re.search(s,extensions):
+ extensions += comma + s
+ comma = ", "
+ fstypes_map[build.id]=extensions
+
+ # send the data to the template
+ context = {
+ # specific info for
+ 'mru' : build_mru,
+ # TODO: common objects for all table views, adapt as needed
+ 'objects' : build_info,
+ 'objectname' : "builds",
+ 'default_orderby' : 'completed_on:-',
+ 'fstypes' : fstypes_map,
+ 'search_term' : search_term,
+ 'total_count' : queryset_with_search.count(),
+ # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
+ 'tablecols' : [
+ {'name': 'Outcome', # column with a single filter
+ 'qhelp' : "The outcome tells you if a build successfully completed or failed", # the help button content
+ 'dclass' : "span2", # indication about column width; comes from the design
+ 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending
+ 'ordericon':_get_toggle_order_icon(request, "outcome"),
+ # filter field will set a filter on that column with the specs in the filter description
+ # the class field in the filter has no relation with clclass; the control different aspects of the UI
+ # still, it is recommended for the values to be identical for easy tracking in the generated HTML
+ 'filter' : {'class' : 'outcome',
+ 'label': 'Show:',
+ 'options' : [
+ ('Successful builds', 'outcome:' + str(Build.SUCCEEDED), queryset_with_search.filter(outcome=str(Build.SUCCEEDED)).count()), # this is the field search expression
+ ('Failed builds', 'outcome:'+ str(Build.FAILED), queryset_with_search.filter(outcome=str(Build.FAILED)).count()),
+ ]
+ }
+ },
+ {'name': 'Target', # default column, disabled box, with just the name in the list
+ 'qhelp': "This is the build target or build targets (i.e. one or more recipes or image recipes)",
+ 'orderfield': _get_toggle_order(request, "target__target"),
+ 'ordericon':_get_toggle_order_icon(request, "target__target"),
+ },
+ {'name': 'Machine',
+ 'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
+ 'orderfield': _get_toggle_order(request, "machine"),
+ 'ordericon':_get_toggle_order_icon(request, "machine"),
+ 'dclass': 'span3'
+ }, # a slightly wider column
+ {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
+ 'qhelp': "The date and time you started the build",
+ 'orderfield': _get_toggle_order(request, "started_on", True),
+ 'ordericon':_get_toggle_order_icon(request, "started_on"),
+ 'filter' : {'class' : 'started_on',
+ 'label': 'Show:',
+ 'options' : [
+ ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now()).count()),
+ ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24))).count()),
+ ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7))).count()),
+ ]
+ }
+ },
+ {'name': 'Completed on',
+ 'qhelp': "The date and time the build finished",
+ 'orderfield': _get_toggle_order(request, "completed_on", True),
+ 'ordericon':_get_toggle_order_icon(request, "completed_on"),
+ 'orderkey' : 'completed_on',
+ 'filter' : {'class' : 'completed_on',
+ 'label': 'Show:',
+ 'options' : [
+ ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now()).count()),
+ ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24))).count()),
+ ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7))).count()),
+ ]
+ }
+ },
+ {'name': 'Failed tasks', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox
+ 'qhelp': "How many tasks failed during the build",
+ 'filter' : {'class' : 'failed_tasks',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with failed tasks', 'task_build__outcome:4', queryset_with_search.filter(task_build__outcome=4).count()),
+ ('Builds without failed tasks', 'task_build__outcome:NOT4', queryset_with_search.filter(~Q(task_build__outcome=4)).count()),
+ ]
+ }
+ },
+ {'name': 'Errors', 'clclass': 'errors_no',
+ 'qhelp': "How many errors were encountered during the build (if any)",
+ 'orderfield': _get_toggle_order(request, "errors_no", True),
+ 'ordericon':_get_toggle_order_icon(request, "errors_no"),
+ 'orderkey' : 'errors_no',
+ 'filter' : {'class' : 'errors_no',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with errors', 'errors_no__gte:1', queryset_with_search.filter(errors_no__gte=1).count()),
+ ('Builds without errors', 'errors_no:0', queryset_with_search.filter(errors_no=0).count()),
+ ]
+ }
+ },
+ {'name': 'Warnings', 'clclass': 'warnings_no',
+ 'qhelp': "How many warnings were encountered during the build (if any)",
+ 'orderfield': _get_toggle_order(request, "warnings_no", True),
+ 'ordericon':_get_toggle_order_icon(request, "warnings_no"),
+ 'orderkey' : 'warnings_no',
+ 'filter' : {'class' : 'warnings_no',
+ 'label': 'Show:',
+ 'options' : [
+ ('Builds with warnings','warnings_no__gte:1', queryset_with_search.filter(warnings_no__gte=1).count()),
+ ('Builds without warnings','warnings_no:0', queryset_with_search.filter(warnings_no=0).count()),
+ ]
+ }
+ },
+ {'name': 'Log',
+ 'dclass': "span4",
+ 'qhelp': "Path to the build main log file",
+ 'clclass': 'log', 'hidden': 1,
+ 'orderfield': _get_toggle_order(request, "cooker_log_path"),
+ 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
+ 'orderkey' : 'cooker_log_path',
+ },
+ {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
+ 'qhelp': "How long it took the build to finish",
+ 'orderfield': _get_toggle_order(request, "timespent", True),
+ 'ordericon':_get_toggle_order_icon(request, "timespent"),
+ 'orderkey' : 'timespent',
+ },
+ {'name': 'Image files', 'clclass': 'output',
+ 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
+ # TODO: compute image fstypes from Target_Image_File
+ },
+ ]
+ }
+
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+ return response
+
+
+
+
+ def newproject(request):
+ raise Exception("page not available in interactive mode")
+
+ def project(request, pid):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_projectbuild(request, pid):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_build(request, pid):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_projectinfo(request, pid):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_projectedit(request, pid):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_datatypeahead(request):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_configvaredit(request):
+ raise Exception("page not available in interactive mode")
+
+ def importlayer(request):
+ raise Exception("page not available in interactive mode")
+
+ def layers(request):
+ raise Exception("page not available in interactive mode")
+
+ def layerdetails(request):
+ raise Exception("page not available in interactive mode")
+
+ def targets(request):
+ raise Exception("page not available in interactive mode")
+
+ def targetdetails(request):
+ raise Exception("page not available in interactive mode")
+
+ def machines(request):
+ raise Exception("page not available in interactive mode")
+
+ def projectconf(request):
+ raise Exception("page not available in interactive mode")
+
+ def projectbuilds(request):
+ raise Exception("page not available in interactive mode")
+
+ def build_artifact(request, build_id, artifact_type, artifact_id):
+ raise Exception("page not available in interactive mode")
+
+ def projects(request):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_importlayer(request):
+ raise Exception("page not available in interactive mode")
+
+ def xhr_updatelayer(request):
+ raise Exception("page not available in interactive mode")
+
+ def buildrequestdetails(request, pid, brid):
+ raise Exception("page not available in interactive mode")
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 2ce10c4747..acc20cc11d 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -21,9 +21,17 @@
# Django settings for Toaster project.
+import os, re
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+# Set to True to see the SQL queries in console
+SQL_DEBUG = False
+if os.environ.get("TOASTER_SQLDEBUG", None) is not None:
+ SQL_DEBUG = True
+
+
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
@@ -42,7 +50,6 @@ DATABASES = {
}
# Reinterpret database settings if we have DATABASE_URL environment variable defined
-import os, re
if 'DATABASE_URL' in os.environ:
dburl = os.environ['DATABASE_URL']
@@ -75,6 +82,11 @@ if 'DATABASE_URL' in os.environ:
raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl)
+if 'TOASTER_MANAGED' in os.environ and os.environ['TOASTER_MANAGED'] == "1":
+ MANAGED = True
+else:
+ MANAGED = False
+
# Allows current database settings to be exported as a DATABASE_URL environment variable value
def getDATABASE_URL():
@@ -203,6 +215,9 @@ MIDDLEWARE_CLASSES = (
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
+from os.path import dirname as DN
+SITE_ROOT=DN(DN(os.path.abspath(__file__)))
+
ROOT_URLCONF = 'toastermain.urls'
# Python dotted path to the WSGI application used by Django's runserver.
@@ -221,28 +236,60 @@ TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
- "django.core.context_processors.request")
+ "django.core.context_processors.request",
+ 'toastergui.views.managedcontextprocessor',
+ )
INSTALLED_APPS = (
- #'django.contrib.auth',
- #'django.contrib.contenttypes',
- #'django.contrib.sessions',
#'django.contrib.sites',
- #'django.contrib.messages',
'django.contrib.staticfiles',
- # Uncomment the next line to enable the admin:
- # 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'django.contrib.humanize',
'orm',
'toastermain',
- 'toastergui',
- 'bldviewer',
'south',
- 'bldcontrol',
)
+
+# Load django-fresh is TOASTER_DEVEL is set, and the module is available
+FRESH_ENABLED = False
+if os.environ.get('TOASTER_DEVEL', None) is not None:
+ try:
+ import fresh
+ MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ("fresh.middleware.FreshMiddleware",)
+ INSTALLED_APPS = INSTALLED_APPS + ('fresh',)
+ FRESH_ENABLED = True
+ except:
+ pass
+
+
+SOUTH_TESTS_MIGRATE = False
+
+# if we run in managed mode, we need user support
+if MANAGED:
+ INSTALLED_APPS = ('django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.messages',
+ 'django.contrib.sessions',
+ # Uncomment the next line to enable the admin:
+ 'django.contrib.admin',
+ ) + INSTALLED_APPS
+
+
+# We automatically detect and install applications here if
+# they have a 'models.py' or 'views.py' file
+import os
+currentdir = os.path.dirname(__file__)
+for t in os.walk(os.path.dirname(currentdir)):
+ modulename = os.path.basename(t[0])
+ #if we have a virtualenv skip it to avoid incorrect imports
+ if os.environ.has_key('VIRTUAL_ENV') and os.environ['VIRTUAL_ENV'] in t[0]:
+ continue
+
+ if ("views.py" in t[2] or "models.py" in t[2]) and not modulename in INSTALLED_APPS:
+ INSTALLED_APPS = INSTALLED_APPS + (modulename,)
+
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
@@ -256,14 +303,28 @@ LOGGING = {
'()': 'django.utils.log.RequireDebugFalse'
}
},
+ 'formatters': {
+ 'datetime': {
+ 'format': '%(levelname)s %(asctime)s %(message)s'
+ }
+ },
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
+ },
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
+ 'formatter': 'datetime',
}
},
'loggers': {
+ 'toaster' : {
+ 'handlers': ['console'],
+ 'level': 'DEBUG',
+ },
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
@@ -272,6 +333,13 @@ LOGGING = {
}
}
+if DEBUG and SQL_DEBUG:
+ LOGGING['loggers']['django.db.backends'] = {
+ 'level': 'DEBUG',
+ 'handlers': ['console'],
+ }
+
+
# If we're using sqlite, we need to tweak the performance a bit
from django.db.backends.signals import connection_created
def activate_synchronous_off(sender, connection, **kwargs):
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index ede5e4f96f..a2916e2dd7 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -25,20 +25,44 @@ from django.views.decorators.cache import never_cache
# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
urlpatterns = patterns('',
- url(r'^simple/', include('bldviewer.urls')),
+ # the api-s are not auto-discoverable
url(r'^api/1.0/', include('bldviewer.api')),
- url(r'^gui/', include('toastergui.urls')),
- url(r'^$', never_cache(RedirectView.as_view(url='/gui/'))),
+
# Examples:
# url(r'^toaster/', include('toaster.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- # Uncomment the next line to enable the admin:
- # url(r'^admin/', include(admin.site.urls)),
+
+ # if no application is selected, we have the magic toastergui app here
+ url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/'))),
)
+
+import toastermain.settings
+
+if toastermain.settings.FRESH_ENABLED:
+ urlpatterns.insert(1, url(r'', include('fresh.urls')))
+
+if toastermain.settings.MANAGED:
+ urlpatterns = [
+ # Uncomment the next line to enable the admin:
+ url(r'^admin/', include(admin.site.urls)),
+ ] + urlpatterns
+# Automatically discover urls.py in various apps, beside our own
+# and map module directories to the patterns
+
+import os
+currentdir = os.path.dirname(__file__)
+for t in os.walk(os.path.dirname(currentdir)):
+ #if we have a virtualenv skip it to avoid incorrect imports
+ if os.environ.has_key('VIRTUAL_ENV') and os.environ['VIRTUAL_ENV'] in t[0]:
+ continue
+
+ if "urls.py" in t[2] and t[0] != currentdir:
+ modulename = os.path.basename(t[0])
+ urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls')))
diff --git a/bitbake/toaster-requirements.txt b/bitbake/toaster-requirements.txt
new file mode 100644
index 0000000000..19b5293722
--- /dev/null
+++ b/bitbake/toaster-requirements.txt
@@ -0,0 +1,4 @@
+Django==1.6
+South==0.8.4
+argparse==1.2.1
+wsgiref==0.1.2
diff --git a/documentation/Makefile b/documentation/Makefile
index 3bc9a213ee..78a2e8e155 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -1,22 +1,22 @@
# This is a single Makefile to handle all generated Yocto Project documents.
-# The Makefile needs to live in the documents directory and all figures used
-# in any manuals must be .PNG files and live in the individual book's figures
-# directory as well as in the figures directory for the mega-manual.
+# The Makefile needs to live in the documentation/ directory and all figures
+# used in any manuals must be .PNG files and live in the individual book's
+# figures/ directory as well as in the figures/ directory for the mega-manual.
# Note that the figures for the Yocto Project Development Manual
# differ depending on the BRANCH being built.
#
# The Makefile has these targets:
#
-# pdf: generates a PDF version of a manual. Not valid for the Quick Start
-# or the mega-manual (single, large HTML file comprised of all
-# Yocto Project manuals).
-# html: generates an HTML version of a manual.
-# eclipse: generates an HTML version of a manual that can be used as
-# eclipse help (including necessary metadata files).
-# tarball: creates a tarball for the doc files.
-# validate: validates
-# publish: pushes generated files to the Yocto Project website
-# clean: removes files
+# pdf: generates a PDF version of a manual. Not valid for the
+# Quick Start or the mega-manual (single, large HTML file
+# comprised of all Yocto Project manuals).
+# html: generates an HTML version of a manual.
+# eclipse: generates an HTML version of a manual that can be used as
+# eclipse help (including necessary metadata files).
+# tarball: creates a tarball for the doc files.
+# validate: validates
+# publish: pushes generated files to the Yocto Project website
+# clean: removes files
#
# The Makefile generates an HTML and PDF version of every document except the
# Yocto Project Quick Start and the single, HTML mega-manual, which is comprised
@@ -33,7 +33,7 @@
# To build a manual, you must invoke Makefile with the DOC argument. If you
# are going to publish the manual, then you must invoke Makefile with both the
# DOC and the VER argument. Furthermore, if you are building or publishing
-# the edison or denzil versions of the Yocto Poject Development Manual or
+# the edison or denzil versions of the Yocto Project Development Manual or
# the mega-manual, you must also use the BRANCH argument.
#
# Examples:
@@ -45,18 +45,19 @@
# make DOC=mega-manual BRANCH=denzil
#
# The first example generates the HTML and PDF versions of the BSP Guide.
-# The second example generates the HTML version only of the Quick Start. Note that
-# the Quick Start only has an HTML version available. The third example generates
-# both the PDF and HTML versions of the Yocto Project Reference Manual. The
-# fourth example generates both the PDF and HTML 'edison' versions of the YP
-# Development Manual. The last exmample generates the HTML version of the
-# mega-manual and uses the 'denzil' branch when choosing figures for the
+# The second example generates the HTML version only of the Quick Start. Note
+# that the Quick Start only has an HTML version available. The third example
+# generates just the PDF version of the Yocto Project Reference Manual.
+# The fourth example generates both the PDF and HTML 'edison' versions
+# of the YP Development Manual. The last example generates the HTML version
+# of the mega-manual and uses the 'denzil' branch when choosing figures for the
# tarball of figures. Any example that does not use the BRANCH argument
# builds the current version of the manual set.
#
# Use the publish target to push the generated manuals to the Yocto Project
-# website. All files needed for the manual's HTML form are pushed as well as the
-# PDF version (if applicable).
+# website. All files needed for the manual's HTML form are pushed as well as
+# the PDF version (if applicable).
+#
# Examples:
#
# make publish DOC=bsp-guide VER=1.3
@@ -64,11 +65,11 @@
# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
# make publish DOC=dev-manual VER=1.2 BRANCH=denzil
#
-# The first example publishes the 1.3 version of both the PDF and HTML versions of
-# the BSP Guide. The second example publishes the 1.3 version of both the PDF and
-# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
-# 'edison' versions of the YP Development Manual. The fourth example publishes
-# the PDF and HTML 'denzil' versions of the YP Development Manual.
+# The first example publishes the 1.3 version of both the PDF and HTML versions
+# of the BSP Guide. The second example publishes the 1.3 version of both the
+# PDF and HTML versions of the ADT Manual. The third example publishes the PDF
+# and HTML 'edison' versions of the YP Development Manual. The fourth example
+# publishes the PDF and HTML 'denzil' versions of the YP Development Manual.
#
ifeq ($(DOC),bsp-guide)
@@ -86,16 +87,18 @@ ifeq ($(DOC),dev-manual)
XSLTOPTS = --xinclude
ALLPREQ = html pdf eclipse tarball
#
-# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
-# message for .PNG files that are not present when building a particular branch. The
-# list of files is all-inclusive for all branches. Note, if you don't provide a BRANCH
-# option, it defaults to the latest stuff. This would be appropriate for "master" branch.
+# Note that the tarfile might produce the "Cannot stat: No such file or
+# directory" error message for .PNG files that are not present when building
+# a particular branch. The list of files is all-inclusive for all branches.
+# Note, if you don't provide a BRANCH option, it defaults to the latest stuff.
+# This would be appropriate for "master" branch.
#
ifeq ($(BRANCH),edison)
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png figures/git-workflow.png \
+ figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-example-repos-edison.png \
figures/kernel-overview-1.png figures/kernel-overview-2.png \
figures/kernel-overview-3-edison.png \
@@ -103,8 +106,9 @@ TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
figures/wip.png
else ifeq ($(BRANCH),denzil)
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png figures/git-workflow.png \
+ figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-example-repos-denzil.png \
figures/kernel-overview-1.png figures/kernel-overview-2.png \
figures/kernel-overview-3-denzil.png \
@@ -112,10 +116,12 @@ TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
figures/wip.png
else
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png figures/git-workflow.png \
+ figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
- figures/source-repos.png figures/yp-download.png figures/recipe-workflow.png \
+ figures/source-repos.png figures/yp-download.png \
+ figures/recipe-workflow.png \
eclipse
endif
@@ -146,61 +152,82 @@ XSLTOPTS = --stringparam html.stylesheet mega-style.css \
ALLPREQ = html tarball
ifeq ($(BRANCH),edison)
-TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
+TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
+ figures/building-an-image.png \
figures/using-a-pre-built-image.png \
figures/poky-title.png \
figures/adt-title.png figures/bsp-title.png \
figures/kernel-title.png figures/kernel-architecture-overview.png \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png figures/git-workflow.png \
+ figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-example-repos-edison.png \
figures/kernel-overview-1.png figures/kernel-overview-2.png \
figures/kernel-overview-3-edison.png \
figures/source-repos.png figures/yp-download.png \
figures/wip.png
else ifeq ($(BRANCH),denzil)
-TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
+TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
+ figures/building-an-image.png \
figures/using-a-pre-built-image.png \
figures/poky-title.png \
figures/adt-title.png figures/bsp-title.png \
figures/kernel-title.png figures/kernel-architecture-overview.png \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png figures/git-workflow.png \
+ figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-example-repos-denzil.png \
figures/kernel-overview-1.png figures/kernel-overview-2.png \
figures/kernel-overview-3-denzil.png \
figures/source-repos.png figures/yp-download.png \
figures/wip.png
else
-TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
+TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
+ figures/building-an-image.png \
figures/using-a-pre-built-image.png \
- figures/poky-title.png figures/buildhistory.png figures/buildhistory-web.png \
+ figures/poky-title.png figures/buildhistory.png \
+ figures/buildhistory-web.png \
figures/adt-title.png figures/bsp-title.png \
figures/kernel-dev-title.png figures/kernel-architecture-overview.png \
- figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
- figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
+ figures/app-dev-flow.png figures/bsp-dev-flow.png \
+ figures/dev-title.png \
+ figures/git-workflow.png figures/index-downloads.png \
+ figures/kernel-dev-flow.png \
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
figures/source-repos.png figures/yp-download.png \
figures/profile-title.png figures/kernelshark-all.png \
- figures/kernelshark-choose-events.png figures/kernelshark-i915-display.png \
+ figures/kernelshark-choose-events.png \
+ figures/kernelshark-i915-display.png \
figures/kernelshark-output-display.png figures/lttngmain0.png \
figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
figures/oprofileui-downloading.png figures/oprofileui-processes.png \
- figures/perf-probe-do_fork-profile.png figures/perf-report-cycles-u.png \
+ figures/perf-probe-do_fork-profile.png \
+ figures/perf-report-cycles-u.png \
figures/perf-systemwide.png figures/perf-systemwide-libc.png \
- figures/perf-wget-busybox-annotate-menu.png figures/perf-wget-busybox-annotate-udhcpc.png \
- figures/perf-wget-busybox-debuginfo.png figures/perf-wget-busybox-dso-zoom.png \
- figures/perf-wget-busybox-dso-zoom-menu.png figures/perf-wget-busybox-expanded-stripped.png \
- figures/perf-wget-flat-stripped.png figures/perf-wget-g-copy-from-user-expanded-stripped.png \
- figures/perf-wget-g-copy-to-user-expanded-debuginfo.png figures/perf-wget-g-copy-to-user-expanded-stripped.png \
- figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png figures/pybootchartgui-linux-yocto.png \
- figures/pychart-linux-yocto-rpm.png figures/pychart-linux-yocto-rpm-nostrip.png \
+ figures/perf-wget-busybox-annotate-menu.png \
+ figures/perf-wget-busybox-annotate-udhcpc.png \
+ figures/perf-wget-busybox-debuginfo.png \
+ figures/perf-wget-busybox-dso-zoom.png \
+ figures/perf-wget-busybox-dso-zoom-menu.png \
+ figures/perf-wget-busybox-expanded-stripped.png \
+ figures/perf-wget-flat-stripped.png \
+ figures/perf-wget-g-copy-from-user-expanded-stripped.png \
+ figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \
+ figures/perf-wget-g-copy-to-user-expanded-stripped.png \
+ figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \
+ figures/pybootchartgui-linux-yocto.png \
+ figures/pychart-linux-yocto-rpm.png \
+ figures/pychart-linux-yocto-rpm-nostrip.png \
figures/sched-wakeup-profile.png figures/sysprof-callers.png \
- figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png figures/cross-development-toolchains.png \
- figures/yocto-environment-ref.png figures/user-configuration.png figures/source-input.png \
- figures/package-feeds.png figures/layer-input.png figures/images.png figures/sdk.png \
- figures/source-fetching.png figures/patching.png figures/configuration-compile-autoreconf.png \
- figures/analysis-for-package-splitting.png figures/image-generation.png \
+ figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \
+ figures/cross-development-toolchains.png \
+ figures/yocto-environment-ref.png figures/user-configuration.png \
+ figures/source-input.png figures/package-feeds.png \
+ figures/layer-input.png figures/images.png figures/sdk.png \
+ figures/source-fetching.png figures/patching.png \
+ figures/configuration-compile-autoreconf.png \
+ figures/analysis-for-package-splitting.png \
+ figures/image-generation.png \
figures/sdk-generation.png figures/recipe-workflow.png
endif
@@ -243,19 +270,28 @@ XSLTOPTS = --xinclude
ALLPREQ = html pdf eclipse tarball
TARFILES = profile-manual.html profile-manual.pdf profile-manual-style.css \
figures/profile-title.png figures/kernelshark-all.png \
- figures/kernelshark-choose-events.png figures/kernelshark-i915-display.png \
+ figures/kernelshark-choose-events.png \
+ figures/kernelshark-i915-display.png \
figures/kernelshark-output-display.png figures/lttngmain0.png \
figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
figures/oprofileui-downloading.png figures/oprofileui-processes.png \
- figures/perf-probe-do_fork-profile.png figures/perf-report-cycles-u.png \
+ figures/perf-probe-do_fork-profile.png \
+ figures/perf-report-cycles-u.png \
figures/perf-systemwide.png figures/perf-systemwide-libc.png \
- figures/perf-wget-busybox-annotate-menu.png figures/perf-wget-busybox-annotate-udhcpc.png \
- figures/perf-wget-busybox-debuginfo.png figures/perf-wget-busybox-dso-zoom.png \
- figures/perf-wget-busybox-dso-zoom-menu.png figures/perf-wget-busybox-expanded-stripped.png \
- figures/perf-wget-flat-stripped.png figures/perf-wget-g-copy-from-user-expanded-stripped.png \
- figures/perf-wget-g-copy-to-user-expanded-debuginfo.png figures/perf-wget-g-copy-to-user-expanded-stripped.png \
- figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png figures/pybootchartgui-linux-yocto.png \
- figures/pychart-linux-yocto-rpm.png figures/pychart-linux-yocto-rpm-nostrip.png \
+ figures/perf-wget-busybox-annotate-menu.png \
+ figures/perf-wget-busybox-annotate-udhcpc.png \
+ figures/perf-wget-busybox-debuginfo.png \
+ figures/perf-wget-busybox-dso-zoom.png \
+ figures/perf-wget-busybox-dso-zoom-menu.png \
+ figures/perf-wget-busybox-expanded-stripped.png \
+ figures/perf-wget-flat-stripped.png \
+ figures/perf-wget-g-copy-from-user-expanded-stripped.png \
+ figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \
+ figures/perf-wget-g-copy-to-user-expanded-stripped.png \
+ figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \
+ figures/pybootchartgui-linux-yocto.png \
+ figures/pychart-linux-yocto-rpm.png \
+ figures/pychart-linux-yocto-rpm-nostrip.png \
figures/sched-wakeup-profile.png figures/sysprof-callers.png \
figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \
eclipse
@@ -267,7 +303,8 @@ endif
ifeq ($(DOC),kernel-dev)
XSLTOPTS = --xinclude
ALLPREQ = html pdf eclipse tarball
-TARFILES = kernel-dev.html kernel-dev.pdf kernel-dev-style.css figures/kernel-dev-title.png \
+TARFILES = kernel-dev.html kernel-dev.pdf kernel-dev-style.css \
+ figures/kernel-dev-title.png \
figures/kernel-architecture-overview.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
@@ -278,7 +315,7 @@ endif
##
# These URI should be rewritten by your distribution's xml catalog to
-# match your localy installed XSL stylesheets.
+# match your locally installed XSL stylesheets.
XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current
XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml
index 9aa25fad40..164b1efbff 100644
--- a/documentation/adt-manual/adt-command.xml
+++ b/documentation/adt-manual/adt-command.xml
@@ -177,7 +177,7 @@
Thus, the following command works:
<literallayout class='monospaced'>
$ ./configure --host=armv5te-poky-linux-gnueabi \
- --with-libtool-sysroot=&lt;sysroot-dir&gt;
+ --with-libtool-sysroot=<replaceable>sysroot-dir</replaceable>
</literallayout>
</para>
@@ -186,13 +186,13 @@
cross-toolchain tools.
<note>
If the <filename>configure</filename> script results in problems recognizing the
- <filename>--with-libtool-sysroot=&lt;sysroot-dir&gt;</filename> option,
+ <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option,
regenerate the script to enable the support by doing the following and then
run the script again:
<literallayout class='monospaced'>
$ libtoolize --automake
$ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \
- [-I &lt;dir_containing_your_project-specific_m4_macros&gt;]
+ [-I <replaceable>dir_containing_your_project-specific_m4_macros</replaceable>]
$ autoconf
$ autoheader
$ automake -a
diff --git a/documentation/adt-manual/adt-manual-customization.xsl b/documentation/adt-manual/adt-manual-customization.xsl
index e7892fdd26..f08087d93f 100644
--- a/documentation/adt-manual/adt-manual-customization.xsl
+++ b/documentation/adt-manual/adt-manual-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
diff --git a/documentation/adt-manual/adt-manual.xml b/documentation/adt-manual/adt-manual.xml
index 31695b0387..5492c6ff09 100644
--- a/documentation/adt-manual/adt-manual.xml
+++ b/documentation/adt-manual/adt-manual.xml
@@ -78,9 +78,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
diff --git a/documentation/adt-manual/adt-package.xml b/documentation/adt-manual/adt-package.xml
index da032eee5b..5c3196ea91 100644
--- a/documentation/adt-manual/adt-package.xml
+++ b/documentation/adt-manual/adt-package.xml
@@ -80,17 +80,17 @@
Next, source the environment setup script found in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
Follow that by setting up the installation destination to point to your
- sysroot as <filename>&lt;sysroot_dir&gt;</filename>.
- Finally, have an OPKG configuration file <filename>&lt;conf_file&gt;</filename>
+ sysroot as <replaceable>sysroot_dir</replaceable>.
+ Finally, have an OPKG configuration file <replaceable>conf_file</replaceable>
that corresponds to the <filename>opkg</filename> repository you have just created.
The following command forms should now work:
<literallayout class='monospaced'>
- $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; update
- $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
+ $ opkg-cl –f <replaceable>conf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> update
+ $ opkg-cl –f <replaceable>cconf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> \
--force-overwrite install libglade
- $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
+ $ opkg-cl –f <replaceable>cconf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> \
--force-overwrite install libglade-dbg
- $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; \
+ $ opkg-cl –f <replaceable>conf_file&gt; -o </replaceable>sysroot_dir&gt; \
--force-overwrite install libglade-dev
</literallayout>
</para>
diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml
index 89ef09fb24..7faf39b9e2 100644
--- a/documentation/adt-manual/adt-prepare.xml
+++ b/documentation/adt-manual/adt-prepare.xml
@@ -183,20 +183,20 @@
Please make sure you understand the security implications of doing this.
You might also have to modify your firewall settings to allow
NFS booting to work.</note></para></listitem>
- <listitem><para><filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>: The root
+ <listitem><para><filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>: The root
filesystem images you want to download from the
<filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
- <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_&lt;arch&gt;</filename>: The
+ <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_</filename><replaceable>arch</replaceable>: The
particular root filesystem used to extract and create the target sysroot.
The value of this variable must have been specified with
- <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>.
+ <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>.
For example, if you downloaded both <filename>minimal</filename> and
<filename>sato-sdk</filename> images by setting
- <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
- to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
+ <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>
+ to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>
must be set to either "minimal" or "sato-sdk".
</para></listitem>
- <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename>: The
+ <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_</filename><replaceable>arch</replaceable>: The
location on the development host where the target sysroot is created.
</para></listitem>
</itemizedlist>
@@ -212,7 +212,7 @@
Once the installer begins to run, you are asked to enter the
location for cross-toolchain installation.
The default location is
- <filename>/opt/poky/&lt;release&gt;</filename>.
+ <filename>/opt/poky/</filename><replaceable>release</replaceable>.
After either accepting the default location or selecting your
own location, you are prompted to run the installation script
interactively or in silent mode.
@@ -230,7 +230,7 @@
<filename>adt-installer</filename> directory according to your
installer configurations, and the target sysroot located
according to the
- <filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename>
+ <filename>YOCTOADT_TARGET_SYSROOT_LOC_</filename><replaceable>arch</replaceable>
variable also in your configuration file.
</para>
</section>
@@ -593,7 +593,7 @@
section.
</para></listitem>
<listitem><para>
- Use <filename>bitbake &lt;image&gt; -c populate_sdk</filename>.
+ Use <filename>bitbake</filename> <replaceable>image</replaceable> <filename>-c populate_sdk</filename>.
This method has significant advantages over the previous method
because it results in a toolchain installer that contains the
sysroot that matches your target root filesystem.
diff --git a/documentation/bsp-guide/bsp-guide-customization.xsl b/documentation/bsp-guide/bsp-guide-customization.xsl
index 53e50b1ba0..3da37be06f 100644
--- a/documentation/bsp-guide/bsp-guide-customization.xsl
+++ b/documentation/bsp-guide/bsp-guide-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
diff --git a/documentation/bsp-guide/bsp-guide.xml b/documentation/bsp-guide/bsp-guide.xml
index af4ea64f43..0fd4728807 100644
--- a/documentation/bsp-guide/bsp-guide.xml
+++ b/documentation/bsp-guide/bsp-guide.xml
@@ -90,9 +90,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml
index fd143ede14..3cda0f6b70 100644
--- a/documentation/bsp-guide/bsp.xml
+++ b/documentation/bsp-guide/bsp.xml
@@ -35,12 +35,12 @@
Collectively, you can think of the base directory, its file structure,
and the contents as a BSP Layer.
Although not a strict requirement, layers in the Yocto Project use the
- following well established naming convention:
+ following well-established naming convention:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;
+ meta-<replaceable>bsp_name</replaceable>
</literallayout>
The string "meta-" is prepended to the machine or platform name, which is
- "bsp_name" in the above form.
+ <replaceable>bsp_name</replaceable> in the above form.
</para>
<para>
@@ -50,7 +50,7 @@
<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
through a web interface at
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
- If you go to that interface you will find near the bottom of the list
+ If you go to that interface, you will find near the bottom of the list
under "Yocto Metadata Layers" several BSP layers all of which are
supported by the Yocto Project (e.g. <filename>meta-minnow</filename>,
<filename>meta-raspberrypi</filename>, and
@@ -58,7 +58,7 @@
Each of these layers is a repository unto itself and clicking on a
layer reveals information that includes two links from which you can choose
to set up a clone of the layer's repository on your local host system.
- Here is an example that clones the Minnow Board BSP layer:
+ Here is an example that clones the MinnowBoard BSP layer:
<literallayout class='monospaced'>
$ git clone git://git.yoctoproject.org/meta-minnow
</literallayout>
@@ -72,7 +72,7 @@
</para>
<para>
- The layer's base directory (<filename>meta-&lt;bsp_name&gt;</filename>) is the root
+ The layer's base directory (<filename>meta-<replaceable>bsp_name</replaceable></filename>) is the root
of the BSP Layer.
This root is what you add to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
@@ -115,8 +115,9 @@
<para>
Some layers function as a layer to hold other BSP layers.
- An example of this type of layer is the <filename>meta-intel</filename> layer.
- The <filename>meta-intel</filename> layer contains many individual BSP layers.
+ An example of this type of layer is the <filename>meta-intel</filename> layer,
+ which contains a number of individual BSP sub-layers, as well as a directory
+ named <filename>common/</filename> full of common content across those layers.
</para>
<para>
@@ -131,8 +132,8 @@
<title>Example Filesystem Layout</title>
<para>
- Providing a common form allows end-users to understand and become familiar
- with the layout.
+ Defining a common BSP directory structure allows end-users to understand and
+ become familiar with that structure.
A common format also encourages standardization of software support of hardware.
</para>
@@ -175,17 +176,17 @@
for specific BSPs could differ.
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/
- meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
- meta-&lt;bsp_name&gt;/README
- meta-&lt;bsp_name&gt;/README.sources
- meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
- meta-&lt;bsp_name&gt;/conf/layer.conf
- meta-&lt;bsp_name&gt;/conf/machine/*.conf
- meta-&lt;bsp_name&gt;/recipes-bsp/*
- meta-&lt;bsp_name&gt;/recipes-core/*
- meta-&lt;bsp_name&gt;/recipes-graphics/*
- meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto_&lt;kernel_rev&gt;.bbappend
+ meta-<replaceable>bsp_name</replaceable>/
+ meta-<replaceable>bsp_name</replaceable>/<replaceable>bsp_license_file</replaceable>
+ meta-<replaceable>bsp_name</replaceable>/README
+ meta-<replaceable>bsp_name</replaceable>/README.sources
+ meta-<replaceable>bsp_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
+ meta-<replaceable>bsp_name</replaceable>/conf/layer.conf
+ meta-<replaceable>bsp_name</replaceable>/conf/machine/*.conf
+ meta-<replaceable>bsp_name</replaceable>/recipes-bsp/*
+ meta-<replaceable>bsp_name</replaceable>/recipes-core/*
+ meta-<replaceable>bsp_name</replaceable>/recipes-graphics/*
+ meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux/linux-yocto_<replaceable>kernel_rev</replaceable>.bbappend
</literallayout>
</para>
@@ -200,28 +201,19 @@
meta-crownbay/conf/
meta-crownbay/conf/layer.conf
meta-crownbay/conf/machine/
- meta-crownbay/conf/machine/crownbay.conf
meta-crownbay/conf/machine/crownbay-noemgd.conf
meta-crownbay/recipes-bsp/
meta-crownbay/recipes-bsp/formfactor/
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
meta-crownbay/recipes-bsp/formfactor/formfactor/
- meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/
- meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
- meta-crownbay/recipes-graphics/
- meta-crownbay/recipes-graphics/xorg-xserver/
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
meta-crownbay/recipes-kernel/
+ meta-crownbay/recipes-kernel/kmod
+ meta-crownbay/recipes-kernel/kmod/kmod_git.bbappend
meta-crownbay/recipes-kernel/linux/
- meta-crownbay/recipes-kernel/linux/linux-yocto-dev.bbappend
meta-crownbay/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
meta-crownbay/recipes-kernel/linux/linux-yocto_3.10.bbappend
- meta-crownbay/recipes-kernel/linux/linux-yocto_3.14.bbappend
</literallayout>
</para>
@@ -235,7 +227,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
+ meta-<replaceable>bsp_name</replaceable>/<replaceable>bsp_license_file</replaceable>
</literallayout>
</para>
@@ -257,7 +249,7 @@
<para>
You can find this file in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/README
+ meta-<replaceable>bsp_name</replaceable>/README
</literallayout>
</para>
@@ -281,7 +273,7 @@
<para>
You can find this file in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/README.sources
+ meta-<replaceable>bsp_name</replaceable>/README.sources
</literallayout>
</para>
@@ -300,7 +292,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
+ meta-<replaceable>bsp_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
</literallayout>
</para>
@@ -316,7 +308,7 @@
<para>
The exact types of binaries present are highly hardware-dependent.
- However, a README file should be present in the BSP Layer that explains how to use
+ However, a <filename>README</filename> file should be present in the BSP Layer that explains how to use
the kernels and images with the target hardware.
If pre-built binaries are present, source code to meet licensing requirements must also
exist in some form.
@@ -328,7 +320,7 @@
<para>
You can find this file in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/conf/layer.conf
+ meta-<replaceable>bsp_name</replaceable>/conf/layer.conf
</literallayout>
</para>
@@ -338,9 +330,9 @@
contents of the layer, and contains information about how the build
system should use it.
Generally, a standard boilerplate file such as the following works.
- In the following example, you would replace "<filename>bsp</filename>" and
- "<filename>_bsp</filename>" with the actual name
- of the BSP (i.e. <filename>&lt;bsp_name&gt;</filename> from the example template).
+ In the following example, you would replace "<replaceable>bsp</replaceable>" and
+ "<replaceable>_bsp</replaceable>" with the actual name
+ of the BSP (i.e. <replaceable>bsp_name</replaceable> from the example template).
</para>
<para>
@@ -352,9 +344,11 @@
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
- BBFILE_COLLECTIONS += "bsp"
- BBFILE_PATTERN_bsp = "^${LAYERDIR}/"
- BBFILE_PRIORITY_bsp = "6"
+ BBFILE_COLLECTIONS += "<replaceable>bsp</replaceable>"
+ BBFILE_PATTERN_<replaceable>bsp</replaceable> = "^${LAYERDIR}/"
+ BBFILE_PRIORITY_<replaceable>bsp</replaceable> = "6"
+
+ LAYERDEPENDS_<replaceable>bsp</replaceable> = "intel"
</literallayout>
</para>
@@ -362,9 +356,18 @@
To illustrate the string substitutions, here are the corresponding statements
from the Crown Bay <filename>conf/layer.conf</filename> file:
<literallayout class='monospaced'>
+ # We have a conf and classes directory, add to BBPATH
+ BBPATH .= ":${LAYERDIR}"
+
+ # We have a recipes directory, add to BBFILES
+ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
BBFILE_COLLECTIONS += "crownbay"
- BBFILE_PATTERN_crownbay = "^${LAYERDIR}/"
+ BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
BBFILE_PRIORITY_crownbay = "6"
+
+ LAYERDEPENDS_crownbay = "intel"
</literallayout>
</para>
@@ -381,7 +384,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/conf/machine/*.conf
+ meta-<replaceable>bsp_name</replaceable>/conf/machine/*.conf
</literallayout>
</para>
@@ -426,12 +429,12 @@
<para>
To use an include file, you simply include them in the machine configuration file.
- For example, the Crown Bay BSP <filename>crownbay.conf</filename> contains the
+ For example, the Crown Bay BSP <filename>crownbay-noemgd.conf</filename> contains the
following statements:
<literallayout class='monospaced'>
- require conf/machine/include/intel-core2-32-common.inc
require conf/machine/include/meta-intel.inc
- require conf/machine/include/meta-intel-emgd.inc
+ require conf/machine/include/intel-core2-32-common.inc
+ require conf/machine/include/intel-common-pkgarch.inc
</literallayout>
</para>
</section>
@@ -441,7 +444,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/recipes-bsp/*
+ meta-<replaceable>bsp_name</replaceable>/recipes-bsp/*
</literallayout>
</para>
@@ -453,11 +456,10 @@
append file used to augment the recipe that starts the build.
Furthermore, there are machine-specific settings used during the
build that are defined by the <filename>machconfig</filename> file.
- In the Crown Bay example, two <filename>machconfig</filename> files
- exist: one that supports the Intel® Embedded Media and Graphics
- Driver (Intel® EMGD) and one that does not:
+ In the Crown Bay example, the <filename>machconfig</filename> file
+ supports the Video Electronics Standards Association (VESA) graphics
+ driver:
<literallayout class='monospaced'>
- meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
</literallayout>
@@ -478,7 +480,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/recipes-graphics/*
+ meta-<replaceable>bsp_name</replaceable>/recipes-graphics/*
</literallayout>
</para>
@@ -486,13 +488,17 @@
This optional directory contains recipes for the BSP if it has
special requirements for graphics support.
All files that are needed for the BSP to support a display are kept here.
- For example, the Crown Bay BSP's <filename>xorg.conf</filename> file
- detects the graphics support needed (i.e. the Intel® Embedded Media
- Graphics Driver (EMGD) or the Video Electronics Standards Association
- (VESA) graphics):
+ For example, the <filename>meta-emenlow</filename> layer, which supports
+ the eMenlow platform consisting of the
+ <trademark class='registered'>Intel</trademark>
+ <trademark class='trade'>Atom</trademark>
+ Z5xx processor with the
+ <trademark class='registered'>Intel</trademark>
+ System Controller Hub US15W uses these files for supporting the Video
+ Electronics Standards Association (VESA) graphics:
<literallayout class='monospaced'>
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
- meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
+ meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+ meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow-noemgd/xorg.conf
</literallayout>
</para>
</section>
@@ -502,7 +508,7 @@
<para>
You can find these files in the BSP Layer at:
<literallayout class='monospaced'>
- meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto_*.bbappend
+ meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux/linux-yocto*.bbappend
</literallayout>
</para>
@@ -515,13 +521,13 @@
at <filename>meta/recipes-kernel/linux</filename>.
You can append your specific changes to the kernel recipe by using a
similarly named append file, which is located in the BSP Layer (e.g.
- the <filename>meta-&lt;bsp_name&gt;/recipes-kernel/linux</filename> directory).
+ the <filename>meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux</filename> directory).
</para>
<para>
Suppose you are using the <filename>linux-yocto_3.10.bb</filename> recipe to build
the kernel.
In other words, you have selected the kernel in your
- <filename>&lt;bsp_name&gt;.conf</filename> file by adding these types
+ <replaceable>bsp_name</replaceable><filename>.conf</filename> file by adding these types
of statements:
<literallayout class='monospaced'>
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
@@ -530,7 +536,7 @@
<note>
When the preferred provider is assumed by default, the
<filename>PREFERRED_PROVIDER</filename> statement does not appear in the
- <filename>&lt;bsp_name&gt;.conf</filename> file.
+ <replaceable>bsp_name</replaceable><filename>.conf</filename> file.
</note>
You would use the <filename>linux-yocto_3.10.bbappend</filename> file to append
specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
@@ -549,26 +555,14 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
- COMPATIBLE_MACHINE_crownbay = "crownbay"
- KMACHINE_crownbay = "crownbay"
- KBRANCH_crownbay = "standard/crownbay"
- KERNEL_FEATURES_append_crownbay = " features/drm-emgd/drm-emgd-1.18 cfg/vesafb"
-
COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
KMACHINE_crownbay-noemgd = "crownbay"
KBRANCH_crownbay-noemgd = "standard/crownbay"
KERNEL_FEATURES_append_crownbay-noemgd = " cfg/vesafb"
- LINUX_VERSION_crownbay = "3.10.35"
- SRCREV_meta_crownbay = "b6e58b33dd427fe471f8827c83e311acdf4558a4"
- SRCREV_machine_crownbay = "cee957655fe67826b2e827e2db41f156fa8f0cc4"
- SRCREV_emgd_crownbay = "42d5e4548e8e79e094fa8697949eed4cf6af00a3"
-
- LINUX_VERSION_crownbay-noemgd = "3.10.35"
- SRCREV_meta_crownbay-noemgd = "b6e58b33dd427fe471f8827c83e311acdf4558a4"
- SRCREV_machine_crownbay-noemgd = "cee957655fe67826b2e827e2db41f156fa8f0cc4"
-
- SRC_URI_crownbay = "git://git.yoctoproject.org/linux-yocto-3.10.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA},emgd-1.18;name=machine,meta,emgd"
+ LINUX_VERSION_crownbay-noemgd = "3.10.55"
+ SRCREV_meta_crownbay-noemgd = "f79a00265eefbe2fffc2cdb03f67235497a9a87e"
+ SRCREV_machine_crownbay-noemgd = "3677ea7f9476458aa6dec440243de3a6fb1343a9"
</literallayout>
This append file contains statements used to support the Crown Bay BSP.
The file defines machines using the
@@ -584,14 +578,11 @@
The
<ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
variable enables features specific to the kernel
- (e.g. graphics support in this case).
+ (e.g. VESA graphics support in this case).
The append file points to specific commits in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> Git
repository and the <filename>meta</filename> Git repository branches to identify the
exact kernel needed to build the Crown Bay BSP.
- Finally, the file includes the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- statement to locate the source files.
</para>
<para>
@@ -752,7 +743,7 @@
</para></listitem>
<listitem><para><emphasis>License File:</emphasis>
You must include a license file in the
- <filename>meta-&lt;bsp_name&gt;</filename> directory.
+ <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
This license covers the BSP Metadata as a whole.
You must specify which license to use since there is no
default license if one is not specified.
@@ -762,7 +753,7 @@
as an example.</para></listitem>
<listitem><para><emphasis>README File:</emphasis>
You must include a <filename>README</filename> file in the
- <filename>meta-&lt;bsp_name&gt;</filename> directory.
+ <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
See the
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README'><filename>README</filename></ulink>
file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
@@ -804,7 +795,7 @@
</itemizedlist></para></listitem>
<listitem><para><emphasis>README.sources File:</emphasis>
You must include a <filename>README.sources</filename> in the
- <filename>meta-&lt;bsp_name&gt;</filename> directory.
+ <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
This file specifies exactly where you can find the sources used to
generate the binary images contained in the
<filename>binary</filename> directory, if present.
@@ -814,12 +805,13 @@
as an example.</para></listitem>
<listitem><para><emphasis>Layer Configuration File:</emphasis>
You must include a <filename>conf/layer.conf</filename> in the
- <filename>meta-&lt;bsp_name&gt;</filename> directory.
- This file identifies the <filename>meta-&lt;bsp_name&gt;</filename>
+ <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
+ This file identifies the <filename>meta-<replaceable>bsp_name</replaceable></filename>
BSP layer as a layer to the build system.</para></listitem>
<listitem><para><emphasis>Machine Configuration File:</emphasis>
- You must include one or more <filename>conf/machine/&lt;bsp_name&gt;.conf</filename>
- files in the <filename>meta-&lt;bsp_name&gt;</filename> directory.
+ You must include one or more
+ <filename>conf/machine/<replaceable>bsp_name</replaceable>.conf</filename>
+ files in the <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
These configuration files define machine targets that can be built
using the BSP layer.
Multiple machine configuration files define variations of machine
@@ -866,7 +858,7 @@
filesystems meant to allow users to boot the BSP for evaluation
purposes, you should put the images and artifacts within a
<filename>binary/</filename> subdirectory located in the
- <filename>meta-&lt;bsp_name&gt;</filename> directory.
+ <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
<note>If you do include a bootable image as part of the BSP and the image
was built by software covered by the GPL or other open source licenses,
it is your responsibility to understand
@@ -910,8 +902,15 @@
<filename>recipes-bsp</filename>, <filename>recipes-graphics</filename>,
<filename>recipes-core</filename>, and so forth).
</para></listitem>
- <listitem><para>Place the BSP-specific files in the directory named for
- your machine inside the BSP layer.
+ <listitem><para>Place the BSP-specific files in the proper directory
+ inside the BSP layer.
+ How expansive the layer is affects where you must place these files.
+ For example, if your layer supports several different machine types,
+ you need to be sure your layer's directory structure includes hierarchy
+ that separates the files out according to machine.
+ If your layer does not support multiple machines, the layer would not
+ have that additional hierarchy and the files would obviously not be
+ able to reside in a machine-specific directory.
</para></listitem>
</itemizedlist>
</para>
@@ -920,7 +919,8 @@
Following is a specific example to help you better understand the process.
Consider an example that customizes a recipe by adding
a BSP-specific configuration file named <filename>interfaces</filename> to the
- <filename>init-ifupdown_1.0.bb</filename> recipe for machine "xyz".
+ <filename>init-ifupdown_1.0.bb</filename> recipe for machine "xyz" where the
+ BSP layer also supports several other machines.
Do the following:
<orderedlist>
<listitem><para>Edit the <filename>init-ifupdown_1.0.bbappend</filename> file so that it
@@ -934,8 +934,17 @@
<listitem><para>Create and place the new <filename>interfaces</filename>
configuration file in the BSP's layer here:
<literallayout class='monospaced'>
- meta-xyz/recipes-core/init-ifupdown/files/xyz/interfaces
+ meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces
</literallayout>
+ <note>
+ If the <filename>meta-xyz</filename> layer did not support
+ multiple machines, you would place the
+ <filename>interfaces</filename> configuration file in the
+ layer here:
+ <literallayout class='monospaced'>
+ meta-xyz/recipes-core/init-ifupdown/files/interfaces
+ </literallayout>
+ </note>
The
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
variable in the append files extends the search path
@@ -1100,7 +1109,7 @@
Consequently, to use the scripts, you must <filename>source</filename> the
environment just as you would when invoking a build:
<literallayout class='monospaced'>
- $ source oe-init-build-env [build_dir]
+ $ source oe-init-build-env <replaceable>build_dir</replaceable>
</literallayout>
</para>
@@ -1242,12 +1251,13 @@
<literallayout class='monospaced'>
$ yocto-bsp list karch
Architectures available:
- powerpc
- i386
- x86_64
- arm
qemu
+ arm
mips
+ x86_64
+ i386
+ powerpc
+ mips64
</literallayout>
</para>
@@ -1288,26 +1298,25 @@
3) ARM (32-bit)
4) PowerPC (32-bit)
5) MIPS (32-bit)
+ 6) MIPS64 (64-bit)
3
- Would you like to use the default (3.10) kernel? (y/n) [default: y] y
+ Would you like to use the default (3.17) kernel? (y/n) [default: y] y
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y]
- Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.10.git...
+ Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.17.git...
Please choose a machine branch to base your new BSP branch on: [default: standard/base]
1) standard/arm-versatile-926ejs
2) standard/base
3) standard/beagleboard
4) standard/beaglebone
5) standard/ck
- 6) standard/crownbay
- 7) standard/edgerouter
- 8) standard/emenlow
- 9) standard/fri2
- 10) standard/fsl-mpc8315e-rdb
- 11) standard/mti-malta32
- 12) standard/mti-malta64
+ 6) standard/common-pc
+ 7) standard/crownbay
+ 8) standard/edgerouter
+ 9) standard/fsl-mpc8315e-rdb
+ 10) standard/mti-malta32
+ 11) standard/mti-malta64
+ 12) standard/qemuarm64
13) standard/qemuppc
- 14) standard/routerstationpro
- 15) standard/sys940x
1
Would you like SMP support? (y/n) [default: y]
Does your BSP have a touchscreen? (y/n) [default: n]
@@ -1322,7 +1331,7 @@
In the example, we use the ARM architecture.
</para></listitem>
<listitem><para>The script then prompts you for the kernel.
- The default 3.14 kernel is acceptable.
+ The default 3.17 kernel is acceptable.
So, the example accepts the default.
If you enter 'n', the script prompts you to further enter the kernel
you do want to use.</para></listitem>
@@ -1351,7 +1360,7 @@
<listitem><para>By default, the script creates the new BSP Layer in the
current working directory of the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
- which is <filename>poky</filename> in this case.
+ (i.e. <filename>poky/build</filename>).
</para></listitem>
</orderedlist>
</para>
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 1e4f25d918..0085cefa81 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -71,6 +71,7 @@
you will see several layers:
<filename>meta</filename>,
<filename>meta-skeleton</filename>,
+ <filename>meta-selftest</filename>,
<filename>meta-yocto</filename>, and
<filename>meta-yocto-bsp</filename>.
Each of these folders represents a distinct layer.
@@ -151,7 +152,7 @@
BBFILE_COLLECTIONS += "yoctobsp"
BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_yoctobsp = "5"
- LAYERVERSION_yoctobsp = "2"
+ LAYERVERSION_yoctobsp = "3"
</literallayout></para>
<para>Here is an explanation of the example:
<itemizedlist>
@@ -193,7 +194,7 @@
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename>
variable then assigns a priority to the layer.
Applying priorities is useful in situations
- where the same package might appear in multiple
+ where the same recipe might appear in multiple
layers and allows you to choose the layer
that takes precedence.</para></listitem>
<listitem><para>The
@@ -347,6 +348,12 @@
DEPENDS_append_one = " foo"
DEPENDS_prepend_one = "foo "
</literallayout>
+ As an actual example, here's a line from the recipe for
+ the OProfile profiler, which lists an extra build-time
+ dependency when building specifically for 64-bit PowerPC:
+ <literallayout class='monospaced'>
+ DEPENDS_append_powerpc64 = " libpfm4"
+ </literallayout>
<note>
Avoiding "+=" and "=+" and using
machine-specific
@@ -414,7 +421,7 @@
<itemizedlist>
<listitem><para>Store custom layers in a Git repository
that uses the
- <filename>meta-&lt;layer_name&gt;</filename> format.
+ <filename>meta-<replaceable>layer_name</replaceable></filename> format.
</para></listitem>
<listitem><para>Clone the repository alongside other
<filename>meta</filename> directories in the
@@ -534,7 +541,7 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
- PR = "r44"
+ PR = "r45"
SRC_URI = "file://config file://machconfig"
S = "${WORKDIR}"
@@ -543,7 +550,7 @@
INHIBIT_DEFAULT_DEPS = "1"
do_install() {
- # Only install file if it has a contents
+ # Install file only if it has contents
install -d ${D}${sysconfdir}/formfactor/
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
if [ -s "${S}/machconfig" ]; then
@@ -671,7 +678,7 @@
<para>
Use the following form when running the layer management tool.
<literallayout class='monospaced'>
- $ bitbake-layers &lt;command&gt; [arguments]
+ $ bitbake-layers <replaceable>command</replaceable> [<replaceable>arguments</replaceable>]
</literallayout>
The following list describes the available commands:
<itemizedlist>
@@ -738,13 +745,13 @@
...
DESCRIPTION = "A useful utility"
...
- EXTRA_OECONF = "--enable-something"
+ EXTRA_OECONF = "&dash;&dash;enable-something"
...
#### bbappended from meta-anotherlayer ####
DESCRIPTION = "Customized utility"
- EXTRA_OECONF += "--enable-somethingelse"
+ EXTRA_OECONF += "&dash;&dash;enable-somethingelse"
</literallayout>
Ideally, you would tidy up these utilities as
follows:
@@ -752,7 +759,7 @@
...
DESCRIPTION = "Customized utility"
...
- EXTRA_OECONF = "--enable-something --enable-somethingelse"
+ EXTRA_OECONF = "&dash;&dash;enable-something &dash;&dash;enable-somethingelse"
...
</literallayout></para></listitem>
</itemizedlist></para></listitem>
@@ -775,7 +782,7 @@
The default mode of the script's operation is to prompt you for
information needed to generate the layer:
<itemizedlist>
- <listitem><para>The layer priority
+ <listitem><para>The layer priority.
</para></listitem>
<listitem><para>Whether or not to create a sample recipe.
</para></listitem>
@@ -816,7 +823,7 @@
This directory contains the layer's configuration file.
The root name for the file is the same as the root name
your provided for the layer (e.g.
- <filename>&lt;layer&gt;.conf</filename>).
+ <filename><replaceable>layer</replaceable>.conf</filename>).
</para></listitem>
<listitem><para><emphasis>The
<filename>COPYING.MIT</filename> file:</emphasis>
@@ -832,7 +839,7 @@
<para>
If you choose to generate a sample recipe file, the script
prompts you for the name for the recipe and then creates it
- in <filename>&lt;layer&gt;/recipes-example/example/</filename>.
+ in <filename><replaceable>layer</replaceable>/recipes-example/example/</filename>.
The script creates a <filename>.bb</filename> file and a
directory, which contains a sample
<filename>helloworld.c</filename> source file, along with
@@ -844,7 +851,7 @@
<para>
If you choose to generate a sample append file, the script
prompts you for the name for the file and then creates it
- in <filename>&lt;layer&gt;/recipes-example-bbappend/example-bbappend/</filename>.
+ in <filename><replaceable>layer</replaceable>/recipes-example-bbappend/example-bbappend/</filename>.
The script creates a <filename>.bbappend</filename> file and a
directory, which contains a sample patch file.
If you do not provide a recipe name, the script uses
@@ -1221,7 +1228,7 @@
S = "${WORKDIR}/${PN}-${PV}"
- inherit &lt;stuff&gt;
+ inherit <replaceable>stuff</replaceable>
</literallayout>
Modifying this recipe is the recommended method for
creating a new recipe.
@@ -1267,7 +1274,7 @@
When you name your recipe, you need to follow this naming
convention:
<literallayout class='monospaced'>
- &lt;basename&gt;_&lt;version&gt;.bb
+ <replaceable>basename</replaceable>_<replaceable>version</replaceable>.bb
</literallayout>
Use lower-cased characters and do not include the reserved
suffixes <filename>-native</filename>,
@@ -1313,7 +1320,7 @@
<listitem><para><emphasis>Functions:</emphasis>
Functions provide a series of actions to be performed.
You usually use functions to override the default
- implementation of a task function or to compliment
+ implementation of a task function or to complement
a default function (i.e. append or prepend to an
existing function).
Standard functions use <filename>sh</filename> shell
@@ -1325,12 +1332,13 @@
do_install () {
autotools_do_install
install -d ${D}${base_bindir}
- mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+ rmdir ${D}${bindir}/
}
</literallayout>
It is also possible to implement new functions that
are called between existing tasks as long as the
- new functions are not replacing or complimenting the
+ new functions are not replacing or complementing the
default functions.
You can implement functions in Python
instead of shell.
@@ -1386,13 +1394,13 @@
</note>
</para></listitem>
<listitem><para><emphasis>Using Variables: <filename>${...}</filename></emphasis> -
- Use the <filename>${&lt;varname&gt;}</filename> syntax to
+ Use the <filename>${<replaceable>varname</replaceable>}</filename> syntax to
access the contents of a variable:
<literallayout class='monospaced'>
SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
</literallayout>
</para></listitem>
- <listitem><para><emphasis>Quote All Assignments: <filename>"&lt;value&gt;"</filename></emphasis> -
+ <listitem><para><emphasis>Quote All Assignments: <filename>"<replaceable>value</replaceable>"</filename></emphasis> -
Use double quotes around the value in all variable
assignments.
<literallayout class='monospaced'>
@@ -1481,7 +1489,6 @@
Use the <filename>_prepend</filename> operator to
prepend values to existing variables.
This operator does not add any additional space.
- This operator does not add any additional space.
Also, the operator is applied after all the
<filename>+=</filename>, and
<filename>=+</filename> operators have been applied and
@@ -1499,12 +1506,12 @@
only being performed for the specified target or
machine:
<literallayout class='monospaced'>
- CFLAGS_prepend_sh4 = " file://fix-makefile.patch"
+ CFLAGS_prepend_sh4 = "-I${S}/myincludes "
</literallayout>
</para></listitem>
<listitem><para><emphasis>Overrides:</emphasis> -
You can use overrides to set a value conditionally,
- typically on how the recipe is being built.
+ typically based on how the recipe is being built.
For example, to set the
<ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
variable's value to "standard/base" for any target
@@ -1521,7 +1528,7 @@
For example, when setting variables such as
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
and
- <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
that are specific to individual packages produced by
a recipe, you should always use an override that
specifies the name of the package.
@@ -1534,12 +1541,12 @@
Realize that some layers have a policy to use spaces
for all indentation.
</para></listitem>
- <listitem><para><emphasis>Using Python for Complex Operations: <filename>${@&lt;python_code&gt;}</filename></emphasis> -
+ <listitem><para><emphasis>Using Python for Complex Operations: <filename>${@<replaceable>python_code</replaceable>}</filename></emphasis> -
For more advanced processing, it is possible to use
Python code during variable assignments (e.g.
search and replacement on a variable).</para>
<para>You indicate Python code using the
- <filename>${@&lt;python_code&gt;}</filename>
+ <filename>${@<replaceable>python_code</replaceable>}</filename>
syntax for the variable assignment:
<literallayout class='monospaced'>
SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
@@ -1570,7 +1577,7 @@
Creating a new recipe is usually an iterative process that
requires using BitBake to process the recipe multiple times in
order to progressively discover and add information to the
- recipe.
+ recipe file.
</para>
<para>
@@ -1582,34 +1589,35 @@
<link linkend='build-directory'>Build Directory</link>,
use BitBake to process your recipe.
All you need to provide is the
- <filename>&lt;basename&gt;</filename> of the recipe as described
+ <filename><replaceable>basename</replaceable></filename> of the recipe as described
in the previous section:
<literallayout class='monospaced'>
- $ bitbake &lt;basename&gt;
+ $ bitbake <replaceable>basename</replaceable>
</literallayout>
</para>
<para>
During the build, the OpenEmbedded build system creates a
- temporary work directory for the recipe
+ temporary work directory for each recipe
(<filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>)
where it keeps extracted source files, log files, intermediate
compilation and packaging files, and so forth.
</para>
<para>
- The temporary work directory is constructed as follows and
+ The per-recipe temporary work directory is constructed as follows and
depends on several factors:
<literallayout class='monospaced'>
- ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
+ BASE_WORKDIR ?= "${TMPDIR}/work"
+ WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
</literallayout>
As an example, assume a Source Directory top-level folder named
<filename>poky</filename>, a default Build Directory at
<filename>poky/build</filename>, and a
<filename>qemux86-poky-linux</filename> machine target system.
Furthermore, suppose your recipe is named
- <filename>foo_1.3.0-r0.bb</filename>.
+ <filename>foo_1.3.0.bb</filename>.
In this case, the work directory the build system uses to
build the package would be as follows:
<literallayout class='monospaced'>
@@ -1624,7 +1632,7 @@
You can find log files for each task in the recipe's
<filename>temp</filename> directory (e.g.
<filename>poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0/temp</filename>).
- Log files are named <filename>log.&lt;taskname&gt;</filename>
+ Log files are named <filename>log.<replaceable>taskname</replaceable></filename>
(e.g. <filename>log.do_configure</filename>,
<filename>log.do_fetch</filename>, and
<filename>log.do_compile</filename>).
@@ -1680,7 +1688,7 @@
The
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
task uses the prefix of each entry in the
- <filename>SRC_URI</filename> variable value to determine what
+ <filename>SRC_URI</filename> variable value to determine which
fetcher to use to get your source files.
It is the <filename>SRC_URI</filename> variable that triggers
the fetcher.
@@ -1710,7 +1718,7 @@
<para>
Here is a simple example from the
- <filename>meta/recipes-devtools/cdrtools/cdrtools-native_3.01a17.bb</filename>
+ <filename>meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb</filename>
recipe where the source comes from a single tarball.
Notice the use of the
<ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
@@ -1789,18 +1797,36 @@
</para>
<para>
- To find these checksums, you can comment the statements out
- and then attempt to build the software.
- The build will produce an error for each missing checksum
- and as part of the error message provide the correct checksum
- string.
- Once you have the correct checksums, simply copy them into your
- recipe for a subsequent build.
+ Proper values for <filename>md5</filename> and
+ <filename>sha256</filename> checksums might be available
+ with other signatures on the download page for the upstream
+ source (e.g. <filename>md5</filename>,
+ <filename>sha1</filename>, <filename>sha256</filename>,
+ <filename>GPG</filename>, and so forth).
+ Because the OpenEmbedded build system only deals with
+ <filename>sha256sum</filename> and <filename>md5sum</filename>,
+ you should verify all the signatures you find by hand.
+ </para>
+
+ <para>
+ If no <filename>SRC_URI</filename> checksums are specified
+ when you attempt to build the recipe, the build will produce
+ an error for each missing checksum.
+ As part of the error message, the build system provides
+ the checksum string corresponding to the fetched file.
+ Once you have the correct checksums, you can copy and paste
+ them into your recipe and then run the build again to continue.
+ <note>
+ As mentioned, if the upstream source provides signatures
+ for verifying the downloaded source code, you should
+ verify those manually before setting the checksum values
+ in the recipe and continuing with the build.
+ </note>
</para>
<para>
This final example is a bit more complicated and is from the
- <filename>meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.19.bb</filename>
+ <filename>meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb</filename>
recipe.
The example's <filename>SRC_URI</filename> statement identifies
multiple files as the source files for the recipe: a tarball, a
@@ -1820,8 +1846,8 @@
The path is relative to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
variable and searches specific directories in a certain order:
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink><filename>}</filename>,
<filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink><filename>}</filename>,
+ <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink><filename>}</filename>,
and <filename>files</filename>.
The directories are assumed to be subdirectories of the
directory in which the recipe or append file resides.
@@ -1967,6 +1993,12 @@
incorrect md5 strings, attempt to build the software,
and then note the resulting error messages that will
report the correct md5 strings.
+ See the
+ "<link linkend='new-recipe-fetching-code'>Fetching Code</link>"
+ section for additional information.
+ </para>
+
+ <para>
Here is an example that assumes the software has a
<filename>COPYING</filename> file:
<literallayout class='monospaced'>
@@ -2061,7 +2093,7 @@
<filename>configure.ac</filename> file, then your
software is built using Autotools.
If this is the case, you just need to worry about
- tweaking the configuration.</para>
+ modifying the configuration.</para>
<para>When using Autotools, your recipe needs to inherit
the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
@@ -2078,7 +2110,7 @@
<filename>CMakeLists.txt</filename> file, then your
software is built using CMake.
If this is the case, you just need to worry about
- tweaking the configuration.</para>
+ modifying the configuration.</para>
<para>When you use CMake, your recipe needs to inherit
the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
@@ -2110,7 +2142,7 @@
configure script with the appropriate options.</para>
<para>For the case involving a custom configure
script, you would run
- <filename>./configure --help</filename> and look for
+ <filename>./configure &dash;&dash;help</filename> and look for
the options you need to set.</para></listitem>
</itemizedlist>
</para>
@@ -2126,14 +2158,14 @@
that it did not find something that it needed for some
desired optional functionality, then you would need to add
those to <filename>DEPENDS</filename>.
- Looking at the log might also reveal items being checked for
- and/or enabled that you do not want, or items not being found
+ Looking at the log might also reveal items being checked for,
+ enabled, or both that you do not want, or items not being found
that are in <filename>DEPENDS</filename>, in which case
you would need to look at passing extra options to the
configure script as needed.
For reference information on configure options specific to the
software you are building, you can consult the output of the
- <filename>./configure --help</filename> command within
+ <filename>./configure &dash;&dash;help</filename> command within
<filename>${S}</filename> or consult the software's upstream
documentation.
</para>
@@ -2171,7 +2203,12 @@
to an empty string:
<literallayout class='monospaced'>
PARALLEL_MAKE = ""
- </literallayout></para></listitem>
+ </literallayout></para>
+ <para>
+ For information on parallel Makefile issues, see the
+ "<link linkend='debugging-parallel-make-races'>Debugging Parallel Make Races</link>"
+ section.
+ </para></listitem>
<listitem><para><emphasis>Improper host path usage:</emphasis>
This failure applies to recipes building for the target
or <filename>nativesdk</filename> only.
@@ -2261,7 +2298,7 @@
<filename>make install</filename>, you should do this
using a <filename>do_install_append</filename> function
using the install command as described in
- <emphasis>Manual</emphasis> later in this list.
+ the "Manual" bulleted item later in this list.
</para></listitem>
<listitem><para><emphasis>Other (using
<filename>make install</filename>):</emphasis>
@@ -2310,39 +2347,47 @@
files have been installed correctly.
</para>
- <note>
- During the installation process, you might need to modify
- some of the installed files to suit the target layout.
- For example, you might need to replace hard-coded paths in an
- initscript with values of variables provided by the build
- system, such as replacing <filename>/usr/bin/</filename> with
- <filename>${bindir}</filename>.
- If you do perform such modifications during
- <filename>do_install</filename>, be sure to modify the
- destination file after copying rather than before copying.
- Modifying after copying ensures that the build system can
- re-execute <filename>do_install</filename> if needed.
- </note>
-
- <note>
- <filename>oe_runmake install</filename>, which can be run
- directly or can be run indirectly by the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
- and
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
- classes, runs <filename>make install</filename> in parallel.
- Sometimes, a Makefile can have missing dependencies between
- targets that can result in race conditions.
- If you experience intermittent failures during
- <filename>do_install</filename>, you might be able to work
- around them by disabling parallel Makefile installs
- by adding the following to the recipe:
- <literallayout class='monospaced'>
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ During the installation process, you might need to
+ modify some of the installed files to suit the target
+ layout.
+ For example, you might need to replace hard-coded paths
+ in an initscript with values of variables provided by
+ the build system, such as replacing
+ <filename>/usr/bin/</filename> with
+ <filename>${bindir}</filename>.
+ If you do perform such modifications during
+ <filename>do_install</filename>, be sure to modify the
+ destination file after copying rather than before
+ copying.
+ Modifying after copying ensures that the build system
+ can re-execute <filename>do_install</filename> if
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <filename>oe_runmake install</filename>, which can be
+ run directly or can be run indirectly by the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
+ classes, runs <filename>make install</filename> in
+ parallel.
+ Sometimes, a Makefile can have missing dependencies
+ between targets that can result in race conditions.
+ If you experience intermittent failures during
+ <filename>do_install</filename>, you might be able to
+ work around them by disabling parallel Makefile
+ installs by adding the following to the recipe:
+ <literallayout class='monospaced'>
PARALLEL_MAKEINST = ""
- </literallayout>
- See
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
- for additional information.
+ </literallayout>
+ See
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
+ for additional information.
+ </para></listitem>
+ </itemizedlist>
</note>
</section>
@@ -2410,7 +2455,7 @@
needs to inherit the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-systemd'><filename>systemd</filename></ulink>
class.
- See the <filename>systemd.class</filename> file
+ See the <filename>systemd.bbclass</filename> file
located in your
<link linkend='source-directory'>Source Directory</link>.
section for more information.
@@ -2438,7 +2483,9 @@
that files are split up and packaged correctly.
</para></listitem>
<listitem><para><emphasis>Running QA Checks</emphasis>:
- The <filename>insane</filename> class adds a step to
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-insane'><filename>insane</filename></ulink>
+ class adds a step to
the package generation process so that output quality
assurance checks are generated by the OpenEmbedded
build system.
@@ -2502,7 +2549,7 @@
machine or architecture at all (e.g. recipes
that simply package script files or configuration
files), you should use the
- <ulink url='&YOCTO_DOCS_REF_URL;#allarch'><filename>allarch</filename></ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
class to do this for you by adding this to your
recipe:
<literallayout class='monospaced'>
@@ -2511,7 +2558,7 @@
Ensuring that the package architecture is correct is
not critical while you are doing the first few builds
of your recipe.
- However, it is important in order to
+ However, it is important in order
to ensure that your recipe rebuilds (or does not
rebuild) appropriately in response to changes in
configuration, and to ensure that you get the
@@ -2549,7 +2596,7 @@
recommended convention is to set
<ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
within the recipe to
- "&lt;previous version&gt;+&lt;current version&gt;".
+ "<replaceable>previous_version</replaceable>+<replaceable>current_version</replaceable>".
You can use an additional variable so that you can use the
current version elsewhere.
Here is an example:
@@ -2565,7 +2612,7 @@
<para>
Post-installation scripts run immediately after installing
- a package on the target, or during image creation when a
+ a package on the target or during image creation when a
package is included in an image.
To add a post-installation script to a package, add a
<filename>pkg_postinst_PACKAGENAME()</filename> function to
@@ -2582,7 +2629,7 @@
<para>
A post-installation function has the following structure:
<literallayout class='monospaced'>
- pkg_postinst_PACKAGENAME () {
+ pkg_postinst_PACKAGENAME() {
#!/bin/sh -e
# Commands to carry out
}
@@ -2605,7 +2652,7 @@
To delay script execution until boot time, use the following
structure in the post-installation script:
<literallayout class='monospaced'>
- pkg_postinst_PACKAGENAME () {
+ pkg_postinst_PACKAGENAME() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
# Actions to carry out on the device go here
@@ -2668,6 +2715,7 @@
<listitem><para>Using an Autotooled package</para></listitem>
<listitem><para>Using a Makefile-based package</para></listitem>
<listitem><para>Splitting an application into multiple packages</para></listitem>
+ <listitem><para>Adding binaries to an image</para></listitem>
</itemizedlist>
</para>
@@ -2676,7 +2724,7 @@
<para>
Building an application from a single file that is stored
- locally (e.g. under <filename>files/</filename>) requires
+ locally (e.g. under <filename>files</filename>) requires
a recipe that has the file listed in the
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
variable.
@@ -2767,7 +2815,7 @@
If you need additional <filename>make</filename> options, you should store them in the
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'>EXTRA_OEMAKE</ulink></filename>
variable.
- BitBake passes these options into the <filename>make</filename> GNU invocation.
+ BitBake passes these options into the GNU <filename>make</filename> invocation.
Note that a <filename>do_install</filename> task is still required.
Otherwise, BitBake runs an empty <filename>do_install</filename> task by default.
</para>
@@ -2786,33 +2834,36 @@
<para>
In the following example, <filename>mtd-utils</filename> is a makefile-based package:
<literallayout class='monospaced'>
- SUMMARY = "Tools for managing memory technology devices."
+ SUMMARY = "Tools for managing memory technology devices"
SECTION = "base"
DEPENDS = "zlib lzo e2fsprogs util-linux"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
+ file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
- SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=995cfe51b0a3cf32f381c140bf72b21bf91cef1b \
- file://add-exclusion-to-mkfs-jffs2-git-2.patch"
+ # Use the latest version at 26 Oct, 2013
+ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+ SRC_URI = "git://git.infradead.org/mtd-utils.git \
+ file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+ "
- S = "${WORKDIR}/git/"
+ PV = "1.5.1+git${SRCPV}"
- PR = "r1"
+ S = "${WORKDIR}/git/"
- EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' \
- 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
+ EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
do_install () {
- oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
- INCLUDEDIR=${includedir}
- install -d ${D}${includedir}/mtd/
- for f in ${S}/include/mtd/*.h; do
- install -m 0644 $f ${D}${includedir}/mtd/
- done
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
+ PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+
+ FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
+ FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
+ FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+
PARALLEL_MAKE = ""
BBCLASSEXTEND = "native"
@@ -2868,6 +2919,100 @@
does not include the above listed files.
</para>
</section>
+
+ <section id='packaging-externally-produced-binaries'>
+ <title>Packaging Externally Produced Binaries</title>
+
+ <para>
+ Sometimes, you need to add pre-compiled binaries to an
+ image.
+ For example, suppose that binaries for proprietary code
+ exist, which are created by a particular division of a
+ company.
+ Your part of the company needs to use those binaries as
+ part of an image that you are building using the
+ OpenEmbedded build system.
+ Since you only have the binaries and not the source code,
+ you cannot use a typical recipe that expects to fetch the
+ source specified in
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ and then compile it.
+ </para>
+
+ <para>
+ One method is to package the binaries and then install them
+ as part of the image.
+ Generally, it is not a good idea to package binaries
+ since, among other things, it can hinder the ability to
+ reproduce builds and could lead to compatibility problems
+ with ABI in the future.
+ However, sometimes you have no choice.
+ </para>
+
+ <para>
+ The easiest solution is to create a recipe that uses
+ the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-bin-package'><filename>bin_package</filename></ulink>
+ class and to be sure that you are using default locations
+ for build artifacts.
+ In most cases, the <filename>bin_package</filename> class
+ handles "skipping" the configure and compile steps as well
+ as sets things up to grab packages from the appropriate
+ area.
+ In particular, this class sets <filename>noexec</filename>
+ on both the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
+ tasks, sets
+ <filename>FILES_${PN}</filename> to "/" so that it picks
+ up all files, and sets up a
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+ task, which effectively copies all files from
+ <filename>${S}</filename> to <filename>${D}</filename>.
+ The <filename>bin_package</filename> class works well when
+ the files extracted into <filename>${S}</filename> are
+ already laid out in the way they should be laid out
+ on the target.
+ For more information on these variables, see the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>,
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
+ variables in the Yocto Project Reference Manual's variable
+ glossary.
+ </para>
+
+ <para>
+ If you can't use the <filename>bin_package</filename>
+ class, you need to be sure you are doing the following:
+ <itemizedlist>
+ <listitem><para>Create a recipe where the
+ <filename>do_configure</filename> and
+ <filename>do_compile</filename> tasks do nothing:
+ <literallayout class='monospaced'>
+ do_configure[noexec] = "1"
+ do_compile[noexec] = "1"
+ </literallayout>
+ Alternatively, you can make these tasks an empty
+ function.
+ </para></listitem>
+ <listitem><para>Make sure your
+ <filename>do_install</filename> task installs the
+ binaries appropriately.
+ </para></listitem>
+ <listitem><para>Ensure that you set up
+ <filename>FILES</filename> (usually
+ <filename>FILES_${PN}</filename>) to point to the
+ files you have installed, which of course depends
+ on where you have installed them and whether
+ those files are in different locations than the
+ defaults.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
</section>
</section>
@@ -2875,7 +3020,7 @@
<title>Adding a New Machine</title>
<para>
- Adding a new machine to the Yocto Project is a straight forward
+ Adding a new machine to the Yocto Project is a straightforward
process.
This section describes how to add machines that are similar
to those that the Yocto Project already supports.
@@ -2915,12 +3060,13 @@
<para>
The most important variables you must set in your machine
- configuration file are as follows:
+ configuration file or include from a lower-level configuration
+ file are as follows:
<itemizedlist>
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_ARCH'>TARGET_ARCH</ulink></filename>
(e.g. "arm")</para></listitem>
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</ulink>_virtual/kernel</filename>
- (see below)</para></listitem>
+ </para></listitem>
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>MACHINE_FEATURES</ulink></filename>
(e.g. "apm screen wifi")</para></listitem>
</itemizedlist>
@@ -3073,41 +3219,47 @@
variables in the
<filename>meta/conf/bitbake.conf</filename> configuration file define how files installed
by the <filename>do_install</filename> task are packaged.
- By default, the <filename>PACKAGES</filename> variable contains
- <filename>${PN}-staticdev</filename>, which includes all static library files.
+ By default, the <filename>PACKAGES</filename> variable includes
+ <filename>${PN}-staticdev</filename>, which represents all static library files.
<note>
Some previously released versions of the Yocto Project
defined the static library files through
<filename>${PN}-dev</filename>.
</note>
- Following, is part of the BitBake configuration file.
- You can see where the static library files are defined:
+ Following is part of the BitBake configuration file, where
+ you can see how the static library files are defined:
<literallayout class='monospaced'>
- PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-locale"
- PACKAGES_DYNAMIC = "${PN}-locale-*"
+ PACKAGE_BEFORE_PN ?= ""
+ PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
+ PACKAGES_DYNAMIC = "^${PN}-locale-.*"
FILES = ""
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
${sysconfdir} ${sharedstatedir} ${localstatedir} \
${base_bindir}/* ${base_sbindir}/* \
${base_libdir}/*${SOLIBS} \
+ ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
${datadir}/${BPN} ${libdir}/${BPN}/* \
${datadir}/pixmaps ${datadir}/applications \
${datadir}/idl ${datadir}/omf ${datadir}/sounds \
${libdir}/bonobo/servers"
+ FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
+
FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
${datadir}/gnome/help"
SECTION_${PN}-doc = "doc"
- FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
+ FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
+ FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
- ${datadir}/aclocal ${base_libdir}/*.o"
+ ${datadir}/aclocal ${base_libdir}/*.o \
+ ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
SECTION_${PN}-dev = "devel"
ALLOW_EMPTY_${PN}-dev = "1"
RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
- FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a"
+ FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a"
SECTION_${PN}-staticdev = "devel"
RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
</literallayout>
@@ -3137,7 +3289,7 @@
While the Multilib feature is most commonly used for 32 and 64-bit differences,
the approach the build system uses facilitates different target optimizations.
You could compile some binaries to use one set of libraries and other binaries
- to use other different sets of libraries.
+ to use a different set of libraries.
The libraries could differ in architecture, compiler options, or other
optimizations.
</para>
@@ -3196,8 +3348,9 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-RPROVIDES'><filename>RPROVIDES</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>,
- and <filename>PACKAGES_DYNAMIC</filename> are automatically extended by the system.
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>, and
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></ulink>
+ are automatically extended by the system.
If you are extending any manual code in the recipe, you can use the
<filename>${MLPREFIX}</filename> variable to ensure those names are extended
correctly.
@@ -3241,7 +3394,7 @@
</literallayout>
You can also build Multilib packages specifically with a command like this:
<literallayout class='monospaced'>
- $ bitbake lib32-connman
+ $ bitbake lib32-connman
</literallayout>
</para>
</section>
@@ -3315,7 +3468,7 @@
</para>
<para>
- The process is straight forward as long as the libraries use
+ The process is straightforward as long as the libraries use
proper versioning.
With properly versioned libraries, all you need to do to
individually specify the libraries is create separate,
@@ -3348,6 +3501,944 @@
</section>
</section>
+ <section id='creating-partitioned-images'>
+ <title>Creating Partitioned Images</title>
+
+ <para>
+ Creating an image for a particular hardware target using the
+ OpenEmbedded build system does not necessarily mean you can boot
+ that image as is on your device.
+ Physical devices accept and boot images in various ways depending
+ on the specifics of the device.
+ Usually, information about the hardware can tell you what image
+ format the device requires.
+ Should your device require multiple partitions on an SD card, flash,
+ or an HDD, you can use the OpenEmbedded Image Creator,
+ <filename>wic</filename>, to create the properly partitioned image.
+ </para>
+
+ <para>
+ The <filename>wic</filename> command generates partitioned images
+ from existing OpenEmbedded build artifacts.
+ Image generation is driven by partitioning commands contained
+ in an Openembedded kickstart file (<filename>.wks</filename>)
+ specified either directly on the command line or as one of a
+ selection of canned <filename>.wks</filename> files as shown
+ with the <filename>wic list images</filename> command in the
+ "<link linkend='using-a-provided-kickstart_file'>Using an Existing Kickstart File</link>"
+ section.
+ When applied to a given set of build artifacts, the result is an
+ image or set of images that can be directly written onto media and
+ used on a particular system.
+ </para>
+
+ <para>
+ The <filename>wic</filename> command and the infrastructure
+ it is based on is by definition incomplete.
+ Its purpose is to allow the generation of customized images,
+ and as such was designed to be completely extensible through a
+ plugin interface.
+ See the
+ "<link linkend='openembedded-kickstart-plugins'>Plugins</link>"
+ section for information on these plugins.
+ </para>
+
+ <para>
+ This section provides some background information on
+ <filename>wic</filename>, describes what you need to have in
+ place to run the tool, provides instruction on how to use
+ <filename>wic</filename>, and provides several examples.
+ </para>
+
+ <section id='wic-background'>
+ <title>Background</title>
+
+ <para>
+ This section provides some background on the
+ <filename>wic</filename> utility.
+ While none of this information is required to use
+ <filename>wic</filename>, you might find it interesting.
+ <itemizedlist>
+ <listitem><para>
+ The name "wic" is derived from OpenEmbedded
+ Image Creator (oeic).
+ The "oe" diphthong in "oeic" was promoted to the
+ letter "w", because "oeic" is both difficult to remember and
+ pronounce.</para></listitem>
+ <listitem><para>
+ <filename>wic</filename> is loosely based on the
+ Meego Image Creator (<filename>mic</filename>)
+ framework.
+ The <filename>wic</filename> implementation has been
+ heavily modified to make direct use of OpenEmbedded
+ build artifacts instead of package installation and
+ configuration, which are already incorporated within
+ the OpenEmbedded artifacts.</para></listitem>
+ <listitem><para>
+ <filename>wic</filename> is a completely independent
+ standalone utility that initially provides
+ easier-to-use and more flexible replacements for a
+ couple bits of existing functionality in OE Core's
+ <filename>boot-directdisk.bbclass</filename> and
+ <filename>mkefidisk.sh</filename> scripts.
+ The difference between
+ <filename>wic</filename> and those examples is
+ that with <filename>wic</filename> the
+ functionality of those scripts is implemented
+ by a general-purpose partitioning language, which is
+ based on Redhat kickstart syntax.</para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='wic-requirements'>
+ <title>Requirements</title>
+
+ <para>
+ In order to use the <filename>wic</filename> utility
+ with the OpenEmbedded Build system, your system needs
+ to meet the following requirements:
+ <itemizedlist>
+ <listitem><para>The Linux distribution on your
+ development host must support the Yocto Project.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+ section in the Yocto Project Reference Manual for this
+ list of distributions.</para></listitem>
+ <listitem><para>
+ The standard system utilities, such as
+ <filename>cp</filename>, must be installed on your
+ development host system.
+ </para></listitem>
+ <listitem><para>
+ The
+ <ulink url='http://www.gnu.org/software/parted/'>GNU Parted</ulink>
+ package must be installed on your development host
+ system.
+ </para></listitem>
+ <listitem><para>
+ You need to have the build artifacts already
+ available, which typically means that you must
+ have already created an image using the
+ Openembedded build system (e.g.
+ <filename>core-image-minimal</filename>).
+ While it might seem redundant to generate an image in
+ order to create an image using
+ <filename>wic</filename>, the current version of
+ <filename>wic</filename> requires the artifacts
+ in the form generated by the build system.
+ </para></listitem>
+ <listitem><para>
+ You must have sourced one of the build environment
+ setup scripts (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ or
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
+ found in the
+ <link linkend='build-directory'>Build Directory</link>.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='wic-getting-help'>
+ <title>Getting Help</title>
+
+ <para>
+ You can get general help for the <filename>wic</filename>
+ by entering the <filename>wic</filename> command by itself
+ or by entering the command with a help argument as follows:
+ <literallayout class='monospaced'>
+ $ wic -h
+ $ wic &dash;&dash;help
+ </literallayout>
+ </para>
+
+ <para>
+ Currently, <filename>wic</filename> supports two commands:
+ <filename>create</filename> and <filename>list</filename>.
+ You can get help for these commands as follows:
+ <literallayout class='monospaced'>
+ $ wic help <replaceable>command</replaceable>
+ </literallayout>
+ </para>
+
+ <para>
+ You can also get detailed help on a number of topics
+ from the help system.
+ The output of <filename>wic &dash;&dash;help</filename>
+ displays a list of available help
+ topics under a "Help topics" heading.
+ You can have the help system display the help text for
+ a given topic by prefacing the topic with
+ <filename>wic help</filename>:
+ <literallayout class='monospaced'>
+ $ wic help <replaceable>help_topic</replaceable>
+ </literallayout>
+ </para>
+
+ <para>
+ You can find out more about the images
+ <filename>wic</filename> creates using the existing
+ kickstart files with the following form of the command:
+ <literallayout class='monospaced'>
+ $ wic list <replaceable>image</replaceable> help
+ </literallayout>
+ where <filename><replaceable>image</replaceable></filename> is either
+ <filename>directdisk</filename> or
+ <filename>mkefidisk</filename>.
+ </para>
+ </section>
+
+ <section id='operational-modes'>
+ <title>Operational Modes</title>
+
+ <para>
+ You can use <filename>wic</filename> in two different
+ modes, depending on how much control you need for
+ specifying the Openembedded build artifacts that are
+ used for creating the image: Raw and Cooked:
+ <itemizedlist>
+ <listitem><para><emphasis>Raw Mode:</emphasis>
+ You explicitly specify build artifacts through
+ command-line arguments.</para></listitem>
+ <listitem><para><emphasis>Cooked Mode:</emphasis>
+ The current
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ setting and image name are used to automatically locate
+ and provide the build artifacts.</para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Regardless of the mode you use, you need to have the build
+ artifacts ready and available.
+ Additionally, the environment must be set up using the
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ or
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
+ script found in the
+ <link linkend='build-directory'>Build Directory</link>.
+ </para>
+
+ <section id='raw-mode'>
+ <title>Raw Mode</title>
+
+ <para>
+ The general form of the 'wic' command in raw mode is:
+ <literallayout class='monospaced'>
+ $ wic create <replaceable>image_name</replaceable>.wks [<replaceable>options</replaceable>] [...]
+
+ Where:
+
+ <replaceable>image_name</replaceable>.wks
+ An OpenEmbedded kickstart file. You can provide
+ your own custom file or use a file from a set of
+ existing files as described by further options.
+
+ -o <replaceable>OUTDIR</replaceable>, &dash;&dash;outdir=<replaceable>OUTDIR</replaceable>
+ The name of a directory in which to create image.
+
+ -i <replaceable>PROPERTIES_FILE</replaceable>, &dash;&dash;infile=<replaceable>PROPERTIES_FILE</replaceable>
+ The name of a file containing the values for image
+ properties as a JSON file.
+
+ -e <replaceable>IMAGE_NAME</replaceable>, &dash;&dash;image-name=<replaceable>IMAGE_NAME</replaceable>
+ The name of the image from which to use the artifacts
+ (e.g. <filename>core-image-sato</filename>).
+
+ -r <replaceable>ROOTFS_DIR</replaceable>, &dash;&dash;rootfs-dir=<replaceable>ROOTFS_DIR</replaceable>
+ The path to the <filename>/rootfs</filename> directory to use as the
+ <filename>.wks</filename> rootfs source.
+
+ -b <replaceable>BOOTIMG_DIR</replaceable>, &dash;&dash;bootimg-dir=<replaceable>BOOTIMG_DIR</replaceable>
+ The path to the directory containing the boot artifacts
+ (e.g. <filename>/EFI</filename> or <filename>/syslinux</filename>) to use as the <filename>.wks</filename> bootimg
+ source.
+
+ -k <replaceable>KERNEL_DIR</replaceable>, &dash;&dash;kernel-dir=<replaceable>KERNEL_DIR</replaceable>
+ The path to the directory containing the kernel to use
+ in the <filename>.wks</filename> boot image.
+
+ -n <replaceable>NATIVE_SYSROOT</replaceable>, &dash;&dash;native-sysroot=<replaceable>NATIVE_SYSROOT</replaceable>
+ The path to the native sysroot containing the tools to use
+ to build the image.
+
+ -s, &dash;&dash;skip-build-check
+ Skips the build check.
+
+ -D, &dash;&dash;debug
+ Output debug information.
+ </literallayout>
+ <note>
+ You do not need root privileges to run
+ <filename>wic</filename>.
+ In fact, you should not run as root when using the
+ utility.
+ </note>
+ </para>
+ </section>
+
+ <section id='cooked-mode'>
+ <title>Cooked Mode</title>
+
+ <para>
+ The general form of the <filename>wic</filename> command
+ using Cooked Mode is:
+ <literallayout class='monospaced'>
+ $ wic create <replaceable>kickstart_file</replaceable> -e <replaceable>image_name</replaceable>
+
+ Where:
+
+ <replaceable>kickstart_file</replaceable>
+ An OpenEmbedded kickstart file. You can provide your own
+ custom file or supplied file.
+
+ <replaceable>image_name</replaceable>
+ Specifies the image built using the OpenEmbedded build
+ system.
+ </literallayout>
+ This form is the simplest and most user-friendly, as it
+ does not require specifying all individual parameters.
+ All you need to provide is your own
+ <filename>.wks</filename> file or one provided with the
+ release.
+ </para>
+ </section>
+ </section>
+
+ <section id='using-a-provided-kickstart_file'>
+ <title>Using an Existing Kickstart File</title>
+
+ <para>
+ If you do not want to create your own
+ <filename>.wks</filename> file, you can use an existing
+ file provided by the <filename>wic</filename> installation.
+ Use the following command to list the available files:
+ <literallayout class='monospaced'>
+ $ wic list images
+ directdisk Create a 'pcbios' direct disk image
+ mkefidisk Create an EFI disk image
+ </literallayout>
+ When you use an existing file, you do not have to use the
+ <filename>.wks</filename> extension.
+ Here is an example in Raw Mode that uses the
+ <filename>directdisk</filename> file:
+ <literallayout class='monospaced'>
+ $ wic create directdisk -r <replaceable>rootfs_dir</replaceable> -b <replaceable>bootimg_dir</replaceable> \
+ -k <replaceable>kernel_dir</replaceable> -n <replaceable>native_sysroot</replaceable>
+ </literallayout>
+ </para>
+
+ <para>
+ Here are the actual partition language commands
+ used in the <filename>mkefidisk.wks</filename> file to generate
+ an image:
+ <literallayout class='monospaced'>
+ # short-description: Create an EFI disk image
+ # long-description: Creates a partitioned EFI disk image that the user
+ # can directly dd to boot media.
+
+ part /boot --source bootimg-efi --ondisk sda --label msdos --active --align 1024
+
+ part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
+
+ part swap --ondisk sda --size 44 --label swap1 --fstype=swap
+
+ bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='wic-usage-examples'>
+ <title>Examples</title>
+
+ <para>
+ This section provides several examples that show how to use
+ the <filename>wic</filename> utility.
+ All the examples assume the list of requirements in the
+ "<link linkend='wic-requirements'>Requirements</link>" section
+ have been met.
+ The examples assume the previously generated image is
+ <filename>core-image-minimal</filename>.
+ </para>
+
+ <section id='generate-an-image-using-a-provided-kickstart-file'>
+ <title>Generate an Image using an Existing Kickstart File</title>
+
+ <para>
+ This example runs in Cooked Mode and uses the
+ <filename>mkefidisk</filename> kickstart file:
+ <literallayout class='monospaced'>
+ $ wic create mkefidisk -e core-image-minimal
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/mkefidisk-201310230946-sda.direct
+
+ The following build artifacts were used to create the image(s):
+ ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/rootfs
+ BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimg
+ KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
+ NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
+
+
+ The image(s) were created using OE kickstart file:
+ /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
+ </literallayout>
+ This example shows the easiest way to create an image
+ by running in Cooked Mode and using the
+ <filename>-e</filename> option with an existing kickstart
+ file.
+ All that is necessary is to specify the image used to
+ generate the artifacts.
+ Your <filename>local.conf</filename> needs to have the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ variable set to the machine you are using, which is
+ "minnow" in this example.
+ </para>
+
+ <para>
+ The output specifies the exact created as well as where
+ it was created.
+ The output also names the artifacts used and the exact
+ <filename>.wks</filename> script that was used to generate
+ the image.
+ <note>
+ You should always verify the details provided in the
+ output to make sure that the image was indeed created
+ exactly as expected.
+ </note>
+ </para>
+
+ <para>
+ Continuing with the example, you can now directly
+ <filename>dd</filename> the image to a USB stick, or
+ whatever media for which you built your image,
+ and boot the resulting media:
+ <literallayout class='monospaced'>
+ $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct of=/dev/sdb
+ [sudo] password for trz:
+ 182274+0 records in
+ 182274+0 records out
+ 93324288 bytes (93 MB) copied, 14.4777 s, 6.4 MB/s
+ [trz@empanada ~]$ sudo eject /dev/sdb
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='using-a-modified-kickstart-file'>
+ <title>Using a Modified Kickstart File</title>
+
+ <para>
+ Because <filename>wic</filename> image creation is driven
+ by the kickstart file, it is easy to affect image creation
+ by changing the parameters in the file.
+ This next example demonstrates that through modification
+ of the <filename>directdisk</filename> kickstart file.
+ </para>
+
+ <para>
+ As mentioned earlier, you can use the command
+ <filename>wic list images</filename> to show the list
+ of existing kickstart files.
+ The directory in which these files reside is
+ <filename>scripts/lib/image/canned-wks/</filename>
+ located in the
+ <link linkend='source-directory'>Source Directory</link>.
+ Because the available files reside in this directory, you
+ can create and add your own custom files to the directory.
+ Subsequent use of the <filename>wic list images</filename>
+ command would then include your kickstart files.
+ </para>
+
+ <para>
+ In this example, the existing
+ <filename>directdisk</filename> file already does most
+ of what is needed.
+ However, for the hardware in this example, the image will
+ need to boot from <filename>sdb</filename> instead of
+ <filename>sda</filename>, which is what the
+ <filename>directdisk</filename> kickstart file uses.
+ </para>
+
+ <para>
+ The example begins by making a copy of the
+ <filename>directdisk.wks</filename> file in the
+ <filename>scripts/lib/image/canned-wks</filename>
+ directory and then changing the lines that specify the
+ target disk from which to boot.
+ <literallayout class='monospaced'>
+ $ cp /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks \
+ /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
+ </literallayout>
+ Next, the example modifies the
+ <filename>directdisksdb.wks</filename> file and changes all
+ instances of "<filename>&dash;&dash;ondisk sda</filename>"
+ to "<filename>&dash;&dash;ondisk sdb</filename>".
+ The example changes the following two lines and leaves the
+ remaining lines untouched:
+ <literallayout class='monospaced'>
+ part /boot &dash;&dash;source bootimg-pcbios &dash;&dash;ondisk sdb &dash;&dash;label boot &dash;&dash;active &dash;&dash;align 1024
+ part / &dash;&dash;source rootfs &dash;&dash;ondisk sdb &dash;&dash;fstype=ext3 &dash;&dash;label platform &dash;&dash;align 1024
+ </literallayout>
+ Once the lines are changed, the example generates the
+ <filename>directdisksdb</filename> image.
+ The command points the process at the
+ <filename>core-image-minimal</filename> artifacts for the
+ Next Unit of Computing (nuc)
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ the <filename>local.conf</filename>.
+ <literallayout class='monospaced'>
+ $ wic create directdisksdb -e core-image-minimal
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/directdisksdb-201310231131-sdb.direct
+
+ The following build artifacts were used to create the image(s):
+ ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/nuc-poky-linux/core-image-minimal/1.0-r0/rootfs
+ BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/share
+ KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/src/kernel
+ NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
+
+
+ The image(s) were created using OE kickstart file:
+ /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
+ </literallayout>
+ Continuing with the example, you can now directly
+ <filename>dd</filename> the image to a USB stick, or
+ whatever media for which you built your image,
+ and boot the resulting media:
+ <literallayout class='monospaced'>
+ $ sudo dd if=/var/tmp/wic/build/directdisksdb-201310231131-sdb.direct of=/dev/sdb
+ 86018+0 records in
+ 86018+0 records out
+ 44041216 bytes (44 MB) copied, 13.0734 s, 3.4 MB/s
+ [trz@empanada tmp]$ sudo eject /dev/sdb
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='creating-an-image-based-on-core-image-minimal-and-crownbay-noemgd'>
+ <title>Creating an Image Based on <filename>core-image-minimal</filename> and <filename>crownbay-noemgd</filename></title>
+
+ <para>
+ This example creates an image based on
+ <filename>core-image-minimal</filename> and a
+ <filename>crownbay-noemgd</filename>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ that works right out of the box.
+ <literallayout class='monospaced'>
+ $ wic create directdisk -e core-image-minimal
+
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/directdisk-201309252350-sda.direct
+
+ The following build artifacts were used to create the image(s):
+
+ ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
+ BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
+ KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
+ NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
+
+ The image(s) were created using OE kickstart file:
+ /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='using-a-modified-kickstart-file-and-running-in-raw-mode'>
+ <title>Using a Modified Kickstart File and Running in Raw Mode</title>
+
+ <para>
+ This next example manually specifies each build artifact
+ (runs in Raw Mode) and uses a modified kickstart file.
+ The example also uses the <filename>-o</filename> option
+ to cause <filename>wic</filename> to create the output
+ somewhere other than the default
+ <filename>/var/tmp/wic</filename> directory:
+ <literallayout class='monospaced'>
+ $ wic create ~/test.wks -o /home/trz/testwic &dash;&dash;rootfs-dir \
+ /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs \
+ &dash;&dash;bootimg-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share \
+ &dash;&dash;kernel-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel \
+ &dash;&dash;native-sysroot /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /home/trz/testwic/build/test-201309260032-sda.direct
+
+ The following build artifacts were used to create the image(s):
+
+ ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
+ BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
+ KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
+ NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
+
+ The image(s) were created using OE kickstart file:
+ /home/trz/test.wks
+ </literallayout>
+ For this example,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ did not have to be specified in the
+ <filename>local.conf</filename> file since the artifact is
+ manually specified.
+ </para>
+ </section>
+ </section>
+
+ <section id='openembedded-kickstart-plugins'>
+ <title>Plugins</title>
+
+ <para>
+ Plugins allow <filename>wic</filename> functionality to
+ be extended and specialized by users.
+ This section documents the plugin interface, which is
+ currently restricted to source plugins.
+ </para>
+
+ <para>
+ Source plugins provide a mechanism to customize
+ various aspects of the image generation process in
+ <filename>wic</filename>, mainly the contents of
+ partitions.
+ The plugins provide a mechanism for mapping values
+ specified in <filename>.wks</filename> files using the
+ <filename>&dash;&dash;source</filename> keyword to a
+ particular plugin implementation that populates a
+ corresponding partition.
+ </para>
+
+ <para>
+ A source plugin is created as a subclass of
+ <filename>SourcePlugin</filename>.
+ The plugin file containing it is added to
+ <filename>scripts/lib/mic/plugins/source/</filename> to
+ make the plugin implementation available to the
+ <filename>wic</filename> implementation.
+ For more information, see
+ <filename>scripts/lib/mic/pluginbase.py</filename>.
+ </para>
+
+ <para>
+ Source plugins can also be implemented and added by
+ external layers.
+ As such, any plugins found in a
+ <filename>scripts/lib/mic/plugins/source/</filename>
+ directory in an external layer are also made
+ available.
+ </para>
+
+ <para>
+ When the <filename>wic</filename> implementation needs
+ to invoke a partition-specific implementation, it looks
+ for the plugin that has the same name as the
+ <filename>&dash;&dash;source</filename> parameter given to
+ that partition.
+ For example, if the partition is set up as follows:
+ <literallayout class='monospaced'>
+ part /boot &dash;&dash;source bootimg-pcbios ...
+ </literallayout>
+ The methods defined as class members of the plugin
+ having the matching <filename>bootimg-pcbios.name</filename>
+ class member are used.
+ </para>
+
+ <para>
+ To be more concrete, here is the plugin definition that
+ matches a
+ <filename>&dash;&dash;source bootimg-pcbios</filename> usage,
+ along with an example
+ method called by the <filename>wic</filename> implementation
+ when it needs to invoke an implementation-specific
+ partition-preparation function:
+ <literallayout class='monospaced'>
+ class BootimgPcbiosPlugin(SourcePlugin):
+ name = 'bootimg-pcbios'
+
+ @classmethod
+ def do_prepare_partition(self, part, ...)
+ </literallayout>
+ If the subclass itself does not implement a function, a
+ default version in a superclass is located and
+ used, which is why all plugins must be derived from
+ <filename>SourcePlugin</filename>.
+ </para>
+
+ <para>
+ The <filename>SourcePlugin</filename> class defines the
+ following methods, which is the current set of methods
+ that can be implemented or overridden by
+ <filename>&dash;&dash;source</filename> plugins.
+ Any methods not implemented by a
+ <filename>SourcePlugin</filename> subclass inherit the
+ implementations present in the
+ <filename>SourcePlugin</filename> class.
+ For more information, see the
+ <filename>SourcePlugin</filename> source for details:
+ </para>
+
+ <para>
+ <itemizedlist>
+ <listitem><para><emphasis><filename>do_prepare_partition()</filename>:</emphasis>
+ Called to do the actual content population for a
+ partition.
+ In other words, the method prepares the final
+ partition image that is incorporated into the
+ disk image.
+ </para></listitem>
+ <listitem><para><emphasis><filename>do_configure_partition()</filename>:</emphasis>
+ Called before
+ <filename>do_prepare_partition()</filename>.
+ This method is typically used to create custom
+ configuration files for a partition (e.g. syslinux or
+ grub configuration files).
+ </para></listitem>
+ <listitem><para><emphasis><filename>do_install_disk()</filename>:</emphasis>
+ Called after all partitions have been prepared and
+ assembled into a disk image.
+ This method provides a hook to allow finalization of a
+ disk image, (e.g. writing an MBR).
+ </para></listitem>
+ <listitem><para><emphasis><filename>do_stage_partition()</filename>:</emphasis>
+ Special content-staging hook called before
+ <filename>do_prepare_partition()</filename>.
+ This method is normally empty.</para>
+ <para>Typically, a partition just uses the passed-in
+ parameters (e.g. the unmodified value of
+ <filename>bootimg_dir</filename>).
+ However, in some cases things might need to be
+ more tailored.
+ As an example, certain files might additionally
+ need to be taken from
+ <filename>bootimg_dir + /boot</filename>.
+ This hook allows those files to be staged in a
+ customized fashion.
+ <note>
+ <filename>get_bitbake_var()</filename>
+ allows you to access non-standard variables
+ that you might want to use for this.
+ </note>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ This scheme is extensible.
+ Adding more hooks is a simple matter of adding more
+ plugin methods to <filename>SourcePlugin</filename> and
+ derived classes.
+ The code that then needs to call the plugin methods uses
+ <filename>plugin.get_source_plugin_methods()</filename>
+ to find the method or methods needed by the call.
+ Retrieval of those methods is accomplished
+ by filling up a dict with keys
+ containing the method names of interest.
+ On success, these will be filled in with the actual
+ methods.
+ Please see the <filename>wic</filename>
+ implementation for examples and details.
+ </para>
+ </section>
+
+ <section id='openembedded-kickstart-wks-reference'>
+ <title>OpenEmbedded Kickstart (.wks) Reference</title>
+
+ <para>
+ The current <filename>wic</filename> implementation supports
+ only the basic kickstart partitioning commands:
+ <filename>partition</filename> (or <filename>part</filename>
+ for short) and <filename>bootloader</filename>.
+ <note>
+ Future updates will implement more commands and options.
+ If you use anything that is not specifically
+ supported, results can be unpredictable.
+ </note>
+ </para>
+
+ <para>
+ The following is a list of the commands, their syntax,
+ and meanings.
+ The commands are based on the Fedora
+ kickstart versions but with modifications to
+ reflect <filename>wic</filename> capabilities.
+ You can see the original documentation for those commands
+ at the following links:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition'>http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader'>http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader</ulink>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <section id='command-part-or-partition'>
+ <title>Command: part or partition</title>
+
+ <para>
+ This command creates a partition on the system and uses the
+ following syntax:
+ <literallayout class='monospaced'>
+ part <replaceable>mntpoint</replaceable>
+ </literallayout>
+ The <filename><replaceable>mntpoint</replaceable></filename>
+ is where the
+ partition will be mounted and must be of one of the
+ following forms:
+ <itemizedlist>
+ <listitem><para><filename>/<replaceable>path</replaceable></filename>:
+ For example, <filename>/</filename>,
+ <filename>/usr</filename>, and
+ <filename>/home</filename></para></listitem>
+ <listitem><para><filename>swap</filename>:
+ The partition will be used as swap space.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Following are the supported options:
+ <itemizedlist>
+ <listitem><para><emphasis><filename>&dash;&dash;size</filename>:</emphasis>
+ The minimum partition size in MBytes.
+ Specify an integer value such as 500.
+ Do not append the number with "MB".
+ You do not need this option if you use
+ <filename>&dash;&dash;source</filename>.</para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;source</filename>:</emphasis>
+ This option is a
+ <filename>wic</filename>-specific option that
+ names the source of the data that populates
+ the partition.
+ The most common value for this option is
+ "rootfs", but you can use any value that maps to
+ a valid source plugin.
+ For information on the source plugins, see the
+ "<link linkend='openembedded-kickstart-plugins'>Plugins</link>"
+ section.</para>
+ <para>If you use
+ <filename>&dash;&dash;source rootfs</filename>,
+ <filename>wic</filename> creates a partition as
+ large as needed and to fill it with the contents of
+ the root filesystem pointed to by the
+ <filename>-r</filename> command-line option
+ or the equivalent rootfs derived from the
+ <filename>-e</filename> command-line
+ option.
+ The filesystem type used to create the
+ partition is driven by the value of the
+ <filename>&dash;&dash;fstype</filename> option
+ specified for the partition.
+ See the entry on
+ <filename>&dash;&dash;fstype</filename> that
+ follows for more information.
+ </para>
+ <para>If you use
+ <filename>&dash;&dash;source <replaceable>plugin-name</replaceable></filename>,
+ <filename>wic</filename> creates a partition as
+ large as needed and fills it with the contents of
+ the partition that is generated by the
+ specified plugin name using the data pointed
+ to by the <filename>-r</filename> command-line
+ option or the equivalent rootfs derived from the
+ <filename>-e</filename> command-line
+ option.
+ Exactly what those contents and
+ filesystem type end up being are dependent
+ on the given plugin implementation.
+ </para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;ondisk</filename> or <filename>&dash;&dash;ondrive</filename>:</emphasis>
+ Forces the partition to be created on a particular
+ disk.</para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;fstype</filename>:</emphasis>
+ Sets the file system type for the partition.
+ Valid values are:
+ <itemizedlist>
+ <listitem><para><filename>ext4</filename>
+ </para></listitem>
+ <listitem><para><filename>ext3</filename>
+ </para></listitem>
+ <listitem><para><filename>ext2</filename>
+ </para></listitem>
+ <listitem><para><filename>btrfs</filename>
+ </para></listitem>
+ <listitem><para><filename>squashfs</filename>
+ </para></listitem>
+ <listitem><para><filename>swap</filename>
+ </para></listitem>
+ </itemizedlist></para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;fsoptions</filename>:</emphasis>
+ Specifies a free-form string of options to be
+ used when mounting the filesystem.
+ This string will be copied into the
+ <filename>/etc/fstab</filename> file of the
+ installed system and should be enclosed in
+ quotes.
+ If not specified, the default string
+ is "defaults".
+ </para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;label label</filename>:</emphasis>
+ Specifies the label to give to the filesystem to
+ be made on the partition.
+ If the given label is already in use by another
+ filesystem, a new label is created for the
+ partition.</para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;active</filename>:</emphasis>
+ Marks the partition as active.</para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;align (in KBytes)</filename>:</emphasis>
+ This option is a <filename>wic</filename>-specific
+ option that says to start a partition on an
+ x KBytes boundary.</para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='command-bootloader'>
+ <title>Command: bootloader</title>
+
+ <para>
+ This command specifies how the boot loader should be
+ configured and supports the following options:
+ <note>
+ Bootloader functionality and boot partitions are
+ implemented by the various
+ <filename>&dash;&dash;source</filename>
+ plugins that implement bootloader functionality.
+ The bootloader command essentially provides a means of
+ modifying bootloader configuration.
+ </note>
+ <itemizedlist>
+ <listitem><para><emphasis><filename>&dash;&dash;timeout</filename>:</emphasis>
+ Specifies the number of seconds before the
+ bootloader times out and boots the default option.
+ </para></listitem>
+ <listitem><para><emphasis><filename>&dash;&dash;append</filename>:</emphasis>
+ Specifies kernel parameters.
+ These parameters will be added to the syslinux
+ <filename>APPEND</filename> or
+ <filename>grub</filename> kernel command line.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+ </section>
+ </section>
+
<section id='configuring-the-kernel'>
<title>Configuring the Kernel</title>
@@ -3357,7 +4448,7 @@
You can use the <filename>menuconfig</filename> tool and configuration fragments to
make sure your <filename>.config</filename> file is just how you need it.
This section describes how to use <filename>menuconfig</filename>, create and use
- configuration fragments, and how to interactively tweak your <filename>.config</filename>
+ configuration fragments, and how to interactively modify your <filename>.config</filename>
file to create the leanest kernel configuration file possible.
</para>
@@ -4040,7 +5131,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
security problems.
</para></listitem>
<listitem><para>
- Pay particular attention to to the security for
+ Pay particular attention to the security for
any web-based administration interface.
</para>
<para>Web interfaces typically need to perform
@@ -4118,7 +5209,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Use the following line in your
<filename>local.conf</filename> file or in your custom
distribution configuration file to enable the security
- compiler and linker flags to your build:
+ compiler and linker flags for your build:
<literallayout class='monospaced'>
require conf/distro/include/security_flags.inc
</literallayout>
@@ -4133,15 +5224,19 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
OpenEmbedded build system to make your images more secure:
<itemizedlist>
<listitem><para>
- Ensure "debug-tweaks" is not listed with
+ Ensure "debug-tweaks" is not one of your selected
<ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>.
- The default is to enable "debug-tweaks" by adding it
- to
- <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
- in <filename>local.conf</filename>.
- However, you should comment out the variable or be
- sure that it does not have "debug-tweaks" before
- producing your final image.
+ When creating a new project, the default is to provide you
+ with an initial <filename>local.conf</filename> file that
+ enables this feature using the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink> variable with the line:
+ <literallayout class='monospaced'>
+ EXTRA_IMAGE_FEATURES = "debug-tweaks"
+ </literallayout>
+ To disable that feature, simply comment out that line in your
+ <filename>local.conf</filename> file, or
+ make sure <filename>IMAGE_FEATURES</filename> does not contain
+ "debug-tweaks" before producing your final image.
Among other things, leaving this in place sets the
root password as blank, which makes logging in for
debugging or inspection easy during
@@ -4157,8 +5252,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<para>
To set up passwords, use the
- <filename>extrausers</filename> class, which is the
- preferred method.
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-extrausers'><filename>extrausers</filename></ulink>
+ class, which is the preferred method.
For an example on how to set up both root and user
passwords, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-extrausers'><filename>extrausers.bbclass</filename></ulink>"
@@ -4179,8 +5274,11 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para></listitem>
<listitem><para>
Consider enabling a Mandatory Access Control (MAC)
- framework (such as SMACK or SELinux) and tuning it
+ framework such as SMACK or SELinux and tuning it
appropriately for your device's usage.
+ You can find more information in the
+ <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/'><filename>meta-selinux</filename></ulink>
+ layer.
</para></listitem>
</itemizedlist>
</para>
@@ -4609,7 +5707,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
section of the Yocto Project Linux Kernel Development
Manual and the "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
section, which is in this manual.</para></listitem>
- <listitem><para><filename>bitbake -u depexp -g &lt;bitbake_target&gt;</filename>:
+ <listitem><para><filename>bitbake -u depexp -g <replaceable>bitbake_target</replaceable></filename>:
Using the BitBake command with these options brings up
a Dependency Explorer from which you can view file
dependencies.
@@ -4628,7 +5726,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
libraries, and applications.
To change things, you can configure how the packaging happens,
which changes the way you build them.
- You can also tweak the filesystem itself or select a different
+ You can also modify the filesystem itself or select a different
filesystem.
</para>
@@ -4636,7 +5734,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
First, find out what is hogging your root filesystem by running the
<filename>dirsize.py</filename> script from your root directory:
<literallayout class='monospaced'>
- $ cd &lt;root-directory-of-image&gt;
+ $ cd <replaceable>root-directory-of-image</replaceable>
$ dirsize.py 100000 > dirsize-100k.log
$ cat dirsize-100k.log
</literallayout>
@@ -4656,8 +5754,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
One way to see how packages relate to each other is by using
the Dependency Explorer UI with the BitBake command:
<literallayout class='monospaced'>
- $ cd &lt;image-directory&gt;
- $ bitbake -u depexp -g &lt;image&gt;
+ $ cd <replaceable>image-directory</replaceable>
+ $ bitbake -u depexp -g <replaceable>image</replaceable>
</literallayout>
Use the interface to select potential packages you wish to
eliminate and see their dependency relationships.
@@ -4724,7 +5822,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Linux build directory to get an idea of what is making up
the kernel:
<literallayout class='monospaced'>
- $ cd &lt;top-level-linux-build-directory&gt;
+ $ cd <replaceable>top-level-linux-build-directory</replaceable>
$ ksize.py > ksize.log
$ cat ksize.log
</literallayout>
@@ -4875,6 +5973,192 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</section>
</section>
+ <section id='building-images-for-more-than-one-machine'>
+ <title>Building Images for More than One Machine</title>
+
+ <para>
+ A common scenario developers face is creating images for several
+ different machines that use the same software environment.
+ In this situation, it is tempting to set the
+ tunings and optimization flags for each build specifically for
+ the targeted hardware (i.e. "maxing out" the tunings).
+ Doing so can considerably add to build times and package feed
+ maintenance collectively for the machines.
+ For example, selecting tunes that are extremely specific to a
+ CPU core used in a system might enable some micro optimizations
+ in GCC for that particular system but would otherwise not gain
+ you much of a performance difference across the other systems
+ as compared to using a more general tuning across all the builds
+ (e.g. setting
+ <ulink url='var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>
+ specifically for each machine's build).
+ Rather than "max out" each build's tunings, you can take steps that
+ cause the OpenEmbedded build system to reuse software across the
+ various machines where it makes sense.
+ </para>
+ <para>
+ If build speed and package feed maintenance are considerations,
+ you should consider the points in this section that can help you
+ optimize your tunings to best consider build times and package
+ feed maintenance.
+ <itemizedlist>
+ <listitem><para><emphasis>Share the Build Directory:</emphasis>
+ If at all possible, share the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+ across builds.
+ The Yocto Project supports switching between different
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ values in the same <filename>TMPDIR</filename>.
+ This practice is well supported and regularly used by
+ developers when building for multiple machines.
+ When you use the same <filename>TMPDIR</filename> for
+ multiple machine builds, the OpenEmbedded build system can
+ reuse the existing native and often cross-recipes for
+ multiple machines.
+ Thus, build time decreases.
+ <note>
+ If
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
+ settings change or fundamental configuration settings
+ such as the filesystem layout, you need to work with
+ a clean <filename>TMPDIR</filename>.
+ Sharing <filename>TMPDIR</filename> under these
+ circumstances might work but since it is not
+ guaranteed, you should use a clean
+ <filename>TMPDIR</filename>.
+ </note>
+ </para></listitem>
+ <listitem><para><emphasis>Enable the Appropriate Package Architecture:</emphasis>
+ By default, the OpenEmbedded build system enables three
+ levels of package architectures: "all", "tune" or "package",
+ and "machine".
+ Any given recipe usually selects one of these package
+ architectures (types) for its output.
+ Depending for what a given recipe creates packages, making
+ sure you enable the appropriate package architecture can
+ directly impact the build time.</para>
+ <para>A recipe that just generates scripts can enable
+ "all" architecture because there are no binaries to build.
+ To specifically enable "all" architecture, be sure your
+ recipe inherits the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
+ class.
+ This class is useful for "all" architectures because it
+ configures many variables so packages can be used across
+ multiple architectures.</para>
+ <para>If your recipe needs to generate packages that are
+ machine-specific or when one of the build or runtime
+ dependencies is already machine-architecture dependent,
+ which makes your recipe also machine-architecture dependent,
+ make sure your recipe enables the "machine" package
+ architecture through the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>
+ variable:
+ <literallayout class='monospaced'>
+ PACKAGE_ARCH = "${MACHINE_ARCH}"
+ </literallayout>
+ When you do not specifically enable a package
+ architecture through the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
+ The OpenEmbedded build system defaults to the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></ulink>
+ setting:
+ <literallayout class='monospaced'>
+ PACKAGE_ARCH = "${TUNE_PKGARCH}"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Choose a Generic Tuning File if Possible:</emphasis>
+ Some tunes are more generic and can run on multiple targets
+ (e.g. an <filename>armv5</filename> set of packages could
+ run on <filename>armv6</filename> and
+ <filename>armv7</filename> processors in most cases).
+ Similarly, <filename>i486</filename> binaries could work
+ on <filename>i586</filename> and higher processors.
+ You should realize, however, that advances on newer
+ processor versions would not be used.</para>
+ <para>If you select the same tune for several different
+ machines, the OpenEmbedded build system reuses software
+ previously built, thus speeding up the overall build time.
+ Realize that even though a new sysroot for each machine is
+ generated, the software is not recompiled and only one
+ package feed exists.
+ </para></listitem>
+ <listitem><para><emphasis>Manage Granular Level Packaging:</emphasis>
+ Sometimes cases exist where injecting another level
+ of package architecture beyond the three higher levels
+ noted earlier can be useful.
+ For example, consider the <filename>emgd</filename>
+ graphics stack in the
+ <filename>meta-intel</filename> layer.
+ In this layer, a subset of software exists that is
+ compiled against something different from the rest of the
+ generic packages.
+ You can examine the key code in the
+ <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>
+ "daisy" branch in
+ <filename>classes/emgd-gl.bbclass</filename>.
+ For a specific set of packages, the code redefines
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXTRA_ARCHS'><filename>PACKAGE_EXTRA_ARCHS</filename></ulink>
+ is then appended with this extra tune name in
+ <filename>meta-intel-emgd.inc</filename>.
+ The result is that when searching for packages, the
+ build system uses a four-level search and the packages
+ in this new level are preferred as compared to the standard
+ tune.
+ The overall result is that the build system reuses most
+ software from the common tune except for specific cases
+ as needed.
+ </para></listitem>
+ <listitem><para><emphasis>Use Tools to Debug Issues:</emphasis>
+ Sometimes you can run into situations where software is
+ being rebuilt when you think it should not be.
+ For example, the OpenEmbedded build system might not be
+ using shared state between machines when you think it
+ should be.
+ These types of situations are usually due to references
+ to machine-specific variables such as
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLE'><filename>SERIAL_CONSOLE</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>,
+ and so forth in code that is supposed to only be
+ tune-specific or when the recipe depends
+ (<ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-RSUGGESTS'><filename>RSUGGESTS</filename></ulink>,
+ and so forth) on some other recipe that already has
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
+ defined as "${MACHINE_ARCH}".
+ <note>
+ Patches to fix any issues identified are most welcome
+ as these issues occasionally do occur.
+ </note></para>
+ <para>For such cases, you can use some tools to help you
+ sort out the situation:
+ <itemizedlist>
+ <listitem><para><emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis>
+ You can find this tool in the
+ <filename>scripts</filename> directory of the
+ Source Repositories.
+ See the comments in the script for information on
+ how to use the tool.
+ </para></listitem>
+ <listitem><para><emphasis>BitBake's "-S printdiff" Option:</emphasis>
+ Using this option causes BitBake to try to
+ establish the closest signature match it can
+ (e.g. in the shared state cache) and then run
+ <filename>bitbake-diffsigs</filename> over the
+ matches to determine the stamps and delta where
+ these two stamp trees diverge.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<section id='working-with-packages'>
<title>Working with Packages</title>
@@ -5075,7 +6359,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
For this scenario, you need to start the PR Service using
the <filename>bitbake-prserv</filename> command:
<literallayout class='monospaced'>
- bitbake-prserv &dash;&dash;host &lt;ip&gt; &dash;&dash;port &lt;port&gt; &dash;&dash;start
+ bitbake-prserv &dash;&dash;host <replaceable>ip</replaceable> &dash;&dash;port <replaceable>port</replaceable> &dash;&dash;start
</literallayout>
In addition to hand-starting the service, you need to
update the <filename>local.conf</filename> file of each
@@ -5594,7 +6878,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Realize that it is not sufficient to simply do the
following:
<literallayout class='monospaced'>
- $ bitbake &lt;some-package&gt; package-index
+ $ bitbake <replaceable>some-package</replaceable> package-index
</literallayout>
This is because BitBake does not properly schedule the
<filename>package-index</filename> target fully after any
@@ -5614,7 +6898,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
When your build is complete, your packages reside in the
- <filename>${TMPDIR}/deploy/&lt;package-format&gt;</filename>
+ <filename>${TMPDIR}/deploy/<replaceable>package-format</replaceable></filename>
directory.
For example, if <filename>${TMPDIR}</filename>
is <filename>tmp</filename> and your selected package type
@@ -5712,7 +6996,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
If you are using lighttpd, all you need
to do is to provide a link from your
- <filename>${TMPDIR}/deploy/&lt;package-format&gt;</filename>
+ <filename>${TMPDIR}/deploy/<replaceable>package-format</replaceable></filename>
directory to lighttpd's document-root.
You can determine the specifics of your lighttpd
installation by looking through its configuration file,
@@ -5774,9 +7058,9 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Given this example, issue the following commands on the
target:
<literallayout class='monospaced'>
- # smart channel --add all type=rpm-md baseurl=http://server.name/rpm/all
- # smart channel --add i585 type=rpm-md baseurl=http://server.name/rpm/i586
- # smart channel --add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86
+ # smart channel &dash;&dash;add all type=rpm-md baseurl=http://server.name/rpm/all
+ # smart channel &dash;&dash;add i585 type=rpm-md baseurl=http://server.name/rpm/i586
+ # smart channel &dash;&dash;add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86
</literallayout>
Also from the target machine, fetch the repository
information using this command:
@@ -5863,7 +7147,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
a shell script (<filename>run-ptest</filename>) that starts
the test.
The shell script that starts the test must not contain
- the actual test, the script only starts it.
+ the actual test - the script only starts the test.
On the other hand, the test can be anything from a simple
shell script that runs a binary and checks the output to
an elaborate system of test binaries and data files.
@@ -5873,18 +7157,24 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
The test generates output in the format used by
Automake:
<literallayout class='monospaced'>
- &lt;result&gt;: &lt;testname&gt;
+ <replaceable>result</replaceable>: <replaceable>testname</replaceable>
</literallayout>
where the result can be <filename>PASS</filename>,
<filename>FAIL</filename>, or <filename>SKIP</filename>,
and the testname can be any identifying string.
</para>
- <note>
- A recipe is "ptest-enabled" if it inherits the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
- class.
- </note>
+ <para>
+ For a list of Yocto Project recipes that are already
+ enabled with ptest, see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/Ptest'>Ptest</ulink>
+ wiki page.
+ <note>
+ A recipe is "ptest-enabled" if it inherits the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
+ class.
+ </note>
+ </para>
<section id='adding-ptest-to-your-build'>
<title>Adding ptest to Your Build</title>
@@ -5900,21 +7190,12 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
DISTRO_FEATURES_append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
</literallayout>
- <note>
- The OpenEmbedded build system uses the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PTEST_ENABLED'><filename>PTEST_ENABLED</filename></ulink>
- variable to see if it should enable ptests during
- a build.
- This variable is enabled or disabled through your use
- of the <filename>DISTRO_FEATURES</filename> variable.
- You do not set <filename>PTEST_ENABLED</filename>
- directly.
- </note>
Once your build is complete, the ptest files are installed
- into the <filename>/usr/lib/&lt;package&gt;/ptest</filename>
+ into the
+ <filename>/usr/lib/<replaceable>package</replaceable>/ptest</filename>
directory within the image, where
- <filename>&lt;package&gt;</filename> is the name of the
- package.
+ <filename><replaceable>package</replaceable></filename>
+ is the name of the package.
</para>
</section>
@@ -5999,7 +7280,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Consequently, packages that use the unaltered,
patched version of <filename>make check</filename>
automatically cross-compiles.</para>
- <para>However, you still must add a
+ <para>Regardless, you still must add a
<filename>do_compile_ptest</filename> function to
build the test suite.
Add a function similar to the following to your
@@ -6122,7 +7403,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Use the following BitBake command form to fetch all the
necessary sources without starting the build:
<literallayout class='monospaced'>
- $ bitbake -c fetchall &lt;target&gt;
+ $ bitbake -c fetchall <replaceable>target</replaceable>
</literallayout>
This variation of the BitBake command guarantees that you
have all the sources for that BitBake target should you
@@ -6137,8 +7418,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
By default, the OpenEmbedded build system uses the
- <link linkend='build-directory'>Build Directory</link> to
- build source code.
+ <link linkend='build-directory'>Build Directory</link> when
+ building source code.
The build process involves fetching the source files, unpacking
them, and then patching them if necessary before the build takes
place.
@@ -6172,11 +7453,27 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<filename>local.conf</filename> file:
<literallayout class='monospaced'>
INHERIT += "externalsrc"
- EXTERNALSRC_pn-myrecipe = "/some/path/to/your/source/tree"
+ EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
</literallayout>
</para>
<para>
+ This next example shows how to accomplish the same thing by setting
+ <filename>EXTERNALSRC</filename> in the recipe itself or in the
+ recipe's append file:
+ <literallayout class='monospaced'>
+ EXTERNALSRC = "<replaceable>path</replaceable>"
+ EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
+ </literallayout>
+ <note>
+ In order for these settings to take effect, you must globally
+ or locally inherit the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
+ class.
+ </note>
+ </para>
+
+ <para>
By default, <filename>externalsrc.bbclass</filename> builds
the source code in a directory separate from the external source
directory as specified by
@@ -6186,7 +7483,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
to point to that directory:
<literallayout class='monospaced'>
- EXTERNALSRC_BUILD_pn-myrecipe = "/path/to/my/source/tree"
+ EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
</literallayout>
</para>
</section>
@@ -6247,7 +7544,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<title>Using systemd for the Main Image and Using SysVinit for the Rescue Image</title>
<para>
- Set the these variables in your distribution configuration
+ Set these variables in your distribution configuration
file as follows:
<literallayout class='monospaced'>
DISTRO_FEATURES_append = " systemd"
@@ -6291,7 +7588,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Then, you can add the following to your
<filename>local.conf</filename>:
<literallayout class='monospaced'>
- SRCREV_pn-&lt;PN&gt; = "${AUTOREV}"
+ SRCREV_pn-<replaceable>PN</replaceable> = "${AUTOREV}"
</literallayout>
<ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
is the name of the recipe for which you want to enable automatic source
@@ -6496,8 +7793,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<title>Enabling Tests</title>
<para>
- Depending on whether you are planning on running tests using
- QEMU or on running them on the hardware, you have to take
+ Depending on whether you are planning to run tests using
+ QEMU or on the hardware, you have to take
different steps to enable the tests.
See the following subsections for information on how to
enable both types of tests.
@@ -6517,7 +7814,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<listitem><para>Add
<filename>NOPASSWD</filename> for your user
in <filename>/etc/sudoers</filename> either for
- ALL commands or just for
+ all commands or just for
<filename>runqemu-ifup</filename>.
You must provide the full path as that can
change if you are using multiple clones of the
@@ -6559,7 +7856,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
Once you start running the tests, the following happens:
- <itemizedlist>
+ <orderedlist>
<listitem><para>A copy of the root filesystem is written
to <filename>${WORKDIR}/testimage</filename>.
</para></listitem>
@@ -6589,7 +7886,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<filename>unittest</filename> in the task log at
<filename>${WORKDIR}/temp/log.do_testimage</filename>.
</para></listitem>
- </itemizedlist>
+ </orderedlist>
</para>
</section>
@@ -6637,8 +7934,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<filename>TEST_TARGET</filename> to an appropriate value.
For QEMU, you do not have to change anything, the default
value is "QemuTarget".
- For running tests on hardware, two options exist:
- "SimpleRemoteTarget" and "GummibootTarget".
+ For running tests on hardware, the following options exist:
<itemizedlist>
<listitem><para><emphasis>"SimpleRemoteTarget":</emphasis>
Choose "SimpleRemoteTarget" if you are going to
@@ -6665,6 +7961,45 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
"<link linkend='selecting-gummiboottarget'>Selecting GummibootTarget</link>"
section, which follows, for more information.
</para></listitem>
+ <listitem><para><emphasis>"BeagleBoneTarget":</emphasis>
+ Choose "BeagleBoneTarget" if you are deploying
+ images and running tests on the BeagleBone
+ "Black" or original "White" hardware.
+ For information on how to use these tests, see the
+ comments at the top of the BeagleBoneTarget
+ <filename>meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py</filename>
+ file.
+ </para></listitem>
+ <listitem><para><emphasis>"EdgeRouterTarget":</emphasis>
+ Choose "EdgeRouterTarget" is you are deploying
+ images and running tests on the Ubiquiti Networks
+ EdgeRouter Lite.
+ For information on how to use these tests, see the
+ comments at the top of the EdgeRouterTarget
+ <filename>meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py</filename>
+ file.
+ </para></listitem>
+ <listitem><para><emphasis>"GrubTarget":</emphasis>
+ Choose the "supports deploying images and running
+ tests on any generic PC that boots using GRUB.
+ For information on how to use these tests, see the
+ comments at the top of the GrubTarget
+ <filename>meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py</filename>
+ file.
+ </para></listitem>
+ <listitem><para><emphasis>"<replaceable>your-target</replaceable>":</emphasis>
+ Create your own custom target if you want to run
+ tests when you are deploying images and running
+ tests on a custom machine within your BSP layer.
+ To do this, you need to add a Python unit that
+ defines the target class under
+ <filename>lib/oeqa/controllers/</filename> within
+ your layer.
+ You must also provide an empty
+ <filename>__init__.py</filename>.
+ For examples, see files in
+ <filename>meta-yocto-bsp/lib/oeqa/controllers/</filename>.
+ </para></listitem>
</itemizedlist>
</para>
</section>
@@ -6716,7 +8051,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<filename>kmod</filename>).
</para></listitem>
<listitem><para>Uses a custom
- initramfs image with a custom installer.
+ Initial RAM Disk (initramfs) image with a
+ custom installer.
A normal image that you can install usually
creates a single rootfs partition.
This image uses another installer that
@@ -6774,10 +8110,14 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para></listitem>
</orderedlist>
</para>
+ </section>
+
+ <section id='power-control'>
+ <title>Power Control</title>
<para>
- Here is some additional information regarding running
- "GummibootTarget" as your test target:
+ For most hardware targets other than SimpleRemoteTarget,
+ you can control power:
<itemizedlist>
<listitem><para>
You can use
@@ -6796,7 +8136,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
In this example, the expect script does the
following:
<literallayout class='monospaced'>
- ssh test@10.11.12.1 "pyctl nuc1 &lt;arg&gt;"
+ ssh test@10.11.12.1 "pyctl nuc1 <replaceable>arg</replaceable>"
</literallayout>
It then runs a Python script that controls power
for a label called <filename>nuc1</filename>.
@@ -6822,6 +8162,63 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
some manual interaction is okay from time to time.
</para></listitem>
</itemizedlist>
+ If you have no hardware to automatically perform power
+ control but still wish to experiment with automated
+ hardware testing, you can use the dialog-power-control
+ script that shows a dialog prompting you to perform the
+ required power action.
+ This script requires either KDialog or Zenity to be
+ installed.
+ To use this script, set the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></ulink>
+ variable as follows:
+ <literallayout class='monospaced'>
+ TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control"
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='serial-console-connection'>
+ <title>Serial Console Connection</title>
+
+ <para>
+ For test target classes requiring a serial console
+ to interact with the bootloader (e.g. BeagleBoneTarget,
+ EdgeRouterTarget, and GrubTarget), you need to
+ specify a command to use to connect to the serial console
+ of the target machine by using the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></ulink>
+ variable and optionally the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SERIALCONTROL_EXTRA_ARGS'><filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename></ulink>
+ variable.
+ </para>
+
+ <para>
+ These cases could be a serial terminal program if the
+ machine is connected to a local serial port, or a
+ <filename>telnet</filename> or
+ <filename>ssh</filename> command connecting to a remote
+ console server.
+ Regardless of the case, the command simply needs to
+ connect to the serial console and forward that connection
+ to standard input and output as any normal terminal
+ program does.
+ For example, to use the picocom terminal program on
+ serial device <filename>/dev/ttyUSB0</filename>
+ at 115200bps, you would set the variable as follows:
+ <literallayout class='monospaced'>
+ TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
+ </literallayout>
+ For local devices where the serial port device disappears
+ when the device reboots, an additional "serdevtry" wrapper
+ script is provided.
+ To use this wrapper, simply prefix the terminal command
+ with
+ <filename>${COREBASE}/scripts/contrib/serdevtry</filename>:
+ <literallayout class='monospaced'>
+ TEST_SERIALCONTROL_CMD = "${COREBASE}/scripts/contrib/serdevtry picocom -b
+115200 /dev/ttyUSB0"
+ </literallayout>
</para>
</section>
</section>
@@ -6859,7 +8256,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</literallayout>
Next, use BitBake to run the tests:
<literallayout class='monospaced'>
- bitbake -c testimage &lt;image&gt;
+ bitbake -c testimage <replaceable>image</replaceable>
</literallayout></para></listitem>
</itemizedlist>
</para>
@@ -6881,7 +8278,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
in the <filename>local.conf</filename> file as normal.
Be sure that tests reside in
- <filename>&lt;layer&gt;/lib/oeqa/runtime</filename>.
+ <filename><replaceable>layer</replaceable>/lib/oeqa/runtime</filename>.
<note>
Be sure that module names do not collide with module names
used in the default set of test modules in
@@ -6927,7 +8324,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<listitem><para>The default tests for the image are defined
as:
<literallayout class='monospaced'>
- DEFAULT_TEST_SUITES_pn-&lt;image&gt; = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg"
+ DEFAULT_TEST_SUITES_pn-<replaceable>image</replaceable> = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg"
</literallayout></para></listitem>
<listitem><para>Add your own test to the list of the
by using the following:
@@ -6958,7 +8355,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<para>
- If you image is already built, make sure the following are set
+ If your image is already built, make sure the following are set
in your <filename>local.conf</filename> file.
Be sure to provide the IP address you need:
<literallayout class='monospaced'>
@@ -6979,22 +8376,6 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<para>
- The exported data (i.e. <filename>testdata.json</filename>)
- contains paths to the Build Directory.
- Thus, the contents of the directory can be moved
- to another machine as long as you update some paths in the
- JSON.
- Usually you only care about the
- ${DEPLOY_DIR}/rpm directory (assuming the RPM and Smart tests
- are enabled).
- Consequently, running the tests on other machine
- means that you have to move the contents and call
- <filename>runexported</filename> with "--deploy-dir PATH:
- ./runexported.py --deploy-dir /new/path/on/this/machine testdata.json
- runexported.py accepts other arguments as well, see --help.
- </para>
-
- <para>
You can now run the tests outside of the build environment:
<literallayout class='monospaced'>
$ cd tmp/testimage/core-image-sato
@@ -7008,6 +8389,27 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<filename>runexported.py</filename>
</note>
</para>
+
+ <para>
+ The exported data (i.e. <filename>testdata.json</filename>)
+ contains paths to the Build Directory.
+ Thus, the contents of the directory can be moved
+ to another machine as long as you update some paths in the
+ JSON.
+ Usually, you only care about the
+ <filename>${DEPLOY_DIR}/rpm</filename> directory
+ (assuming the RPM and Smart tests are enabled).
+ Consequently, running the tests on other machine
+ means that you have to move the contents and call
+ <filename>runexported.py</filename> with
+ "&dash;&dash;deploy-dir <replaceable>path</replaceable>" as
+ follows:
+ <literallayout class='monospaced'>
+ ./runexported.py &dash;&dash;deploy-dir /new/path/on/this/machine testdata.json
+ </literallayout>
+ <filename>runexported.py</filename> accepts other arguments
+ as well as described using <filename>&dash;&dash;help</filename>.
+ </para>
</section>
<section id="qemu-image-writing-new-tests">
@@ -7018,8 +8420,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
proper place for the build system to find them.
New tests for additional functionality outside of the core
should be added to the layer that adds the functionality, in
- <filename>&lt;layer&gt;/lib/oeqa/runtime</filename> (as
- long as
+ <filename><replaceable>layer</replaceable>/lib/oeqa/runtime</filename>
+ (as long as
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
is extended in the layer's
<filename>layer.conf</filename> file as normal).
@@ -7129,11 +8531,11 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
The command returns a tuple:
(status, output), which are what
their names imply - the return code
- of 'cmd' and whatever output
+ of "cmd" and whatever output
it produces.
The optional timeout argument
represents the number of seconds the
- test should wait for 'cmd' to
+ test should wait for "cmd" to
return.
If the argument is "None", the
test uses the default instance's
@@ -7187,7 +8589,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<tip>
- For best results, install DBG (<filename>-dbg</filename>) packages
+ For best results, install debug (<filename>-dbg</filename>) packages
for the applications you are going to debug.
Doing so makes extra debug symbols available that give you more
meaningful output.
@@ -7217,12 +8619,21 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
as all the heavy debugging is done by the host GDB.
Offloading these processes gives the Gdbserver running on the target a chance to remain
small and fast.
+ <note>
+ By default, source files are part of the
+ <filename>*-dbg</filename> packages in order to enable GDB
+ to show source lines in its output.
+ You can save further space on the target by setting the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></ulink>
+ variable to "debug-without-src" so that these packages do not
+ include the source files.
+ </note>
</para>
<para>
Because the host GDB is responsible for loading the debugging information and
- for doing the necessary processing to make actual debugging happen, the
- user has to make sure the host can access the unstripped binaries complete
+ for doing the necessary processing to make actual debugging happen,
+ you have to make sure the host can access the unstripped binaries complete
with their debugging information and also be sure the target is compiled with no optimizations.
The host GDB must also have local access to all the libraries used by the
debugged program.
@@ -7270,7 +8681,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<para>
- Here is an example that when entered from the host
+ Here is an example, that when entered from the host,
connects to the target and launches Gdbserver in order to
"debug" a binary named <filename>helloworld</filename>:
<literallayout class='monospaced'>
@@ -7321,7 +8732,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</literallayout>
Once the binary is built, you can find it here:
<literallayout class='monospaced'>
- tmp/sysroots/&lt;host-arch&gt;/usr/bin/&lt;target-platform&gt;/&lt;target-abi&gt;-gdb
+ tmp/sysroots/<replaceable>host-arch</replaceable>/usr/bin/<replaceable>target-platform</replaceable>/<replaceable>target-abi</replaceable>-gdb
</literallayout>
</para>
</section>
@@ -7344,12 +8755,12 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
You need to add a statement in the
- <filename>.gdbinit</filename> file that points to your
+ <filename>~/.gdbinit</filename> file that points to your
root filesystem.
Here is an example that points to the root filesystem for
an ARM-based target device:
<literallayout class='monospaced'>
- set sysroot /home/jzhang/sysroot_arm
+ set sysroot ~/sysroot_arm
</literallayout>
</para>
</section>
@@ -7457,7 +8868,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 16
- | make --no-print-directory all-am
+ | make &dash;&dash;no-print-directory all-am
| /bin/mkdir -p include/near
| /bin/mkdir -p include/near
| /bin/mkdir -p include/near
@@ -7498,7 +8909,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
| ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
0.14-r0/neard-0.14/include/dbus.h include/near/dbus.h
| ./src/genbuiltin nfctype1 nfctype2 nfctype3 nfctype4 p2p > src/builtin.h
- | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/
+ | i586-poky-linux-gcc -m32 -march=i586 &dash;&dash;sysroot=/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/
build/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I./include -I./src -I./gdbus -I/home/pokybuild/
yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/usr/include/glib-2.0
-I/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/usr/
@@ -7573,7 +8984,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
Here is some abbreviated, sample output with the
missing dependency clearly visible at the end:
<literallayout class='monospaced'>
- i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/......
+ i586-poky-linux-gcc -m32 -march=i586 &dash;&dash;sysroot=/home/scott-lenovo/......
.
.
.
@@ -7637,7 +9048,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</literallayout>
The final thing you need to do to implement the fix in the
build is to update the "neard" recipe (i.e.
- <filename>neard-0.14.bb</filename> so that the
+ <filename>neard-0.14.bb</filename>) so that the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
statement includes the patch file.
The recipe file is in the folder above the patch.
@@ -7850,19 +9261,20 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
</para>
<note><title>Notes</title>
- <para>
- For information on how to delete information from the Toaster
- database, see the
- <ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Deleting_a_Build_from_the_Toaster_Database'>Deleting a Build from the Toaster Database</ulink>
- wiki page.
- </para>
-
- <para>
- For information on how to set up an instance of Toaster on
- a remote host, see the
- <ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Setting_up_a_Toaster_Instance_on_a_Remote_Host'>Setting Up a Toaster Instance on a Remote Host</ulink>
- wiki page.
- </para>
+ <itemizedlist>
+ <listitem><para>
+ For information on how to delete information from the
+ Toaster database, see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Deleting_a_Build_from_the_Toaster_Database'>Deleting a Build from the Toaster Database</ulink>
+ wiki page.
+ </para></listitem>
+ <listitem><para>
+ For information on how to set up an instance of Toaster
+ on a remote host, see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Setting_up_a_Toaster_Instance_on_a_Remote_Host'>Setting Up a Toaster Instance on a Remote Host</ulink>
+ wiki page.
+ </para></listitem>
+ </itemizedlist>
</note>
</section>
@@ -7932,7 +9344,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
takes place.
You can gain access to the symbols by using "dbg-pkgs" in the
<filename>IMAGE_FEATURES</filename> variable or by
- installing the appropriate DBG (<filename>-dbg</filename>) packages.
+ installing the appropriate debug (<filename>-dbg</filename>)
+ packages.
</para>
<para>
@@ -7966,14 +9379,14 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<para>
<literallayout class='monospaced'>
- # opcontrol --reset
- # opcontrol --start --separate=lib --no-vmlinux -c 5
+ # opcontrol &dash;&dash;reset
+ # opcontrol &dash;&dash;start &dash;&dash;separate=lib &dash;&dash;no-vmlinux -c 5
.
.
[do whatever is being profiled]
.
.
- # opcontrol --stop
+ # opcontrol &dash;&dash;stop
$ opreport -cl
</literallayout>
</para>
@@ -7986,7 +9399,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
five levels deep.
<note>
To profile the kernel, you would specify the
- <filename>--vmlinux=/path/to/vmlinux</filename> option.
+ <filename>&dash;&dash;vmlinux=/path/to/vmlinux</filename> option.
The <filename>vmlinux</filename> file is usually in the source directory in the
<filename>/boot/</filename> directory and must match the running kernel.
</note>
@@ -8049,7 +9462,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
With this connection, you just need to run "oprofile-server" on the device.
By default, OProfile listens on port 4224.
<note>
- You can change the port using the <filename>--port</filename> command-line
+ You can change the port using the <filename>&dash;&dash;port</filename> command-line
option.
</note>
</para>
@@ -8106,8 +9519,8 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
If you wish to perform kernel profiling, you need to be sure
a <filename>vmlinux</filename> file that matches the running kernel is available.
In the source directory, that file is usually located in
- <filename>/boot/vmlinux-KERNELVERSION</filename>, where
- <filename>KERNEL-version</filename> is the version of the kernel.
+ <filename>/boot/vmlinux-<replaceable>kernelversion</replaceable></filename>, where
+ <filename><replaceable>kernelversion</replaceable></filename> is the version of the kernel.
The OpenEmbedded build system generates separate <filename>vmlinux</filename>
packages for each kernel it builds.
Thus, it should just be a question of making sure a matching package is
@@ -8139,14 +9552,14 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
If network access to the target is unavailable, you can generate
an archive for processing in <filename>oprofile-viewer</filename> as follows:
<literallayout class='monospaced'>
- # opcontrol --reset
- # opcontrol --start --separate=lib --no-vmlinux -c 5
+ # opcontrol &dash;&dash;reset
+ # opcontrol &dash;&dash;start &dash;&dash;separate=lib &dash;&dash;no-vmlinux -c 5
.
.
[do whatever is being profiled]
.
.
- # opcontrol --stop
+ # opcontrol &dash;&dash;stop
# oparchive -o my_archive
</literallayout>
</para>
@@ -8209,7 +9622,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
<note>
The Yocto Project generates a license manifest during
image creation that is located
- in <filename>${DEPLOY_DIR}/licenses/&lt;image_name-datestamp&gt;</filename>
+ in <filename>${DEPLOY_DIR}/licenses/<replaceable>image_name-datestamp</replaceable></filename>
to assist with any audits.
</note>
</para>
diff --git a/documentation/dev-manual/dev-manual-customization.xsl b/documentation/dev-manual/dev-manual-customization.xsl
index 470f8bdb48..5dd425c810 100644
--- a/documentation/dev-manual/dev-manual-customization.xsl
+++ b/documentation/dev-manual/dev-manual-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
diff --git a/documentation/dev-manual/dev-manual-intro.xml b/documentation/dev-manual/dev-manual-intro.xml
index f3cf489f5b..21fba29670 100644
--- a/documentation/dev-manual/dev-manual-intro.xml
+++ b/documentation/dev-manual/dev-manual-intro.xml
@@ -39,8 +39,11 @@
<link linkend='metadata'>Metadata</link>.
A good example is Angstrom, which has had a distribution
based on the Yocto Project since its inception.
- Other examples include commercial distributions like
- Wind River Linux, Mentor Embedded Linux, and ENEA Linux.
+ Other examples include commercial distributions like
+ <ulink url='https://www.yoctoproject.org/organization/wind-river-systems'>Wind River Linux</ulink>,
+ <ulink url='https://www.yoctoproject.org/organization/mentor-graphics'>Mentor Embedded Linux</ulink>,
+ <ulink url='https://www.yoctoproject.org/organization/enea-ab'>ENEA Linux</ulink>
+ and <ulink url='https://www.yoctoproject.org/ecosystem/member-organizations'>others</ulink>.
See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
section for more information.
</note>
@@ -64,6 +67,11 @@
generally used during image development for
embedded devices.
</para></listitem>
+ <listitem><para>Information on using the Yocto Project
+ integration of the QuickEMUlator (QEMU), which lets you
+ simulate running on hardware an image you have built using
+ the OpenEmbedded build system.
+ </para></listitem>
<listitem><para>Many references to other sources of related
information.</para></listitem>
</itemizedlist>
@@ -104,12 +112,16 @@
<itemizedlist>
<listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
</emphasis> The home page for the Yocto Project provides lots of information on the project
- as well as links to software and documentation.</para></listitem>
+ as well as links to software and documentation.
+ </para></listitem>
<listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:</emphasis> This short document lets you get started
- with the Yocto Project and quickly begin building an image.</para></listitem>
+ <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:</emphasis>
+ This short document lets you get started
+ with the Yocto Project and quickly begin building an image.
+ </para></listitem>
<listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
+ <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:</emphasis>
+ This manual is a reference
guide to the OpenEmbedded build system, which is based on BitBake.
The build system is sometimes referred to as "Poky".
</para></listitem>
@@ -117,11 +129,13 @@
<ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>:</emphasis>
This guide provides information that lets you get going with the Application
Development Toolkit (ADT) and stand-alone cross-development toolchains to
- develop projects using the Yocto Project.</para></listitem>
+ develop projects using the Yocto Project.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
This guide defines the structure for BSP components.
- Having a commonly understood structure encourages standardization.</para></listitem>
+ Having a commonly understood structure encourages standardization.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>:</emphasis>
This manual describes how to work with Linux Yocto kernels as well as provides a bit
@@ -134,23 +148,34 @@
</para></listitem>
<listitem><para><emphasis>
<ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
- Eclipse IDE Yocto Plug-in</ulink>:</emphasis> A step-by-step instructional video that
+ Eclipse IDE Yocto Plug-in</ulink>:</emphasis>
+ A step-by-step instructional video that
demonstrates how an application developer uses Yocto Plug-in features within
- the Eclipse IDE.</para></listitem>
+ the Eclipse IDE.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:</emphasis>
- A list of commonly asked questions and their answers.</para></listitem>
+ A list of commonly asked questions and their answers.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>:</emphasis>
Features, updates and known issues for the current
- release of the Yocto Project.</para></listitem>
+ release of the Yocto Project.
+ </para></listitem>
<listitem><para><emphasis>
- <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>
- Hob</ulink>:</emphasis> A graphical user interface for BitBake.
- Hob's primary goal is to enable a user to perform common tasks more easily.</para></listitem>
+ <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>:</emphasis>
+ A graphical user interface for BitBake.
+ Hob's primary goal is to enable a user to perform common tasks more easily.
+ </para></listitem>
<listitem><para><emphasis>
- <ulink url='&YOCTO_HOME_URL;/download/build-appliance-0'>
- Build Appliance</ulink>:</emphasis> A virtual machine that
+ <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/toaster'>Toaster</ulink>:</emphasis>
+ An Application Programming Interface (API) and web-based
+ interface to the OpenEmbedded build system, which uses
+ BitBake, that reports build information.
+ </para></listitem>
+ <listitem><para><emphasis>
+ <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/build-appliance'>Build Appliance</ulink>:</emphasis>
+ A virtual machine that
enables you to build and boot a custom embedded Linux image
with the Yocto Project using a non-Linux development system.
</para></listitem>
@@ -158,46 +183,54 @@
<ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
The bug tracking application the Yocto Project uses.
If you find problems with the Yocto Project, you should report them using this
- application.</para></listitem>
- <listitem><para><emphasis>
- Yocto Project Mailing Lists:</emphasis> To subscribe to the Yocto Project mailing
+ application.
+ </para></listitem>
+ <listitem><para><emphasis>Yocto Project Mailing Lists:</emphasis>
+ To subscribe to the Yocto Project mailing
lists, click on the following URLs and follow the instructions:
<itemizedlist>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> for a
- Yocto Project Discussions mailing list.</para></listitem>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> for a
- Yocto Project Discussions mailing list about the
+ <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink>
+ for a Yocto Project Discussions mailing list.
+ </para></listitem>
+ <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink>
+ for a Yocto Project Discussions mailing list about the
OpenEmbedded build system (Poky).
</para></listitem>
<listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink>
for a mailing list to receive official Yocto Project announcements
- as well as Yocto Project milestones.</para></listitem>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo'></ulink> for a
- listing of all public mailing lists on <filename>lists.yoctoproject.org</filename>.
+ as well as Yocto Project milestones.
+ </para></listitem>
+ <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo'></ulink>
+ for a listing of all public mailing lists on
+ <filename>lists.yoctoproject.org</filename>.
</para></listitem>
</itemizedlist></para></listitem>
<listitem><para><emphasis>Internet Relay Chat (IRC):</emphasis>
Two IRC channels on freenode are available
for Yocto Project and Poky discussions: <filename>#yocto</filename> and
- <filename>#poky</filename>, respectively.</para></listitem>
+ <filename>#poky</filename>, respectively.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
The build system used by the Yocto Project.
This project is the upstream, generic, embedded distribution
from which the Yocto Project derives its build system (Poky)
- and to which it contributes.</para></listitem>
+ and to which it contributes.
+ </para></listitem>
<listitem><para><emphasis>
- <ulink url='http://developer.berlios.de/projects/bitbake/'>
- BitBake</ulink>:</emphasis> The tool used by the OpenEmbedded build system
- to process project metadata.</para></listitem>
+ <ulink url='http://www.openembedded.org/wiki/BitBake'>BitBake</ulink>:</emphasis>
+ The tool used by the OpenEmbedded build system
+ to process project metadata.
+ </para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual:</ulink></emphasis>
A comprehensive guide to the BitBake tool.
If you want information on BitBake, see this manual.
</para></listitem>
<listitem><para><emphasis>
- <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
- </emphasis> An open-source machine emulator and virtualizer.</para></listitem>
+ <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:</emphasis>
+ An open-source machine emulator and virtualizer.
+ </para></listitem>
</itemizedlist>
</para>
</section>
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index a05a5559f1..43c31b8405 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -70,7 +70,7 @@
<title>Developing a Board Support Package (BSP)</title>
<para>
- A BSP is a package of recipes that, when applied during a build, results in
+ A BSP is a collection of recipes that, when applied during a build, results in
an image that you can run on a particular board.
Thus, the package when compiled into the new image, supports the operation of the board.
</para>
@@ -156,15 +156,21 @@
Yocto Project Board Support Package (BSP) Developer's Guide.</para>
<note>Five BSPs exist that are part of the
Yocto Project release: <filename>genericx86</filename>, <filename>genericx86-64</filename>,
- <filename>beaglebone</filename>,
- <filename>mpc8315e</filename>, and <filename>edgerouter</filename>.
+ <filename>beaglebone</filename> (ARM),
+ <filename>mpc8315e</filename> (PowerPC),
+ and <filename>edgerouter</filename> (MIPS).
The recipes and configurations for these five BSPs are located and dispersed
within the <link linkend='source-directory'>Source Directory</link>.
- On the other hand, BSP layers for Crown Bay,
+ On the other hand, the <filename>meta-intel</filename> layer
+ contains BSP layers for many supported BSPs (e.g.
Crystal Forest, Emenlow, Fish River Island 2, Haswell,
- Jasper Forest, NUC DC3217IYE,
- Romley, Sugar Bay, and tlk exist in their own separate layers
- within the larger <filename>meta-intel</filename> layer.</note>
+ Jasper Forest, and so forth).
+ Aside from the BSPs in the <filename>meta-intel</filename>
+ layer, the
+ <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
+ contain additional BSP layers such as
+ <filename>meta-minnow</filename> and
+ <filename>meta-raspberrypi</filename>.</note>
<para>When you set up a layer for a new BSP, you should follow a standard layout.
This layout is described in the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
@@ -273,20 +279,35 @@
Within this group, you will find several kernels supported by
the Yocto Project:
<itemizedlist>
- <listitem><para><emphasis><filename>linux-yocto-3.4</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto Project Release 1.3. This kernel
- is based on the Linux 3.4 released kernel.</para></listitem>
- <listitem><para><emphasis><filename>linux-yocto-3.8</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto Project Release 1.4. This kernel
- is based on the Linux 3.8 released kernel.</para></listitem>
- <listitem><para><emphasis><filename>linux-yocto-3.10</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto Project Release 1.5. This kernel
- is based on the Linux 3.10 released kernel.</para></listitem>
- <listitem><para><emphasis><filename>linux-yocto-3.14</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto Project Release 1.6. This kernel
- is based on the Linux 3.14 released kernel.</para></listitem>
- <listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
- kernel based on the latest upstream release candidate available.</para></listitem>
+ <listitem><para><emphasis>
+ <filename>linux-yocto-3.8</filename></emphasis> - The
+ stable Yocto Project kernel to use with the Yocto
+ Project Release 1.4. This kernel is based on the
+ Linux 3.8 released kernel.
+ </para></listitem>
+ <listitem><para><emphasis>
+ <filename>linux-yocto-3.10</filename></emphasis> - The
+ stable Yocto Project kernel to use with the Yocto
+ Project Release 1.5.
+ This kernel is based on the Linux 3.10 released kernel.
+ </para></listitem>
+ <listitem><para><emphasis>
+ <filename>linux-yocto-3.14</filename></emphasis> - The
+ stable Yocto Project kernel to use with the Yocto
+ Project Releases 1.6 and 1.7.
+ This kernel is based on the Linux 3.14 released kernel.
+ </para></listitem>
+ <listitem><para><emphasis>
+ <filename>linux-yocto-3.17</filename></emphasis> - An
+ additional Yocto Project kernel used with the Yocto
+ Project Release 1.7.
+ This kernel is based on the Linux 3.17 released kernel.
+ </para></listitem>
+ <listitem><para><emphasis>
+ <filename>linux-yocto-dev</filename></emphasis> - A
+ development kernel based on the latest upstream release
+ candidate available.
+ </para></listitem>
</itemizedlist>
</para>
@@ -310,7 +331,7 @@
kernel.
Thus, everything further to the right in the structure is based on the
<filename>linux-yocto-3.4</filename> kernel.
- Branch points to right in the figure represent where the
+ Branch points to the right in the figure represent where the
<filename>linux-yocto-3.4</filename> kernel is modified for specific hardware
or types of kernels, such as real-time kernels.
Each leaf thus represents the end-point for a kernel designed to run on a specific
@@ -602,7 +623,11 @@
QEMU through the project's preferences.
If you are not using the Eclipse IDE, then you need to deploy the application
to the hardware using other methods.
- Or, if you are using QEMU, you need to use that tool and load your image in for testing.
+ Or, if you are using QEMU, you need to use that tool and
+ load your image in for testing.
+ See the
+ "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
+ chapter for information on using QEMU.
</para></listitem>
<listitem><para><emphasis>Test and debug the application</emphasis>:
Once your application is deployed, you need to test it.
@@ -1075,7 +1100,7 @@
<filename>Build system derived toolchain</filename>,
the target kernel you built will be located in
the Build Directory in
- <filename>tmp/deploy/images/&lt;machine&gt;</filename>
+ <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
directory.
If you selected
<filename>Standalone pre-built toolchain</filename>,
@@ -1243,6 +1268,11 @@
<para>
To start the QEMU emulator from within Eclipse, follow these
steps:
+ <note>
+ See the
+ "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
+ chapter for more information on using QEMU.
+ </note>
<orderedlist>
<listitem><para>Expose and select "External Tools" from
the "Run" menu.
@@ -1483,7 +1513,7 @@
Project Location.
The Yocto project's Metadata files will be put under
the directory
- <filename>&lt;project_location&gt;/&lt;project_name&gt;</filename>.
+ <filename><replaceable>project_location</replaceable>/<replaceable>project_name</replaceable></filename>.
If that directory does not exist, you need to check
the "Clone from Yocto Git Repository" box, which
would execute a <filename>git clone</filename>
@@ -1626,7 +1656,11 @@
If you need to separately install and use the QEMU
emulator, you can go to
<ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
- to download and learn about the emulator.</para></listitem>
+ to download and learn about the emulator.
+ You can see the
+ "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
+ chapter for information on using QEMU within the Yocto
+ Project.</para></listitem>
</orderedlist>
</para>
</section>
@@ -1713,7 +1747,7 @@
<filename>qemux86-poky-linux</filename> machine target
system.
Furthermore, suppose your recipe is named
- <filename>foo_1.3.0-r0.bb</filename>.
+ <filename>foo_1.3.0.bb</filename>.
In this case, the work directory the build system uses to
build the package would be as follows:
<literallayout class='monospaced'>
@@ -1777,7 +1811,7 @@
<filename>do_compile</filename> task as shown in the
following example:
<literallayout class='monospaced'>
- $ bitbake -c compile -f &lt;name_of_package&gt;
+ $ bitbake -c compile -f <replaceable>name_of_package</replaceable>
</literallayout>
The <filename>-f</filename> or <filename>--force</filename>
option forces the specified task to execute.
@@ -1789,9 +1823,9 @@
or
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
tasks using BitBake (i.e.
- <filename>bitbake -c clean &lt;name_of_package&gt;</filename>
+ <filename>bitbake -c clean <replaceable>name_of_package</replaceable></filename>
and
- <filename>bitbake -c cleanall &lt;name_of_package&gt;</filename>).
+ <filename>bitbake -c cleanall <replaceable>name_of_package</replaceable></filename>).
Modifications will also disappear if you use the <filename>rm_work</filename>
feature as described in the
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
@@ -1882,7 +1916,7 @@
<filename>do_compile</filename> task as shown in the
following example:
<literallayout class='monospaced'>
- $ bitbake -c compile -f &lt;name_of_package&gt;
+ $ bitbake -c compile -f <replaceable>name_of_package</replaceable>
</literallayout>
The <filename>-f</filename> or <filename>--force</filename>
option forces the specified task to execute.
@@ -1916,11 +1950,11 @@
Once you have committed the files, you can use the <filename>git log</filename>
command to see your changes:
<literallayout class='monospaced'>
- $ git commit -m "&lt;commit-summary-message&gt;"
+ $ git commit -m "<replaceable>commit-summary-message</replaceable>"
$ git log
</literallayout>
<note>The name of the patch file created in the next step is based on your
- <filename>commit-summary-message</filename>.</note></para></listitem>
+ <replaceable>commit-summary-message</replaceable>.</note></para></listitem>
<listitem><para><emphasis>Generate the Patch:</emphasis>
Once the changes are committed, use the <filename>git format-patch</filename>
command to generate a patch file:
@@ -1947,7 +1981,7 @@
of the recipe.
Here is an example:
<literallayout class='monospaced'>
- SRC_URI += "file://0001-&lt;commit-summary-message&gt;.patch"
+ SRC_URI += "file://0001-<replaceable>commit-summary-message</replaceable>.patch"
</literallayout></para></listitem>
<listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
Finally, don't forget to 'bump' the
diff --git a/documentation/dev-manual/dev-manual-newbie.xml b/documentation/dev-manual/dev-manual-newbie.xml
index 434a7d15a5..3208bf8d99 100644
--- a/documentation/dev-manual/dev-manual-newbie.xml
+++ b/documentation/dev-manual/dev-manual-newbie.xml
@@ -41,7 +41,7 @@
</para>
<para>
- A benchmark example of an open source project is the Linux Kernel, which was initially conceived
+ A benchmark example of an open source project is the Linux kernel, which was initially conceived
and created by Finnish computer science student Linus Torvalds in 1991.
Conversely, a good example of a non-open source project is the
<trademark class='registered'>Windows</trademark> family of operating
@@ -443,7 +443,7 @@
</para></listitem>
<listitem><para>
Be sure to always work in matching branches for both
- the <filename>meta-intel</filename> repository and the
+ the selected BSP repository and the
<link linkend='source-directory'>Source Directory</link>
(i.e. <filename>poky</filename>) repository.
For example, if you have checked out the "master" branch
@@ -508,9 +508,14 @@
The filenames can differ only in the file type suffix used (e.g.
<filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>).
</para>
- <para>Information in append files overrides the information in the similarly-named recipe file.
+ <para>Information in append files extends or overrides the
+ information in the similarly-named recipe file.
For an example of an append file in use, see the
"<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section.
+ <note>
+ Append files can also use wildcard patterns in their version numbers
+ so they can be applied to more than one version of the underlying recipe file.
+ </note>
</para></listitem>
<listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis>
The task executor and scheduler used by the OpenEmbedded build
@@ -656,8 +661,8 @@
Application Developer's Guide</ulink>.
</para></listitem>
<listitem><para><emphasis>Image:</emphasis>
- An image is the result produced when BitBake processes a given
- collection of recipes and related Metadata.
+ An image is an artifact of the BitBake build process given
+ a collection of recipes and related Metadata.
Images are the binary output that run on specific hardware or
QEMU and are used for specific use-cases.
For a list of the supported image types that the Yocto Project provides, see the
@@ -665,7 +670,7 @@
chapter in the Yocto Project Reference Manual.</para></listitem>
<listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core,
a BSP, or an application stack.
- For a discussion on BSP Layers, see the
+ For a discussion specifically on BSP Layers, see the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
section in the Yocto Project Board Support Packages (BSP)
Developer's Guide.</para></listitem>
@@ -686,7 +691,7 @@
This Metadata is found in the <filename>meta</filename> directory of the
<link linkend='source-directory'>Source Directory</link>.</para></listitem>
<listitem><para><emphasis>Package:</emphasis>
- In the context of the Yocto Project, this term refers a
+ In the context of the Yocto Project, this term refers to a
recipe's packaged output produced by BitBake (i.e. a
"baked recipe").
A package is generally the compiled binaries produced from the
@@ -695,7 +700,7 @@
<para>It is worth noting that the term "package" can, in general, have subtle
meanings. For example, the packages referred to in the
"<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are
- compiled binaries that when installed add functionality to your Linux
+ compiled binaries that, when installed, add functionality to your Linux
distribution.</para>
<para>Another point worth noting is that historically within the Yocto Project,
recipes were referred to as packages - thus, the existence of several BitBake
@@ -729,12 +734,11 @@
the Yocto Project.</para></listitem>
<listitem><para><emphasis>Recipe:</emphasis>
A set of instructions for building packages.
- A recipe describes where you get source code and which patches
- to apply.
- Recipes describe dependencies for libraries or for other
- recipes, and they also contain configuration and compilation
- options.
- Recipes contain the logical unit of execution, the software
+ A recipe describes where you get source code, which patches
+ to apply, how to configure the source, how to compile it and so on.
+ Recipes also describe dependencies for libraries or for other
+ recipes.
+ Recipes represent the logical unit of execution, the software
to build, the images to build, and use the
<filename>.bb</filename> file extension.
</para></listitem>
@@ -774,7 +778,7 @@
folder is also named "poky".</para>
<para>While it is not recommended that you use tarball expansion
- to setup the Source Directory, if you do, the top-level
+ to set up the Source Directory, if you do, the top-level
directory name of the Source Directory is derived from the
Yocto Project release tarball.
For example, downloading and unpacking
@@ -840,7 +844,7 @@
license is distributed with that software.
MIT is also compatible with the GNU General Public License (GPL).
Patches to the Yocto Project follow the upstream licensing scheme.
- You can find information on the MIT license at
+ You can find information on the MIT license
<ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>
here</ulink>.
@@ -972,7 +976,7 @@
Each of these branches represents a specific area of development.
The <filename>master</filename> branch represents the current or most recent
development.
- All other branches represent off-shoots of the <filename>master</filename>
+ All other branches represent offshoots of the <filename>master</filename>
branch.
</para>
@@ -1024,9 +1028,10 @@
</para>
<para>
- Some key tags are <filename>dylan-9.0.0</filename>,
- <filename>dora-10.0.0</filename>,
- and <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
+ Some key tags are <filename>dylan-9.0.4</filename>,
+ <filename>dora-10.0.4</filename>, <filename>daisy-11.0.2</filename>,
+ <filename>dizzy-12.0.0</filename>, and
+ <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
These tags represent Yocto Project releases.
</para>
@@ -1070,7 +1075,9 @@
A good place to look for instruction on a minimal set of Git commands is
<ulink url='http://git-scm.com/documentation'>here</ulink>.
If you need to download Git, you can do so
- <ulink url='http://git-scm.com/download'>here</ulink>.
+ <ulink url='http://git-scm.com/download'>here</ulink>, although
+ any reasonably current Linux distribution should already have an
+ installable package for Git.
</para>
<para>
@@ -1171,10 +1178,10 @@
For the Yocto Project, a key individual called the "maintainer" is responsible for the "master"
branch of a given Git repository.
The "master" branch is the “upstream†repository where the final builds of the project occur.
- The maintainer is responsible for allowing changes in from other developers and for
+ The maintainer is responsible for accepting changes from other developers and for
organizing the underlying branch structure to reflect release strategies and so forth.
- <note>For information on finding out who is responsible (maintains)
- for a particular area of code, see the
+ <note>For information on finding out who is responsible for (maintains)
+ a particular area of code, see the
"<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
section.
</note>
@@ -1328,9 +1335,9 @@
a bug.</para></listitem>
<listitem><para>When submitting a new bug, be sure to choose the appropriate
Classification, Product, and Component for which the issue was found.
- Defects for the Yocto Project fall into one of six classifications: Yocto Project
- Components, Infrastructure, Build System &amp; Metadata, Documentation,
- QA/Testing, and Runtime.
+ Defects for the Yocto Project fall into one of seven classifications:
+ Yocto Project Components, Infrastructure, Build System &amp; Metadata,
+ Documentation, QA/Testing, Runtime and Hardware.
Each of these Classifications break down into multiple Products and, in some
cases, multiple Components.</para></listitem>
<listitem><para>Use the bug form to choose the correct Hardware and Architecture
@@ -1397,7 +1404,7 @@
following command to bring up a short list of all commits
against a specific file:
<literallayout class='monospaced'>
- git shortlog -- &lt;filename&gt;
+ git shortlog -- <replaceable>filename</replaceable>
</literallayout>
Just provide the name of the file for which you are interested.
The information returned is not ordered by history but does
@@ -1517,12 +1524,12 @@
bug references - any commit that addresses a specific bug should
use the following form for the detailed description:
<literallayout class='monospaced'>
- Fixes [YOCTO #&lt;bug-id&gt;]
+ Fixes [YOCTO #<replaceable>bug-id</replaceable>]
- &lt;detailed description of change&gt;
+ <replaceable>detailed description of change</replaceable>
</literallayout></para></listitem>
- Where &lt;bug-id&gt; is replaced with the specific bug ID from
- the Yocto Project Bugzilla instance.
+ Where <replaceable>bug-id</replaceable> is replaced with the
+ specific bug ID from the Yocto Project Bugzilla instance.
</itemizedlist>
</para>
diff --git a/documentation/dev-manual/dev-manual-qemu.xml b/documentation/dev-manual/dev-manual-qemu.xml
new file mode 100644
index 0000000000..739fd7104b
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-qemu.xml
@@ -0,0 +1,419 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='dev-manual-qemu'>
+
+<title>Using the Quick EMUlator (QEMU)</title>
+
+<para>
+ Quick EMUlator (QEMU) is an Open Source project the Yocto Project uses
+ as part of its development "tool set".
+ As such, the information in this chapter is limited to the
+ Yocto Project integration of QEMU and not QEMU in general.
+ For official information and documentation on QEMU, see the
+ following references:
+ <itemizedlist>
+ <listitem><para><emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
+ The official website for the QEMU Open Source project.
+ </para></listitem>
+ <listitem><para><emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
+ The QEMU user manual.
+ </para></listitem>
+ </itemizedlist>
+</para>
+
+<para>
+ This chapter provides an overview of the Yocto Project's integration of
+ QEMU, a description of how you use QEMU and its various options, running
+ under a Network File System (NFS) server, and a few tips and tricks you
+ might find helpful when using QEMU.
+</para>
+
+<section id='qemu-overview'>
+ <title>Overview</title>
+
+ <para>
+ Within the context of the Yocto Project, QEMU is an
+ emulator and virtualization machine that allows you to run a complete
+ image you have built using the Yocto Project as just another task
+ on your build system.
+ QEMU is useful for running and testing images and applications on
+ supported Yocto Project architectures without having actual hardware.
+ Among other things, the Yocto Project uses QEMU to run automated
+ Quality Assurance (QA) tests on final images shipped with each
+ release.
+ </para>
+
+ <para>
+ QEMU is made available with the Yocto Project a number of ways.
+ The easiest and recommended method for getting QEMU is to run the
+ ADT installer. For more information on how to make sure you have
+ QEMU available, see the
+ "<ulink url='&YOCTO_DOCS_ADT_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
+ section in the Yocto Project Application Developer's Guide.
+ </para>
+</section>
+
+<section id='qemu-running-qemu'>
+ <title>Running QEMU</title>
+
+ <para>
+ Running QEMU involves having your build environment set up, having the
+ right artifacts available, and understanding how to use the many
+ options that are available to you when you start QEMU using the
+ <filename>runqemu</filename> command.
+ </para>
+
+ <section id='qemu-setting-up-the-environment'>
+ <title>Setting Up the Environment</title>
+
+ <para>
+ You run QEMU in the same environment from which you run BitBake.
+ This means you need to source a build environment script (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ or
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
+ </para>
+ </section>
+
+ <section id='qemu-using-the-runqemu-command'>
+ <title>Using the <filename>runqemu</filename> Command</title>
+
+ <para>
+ The basic <filename>runqemu</filename> command syntax is as
+ follows:
+ <literallayout class='monospaced'>
+ $ runqemu [<replaceable>option</replaceable> ] [...]
+ </literallayout>
+ Based on what you provide on the command line,
+ <filename>runqemu</filename> does a good job of figuring out what
+ you are trying to do.
+ For example, by default, QEMU looks for the most recently built
+ image according to the timestamp when it needs to look for an
+ image.
+ Minimally, through the use of options, you must provide either
+ a machine name, a virtual machine image
+ (<filename>*.vmdk</filename>), or a kernel image
+ (<filename>*.bin</filename>).
+ </para>
+
+ <para>
+ Following is a description of <filename>runqemu</filename>
+ options you can provide on the command line:
+ <note><title>Tip</title>
+ If you do provide some "illegal" option combination or perhaps
+ you do not provide enough in the way of options,
+ <filename>runqemu</filename> provides appropriate error
+ messaging to help you correct the problem.
+ </note>
+ <itemizedlist>
+ <listitem><para><replaceable>QEMUARCH</replaceable>:
+ The QEMU machine architecture, which must be "qemux86",
+ "qemux86-64", "qemuarm", "qemumips", "qemumipsel",
+ “qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
+ or "qemuzynq".
+ </para></listitem>
+ <listitem><para><filename><replaceable>VM</replaceable></filename>:
+ The virtual machine image, which must be a
+ <filename>.vmdk</filename> file.
+ Use this option when you want to boot a
+ <filename>.vmdk</filename> image.
+ The image filename you provide must contain one of the
+ following strings: "qemux86-64", "qemux86", "qemuarm",
+ "qemumips64", "qemumips", "qemuppc", or "qemush4".
+ </para></listitem>
+ <listitem><para><replaceable>ROOTFS</replaceable>:
+ A root filesystem that has one of the following
+ filetype extensions: "ext2", "ext3", "ext4", "jffs2",
+ "nfs", or "btrfs".
+ If the filename you provide for this option uses “nfsâ€, it
+ must provide an explicit root filesystem path.
+ </para></listitem>
+ <listitem><para><replaceable>KERNEL</replaceable>:
+ A kernel image, which is a <filename>.bin</filename> file.
+ When you provide a <filename>.bin</filename> file,
+ <filename>runqemu</filename> detects it and assumes the
+ file is a kernel image.
+ </para></listitem>
+ <listitem><para><replaceable>MACHINE</replaceable>:
+ The architecture of the QEMU machine, which must be one
+ of the following: "qemux86",
+ "qemux86-64", "qemuarm", "qemumips", "qemumipsel",
+ “qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
+ or "qemuzynq".
+ The <replaceable>MACHINE</replaceable> and
+ <replaceable>QEMUARCH</replaceable> options are basically
+ identical.
+ If you do not provide a <replaceable>MACHINE</replaceable>
+ option, <filename>runqemu</filename> tries to determine
+ it based on other options.
+ </para></listitem>
+ <listitem><para><filename>ramfs</filename>:
+ Indicates you are booting an initial RAM disk (initramfs)
+ image, which means the <filename>FSTYPE</filename> is
+ <filename>cpio.gz</filename>.
+ </para></listitem>
+ <listitem><para><filename>iso</filename>:
+ Indicates you are booting an ISO image, which means the
+ <filename>FSTYPE</filename> is
+ <filename>.iso</filename>.
+ </para></listitem>
+ <listitem><para><filename>nographic</filename>:
+ Disables the video console, which sets the console to
+ "ttys0".
+ </para></listitem>
+ <listitem><para><filename>serial</filename>:
+ Enables a serial console on
+ <filename>/dev/ttyS0</filename>.
+ </para></listitem>
+ <listitem><para><filename>biosdir</filename>:
+ Establishes a custom directory for BIOS, VGA BIOS and
+ keymaps.
+ </para></listitem>
+ <listitem><para><filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
+ Specifies custom QEMU parameters.
+ Use this option to pass options other than the simple
+ "kvm" and "serial" options.
+ </para></listitem>
+ <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
+ Specifies custom boot parameters for the kernel.
+ </para></listitem>
+ <listitem><para><filename>audio</filename>:
+ Enables audio in QEMU.
+ The <replaceable>MACHINE</replaceable> option must be
+ either "qemux86" or "qemux86-64" in order for audio to be
+ enabled.
+ Additionally, the <filename>snd_intel8x0</filename>
+ or <filename>snd_ens1370</filename> driver must be
+ installed in linux guest.
+ </para></listitem>
+ <listitem><para><filename>slirp</filename>:
+ Enables "slirp" networking, which is a different way
+ of networking that does not need root access
+ but also is not as easy to use or comprehensive
+ as the default.
+ </para></listitem>
+ <listitem><para><filename>kvm</filename>:
+ Enables KVM when running "qemux86" or "qemux86-64"
+ QEMU architectures.
+ For KVM to work, all the following conditions must be met:
+ <itemizedlist>
+ <listitem><para>
+ Your <replaceable>MACHINE</replaceable> must be either
+ "qemux86" or "qemux86-64".
+ </para></listitem>
+ <listitem><para>
+ Your build host has to have the KVM modules
+ installed, which are
+ <filename>/dev/kvm</filename>.
+ </para></listitem>
+ <listitem><para>
+ Your build host has to have virtio net device, which
+ are <filename>/dev/vhost-net</filename>.
+ </para></listitem>
+ <listitem><para>
+ The build host <filename>/dev/kvm</filename>
+ directory has to be both writable and readable.
+ </para></listitem>
+ <listitem><para>
+ The build host <filename>/dev/vhost-net</filename>
+ directory has to be either readable or writable
+ and “slirp-enabledâ€.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para><filename>publicvnc</filename>:
+ Enables a VNC server open to all hosts.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ For further understanding regarding option use with
+ <filename>runqemu</filename>, consider some examples.
+ </para>
+
+ <para>
+ This example starts QEMU with
+ <replaceable>MACHINE</replaceable> set to "qemux86".
+ Assuming a standard
+ <link linkend='build-directory'>Build Directory</link>,
+ <filename>runqemu</filename> automatically finds the
+ <filename>bzImage-qemux86.bin</filename> image file and
+ the
+ <filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
+ (assuming the current build created a
+ <filename>core-image-minimal</filename> image).
+ <note>
+ When more than one image with the same name exists, QEMU finds
+ and uses the most recently built image according to the
+ timestamp.
+ </note>
+ <literallayout class='monospaced'>
+ $ runqemu qemux86
+ </literallayout>
+ This example produces the exact same results as the
+ previous example.
+ This command, however, specifically provides the image
+ and root filesystem type.
+ <literallayout class='monospaced'>
+ $ runqemu qemux86 core-image-minimal ext3
+ </literallayout>
+ This example specifies to boot an initial RAM disk image
+ and to enable audio in QEMU.
+ For this case, <filename>runqemu</filename> set the
+ internal variable <filename>FSTYPE</filename> to
+ "cpio.gz".
+ Also, for audio to be enabled, an appropriate driver must
+ be installed (see the previous description for the
+ <filename>audio</filename> option for more information).
+ <literallayout class='monospaced'>
+ $ runqemu qemux86 ramfs audio
+ </literallayout>
+ This example does not provide enough information for
+ QEMU to launch.
+ While the command does provide a root filesystem type, it
+ must also minimally provide a
+ <replaceable>MACHINE</replaceable>,
+ <replaceable>KERNEL</replaceable>, or
+ <replaceable>VM</replaceable> option.
+ <literallayout class='monospaced'>
+ $ runqemu ext3
+ </literallayout>
+ This example specifies to boot a virtual machine image
+ (<filename>.vmdk</filename> file).
+ From the <filename>.vmdk</filename>,
+ <filename>runqemu</filename> determines the QEMU
+ architecture (<replaceable>MACHINE</replaceable>) to be
+ "qemux86" and the root filesystem type to be "vmdk".
+ <literallayout class='monospaced'>
+ $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.vmdk
+ </literallayout>
+ </para>
+ </section>
+</section>
+
+<section id='qemu-running-under-a-network-file-system-nfs-server'>
+ <title>Running Under a Network File System (NFS) Server</title>
+
+ <para>
+ One method for running QEMU is to run it on an NFS server.
+ This is useful when you need to access the same file system from both
+ the build and the emulated system at the same time.
+ It is also worth noting that the system does not need root privileges
+ to run.
+ It uses a user space NFS server to avoid that.
+ This section describes how to set up for running QEMU using an NFS
+ server and then how you can start and stop the server.
+ </para>
+
+ <section id='qemu-setting-up-to-use-nfs'>
+ <title>Setting Up to Use NFS</title>
+
+ <para>
+ Once you are able to run QEMU in your environment, you can use the
+ <filename>runqemu-extract-sdk</filename> script, which is located
+ in the <filename>scripts</filename> directory along with
+ <filename>runqemu</filename> script.
+ The <filename>runqemu-extract-sdk</filename> takes a root
+ file system tarball and extracts it into a location that you
+ specify.
+ Then, when you run <filename>runqemu</filename>, you can specify
+ the location that has the file system to pass it to QEMU.
+ Here is an example that takes a file system and extracts it to
+ a directory named <filename>test-nfs</filename>:
+ <literallayout class='monospaced'>
+ runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
+ </literallayout>
+ Once you have extracted the file system, you can run
+ <filename>runqemu</filename> normally with the additional
+ location of the file system.
+ You can then also make changes to the files within
+ <filename>./test-nfs</filename> and see those changes appear in the
+ image in real time.
+ Here is an example using the <filename>qemux86</filename> image:
+ <literallayout class='monospaced'>
+ runqemu qemux86 ./test-nfs
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='qemu-starting-and-stopping-nfs'>
+ <title>Starting and Stopping NFS</title>
+
+ <para>
+ You can manually start and stop the NFS share using these
+ commands:
+ <itemizedlist>
+ <listitem><para><emphasis><filename>start</filename>:</emphasis>
+ Starts the NFS share:
+ <literallayout class='monospaced'>
+ runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis><filename>stop</filename>:</emphasis>
+ Stops the NFS share:
+ <literallayout class='monospaced'>
+ runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis><filename>restart</filename>:</emphasis>
+ Restarts the NFS share:
+ <literallayout class='monospaced'>
+ runqemu-export-rootfs restart <replaceable>file-system-location</replaceable>
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</section>
+
+<section id='qemu-tips-and-tricks'>
+ <title>Tips and Tricks</title>
+
+ <para>
+ The following list describes things you can do to make running QEMU
+ in the context of the Yocto Project a better experience:
+ <itemizedlist>
+ <listitem><para><emphasis>Switching Between Consoles:</emphasis>
+ When booting or running QEMU, you can switch between
+ supported consoles by using
+ Ctrl+Alt+<replaceable>number</replaceable>.
+ For example, Ctrl+Alt+3 switches you to the serial console as
+ long as that console is enabled.
+ Being able to switch consoles is helpful, for example, if the
+ main QEMU console breaks for some reason.
+ <note>
+ Usually, "2" gets you to the main console and "3" gets you
+ to the serial console.
+ </note>
+ </para></listitem>
+ <listitem><para><emphasis>Removing the Splash Screen:</emphasis>
+ You can remove the splash screen when QEMU is booting by
+ using Alt+left.
+ Removing the splash screen allows you to see what is happening
+ in the background.
+ </para></listitem>
+ <listitem><para><emphasis>Disabling the Cursor Grab:</emphasis>
+ The default QEMU integration captures the cursor within the
+ main window.
+ It does this since standard mouse devices only provide relative
+ input and not absolute coordinates.
+ You then have to break out of the grab using the "Ctrl+Alt" key
+ combination.
+ However, the Yocto Project's integration of QEMU enables the
+ wacom USB touch pad driver by default to allow input of absolute
+ coordinates.
+ This default means that the mouse can enter and leave the
+ main window without the grab taking effect leading to a better
+ user experience.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+</section>
+
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml
index 6ab93f79cf..df29302fdb 100644
--- a/documentation/dev-manual/dev-manual-start.xml
+++ b/documentation/dev-manual/dev-manual-start.xml
@@ -29,7 +29,7 @@
in the Yocto Project documentation.
The Yocto Project provides various ancillary tools for the embedded developer
and also features the Sato reference User Interface, which is optimized for
- stylus driven, low-resolution screens.
+ stylus-driven, low-resolution screens.
</para>
<para>
@@ -89,7 +89,9 @@
<link linkend='git'>Git</link> to clone a local copy
of the upstream <filename>poky</filename> repository,
or by downloading and unpacking a tarball of an official
- Yocto Project release.</para>
+ Yocto Project release.
+ The preferred method is to create a clone of the repository.
+ </para>
<para>Working from a copy of the upstream repository allows you
to contribute back into the Yocto Project or simply work with
the latest software on a development branch.
@@ -188,42 +190,42 @@
Resolving deltas: 100% (260/260), done.
</literallayout></para></listitem>
<listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board Support Packages (BSPs):</emphasis>
- The Yocto Project provides a layer called
- <filename>meta-intel</filename> and it is maintained in its own
- separate Git repository.
- The <filename>meta-intel</filename> layer contains many
- supported
- <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>.
- </para>
+ The Yocto Project supports many BSPs, which are maintained in
+ their own layers or in layers designed to contain several
+ BSPs.
+ To get an idea of machine support through BSP layers, you can
+ look at the
+ <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
+ for the release.</para>
<para>The Yocto Project uses the following BSP layer naming
scheme:
<literallayout class='monospaced'>
- meta-&lt;BSP_name&gt;
+ meta-<replaceable>bsp_name</replaceable>
</literallayout>
- where <filename>&lt;BSP_name&gt;</filename> is the recognized
+ where <replaceable>bsp_name</replaceable> is the recognized
BSP name.
Here are some examples:
<literallayout class='monospaced'>
meta-crownbay
meta-emenlow
- meta-n450
+ meta-raspberrypi
</literallayout>
See the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
section in the Yocto Project Board Support Package (BSP)
- Developer's Guide for more information on BSP Layers.
- </para>
+ Developer's Guide for more information on BSP Layers.</para>
- <para>
+ <para>A useful Git repository released with the Yocto
+ Project is <filename>meta-intel</filename>, which is a
+ parent layer that contains many supported
+ <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>.
You can locate the <filename>meta-intel</filename> Git
repository in the "Yocto Metadata Layers" area of the Yocto
Project Source Repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
- </para>
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
- <para>
- Using
+ <para>Using
<link linkend='git'>Git</link> to create a local clone of the
upstream repository can be helpful if you are working with
BSPs.
@@ -250,11 +252,9 @@
remote: Total 8844 (delta 4931), reused 8780 (delta 4867)
Receiving objects: 100% (8844/8844), 2.48 MiB | 264 KiB/s, done.
Resolving deltas: 100% (4931/4931), done.
- </literallayout>
- </para>
+ </literallayout></para>
- <para>
- The same
+ <para>The same
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>
referenced earlier covers how to set up the
<filename>meta-intel</filename> Git repository.
@@ -350,6 +350,9 @@
You can find details on all these steps in the
"<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
section of the Yocto Project Quick Start.
+ You can learn more about using QEMU with the Yocto Project in the
+ "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
+ section.
</para>
<para>
diff --git a/documentation/dev-manual/dev-manual.xml b/documentation/dev-manual/dev-manual.xml
index b89e2b357e..4a7840f5df 100644
--- a/documentation/dev-manual/dev-manual.xml
+++ b/documentation/dev-manual/dev-manual.xml
@@ -68,9 +68,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
@@ -106,6 +111,8 @@
<xi:include href="dev-manual-common-tasks.xml"/>
+ <xi:include href="dev-manual-qemu.xml"/>
+
</book>
<!--
vim: expandtab tw=80 ts=4
diff --git a/documentation/dev-manual/figures/yp-download.png b/documentation/dev-manual/figures/yp-download.png
index 7f1e5ca118..5770be6883 100644
--- a/documentation/dev-manual/figures/yp-download.png
+++ b/documentation/dev-manual/figures/yp-download.png
Binary files differ
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml
index 4a6aeb7391..283f483112 100644
--- a/documentation/kernel-dev/kernel-dev-advanced.xml
+++ b/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -214,7 +214,7 @@
Here is an example that shows a trivial tree of kernel Metadata
stored in recipe-space within a BSP layer:
<literallayout class='monospaced'>
- meta-my_bsp_layer/
+ meta-<replaceable>my_bsp_layer</replaceable>/
`-- recipes-kernel
`-- linux
`-- linux-yocto
@@ -370,7 +370,7 @@
of Metadata.
The following Metadata file hierarchy is recommended:
<literallayout class='monospaced'>
- &lt;base&gt;/
+ <replaceable>base</replaceable>/
bsp/
cfg/
features/
@@ -513,7 +513,7 @@
patch mypatch.patch
patches/mypatch.patch:
- &lt;typical-patch&gt;
+ <replaceable>typical-patch</replaceable>
</literallayout>
You can create the typical <filename>.patch</filename>
file using <filename>diff -Nurp</filename> or
@@ -968,37 +968,38 @@
hierarchical branching system similar to what the linux-yocto Linux
kernel repositories use:
<literallayout class='monospaced'>
- &lt;common&gt;/&lt;kernel_type&gt;/&lt;machine&gt;
+ <replaceable>common</replaceable>/<replaceable>kernel_type</replaceable>/<replaceable>machine</replaceable>
</literallayout>
</para>
<para>
If you had two kernel types, "standard" and "small" for
- instance, and three machines, the branches in your
+ instance, three machines, and <replaceable>common</replaceable>
+ as <filename>mydir</filename>, the branches in your
Git repository might look like this:
<literallayout class='monospaced'>
- common/base
- common/standard/base
- common/standard/machine_a
- common/standard/machine_b
- common/standard/machine_c
- common/small/base
- common/small/machine_a
+ mydir/base
+ mydir/standard/base
+ mydir/standard/machine_a
+ mydir/standard/machine_b
+ mydir/standard/machine_c
+ mydir/small/base
+ mydir/small/machine_a
</literallayout>
</para>
<para>
This organization can help clarify the branch relationships.
- In this case, <filename>common/standard/machine_a</filename>
- includes everything in <filename>common/base</filename> and
- <filename>common/standard/base</filename>.
+ In this case, <filename>mydir/standard/machine_a</filename>
+ includes everything in <filename>mydir/base</filename> and
+ <filename>mydir/standard/base</filename>.
The "standard" and "small" branches add sources specific to those
kernel types that for whatever reason are not appropriate for the
other branches.
<note>The "base" branches are an artifact of the way Git manages
its data internally on the filesystem: Git will not allow you
- to use <filename>common/standard</filename> and
- <filename>common/standard/machine_a</filename> because it
+ to use <filename>mydir/standard</filename> and
+ <filename>mydir/standard/machine_a</filename> because it
would have to create a file and a directory named "standard".
</note>
</para>
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
index 555c8d8903..58cc98ddff 100644
--- a/documentation/kernel-dev/kernel-dev-common.xml
+++ b/documentation/kernel-dev/kernel-dev-common.xml
@@ -85,10 +85,10 @@
you are using.
For example, if you are modifying the
<filename>meta/recipes-kernel/linux/linux-yocto_3.4.bb</filename>
- recipe, the append file will typical be located as follows
+ recipe, the append file will typically be located as follows
within your custom layer:
<literallayout class='monospaced'>
- &lt;your-layer&gt;/recipes-kernel/linux/linux-yocto_3.4.bbappend
+ <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto_3.4.bbappend
</literallayout>
The append file should initially extend the
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
@@ -107,7 +107,7 @@
described above, you must place the files in your layer in the
following area:
<literallayout class='monospaced'>
- &lt;your-layer&gt;/recipes-kernel/linux/linux-yocto/
+ <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto/
</literallayout>
<note>If you are working on a new machine Board Support Package
(BSP), be sure to refer to the
@@ -502,8 +502,9 @@
you can make them permanent by generating patches and
applying them to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- statement as described in section
- "<link linkend='applying-patches'>Applying Patches</link>" section.
+ statement as described in the
+ "<link linkend='applying-patches'>Applying Patches</link>"
+ section.
If you are not familiar with generating patches, refer to the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-the-patch'>Creating the Patch</ulink>"
section in the Yocto Project Development Manual.
diff --git a/documentation/kernel-dev/kernel-dev-customization.xsl b/documentation/kernel-dev/kernel-dev-customization.xsl
index bd81da5d8c..8676d66c3a 100644
--- a/documentation/kernel-dev/kernel-dev-customization.xsl
+++ b/documentation/kernel-dev/kernel-dev-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml
index 297696c965..38ef36de5a 100644
--- a/documentation/kernel-dev/kernel-dev-intro.xml
+++ b/documentation/kernel-dev/kernel-dev-intro.xml
@@ -110,7 +110,7 @@
The sections that follow provide instructions for completing
specific Linux kernel development tasks.
These instructions assume you are comfortable working with
- <ulink url='http://developer.berlios.de/projects/bitbake/'>BitBake</ulink>
+ <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
recipes and basic open-source development tools.
Understanding these concepts will facilitate the process of working
with the kernel recipes.
diff --git a/documentation/kernel-dev/kernel-dev-maint-appx.xml b/documentation/kernel-dev/kernel-dev-maint-appx.xml
index a7c144ff75..a72dcff01b 100644
--- a/documentation/kernel-dev/kernel-dev-maint-appx.xml
+++ b/documentation/kernel-dev/kernel-dev-maint-appx.xml
@@ -88,7 +88,7 @@
feature description in an <filename>.scc</filename> file
whose name follows this format:
<literallayout class='monospaced'>
- &lt;bsp_name&gt;-&lt;kernel_type&gt;.scc
+ <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
</literallayout>
</para></listitem>
<listitem><para>Once located, the feature description is either compiled into a simple script
@@ -157,7 +157,7 @@
<listitem><para>A BSP build branch exists.
This branch has the following form:
<literallayout class='monospaced'>
- &lt;kernel_type&gt;/&lt;bsp_name&gt;
+ <replaceable>kernel_type</replaceable>/<replaceable>bsp_name</replaceable>
</literallayout></para></listitem>
</itemizedlist>
@@ -194,7 +194,7 @@
<filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one
of the Yocto Project supported kernel types (e.g. "standard"):
<literallayout class='monospaced'>
- linux-${MACHINE}-&lt;kernel_type&gt;-build
+ linux-${MACHINE}-<replaceable>kernel_type</replaceable>-build
</literallayout>
</para>
diff --git a/documentation/kernel-dev/kernel-dev.xml b/documentation/kernel-dev/kernel-dev.xml
index dddc003ba0..c1b9d53e92 100644
--- a/documentation/kernel-dev/kernel-dev.xml
+++ b/documentation/kernel-dev/kernel-dev.xml
@@ -53,9 +53,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
diff --git a/documentation/mega-manual/figures/buildhistory.png b/documentation/mega-manual/figures/buildhistory.png
index edf98d95cf..9a77bde68b 100644
--- a/documentation/mega-manual/figures/buildhistory.png
+++ b/documentation/mega-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/mega-manual/figures/yp-download.png b/documentation/mega-manual/figures/yp-download.png
index 7f1e5ca118..5770be6883 100644
--- a/documentation/mega-manual/figures/yp-download.png
+++ b/documentation/mega-manual/figures/yp-download.png
Binary files differ
diff --git a/documentation/mega-manual/mega-manual-customization.xsl b/documentation/mega-manual/mega-manual-customization.xsl
index eb95240e64..a8b9bd6b5b 100644
--- a/documentation/mega-manual/mega-manual-customization.xsl
+++ b/documentation/mega-manual/mega-manual-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:param name="generate.toc">
appendix toc
diff --git a/documentation/poky.ent b/documentation/poky.ent
index 216015826f..c2bde9d3d6 100644
--- a/documentation/poky.ent
+++ b/documentation/poky.ent
@@ -1,11 +1,11 @@
-<!ENTITY DISTRO "1.7">
-<!ENTITY DISTRO_COMPRESSED "17">
+<!ENTITY DISTRO "1.8">
+<!ENTITY DISTRO_COMPRESSED "18">
<!ENTITY DISTRO_NAME "tbd">
-<!ENTITY YOCTO_DOC_VERSION "1.7">
-<!ENTITY POKYVERSION "12.0.0">
-<!ENTITY POKYVERSION_COMPRESSED "1100">
+<!ENTITY YOCTO_DOC_VERSION "1.8">
+<!ENTITY POKYVERSION "13.0.0">
+<!ENTITY POKYVERSION_COMPRESSED "1300">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
-<!ENTITY COPYRIGHT_YEAR "2010-2014">
+<!ENTITY COPYRIGHT_YEAR "2010-2015">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
@@ -56,11 +56,11 @@
<!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
<!ENTITY OE_INIT_FILE "oe-init-build-env">
<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo gcc-multilib \
- build-essential chrpath">
+ build-essential chrpath socat">
<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
- ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue">
+ ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat">
<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
- diffstat texinfo python-curses patch">
+ diffstat texinfo python-curses patch socat">
<!ENTITY CENTOS_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
- diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath">
+ diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat">
diff --git a/documentation/profile-manual/profile-manual-customization.xsl b/documentation/profile-manual/profile-manual-customization.xsl
index 7775e5bbcf..7284aec365 100644
--- a/documentation/profile-manual/profile-manual-customization.xsl
+++ b/documentation/profile-manual/profile-manual-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
diff --git a/documentation/profile-manual/profile-manual-usage.xml b/documentation/profile-manual/profile-manual-usage.xml
index 5577b1b001..95ad73909c 100644
--- a/documentation/profile-manual/profile-manual-usage.xml
+++ b/documentation/profile-manual/profile-manual-usage.xml
@@ -842,7 +842,7 @@
idea. One of the first projects to do this was IBM's DProbes
dpcc compiler, an ANSI C compiler which targeted a low-level
assembly language running on an in-kernel interpreter on the
- target system. This is exactly analagous to what Sun's DTrace
+ target system. This is exactly analogous to what Sun's DTrace
did, except that DTrace invented its own language for the purpose.
Systemtap, heavily inspired by DTrace, also created its own
one-off language, but rather than running the product on an
@@ -1275,7 +1275,7 @@
</para>
<informalexample>
- <emphasis>Tying it Together:</emphasis> The trace events subsystem accomodate static
+ <emphasis>Tying it Together:</emphasis> The trace events subsystem accommodate static
and dynamic tracepoints in exactly the same way - there's no
difference as far as the infrastructure is concerned. See the
ftrace section for more details on the trace event subsystem.
@@ -2169,7 +2169,7 @@
### Shell environment set up for builds. ###
- You can now run 'bitbake &lt;target&gt;'
+ You can now run 'bitbake <replaceable>target</replaceable>'
Common targets are:
core-image-minimal
@@ -3257,15 +3257,25 @@
<title>Documentation</title>
<para>
- There doesn't seem to be any current documentation covering
- LTTng 2.0, but maybe that's because the project is in transition.
- The LTTng 2.0 website, however, is here:
+ You can find the primary LTTng Documentation on the
+ <ulink url='https://lttng.org/docs/'>LTTng Documentation</ulink>
+ site.
+ The documentation on this site is appropriate for intermediate to
+ advanced software developers who are working in a Linux environment
+ and are interested in efficient software tracing.
+ </para>
+
+ <para>
+ For information on LTTng in general, visit the
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
+ site.
+ You can find a "Getting Started" link on this site that takes
+ you to an LTTng Quick Start.
</para>
<para>
- You can access extensive help information on how to use the
- LTTng plug-in to search and analyze captured traces via the
+ Finally, you can access extensive help information on how to use
+ the LTTng plug-in to search and analyze captured traces via the
Eclipse help system:
<literallayout class='monospaced'>
Help | Help Contents | LTTng Plug-in User Guide
diff --git a/documentation/profile-manual/profile-manual.xml b/documentation/profile-manual/profile-manual.xml
index e5b253b552..9842c46cab 100644
--- a/documentation/profile-manual/profile-manual.xml
+++ b/documentation/profile-manual/profile-manual.xml
@@ -53,9 +53,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
diff --git a/documentation/ref-manual/closer-look.xml b/documentation/ref-manual/closer-look.xml
index f0ed967228..c0c0d619a4 100644
--- a/documentation/ref-manual/closer-look.xml
+++ b/documentation/ref-manual/closer-look.xml
@@ -255,7 +255,7 @@
<para>
When you launch your build with the
- <filename>bitbake &lt;target&gt;</filename> command, BitBake
+ <filename>bitbake <replaceable>target</replaceable></filename> command, BitBake
sorts out the configurations to ultimately define your build
environment.
</para>
@@ -351,7 +351,7 @@
Best practices dictate that you isolate these types of
configurations into their own layer.
Settings you provide in
- <filename>conf/distro/&lt;distro&gt;.conf</filename> override
+ <filename>conf/distro/<replaceable>distro</replaceable>.conf</filename> override
similar
settings that BitBake finds in your
<filename>conf/local.conf</filename> file in the Build
@@ -375,7 +375,7 @@
This area holds configuration files for the
layer (<filename>conf/layer.conf</filename>),
the distribution
- (<filename>conf/distro/&lt;distro&gt;.conf</filename>),
+ (<filename>conf/distro/<replaceable>distro</replaceable>.conf</filename>),
and any distribution-wide include files.
</para></listitem>
<listitem><para><emphasis>recipes-*:</emphasis>
@@ -408,7 +408,7 @@
<para>
The BSP Layer's configuration directory contains
configuration files for the machine
- (<filename>conf/machine/&lt;machine&gt;.conf</filename>) and,
+ (<filename>conf/machine/<replaceable>machine</replaceable>.conf</filename>) and,
of course, the layer (<filename>conf/layer.conf</filename>).
</para>
@@ -1145,7 +1145,7 @@
<para>
Images are written out to the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- inside the <filename>tmp/deploy/images/&lt;machine&gt;/</filename>
+ inside the <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
folder as shown in the figure.
This folder contains any files expected to be loaded on the
target device.
@@ -1157,43 +1157,43 @@
variable points to the appropriate directory containing images for
the current configuration.
<itemizedlist>
- <listitem><para><filename>&lt;kernel-image&gt;</filename>:
+ <listitem><para><filename><replaceable>kernel-image</replaceable></filename>:
A kernel binary file.
The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
variable setting determines the naming scheme for the
kernel image file.
Depending on that variable, the file could begin with
a variety of naming strings.
- The <filename>deploy/images/&lt;machine&gt;</filename>
+ The <filename>deploy/images/<replaceable>machine</replaceable></filename>
directory can contain multiple image files for the
machine.</para></listitem>
- <listitem><para><filename>&lt;root-filesystem-image&gt;</filename>:
+ <listitem><para><filename><replaceable>root-filesystem-image</replaceable></filename>:
Root filesystems for the target device (e.g.
<filename>*.ext3</filename> or <filename>*.bz2</filename>
files).
The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
variable setting determines the root filesystem image
type.
- The <filename>deploy/images/&lt;machine&gt;</filename>
+ The <filename>deploy/images/<replaceable>machine</replaceable></filename>
directory can contain multiple root filesystems for the
machine.</para></listitem>
- <listitem><para><filename>&lt;kernel-modules&gt;</filename>:
+ <listitem><para><filename><replaceable>kernel-modules</replaceable></filename>:
Tarballs that contain all the modules built for the kernel.
Kernel module tarballs exist for legacy purposes and
can be suppressed by setting the
<link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
variable to "0".
- The <filename>deploy/images/&lt;machine&gt;</filename>
+ The <filename>deploy/images/<replaceable>machine</replaceable></filename>
directory can contain multiple kernel module tarballs
for the machine.</para></listitem>
- <listitem><para><filename>&lt;bootloaders&gt;</filename>:
+ <listitem><para><filename><replaceable>bootloaders</replaceable></filename>:
Bootloaders supporting the image, if applicable to the
target machine.
- The <filename>deploy/images/&lt;machine&gt;</filename>
+ The <filename>deploy/images/<replaceable>machine</replaceable></filename>
directory can contain multiple bootloaders for the
machine.</para></listitem>
- <listitem><para><filename>&lt;symlinks&gt;</filename>:
- The <filename>deploy/images/&lt;machine&gt;</filename>
+ <listitem><para><filename><replaceable>symlinks</replaceable></filename>:
+ The <filename>deploy/images/<replaceable>machine</replaceable></filename>
folder contains
a symbolic link that points to the most recently built file
for each machine.
@@ -1280,7 +1280,7 @@
part of the SDK (i.e. the part that runs on
the <filename>SDKMACHINE</filename>).
When you use
- <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>
+ <filename>bitbake -c populate_sdk <replaceable>imagename</replaceable></filename>
to create the SDK, a set of default packages
apply.
This variable allows you to add more packages.
diff --git a/documentation/ref-manual/faq.xml b/documentation/ref-manual/faq.xml
index bc147ce70a..da6ce20eef 100644
--- a/documentation/ref-manual/faq.xml
+++ b/documentation/ref-manual/faq.xml
@@ -321,7 +321,7 @@
<qandaentry>
<question>
<para>
- What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
+ What’s the difference between <replaceable>target</replaceable> and <replaceable>target</replaceable><filename>-native</filename>?
</para>
</question>
<answer>
@@ -682,6 +682,115 @@
</answer>
</qandaentry>
+ <qandaentry>
+ <question>
+ <para>
+ Why do <filename>${bindir}</filename> and <filename>${libdir}</filename> have strange values for <filename>-native</filename> recipes?
+ </para>
+ </question>
+ <answer>
+ <para>
+ Executables and libraries might need to be used from a
+ directory other than the directory into which they were
+ initially installed.
+ Complicating this situation is the fact that sometimes these
+ executables and libraries are compiled with the expectation
+ of being run from that initial installation target directory.
+ If this is the case, moving them causes problems.
+ </para>
+
+ <para>
+ This scenario is a fundamental problem for package maintainers
+ of mainstream Linux distributions as well as for the
+ OpenEmbedded build system.
+ As such, a well-established solution exists.
+ Makefiles, Autotools configuration scripts, and other build
+ systems are expected to respect environment variables such as
+ <filename>bindir</filename>, <filename>libdir</filename>,
+ and <filename>sysconfdir</filename> that indicate where
+ executables, libraries, and data reside when a program is
+ actually run.
+ They are also expected to respect a
+ <filename>DESTDIR</filename> environment variable, which is
+ prepended to all the other variables when the build system
+ actually installs the files.
+ It is understood that the program does not actually run from
+ within <filename>DESTDIR</filename>.
+ </para>
+
+ <para>
+ When the OpenEmbedded build system uses a recipe to build a
+ target-architecture program (i.e. one that is intended for
+ inclusion on the image being built), that program eventually
+ runs from the root file system of that image.
+ Thus, the build system provides a value of "/usr/bin" for
+ <filename>bindir</filename>, a value of "/usr/lib" for
+ <filename>libdir</filename>, and so forth.
+ </para>
+
+ <para>
+ Meanwhile, <filename>DESTDIR</filename> is a path within the
+ <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ However, when the recipe builds a native program (i.e. one
+ that is intended to run on the build machine), that program
+ is never installed directly to the build machine's root
+ file system.
+ Consequently, the build system uses paths within the Build
+ Directory for <filename>DESTDIR</filename>,
+ <filename>bindir</filename> and related variables.
+ To better understand this, consider the following two paths
+ where the first is relatively normal and the second is not:
+ <note>
+ Due to these lengthy examples, the paths are artificially
+ broken across lines for readability.
+ </note>
+ <literallayout class='monospaced'>
+ /home/maxtothemax/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/
+ 1.2.8-r0/sysroot-destdir/usr/bin
+
+ /home/maxtothemax/poky-bootchart2/build/tmp/work/x86_64-linux/
+ zlib-native/1.2.8-r0/sysroot-destdir/home/maxtothemax/poky-bootchart2/
+ build/tmp/sysroots/x86_64-linux/usr/bin
+ </literallayout>
+ Even if the paths look unusual, they both are correct -
+ the first for a target and the second for a native recipe.
+ These paths are a consequence of the
+ <filename>DESTDIR</filename> mechanism and while they
+ appear strange, they are correct and in practice very effective.
+ </para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question>
+ <para>
+ The files provided by my <filename>-native</filename> recipe do
+ not appear to be available to other recipes.
+ Files are missing from the native sysroot, my recipe is
+ installing to the wrong place, or I am getting permissions
+ errors during the do_install task in my recipe! What is wrong?
+ </para>
+ </question>
+ <answer>
+ <para>
+ This situation results when a build system does
+ not recognize the environment variables supplied to it by
+ <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ The incident that prompted this FAQ entry involved a Makefile
+ that used an environment variable named
+ <filename>BINDIR</filename> instead of the more standard
+ variable <filename>bindir</filename>.
+ The makefile's hardcoded default value of "/usr/bin" worked
+ most of the time, but not for the recipe's
+ <filename>-native</filename> variant.
+ For another example, permissions errors might be caused
+ by a Makefile that ignores <filename>DESTDIR</filename> or uses
+ a different name for that environment variable.
+ Check the the build system to see if these kinds of
+ issues exist.
+ </para>
+ </answer>
+ </qandaentry>
</qandaset>
</chapter>
diff --git a/documentation/ref-manual/figures/buildhistory.png b/documentation/ref-manual/figures/buildhistory.png
index edf98d95cf..9a77bde68b 100644
--- a/documentation/ref-manual/figures/buildhistory.png
+++ b/documentation/ref-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/ref-manual/introduction.xml b/documentation/ref-manual/introduction.xml
index 7e246b1e46..f986f7c28e 100644
--- a/documentation/ref-manual/introduction.xml
+++ b/documentation/ref-manual/introduction.xml
@@ -73,6 +73,10 @@
Describes the tasks defined by the OpenEmbedded build system.
</para></listitem>
<listitem><para><emphasis>
+ <link linkend='ref-qa-checks'>QA Error and Warning Messages</link>:</emphasis>
+ Lists and describes QA warning and error messages.
+ </para></listitem>
+ <listitem><para><emphasis>
<link linkend='ref-images'>Images</link>:</emphasis>
Describes the standard images that the Yocto Project supports.
</para></listitem>
@@ -164,6 +168,8 @@
<listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
+ <listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
+ <listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem>
<!-- <listitem><para>openSUSE 11.4</para></listitem>
<listitem><para>openSUSE 12.1</para></listitem> -->
<listitem><para>openSUSE 12.2</para></listitem>
@@ -310,11 +316,17 @@
<para>
The following list shows the required packages by function
given a supported CentOS Linux distribution:
- <note>Depending on the CentOS version you are using, other requirements
- and dependencies might exist.
- For details, you should look at the CentOS sections on the
- <ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
- wiki page.
+ <note>
+ For CentOS 6.x, some of the versions of the components
+ provided by the distribution are too old (e.g. Git, Python,
+ and tar).
+ It is recommended that you install the buildtools in order
+ to provide versions that will work with the OpenEmbedded
+ build system.
+ For information on how to install the buildtools tarball,
+ see the
+ "<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
+ section.
</note>
<itemizedlist>
<listitem><para><emphasis>Essentials:</emphasis>
@@ -392,14 +404,14 @@
choose the installation directory.
For example, you could choose the following:
<literallayout class='monospaced'>
- /home/your-username/buildtools
+ /home/<replaceable>your-username</replaceable>/buildtools
</literallayout>
</para></listitem>
<listitem><para>
Source the tools environment setup script by using a
command like the following:
<literallayout class='monospaced'>
- $ source /home/your-username/buildtools/environment-setup-i586-poky-linux
+ $ source /home/<replaceable>your-username</replaceable>/buildtools/environment-setup-i586-poky-linux
</literallayout>
Of course, you need to supply your installation directory and be
sure to use the right file (i.e. i585 or x86-64).
@@ -478,14 +490,14 @@
choose the installation directory.
For example, you could choose the following:
<literallayout class='monospaced'>
- /home/your-username/buildtools
+ /home/<replaceable>your-username</replaceable>/buildtools
</literallayout>
</para></listitem>
<listitem><para>
Source the tools environment setup script by using a
command like the following:
<literallayout class='monospaced'>
- $ source /home/your-username/buildtools/environment-setup-i586-poky-linux
+ $ source /home/<replaceable>your-username</replaceable>/buildtools/environment-setup-i586-poky-linux
</literallayout>
Of course, you need to supply your installation directory and be
sure to use the right file (i.e. i585 or x86-64).
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
index efed11dcb2..d072ecfa0e 100644
--- a/documentation/ref-manual/migration.xml
+++ b/documentation/ref-manual/migration.xml
@@ -110,7 +110,7 @@
appended to the path used to access the mirror.
Here is an example:
<literallayout class='monospaced'>
- SSTATE_MIRRORS = "file://.* http://someserver.tld/share/sstate/PATH"
+ SSTATE_MIRRORS = "file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH"
</literallayout>
</para>
</section>
@@ -375,10 +375,11 @@
<listitem><para><emphasis>Shared State Code:</emphasis>
The shared state code has been optimized to avoid running
unnecessary tasks.
- For example,
- <filename>bitbake -c rootfs some-image</filename> from
- shared state no longer populates the target sysroot
- since that is not necessary.
+ For example, the following no longer populates the target
+ sysroot since that is not necessary:
+ <literallayout class='monospaced'>
+ $ bitbake -c rootfs <replaceable>some-image</replaceable>
+ </literallayout>
Instead, the system just needs to extract the output
package contents, re-create the packages, and construct
the root filesystem.
@@ -832,7 +833,7 @@
This directory is located under
<filename>sysroots</filename> and uses a machine-specific
name (i.e.
- <filename>tmp/sysroots/&lt;machine&gt;/pkgdata</filename>).
+ <filename>tmp/sysroots/<replaceable>machine</replaceable>/pkgdata</filename>).
</para></listitem>
</itemizedlist>
</para>
@@ -1100,7 +1101,7 @@
</para></listitem>
<listitem><para>
<filename>base-files</filename>: Remove the unnecessary
- <filename>media/xxx</filename> directories.
+ <filename>media/</filename><replaceable>xxx</replaceable> directories.
</para></listitem>
<listitem><para>
<filename>alsa-state</filename>: Provide an empty
@@ -1228,7 +1229,7 @@
value against the branch.
You can specify the branch using the following form:
<literallayout class='monospaced'>
- SRC_URI = "git://server.name/repository;branch=&lt;branchname&gt;"
+ SRC_URI = "git://server.name/repository;branch=<replaceable>branchname</replaceable>"
</literallayout>
If you do not specify a branch, BitBake looks
in the default "master" branch.
@@ -1305,10 +1306,10 @@
</section>
<section id='migration-1.6-task-taskname-overrides'>
- <title><filename>task-&lt;taskname&gt;</filename> Overrides</title>
+ <title><filename>task-</filename><replaceable>taskname</replaceable> Overrides</title>
<para>
- <filename>task-&lt;taskname&gt;</filename> overrides have been
+ <filename>task-</filename><replaceable>taskname</replaceable> overrides have been
adjusted so that tasks whose names contain underscores have the
underscores replaced by hyphens for the override so that they
now function properly.
@@ -1691,6 +1692,327 @@
</para>
</section>
</section>
+
+<section id='moving-to-the-yocto-project-1.7-release'>
+ <title>Moving to the Yocto Project 1.7 Release</title>
+
+ <para>
+ This section provides migration information for moving to the
+ Yocto Project 1.7 Release from the prior release.
+ </para>
+
+ <section id='migration-1.7-changes-to-setting-qemu-packageconfig-options'>
+ <title>Changes to Setting QEMU <filename>PACKAGECONFIG</filename> Options in <filename>local.conf</filename></title>
+
+ <para>
+ The QEMU recipe now uses a number of
+ <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
+ options to enable various optional features.
+ The method used to set defaults for these options means that
+ existing
+ <filename>local.conf</filename> files will need to be be
+ modified to append to <filename>PACKAGECONFIG</filename> for
+ <filename>qemu-native</filename> and
+ <filename>nativesdk-qemu</filename> instead of setting it.
+ In other words, to enable graphical output for QEMU, you should
+ now have these lines in <filename>local.conf</filename>:
+ <literallayout class='monospaced'>
+ PACKAGECONFIG_append_pn-qemu-native = " sdl"
+ PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='migration-1.7-minimum-git-version'>
+ <title>Minimum Git version</title>
+
+ <para>
+ The minimum
+ <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> version required
+ on the build host is now 1.7.8 because the
+ <filename>&dash;&dash;list</filename> option is now required by
+ BitBake's Git fetcher.
+ As always, if your host distribution does not provide a version of
+ Git that meets this requirement, you can use the
+ <filename>buildtools-tarball</filename> that does.
+ See the
+ "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
+ section for more information.
+ </para>
+ </section>
+
+ <section id='migration-1.7-autotools-class-changes'>
+ <title>Autotools Class Changes</title>
+
+ <para>
+ The following
+ <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
+ class changes occurred:
+ <itemizedlist>
+ <listitem><para><emphasis>
+ A separate build directory is now used by default:</emphasis>
+ The <filename>autotools</filename> class has been changed
+ to use a directory for building
+ (<link linkend='var-B'><filename>B</filename></link>),
+ which is separate from the source directory
+ (<link linkend='var-S'><filename>S</filename></link>).
+ This is commonly referred to as
+ <filename>B != S</filename>, or an out-of-tree build.</para>
+ <para>If the software being built is already capable of
+ building in a directory separate from the source, you
+ do not need to do anything.
+ However, if the software is not capable of being built
+ in this manner, you will
+ need to either patch the software so that it can build
+ separately, or you will need to change the recipe to
+ inherit the
+ <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
+ class instead of the <filename>autotools</filename> class.
+ </para></listitem>
+ <listitem><para><emphasis>
+ The <filename>&dash;&dash;foreign</filename> option is
+ no longer passed to <filename>automake</filename> when
+ running <filename>autoconf</filename>:</emphasis>
+ This option tells <filename>automake</filename> that a
+ particular software package does not follow the GNU
+ standards and therefore should not be expected
+ to distribute certain files such as
+ <filename>ChangeLog</filename>,
+ <filename>AUTHORS</filename>, and so forth.
+ Because the majority of upstream software packages already
+ tell <filename>automake</filename> to enable foreign mode
+ themselves, the option is mostly superfluous.
+ However, some recipes will need patches for this change.
+ You can easily make the change by patching
+ <filename>configure.ac</filename> so that it passes
+ "foreign" to <filename>AM_INIT_AUTOMAKE()</filename>.
+ See
+ <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=01943188f85ce6411717fb5bf702d609f55813f2'>this commit</ulink>
+ for an example showing how to make the patch.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-1.7-binary-configuration-scripts-disabled'>
+ <title>Binary Configuration Scripts Disabled</title>
+
+ <para>
+ Some of the core recipes that package binary configuration scripts
+ now disable the scripts due to the
+ scripts previously requiring error-prone path substitution.
+ Software that links against these libraries using these scripts
+ should use the much more robust <filename>pkg-config</filename>
+ instead.
+ The list of recipes changed in this version (and their
+ configuration scripts) is as follows:
+ <literallayout class='monospaced'>
+ directfb (directfb-config)
+ freetype (freetype-config)
+ gpgme (gpgme-config)
+ libassuan (libassuan-config)
+ libcroco (croco-6.0-config)
+ libgcrypt (libgcrypt-config)
+ libgpg-error (gpg-error-config)
+ libksba (ksba-config)
+ libpcap (pcap-config)
+ libpcre (pcre-config)
+ libpng (libpng-config, libpng16-config)
+ libsdl (sdl-config)
+ libusb-compat (libusb-config)
+ libxml2 (xml2-config)
+ libxslt (xslt-config)
+ ncurses (ncurses-config)
+ neon (neon-config)
+ npth (npth-config)
+ pth (pth-config)
+ taglib (taglib-config)
+ </literallayout>
+ Additionally, support for <filename>pkg-config</filename> has been
+ added to some recipes in the previous list in the rare cases
+ where the upstream software package does not already provide
+ it.
+ </para>
+ </section>
+
+ <section id='migration-1.7-glibc-replaces-eglibc'>
+ <title><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></title>
+
+ <para>
+ Because <filename>eglibc</filename> and
+ <filename>glibc</filename> were already fairly close, this
+ replacement should not require any significant changes to other
+ software that links to <filename>eglibc</filename>.
+ However, there were a number of minor changes in
+ <filename>glibc 2.20</filename> upstream that could require
+ patching some software (e.g. the removal of the
+ <filename>_BSD_SOURCE</filename> feature test macro).
+ </para>
+
+ <para>
+ <filename>glibc 2.20</filename> requires version 2.6.32 or greater
+ of the Linux kernel.
+ Thus, older kernels will no longer be usable in conjunction with it.
+ </para>
+
+ <para>
+ For full details on the changes in <filename>glibc 2.20</filename>,
+ see the upstream release notes
+ <ulink url='https://sourceware.org/ml/libc-alpha/2014-09/msg00088.html'>here</ulink>.
+ </para>
+ </section>
+
+ <section id='migration-1.7-kernel-module-autoloading'>
+ <title>Kernel Module Autoloading</title>
+
+ <para>
+ The
+ <link linkend='var-module_autoload'><filename>module_autoload_*</filename></link>
+ variable is now deprecated and a new
+ <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
+ variable should be used instead.
+ Also,
+ <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
+ must now be used in conjunction with a new
+ <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
+ variable.
+ The new variables no longer require you to specify the module name
+ as part of the variable name.
+ This change not only simplifies usage but also allows the values
+ of these variables to be appropriately incorporated into task
+ signatures and thus trigger the appropriate tasks to re-execute
+ when changed.
+ You should replace any references to
+ <filename>module_autoload_*</filename> with
+ <filename>KERNEL_MODULE_AUTOLOAD</filename>, and add any modules
+ for which <filename>module_conf_*</filename> is specified to
+ <filename>KERNEL_MODULE_PROBECONF</filename>.
+ </para>
+
+ <para>
+ For more information, see the
+ <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
+ and
+ <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
+ variables.
+ </para>
+ </section>
+
+ <section id='migration-1.7-qa-check-changes'>
+ <title>QA Check Changes</title>
+
+ <para>
+ The following changes have occurred to the QA check process:
+ <itemizedlist>
+ <listitem><para>
+ Additional QA checks <filename>file-rdeps</filename>
+ and <filename>build-deps</filename> have been added in
+ order to verify that file dependencies are satisfied
+ (e.g. package contains a script requiring
+ <filename>/bin/bash</filename>) and build-time dependencies
+ are declared, respectively.
+ For more information, please see the
+ "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
+ chapter.
+ </para></listitem>
+ <listitem><para>
+ Package QA checks are now performed during a new
+ <link linkend='ref-tasks-package_qa'><filename>do_package_qa</filename></link>
+ task rather than being part of the
+ <link linkend='ref-tasks-package'><filename>do_package</filename></link>
+ task.
+ This allows more parallel execution.
+ This change is unlikely to be an issue except for highly
+ customized recipes that disable packaging tasks themselves
+ by marking them as <filename>noexec</filename>.
+ For those packages, you will need to disable the
+ <filename>do_package_qa</filename> task as well.
+ </para></listitem>
+ <listitem><para>
+ Files being overwritten during the
+ <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
+ task now trigger an error instead of a warning.
+ Recipes should not be overwriting files written to the
+ sysroot by other recipes.
+ If you have these types of recipes, you need to alter them
+ so that they do not overwrite these files.</para>
+ <para>You might now receive this error after changes in
+ configuration or metadata resulting in orphaned files
+ being left in the sysroot.
+ If you do receive this error, the way to resolve the issue
+ is to delete your
+ <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
+ or to move it out of the way and then re-start the build.
+ Anything that has been fully built up to that point and
+ does not need rebuilding will be restored from the shared
+ state cache and the rest of the build will be able to
+ proceed as normal.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-1.7-removed-recipes'>
+ <title>Removed Recipes</title>
+
+ <para>
+ The following recipes have been removed:
+ <itemizedlist>
+ <listitem><para>
+ <filename>x-load</filename>:
+ This recipe has been superseded by
+ U-boot SPL for all Cortex-based TI SoCs.
+ For legacy boards, the <filename>meta-ti</filename>
+ layer, which contains a maintained recipe, should be used
+ instead.
+ </para></listitem>
+ <listitem><para>
+ <filename>ubootchart</filename>:
+ This recipe is obsolete.
+ A <filename>bootchart2</filename> recipe has been added
+ to functionally replace it.
+ </para></listitem>
+ <listitem><para>
+ <filename>linux-yocto 3.4</filename>:
+ Support for the linux-yocto 3.4 kernel has been dropped.
+ Support for the 3.10 and 3.14 kernels remains, while
+ support for version 3.17 has been added.
+ </para></listitem>
+ <listitem><para>
+ <filename>eglibc</filename> has been removed in favor of
+ <filename>glibc</filename>.
+ See the
+ "<link linkend='migration-1.7-glibc-replaces-eglibc'><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></link>"
+ section for more information.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-1.7-miscellaneous-changes'>
+ <title>Miscellaneous Changes</title>
+
+ <para>
+ The following miscellaneous change occurred:
+ <itemizedlist>
+ <listitem><para>
+ The build history feature now writes
+ <filename>build-id.txt</filename> instead of
+ <filename>build-id</filename>.
+ Additionally, <filename>build-id.txt</filename>
+ now contains the full build header as printed by
+ BitBake upon starting the build.
+ You should manually remove old "build-id" files from your
+ existing build history repositories to avoid confusion.
+ For information on the build history feature, see the
+ "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
+ section.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</section>
+
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
index e7e9942b3b..fed25b25e6 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -102,10 +102,22 @@
</para>
<para>
+ By default, the <filename>autotools</filename> class
+ uses out-of-tree builds
+ (<link linkend='var-B'><filename>B</filename></link> <filename>!=</filename>
+ <link linkend='var-S'><filename>S</filename></link>).
+ If the software being built by a recipe does not support
+ using out-of-tree builds, you should have the recipe inherit the
+ <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
+ class.
+ </para>
+
+ <para>
It's useful to have some idea of how the tasks defined by this class work
and what they do behind the scenes.
<itemizedlist>
- <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> &dash; Regenerates the
+ <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> &dash;
+ Regenerates the
configure script (using <filename>autoreconf</filename>) and then launches it
with a standard set of arguments used during cross-compilation.
You can pass additional parameters to <filename>configure</filename> through the
@@ -123,17 +135,6 @@
</para></listitem>
</itemizedlist>
</para>
-
- <note>
- It is planned for future Yocto Project releases that by default, the
- <filename>autotools</filename> class supports out-of-tree builds
- (<link linkend='var-B'><filename>B</filename></link> !=
- <link linkend='var-S'><filename>S</filename></link>).
- If your recipes do not support out-of-tree builds, you should
- have them inherit the
- <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
- class.
- </note>
</section>
<section id='ref-classes-autotools-brokensep'>
@@ -186,6 +187,8 @@
binary from source.
The binary package is extracted and new packages in the configured
output package format are created.
+ Extraction and installation of proprietary binaries is a good example
+ use for this class.
<note>
For RPMs and other packages that do not contain a subdirectory,
you should specify a "subdir" parameter.
@@ -229,6 +232,21 @@
</para>
</section>
+<section id='ref-classes-binconfig-disabled'>
+ <title><filename>binconfig-disabled.bbclass</filename></title>
+
+ <para>
+ An alternative version of the
+ <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
+ class, which disables binary configuration scripts by making them
+ return an error in favor of using <filename>pkg-config</filename>
+ to query the information.
+ The scripts to be disabled should be specified using the
+ <link linkend='var-BINCONFIG'><filename>BINCONFIG</filename></link>
+ variable within the recipe inheriting the class.
+ </para>
+</section>
+
<section id='ref-classes-blacklist'>
<title><filename>blacklist.bbclass</filename></title>
@@ -364,6 +382,18 @@
</para>
</section>
+<section id='ref-classes-buildstats-summary'>
+ <title><filename>buildstats-summary.bbclass</filename></title>
+
+ <para>
+ When inherited globally, prints statistics at the end of the build
+ on sstate re-use.
+ In order to function, this class requires the
+ <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
+ class be enabled.
+ </para>
+</section>
+
<section id='ref-classes-ccache'>
<title><filename>ccache.bbclass</filename></title>
@@ -431,6 +461,19 @@
</para>
</section>
+<section id='ref-classes-compress_doc'>
+ <title><filename>compress_doc.bbclass</filename></title>
+
+ <para>
+ Enables compression for man pages and info pages.
+ This class is intended to be inherited globally.
+ The default compression mechanism is gz (gzip) but you can
+ select an alternative mechanism by setting the
+ <link linkend='var-DOC_COMPRESS'><filename>DOC_COMPRESS</filename></link>
+ variable.
+ </para>
+</section>
+
<section id='ref-classes-copyleft_compliance'>
<title><filename>copyleft_compliance.bbclass</filename></title>
@@ -445,6 +488,20 @@
</para>
</section>
+<section id='ref-classes-copyleft_filter'>
+ <title><filename>copyleft_filter.bbclass</filename></title>
+
+ <para>
+ A class used by the
+ <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
+ and
+ <link linkend='ref-classes-copyleft_compliance'><filename>copyleft_compliance</filename></link>
+ classes for filtering licenses.
+ The <filename>copyleft_filter</filename> class is an internal class
+ and is not intended to be used directly.
+ </para>
+</section>
+
<section id='ref-classes-core-image'>
<title><filename>core-image.bbclass</filename></title>
@@ -881,7 +938,8 @@
<itemizedlist>
<listitem><para>
<link linkend='var-INITRD'><filename>INITRD</filename></link>:
- Indicates a filesystem image to use as an initrd (optional).
+ Indicates list of filesystem images to concatenate and use
+ as an initial RAM disk (initrd) (optional).
</para></listitem>
<listitem><para>
<link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
@@ -979,6 +1037,36 @@
</para>
</section>
+<section id='ref-classes-gummiboot'>
+ <title><filename>gummiboot.bbclass</filename></title>
+
+ <para>
+ The <filename>gummiboot</filename> class provides functions specific
+ to the gummiboot bootloader for building bootable images.
+ This is an internal class and is not intended to be
+ used directly.
+ Set the
+ <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
+ variable to "gummiboot" to use this class.
+ </para>
+
+ <para>
+ For information on more variables used and supported in this class,
+ see the
+ <link linkend='var-GUMMIBOOT_CFG'><filename>GUMMIBOOT_CFG</filename></link>,
+ <link linkend='var-GUMMIBOOT_ENTRIES'><filename>GUMMIBOOT_ENTRIES</filename></link>,
+ and
+ <link linkend='var-GUMMIBOOT_TIMEOUT'><filename>GUMMIBOOT_TIMEOUT</filename></link>
+ variables.
+ </para>
+
+ <para>
+ You can also see the
+ <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>
+ for more information.
+ </para>
+</section>
+
<section id='ref-classes-gzipnative'>
<title><filename>gzipnative.bbclass</filename></title>
@@ -1332,6 +1420,35 @@
Currently, this test triggers too many false positives and
thus is not normally enabled.
</para></listitem>
+ <listitem><para><emphasis><filename>build-deps:</filename></emphasis>
+ Determines if a build-time dependency that is specified through
+ <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
+ explicit
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
+ or task-level dependencies exists to match any runtime
+ dependency.
+ This determination is particularly useful to discover where
+ runtime dependencies are detected and added during packaging.
+ If no explicit dependency has been specified within the
+ metadata, at the packaging stage it is too late to ensure that
+ the dependency is built, and thus you can end up with an
+ error when the package is installed into the image during the
+ <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
+ task because the auto-detected dependency was not satisfied.
+ An example of this would be where the
+ <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
+ class automatically adds a dependency on the
+ <filename>initscripts-functions</filename> package to packages
+ that install an initscript that refers to
+ <filename>/etc/init.d/functions</filename>.
+ The recipe should really have an explicit
+ <filename>RDEPENDS</filename> for the package in question on
+ <filename>initscripts-functions</filename> so that the
+ OpenEmbedded build system is able to ensure that the
+ <filename>initscripts</filename> recipe is actually built and
+ thus the <filename>initscripts-functions</filename> package is
+ made available.
+ </para></listitem>
<listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
Checks the
<link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
@@ -1383,6 +1500,25 @@
Some very rare cases do exist for dynamically loaded modules where
these symlinks are needed instead in the main package.
</para></listitem>
+ <listitem><para><emphasis><filename>file-rdeps:</filename></emphasis>
+ Checks that file-level dependencies identified by the
+ OpenEmbedded build system at packaging time are satisfied.
+ For example, a shell script might start with the line
+ <filename>#!/bin/bash</filename>.
+ This line would translate to a file dependency on
+ <filename>/bin/bash</filename>.
+ Of the three package managers that the OpenEmbedded build
+ system supports, only RPM directly handles file-level
+ dependencies, resolving them automatically to packages
+ providing the files.
+ However, the lack of that functionality in the other two
+ package managers does not mean the dependencies do not still
+ need resolving.
+ This QA check attempts to ensure that explicitly declared
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
+ exist to handle any file-level dependency detected in
+ packaged files.
+ </para></listitem>
<listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
Checks for
<link linkend='var-FILES'><filename>FILES</filename></link>
@@ -1895,13 +2031,13 @@
You can create a recipe that builds tools that run natively on the
host a couple different ways:
<itemizedlist>
- <listitem><para>Create a <filename>myrecipe-native.bb</filename>
+ <listitem><para>Create a <replaceable>myrecipe</replaceable><filename>-native.bb</filename>
that inherits the <filename>native</filename> class.
If you use this method, you must order the inherit statement
in the recipe after all other inherit statements so that the
<filename>native</filename> class is inherited last.
</para></listitem>
- <listitem><para>Create or modify a target recipe that has adds
+ <listitem><para>Create or modify a target recipe that contains
the following:
<literallayout class='monospaced'>
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
@@ -1936,7 +2072,7 @@
You can create a recipe that builds tools that run on the SDK machine
a couple different ways:
<itemizedlist>
- <listitem><para>Create a <filename>myrecipe-nativesdk.bb</filename>
+ <listitem><para>Create a <replaceable>myrecipe</replaceable><filename>-nativesdk.bb</filename>
recipe that inherits the <filename>nativesdk</filename> class.
If you use this method, you must order the inherit statement
in the recipe after all other inherit statements so that the
@@ -2339,7 +2475,7 @@
<itemizedlist>
<listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
The base class supporting SDK creation under all package
- managers (i.e. DEB, RPM, and IPK).</para></listitem>
+ managers (i.e. DEB, RPM, and opkg).</para></listitem>
<listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
Supports creation of the SDK given the Debian package manager.
</para></listitem>
@@ -2347,13 +2483,14 @@
Supports creation of the SDK given the RPM package manager.
</para></listitem>
<listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
- Supports creation of the SDK given the IPK package manager.
+ Supports creation of the SDK given the opkg (IPK format)
+ package manager.
</para></listitem>
</itemizedlist>
</para>
<para>
- The <filename>populate_sdk_base</filename> package inherits the
+ The <filename>populate_sdk_base</filename> class inherits the
appropriate <filename>populate_sdk_*</filename> (i.e.
<filename>deb</filename>, <filename>rpm</filename>, and
<filename>ipk</filename>) based on
@@ -2364,8 +2501,8 @@
The base class ensures all source and destination directories are
established and then populates the SDK.
After populating the SDK, the <filename>populate_sdk_base</filename>
- class constructs two images:
- <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>-nativesdk</filename>,
+ class constructs two sysroots:
+ <filename>${</filename><link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>}-nativesdk</filename>,
which contains the cross-compiler and associated tooling, and the
target, which contains a target root filesystem that is configured for
the SDK usage.
@@ -2373,8 +2510,8 @@
<link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
which consists of the following:
<literallayout class='monospaced'>
- ${SDK_OUTPUT}/&lt;sdk_arch-nativesdk pkgs&gt;
- ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/&lt;target pkgs&gt;
+ ${SDK_OUTPUT}/${SDK_ARCH}<replaceable>-nativesdk-pkgs</replaceable>
+ ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<replaceable>target-pkgs</replaceable>
</literallayout>
</para>
@@ -2480,6 +2617,22 @@
</para>
</section>
+<section id='ref-classes-ptest-gnome'>
+ <title><filename>ptest-gnome.bbclass</filename></title>
+
+ <para>
+ Enables package tests (ptests) specifically for GNOME packages,
+ which have tests intended to be executed with
+ <filename>gnome-desktop-testing</filename>.
+ </para>
+
+ <para>
+ For information on setting up and running ptests, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
+ section in the Yocto Project Development Manual.
+ </para>
+</section>
+
<section id='ref-classes-python-dir'>
<title><filename>python-dir.bbclass</filename></title>
@@ -2863,37 +3016,37 @@
<para>
The class supports the following variables:
<itemizedlist>
- <listitem><para><emphasis><link linkend='var-INITRD'><filename>INITRD</filename></link>:</emphasis>
- Indicates a filesystem image to use as an initial RAM disk
- (initrd).
+ <listitem><para><link linkend='var-INITRD'><filename>INITRD</filename></link>:
+ Indicates list of filesystem images to concatenate and use as
+ an initial RAM disk (initrd).
This variable is optional.</para></listitem>
- <listitem><para><emphasis><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
Indicates a filesystem image to include as the root filesystem.
This variable is optional.</para></listitem>
- <listitem><para><emphasis><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:
Enables creating an automatic menu when set to "1".
</para></listitem>
- <listitem><para><emphasis><link linkend='var-LABELS'><filename>LABELS</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-LABELS'><filename>LABELS</filename></link>:
Lists targets for automatic configuration.
</para></listitem>
- <listitem><para><emphasis><link linkend='var-APPEND'><filename>APPEND</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-APPEND'><filename>APPEND</filename></link>:
Lists append string overrides for each label.
</para></listitem>
- <listitem><para><emphasis><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:
Lists additional options to add to the syslinux file.
Semicolon characters separate multiple options.
</para></listitem>
- <listitem><para><emphasis><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:
Lists a background for the VGA boot menu when you are using the
boot menu.</para></listitem>
- <listitem><para><emphasis><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:
Set to "console=ttyX" to change kernel boot default console.
</para></listitem>
- <listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:
Sets an alternate serial port.
Or, turns off serial when the variable is set with an
empty string.</para></listitem>
- <listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:</emphasis>
+ <listitem><para><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:
Sets an alternate "console=tty..." kernel boot argument.
</para></listitem>
</itemizedlist>
@@ -3003,6 +3156,27 @@
</para>
</section>
+<section id='ref-classes-texinfo'>
+ <title><filename>texinfo.bbclass</filename></title>
+
+ <para>
+ This class should be inherited by recipes whose upstream packages
+ invoke the <filename>texinfo</filename> utilities at build-time.
+ Native and cross recipes are made to use the dummy scripts provided
+ by <filename>texinfo-dummy-native</filename>, for improved performance.
+ Target architecture recipes use the genuine
+ Texinfo utilities.
+ By default, they use the Texinfo utilities on the host system.
+ <note>
+ If you want to use the Texinfo recipe shipped with the build
+ system, you can remove "texinfo-native" from
+ <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link>
+ and makeinfo from
+ <link linkend='var-SANITY_REQUIRED_UTILITIES'><filename>SANITY_REQUIRED_UTILITIES</filename></link>.
+ </note>
+ </para>
+</section>
+
<section id='ref-classes-tinderclient'>
<title><filename>tinderclient.bbclass</filename></title>
@@ -3078,6 +3252,21 @@
</para>
</section>
+<section id='ref-classes-uninative'>
+ <title><filename>uninative.bbclass</filename></title>
+
+ <para>
+ Provides a means of reusing <filename>native/cross</filename> over
+ multiple distros.
+ <note>
+ Currently, the method used by the <filename>uninative</filename>
+ class is experimental.
+ </note>
+ For more information, see the commit message
+ <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=e66c96ae9c7ba21ebd04a4807390f0031238a85a'>here</ulink>.
+ </para>
+</section>
+
<section id='ref-classes-update-alternatives'>
<title><filename>update-alternatives.bbclass</filename></title>
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
index 4aafaea674..230cabd155 100644
--- a/documentation/ref-manual/ref-features.xml
+++ b/documentation/ref-manual/ref-features.xml
@@ -7,8 +7,8 @@
<para>
This chapter provides a reference of shipped machine and distro features
- you can include as part of the image, a reference on image types you can
- build, and a reference on feature backfilling.
+ you can include as part of your image, a reference on image features you can
+ select, and a reference on feature backfilling.
</para>
<para>
@@ -16,7 +16,10 @@
should be included in the generated images.
Distributions can select which features they want to support through the
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
- variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
+ variable, which is set or appended to in a distribution's configuration file such as
+ <filename>poky.conf</filename>,
+ <filename>poky-tiny.conf</filename>,
+ <filename>poky-lsb.conf</filename> and so forth.
Machine features are set in the
<filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
variable, which is set in the machine configuration file and
@@ -39,7 +42,7 @@
changed based on a given feature:
<literallayout class='monospaced'>
$ cd poky
- $ git grep 'contains.*MACHINE_FEATURES.*&lt;feature&gt;'
+ $ git grep 'contains.*MACHINE_FEATURES.*<replaceable>feature</replaceable>'
</literallayout>
</para>
@@ -69,16 +72,26 @@
</para></listitem>
<listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
</para></listitem>
+ <listitem><para><emphasis>efi:</emphasis> Support for booting through EFI
+ </para></listitem>
<listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
</para></listitem>
<listitem><para><emphasis>irda:</emphasis> Hardware has IrDA support
</para></listitem>
<listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
</para></listitem>
+ <listitem><para><emphasis>pcbios:</emphasis> Support for booting through BIOS
+ </para></listitem>
<listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
</para></listitem>
<listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
</para></listitem>
+ <listitem><para><emphasis>phone:</emphasis> Mobile phone (voice) support
+ </para></listitem>
+ <listitem><para><emphasis>qvga:</emphasis> Machine has a QVGA (320x240) display
+ </para></listitem>
+ <listitem><para><emphasis>rtc:</emphasis> Machine has a Real-Time Clock
+ </para></listitem>
<listitem><para><emphasis>screen:</emphasis> Hardware has a screen
</para></listitem>
<listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
@@ -89,6 +102,8 @@
</para></listitem>
<listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
</para></listitem>
+ <listitem><para><emphasis>vfat:</emphasis> FAT file system support
+ </para></listitem>
<listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
</para></listitem>
</itemizedlist>
@@ -192,51 +207,100 @@
<title>Image Features</title>
<para>
- The contents of images generated by the OpenEmbedded build system can be controlled by the
- <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
- and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
+ The contents of images generated by the OpenEmbedded build system
+ can be controlled by the
+ <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
+ and
+ <link linkend='var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></link>
variables that you typically configure in your image recipes.
Through these variables, you can add several different
- predefined packages such as development utilities or packages with debug
- information needed to investigate application problems or profile applications.
+ predefined packages such as development utilities or packages with
+ debug information needed to investigate application problems or
+ profile applications.
</para>
<para>
- Current list of
- <filename>IMAGE_FEATURES</filename> contains the following:
+ The following image features are available for all images:
<itemizedlist>
- <listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
- installed in a given image.</para></listitem>
- <listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
- extra library links) for all packages installed in a given image.</para></listitem>
- <listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
- installed in a given image.</para></listitem>
- <listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
- <listitem><para><emphasis>read-only-rootfs:</emphasis> Creates
- an image whose root filesystem is read-only.
+ <listitem><para><emphasis>dbg-pkgs:</emphasis>
+ Installs debug symbol packages for all packages installed
+ in a given image.
+ </para></listitem>
+ <listitem><para><emphasis>debug-tweaks:</emphasis>
+ Makes an image suitable for development (e.g.
+ allows root logins without passwords).
+ </para></listitem>
+ <listitem><para><emphasis>dev-pkgs:</emphasis>
+ Installs development packages (headers and extra library
+ links) for all packages installed in a given image.
+ </para></listitem>
+ <listitem><para><emphasis>doc-pkgs:</emphasis> Installs
+ documentation packages for all packages installed in a
+ given image.
+ </para></listitem>
+ <listitem><para><emphasis>package-management:</emphasis>
+ Installs package management tools and preserves the package
+ manager database.
+ </para></listitem>
+ <listitem><para><emphasis>ptest-pkgs:</emphasis>
+ Installs ptest packages for all ptest-enabled recipes.
+ </para></listitem>
+ <listitem><para><emphasis>read-only-rootfs:</emphasis>
+ Creates an image whose root filesystem is read-only.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
section in the Yocto Project Development Manual for more
- information.</para></listitem>
- <listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
- By default, this screen is provided by <filename>psplash</filename>, which does
- allow customization.
- If you prefer to use an alternative splash screen package, you can do so by
- setting the <filename>SPLASH</filename> variable
- to a different package name (or names) within the image recipe or at the distro
- configuration level.</para></listitem>
- <listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
- SSH server.
- </para></listitem>
- <listitem><para><emphasis>ssh-server-openssh:</emphasis> Installs the OpenSSH SSH server,
- which is more full-featured than Dropbear.
- Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server
- are present in <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
- precedence and Dropbear will not be installed.</para></listitem>
- <listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
- packages (i.e. static libraries containing <filename>*.a</filename> files) for all
- packages installed in a given image.</para></listitem>
- <listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
+ information.
+ </para></listitem>
+ <listitem><para><emphasis>splash:</emphasis>
+ Enables showing a splash screen during boot.
+ By default, this screen is provided by
+ <filename>psplash</filename>, which does allow
+ customization.
+ If you prefer to use an alternative splash screen package,
+ you can do so by setting the <filename>SPLASH</filename>
+ variable to a different package name (or names) within the
+ image recipe or at the distro configuration level.
+ </para></listitem>
+ <listitem><para><emphasis>staticdev-pkgs:</emphasis>
+ Installs static development packages, which are
+ static libraries (i.e. <filename>*.a</filename> files), for
+ all packages installed in a given image.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Some image features are available only when you inherit the
+ <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
+ class.
+ The current list of these valid features is as follows:
+ <itemizedlist>
+ <listitem><para><emphasis>eclipse-debug:</emphasis> Provides
+ Eclipse remote debugging support.
+ </para></listitem>
+ <listitem><para><emphasis>hwcodecs:</emphasis> Installs
+ hardware acceleration codecs.
+ </para></listitem>
+ <listitem><para><emphasis>nfs-server:</emphasis>
+ Installs an NFS server.
+ </para></listitem>
+ <listitem><para><emphasis>qt4-pkgs:</emphasis>
+ Supports Qt4/X11 and demo applications.
+ </para></listitem>
+ <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
+ Installs the Dropbear minimal SSH server.
+ </para></listitem>
+ <listitem><para><emphasis>ssh-server-openssh:</emphasis>
+ Installs the OpenSSH SSH server, which is more
+ full-featured than Dropbear.
+ Note that if both the OpenSSH SSH server and the Dropbear
+ minimal SSH server are present in
+ <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
+ precedence and Dropbear will not be installed.
+ </para></listitem>
+ <listitem><para><emphasis>tools-debug:</emphasis>
+ Installs debugging tools such as
<filename>strace</filename> and <filename>gdb</filename>.
For information on GDB, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
@@ -244,23 +308,33 @@
For information on tracing and profiling, see the
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
</para></listitem>
- <listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
- <filename>oprofile</filename>, <filename>exmap</filename>, and
- <filename>LTTng</filename>.
+ <listitem><para><emphasis>tools-profile:</emphasis>
+ Installs profiling tools such as
+ <filename>oprofile</filename>, <filename>exmap</filename>,
+ and <filename>LTTng</filename>.
For general information on user-space tools, see the
"<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
- section in the Yocto Project Application Developer's Guide.</para></listitem>
- <listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
+ section in the Yocto Project Application Developer's
+ Guide.
+ </para></listitem>
+ <listitem><para><emphasis>tools-sdk:</emphasis>
+ Installs a full SDK that runs on the device.
+ </para></listitem>
+ <listitem><para><emphasis>tools-testapps:</emphasis>
+ Installs device testing tools (e.g. touchscreen debugging).
</para></listitem>
- <listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
- touchscreen debugging).</para></listitem>
- <listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
- <listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
- minimal environment.</para></listitem>
- <listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
+ <listitem><para><emphasis>x11:</emphasis>
+ Installs the X server.
+ </para></listitem>
+ <listitem><para><emphasis>x11-base:</emphasis>
+ Installs the X server with a minimal environment.
+ </para></listitem>
+ <listitem><para><emphasis>x11-sato:</emphasis>
+ Installs the OpenedHand Sato environment.
</para></listitem>
</itemizedlist>
</para>
+
</section>
<section id='ref-features-backfill'>
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
index 7727e0a869..d15ca5b93a 100644
--- a/documentation/ref-manual/ref-images.xml
+++ b/documentation/ref-manual/ref-images.xml
@@ -13,153 +13,156 @@
</para>
<note>
- Building an image without GNU General Public License Version 3 (GPLv3) components
+ Building an image without GNU General Public License Version 3 (GPLv3),
+ GNU Lesser General Public License Version 3 (LGPLv3), and the
+ GNU Affero General Public License Version 3 (AGPL-3.0) components
is only supported for minimal and base images.
- Furthermore, if you are going to build an image using non-GPLv3 components,
- you must make the following changes in the <filename>local.conf</filename> file
- before using the BitBake command to build the minimal or base image:
+ Furthermore, if you are going to build an image using non-GPLv3 and
+ similarly licensed components, you must make the following changes in
+ the <filename>local.conf</filename> file before using the BitBake
+ command to build the minimal or base image:
<literallayout class='monospaced'>
1. Comment out the EXTRA_IMAGE_FEATURES line
- 2. Set INCOMPATIBLE_LICENSE = "GPLv3"
+ 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
</literallayout>
</note>
<para>
- From within the <filename>poky</filename> Git repository, use the following command to list
- the supported images:
+ From within the <filename>poky</filename> Git repository, you can use
+ the following command to display the list of directories within the
+ <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ that containe image recipe files:
<literallayout class='monospaced'>
$ ls meta*/recipes*/images/*.bb
</literallayout>
- These recipes reside in the <filename>meta/recipes-core/images</filename>,
- <filename>meta/recipes-extended/images</filename>,
- <filename>meta/recipes-graphics/images</filename>,
- <filename>meta/recipes-qt/images</filename>,
- <filename>meta/recipes-rt/images</filename>,
- <filename>meta/recipes-sato/images</filename>, and
- <filename>meta-skeleton/recipes-multilib/images</filename> directories
- within the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
- Although the recipe names are somewhat explanatory, here is a list that describes them:
</para>
- <itemizedlist>
- <listitem><para><emphasis><filename>build-appliance-image</filename>:</emphasis>
- An example virtual machine that contains all the pieces required to
- run builds using the build system as well as the build system itself.
- You can boot and run the image using either the
- <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
- or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
- For more information on this image, see the
- <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
- the Yocto Project website.</para></listitem>
- <listitem><para><emphasis><filename>core-image-base</filename>:</emphasis>
- A console-only image that fully supports the target device hardware.</para></listitem>
- <listitem><para><emphasis><filename>core-image-minimal</filename>:</emphasis>
- A small image just capable of allowing a device to boot.</para></listitem>
- <listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
- A <filename>core-image-minimal</filename> image suitable for development work
- using the host.
- The image includes headers and libraries you can use in a host development
- environment.
- </para></listitem>
- <listitem><para id='images-core-image-minimal-initramfs'><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
- A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
- Initial Root Filesystem (initramfs) as part of the kernel,
- which allows the system to find the first “init†program more efficiently.
- See the
- <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
- variable for additional information helpful when working with
- initramfs images.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
- A <filename>core-image-minimal</filename> image that has support
- for the Minimal MTD Utilities, which let the user interact with the
- MTD subsystem in the kernel to perform operations on flash devices.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-full-cmdline</filename>:</emphasis>
- A console-only image with more full-featured Linux system
- functionality installed.</para></listitem>
- <listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
- An image that conforms to the Linux Standard Base (LSB)
- specification.
- This image requires a distribution configuration that
- enables LSB compliance (e.g. <filename>poky-lsb</filename>).
- If you build <filename>core-image-lsb</filename> without that
- configuration, the image will not be LSB-compliant.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
- A <filename>core-image-lsb</filename> image that is suitable for development work
- using the host.
- The image includes headers and libraries you can use in a host development
- environment.
- This image requires a distribution configuration that
- enables LSB compliance (e.g. <filename>poky-lsb</filename>).
- If you build <filename>core-image-lsb-dev</filename> without that
- configuration, the image will not be LSB-compliant.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
- A <filename>core-image-lsb</filename> that includes everything in
- meta-toolchain but also includes development headers and libraries
- to form a complete standalone SDK.
- This image requires a distribution configuration that
- enables LSB compliance (e.g. <filename>poky-lsb</filename>).
- If you build <filename>core-image-lsb-sdk</filename> without that
- configuration, the image will not be LSB-compliant.
- This image is suitable for development using the target.</para></listitem>
- <listitem><para><emphasis><filename>core-image-testmaster</filename>:</emphasis>
- A "master" image designed to be used for automated runtime testing.
- Provides a "known good" image that is deployed to a separate
- partition so that you can boot into it and use it to deploy a
- second image to be tested.
- You can find more information about runtime testing in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
- An image with support for the Open GL-based toolkit Clutter, which enables development of
- rich and animated graphical user interfaces.</para></listitem>
- <listitem><para><emphasis><filename>core-image-directfb</filename>:</emphasis>
- An image that uses <filename>directfb</filename> instead of X11.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
- A very basic X11 image with a terminal.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-weston</filename>:</emphasis>
- A very basic Wayland image with a terminal.
- This image provides the Wayland protocol libraries and the
- reference Weston compositor.
- For more information, see the
- "<link linkend='wayland'>Wayland</link>" section.
- </para></listitem>
- <listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis>
- An image that launches into the demo application for the embedded
- (not based on X11) version of Qt.</para></listitem>
- <listitem><para><emphasis><filename>core-image-rt</filename>:</emphasis>
- A <filename>core-image-minimal</filename> image plus a real-time test suite and
- tools appropriate for real-time use.</para></listitem>
- <listitem><para><emphasis><filename>core-image-rt-sdk</filename>:</emphasis>
- A <filename>core-image-rt</filename> image that includes everything in
- <filename>meta-toolchain</filename>.
- The image also includes development headers and libraries to form a complete
- stand-alone SDK and is suitable for development using the target.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
- An image with Sato support, a mobile environment and visual style that works well
- with mobile devices.
- The image supports X11 with a Sato theme and applications such as
- a terminal, editor, file manager, media player, and so forth.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
- A <filename>core-image-sato</filename> image suitable for development
- using the host.
- The image includes libraries needed to build applications on the device itself,
- testing and profiling tools, and debug symbols.
- This image was formerly <filename>core-image-sdk</filename>.
- </para></listitem>
- <listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
- A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
- The image also includes development headers and libraries to form a complete standalone SDK
- and is suitable for development using the target.</para></listitem>
- </itemizedlist>
+ <para>
+ Following is a list of supported recipes:
+ <itemizedlist>
+ <listitem><para><filename>build-appliance-image</filename>:
+ An example virtual machine that contains all the pieces required to
+ run builds using the build system as well as the build system itself.
+ You can boot and run the image using either the
+ <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
+ or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
+ For more information on this image, see the
+ <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
+ the Yocto Project website.</para></listitem>
+ <listitem><para><filename>core-image-base</filename>:
+ A console-only image that fully supports the target device hardware.</para></listitem>
+ <listitem><para><filename>core-image-clutter</filename>:
+ An image with support for the Open GL-based toolkit Clutter, which enables development of
+ rich and animated graphical user interfaces.</para></listitem>
+ <listitem><para><filename>core-image-directfb</filename>:
+ An image that uses <filename>directfb</filename> instead of X11.
+ </para></listitem>
+ <listitem><para><filename>core-image-full-cmdline</filename>:
+ A console-only image with more full-featured Linux system
+ functionality installed.</para></listitem>
+ <listitem><para><filename>core-image-lsb</filename>:
+ An image that conforms to the Linux Standard Base (LSB)
+ specification.
+ This image requires a distribution configuration that
+ enables LSB compliance (e.g. <filename>poky-lsb</filename>).
+ If you build <filename>core-image-lsb</filename> without that
+ configuration, the image will not be LSB-compliant.
+ </para></listitem>
+ <listitem><para><filename>core-image-lsb-dev</filename>:
+ A <filename>core-image-lsb</filename> image that is suitable for development work
+ using the host.
+ The image includes headers and libraries you can use in a host development
+ environment.
+ This image requires a distribution configuration that
+ enables LSB compliance (e.g. <filename>poky-lsb</filename>).
+ If you build <filename>core-image-lsb-dev</filename> without that
+ configuration, the image will not be LSB-compliant.
+ </para></listitem>
+ <listitem><para><filename>core-image-lsb-sdk</filename>:
+ A <filename>core-image-lsb</filename> that includes everything in
+ meta-toolchain but also includes development headers and libraries
+ to form a complete standalone SDK.
+ This image requires a distribution configuration that
+ enables LSB compliance (e.g. <filename>poky-lsb</filename>).
+ If you build <filename>core-image-lsb-sdk</filename> without that
+ configuration, the image will not be LSB-compliant.
+ This image is suitable for development using the target.</para></listitem>
+ <listitem><para><filename>core-image-minimal</filename>:
+ A small image just capable of allowing a device to boot.</para></listitem>
+ <listitem><para><filename>core-image-minimal-dev</filename>:
+ A <filename>core-image-minimal</filename> image suitable for development work
+ using the host.
+ The image includes headers and libraries you can use in a host development
+ environment.
+ </para></listitem>
+ <listitem><para id='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename>:
+ A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
+ Initial Root Filesystem (initramfs) as part of the kernel,
+ which allows the system to find the first “init†program more efficiently.
+ See the
+ <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
+ variable for additional information helpful when working with
+ initramfs images.
+ </para></listitem>
+ <listitem><para><filename>core-image-minimal-mtdutils</filename>:
+ A <filename>core-image-minimal</filename> image that has support
+ for the Minimal MTD Utilities, which let the user interact with the
+ MTD subsystem in the kernel to perform operations on flash devices.
+ </para></listitem>
+ <listitem><para><filename>core-image-rt</filename>:
+ A <filename>core-image-minimal</filename> image plus a real-time test suite and
+ tools appropriate for real-time use.</para></listitem>
+ <listitem><para><filename>core-image-rt-sdk</filename>:
+ A <filename>core-image-rt</filename> image that includes everything in
+ <filename>meta-toolchain</filename>.
+ The image also includes development headers and libraries to form a complete
+ stand-alone SDK and is suitable for development using the target.
+ </para></listitem>
+ <listitem><para><filename>core-image-sato</filename>:
+ An image with Sato support, a mobile environment and visual style that works well
+ with mobile devices.
+ The image supports X11 with a Sato theme and applications such as
+ a terminal, editor, file manager, media player, and so forth.
+ </para></listitem>
+ <listitem><para><filename>core-image-sato-dev</filename>:
+ A <filename>core-image-sato</filename> image suitable for development
+ using the host.
+ The image includes libraries needed to build applications on the device itself,
+ testing and profiling tools, and debug symbols.
+ This image was formerly <filename>core-image-sdk</filename>.
+ </para></listitem>
+ <listitem><para><filename>core-image-sato-sdk</filename>:
+ A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
+ The image also includes development headers and libraries to form a complete standalone SDK
+ and is suitable for development using the target.</para></listitem>
+ <listitem><para><filename>core-image-testmaster</filename>:
+ A "master" image designed to be used for automated runtime testing.
+ Provides a "known good" image that is deployed to a separate
+ partition so that you can boot into it and use it to deploy a
+ second image to be tested.
+ You can find more information about runtime testing in the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
+ section in the Yocto Project Development Manual.
+ </para></listitem>
+ <listitem><para><filename>core-image-testmaster-initramfs</filename>:
+ A RAM-based Initial Root Filesystem (initramfs) image tailored for
+ use with the <filename>core-image-testmaster</filename> image.
+ </para></listitem>
+ <listitem><para><filename>core-image-weston</filename>:
+ A very basic Wayland image with a terminal.
+ This image provides the Wayland protocol libraries and the
+ reference Weston compositor.
+ For more information, see the
+ "<link linkend='wayland'>Wayland</link>" section.
+ </para></listitem>
+ <listitem><para><filename>core-image-x11</filename>:
+ A very basic X11 image with a terminal.
+ </para></listitem>
+ <listitem><para><filename>qt4e-demo-image</filename>:
+ An image that launches into the demo application for the embedded
+ (not based on X11) version of Qt.</para></listitem>
+ </itemizedlist>
+ </para>
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
index 05c9b979b1..1bee3bd5d3 100644
--- a/documentation/ref-manual/ref-manual-customization.xsl
+++ b/documentation/ref-manual/ref-manual-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
@@ -9,6 +9,7 @@
<xsl:include href="../template/division.title.xsl"/>
<xsl:include href="../template/formal.object.heading.xsl"/>
<xsl:include href="../template/gloss-permalinks.xsl"/>
+ <xsl:include href="../template/qa-code-permalinks.xsl"/>
<xsl:param name="html.stylesheet" select="'ref-style.css'" />
<xsl:param name="chapter.autolabel" select="1" />
diff --git a/documentation/ref-manual/ref-manual.xml b/documentation/ref-manual/ref-manual.xml
index 3eff7de712..cf586e721d 100644
--- a/documentation/ref-manual/ref-manual.xml
+++ b/documentation/ref-manual/ref-manual.xml
@@ -84,9 +84,14 @@
</revision>
<revision>
<revnumber>1.7</revnumber>
- <date>Fall of 2014</date>
+ <date>October 2014</date>
<revremark>Released with the Yocto Project 1.7 Release.</revremark>
</revision>
+ <revision>
+ <revnumber>1.8</revnumber>
+ <date>Sometime in 2015</date>
+ <revremark>Released with the Yocto Project 1.8 Release.</revremark>
+ </revision>
</revhistory>
<copyright>
diff --git a/documentation/ref-manual/ref-qa-checks.xml b/documentation/ref-manual/ref-qa-checks.xml
index 15c1bbe4f5..871cd294f6 100644
--- a/documentation/ref-manual/ref-qa-checks.xml
+++ b/documentation/ref-manual/ref-qa-checks.xml
@@ -59,10 +59,21 @@
<section id='qa-errors-and-warnings'>
<title>Errors and Warnings</title>
+<!--
+This section uses the <para><code> construct to enable permalinks for the
+various QA issue and warning messages. The file templates/qa-code-permalinks.xsl
+is used to locate the construct and generate the permalink. This solution
+leverages the fact that right now this section in the ref-manual is the only
+place is all the YP docs that uses the <para><code> construct. If, in the
+future, that construct were to appear in the ref-manual, a generic permalink
+would be generated for the text between <code></code>. If a better solution
+can be found then it should be implemented. I can't find one at the moment.
+-->
+
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-libexec'>
<code>
&lt;packagename&gt;: &lt;path&gt; is using libexec please relocate to &lt;libexecdir&gt; [libexec]
</code>
@@ -87,7 +98,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-rpaths'>
<code>
package &lt;packagename&gt; contains bad RPATH &lt;rpath&gt; in file &lt;file&gt; [rpaths]
</code>
@@ -119,7 +130,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-useless-rpaths'>
<code>
&lt;packagename&gt;: &lt;file&gt; contains probably-redundant RPATH &lt;rpath&gt; [useless-rpaths]
</code>
@@ -147,7 +158,63 @@
<para>
<itemizedlist>
<listitem>
+ <para id='qa-issue-file-rdeps'>
+ <code>
+ &lt;packagename&gt; requires &lt;files&gt;, but no providers in its RDEPENDS [file-rdeps]
+ </code>
+ </para>
+
<para>
+ A file-level dependency has been identified from the
+ specified package on the specified files, but there is
+ no explicit corresponding entry in
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
+ If particular files are required at runtime then
+ <filename>RDEPENDS</filename> should be declared in the
+ recipe to ensure the packages providing them are built.
+ </para>
+
+ <para>
+ &nbsp;
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para id='qa-issue-build-deps'>
+ <code>
+ &lt;packagename1&gt; rdepends on &lt;packagename2&gt;, but it isn't a build dependency? [build-deps]
+ </code>
+ </para>
+
+ <para>
+ A runtime dependency exists between the two specified
+ packages, but there is nothing explicit within the recipe
+ to enable the OpenEmbedded build system to ensure that
+ dependency is satisfied.
+ This condition is usually triggered by an
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
+ value being added at the packaging stage rather than up
+ front, which is usually automatic based on the contents of
+ the package.
+ In most cases, you should change the recipe to add an
+ explicit <filename>RDEPENDS</filename> for the dependency.
+ </para>
+
+ <para>
+ &nbsp;
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para id='qa-issue-dev-so'>
<code>
non -dev/-dbg/-nativesdk package contains symlink .so: &lt;packagename&gt; path '&lt;path&gt;' [dev-so]
</code>
@@ -178,7 +245,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-staticdev'>
<code>
non -staticdev package contains static .a library: &lt;packagename&gt; path '&lt;path&gt;' [staticdev]
</code>
@@ -205,7 +272,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-libdir'>
<code>
&lt;packagename&gt;: found library in wrong location [libdir]
</code>
@@ -236,7 +303,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-debug-files'>
<code>
non debug package contains .debug directory: &lt;packagename&gt; path &lt;path&gt; [debug-files]
</code>
@@ -269,7 +336,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-arch'>
<code>
Architecture did not match (&lt;machine_arch&gt; to &lt;file_arch&gt;) on &lt;file&gt; [arch]
</code>
@@ -308,7 +375,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-arch-bit-size-no-match'>
<code>
Bit size did not match (&lt;machine_bits&gt; to &lt;file_bits&gt;) &lt;recipe&gt; on &lt;file&gt; [arch]
</code>
@@ -347,7 +414,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-arch-endianness-no-match'>
<code>
Endianness did not match (&lt;machine_endianness&gt; to &lt;file_endianness&gt;) on &lt;file&gt; [arch]
</code>
@@ -386,7 +453,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-textrel'>
<code>
ELF binary '&lt;file&gt;' has relocations in .text [textrel]
</code>
@@ -397,13 +464,6 @@
<filename>.text</filename> sections.
This situation can result in a performance impact
at runtime.
- <note>
- A bug currently exists that causes this
- warning to appear erroneously.
- See
- <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=6104'></ulink>
- for more information.
- </note>
</para>
<para>
@@ -416,7 +476,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-ldflags'>
<code>
No GNU_HASH in the elf binary: '&lt;file&gt;' [ldflags]
</code>
@@ -448,7 +508,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-xorg-driver-abi'>
<code>
Package &lt;packagename&gt; contains Xorg driver (&lt;driver&gt;) but no xorg-abi- dependencies [xorg-driver-abi]
</code>
@@ -478,7 +538,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-infodir'>
<code>
The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]
</code>
@@ -506,7 +566,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-symlink-to-sysroot'>
<code>
Symlink &lt;path&gt; in &lt;packagename&gt; points to TMPDIR [symlink-to-sysroot]
</code>
@@ -533,7 +593,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-la'>
<code>
&lt;file&gt; failed sanity test (workdir) in path &lt;path&gt; [la]
</code>
@@ -559,7 +619,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-pkgconfig'>
<code>
&lt;file&gt; failed sanity test (tmpdir) in path &lt;path&gt; [pkgconfig]
</code>
@@ -584,7 +644,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-debug-deps'>
<code>
&lt;packagename&gt; rdepends on &lt;debug_packagename&gt; [debug-deps]
</code>
@@ -632,7 +692,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-dev-deps'>
<code>
&lt;packagename&gt; rdepends on &lt;dev_packagename&gt; [dev-deps]
</code>
@@ -667,7 +727,7 @@
files that it should not have (e.g. a non-symlink
<filename>.so</filename> file) or it might have been added
manually (e.g. by adding to
- <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
</para>
<para>
@@ -680,7 +740,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-dep-cmp'>
<code>
&lt;var&gt;_&lt;packagename&gt; is invalid: &lt;comparison&gt; (&lt;value&gt;) only comparisons &lt;, =, &gt;, &lt;=, and &gt;= are allowed [dep-cmp]
</code>
@@ -711,7 +771,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-compile-host-path'>
<code>
&lt;recipename&gt;: The compile log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [compile-host-path]
</code>
@@ -736,7 +796,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-install-host-path'>
<code>
&lt;recipename&gt;: The install log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [install-host-path]
</code>
@@ -761,7 +821,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-autoconf-log'>
<code>
This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. The path was '&lt;path&gt;'
</code>
@@ -786,7 +846,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-pkgname'>
<code>
&lt;packagename&gt; doesn't match the [a-z0-9.+-]+ regex [pkgname]
</code>
@@ -818,7 +878,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-unknown-configure-option'>
<code>
&lt;recipe&gt;: configure was passed unrecognized options: &lt;options&gt; [unknown-configure-option]
</code>
@@ -854,7 +914,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-pn-overrides'>
<code>
Recipe &lt;recipefile&gt; has PN of "&lt;recipename&gt;" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]
</code>
@@ -894,7 +954,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-pkgvarcheck'>
<code>
&lt;recipefile&gt;: Variable &lt;variable&gt; is set as not being package specific, please fix this. [pkgvarcheck]
</code>
@@ -932,7 +992,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-already-stripped'>
<code>
File '&lt;file&gt;' from &lt;recipename&gt; was already stripped, this will prevent future debugging! [already-stripped]
</code>
@@ -977,7 +1037,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-packages-list'>
<code>
&lt;packagename&gt; is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]
</code>
@@ -1002,7 +1062,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-files-invalid'>
<code>
FILES variable for package &lt;packagename&gt; contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]
</code>
@@ -1025,7 +1085,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-installed-vs-shipped'>
<code>
&lt;recipename&gt;: Files/directories were installed but not shipped [installed-vs-shipped]
</code>
@@ -1065,7 +1125,7 @@
<para>
<itemizedlist>
<listitem>
- <para>
+ <para id='qa-issue-old-and-new-package-and-version-names'>
<code>
&lt;oldpackage&gt;-&lt;oldpkgversion&gt; was registered as shlib provider for &lt;library&gt;, changing it to &lt;newpackage&gt;-&lt;newpkgversion&gt; because it was built later
</code>
@@ -1151,7 +1211,6 @@ enabled by default:
</note>
</para>
</section>
-
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
index 389e75ad97..14419d3a84 100644
--- a/documentation/ref-manual/ref-structure.xml
+++ b/documentation/ref-manual/ref-structure.xml
@@ -63,9 +63,8 @@
</para>
<para>
- For more information on BitBake, see the BitBake documentation
- included in the <filename>bitbake/doc/manual</filename> directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ For more information on BitBake, see the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
</para>
</section>
@@ -316,7 +315,7 @@
commands.
Following is the script syntax:
<literallayout class='monospaced'>
- $ source oe-init-build-env-memres &lt;port_number&gt; &lt;build_dir&gt;
+ $ source oe-init-build-env-memres <replaceable>port_number</replaceable> <replaceable>build_dir</replaceable>
</literallayout>
The script uses other scripts within the
<filename>scripts</filename> directory to do the bulk of the work.
@@ -500,7 +499,7 @@
the variable in the top-level build environment setup script as
follows:
<literallayout class='monospaced'>
- TEMPLATECONF=&lt;your_layer&gt;/conf
+ TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
</literallayout>
Once the build process gets the sample file, it uses
<filename>sed</filename> to substitute final
@@ -555,7 +554,7 @@
you can base your build from any layer by setting the variable in
the top-level build environment setup script as follows:
<literallayout class='monospaced'>
- TEMPLATECONF=&lt;your_layer&gt;/conf
+ TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
</literallayout>
Once the build process gets the sample file, it uses
<filename>sed</filename> to substitute final
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
index e04b5006b4..e77ba718b3 100644
--- a/documentation/ref-manual/ref-style.css
+++ b/documentation/ref-manual/ref-style.css
@@ -201,8 +201,17 @@ div.variablelist dl {
.variablelist dl dt,
.variablelist dl dt span.term {
font-weight: normal;
- width: 20em;
+ width: 0em;
text-align: right;
+ margin-top: 4em;
+ margin-left: .5em;
+ margin-bottom: 0em;
+ -webkit-column-count: 2; /* Chrome, Safari, Opera */
+ -moz-column-count: 2; /* Firefox */
+ column-count: 2;
+ -webkit-column-gap: 4px; /* Chrome, Safari, Opera */
+ -moz-column-gap: 4px; /* Firefox */
+ column-gap: 4px;
}
.variablelist dl dt {
@@ -211,8 +220,8 @@ div.variablelist dl {
.glossary dl dd,
.variablelist dl dd {
- margin-top: -1em;
- margin-left: 25.5em;
+ margin-top: -3.5em;
+ margin-left: 15.5em;
}
.glossary dd p,
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
index fc23a7ba0d..f325f0e233 100644
--- a/documentation/ref-manual/ref-tasks.xml
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -129,6 +129,17 @@
</para>
</section>
+ <section id='ref-tasks-package_qa'>
+ <title><filename>do_package_qa</filename></title>
+
+ <para>
+ Runs QA checks on packaged files.
+ For more information on these checks, see the
+ <link linkend='ref-classes-insane'><filename>insane</filename></link>
+ class.
+ </para>
+ </section>
+
<section id='ref-tasks-package_write_deb'>
<title><filename>do_package_write_deb</filename></title>
@@ -313,7 +324,7 @@
<para>
You can run this task using BitBake as follows:
<literallayout class='monospaced'>
- $ bitbake -c clean &lt;recipe&gt;
+ $ bitbake -c clean <replaceable>recipe</replaceable>
</literallayout>
</para>
@@ -327,7 +338,7 @@
If you want to remove the sstate cache files for the recipe,
you need to use the
<link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
- task instead (i.e. <filename>bitbake -c cleansstate &lt;recipe&gt;</filename>).
+ task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>).
</para>
</section>
@@ -348,7 +359,7 @@
<para>
You can run this task using BitBake as follows:
<literallayout class='monospaced'>
- $ bitbake -c cleanall &lt;recipe&gt;
+ $ bitbake -c cleanall <replaceable>recipe</replaceable>
</literallayout>
</para>
@@ -378,7 +389,7 @@
<para>
You can run this task using BitBake as follows:
<literallayout class='monospaced'>
- $ bitbake -c cleansstate &lt;recipe&gt;
+ $ bitbake -c cleansstate <replaceable>recipe</replaceable>
</literallayout>
</para>
@@ -393,7 +404,7 @@
If you need to build a target from scratch using remote
mirrors, use the "-f" option as follows:
<literallayout class='monospaced'>
- $ bitbake -f -c do_cleansstate &lt;target&gt;
+ $ bitbake -f -c do_cleansstate <replaceable>target</replaceable>
</literallayout>
</note>
</para>
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index cb43016fe2..e3272fec79 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -20,9 +20,9 @@
<link linkend='var-B'>B</link>
<link linkend='var-CFLAGS'>C</link>
<link linkend='var-D'>D</link>
- <link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>E</link>
+ <link linkend='var-EFI_PROVIDER'>E</link>
<link linkend='var-FEATURE_PACKAGES'>F</link>
- <link linkend='var-GROUPADD_PARAM'>G</link>
+ <link linkend='var-GLIBC_GENERATE_LOCALES'>G</link>
<link linkend='var-HOMEPAGE'>H</link>
<link linkend='var-ICECC_DISABLED'>I</link>
<!-- <link linkend='var-glossary-j'>J</link> -->
@@ -39,14 +39,17 @@
<link linkend='var-UBOOT_CONFIG'>U</link>
<!-- <link linkend='var-glossary-v'>V</link> -->
<link linkend='var-WARN_QA'>W</link>
-<!-- <link linkend='var-glossary-x'>X</link> -->
+ <link linkend='var-XSERVER'>X</link>
<!-- <link linkend='var-glossary-y'>Y</link> -->
<!-- <link linkend='var-glossary-z'>Z</link>-->
</para>
<glossdiv id='var-glossary-a'><title>A</title>
- <glossentry id='var-ABIEXTENSION'><glossterm>ABIEXTENSION</glossterm>
+ <glossentry id='var-ABIEXTENSION'><glossterm><imagedata fileref="figures/define-generic.png" />ABIEXTENSION</glossterm>
+ <info>
+ ABIEXTENSION[doc] = "Extension to the Application Binary Interface (ABI) field of the GNU canonical architecture name (e.g. "eabi")."
+ </info>
<glossdef>
<para>
Extension to the Application Binary Interface (ABI)
@@ -66,7 +69,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
+ <glossentry id='var-ALLOW_EMPTY'><glossterm><imagedata fileref="figures/define-generic.png" />ALLOW_EMPTY</glossterm>
+ <info>
+ ALLOW_EMPTY[doc] = "Specifies if an output package should still be produced if it is empty."
+ </info>
<glossdef>
<para>
Specifies if an output package should still be produced if it is empty.
@@ -86,9 +92,12 @@
</literallayout>
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-ALTERNATIVE'><glossterm>ALTERNATIVE</glossterm>
+ <glossentry id='var-ALTERNATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />ALTERNATIVE</glossterm>
+ <info>
+ ALTERNATIVE[doc] = "Lists commands in a package that need an alternative binary naming scheme."
+ </info>
<glossdef>
<para>
Lists commands in a package that need an alternative
@@ -113,9 +122,12 @@
section.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm>ALTERNATIVE_LINK_NAME</glossterm>
+ <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />ALTERNATIVE_LINK_NAME</glossterm>
+ <info>
+ ALTERNATIVE_LINK_NAME[doc] = "Used by the alternatives system to map duplicated commands to actual locations."
+ </info>
<glossdef>
<para>
Used by the alternatives system to map duplicated commands
@@ -136,7 +148,7 @@
<note>
If <filename>ALTERNATIVE_LINK_NAME</filename> is not
defined, it defaults to
- <filename>${bindir}/&lt;name&gt;</filename>.
+ <filename>${bindir}/<replaceable>name</replaceable></filename>.
</note>
</para>
@@ -146,9 +158,12 @@
section.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm>ALTERNATIVE_PRIORITY</glossterm>
+ <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm><imagedata fileref="figures/define-generic.png" />ALTERNATIVE_PRIORITY</glossterm>
+ <info>
+ ALTERNATIVE_PRIORITY[doc] = "Used by the alternatives system to create default priorities for duplicated commands."
+ </info>
<glossdef>
<para>
Used by the alternatives system to create default
@@ -159,9 +174,9 @@
a default for specific commands tied to particular packages.
Here are the available syntax forms:
<literallayout class='monospaced'>
- ALTERNATIVE_PRIORITY = "&lt;priority&gt;"
- ALTERNATIVE_PRIORITY[&lt;name&gt;] = "&lt;priority&gt;"
- ALTERNATIVE_PRIORITY_&lt;pkg&gt;[&lt;name&gt;] = "&lt;priority&gt;"
+ ALTERNATIVE_PRIORITY = "<replaceable>priority</replaceable>"
+ ALTERNATIVE_PRIORITY[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
+ ALTERNATIVE_PRIORITY_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
</literallayout>
</para>
@@ -171,9 +186,12 @@
section.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-ALTERNATIVE_TARGET'><glossterm>ALTERNATIVE_TARGET</glossterm>
+ <glossentry id='var-ALTERNATIVE_TARGET'><glossterm><imagedata fileref="figures/define-generic.png" />ALTERNATIVE_TARGET</glossterm>
+ <info>
+ ALTERNATIVE_TARGET[doc] = "Used by the alternatives system to create default link locations for duplicated commands."
+ </info>
<glossdef>
<para>
Used by the alternatives system to create default link
@@ -185,9 +203,9 @@
a default for specific commands tied to particular packages.
Here are the available syntax forms:
<literallayout class='monospaced'>
- ALTERNATIVE_TARGET = "&lt;target&gt;"
- ALTERNATIVE_TARGET[&lt;name&gt;] = "&lt;target&gt;"
- ALTERNATIVE_TARGET_&lt;pkg&gt;[&lt;name&gt;] = "&lt;target&gt;"
+ ALTERNATIVE_TARGET = "<replaceable>target</replaceable>"
+ ALTERNATIVE_TARGET[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
+ ALTERNATIVE_TARGET_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
</literallayout>
<note>
<para>
@@ -222,9 +240,12 @@
section.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-APPEND'><glossterm>APPEND</glossterm>
+ <glossentry id='var-APPEND'><glossterm><imagedata fileref="figures/define-generic.png" />APPEND</glossterm>
+ <info>
+ APPEND[doc] = "An override list of append strings for each LABEL."
+ </info>
<glossdef>
<para>
An override list of append strings for each
@@ -237,32 +258,65 @@
class for more information on how this variable is used.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
+ <glossentry id='var-ASSUME_PROVIDED'><glossterm><imagedata fileref="figures/define-generic.png" />ASSUME_PROVIDED</glossterm>
+ <info>
+ ASSUME_PROVIDED[doc] = "Lists recipe names (PN values) BitBake does not attempt to build."
+ </info>
+ <glossdef>
+ <para>
+ Lists recipe names
+ (<link linkend='var-PN'><filename>PN</filename></link>
+ values) BitBake does not attempt to build.
+ Instead, BitBake assumes these recipes have already been
+ built.
+ </para>
+
+ <para>
+ In OpenEmbedded Core, <filename>ASSUME_PROVIDED</filename>
+ mostly specifies native tools that should not be built.
+ An example is <filename>git-native</filename>, which when
+ specified, allows for the Git binary from the host to be
+ used rather than building <filename>git-native</filename>.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-AUTHOR'><glossterm><imagedata fileref="figures/define-generic.png" />AUTHOR</glossterm>
+ <info>
+ AUTHOR[doc] = "Email address used to contact the original author or authors in order to send patches and forward bugs."
+ </info>
<glossdef>
<para>The email address used to contact the original author
or authors in order to send patches and forward bugs.</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-AUTO_SYSLINUXMENU'><glossterm>AUTO_SYSLINUXMENU</glossterm>
+ <glossentry id='var-AUTO_SYSLINUXMENU'><glossterm><imagedata fileref="figures/define-generic.png" />AUTO_SYSLINUXMENU</glossterm>
+ <info>
+ AUTO_SYSLINUXMENU[doc] = "Enables creating an automatic menu for the syslinux bootloader."
+ </info>
<glossdef>
<para>
- Enables creating an automatic menu.
- You must set this in your recipe.
+ Enables creating an automatic menu for the syslinux
+ bootloader.
+ You must set this variable in your recipe.
The
<link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
class checks this variable.
</para>
</glossdef>
- </glossentry>
+ </glossentry>
- <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
+ <glossentry id='var-AUTOREV'><glossterm><imagedata fileref="figures/define-generic.png" />AUTOREV</glossterm>
+ <info>
+ AUTOREV[doc] = "When SRCREV is set to the value of this variable, it specifies to use the latest source revision in the repository."
+ </info>
<glossdef>
<para>When <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
- is set to the value of this variable, it specifies to use the latest
- source revision in the repository.
+ is set to the value of this variable, it specifies to use
+ the latest source revision in the repository.
Here is an example:
<literallayout class='monospaced'>
SRCREV = "${AUTOREV}"
@@ -271,9 +325,12 @@
</glossdef>
</glossentry>
- <glossentry id='var-AVAILTUNES'><glossterm>AVAILTUNES</glossterm>
+ <glossentry id='var-AVAILTUNES'><glossterm><imagedata fileref="figures/define-generic.png" />AVAILTUNES</glossterm>
+ <info>
+ AVAILTUNES[doc] = "The list of defined CPU and Application Binary Interface (ABI) tunings (i.e. "tunes") available for use by the OpenEmbedded build system."
+ </info>
<glossdef>
- <para>
+ <para id='var-define-AVAILTUNES'>
The list of defined CPU and Application Binary Interface
(ABI) tunings (i.e. "tunes") available for use by the
OpenEmbedded build system.
@@ -298,12 +355,14 @@
</glossdef>
</glossentry>
-
</glossdiv>
<glossdiv id='var-glossary-b'><title>B</title>
- <glossentry id='var-B'><glossterm>B</glossterm>
+ <glossentry id='var-B'><glossterm><imagedata fileref="figures/define-generic.png" />B</glossterm>
+ <info>
+ B[doc] = "The Build Directory. The OpenEmbedded build system places generated objects into the Build Directory during a recipe's build process."
+ </info>
<glossdef>
<para>
The directory within the
@@ -326,7 +385,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
+ <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm><imagedata fileref="figures/define-generic.png" />BAD_RECOMMENDATIONS</glossterm>
+ <info>
+ BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK packaging backend."
+ </info>
<glossdef>
<para>
Lists "recommended-only" packages to not install.
@@ -338,13 +400,13 @@
being installed by listing them with the
<filename>BAD_RECOMMENDATIONS</filename> variable:
<literallayout class='monospaced'>
- BAD_RECOMMENDATIONS = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
+ BAD_RECOMMENDATIONS = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
</literallayout>
You can set this variable globally in your
<filename>local.conf</filename> file or you can attach it to
a specific image recipe by using the recipe name override:
<literallayout class='monospaced'>
- BAD_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
+ BAD_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
</literallayout>
</para>
@@ -374,7 +436,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BASE_LIB'><glossterm>BASE_LIB</glossterm>
+ <glossentry id='var-BASE_LIB'><glossterm><imagedata fileref="figures/define-generic.png" />BASE_LIB</glossterm>
+ <info>
+ BASE_LIB[doc] = "The library directory name for the CPU or Application Binary Interface (ABI) tune."
+ </info>
<glossdef>
<para>
The library directory name for the CPU or Application
@@ -396,7 +461,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
+ <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm><imagedata fileref="figures/define-generic.png" />BB_DANGLINGAPPENDS_WARNONLY</glossterm>
+ <info>
+ BB_DANGLINGAPPENDS_WARNONLY[doc] = "Defines how BitBake handles situations where an append file (.bbappend) has no corresponding recipe file (.bb)."
+ </info>
<glossdef>
<para>
Defines how BitBake handles situations where an append
@@ -430,7 +498,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
+ <glossentry id='var-BB_DISKMON_DIRS'><glossterm><imagedata fileref="figures/define-generic.png" />BB_DISKMON_DIRS</glossterm>
+ <info>
+ BB_DISKMON_DIRS[doc] = "Monitors disk space and available inodes during the build and allows you to control the build based on these parameters."
+ </info>
<glossdef>
<para>
Monitors disk space and available inodes during the build
@@ -445,11 +516,11 @@
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
Use the following form:
<literallayout class='monospaced'>
- BB_DISKMON_DIRS = "&lt;action&gt;,&lt;dir&gt;,&lt;threshold&gt; [...]"
+ BB_DISKMON_DIRS = "<replaceable>action</replaceable>,<replaceable>dir</replaceable>,<replaceable>threshold</replaceable> [...]"
where:
- &lt;action&gt; is:
+ <replaceable>action</replaceable> is:
ABORT: Immediately abort the build when
a threshold is broken.
STOPTASKS: Stop the build after the currently
@@ -463,14 +534,14 @@
which must be defined in the
conf/local.conf file.
- &lt;dir&gt; is:
+ <replaceable>dir</replaceable> is:
Any directory you choose. You can specify one or
more directories to monitor by separating the
groupings with a space. If two directories are
on the same device, only the first directory
is monitored.
- &lt;threshold&gt; is:
+ <replaceable>threshold</replaceable> is:
Either the minimum available disk space,
the minimum number of free inodes, or
both. You must specify at least one. To
@@ -525,7 +596,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
+ <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm><imagedata fileref="figures/define-generic.png" />BB_DISKMON_WARNINTERVAL</glossterm>
+ <info>
+ BB_DISKMON_WARNINTERVAL[doc] = "Defines the disk space and free inode warning intervals. To set these intervals, define the variable in the conf/local.conf file in the Build Directory."
+ </info>
<glossdef>
<para>
Defines the disk space and free inode warning intervals.
@@ -559,16 +633,16 @@
When specifying the variable in your configuration file,
use the following form:
<literallayout class='monospaced'>
- BB_DISKMON_WARNINTERVAL = "&lt;disk_space_interval&gt;,&lt;disk_inode_interval&gt;"
+ BB_DISKMON_WARNINTERVAL = "<replaceable>disk_space_interval</replaceable>,<replaceable>disk_inode_interval</replaceable>"
where:
- &lt;disk_space_interval&gt; is:
+ <replaceable>disk_space_interval</replaceable> is:
An interval of memory expressed in either
G, M, or K for Gbytes, Mbytes, or Kbytes,
respectively. You cannot use GB, MB, or KB.
- &lt;disk_inode_interval&gt; is:
+ <replaceable>disk_inode_interval</replaceable> is:
An interval of free inodes expressed in either
G, M, or K for Gbytes, Mbytes, or Kbytes,
respectively. You cannot use GB, MB, or KB.
@@ -593,7 +667,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
+ <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm><imagedata fileref="figures/define-generic.png" />BB_GENERATE_MIRROR_TARBALLS</glossterm>
+ <info>
+ BB_GENERATE_MIRROR_TARBALLS[doc] = "Causes tarballs of the Git repositories to be placed in the DL_DIR directory."
+ </info>
<glossdef>
<para>
Causes tarballs of the Git repositories, including the
@@ -616,13 +693,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
+ <glossentry id='var-BB_NUMBER_THREADS'><glossterm><imagedata fileref="figures/define-generic.png" />BB_NUMBER_THREADS</glossterm>
+ <info>
+ BB_NUMBER_THREADS[doc] = "The maximum number of tasks BitBake should run in parallel at any one time. A good rule of thumb is for this variable to be twice the number of cores."
+ </info>
<glossdef>
<para>
The maximum number of tasks BitBake should run in parallel
at any one time.
If your host development system supports multiple cores,
- a good rule of thumb is to set this variable to twice the
+ a good rule of thumb is to have this variable be twice the
number of cores.
</para>
@@ -633,7 +713,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
+ <glossentry id='var-BBCLASSEXTEND'><glossterm><imagedata fileref="figures/define-generic.png" />BBCLASSEXTEND</glossterm>
+ <info>
+ BBCLASSEXTEND[doc] = "Allows you to extend a recipe so that it builds variants of the software. Common variants for recipes are 'native', 'cross', 'nativesdk' and multilibs."
+ </info>
<glossdef>
<para>
Allows you to extend a recipe so that it builds variants of the software.
@@ -643,7 +726,7 @@
which is a compiler built to run on the build machine but produces binaries
that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
"nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
- and "mulitlibs" in the form "<filename>multilib:&lt;multilib_name&gt;</filename>".
+ and "mulitlibs" in the form "<filename>multilib:</filename><replaceable>multilib_name</replaceable>".
</para>
<para>
@@ -651,13 +734,16 @@
is as simple as adding the following to your recipe:
<literallayout class='monospaced'>
BBCLASSEXTEND =+ "native nativesdk"
- BBCLASSEXTEND =+ "multilib:&lt;multilib_name&gt;"
+ BBCLASSEXTEND =+ "multilib:<replaceable>multilib_name</replaceable>"
</literallayout>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
+ <glossentry id='var-BBFILE_COLLECTIONS'><glossterm><imagedata fileref="figures/define-generic.png" />BBFILE_COLLECTIONS</glossterm>
+ <info>
+ BBFILE_COLLECTIONS[doc] = "Lists the names of configured layers. These names are used to find the other BBFILE_* variables."
+ </info>
<glossdef>
<para>Lists the names of configured layers.
These names are used to find the other <filename>BBFILE_*</filename>
@@ -668,7 +754,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
+ <glossentry id='var-BBFILE_PATTERN'><glossterm><imagedata fileref="figures/define-generic.png" />BBFILE_PATTERN</glossterm>
+ <info>
+ BBFILE_PATTERN[doc] = "Variable that expands to match files from BBFILES in a particular layer. This variable is used in the layer.conf file and must be suffixed with the name of a layer."
+ </info>
<glossdef>
<para>Variable that expands to match files from
<link linkend='var-BBFILES'><filename>BBFILES</filename></link>
@@ -679,7 +768,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
+ <glossentry id='var-BBFILE_PRIORITY'><glossterm><imagedata fileref="figures/define-generic.png" />BBFILE_PRIORITY</glossterm>
+ <info>
+ BBFILE_PRIORITY[doc] = "Assigns the priority for recipe files in each layer. Setting this variable allows you to prioritize a layer against other layers that contain the same recipe."
+ </info>
<glossdef>
<para>Assigns the priority for recipe files in each layer.</para>
<para>This variable is useful in situations where the same recipe appears in
@@ -710,19 +802,28 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
+ <glossentry id='var-BBFILES'><glossterm><imagedata fileref="figures/define-generic.png" />BBFILES</glossterm>
+ <info>
+ BBFILES[doc] = "List of recipe files used by BitBake to build software."
+ </info>
<glossdef>
<para>List of recipe files used by BitBake to build software.</para>
</glossdef>
</glossentry>
- <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
+ <glossentry id='var-BBINCLUDELOGS'><glossterm><imagedata fileref="figures/define-generic.png" />BBINCLUDELOGS</glossterm>
+ <info>
+ BBINCLUDELOGS[doc] = "Variable that controls how BitBake displays logs on build failure."
+ </info>
<glossdef>
<para>Variable that controls how BitBake displays logs on build failure.</para>
</glossdef>
</glossentry>
- <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
+ <glossentry id='var-BBLAYERS'><glossterm><imagedata fileref="figures/define-generic.png" />BBLAYERS</glossterm>
+ <info>
+ BBLAYERS[doc] = "Lists the layers to enable during the build. This variable is defined in the bblayers.conf configuration file."
+ </info>
<glossdef>
<para>Lists the layers to enable during the build.
This variable is defined in the <filename>bblayers.conf</filename> configuration
@@ -747,7 +848,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
+ <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm><imagedata fileref="figures/define-generic.png" />BBLAYERS_NON_REMOVABLE</glossterm>
+ <info>
+ BBLAYERS_NON_REMOVABLE[doc] = "Lists core layers that cannot be removed from the bblayers.conf file."
+ </info>
<glossdef>
<para>Lists core layers that cannot be removed from the
<filename>bblayers.conf</filename> file during a build
@@ -780,8 +884,11 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
+ <glossentry id='var-BBMASK'><glossterm><imagedata fileref="figures/define-generic.png" />BBMASK</glossterm>
<glossdef>
+ <info>
+ BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files. Use the BBMASK variable from within conf/local.conf."
+ </info>
<para>
Prevents BitBake from processing recipes and recipe
append files.
@@ -840,7 +947,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
+ <glossentry id='var-BBPATH'><glossterm><imagedata fileref="figures/define-generic.png" />BBPATH</glossterm>
+ <info>
+ BBPATH[doc] = "Used by BitBake to locate .bbclass and configuration files. This variable is analogous to the PATH variable."
+ </info>
<glossdef>
<para>
Used by BitBake to locate
@@ -856,16 +966,19 @@
Set the variable as you would any environment variable
and then run BitBake:
<literallayout class='monospaced'>
- $ BBPATH = "&lt;build_directory&gt;"
+ $ BBPATH = "<replaceable>build_directory</replaceable>"
$ export BBPATH
- $ bitbake &lt;target&gt;
+ $ bitbake <replaceable>target</replaceable>
</literallayout>
</note>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
+ <glossentry id='var-BBSERVER'><glossterm><imagedata fileref="figures/define-generic.png" />BBSERVER</glossterm>
+ <info>
+ BBSERVER[doc] = "Points to the server that runs memory-resident BitBake."
+ </info>
<glossdef>
<para>
Points to the server that runs memory-resident BitBake.
@@ -887,11 +1000,42 @@
</glossdef>
</glossentry>
- <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
+ <glossentry id='var-BINCONFIG'><glossterm><imagedata fileref="figures/define-generic.png" />BINCONFIG</glossterm>
+ <info>
+ BINCONFIG[doc] = "When inheriting the binconfig-disabled class, this variable specifies binary configuration scripts to disable in favor of using pkg-config to query the information."
+ </info>
<glossdef>
<para>
- When inheriting <filename>binconfig.bbclass</filename>
- from a recipe, this variable specifies a wildcard for
+ When inheriting the
+ <link linkend='ref-classes-binconfig-disabled'><filename>binconfig-disabled</filename></link>
+ class, this variable specifies binary configuration
+ scripts to disable in favor of using
+ <filename>pkg-config</filename> to query the information.
+ The <filename>binconfig-disabled</filename> class will
+ modify the specified scripts to return an error so that
+ calls to them can be easily found and replaced.
+ </para>
+
+ <para>
+ To add multiple scripts, separate them by spaces.
+ Here is an example from the <filename>libpng</filename>
+ recipe:
+ <literallayout class='monospaced'>
+ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+ </literallayout>
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-BINCONFIG_GLOB'><glossterm><imagedata fileref="figures/define-generic.png" />BINCONFIG_GLOB</glossterm>
+ <info>
+ BINCONFIG_GLOB[doc] = "When inheriting binconfig.bbclass from a recipe, this variable specifies a wildcard for configuration scripts that need editing."
+ </info>
+ <glossdef>
+ <para>
+ When inheriting the
+ <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
+ class, this variable specifies a wildcard for
configuration scripts that need editing.
The scripts are edited to correct any paths that have been
set up during compilation so that they are correct for
@@ -910,7 +1054,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BP'><glossterm>BP</glossterm>
+ <glossentry id='var-BP'><glossterm><imagedata fileref="figures/define-generic.png" />BP</glossterm>
+ <info>
+ BP[doc] = "The base recipe name and version but without any special recipe name suffix (i.e. -native, lib64-, and so forth). BP is comprised of ${BPN}-${PV}"
+ </info>
<glossdef>
<para>The base recipe name and version but without any special
recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
@@ -922,7 +1069,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BPN'><glossterm>BPN</glossterm>
+ <glossentry id='var-BPN'><glossterm><imagedata fileref="figures/define-generic.png" />BPN</glossterm>
+ <info>
+ BPN[doc] = "The bare name of the recipe. This variable is a version of the PN variable but removes common suffixes and prefixes."
+ </info>
<glossdef>
<para>The bare name of the recipe.
This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
@@ -937,7 +1087,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUGTRACKER'><glossterm>BUGTRACKER</glossterm>
+ <glossentry id='var-BUGTRACKER'><glossterm><imagedata fileref="figures/define-generic.png" />BUGTRACKER</glossterm>
+ <info>
+ BUGTRACKER[doc] = "Specifies a URL for an upstream bug tracking website for a recipe."
+ </info>
<glossdef>
<para>
Specifies a URL for an upstream bug tracking website for
@@ -949,7 +1102,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILD_CFLAGS'><glossterm>BUILD_CFLAGS</glossterm>
+ <glossentry id='var-BUILD_CFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILD_CFLAGS</glossterm>
+ <info>
+ BUILD_CFLAGS[doc] = "Specifies the flags to pass to the C compiler when building for the build host."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C compiler when building
@@ -961,7 +1117,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILD_CPPFLAGS'><glossterm>BUILD_CPPFLAGS</glossterm>
+ <glossentry id='var-BUILD_CPPFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILD_CPPFLAGS</glossterm>
+ <info>
+ BUILD_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the build host."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C pre-processor
@@ -974,7 +1133,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILD_CXXFLAGS'><glossterm>BUILD_CXXFLAGS</glossterm>
+ <glossentry id='var-BUILD_CXXFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILD_CXXFLAGS</glossterm>
+ <info>
+ BUILD_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the build host."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C++ compiler when
@@ -986,7 +1148,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILD_LDFLAGS'><glossterm>BUILD_LDFLAGS</glossterm>
+ <glossentry id='var-BUILD_LDFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILD_LDFLAGS</glossterm>
+ <info>
+ BUILD_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the build host."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the linker when building
@@ -998,7 +1163,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILD_OPTIMIZATION'><glossterm>BUILD_OPTIMIZATION</glossterm>
+ <glossentry id='var-BUILD_OPTIMIZATION'><glossterm><imagedata fileref="figures/define-generic.png" />BUILD_OPTIMIZATION</glossterm>
+ <info>
+ BUILD_OPTIMIZATION[doc] = "Specifies the optimization flags passed to the C compiler when building for the build host or the SDK."
+ </info>
<glossdef>
<para>
Specifies the optimization flags passed to the C compiler
@@ -1018,7 +1186,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
+ <glossentry id='var-BUILDDIR'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDDIR</glossterm>
+ <info>
+ BUILDDIR[doc] = "Points to the location of the Build Directory."
+ </info>
<glossdef>
<para>
Points to the location of the
@@ -1036,13 +1207,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_COMMIT'><glossterm>BUILDHISTORY_COMMIT</glossterm>
+ <glossentry id='var-BUILDHISTORY_COMMIT'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_COMMIT</glossterm>
+ <info>
+ BUILDHISTORY_COMMIT[doc] = "When inheriting the buildhistory class, this variable specifies whether or not to commit the build history output in a local Git repository."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, specifies whether or not to commit the build
- history output in a local Git repository.
+ class, this variable specifies whether or not to commit the
+ build history output in a local Git repository.
If set to "1", this local repository will be maintained
automatically by the
<filename>buildhistory</filename>
@@ -1064,12 +1238,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_COMMIT_AUTHOR'><glossterm>BUILDHISTORY_COMMIT_AUTHOR</glossterm>
+ <glossentry id='var-BUILDHISTORY_COMMIT_AUTHOR'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_COMMIT_AUTHOR</glossterm>
+ <info>
+ BUILDHISTORY_COMMIT_AUTHOR[doc] = "When inheriting the buildhistory class, this variable specifies the author to use for each Git commit."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, specifies the author to use for each Git commit.
+ class, this variable specifies the author to use for each
+ Git commit.
In order for the <filename>BUILDHISTORY_COMMIT_AUTHOR</filename>
variable to work, the
<link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
@@ -1094,13 +1272,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_DIR'><glossterm>BUILDHISTORY_DIR</glossterm>
+ <glossentry id='var-BUILDHISTORY_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_DIR</glossterm>
+ <info>
+ BUILDHISTORY_DIR[doc] = "When inheriting the buildhistory class, this variable specifies the directory in which build history information is kept."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, specifies the directory in which build history
- information is kept.
+ class, this variable specifies the directory in which
+ build history information is kept.
For more information on how the variable works, see the
<filename>buildhistory.class</filename>.
</para>
@@ -1115,12 +1296,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_FEATURES'><glossterm>BUILDHISTORY_FEATURES</glossterm>
+ <glossentry id='var-BUILDHISTORY_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_FEATURES</glossterm>
+ <info>
+ BUILDHISTORY_FEATURES[doc] = "When inheriting the buildhistory class, this variable specifies the build history features to be enabled."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, specifies the build history features to be enabled.
+ class, this variable specifies the build history features
+ to be enabled.
For more information on how build history works, see the
"<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
section.
@@ -1155,12 +1340,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_IMAGE_FILES'><glossterm>BUILDHISTORY_IMAGE_FILES</glossterm>
+ <glossentry id='var-BUILDHISTORY_IMAGE_FILES'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_IMAGE_FILES</glossterm>
+ <info>
+ BUILDHISTORY_IMAGE_FILES[doc] = "When inheriting the buildhistory class, this variable specifies a list of paths to files copied from the image contents into the build history directory under an "image-files" directory in the directory for the image, so that you can track the contents of each file."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, specifies a list of paths to files copied from the
+ class, this variable specifies a list of paths to files
+ copied from the
image contents into the build history directory under
an "image-files" directory in the directory for
the image, so that you can track the contents of each file.
@@ -1183,13 +1372,16 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDHISTORY_PUSH_REPO'><glossterm>BUILDHISTORY_PUSH_REPO</glossterm>
+ <glossentry id='var-BUILDHISTORY_PUSH_REPO'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDHISTORY_PUSH_REPO</glossterm>
+ <info>
+ BUILDHISTORY_PUSH_REPO[doc] = "When inheriting the buildhistory class, this variable optionally specifies a remote repository to which build history pushes Git changes."
+ </info>
<glossdef>
<para>
When inheriting the
<link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
- class, optionally specifies a remote repository
- to which build history pushes Git changes.
+ class, this variable optionally specifies a remote
+ repository to which build history pushes Git changes.
In order for <filename>BUILDHISTORY_PUSH_REPO</filename>
to work,
<link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
@@ -1214,7 +1406,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDSDK_CFLAGS'><glossterm>BUILDSDK_CFLAGS</glossterm>
+ <glossentry id='var-BUILDSDK_CFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDSDK_CFLAGS</glossterm>
+ <info>
+ BUILDSDK_CFLAGS[doc] = "Specifies the flags to pass to the C compiler when building for the SDK."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C compiler when building
@@ -1227,7 +1422,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDSDK_CPPFLAGS'><glossterm>BUILDSDK_CPPFLAGS</glossterm>
+ <glossentry id='var-BUILDSDK_CPPFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDSDK_CPPFLAGS</glossterm>
+ <info>
+ BUILDSDK_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the SDK."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C pre-processor
@@ -1241,7 +1439,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDSDK_CXXFLAGS'><glossterm>BUILDSDK_CXXFLAGS</glossterm>
+ <glossentry id='var-BUILDSDK_CXXFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDSDK_CXXFLAGS</glossterm>
+ <info>
+ BUILDSDK_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the SDK."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C++ compiler when
@@ -1254,7 +1455,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDSDK_LDFLAGS'><glossterm>BUILDSDK_LDFLAGS</glossterm>
+ <glossentry id='var-BUILDSDK_LDFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDSDK_LDFLAGS</glossterm>
+ <info>
+ BUILDSDK_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the SDK."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the linker when building
@@ -1267,7 +1471,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUILDSTATS_BASE'><glossterm>BUILDSTATS_BASE</glossterm>
+ <glossentry id='var-BUILDSTATS_BASE'><glossterm><imagedata fileref="figures/define-generic.png" />BUILDSTATS_BASE</glossterm>
+ <info>
+ BUILDSTATS_BASE[doc] = "Points to the location of the directory that holds build statistics when you use and enable the buildstats class."
+ </info>
<glossdef>
<para>
Points to the location of the directory that holds build
@@ -1281,7 +1488,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
+ <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm><imagedata fileref="figures/define-generic.png" />BUSYBOX_SPLIT_SUID</glossterm>
+ <info>
+ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, specifies whether to split the output executable file into two parts: one for features that require setuid root, and one for the remaining features."
+ </info>
<glossdef>
<para>
For the BusyBox recipe, specifies whether to split the
@@ -1304,7 +1514,10 @@
<glossdiv id='var-glossary-c'><title>C</title>
- <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
+ <glossentry id='var-CFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />CFLAGS</glossterm>
+ <info>
+ CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as TARGET_CFLAGS."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C compiler.
@@ -1336,7 +1549,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CLASSOVERRIDE'><glossterm>CLASSOVERRIDE</glossterm>
+ <glossentry id='var-CLASSOVERRIDE'><glossterm><imagedata fileref="figures/define-generic.png" />CLASSOVERRIDE</glossterm>
+ <info>
+ CLASSOVERRIDE[doc] = "An internal variable specifying the special class override that should currently apply (e.g. "class-target", "class-native", and so forth)."
+ </info>
<glossdef>
<para>
An internal variable specifying the special class override
@@ -1362,7 +1578,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
+ <glossentry id='var-COMBINED_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />COMBINED_FEATURES</glossterm>
+ <info>
+ COMBINED_FEATURES[doc] = "A set of features common between MACHINE_FEATURES and DISTRO_FEATURES."
+ </info>
<glossdef>
<para>
Provides a list of hardware features that are enabled in
@@ -1388,7 +1607,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
+ <glossentry id='var-COMMON_LICENSE_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />COMMON_LICENSE_DIR</glossterm>
+ <info>
+ COMMON_LICENSE_DIR[doc] = "Points to meta/files/common-licenses in the Source Directory, which is where generic license files reside."
+ </info>
<glossdef>
<para>
Points to <filename>meta/files/common-licenses</filename>
@@ -1399,7 +1621,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
+ <glossentry id='var-COMPATIBLE_HOST'><glossterm><imagedata fileref="figures/define-generic.png" />COMPATIBLE_HOST</glossterm>
+ <info>
+ COMPATIBLE_HOST[doc] = "A regular expression that resolves to one or more hosts (when the recipe is native) or one or more targets (when the recipe is non-native) with which a recipe is compatible."
+ </info>
<glossdef>
<para>A regular expression that resolves to one or more hosts
(when the recipe is native) or one or more targets (when
@@ -1416,7 +1641,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
+ <glossentry id='var-COMPATIBLE_MACHINE'><glossterm><imagedata fileref="figures/define-generic.png" />COMPATIBLE_MACHINE</glossterm>
+ <info>
+ COMPATIBLE_MACHINE[doc] = "A regular expression that resolves to one or more target machines with which a recipe is compatible."
+ </info>
<glossdef>
<para>A regular expression that resolves to one or more
target machines with which a recipe is compatible.
@@ -1431,7 +1659,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
+ <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm><imagedata fileref="figures/define-generic.png" />COMPLEMENTARY_GLOB</glossterm>
+ <info>
+ COMPLEMENTARY_GLOB[doc] = "Defines wildcards to match when installing a list of complementary packages for all the packages installed in an image."
+ </info>
<glossdef>
<para>
Defines wildcards to match when installing a list of
@@ -1458,7 +1689,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
+ <glossentry id='var-CONFFILES'><glossterm><imagedata fileref="figures/define-generic.png" />CONFFILES</glossterm>
+ <info>
+ CONFFILES[doc] = "Identifies editable or configurable files that are part of a package."
+ </info>
<glossdef>
<para>
Identifies editable or configurable files that are part of a package.
@@ -1508,7 +1742,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CONFIG_INITRAMFS_SOURCE'><glossterm>CONFIG_INITRAMFS_SOURCE</glossterm>
+ <glossentry id='var-CONFIG_INITRAMFS_SOURCE'><glossterm><imagedata fileref="figures/define-generic.png" />CONFIG_INITRAMFS_SOURCE</glossterm>
+ <info>
+ CONFIG_INITRAMFS_SOURCE[doc] = "Identifies the initial RAM disk (initramfs) source files. The OpenEmbedded build system receives and uses this kernel Kconfig variable as an environment variable."
+ </info>
<glossdef>
<para>
Identifies the initial RAM disk (initramfs) source files.
@@ -1540,7 +1777,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
+ <glossentry id='var-CONFIG_SITE'><glossterm><imagedata fileref="figures/define-generic.png" />CONFIG_SITE</glossterm>
+ <info>
+ CONFIG_SITE[doc] = "A list of files that contains autoconf test results relevant to the current build. This variable is used by the Autotools utilities when running configure."
+ </info>
<glossdef>
<para>
A list of files that contains <filename>autoconf</filename> test results relevant
@@ -1551,11 +1791,15 @@
</glossdef>
</glossentry>
- <glossentry id='var-CONFLICT_DISTRO_FEATURES'><glossterm>CONFLICT_DISTRO_FEATURES</glossterm>
+ <glossentry id='var-CONFLICT_DISTRO_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />CONFLICT_DISTRO_FEATURES</glossterm>
+ <info>
+ CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that would be in conflict should the recipe be built."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>distro_features_check</filename> class, this
+ When inheriting the
+ <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
+ class, this
variable identifies distribution features that would
be in conflict should the recipe
be built.
@@ -1569,7 +1813,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COPY_LIC_DIRS'><glossterm>COPY_LIC_DIRS</glossterm>
+ <glossentry id='var-COPY_LIC_DIRS'><glossterm><imagedata fileref="figures/define-generic.png" />COPY_LIC_DIRS</glossterm>
+ <info>
+ COPY_LIC_DIRS[doc] = "If set to "1" along with the COPY_LIC_MANIFEST variable, the OpenEmbedded build system copies into the image the license files, which are located in /usr/share/common-licenses, for each package."
+ </info>
<glossdef>
<para>
If set to "1" along with the
@@ -1584,7 +1831,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COPY_LIC_MANIFEST'><glossterm>COPY_LIC_MANIFEST</glossterm>
+ <glossentry id='var-COPY_LIC_MANIFEST'><glossterm><imagedata fileref="figures/define-generic.png" />COPY_LIC_MANIFEST</glossterm>
+ <info>
+ COPY_LIC_MANIFEST[doc] = "If set to "1", the OpenEmbedded build system copies the license manifest for the image to /usr/share/common-licenses/license.manifest within the image itself."
+ </info>
<glossdef>
<para>
If set to "1", the OpenEmbedded build system copies
@@ -1595,7 +1845,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
+ <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm><imagedata fileref="figures/define-generic.png" />CORE_IMAGE_EXTRA_INSTALL</glossterm>
+ <info>
+ CORE_IMAGE_EXTRA_INSTALL[doc] = "Specifies the list of packages to be added to the image. You should only set this variable in the conf/local.conf file in the Build Directory."
+ </info>
<glossdef>
<para>
Specifies the list of packages to be added to the image.
@@ -1611,7 +1864,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
+ <glossentry id='var-COREBASE'><glossterm><imagedata fileref="figures/define-generic.png" />COREBASE</glossterm>
+ <info>
+ COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded Core Metadata layer (i.e. meta)."
+ </info>
<glossdef>
<para>
Specifies the parent directory of the OpenEmbedded
@@ -1633,7 +1889,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CPPFLAGS'><glossterm>CPPFLAGS</glossterm>
+ <glossentry id='var-CPPFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />CPPFLAGS</glossterm>
+ <info>
+ CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers)."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C pre-processor
@@ -1666,7 +1925,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-CXXFLAGS'><glossterm>CXXFLAGS</glossterm>
+ <glossentry id='var-CXXFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />CXXFLAGS</glossterm>
+ <info>
+ CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C++ compiler.
@@ -1702,7 +1964,10 @@
<glossdiv id='var-glossary-d'><title>D</title>
- <glossentry id='var-D'><glossterm>D</glossterm>
+ <glossentry id='var-D'><glossterm><imagedata fileref="figures/define-generic.png" />D</glossterm>
+ <info>
+ D[doc] = "The destination directory."
+ </info>
<glossdef>
<para>
The destination directory.
@@ -1718,7 +1983,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
+ <glossentry id='var-DATETIME'><glossterm><imagedata fileref="figures/define-generic.png" />DATETIME</glossterm>
+ <info>
+ DATETIME[doc] = "The date and time the build was started."
+ </info>
<glossdef>
<para>
The date and time on which the current build started.
@@ -1727,7 +1995,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
+ <glossentry id='var-DEBUG_BUILD'><glossterm><imagedata fileref="figures/define-generic.png" />DEBUG_BUILD</glossterm>
+ <info>
+ DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
+ </info>
<glossdef>
<para>
Specifies to build packages with debugging information.
@@ -1738,7 +2009,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
+ <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm><imagedata fileref="figures/define-generic.png" />DEBUG_OPTIMIZATION</glossterm>
+ <info>
+ DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer -g'."
+ </info>
<glossdef>
<para>
The options to pass in
@@ -1750,7 +2024,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
+ <glossentry id='var-DEFAULT_PREFERENCE'><glossterm><imagedata fileref="figures/define-generic.png" />DEFAULT_PREFERENCE</glossterm>
+ <info>
+ DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
+ </info>
<glossdef>
<para>
Specifies a weak bias for recipe selection priority.
@@ -1774,7 +2051,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEFAULTTUNE'><glossterm>DEFAULTTUNE</glossterm>
+ <glossentry id='var-DEFAULTTUNE'><glossterm><imagedata fileref="figures/define-generic.png" />DEFAULTTUNE</glossterm>
+ <info>
+ DEFAULTTUNE[doc] = "The default CPU and Application Binary Interface (ABI) tunings (i.e. the "tune") used by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
The default CPU and Application Binary Interface (ABI)
@@ -1795,7 +2075,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
+ <glossentry id='var-DEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />DEPENDS</glossterm>
+ <info>
+ DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
+ </info>
<glossdef>
<para>
Lists a recipe's build-time dependencies
@@ -1830,7 +2113,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
+ <glossentry id='var-DEPLOY_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />DEPLOY_DIR</glossterm>
+ <info>
+ DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+ </info>
<glossdef>
<para>
Points to the general area that the OpenEmbedded build
@@ -1855,7 +2141,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
+ <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm><imagedata fileref="figures/define-generic.png" />DEPLOY_DIR_IMAGE</glossterm>
+ <info>
+ DEPLOY_DIR_IMAGE[doc] = "Points to the area that the OpenEmbedded build system uses to place images and other associated output files that are ready to be deployed onto the target machine."
+ </info>
<glossdef>
<para>
Points to the area that the OpenEmbedded build system uses
@@ -1882,10 +2171,13 @@
</glossdef>
</glossentry>
- <glossentry id='var-DEPLOYDIR'><glossterm>DEPLOYDIR</glossterm>
+ <glossentry id='var-DEPLOYDIR'><glossterm><imagedata fileref="figures/define-generic.png" />DEPLOYDIR</glossterm>
+ <info>
+ DEPLOYDIR[doc] = "For recipes that inherit the deploy class, the DEPLOYDIR points to a temporary work area for deployed files."
+ </info>
<glossdef>
<para>
- For recipes that inherit the
+ When inheriting the
<link linkend='ref-classes-deploy'><filename>deploy</filename></link>
class, the <filename>DEPLOYDIR</filename> points to a
temporary work area for deployed files that is set in the
@@ -1903,7 +2195,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
+ <glossentry id='var-DESCRIPTION'><glossterm><imagedata fileref="figures/define-generic.png" />DESCRIPTION</glossterm>
+ <info>
+ DESCRIPTION[doc] = "The package description used by package managers. If not set, DESCRIPTION takes the value of the SUMMARY variable."
+ </info>
<glossdef>
<para>The package description used by package managers.
If not set, <filename>DESCRIPTION</filename> takes
@@ -1914,7 +2209,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISK_SIGNATURE'><glossterm>DISK_SIGNATURE</glossterm>
+ <glossentry id='var-DISK_SIGNATURE'><glossterm><imagedata fileref="figures/define-generic.png" />DISK_SIGNATURE</glossterm>
+ <info>
+ DISK_SIGNATURE[doc] = "A 32-bit MBR disk signature used by directdisk images."
+ </info>
<glossdef>
<para>
A 32-bit MBR disk signature used by
@@ -1964,7 +2262,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
+ <glossentry id='var-DISTRO'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO</glossterm>
+ <info>
+ DISTRO[doc] = "The short name of the distribution. If the variable is blank, meta/conf/distro/defaultsetup.conf will be used."
+ </info>
<glossdef>
<para>
The short name of the distribution.
@@ -2006,7 +2307,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
+ <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_EXTRA_RDEPENDS</glossterm>
+ <info>
+ DISTRO_EXTRA_RDEPENDS[doc] = "Specifies a list of distro-specific packages to add to all images. The variable only applies to the images that include packagegroup-base."
+ </info>
<glossdef>
<para>
Specifies a list of distro-specific packages to add to all images.
@@ -2022,7 +2326,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
+ <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_EXTRA_RRECOMMENDS</glossterm>
+ <info>
+ DISTRO_EXTRA_RRECOMMENDS[doc] = "Specifies a list of distro-specific packages to add to all images if the packages exist. The list of packages are automatically installed but you can remove them."
+ </info>
<glossdef>
<para>
Specifies a list of distro-specific packages to add to all images
@@ -2034,7 +2341,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
+ <glossentry id='var-DISTRO_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_FEATURES</glossterm>
+ <info>
+ DISTRO_FEATURES[doc] = "The features enabled for the distribution."
+ </info>
<glossdef>
<para>
The software support you want in your distribution for
@@ -2067,7 +2377,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
+ <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_FEATURES_BACKFILL</glossterm>
+ <info>
+ DISTRO_FEATURES_BACKFILL[doc] = "Features to be added to DISTRO_FEATURES if not also present in DISTRO_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and it is not intended to be user-configurable."
+ </info>
<glossdef>
<para>Features to be added to
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
@@ -2086,7 +2399,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
+ <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
+ <info>
+ DISTRO_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from DISTRO_FEATURES_BACKFILL that should not be backfilled (i.e. added to DISTRO_FEATURES) during the build."
+ </info>
<glossdef>
<para>Features from
<filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
@@ -2099,13 +2415,19 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
+ <glossentry id='var-DISTRO_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_NAME</glossterm>
+ <info>
+ DISTRO_NAME[doc] = "The long name of the distribution."
+ </info>
<glossdef>
<para>The long name of the distribution.</para>
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_PN_ALIAS'><glossterm>DISTRO_PN_ALIAS</glossterm>
+ <glossentry id='var-DISTRO_PN_ALIAS'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_PN_ALIAS</glossterm>
+ <info>
+ DISTRO_PN_ALIAS[doc] = "Alias names used for the recipe in various Linux distributions."
+ </info>
<glossdef>
<para>Alias names used for the recipe in various Linux distributions.</para>
<para>See the
@@ -2115,13 +2437,19 @@
</glossdef>
</glossentry>
- <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
+ <glossentry id='var-DISTRO_VERSION'><glossterm><imagedata fileref="figures/define-generic.png" />DISTRO_VERSION</glossterm>
+ <info>
+ DISTRO_VERSION[doc] = "The version of the distribution."
+ </info>
<glossdef>
<para>The version of the distribution.</para>
</glossdef>
</glossentry>
- <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
+ <glossentry id='var-DISTROOVERRIDES'><glossterm><imagedata fileref="figures/define-generic.png" />DISTROOVERRIDES</glossterm>
+ <info>
+ DISTROOVERRIDES[doc] = "Lists overrides specific to the current distribution. By default, the variable list includes the value of the DISTRO variable."
+ </info>
<glossdef>
<para>
This variable lists overrides specific to the current
@@ -2137,7 +2465,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
+ <glossentry id='var-DL_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />DL_DIR</glossterm>
+ <info>
+ DL_DIR[doc] = "The central download directory used by the build process to store downloads. By default, the directory is 'downloads' in the Build Directory."
+ </info>
<glossdef>
<para>
The central download directory used by the build process to
@@ -2191,38 +2522,75 @@
chapter.
</para>
</glossdef>
+ </glossentry>
+
+ <glossentry id='var-DOC_COMPRESS'><glossterm><imagedata fileref="figures/define-generic.png" />DOC_COMPRESS</glossterm>
+ <info>
+ DOC_COMPRESS[doc] = "When inheriting the compress_doc class, this variable sets the compression policy used when the OpenEmbedded build system compresses man pages and info pages."
+ </info>
+ <glossdef>
+ <para>
+ When inheriting the
+ <link linkend='ref-classes-compress_doc'><filename>compress_doc</filename></link>
+ class, this variable sets the compression policy used when
+ the OpenEmbedded build system compresses man pages and info
+ pages.
+ By default, the compression method used is gz (gzip).
+ Other policies available are xz and bz2.
+ </para>
+ <para>
+ For information on policies and on how to use this
+ variable, see the comments in the
+ <filename>meta/classes/compress_doc.bbclass</filename> file.
+ </para>
+ </glossdef>
</glossentry>
+
</glossdiv>
<glossdiv id='var-glossary-e'><title>E</title>
- <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
+ <glossentry id='var-EFI_PROVIDER'><glossterm><imagedata fileref="figures/define-generic.png" />EFI_PROVIDER</glossterm>
+ <info>
+ EFI_PROVIDER[doc] = "When building bootable images (i.e. where hddimg or vmdk is in IMAGE_FSTYPES), the EFI_PROVIDER variable specifies the EFI bootloader to use."
+ </info>
<glossdef>
- <para></para>
- <para>Variable that controls which locales for
- <filename>eglibc</filename> are generated during the
- build (useful if the target device has 64Mbytes
- of RAM or less).</para>
+ <para>
+ When building bootable images (i.e. where
+ <filename>hddimg</filename> or <filename>vmdk</filename>
+ is in
+ <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>),
+ the <filename>EFI_PROVIDER</filename> variable specifies
+ the EFI bootloader to use.
+ The default is "grub-efi", but "gummiboot" can be used
+ instead.
+ </para>
+
+ <para>
+ See the
+ <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
+ class for more information.
+ </para>
</glossdef>
</glossentry>
- <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
+ <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm><imagedata fileref="figures/define-generic.png" />ENABLE_BINARY_LOCALE_GENERATION</glossterm>
+ <info>
+ ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for glibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
+ </info>
<glossdef>
- <para>
- Specifies the quality assurance checks whose failures are
- reported as errors by the OpenEmbedded build system.
- You set this variable in your distribution configuration
- file.
- For a list of the checks you can control with this variable,
- see the
- "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
- section.
- </para>
+ <para>Variable that controls which locales for
+ <filename>eglibc</filename> are generated during the
+ build (useful if the target device has 64Mbytes
+ of RAM or less).</para>
</glossdef>
</glossentry>
- <glossentry id='var-ERR_REPORT_DIR'><glossterm>ERR_REPORT_DIR</glossterm>
+ <glossentry id='var-ERR_REPORT_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />ERR_REPORT_DIR</glossterm>
+ <info>
+ ERR_REPORT_DIR[doc] = "When used with the report-error class, specifies the path used for storing the debug files created by the error reporting tool, which allows you to submit build errors you encounter to a central database."
+ </info>
<glossdef>
<para>
When used with the
@@ -2241,13 +2609,34 @@
you want the error reporting tool to store the debug files
as follows in your <filename>local.conf</filename> file:
<literallayout class='monospaced'>
- ERR_REPORT_DIR = "path"
+ ERR_REPORT_DIR = "<replaceable>path</replaceable>"
</literallayout>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
+ <glossentry id='var-ERROR_QA'><glossterm><imagedata fileref="figures/define-generic.png" />ERROR_QA</glossterm>
+ <info>
+ ERROR_QA[doc] = "Specifies the quality assurance checks whose failures are reported as errors by the OpenEmbedded build system."
+ </info>
+ <glossdef>
+ <para>
+ Specifies the quality assurance checks whose failures are
+ reported as errors by the OpenEmbedded build system.
+ You set this variable in your distribution configuration
+ file.
+ For a list of the checks you can control with this variable,
+ see the
+ "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
+ section.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm><imagedata fileref="figures/define-generic.png" />EXCLUDE_FROM_WORLD</glossterm>
+ <info>
+ EXCLUDE_FROM_WORLD[doc] = "Directs BitBake to exclude a recipe from world builds (i.e. bitbake world)."
+ </info>
<glossdef>
<para>
Directs BitBake to exclude a recipe from world builds (i.e.
@@ -2273,7 +2662,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
+ <glossentry id='var-EXTENDPE'><glossterm><imagedata fileref="figures/define-generic.png" />EXTENDPE</glossterm>
+ <info>
+ EXTENDPE[doc] = "Used with file and pathnames to create a prefix for a recipe's version based on the recipe's PE value. If PE is set and greater than zero for a recipe, EXTENDPE becomes that value."
+ </info>
<glossdef>
<para>
Used with file and pathnames to create a prefix for a recipe's
@@ -2291,7 +2683,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
+ <glossentry id='var-EXTENDPKGV'><glossterm><imagedata fileref="figures/define-generic.png" />EXTENDPKGV</glossterm>
+ <info>
+ EXTENDPKGV[doc] = "The full package version specification as it appears on the final packages produced by a recipe."
+ </info>
<glossdef>
<para>
The full package version specification as it appears on the
@@ -2312,11 +2707,15 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
+ <glossentry id='var-EXTERNALSRC'><glossterm><imagedata fileref="figures/define-generic.png" />EXTERNALSRC</glossterm>
+ <info>
+ EXTERNALSRC[doc] = "If externalsrc.bbclass is inherited, this variable points to the source tree, which is outside of the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
- If <filename>externalsrc.bbclass</filename> is inherited,
- this variable points to the source tree, which is
+ When inheriting the
+ <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
+ class, this variable points to the source tree, which is
outside of the OpenEmbedded build system.
When set, this variable sets the
<link linkend='var-S'><filename>S</filename></link>
@@ -2337,13 +2736,17 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
+ <glossentry id='var-EXTERNALSRC_BUILD'><glossterm><imagedata fileref="figures/define-generic.png" />EXTERNALSRC_BUILD</glossterm>
+ <info>
+ EXTERNALSRC_BUILD[doc] = "If externalsrc.bbclass is inherited, this variable points to the directory in which the recipe's source code is built, which is outside of the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
- If <filename>externalsrc.bbclass</filename> is inherited,
- this variable points to the directory in which the recipe's
- source code is built,
- which is outside of the OpenEmbedded build system.
+ When inheriting the
+ <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
+ class, this variable points to the directory in which the
+ recipe's source code is built, which is outside of the
+ OpenEmbedded build system.
When set, this variable sets the
<link linkend='var-B'><filename>B</filename></link>
variable, which is what the OpenEmbedded build system uses
@@ -2363,7 +2766,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
+ <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_IMAGE_FEATURES</glossterm>
+ <info>
+ EXTRA_IMAGE_FEATURES[doc] = "The list of additional features to include in an image. Configure this variable in the conf/local.conf file in the Build Directory."
+ </info>
<glossdef>
<para>
The list of additional features to include in an image.
@@ -2435,7 +2841,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_IMAGECMD'><glossterm>EXTRA_IMAGECMD</glossterm>
+ <glossentry id='var-EXTRA_IMAGECMD'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_IMAGECMD</glossterm>
+ <info>
+ EXTRA_IMAGECMD[doc] = "Specifies additional options for the image creation command that has been specified in IMAGE_CMD. When setting this variable, you should use an override for the associated type."
+ </info>
<glossdef>
<para>
Specifies additional options for the image
@@ -2451,7 +2860,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
+ <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_IMAGEDEPENDS</glossterm>
+ <info>
+ EXTRA_IMAGEDEPENDS[doc] = "A list of recipes to build that do not provide packages for installing into the root filesystem. Use this variable to list recipes that are required to build the final image, but not needed in the root filesystem."
+ </info>
<glossdef>
<para>A list of recipes to build that do not provide packages
for installing into the root filesystem.
@@ -2471,28 +2883,40 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
+ <glossentry id='var-EXTRA_OECMAKE'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_OECMAKE</glossterm>
+ <info>
+ EXTRA_OECMAKE[doc] = "Additional cmake options."
+ </info>
<glossdef>
<para>Additional <filename>cmake</filename> options.</para>
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
+ <glossentry id='var-EXTRA_OECONF'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_OECONF</glossterm>
+ <info>
+ EXTRA_OECONF[doc] = "Additional configure script options."
+ </info>
<glossdef>
<para>Additional <filename>configure</filename> script options.</para>
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
+ <glossentry id='var-EXTRA_OEMAKE'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_OEMAKE</glossterm>
+ <info>
+ EXTRA_OEMAKE[doc] = "Additional GNU make options."
+ </info>
<glossdef>
<para>Additional GNU <filename>make</filename> options.</para>
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_OESCONS'><glossterm>EXTRA_OESCONS</glossterm>
+ <glossentry id='var-EXTRA_OESCONS'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_OESCONS</glossterm>
+ <info>
+ EXTRA_OESCONS[doc] = "When a recipe inherits the scons class, this variable specifies additional configuration options you want to pass to the scons command line."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
+ When inheriting the
<link linkend='ref-classes-scons'><filename>scons</filename></link>
class, this variable specifies additional configuration
options you want to pass to the
@@ -2501,7 +2925,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_QMAKEVARS_POST'><glossterm>EXTRA_QMAKEVARS_POST</glossterm>
+ <glossentry id='var-EXTRA_QMAKEVARS_POST'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_QMAKEVARS_POST</glossterm>
+ <info>
+ EXTRA_QMAKEVARS_POST[doc] = "Configuration variables or options you want to pass to qmake when the arguments need to be after the .pro file list on the command line."
+ </info>
<glossdef>
<para>
Configuration variables or options you want to pass to
@@ -2519,7 +2946,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_QMAKEVARS_PRE'><glossterm>EXTRA_QMAKEVARS_PRE</glossterm>
+ <glossentry id='var-EXTRA_QMAKEVARS_PRE'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_QMAKEVARS_PRE</glossterm>
+ <info>
+ EXTRA_QMAKEVARS_PRE[doc] = "Configuration variables or options you want to pass to qmake when the arguments need to be before the .pro file list on the command line."
+ </info>
<glossdef>
<para>
Configuration variables or options you want to pass to
@@ -2537,10 +2967,13 @@
</glossdef>
</glossentry>
- <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm>EXTRA_USERS_PARAMS</glossterm>
+ <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm><imagedata fileref="figures/define-generic.png" />EXTRA_USERS_PARAMS</glossterm>
+ <info>
+ EXTRA_USERS_PARAMS[doc] = "When a recipe inherits the extrausers class, this variable provides image level user and group operations."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
+ When inheriting the
<link linkend='ref-classes-extrausers'><filename>extrausers</filename></link>
class, this variable provides image level user and group
operations.
@@ -2575,7 +3008,10 @@
<glossdiv id='var-glossary-f'><title>F</title>
- <glossentry id='var-FEATURE_PACKAGES'><glossterm>FEATURE_PACKAGES</glossterm>
+ <glossentry id='var-FEATURE_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />FEATURE_PACKAGES</glossterm>
+ <info>
+ FEATURE_PACKAGES[doc] = "Defines one or more packages to include in an image when a specific item is included in IMAGE_FEATURES. When setting the value, FEATURE_PACKAGES should have the name of the feature item as an override."
+ </info>
<glossdef>
<para>
Defines one or more packages to include in an image when
@@ -2585,11 +3021,11 @@
should have the name of the feature item as an override.
Here is an example:
<literallayout class='monospaced'>
- FEATURE_PACKAGES_widget = "package1 package2"
+ FEATURE_PACKAGES_widget = "<replaceable>package1</replaceable> <replaceable>package2</replaceable>"
</literallayout>
In this example, if "widget" were added to
- <filename>IMAGE_FEATURES</filename>, "package1" and
- "package2" would be included in the image.
+ <filename>IMAGE_FEATURES</filename>, <replaceable>package1</replaceable> and
+ <replaceable>package2</replaceable> would be included in the image.
<note>
Packages installed by features defined through
<filename>FEATURE_PACKAGES</filename> are often package
@@ -2603,7 +3039,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
+ <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm><imagedata fileref="figures/define-generic.png" />FEED_DEPLOYDIR_BASE_URI</glossterm>
+ <info>
+ FEED_DEPLOYDIR_BASE_URI[doc] = "Allow to serve ipk deploy directory as an ad hoc feed (bogofeed). Set to base URL of the directory as exported by HTTP. Set of ad hoc feed configs will be generated in the image."
+ </info>
<glossdef>
<para>
Points to the base URL of the server and location within
@@ -2630,17 +3069,21 @@
</glossdef>
</glossentry>
- <glossentry id='var-FILES'><glossterm>FILES</glossterm>
+ <glossentry id='var-FILES'><glossterm><imagedata fileref="figures/define-generic.png" />FILES</glossterm>
+ <info>
+ FILES[doc] = "The list of directories or files that are placed in packages."
+ </info>
<glossdef>
<para>
The list of directories or files that are placed in packages.
</para>
<para>
- To use the <filename>FILES</filename> variable, provide a package name
- override that identifies the resulting package.
- Then, provide a space-separated list of files or paths that identifies the
- files you want included as part of the resulting package.
+ To use the <filename>FILES</filename> variable, provide a
+ package name override that identifies the resulting package.
+ Then, provide a space-separated list of files or paths
+ that identify the files you want included as part of the
+ resulting package.
Here is an example:
<literallayout class='monospaced'>
FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"
@@ -2648,30 +3091,38 @@
</para>
<note>
- When specifying paths as part of the <filename>FILES</filename> variable,
- it is good practice to use appropriate path variables.
- For example, use <filename>${sysconfdir}</filename> rather than
- <filename>/etc</filename>, or <filename>${bindir}</filename> rather
- than <filename>/usr/bin</filename>.
+ When specifying paths as part of the
+ <filename>FILES</filename> variable, it is good practice
+ to use appropriate path variables.
+ For example, use <filename>${sysconfdir}</filename> rather
+ than <filename>/etc</filename>, or
+ <filename>${bindir}</filename> rather than
+ <filename>/usr/bin</filename>.
You can find a list of these variables at the top of the
<filename>meta/conf/bitbake.conf</filename> file in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
</note>
<para>
- If some of the files you provide with the <filename>FILES</filename> variable
- are editable and you know they should not be
- overwritten during the package update process by the Package Management
- System (PMS), you can identify these files so that the PMS will not
+ If some of the files you provide with the
+ <filename>FILES</filename> variable are editable and you
+ know they should not be overwritten during the package
+ update process by the Package Management System (PMS), you
+ can identify these files so that the PMS will not
overwrite them.
- See the <filename><link linkend='var-CONFFILES'>CONFFILES</link></filename>
- variable for information on how to identify these files to the PMS.
+ See the
+ <link linkend='var-CONFFILES'><filename>CONFFILES</filename></link>
+ variable for information on how to identify these files to
+ the PMS.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
+ <glossentry id='var-FILESEXTRAPATHS'><glossterm><imagedata fileref="figures/define-generic.png" />FILESEXTRAPATHS</glossterm>
+ <info>
+ FILESEXTRAPATHS[doc] = "Extends the search path the OpenEmbedded build system uses when looking for files and patches as it processes recipes and append files."
+ </info>
<glossdef>
<para>
Extends the search path the OpenEmbedded build system uses
@@ -2738,16 +3189,18 @@
</glossdef>
</glossentry>
- <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
+ <glossentry id='var-FILESOVERRIDES'><glossterm><imagedata fileref="figures/define-generic.png" />FILESOVERRIDES</glossterm>
+ <info>
+ FILESOVERRIDES[doc] = "A subset of OVERRIDES used by the OpenEmbedded build system for creating FILESPATH."
+ </info>
<glossdef>
<para>
A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
used by the OpenEmbedded build system for creating
<link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
You can find more information on how overrides are handled
- in the BitBake Manual that is located at
- <filename>bitbake/doc/manual</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ in the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
</para>
<para>
@@ -2767,7 +3220,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
+ <glossentry id='var-FILESPATH'><glossterm><imagedata fileref="figures/define-generic.png" />FILESPATH</glossterm>
+ <info>
+ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system uses when searching for patches and files. It is defined in the base.bbclass class found in meta/classes in the Source Directory. Do not hand-edit the FILESPATH variable."
+ </info>
<glossdef>
<para>
The default set of directories the OpenEmbedded build system
@@ -2810,7 +3266,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
+ <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm><imagedata fileref="figures/define-generic.png" />FILESYSTEM_PERMS_TABLES</glossterm>
+ <info>
+ FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
+ </info>
<glossdef>
<para>Allows you to define your own file permissions settings table as part of
your configuration for the packaging process.
@@ -2842,10 +3301,13 @@
</glossdef>
</glossentry>
- <glossentry id='var-FONT_PACKAGES'><glossterm>FONT_PACKAGES</glossterm>
+ <glossentry id='var-FONT_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />FONT_PACKAGES</glossterm>
+ <info>
+ FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
+ When inheriting the
<link linkend='ref-classes-fontcache'><filename>fontcache</filename></link>
class, this variable identifies packages containing font
files that need to be cached by Fontconfig.
@@ -2858,7 +3320,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
+ <glossentry id='var-FULL_OPTIMIZATION'><glossterm><imagedata fileref="figures/define-generic.png" />FULL_OPTIMIZATION</glossterm>
+ <info>
+ FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2'."
+ </info>
<glossdef>
<para>
The options to pass in
@@ -2874,11 +3339,40 @@
<glossdiv id='var-glossary-g'><title>G</title>
- <glossentry id='var-GROUPADD_PARAM'><glossterm>GROUPADD_PARAM</glossterm>
+ <glossentry id='var-GLIBC_GENERATE_LOCALES'><glossterm><imagedata fileref="figures/define-generic.png" />GLIBC_GENERATE_LOCALES</glossterm>
+ <info>
+ GLIBC_GENERATE_LOCALES[doc]= "Specifies the list of GLIBC locales to generate should you not wish generate all LIBC locals, which can be time consuming."
+ </info>
+ <glossdef>
+ <para>
+ Specifies the list of GLIBC locales to generate should you
+ not wish generate all LIBC locals, which can be time
+ consuming.
+ <note>
+ If you specifically remove the locale
+ <filename>en_US.UTF-8</filename>, you must set
+ <link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>
+ appropriately.
+ </note>
+ You can set <filename>GLIBC_GENERATE_LOCALES</filename>
+ in your <filename>local.conf</filename> file.
+ By default, all locales are generated.
+ <literallayout class='monospaced'>
+ GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
+ </literallayout>
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-GROUPADD_PARAM'><glossterm><imagedata fileref="figures/define-generic.png" />GROUPADD_PARAM</glossterm>
+ <info>
+ GROUPADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupadd command if you wish to add a group to the system when the package is installed."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>useradd</filename> class, this variable
+ When inheriting the
+ <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
+ class, this variable
specifies for a package what parameters should be passed
to the <filename>groupadd</filename> command
if you wish to add a group to the system when the package
@@ -2898,11 +3392,15 @@
</glossdef>
</glossentry>
- <glossentry id='var-GROUPMEMS_PARAM'><glossterm>GROUPMEMS_PARAM</glossterm>
+ <glossentry id='var-GROUPMEMS_PARAM'><glossterm><imagedata fileref="figures/define-generic.png" />GROUPMEMS_PARAM</glossterm>
+ <info>
+ GROUPMEMS_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupmems command if you wish to modify the members of a group when the package is installed."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>useradd</filename> class, this variable
+ When inheriting the
+ <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
+ class, this variable
specifies for a package what parameters should be passed
to the <filename>groupmems</filename> command
if you wish to modify the members of a group when the
@@ -2917,7 +3415,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-GRUB_GFXSERIAL'><glossterm>GRUB_GFXSERIAL</glossterm>
+ <glossentry id='var-GRUB_GFXSERIAL'><glossterm><imagedata fileref="figures/define-generic.png" />GRUB_GFXSERIAL</glossterm>
+ <info>
+ GRUB_GFXSERIAL[doc] = "Configures the GNU GRand Unified Bootloader (GRUB) to have graphics and serial in the boot menu."
+ </info>
<glossdef>
<para>
Configures the GNU GRand Unified Bootloader (GRUB) to have
@@ -2936,7 +3437,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-GRUB_OPTS'><glossterm>GRUB_OPTS</glossterm>
+ <glossentry id='var-GRUB_OPTS'><glossterm><imagedata fileref="figures/define-generic.png" />GRUB_OPTS</glossterm>
+ <info>
+ GRUB_OPTS[doc] = "Additional options to add to the GNU GRand Unified Bootloader (GRUB) configuration."
+ </info>
<glossdef>
<para>
Additional options to add to the GNU GRand Unified
@@ -2954,7 +3458,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-GRUB_TIMEOUT'><glossterm>GRUB_TIMEOUT</glossterm>
+ <glossentry id='var-GRUB_TIMEOUT'><glossterm><imagedata fileref="figures/define-generic.png" />GRUB_TIMEOUT</glossterm>
+ <info>
+ GRUB_TIMEOUT[doc] = "Specifies the timeout before executing the default LABEL in the GNU GRand Unified Bootloader (GRUB)."
+ </info>
<glossdef>
<para>
Specifies the timeout before executing the default
@@ -2971,10 +3478,13 @@
</glossdef>
</glossentry>
- <glossentry id='var-GTKIMMODULES_PACKAGES'><glossterm>GTKIMMODULES_PACKAGES</glossterm>
+ <glossentry id='var-GTKIMMODULES_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />GTKIMMODULES_PACKAGES</glossterm>
+ <info>
+ GTKIMMODULES_PACKAGES[doc] = "For recipes that inherit the gtk-immodules-cache class, this variable specifies the packages that contain the GTK+ input method modules being installed when the modules are in packages other than the main package."
+ </info>
<glossdef>
<para>
- For recipes that inherit the
+ When inheriting the
<link linkend='ref-classes-gtk-immodules-cache'><filename>gtk-immodules-cache</filename></link>
class, this variable specifies the packages that contain the
GTK+ input method modules being installed when the modules
@@ -2983,18 +3493,107 @@
</glossdef>
</glossentry>
+ <glossentry id='var-GUMMIBOOT_CFG'><glossterm><imagedata fileref="figures/define-generic.png" />GUMMIBOOT_CFG</glossterm>
+ <info>
+ GUMMIBOOT_CFG[doc] = "When EFI_PROVIDER is set to "gummiboot", the GUMMIBOOT_CFG variable specifies the configuration file that should be used."
+ </info>
+ <glossdef>
+ <para>
+ When
+ <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
+ is set to "gummiboot", the
+ <filename>GUMMIBOOT_CFG</filename> variable specifies the
+ configuration file that should be used.
+ By default, the
+ <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
+ class sets the <filename>GUMMIBOOT_CFG</filename> as
+ follows:
+ <literallayout class='monospaced'>
+ GUMMIBOOT_CFG ?= "${<link linkend='var-S'>S</link>}/loader.conf"
+ </literallayout>
+ </para>
+
+ <para>
+ For information on Gummiboot, see the
+ <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-GUMMIBOOT_ENTRIES'><glossterm><imagedata fileref="figures/define-generic.png" />GUMMIBOOT_ENTRIES</glossterm>
+ <info>
+ GUMMIBOOT_ENTRIES[doc] = "When EFI_PROVIDER is set to "gummiboot", the GUMMIBOOT_ENTRIES variable specifies a list of entry files (*.conf) to be installed containing one boot entry per file."
+ </info>
+ <glossdef>
+ <para>
+ When
+ <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
+ is set to "gummiboot", the
+ <filename>GUMMIBOOT_ENTRIES</filename> variable specifies
+ a list of entry files
+ (<filename>*.conf</filename>) to be installed
+ containing one boot entry per file.
+ By default, the
+ <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
+ class sets the <filename>GUMMIBOOT_ENTRIES</filename> as
+ follows:
+ <literallayout class='monospaced'>
+ GUMMIBOOT_ENTRIES ?= ""
+ </literallayout>
+ </para>
+
+ <para>
+ For information on Gummiboot, see the
+ <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-GUMMIBOOT_TIMEOUT'><glossterm><imagedata fileref="figures/define-generic.png" />GUMMIBOOT_TIMEOUT</glossterm>
+ <info>
+ GUMMIBOOT_TIMEOUT[doc] = "When EFI_PROVIDER is set to "gummiboot", the GUMMIBOOT_TIMEOUT variable specifies the boot menu timeout in seconds."
+ </info>
+ <glossdef>
+ <para>
+ When
+ <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
+ is set to "gummiboot", the
+ <filename>GUMMIBOOT_TIMEOUT</filename> variable specifies
+ the boot menu timeout in seconds.
+ By default, the
+ <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
+ class sets the <filename>GUMMIBOOT_TIMEOUT</filename> as
+ follows:
+ <literallayout class='monospaced'>
+ GUMMIBOOT_TIMEOUT ?= "10"
+ </literallayout>
+ </para>
+
+ <para>
+ For information on Gummiboot, see the
+ <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
+ </para>
+ </glossdef>
+ </glossentry>
+
</glossdiv>
<glossdiv id='var-glossary-h'><title>H</title>
- <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
+ <glossentry id='var-HOMEPAGE'><glossterm><imagedata fileref="figures/define-generic.png" />HOMEPAGE</glossterm>
+ <info>
+ HOMEPAGE[doc] = "Website where more information about the software the recipe is building can be found."
+ </info>
<glossdef>
<para>Website where more information about the software the recipe is building
can be found.</para>
</glossdef>
</glossentry>
- <glossentry id='var-HOST_CC_ARCH'><glossterm>HOST_CC_ARCH</glossterm>
+ <glossentry id='var-HOST_CC_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />HOST_CC_ARCH</glossterm>
+ <info>
+ HOST_CC_ARCH[doc] = "The name of the host architecture. Normally same as the TARGET_CC_ARCH."
+ </info>
<glossdef>
<para>
Specifies architecture-specific compiler flags that are
@@ -3024,7 +3623,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
+ <glossentry id='var-HOST_SYS'><glossterm><imagedata fileref="figures/define-generic.png" />HOST_SYS</glossterm>
+ <info>
+ HOST_SYS[doc] = "Specifies the system, including the architecture and the operating system, for with the build is occurring in the context of the current recipe."
+ </info>
<glossdef>
<para>
Specifies the system, including the architecture and the
@@ -3056,7 +3658,10 @@
<glossdiv id='var-glossary-i'><title>I</title>
- <glossentry id='var-ICECC_DISABLED'><glossterm>ICECC_DISABLED</glossterm>
+ <glossentry id='var-ICECC_DISABLED'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_DISABLED</glossterm>
+ <info>
+ ICECC_DISABLED[doc] = "Disables or enables the icecc (Icecream) function."
+ </info>
<glossdef>
<para>
Disables or enables the <filename>icecc</filename>
@@ -3081,7 +3686,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_ENV_EXEC'><glossterm>ICECC_ENV_EXEC</glossterm>
+ <glossentry id='var-ICECC_ENV_EXEC'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_ENV_EXEC</glossterm>
+ <info>
+ ICECC_ENV_EXEC[doc] = "Points to the icecc-create-env script that you provide."
+ </info>
<glossdef>
<para>
Points to the <filename>icecc-create-env</filename> script
@@ -3103,7 +3711,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_PARALLEL_MAKE'><glossterm>ICECC_PARALLEL_MAKE</glossterm>
+ <glossentry id='var-ICECC_PARALLEL_MAKE'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_PARALLEL_MAKE</glossterm>
+ <info>
+ ICECC_PARALLEL_MAKE[doc] = "Extra options passed to the make command during the do_compile task that specify parallel compilation."
+ </info>
<glossdef>
<para>
Extra options passed to the <filename>make</filename>
@@ -3144,7 +3755,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_PATH'><glossterm>ICECC_PATH</glossterm>
+ <glossentry id='var-ICECC_PATH'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_PATH</glossterm>
+ <info>
+ ICECC_PATH[doc] = "The location of the icecc binary."
+ </info>
<glossdef>
<para>
The location of the <filename>icecc</filename> binary.
@@ -3159,7 +3773,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_USER_CLASS_BL'><glossterm>ICECC_USER_CLASS_BL</glossterm>
+ <glossentry id='var-ICECC_USER_CLASS_BL'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_USER_CLASS_BL</glossterm>
+ <info>
+ ICECC_USER_CLASS_BL[doc] = "Identifies user classes that you do not want the Icecream distributed compile support to consider."
+ </info>
<glossdef>
<para>
Identifies user classes that you do not want the
@@ -3181,7 +3798,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_USER_PACKAGE_BL'><glossterm>ICECC_USER_PACKAGE_BL</glossterm>
+ <glossentry id='var-ICECC_USER_PACKAGE_BL'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_USER_PACKAGE_BL</glossterm>
+ <info>
+ ICECC_USER_PACKAGE_BL[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider."
+ </info>
<glossdef>
<para>
Identifies user recipes that you do not want the
@@ -3203,7 +3823,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-ICECC_USER_PACKAGE_WL'><glossterm>ICECC_USER_PACKAGE_WL</glossterm>
+ <glossentry id='var-ICECC_USER_PACKAGE_WL'><glossterm><imagedata fileref="figures/define-generic.png" />ICECC_USER_PACKAGE_WL</glossterm>
+ <info>
+ ICECC_USER_PACKAGE_WL[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support."
+ </info>
<glossdef>
<para>
Identifies user recipes that use an empty
@@ -3220,7 +3843,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
+ <glossentry id='var-IMAGE_BASENAME'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_BASENAME</glossterm>
+ <info>
+ IMAGE_BASENAME[doc] = "The base name of image output files."
+ </info>
<glossdef>
<para>
The base name of image output files.
@@ -3230,7 +3856,56 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
+ <glossentry id='var-IMAGE_BOOT_FILES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_BOOT_FILES</glossterm>
+ <info>
+ IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)."
+ </info>
+ <glossdef>
+ <para>
+ A space-separated list of files installed into the
+ boot partition when preparing an image using the
+ <filename>wic</filename> tool with the
+ <filename>bootimg-partition</filename> source
+ plugin.
+ By default, the files are installed under
+ the same name as the source files.
+ To change the installed name, separate it from the
+ original name with a semi-colon (;).
+ Source files need to be located in
+ <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>.
+ Here are two examples:
+
+ <literallayout class="monospaced">
+ IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
+ IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
+ </literallayout>
+ Alternatively, source files can be picked up using
+ a glob pattern.
+ In this case, the destination file
+ will have the same name as the base name of the source file
+ path.
+ To install files into a directory within the
+ target location, pass its name after a semi-colon
+ (;).
+ Here are two examples:
+ <literallayout class="monospaced">
+ IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
+ IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
+ </literallayout>
+ The first example installs all files from
+ <filename>${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles</filename>
+ into the root of the target partition.
+ The second example installs the same files into a
+ <filename>boot</filename> directory within the
+ target partition.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-IMAGE_CLASSES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_CLASSES</glossterm>
+ <info>
+ IMAGE_CLASSES[doc] = "A list of classes that all images should inherit."
+ </info>
<glossdef>
<para>
A list of classes that all images should inherit.
@@ -3255,7 +3930,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_CMD'><glossterm>IMAGE_CMD</glossterm>
+ <glossentry id='var-IMAGE_CMD'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_CMD</glossterm>
+ <info>
+ IMAGE_CMD[doc] = "Specifies the command to create the image file for a specific image type, which corresponds to the value set set in IMAGE_FSTYPES, (e.g. ext3, btrfs, and so forth)."
+ </info>
<glossdef>
<para>
Specifies the command to create the image file for a
@@ -3282,7 +3960,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_DEVICE_TABLES'><glossterm>IMAGE_DEVICE_TABLES</glossterm>
+ <glossentry id='var-IMAGE_DEVICE_TABLES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_DEVICE_TABLES</glossterm>
+ <info>
+ IMAGE_DEVICE_TABLES[doc] = "Specifies one or more files that contain custom device tables that are passed to the makedevs command as part of creating an image."
+ </info>
<glossdef>
<para>
Specifies one or more files that contain custom device
@@ -3302,7 +3983,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
+ <glossentry id='var-IMAGE_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_FEATURES</glossterm>
+ <info>
+ IMAGE_FEATURES[doc] = "The primary list of features to include in an image. Configure this variable in an image recipe."
+ </info>
<glossdef>
<para>
The primary list of features to include in an image.
@@ -3331,7 +4015,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
+ <glossentry id='var-IMAGE_FSTYPES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_FSTYPES</glossterm>
+ <info>
+ IMAGE_FSTYPES[doc] = "Formats of root filesystem images that you want to have created."
+ </info>
<glossdef>
<para>
Specifies the formats the OpenEmbedded build system uses
@@ -3366,7 +4053,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
+ <glossentry id='var-IMAGE_INSTALL'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_INSTALL</glossterm>
+ <info>
+ IMAGE_INSTALL[doc] = "Specifies the packages to install into an image. Image recipes set IMAGE_INSTALL to specify the packages to install into an image through image.bbclass."
+ </info>
<glossdef>
<para>
Specifies the packages to install into an image.
@@ -3421,7 +4111,7 @@
<para>
When you use this variable, it is best to use it as follows:
<literallayout class='monospaced'>
- IMAGE_INSTALL_append = " package-name"
+ IMAGE_INSTALL_append = " <replaceable>package-name</replaceable>"
</literallayout>
Be sure to include the space between the quotation character
and the start of the package name or names.
@@ -3429,7 +4119,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
+ <glossentry id='var-IMAGE_LINGUAS'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_LINGUAS</glossterm>
+ <info>
+ IMAGE_LINGUAS[doc] = "Specifies the list of locales to install into the image during the root filesystem construction process."
+ </info>
<glossdef>
<para>
Specifies the list of locales to install into the image
@@ -3455,10 +4148,19 @@
packages only provide locale files by language and not by
country-specific language).
</para>
+
+ <para>
+ See the
+ <link linkend='var-GLIBC_GENERATE_LOCALES'><filename>GLIBC_GENERATE_LOCALES</filename></link>
+ variable for information on generating GLIBC locales.
+ </para>
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_MANIFEST'><glossterm>IMAGE_MANIFEST</glossterm>
+ <glossentry id='var-IMAGE_MANIFEST'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_MANIFEST</glossterm>
+ <info>
+ IMAGE_MANIFEST[doc] = "The manifest file for the image. This file lists all the installed packages that make up the image."
+ </info>
<glossdef>
<para>
The manifest file for the image.
@@ -3467,7 +4169,7 @@
The file contains package information on a line-per-package
basis as follows:
<literallayout class='monospaced'>
- &lt;packagename&gt; &lt;packagearch&gt; &lt;version&gt;
+ <replaceable>packagename</replaceable> <replaceable>packagearch</replaceable> <replaceable>version</replaceable>
</literallayout>
</para>
@@ -3491,7 +4193,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
+ <glossentry id='var-IMAGE_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_NAME</glossterm>
+ <info>
+ IMAGE_NAME[doc] = "The name of the output image files minus the extension."
+ </info>
<glossdef>
<para>
The name of the output image files minus the extension.
@@ -3508,7 +4213,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
+ <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_OVERHEAD_FACTOR</glossterm>
+ <info>
+ IMAGE_OVERHEAD_FACTOR[doc] = "Defines a multiplier that the build system applies to the initial image size for cases when the multiplier times the returned disk usage value for the image is greater than the sum of IMAGE_ROOTFS_SIZE and IMAGE_ROOTFS_EXTRA_SPACE."
+ </info>
<glossdef>
<para>
Defines a multiplier that the build system applies to the initial image
@@ -3550,7 +4258,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_PKGTYPE'><glossterm>IMAGE_PKGTYPE</glossterm>
+ <glossentry id='var-IMAGE_PKGTYPE'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_PKGTYPE</glossterm>
+ <info>
+ IMAGE_PKGTYPE[doc] = "Defines the package type (DEB, RPM, IPK, or TAR) used by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
Defines the package type (DEB, RPM, IPK, or TAR) used
@@ -3593,14 +4304,17 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
+ <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_POSTPROCESS_COMMAND</glossterm>
+ <info>
+ IMAGE_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the image."
+ </info>
<glossdef>
<para>
Added by classes to run post processing commands once the
OpenEmbedded build system has created the image.
You can specify shell commands separated by semicolons:
<literallayout class='monospaced'>
- IMAGE_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
+ IMAGE_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... "
</literallayout>
If you need to pass the path to the root filesystem within
the command, you can use
@@ -3610,7 +4324,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
+ <glossentry id='var-IMAGE_ROOTFS'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_ROOTFS</glossterm>
+ <info>
+ IMAGE_ROOTFS[doc] = "The location of the root filesystem while it is under construction (i.e. during do_rootfs)."
+ </info>
<glossdef>
<para>
The location of the root filesystem while it is under
@@ -3623,7 +4340,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_ROOTFS_ALIGNMENT'><glossterm>IMAGE_ROOTFS_ALIGNMENT</glossterm>
+ <glossentry id='var-IMAGE_ROOTFS_ALIGNMENT'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_ROOTFS_ALIGNMENT</glossterm>
+ <info>
+ IMAGE_ROOTFS_ALIGNMENT[doc] = "Specifies the alignment for the output image file in Kbytes."
+ </info>
<glossdef>
<para>
Specifies the alignment for the output image file in
@@ -3639,7 +4359,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
+ <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
+ <info>
+ IMAGE_ROOTFS_EXTRA_SPACE[doc] = "Defines additional free disk space created in the image in Kbytes. By default, this variable is set to '0'."
+ </info>
<glossdef>
<para>
Defines additional free disk space created in the image in Kbytes.
@@ -3670,7 +4393,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
+ <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_ROOTFS_SIZE</glossterm>
+ <info>
+ IMAGE_ROOTFS_SIZE[doc] = "Defines the size in Kbytes for the generated image."
+ </info>
<glossdef>
<para>
Defines the size in Kbytes for the generated image.
@@ -3713,7 +4439,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_TYPEDEP'><glossterm>IMAGE_TYPEDEP</glossterm>
+ <glossentry id='var-IMAGE_TYPEDEP'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_TYPEDEP</glossterm>
+ <info>
+ IMAGE_TYPEDEP[doc] = "Specifies a dependency from one image type on another."
+ </info>
<glossdef>
<para>
Specifies a dependency from one image type on another.
@@ -3736,7 +4465,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
+ <glossentry id='var-IMAGE_TYPES'><glossterm><imagedata fileref="figures/define-generic.png" />IMAGE_TYPES</glossterm>
+ <info>
+ IMAGE_TYPES[doc] = "Specifies the complete list of supported image types by default."
+ </info>
<glossdef>
<para>
Specifies the complete list of supported image types
@@ -3776,7 +4508,10 @@
</glossdef>
</glossentry>
- <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
+ <glossentry id='var-INC_PR'><glossterm><imagedata fileref="figures/define-generic.png" />INC_PR</glossterm>
+ <info>
+ INC_PR[doc] = "Helps define the recipe revision for recipes that share a common include file."
+ </info>
<glossdef>
<para>Helps define the recipe revision for recipes that share
a common <filename>include</filename> file.
@@ -3829,7 +4564,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
+ <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm><imagedata fileref="figures/define-generic.png" />INCOMPATIBLE_LICENSE</glossterm>
+ <info>
+ INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build."
+ </info>
<glossdef>
<para>
Specifies a space-separated list of license names
@@ -3846,7 +4584,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
This functionality is only regularly tested using
the following setting:
<literallayout class='monospaced'>
- INCOMPATIBLE_LICENSE = "GPLv3"
+ INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
</literallayout>
Although you can use other settings, you might be required
to remove dependencies on or provide alternatives to
@@ -3856,7 +4594,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
+ <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm><imagedata fileref="figures/define-generic.png" />INHIBIT_DEFAULT_DEPS</glossterm>
+ <info>
+ INHIBIT_DEFAULT_DEPS[doc] = "Prevents the default dependencies, namely the C compiler and standard C library (libc), from being added to DEPENDS."
+ </info>
<glossdef>
<para>
Prevents the default dependencies, namely the C compiler
@@ -3873,7 +4614,41 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
+ <glossentry id='var-INHIBIT_PACKAGE_DEBUG_SPLIT'><glossterm><imagedata fileref="figures/define-generic.png" />INHIBIT_PACKAGE_DEBUG_SPLIT</glossterm>
+ <info>
+ INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binaries in resulting packages."
+ </info>
+ <glossdef>
+
+ <para>
+ Prevents the OpenEmbedded build system from splitting
+ out debug information during packaging.
+ By default, the build system splits out debugging
+ information during the
+ <link linkend='ref-tasks-package'><filename>do_package</filename></link>
+ task.
+ For more information on how debug information is split out,
+ see the
+ <link linkend='var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></link>
+ variable.
+ </para>
+
+ <para>
+ To prevent the build system from splitting out
+ debug information during packaging, set the
+ <filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename> variable
+ as follows:
+ <literallayout class='monospaced'>
+ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+ </literallayout>
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm><imagedata fileref="figures/define-generic.png" />INHIBIT_PACKAGE_STRIP</glossterm>
+ <info>
+ INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binaries in resulting packages."
+ </info>
<glossdef>
<para>
If set to "1", causes the build to not strip binaries in resulting packages.
@@ -3881,7 +4656,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
+ <glossentry id='var-INHERIT'><glossterm><imagedata fileref="figures/define-generic.png" />INHERIT</glossterm>
+ <info>
+ INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
+ </info>
<glossdef>
<para>
Causes the named class to be inherited at
@@ -3891,7 +4669,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
+ <glossentry id='var-INHERIT_DISTRO'><glossterm><imagedata fileref="figures/define-generic.png" />INHERIT_DISTRO</glossterm>
+ <info>
+ INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
+ </info>
<glossdef>
<para>
Lists classes that will be inherited at the
@@ -3910,7 +4691,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
+ <glossentry id='var-INITRAMFS_FSTYPES'><glossterm><imagedata fileref="figures/define-generic.png" />INITRAMFS_FSTYPES</glossterm>
+ <info>
+ INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk (initramfs), which is used during boot."
+ </info>
<glossdef>
<para>
Defines the format for the output image of an initial
@@ -3922,7 +4706,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITRAMFS_IMAGE'><glossterm>INITRAMFS_IMAGE</glossterm>
+ <glossentry id='var-INITRAMFS_IMAGE'><glossterm><imagedata fileref="figures/define-generic.png" />INITRAMFS_IMAGE</glossterm>
+ <info>
+ INITRAMFS_IMAGE[doc] = "Causes the OpenEmbedded build system to build an additional recipe as a dependency to your root filesystem recipe (e.g. core-image-sato)."
+ </info>
<glossdef>
<para>
Causes the OpenEmbedded build system to build an additional
@@ -3965,7 +4752,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITRAMFS_IMAGE_BUNDLE'><glossterm>INITRAMFS_IMAGE_BUNDLE</glossterm>
+ <glossentry id='var-INITRAMFS_IMAGE_BUNDLE'><glossterm><imagedata fileref="figures/define-generic.png" />INITRAMFS_IMAGE_BUNDLE</glossterm>
+ <info>
+ INITRAMFS_IMAGE_BUNDLE[doc] = "Controls whether or not the image recipe specified by INITRAMFS_IMAGE is run through an extra pass during kernel compilation in order to build a single binary that contains both the kernel image and the initial RAM disk (initramfs)."
+ </info>
<glossdef>
<para>
Controls whether or not the image recipe specified by
@@ -4012,11 +4802,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
+ <glossentry id='var-INITRD'><glossterm><imagedata fileref="figures/define-generic.png" />INITRD</glossterm>
+ <info>
+ INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
+ </info>
<glossdef>
<para>
- Indicates a filesystem image to use as an initial RAM
- disk (<filename>initrd</filename>).
+ Indicates list of filesystem images to concatenate and use
+ as an initial RAM disk (<filename>initrd</filename>).
</para>
<para>
@@ -4028,7 +4821,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITRD_IMAGE'><glossterm>INITRD_IMAGE</glossterm>
+ <glossentry id='var-INITRD_IMAGE'><glossterm><imagedata fileref="figures/define-generic.png" />INITRD_IMAGE</glossterm>
+ <info>
+ INITRD_IMAGE[doc] = "When building a "live" bootable image (i.e. when IMAGE_FSTYPES contains "live"), INITRD_IMAGE specifies the image recipe that should be built to provide the initial RAM disk image."
+ </info>
<glossdef>
<para>
When building a "live" bootable image (i.e. when
@@ -4038,10 +4834,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
to provide the initial RAM disk image.
The default value is "core-image-minimal-initramfs".
</para>
+
+ <para>
+ See the
+ <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
+ class for more information.
+ </para>
</glossdef>
</glossentry>
- <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
+ <glossentry id='var-INITSCRIPT_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />INITSCRIPT_NAME</glossterm>
+ <info>
+ INITSCRIPT_NAME[doc] = "The filename of the initialization script as installed to ${sysconfdir}/init.d."
+ </info>
<glossdef>
<para>
The filename of the initialization script as installed to
@@ -4054,7 +4859,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
+ <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />INITSCRIPT_PACKAGES</glossterm>
+ <info>
+ INITSCRIPT_PACKAGES[doc] = "A list of the packages that contain initscripts. This variable is used in recipes when using update-rc.d.bbclass. The variable is optional and defaults to the PN variable."
+ </info>
<glossdef>
<para>
A list of the packages that contain initscripts.
@@ -4068,7 +4876,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
+ <glossentry id='var-INITSCRIPT_PARAMS'><glossterm><imagedata fileref="figures/define-generic.png" />INITSCRIPT_PARAMS</glossterm>
+ <info>
+ INITSCRIPT_PARAMS[doc] = "Specifies the options to pass to update-rc.d. The variable is mandatory and is used in recipes when using update-rc.d.bbclass."
+ </info>
<glossdef>
<para>
Specifies the options to pass to <filename>update-rc.d</filename>.
@@ -4081,8 +4892,12 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
stops the script in levels 0, 1 and 6.
</para>
<para>
- The variable is mandatory and is used in recipes when using
- <filename>update-rc.d.bbclass</filename>.
+ The variable's default value is "defaults", which is
+ set in the
+ <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
+ class.
+ </para>
+ <para>
The value in
<filename>INITSCRIPT_PARAMS</filename> is passed through
to the <filename>update-rc.d</filename> command.
@@ -4093,7 +4908,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
+ <glossentry id='var-INSANE_SKIP'><glossterm><imagedata fileref="figures/define-generic.png" />INSANE_SKIP</glossterm>
+ <info>
+ INSANE_SKIP[doc] = "Specifies the QA checks to skip for a specific package within a recipe."
+ </info>
<glossdef>
<para>
Specifies the QA checks to skip for a specific package
@@ -4115,7 +4933,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
+ <glossentry id='var-IPK_FEED_URIS'><glossterm><imagedata fileref="figures/define-generic.png" />IPK_FEED_URIS</glossterm>
+ <info>
+ IPK_FEED_URIS[doc] = "List of ipkg feed records to put into generated image."
+ </info>
<glossdef>
<para>
When the IPK backend is in use and package management
@@ -4171,7 +4992,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-k'><title>K</title>
- <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
+ <glossentry id='var-KARCH'><glossterm><imagedata fileref="figures/define-generic.png" />KARCH</glossterm>
+ <info>
+ KARCH[doc] = "Defines the kernel architecture used when assembling the configuration. You define the KARCH variable in the BSP Descriptions."
+ </info>
<glossdef>
<para>
Defines the kernel architecture used when assembling
@@ -4194,7 +5018,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
+ <glossentry id='var-KBRANCH'><glossterm><imagedata fileref="figures/define-generic.png" />KBRANCH</glossterm>
+ <info>
+ KBRANCH[doc] = "A regular expression used by the build process to explicitly identify the kernel branch that is validated, patched and configured during a build."
+ </info>
<glossdef>
<para>
A regular expression used by the build process to explicitly
@@ -4255,7 +5082,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KBRANCH_DEFAULT'><glossterm>KBRANCH_DEFAULT</glossterm>
+ <glossentry id='var-KBRANCH_DEFAULT'><glossterm><imagedata fileref="figures/define-generic.png" />KBRANCH_DEFAULT</glossterm>
+ <info>
+ KBRANCH_DEFAULT[doc] = "Defines the Linux kernel source repository's default branch used to build the Linux kernel. Unless you specify otherwise, the variable initializes to 'master'."
+ </info>
<glossdef>
<para>
Defines the Linux kernel source repository's default
@@ -4270,7 +5100,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
+ <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_EXTRA_ARGS</glossterm>
+ <info>
+ KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel."
+ </info>
<glossdef>
<para>
Specifies additional <filename>make</filename>
@@ -4280,7 +5113,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
+ <glossentry id='var-KERNEL_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_FEATURES</glossterm>
+ <info>
+ KERNEL_FEATURES[doc] = "Includes additional metadata from the Yocto Project kernel Git repository. The metadata you add through this variable includes config fragments and features descriptions."
+ </info>
<glossdef>
<para>Includes additional metadata from the Yocto Project kernel Git repository.
In the OpenEmbedded build system, the default Board Support Packages (BSPs)
@@ -4310,7 +5146,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_IMAGE_BASE_NAME'><glossterm>KERNEL_IMAGE_BASE_NAME</glossterm>
+ <glossentry id='var-KERNEL_IMAGE_BASE_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_IMAGE_BASE_NAME</glossterm>
+ <info>
+ KERNEL_IMAGE_BASE_NAME[doc] = "The base name of the kernel image."
+ </info>
<glossdef>
<para>
The base name of the kernel image.
@@ -4333,7 +5172,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
+ <glossentry id='var-KERNEL_IMAGETYPE'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_IMAGETYPE</glossterm>
+ <info>
+ KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'."
+ </info>
<glossdef>
<para>The type of kernel to build for a device, usually set by the
machine configuration files and defaults to "zImage".
@@ -4343,13 +5185,89 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
+ <glossentry id='var-KERNEL_MODULE_AUTOLOAD'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_MODULE_AUTOLOAD</glossterm>
+ <info>
+ KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
+ </info>
+ <glossdef>
+ <para>
+ Lists kernel modules that need to be auto-loaded during
+ boot.
+ <note>
+ This variable replaces the deprecated
+ <link linkend='var-module_autoload'><filename>module_autoload</filename></link>
+ variable.
+ </note>
+ </para>
+
+ <para>
+ You can use the <filename>KERNEL_MODULE_AUTOLOAD</filename>
+ variable anywhere that it can be
+ recognized by the kernel recipe or by an out-of-tree kernel
+ module recipe (e.g. a machine configuration file, a
+ distribution configuration file, an append file for the
+ recipe, or the recipe itself).
+ </para>
+
+ <para>
+ Specify it as follows:
+ <literallayout class='monospaced'>
+ KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name1</replaceable> <replaceable>module_name2</replaceable> <replaceable>module_name3</replaceable>"
+ </literallayout>
+ </para>
+
+ <para>
+ Including <filename>KERNEL_MODULE_AUTOLOAD</filename> causes
+ the OpenEmbedded build system to populate the
+ <filename>/etc/modules-load.d/modname.conf</filename>
+ file with the list of modules to be auto-loaded on boot.
+ The modules appear one-per-line in the file.
+ Here is an example of the most common use case:
+ <literallayout class='monospaced'>
+ KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name</replaceable>"
+ </literallayout>
+ </para>
+
+ <para>
+ For information on how to populate the
+ <filename>modname.conf</filename> file with
+ <filename>modprobe.d</filename> syntax lines, see the
+ <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
+ variable.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-KERNEL_MODULE_PROBECONF'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_MODULE_PROBECONF</glossterm>
+ <info>
+ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules."
+ </info>
+ <glossdef>
+ <para>
+ Provides a list of modules for which the OpenEmbedded
+ build system expects to find
+ <filename>module_conf_</filename><replaceable>modname</replaceable>
+ values that specify configuration for each of the modules.
+ For information on how to provide those module
+ configurations, see the
+ <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
+ variable.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-KERNEL_PATH'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_PATH</glossterm>
+ <info>
+ KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+ </info>
<glossdef>
<para>
The location of the kernel sources.
This variable is set to the value of the
<link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
- within the <filename>module.bbclass</filename> class.
+ within the
+ <link linkend='ref-classes-module'><filename>module</filename></link>
+ class.
For information on how this variable is used, see the
"<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
section.
@@ -4368,13 +5286,18 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
+ <glossentry id='var-KERNEL_SRC'><glossterm><imagedata fileref="figures/define-generic.png" />KERNEL_SRC</glossterm>
+ <info>
+ KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+ </info>
<glossdef>
<para>
The location of the kernel sources.
This variable is set to the value of the
<link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
- within the <filename>module.bbclass</filename> class.
+ within the
+ <link linkend='ref-classes-module'><filename>module</filename></link>
+ class.
For information on how this variable is used, see the
"<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
section.
@@ -4393,7 +5316,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
+ <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm><imagedata fileref="figures/define-generic.png" />KFEATURE_DESCRIPTION</glossterm>
+ <info>
+ KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
+ </info>
<glossdef>
<para>
Provides a short description of a configuration fragment.
@@ -4409,7 +5335,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
+ <glossentry id='var-KMACHINE'><glossterm><imagedata fileref="figures/define-generic.png" />KMACHINE</glossterm>
+ <info>
+ KMACHINE[doc] = "The machine as known by the kernel."
+ </info>
<glossdef>
<para>
The machine as known by the kernel.
@@ -4502,7 +5431,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
+ <glossentry id='var-KTYPE'><glossterm><imagedata fileref="figures/define-generic.png" />KTYPE</glossterm>
+ <info>
+ KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
+ </info>
<glossdef>
<para>
Defines the kernel type to be used in assembling the
@@ -4528,7 +5460,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-l'><title>L</title>
- <glossentry id='var-LABELS'><glossterm>LABELS</glossterm>
+ <glossentry id='var-LABELS'><glossterm><imagedata fileref="figures/define-generic.png" />LABELS</glossterm>
+ <info>
+ LABELS[doc] = "Provides a list of targets for automatic configuration."
+ </info>
<glossdef>
<para>
Provides a list of targets for automatic configuration.
@@ -4542,7 +5477,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
+ <glossentry id='var-LAYERDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />LAYERDEPENDS</glossterm>
+ <info>
+ LAYERDEPENDS[doc] = "Lists the layers, separated by spaces, upon which this recipe depends. This variable is used in the conf/layer.conf file and must be suffixed with the name of the specific layer."
+ </info>
<glossdef>
<para>Lists the layers that this recipe depends upon, separated by spaces.
Optionally, you can specify a specific layer version for a dependency
@@ -4558,7 +5496,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
+ <glossentry id='var-LAYERDIR'><glossterm><imagedata fileref="figures/define-generic.png" />LAYERDIR</glossterm>
+ <info>
+ LAYERDIR[doc] = "When used inside the layer.conf configuration file, this variable provides the path of the current layer."
+ </info>
<glossdef>
<para>When used inside the <filename>layer.conf</filename> configuration
file, this variable provides the path of the current layer.
@@ -4567,7 +5508,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
+ <glossentry id='var-LAYERVERSION'><glossterm><imagedata fileref="figures/define-generic.png" />LAYERVERSION</glossterm>
+ <info>
+ LAYERVERSION[doc] = "Optionally specifies the version of a layer as a single number. This variable is used in the conf/layer.conf file and must be suffixed with the name of the specific layer."
+ </info>
<glossdef>
<para>Optionally specifies the version of a layer as a single number.
You can use this within
@@ -4580,7 +5524,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LDFLAGS'><glossterm>LDFLAGS</glossterm>
+ <glossentry id='var-LDFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />LDFLAGS</glossterm>
+ <info>
+ LDFLAGS[doc] = "Specifies the flags to pass to the linker."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the linker.
@@ -4612,7 +5559,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LEAD_SONAME'><glossterm>LEAD_SONAME</glossterm>
+ <glossentry id='var-LEAD_SONAME'><glossterm><imagedata fileref="figures/define-generic.png" />LEAD_SONAME</glossterm>
+ <info>
+ LEAD_SONAME[doc] = "Specifies the lead (or primary) compiled library file (.so) that the debian class applies its naming policy to given a recipe that packages multiple libraries."
+ </info>
<glossdef>
<para>
Specifies the lead (or primary) compiled library file
@@ -4629,7 +5579,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
+ <glossentry id='var-LIC_FILES_CHKSUM'><glossterm><imagedata fileref="figures/define-generic.png" />LIC_FILES_CHKSUM</glossterm>
+ <info>
+ LIC_FILES_CHKSUM[doc] = "Checksums of the license text in the recipe source code."
+ </info>
<glossdef>
<para>Checksums of the license text in the recipe source code.</para>
<para>This variable tracks changes in license text of the source
@@ -4640,14 +5593,17 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
This variable must be defined for all recipes (unless
<link linkend='var-LICENSE'><filename>LICENSE</filename></link>
- is set to "CLOSED")</para>
+ is set to "CLOSED").</para>
<para>For more information, see the
- <link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
- Tracking License Changes</link> section</para>
+ "<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
+ Tracking License Changes</link>" section.</para>
</glossdef>
</glossentry>
- <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
+ <glossentry id='var-LICENSE'><glossterm><imagedata fileref="figures/define-generic.png" />LICENSE</glossterm>
+ <info>
+ LICENSE[doc] = "The list of source licenses for the recipe. The logical operators ampersand or '|' and parentheses can be used."
+ </info>
<glossdef>
<para>
The list of source licenses for the recipe.
@@ -4708,7 +5664,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LICENSE_FLAGS'><glossterm>LICENSE_FLAGS</glossterm>
+ <glossentry id='var-LICENSE_FLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />LICENSE_FLAGS</glossterm>
+ <info>
+ LICENSE_FLAGS[doc] = "Specifies additional flags for a recipe you must whitelist through LICENSE_FLAGS_WHITELIST in order to allow the recipe to be built."
+ </info>
<glossdef>
<para>
Specifies additional flags for a recipe you must
@@ -4732,7 +5691,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LICENSE_FLAGS_WHITELIST'><glossterm>LICENSE_FLAGS_WHITELIST</glossterm>
+ <glossentry id='var-LICENSE_FLAGS_WHITELIST'><glossterm><imagedata fileref="figures/define-generic.png" />LICENSE_FLAGS_WHITELIST</glossterm>
+ <info>
+ LICENSE_FLAGS_WHITELIST[doc] = "Lists license flags that when specified in LICENSE_FLAGS within a recipe should not prevent that recipe from being built."
+ </info>
<glossdef>
<para>
Lists license flags that when specified in
@@ -4748,7 +5710,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
+ <glossentry id='var-LICENSE_PATH'><glossterm><imagedata fileref="figures/define-generic.png" />LICENSE_PATH</glossterm>
+ <info>
+ LICENSE_PATH[doc] = "Path to additional licenses used during the build."
+ </info>
<glossdef>
<para>Path to additional licenses used during the build.
By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
@@ -4756,12 +5721,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The <filename>LICENSE_PATH</filename> variable allows you to extend that
location to other areas that have additional licenses:
<literallayout class='monospaced'>
- LICENSE_PATH += "/path/to/additional/common/licenses"
+ LICENSE_PATH += "<replaceable>path-to-additional-common-licenses</replaceable>"
</literallayout></para>
</glossdef>
</glossentry>
- <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
+ <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm><imagedata fileref="figures/define-generic.png" />LINUX_KERNEL_TYPE</glossterm>
+ <info>
+ LINUX_KERNEL_TYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
+ </info>
<glossdef>
<para>
Defines the kernel type to be used in assembling the
@@ -4790,7 +5758,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
+ <glossentry id='var-LINUX_VERSION'><glossterm><imagedata fileref="figures/define-generic.png" />LINUX_VERSION</glossterm>
+ <info>
+ LINUX_VERSION[doc] = "The Linux version from kernel.org on which the Linux kernel image being built using the OpenEmbedded build system is based. You define this variable in the kernel recipe."
+ </info>
<glossdef>
<para>The Linux version from <filename>kernel.org</filename>
on which the Linux kernel image being built using the
@@ -4812,7 +5783,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
+ <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm><imagedata fileref="figures/define-generic.png" />LINUX_VERSION_EXTENSION</glossterm>
+ <info>
+ LINUX_VERSION_EXTENSION[doc] = "A string extension compiled into the version string of the Linux kernel built with the OpenEmbedded build system. You define this variable in the kernel recipe."
+ </info>
<glossdef>
<para>A string extension compiled into the version
string of the Linux kernel built with the OpenEmbedded
@@ -4837,7 +5811,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
+ <glossentry id='var-LOG_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />LOG_DIR</glossterm>
+ <info>
+ LOG_DIR[doc] = "Specifies the directory to which the OpenEmbedded build system writes overall log files. The default directory is ${TMPDIR}/log"
+ </info>
<glossdef>
<para>
Specifies the directory to which the OpenEmbedded build
@@ -4856,7 +5833,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-m'><title>M</title>
- <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
+ <glossentry id='var-MACHINE'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE</glossterm>
+ <info>
+ MACHINE[doc] = "Specifies the target device for which the image is built. You define MACHINE in the conf/local.conf file in the Build Directory."
+ </info>
<glossdef>
<para>
Specifies the target device for which the image is built.
@@ -4903,7 +5883,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_ARCH'><glossterm>MACHINE_ARCH</glossterm>
+ <glossentry id='var-MACHINE_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_ARCH</glossterm>
+ <info>
+ MACHINE_ARCH[doc] = "Specifies the name of the machine-specific architecture. This variable is set automatically from MACHINE or TUNE_PKGARCH."
+ </info>
<glossdef>
<para>
Specifies the name of the machine-specific architecture.
@@ -4917,9 +5900,11 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
+ <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
+ <info>
+ MACHINE_ESSENTIAL_EXTRA_RDEPENDS[doc] = "A list of required machine-specific packages to install as part of the image being built. Because this is a 'machine essential' variable, the list of packages are essential for the machine to boot."
+ </info>
<glossdef>
- <para></para>
<para>
A list of required machine-specific packages to install as part of
the image being built.
@@ -4949,9 +5934,11 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
+ <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
+ <info>
+ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS[doc] = "A list of recommended machine-specific packages to install as part of the image being built. Because this is a 'machine essential' variable, the list of packages are essential for the machine to boot."
+ </info>
<glossdef>
- <para></para>
<para>
A list of recommended machine-specific packages to install as part of
the image being built.
@@ -4997,7 +5984,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
+ <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_EXTRA_RDEPENDS</glossterm>
+ <info>
+ MACHINE_EXTRA_RDEPENDS[doc] = "A list of machine-specific packages to install as part of the image being built that are not essential for the machine to boot. However, the build process for more fully-featured images depends on the packages being present."
+ </info>
<glossdef>
<para>
A list of machine-specific packages to install as part of the
@@ -5036,9 +6026,11 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
+ <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_EXTRA_RRECOMMENDS</glossterm>
+ <info>
+ MACHINE_EXTRA_RRECOMMENDS[doc] = "A list of machine-specific packages to install as part of the image being built that are not essential for booting the machine. The image being built has no build dependencies on the packages in this list."
+ </info>
<glossdef>
- <para></para>
<para>
A list of machine-specific packages to install as part of the
image being built that are not essential for booting the machine.
@@ -5075,7 +6067,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
+ <glossentry id='var-MACHINE_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_FEATURES</glossterm>
+ <info>
+ MACHINE_FEATURES[doc] = "Specifies the list of hardware features the MACHINE supports."
+ </info>
<glossdef>
<para>
Specifies the list of hardware features the
@@ -5098,7 +6093,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
+ <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_FEATURES_BACKFILL</glossterm>
+ <info>
+ MACHINE_FEATURES_BACKFILL[doc] = "Features to be added to MACHINE_FEATURES if not also present in MACHINE_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and is not intended to be user-configurable."
+ </info>
<glossdef>
<para>Features to be added to
<filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
@@ -5117,7 +6115,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
+ <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
+ <info>
+ MACHINE_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from MACHINE_FEATURES_BACKFILL that should not be backfilled (i.e. added to MACHINE_FEATURES) during the build."
+ </info>
<glossdef>
<para>Features from
<filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
@@ -5130,7 +6131,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
+ <glossentry id='var-MACHINEOVERRIDES'><glossterm><imagedata fileref="figures/define-generic.png" />MACHINEOVERRIDES</glossterm>
+ <info>
+ MACHINEOVERRIDES[doc] = "Lists overrides specific to the current machine. By default, this list includes the value of MACHINE."
+ </info>
<glossdef>
<para>
Lists overrides specific to the current machine.
@@ -5159,13 +6163,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
+ <glossentry id='var-MAINTAINER'><glossterm><imagedata fileref="figures/define-generic.png" />MAINTAINER</glossterm>
+ <info>
+ MAINTAINER[doc] = "The email address of the distribution maintainer."
+ </info>
<glossdef>
<para>The email address of the distribution maintainer.</para>
</glossdef>
</glossentry>
- <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
+ <glossentry id='var-MIRRORS'><glossterm><imagedata fileref="figures/define-generic.png" />MIRRORS</glossterm>
+ <info>
+ MIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
+ </info>
<glossdef>
<para>
Specifies additional paths from which the OpenEmbedded
@@ -5190,7 +6200,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
+ <glossentry id='var-MLPREFIX'><glossterm><imagedata fileref="figures/define-generic.png" />MLPREFIX</glossterm>
+ <info>
+ MLPREFIX[doc] = "Specifies a prefix has been added to PN to create a special version of a recipe or package, such as a Multilib version."
+ </info>
<glossdef>
<para>
Specifies a prefix has been added to
@@ -5205,56 +6218,40 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-module_autoload'><glossterm>module_autoload</glossterm>
+ <glossentry id='var-module_autoload'><glossterm><imagedata fileref="figures/define-generic.png" />module_autoload</glossterm>
+ <info>
+ module_autoload[doc] = "This variable has been replaced by the KERNEL_MODULE_AUTOLOAD variable. You should replace all occurrences of module_autoload with additions to KERNEL_MODULE_AUTOLOAD."
+ </info>
<glossdef>
<para>
- Lists kernel modules that need to be auto-loaded during
- boot.
- </para>
-
- <para>
- You can use this variable anywhere that it can be
- recognized by the kernel recipe or out-of-tree kernel
- module recipe (e.g. a machine configuration file, a
- distribution configuration file, an append file for the
- recipe, or the recipe itself).
- </para>
-
- <para>
- Specify it as follows:
+ This variable has been replaced by the
+ <filename>KERNEL_MODULE_AUTOLOAD</filename> variable.
+ You should replace all occurrences of
+ <filename>module_autoload</filename> with additions to
+ <filename>KERNEL_MODULE_AUTOLOAD</filename>, for example:
<literallayout class='monospaced'>
- module_autoload_&lt;modname&gt; = "modname1 modname2 modname3"
+ module_autoload_rfcomm = "rfcomm"
</literallayout>
- You must use the kernel module name override.
- </para>
-
- <para>
- Including <filename>module_autoload</filename> causes the
- OpenEmbedded build system to populate the
- <filename>/etc/modules-load.d/modname.conf</filename>
- file with the list of modules to be auto-loaded on boot.
- The modules appear one-per-line in the file.
- Here is an example of the most common use case:
+ should now be replaced with:
<literallayout class='monospaced'>
- module_autoload_modname = "modname"
+ KERNEL_MODULE_AUTOLOAD += "rfcomm"
</literallayout>
- </para>
-
- <para>
- For information on how to populate the
- <filename>modname.conf</filename> file with
- <filename>modprobe.d</filename> syntax lines, see the
- <link linkend='var-module_conf'><filename>module_conf</filename></link>
- variable.
+ See the
+ <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
+ variable for more information.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-module_conf'><glossterm>module_conf</glossterm>
+ <glossentry id='var-module_conf'><glossterm><imagedata fileref="figures/define-generic.png" />module_conf</glossterm>
+ <info>
+ module_conf[doc] = "Specifies modprobe.d syntax lines for inclusion in the /etc/modprobe.d/modname.conf file."
+ </info>
<glossdef>
<para>
- Specifies <filename>modprobe.d</filename> syntax lines
- for inclusion in the
+ Specifies
+ <ulink url='http://linux.die.net/man/5/modprobe.d'><filename>modprobe.d</filename></ulink>
+ syntax lines for inclusion in the
<filename>/etc/modprobe.d/modname.conf</filename> file.
</para>
@@ -5264,19 +6261,23 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
module recipe (e.g. a machine configuration file, a
distribution configuration file, an append file for the
recipe, or the recipe itself).
+ If you use this variable, you must also be sure to list
+ the module name in the
+ <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
+ variable.
</para>
<para>
Here is the general syntax:
<literallayout class='monospaced'>
- module_conf_&lt;modname&gt; = "modprobe.d-syntax"
+ module_conf_<replaceable>module_name</replaceable> = "<replaceable>modprobe.d-syntax</replaceable>"
</literallayout>
You must use the kernel module name override.
</para>
<para>
Run <filename>man modprobe.d</filename> in the shell to
- find out more information on the exact syntax for lines
+ find out more information on the exact syntax
you want to provide with <filename>module_conf</filename>.
</para>
@@ -5285,22 +6286,27 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
OpenEmbedded build system to populate the
<filename>/etc/modprobe.d/modname.conf</filename>
file with <filename>modprobe.d</filename> syntax lines.
- Here is an example:
+ Here is an example that adds the options
+ <filename>arg1</filename> and <filename>arg2</filename>
+ to a module named <filename>mymodule</filename>:
<literallayout class='monospaced'>
- module_conf_&lt;modname&gt; = "options modname arg1=val1 arg2=val2"
+ module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
</literallayout>
</para>
<para>
For information on how to specify kernel modules to
auto-load on boot, see the
- <link linkend='var-module_autoload'><filename>module_autoload</filename></link>
+ <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
variable.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-MODULE_IMAGE_BASE_NAME'><glossterm>MODULE_IMAGE_BASE_NAME</glossterm>
+ <glossentry id='var-MODULE_IMAGE_BASE_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />MODULE_IMAGE_BASE_NAME</glossterm>
+ <info>
+ MODULE_IMAGE_BASE_NAME[doc] = "The base name of the kernel modules tarball."
+ </info>
<glossdef>
<para>
The base name of the kernel modules tarball.
@@ -5322,7 +6328,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
+ <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm><imagedata fileref="figures/define-generic.png" />MODULE_TARBALL_DEPLOY</glossterm>
+ <info>
+ MODULE_TARBALL_DEPLOY[doc] = "Controls creation of the modules-*.tgz file. Set this variable to "0" to disable creation of this file, which contains all of the kernel modules resulting from a kernel build."
+ </info>
<glossdef>
<para>
Controls creation of the <filename>modules-*.tgz</filename>
@@ -5334,7 +6343,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
+ <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm><imagedata fileref="figures/define-generic.png" />MULTIMACH_TARGET_SYS</glossterm>
+ <info>
+ MULTIMACH_TARGET_SYS[doc] = "Separates files for different machines such that you can build for multiple target machines using the same output directories."
+ </info>
<glossdef>
<para>
Separates files for different machines such that you can build
@@ -5349,7 +6361,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-n'><title>N</title>
- <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
+ <glossentry id='var-NATIVELSBSTRING'><glossterm><imagedata fileref="figures/define-generic.png" />NATIVELSBSTRING</glossterm>
+ <info>
+ NATIVELSBSTRING[doc] = "A string identifying the host distribution."
+ </info>
<glossdef>
<para>
A string identifying the host distribution.
@@ -5374,7 +6389,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
+ <glossentry id='var-NO_RECOMMENDATIONS'><glossterm><imagedata fileref="figures/define-generic.png" />NO_RECOMMENDATIONS</glossterm>
+ <info>
+ NO_RECOMMENDATIONS[doc] = "When set to '1', no recommended packages will be installed. Realize that some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
+ </info>
<glossdef>
<para>
Prevents installation of all "recommended-only" packages.
@@ -5391,7 +6409,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>local.conf</filename> file or you can attach it to
a specific image recipe by using the recipe name override:
<literallayout class='monospaced'>
- NO_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
+ NO_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
</literallayout>
</para>
@@ -5428,7 +6446,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-NOHDD'><glossterm>NOHDD</glossterm>
+ <glossentry id='var-NOHDD'><glossterm><imagedata fileref="figures/define-generic.png" />NOHDD</glossterm>
+ <info>
+ NOHDD[doc] = "Causes the OpenEmbedded build system to skip building the .hddimg image."
+ </info>
<glossdef>
<para>
Causes the OpenEmbedded build system to skip building the
@@ -5442,7 +6463,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-NOISO'><glossterm>NOISO</glossterm>
+ <glossentry id='var-NOISO'><glossterm><imagedata fileref="figures/define-generic.png" />NOISO</glossterm>
+ <info>
+ NOISO[doc] = "Causes the OpenEmbedded build system to skip building the ISO image."
+ </info>
<glossdef>
<para>
Causes the OpenEmbedded build system to skip building the
@@ -5461,11 +6485,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-o'><title>O</title>
- <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
+ <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm><imagedata fileref="figures/define-generic.png" />OE_BINCONFIG_EXTRA_MANGLE</glossterm>
+ <info>
+ OE_BINCONFIG_EXTRA_MANGLE[doc] = "When a recipe inherits the binconfig.bbclass class, this variable specifies additional arguments passed to the "sed" command."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>binconfig.bbclass</filename> class, this variable
+ When inheriting the
+ <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
+ class, this variable
specifies additional arguments passed to the "sed" command.
The sed command alters any paths in configuration scripts
that have been set up during compilation.
@@ -5490,7 +6518,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
+ <glossentry id='var-OE_IMPORTS'><glossterm><imagedata fileref="figures/define-generic.png" />OE_IMPORTS</glossterm>
+ <info>
+ OE_IMPORTS[doc] = "An internal variable used to tell the OpenEmbedded build system what Python modules to import for every Python function run by the system."
+ </info>
<glossdef>
<para>
An internal variable used to tell the OpenEmbedded build
@@ -5505,7 +6536,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
+ <glossentry id='var-OE_TERMINAL'><glossterm><imagedata fileref="figures/define-generic.png" />OE_TERMINAL</glossterm>
+ <info>
+ OE_TERMINAL[doc] = "Controls how the OpenEmbedded build system spawns interactive terminals on the host development system."
+ </info>
<glossdef>
<para>
Controls how the OpenEmbedded build system spawns
@@ -5536,7 +6570,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
+ <glossentry id='var-OEROOT'><glossterm><imagedata fileref="figures/define-generic.png" />OEROOT</glossterm>
+ <info>
+ OEROOT[doc] = "The directory from which the top-level build environment setup script is sourced."
+ </info>
<glossdef>
<para>
The directory from which the top-level build environment
@@ -5558,7 +6595,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
+ <glossentry id='var-OLDEST_KERNEL'><glossterm><imagedata fileref="figures/define-generic.png" />OLDEST_KERNEL</glossterm>
+ <info>
+ OLDEST_KERNEL[doc] = "Declares the oldest version of the Linux kernel that the produced binaries must support."
+ </info>
<glossdef>
<para>
Declares the oldest version of the Linux kernel that the
@@ -5577,7 +6617,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
+ <glossentry id='var-OVERRIDES'><glossterm><imagedata fileref="figures/define-generic.png" />OVERRIDES</glossterm>
+ <info>
+ OVERRIDES[doc] = "BitBake uses OVERRIDES to control what variables are overridden after BitBake parses recipes and configuration files."
+ </info>
<glossdef>
<para>
BitBake uses <filename>OVERRIDES</filename> to control
@@ -5594,7 +6637,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-p'><title>P</title>
- <glossentry id='var-P'><glossterm>P</glossterm>
+ <glossentry id='var-P'><glossterm><imagedata fileref="figures/define-generic.png" />P</glossterm>
+ <info>
+ P[doc] = "The recipe name and version. P is comprised of ${PN}-${PV}."
+ </info>
<glossdef>
<para>The recipe name and version.
<filename>P</filename> is comprised of the following:
@@ -5604,7 +6650,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
+ <glossentry id='var-PACKAGE_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_ARCH</glossterm>
+ <info>
+ PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
+ </info>
<glossdef>
<para>
The architecture of the resulting package or packages.
@@ -5630,7 +6679,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_ARCHS'><glossterm>PACKAGE_ARCHS</glossterm>
+ <glossentry id='var-PACKAGE_ARCHS'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_ARCHS</glossterm>
+ <info>
+ PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given target in order of priority."
+ </info>
<glossdef>
<para>
Specifies a list of architectures compatible with
@@ -5646,9 +6698,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
-
-
- <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
+ <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_BEFORE_PN</glossterm>
+ <info>
+ PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES before ${PN} so that the packages can pick up files that would normally be included in the default package."
+ </info>
<glossdef>
<para>Enables easily adding packages to
<filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
@@ -5658,7 +6711,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
+ <glossentry id='var-PACKAGE_CLASSES'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_CLASSES</glossterm>
+ <info>
+ PACKAGE_CLASSES[doc] = "This variable specifies the package manager to use when packaging data. It is set in the conf/local.conf file in the Build Directory."
+ </info>
<glossdef>
<para>
This variable, which is set in the
@@ -5707,19 +6763,80 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
+ <glossentry id='var-PACKAGE_DEBUG_SPLIT_STYLE'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_DEBUG_SPLIT_STYLE</glossterm>
+ <info>
+ PACKAGE_DEBUG_SPLIT_STYLE[doc] = "Determines how to split up the binary and debug information when creating *-dbg packages to be used with the GNU Project Debugger (GDB)."
+ </info>
+ <glossdef>
+ <para>
+ Determines how to split up the binary and debug information
+ when creating <filename>*-dbg</filename> packages to be
+ used with the GNU Project Debugger (GDB).
+ </para>
+
+ <para>
+ With the
+ <filename>PACKAGE_DEBUG_SPLIT_STYLE</filename> variable,
+ you can control where debug information, which can include
+ or exclude source files, is stored:
+ <itemizedlist>
+ <listitem><para>
+ ".debug": Debug symbol files are placed next
+ to the binary in a <filename>.debug</filename>
+ directory on the target.
+ For example, if a binary is installed into
+ <filename>/bin</filename>, the corresponding debug
+ symbol files are installed in
+ <filename>/bin/.debug</filename>.
+ Source files are placed in
+ <filename>/usr/src/debug</filename>.
+ This is the default behavior.
+ </para></listitem>
+ <listitem><para>
+ "debug-file-directory": Debug symbol files are
+ placed under <filename>/usr/lib/debug</filename>
+ on the target, and separated by the path from where
+ the binary is installed.
+ For example, if a binary is installed in
+ <filename>/bin</filename>, the corresponding debug
+ symbols are installed in
+ <filename>/usr/lib/debug/bin</filename>.
+ Source files are placed in
+ <filename>/usr/src/debug</filename>.
+ </para></listitem>
+ <listitem><para>
+ "debug-without-src": The same behavior as
+ ".debug" previously described with the exception
+ that no source files are installed.
+ </para></listitem>.
+ </itemizedlist>
+ </para>
+
+ <para>
+ You can find out more about debugging using GDB by reading
+ the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
+ section in the Yocto Project Development Manual.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-PACKAGE_EXCLUDE'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_EXCLUDE</glossterm>
+ <info>
+ PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a listed package is required, an error is generated."
+ </info>
<glossdef>
<para>
Lists packages that should not be installed into an image.
For example:
<literallayout class='monospaced'>
- PACKAGE_EXCLUDE = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
+ PACKAGE_EXCLUDE = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
</literallayout>
You can set this variable globally in your
<filename>local.conf</filename> file or you can attach it to
a specific image recipe by using the recipe name override:
<literallayout class='monospaced'>
- PACKAGE_EXCLUDE_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
+ PACKAGE_EXCLUDE_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
</literallayout>
</para>
@@ -5752,17 +6869,22 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
+ <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_EXTRA_ARCHS</glossterm>
+ <info>
+ PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures compatible with the device CPU. This variable is useful when you build for several different devices that use miscellaneous processors."
+ </info>
<glossdef>
<para>Specifies the list of architectures compatible with the device CPU.
This variable is useful when you build for several different devices that use
- miscellaneous processors such as XScale and ARM926-EJS).</para>
+ miscellaneous processors such as XScale and ARM926-EJS.</para>
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_GROUP'><glossterm>PACKAGE_GROUP</glossterm>
+ <glossentry id='var-PACKAGE_GROUP'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_GROUP</glossterm>
+ <info>
+ PACKAGE_GROUP[doc] = "Defines one or more packages to include in an image when a specific item is included in IMAGE_FEATURES."
+ </info>
<glossdef>
-
<para>
The <filename>PACKAGE_GROUP</filename> variable has been
renamed to
@@ -5779,7 +6901,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
+ <glossentry id='var-PACKAGE_INSTALL'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_INSTALL</glossterm>
+ <info>
+ PACKAGE_INSTALL[doc] = "List of the packages to be installed into the image. The variable is generally not user-defined and uses IMAGE_INSTALL as part of the list."
+ </info>
<glossdef>
<para>
The final list of packages passed to the package manager
@@ -5807,7 +6932,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGE_PREPROCESS_FUNCS'><glossterm>PACKAGE_PREPROCESS_FUNCS</glossterm>
+ <glossentry id='var-PACKAGE_PREPROCESS_FUNCS'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGE_PREPROCESS_FUNCS</glossterm>
+ <info>
+ PACKAGE_PREPROCESS_FUNCS[doc] = "Specifies a list of functions run to pre-process the PKGD directory prior to splitting the files out to individual packages."
+ </info>
<glossdef>
<para>
Specifies a list of functions run to pre-process the
@@ -5818,7 +6946,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
+ <glossentry id='var-PACKAGECONFIG'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGECONFIG</glossterm>
+ <info>
+ PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."
+ </info>
<glossdef>
<para>
This variable provides a means of enabling or disabling
@@ -5903,8 +7034,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<itemizedlist>
<listitem><para><emphasis>Append file:</emphasis>
Create an append file named
- <filename>&lt;recipename&gt;.bbappend</filename> in your
- layer and override the value of
+ <replaceable>recipename</replaceable><filename>.bbappend</filename>
+ in your layer and override the value of
<filename>PACKAGECONFIG</filename>.
You can either completely override the variable:
<literallayout class='monospaced'>
@@ -5918,22 +7049,25 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
This method is identical to changing the block
through an append file except you edit your
<filename>local.conf</filename> or
- <filename>&lt;mydistro&gt;.conf</filename> file.
+ <filename><replaceable>mydistro</replaceable>.conf</filename> file.
As with append files previously described,
you can either completely override the variable:
<literallayout class='monospaced'>
- PACKAGECONFIG_pn-&lt;recipename&gt;="f4 f5"
+ PACKAGECONFIG_pn-<replaceable>recipename</replaceable>="f4 f5"
</literallayout>
Or, you can just amend the variable:
<literallayout class='monospaced'>
- PACKAGECONFIG_append_pn-&lt;recipename&gt; = " f4"
+ PACKAGECONFIG_append_pn-<replaceable>recipename</replaceable> = " f4"
</literallayout></para></listitem>
</itemizedlist>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
+ <glossentry id='var-PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGES</glossterm>
+ <info>
+ PACKAGES[doc] = "The list of packages to be created from the recipe."
+ </info>
<glossdef>
<para>The list of packages to be created from the recipe.
The default value is the following:
@@ -5943,25 +7077,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PACKAGESPLITFUNCS'><glossterm>PACKAGESPLITFUNCS</glossterm>
- <glossdef>
- <para>
- Specifies a list of functions run to perform additional
- splitting of files into individual packages.
- Recipes can either prepend to this variable or prepend
- to the <filename>populate_packages</filename> function
- in order to perform additional package splitting.
- In either case, the function should set
- <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
- <link linkend='var-FILES'><filename>FILES</filename></link>,
- <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
- and other packaging variables appropriately in order to
- perform the desired splitting.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
+ <glossentry id='var-PACKAGES_DYNAMIC'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGES_DYNAMIC</glossterm>
+ <info>
+ PACKAGES_DYNAMIC[doc] = "A promise that your recipe satisfies runtime dependencies for optional modules that are found in other recipes."
+ </info>
<glossdef>
<para>
A promise that your recipe satisfies runtime dependencies
@@ -5999,7 +7118,31 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
+ <glossentry id='var-PACKAGESPLITFUNCS'><glossterm><imagedata fileref="figures/define-generic.png" />PACKAGESPLITFUNCS</glossterm>
+ <info>
+ PACKAGESPLITFUNCS[doc] = "Specifies a list of functions run to perform additional splitting of files into individual packages."
+ </info>
+ <glossdef>
+ <para>
+ Specifies a list of functions run to perform additional
+ splitting of files into individual packages.
+ Recipes can either prepend to this variable or prepend
+ to the <filename>populate_packages</filename> function
+ in order to perform additional package splitting.
+ In either case, the function should set
+ <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
+ <link linkend='var-FILES'><filename>FILES</filename></link>,
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
+ and other packaging variables appropriately in order to
+ perform the desired splitting.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-PARALLEL_MAKE'><glossterm><imagedata fileref="figures/define-generic.png" />PARALLEL_MAKE</glossterm>
+ <info>
+ PARALLEL_MAKE[doc] = "Specifies extra options that are passed to the make command during the compile tasks. This variable is usually in the form -j 4, where the number represents the maximum number of parallel threads make can run."
+ </info>
<glossdef>
<para>
Extra options passed to the <filename>make</filename>
@@ -6027,7 +7170,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
+ <glossentry id='var-PARALLEL_MAKEINST'><glossterm><imagedata fileref="figures/define-generic.png" />PARALLEL_MAKEINST</glossterm>
+ <info>
+ PARALLEL_MAKEINST[doc] = "Extra options passed to the make install command during the do_install task in order to specify parallel installation."
+ </info>
<glossdef>
<para>
Extra options passed to the
@@ -6045,7 +7191,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
+ <glossentry id='var-PATCHRESOLVE'><glossterm><imagedata fileref="figures/define-generic.png" />PATCHRESOLVE</glossterm>
+ <info>
+ PATCHRESOLVE[doc] = "Enable or disable interactive patch resolution."
+ </info>
<glossdef>
<para>
Determines the action to take when a patch fails.
@@ -6069,7 +7218,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
+ <glossentry id='var-PATCHTOOL'><glossterm><imagedata fileref="figures/define-generic.png" />PATCHTOOL</glossterm>
+ <info>
+ PATCHTOOL[doc] = "Specifies the utility used to apply patches for a recipe during do_patch."
+ </info>
<glossdef>
<para>
Specifies the utility used to apply patches for a recipe
@@ -6096,7 +7248,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PE'><glossterm>PE</glossterm>
+ <glossentry id='var-PE'><glossterm><imagedata fileref="figures/define-generic.png" />PE</glossterm>
+ <info>
+ PE[doc] = "The epoch of the recipe. The default value is '0'. The field is used to make upgrades possible when the versioning scheme changes in some backwards incompatible way."
+ </info>
<glossdef>
<para>
The epoch of the recipe.
@@ -6108,7 +7263,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PF'><glossterm>PF</glossterm>
+ <glossentry id='var-PF'><glossterm><imagedata fileref="figures/define-generic.png" />PF</glossterm>
+ <info>
+ PF[doc] = "Specifies the recipe or package name and includes all version and revision numbers. This variable is comprised of ${PN}-${EXTENDPE}${PV}-${PR}."
+ </info>
<glossdef>
<para>Specifies the recipe or package name and includes all version and revision
numbers (i.e. <filename>eglibc-2.13-r20+svnr15508/</filename> and
@@ -6120,10 +7278,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PIXBUF_PACKAGES'><glossterm>PIXBUF_PACKAGES</glossterm>
+ <glossentry id='var-PIXBUF_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />PIXBUF_PACKAGES</glossterm>
+ <info>
+ PIXBUF_PACKAGES[doc] = "When a recipe inherits the pixbufcache class, this variable identifies packages that contain the pixbuf loaders used with gdk-pixbuf."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
+ When inheriting the
<link linkend='ref-classes-pixbufcache'><filename>pixbufcache</filename></link>
class, this variable identifies packages that contain
the pixbuf loaders used with
@@ -6137,7 +7298,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKG'><glossterm>PKG</glossterm>
+ <glossentry id='var-PKG'><glossterm><imagedata fileref="figures/define-generic.png" />PKG</glossterm>
+ <info>
+ PKG[doc] = "The name of the resulting package created by the OpenEmbedded build system. When you use this variable, you must use a package name override."
+ </info>
<glossdef>
<para>
The name of the resulting package created by the
@@ -6149,12 +7313,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For example, when the
<link linkend='ref-classes-debian'><filename>debian</filename></link>
class renames the output package, it does so by setting
- <filename>PKG_&lt;packagename&gt;</filename>.
+ <filename>PKG_<replaceable>packagename</replaceable></filename>.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
+ <glossentry id='var-PKGD'><glossterm><imagedata fileref="figures/define-generic.png" />PKGD</glossterm>
+ <info>
+ PKGD[doc] = "Points to the destination directory for files to be packaged before they are split into individual packages."
+ </info>
<glossdef>
<para>
Points to the destination directory for files to be
@@ -6168,7 +7335,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
+ <glossentry id='var-PKGDATA_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />PKGDATA_DIR</glossterm>
+ <info>
+ PKGDATA_DIR[doc] = "Points to a shared, global-state directory that holds data generated during the packaging process."
+ </info>
<glossdef>
<para>
Points to a shared, global-state directory that holds data
@@ -6186,7 +7356,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
+ <glossentry id='var-PKGDEST'><glossterm><imagedata fileref="figures/define-generic.png" />PKGDEST</glossterm>
+ <info>
+ PKGDEST[doc] = "Points to the parent directory for files to be packaged after they have been split into individual packages."
+ </info>
<glossdef>
<para>
Points to the parent directory for files to be packaged
@@ -6203,7 +7376,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
+ <glossentry id='var-PKGDESTWORK'><glossterm><imagedata fileref="figures/define-generic.png" />PKGDESTWORK</glossterm>
+ <info>
+ PKGDESTWORK[doc] = "Points to a temporary work area used by the do_package task to write output from the do_packagedata task."
+ </info>
<glossdef>
<para>
Points to a temporary work area used by the
@@ -6228,7 +7404,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGE'><glossterm>PKGE</glossterm>
+ <glossentry id='var-PKGE'><glossterm><imagedata fileref="figures/define-generic.png" />PKGE</glossterm>
+ <info>
+ PKGE[doc] = "The epoch of the output package built by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
The epoch of the output package built by the
@@ -6239,7 +7418,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGR'><glossterm>PKGR</glossterm>
+ <glossentry id='var-PKGR'><glossterm><imagedata fileref="figures/define-generic.png" />PKGR</glossterm>
+ <info>
+ PKGR[doc] = "The revision of the output package built by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
The revision of the output package built by the
@@ -6250,7 +7432,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PKGV'><glossterm>PKGV</glossterm>
+ <glossentry id='var-PKGV'><glossterm><imagedata fileref="figures/define-generic.png" />PKGV</glossterm>
+ <info>
+ PKGV[doc] = "The version of the output package built by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
The version of the output package built by the
@@ -6261,7 +7446,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PN'><glossterm>PN</glossterm>
+ <glossentry id='var-PN'><glossterm><imagedata fileref="figures/define-generic.png" />PN</glossterm>
+ <info>
+ PN[doc] = "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package. It refers to a package name in the context of a file created or produced by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>This variable can have two separate functions depending on the context: a recipe
name or a resulting package name.</para>
@@ -6285,7 +7473,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PNBLACKLIST'><glossterm>PNBLACKLIST</glossterm>
+ <glossentry id='var-PNBLACKLIST'><glossterm><imagedata fileref="figures/define-generic.png" />PNBLACKLIST</glossterm>
+ <info>
+ PNBLACKLIST[doc] = "Lists recipes you do not want the OpenEmbedded build system to build."
+ </info>
<glossdef>
<para>
Lists recipes you do not want the OpenEmbedded build system
@@ -6309,7 +7500,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PR'><glossterm>PR</glossterm>
+ <glossentry id='var-PR'><glossterm><imagedata fileref="figures/define-generic.png" />PR</glossterm>
+ <info>
+ PR[doc] = "The revision of the recipe. The default value for this variable is 'r0'."
+ </info>
<glossdef>
<para>
The revision of the recipe.
@@ -6318,7 +7512,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
+ <glossentry id='var-PREFERRED_PROVIDER'><glossterm><imagedata fileref="figures/define-generic.png" />PREFERRED_PROVIDER</glossterm>
+ <info>
+ PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
+ </info>
<glossdef>
<para>
If multiple recipes provide an item, this variable
@@ -6337,7 +7534,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
+ <glossentry id='var-PREFERRED_VERSION'><glossterm><imagedata fileref="figures/define-generic.png" />PREFERRED_VERSION</glossterm>
+ <info>
+ PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
+ </info>
<glossdef>
<para>
If there are multiple versions of recipes available, this
@@ -6360,7 +7560,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
+ <glossentry id='var-PREMIRRORS'><glossterm><imagedata fileref="figures/define-generic.png" />PREMIRRORS</glossterm>
+ <info>
+ PREMIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
+ </info>
<glossdef>
<para>
Specifies additional paths from which the OpenEmbedded
@@ -6405,7 +7608,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
+ <glossentry id='var-PRINC'><glossterm><imagedata fileref="figures/define-generic.png" />PRINC</glossterm>
+ <info>
+ PRINC[doc] = "Causes the PR variable of .bbappend files to dynamically increment. This increment minimizes the impact of layer ordering. This variable defaults to '0'."
+ </info>
<glossdef>
<para>
@@ -6451,7 +7657,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PRIVATE_LIBS'><glossterm>PRIVATE_LIBS</glossterm>
+ <glossentry id='var-PRIVATE_LIBS'><glossterm><imagedata fileref="figures/define-generic.png" />PRIVATE_LIBS</glossterm>
+ <info>
+ PRIVATE_LIBS[doc] = "Specifies libraries installed within a recipe that should be ignored by the OpenEmbedded build system's shared library resolver."
+ </info>
<glossdef>
<para>
Specifies libraries installed within a recipe that
@@ -6483,7 +7692,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
+ <glossentry id='var-PROVIDES'><glossterm><imagedata fileref="figures/define-generic.png" />PROVIDES</glossterm>
+ <info>
+ PROVIDES[doc] = "A list of aliases that a recipe also provides. These aliases are useful for satisfying dependencies of other recipes during the build as specified by DEPENDS."
+ </info>
<glossdef>
<para>
A list of aliases by which a particular recipe can be
@@ -6512,7 +7724,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PRSERV_HOST'><glossterm>PRSERV_HOST</glossterm>
+ <glossentry id='var-PRSERV_HOST'><glossterm><imagedata fileref="figures/define-generic.png" />PRSERV_HOST</glossterm>
+ <info>
+ PRSERV_HOST[doc] = "The network based PR service host and port."
+ </info>
<glossdef>
<para>
The network based
@@ -6538,7 +7753,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PTEST_ENABLED'><glossterm>PTEST_ENABLED</glossterm>
+ <glossentry id='var-PTEST_ENABLED'><glossterm><imagedata fileref="figures/define-generic.png" />PTEST_ENABLED</glossterm>
+ <info>
+ PRSERV_HOST[doc] = "Specifies whether or not Package Test (ptest) functionality is enabled when building a recipe."
+ </info>
<glossdef>
<para>
Specifies whether or not
@@ -6553,7 +7771,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PV'><glossterm>PV</glossterm>
+ <glossentry id='var-PV'><glossterm><imagedata fileref="figures/define-generic.png" />PV</glossterm>
+ <info>
+ PV[doc] = "The version of the recipe. The version is normally extracted from the recipe filename."
+ </info>
<glossdef>
<para>
The version of the recipe.
@@ -6568,7 +7789,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PYTHON_ABI'><glossterm>PYTHON_ABI</glossterm>
+ <glossentry id='var-PYTHON_ABI'><glossterm><imagedata fileref="figures/define-generic.png" />PYTHON_ABI</glossterm>
+ <info>
+ PYTHON_ABI[doc] = "When used by recipes that inherit the distutils3, setuptools3, distutils, or setuptools classes, denotes the Application Binary Interface (ABI) currently in use for Python."
+ </info>
<glossdef>
<para>
When used by recipes that inherit the
@@ -6601,7 +7825,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-PYTHON_PN'><glossterm>PYTHON_PN</glossterm>
+ <glossentry id='var-PYTHON_PN'><glossterm><imagedata fileref="figures/define-generic.png" />PYTHON_PN</glossterm>
+ <info>
+ PYTHON_PN[doc] = "When used by recipes that inherit the distutils3, setuptools3, distutils, or setuptools classes, specifies the major Python version being built."
+ </info>
<glossdef>
<para>
When used by recipes that inherit the
@@ -6634,7 +7861,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-q'><title>Q</title>
- <glossentry id='var-QMAKE_PROFILES'><glossterm>QMAKE_PROFILES</glossterm>
+ <glossentry id='var-QMAKE_PROFILES'><glossterm><imagedata fileref="figures/define-generic.png" />QMAKE_PROFILES</glossterm>
+ <info>
+ QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for use with qmake."
+ </info>
<glossdef>
<para>
Specifies your own subset of <filename>.pro</filename>
@@ -6659,7 +7889,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-r'><title>R</title>
- <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
+ <glossentry id='var-RCONFLICTS'><glossterm><imagedata fileref="figures/define-generic.png" />RCONFLICTS</glossterm>
+ <info>
+ RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed."
+ </info>
<glossdef>
<para>
The list of packages that conflict with packages.
@@ -6672,7 +7905,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
them in conjunction with a package name override.
Here is an example:
<literallayout class='monospaced'>
- RCONFLICTS_${PN} = "another-conflicting-package-name"
+ RCONFLICTS_${PN} = "<replaceable>another-conflicting-package-name</replaceable>"
</literallayout>
</para>
@@ -6684,7 +7917,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here is the general syntax to specify versions with
the <filename>RCONFLICTS</filename> variable:
<literallayout class='monospaced'>
- RCONFLICTS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
+ RCONFLICTS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
</literallayout>
For <filename>operator</filename>, you can specify the
following:
@@ -6704,7 +7937,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
+ <glossentry id='var-RDEPENDS'><glossterm><imagedata fileref="figures/define-generic.png" />RDEPENDS</glossterm>
+ <info>
+ RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)."
+ </info>
<glossdef>
<para>
Lists a package's runtime dependencies (i.e. other packages)
@@ -6776,7 +8012,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
as it would in the <filename>PACKAGES</filename>
namespace before any renaming of the output package by
classes like
- <link linkend='ref-classes-debian'><filename>debian.bbclass</filename></link>.
+ <link linkend='ref-classes-debian'><filename>debian</filename></link>.
</para>
<para>
@@ -6810,7 +8046,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here is the general syntax to specify versions with
the <filename>RDEPENDS</filename> variable:
<literallayout class='monospaced'>
- RDEPENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
+ RDEPENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
</literallayout>
For <filename>operator</filename>, you can specify the
following:
@@ -6836,11 +8072,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-REQUIRED_DISTRO_FEATURES'><glossterm>REQUIRED_DISTRO_FEATURES</glossterm>
+ <glossentry id='var-REQUIRED_DISTRO_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />REQUIRED_DISTRO_FEATURES</glossterm>
+ <info>
+ REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>distro_features_check</filename> class, this
+ When inheriting the
+ <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
+ class, this
variable identifies distribution features that must
exist in the current configuration in order for the
OpenEmbedded build system to build the recipe.
@@ -6854,7 +8094,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RM_OLD_IMAGE'><glossterm>RM_OLD_IMAGE</glossterm>
+ <glossentry id='var-RM_OLD_IMAGE'><glossterm><imagedata fileref="figures/define-generic.png" />RM_OLD_IMAGE</glossterm>
+ <info>
+ RM_OLD_IMAGE[doc] = "Reclaims disk space by removing previously built versions of the same image from the images directory pointed to by the DEPLOY_DIR variable."
+ </info>
<glossdef>
<para>
Reclaims disk space by removing previously built
@@ -6872,7 +8115,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
+ <glossentry id='var-RM_WORK_EXCLUDE'><glossterm><imagedata fileref="figures/define-generic.png" />RM_WORK_EXCLUDE</glossterm>
+ <info>
+ RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed."
+ </info>
<glossdef>
<para>
With <filename>rm_work</filename> enabled, this
@@ -6884,7 +8130,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-ROOT_HOME'><glossterm>ROOT_HOME</glossterm>
+ <glossentry id='var-ROOT_HOME'><glossterm><imagedata fileref="figures/define-generic.png" />ROOT_HOME</glossterm>
+ <info>
+ ROOT_HOME[doc] = "Defines the root home directory."
+ </info>
<glossdef>
<para>
Defines the root home directory.
@@ -6917,7 +8166,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-ROOTFS'><glossterm>ROOTFS</glossterm>
+ <glossentry id='var-ROOTFS'><glossterm><imagedata fileref="figures/define-generic.png" />ROOTFS</glossterm>
+ <info>
+ ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem."
+ </info>
<glossdef>
<para>
Indicates a filesystem image to include as the root
@@ -6933,14 +8185,17 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
+ <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm><imagedata fileref="figures/define-generic.png" />ROOTFS_POSTPROCESS_COMMAND</glossterm>
+ <info>
+ ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem."
+ </info>
<glossdef>
<para>
Added by classes to run post processing commands once the
OpenEmbedded build system has created the root filesystem.
You can specify shell commands separated by semicolons:
<literallayout class='monospaced'>
- ROOTFS_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
+ ROOTFS_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... "
</literallayout>
If you need to pass the path to the root filesystem within
the command, you can use
@@ -6953,7 +8208,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
+ <glossentry id='var-RPROVIDES'><glossterm><imagedata fileref="figures/define-generic.png" />RPROVIDES</glossterm>
+ <info>
+ RPROVIDES[doc] = "A list of package name aliases that a package also provides. These aliases are useful for satisfying runtime dependencies of other packages both during the build and on the target."
+ </info>
<glossdef>
<para>
A list of package name aliases that a package also provides.
@@ -6977,37 +8235,49 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
+ <glossentry id='var-RRECOMMENDS'><glossterm><imagedata fileref="figures/define-generic.png" />RRECOMMENDS</glossterm>
+ <info>
+ RRECOMMENDS[doc] = "A list of packages that extends the usability of a package being built. The package being built does not depend on this list of packages in order to successfully build, but needs them for the extended usability."
+ </info>
<glossdef>
<para>
A list of packages that extends the usability of a package
being built.
The package being built does not depend on this list of
- packages in order to successfully build, but needs them for
- the extended usability.
+ packages in order to successfully build, but rather
+ uses them for extended usability.
To specify runtime dependencies for packages, see the
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
variable.
</para>
<para>
- The OpenEmbedded build process automatically installs the
- list of packages as part of the built package.
- However, you can remove these packages later if you want.
- If, during the build, a package from the
- <filename>RRECOMMENDS</filename> list cannot be
- found, the build process continues without an error.
- </para>
-
- <para>
- You can also prevent packages in the list from being
- installed by using several variables.
- See the
+ The package manager will automatically install the
+ <filename>RRECOMMENDS</filename> list of packages when
+ installing the built package.
+ However, you can prevent listed packages from being
+ installed by using the
<link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
<link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
and
<link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
- variables for more information.
+ variables.
+ </para>
+
+ <para>
+ Packages specified in
+ <filename>RRECOMMENDS</filename> need not actually be
+ produced.
+ However, a recipe must exist that provides each package,
+ either through the
+ <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
+ or
+ <link linkend='var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></link>
+ variables or the
+ <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>
+ variable, or an error will occur during the build.
+ If such a recipe does exist and the package is not produced,
+ the build continues without error.
</para>
<para>
@@ -7019,7 +8289,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
that is extended to support wireless functionality.
In this case, you would use the following:
<literallayout class='monospaced'>
- RRECOMMENDS_${PN}-dev += "&lt;wireless_package_name&gt;"
+ RRECOMMENDS_${PN}-dev += "<replaceable>wireless_package_name</replaceable>"
</literallayout>
In the example, the package name
(<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
@@ -7037,7 +8307,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here is the general syntax to specify versions with
the <filename>RRECOMMENDS</filename> variable:
<literallayout class='monospaced'>
- RRECOMMENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
+ RRECOMMENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
</literallayout>
For <filename>operator</filename>, you can specify the
following:
@@ -7057,7 +8327,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
+ <glossentry id='var-RREPLACES'><glossterm><imagedata fileref="figures/define-generic.png" />RREPLACES</glossterm>
+ <info>
+ RREPLACES[doc] = "A list of packages replaced by a package. The package manager uses this variable to determine which package should be installed to replace other package(s) during an upgrade."
+ </info>
<glossdef>
<para>
A list of packages replaced by a package.
@@ -7075,7 +8348,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
override.
Here is an example:
<literallayout class='monospaced'>
- RREPLACES_${PN} = "other-package-being-replaced"
+ RREPLACES_${PN} = "<replaceable>other-package-being-replaced</replaceable>"
</literallayout>
</para>
@@ -7087,7 +8360,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here is the general syntax to specify versions with
the <filename>RREPLACES</filename> variable:
<literallayout class='monospaced'>
- RREPLACES_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
+ RREPLACES_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
</literallayout>
For <filename>operator</filename>, you can specify the
following:
@@ -7108,7 +8381,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
+ <glossentry id='var-RSUGGESTS'><glossterm><imagedata fileref="figures/define-generic.png" />RSUGGESTS</glossterm>
+ <info>
+ RSUGGESTS[doc] = "A list of additional packages that you can suggest for installation by the package manager at the time a package is installed. Not all package managers support this functionality."
+ </info>
<glossdef>
<para>
A list of additional packages that you can suggest for
@@ -7122,7 +8398,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
override.
Here is an example:
<literallayout class='monospaced'>
- RSUGGESTS_${PN} = "useful-package another-package"
+ RSUGGESTS_${PN} = "<replaceable>useful-package</replaceable> <replaceable>another-package</replaceable>"
</literallayout>
</para>
</glossdef>
@@ -7132,7 +8408,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-s'><title>S</title>
- <glossentry id='var-S'><glossterm>S</glossterm>
+ <glossentry id='var-S'><glossterm><imagedata fileref="figures/define-generic.png" />S</glossterm>
+ <info>
+ S[doc] = "The location in the Build Directory where unpacked package source code resides."
+ </info>
<glossdef>
<para>
The location in the
@@ -7163,7 +8442,25 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
+ <glossentry id='var-SANITY_REQUIRED_UTILITIES'><glossterm><imagedata fileref="figures/define-generic.png" />SANITY_REQUIRED_UTILITIES</glossterm>
+ <info>
+ SANITY_REQUIRED_UTILITIES[doc] = "Specifies a list of command-line utilities that should be checked for during the initial sanity checking process when running BitBake."
+ </info>
+ <glossdef>
+ <para>
+ Specifies a list of command-line utilities that should be
+ checked for during the initial sanity checking process when
+ running BitBake.
+ If any of the utilities are not installed on the build host,
+ then BitBake immediately exits with an error.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm><imagedata fileref="figures/define-generic.png" />SANITY_TESTED_DISTROS</glossterm>
+ <info>
+ SANITY_TESTED_DISTROS[doc] = "A list of the host distribution identifiers that the build system has been tested against."
+ </info>
<glossdef>
<para>
A list of the host distribution identifiers that the
@@ -7184,7 +8481,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
+ <glossentry id='var-SDK_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_ARCH</glossterm>
+ <info>
+ SDK_ARCH[doc] = "The target architecture for the SDK."
+ </info>
<glossdef>
<para>
The target architecture for the SDK.
@@ -7195,7 +8495,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_DEPLOY'><glossterm>SDK_DEPLOY</glossterm>
+ <glossentry id='var-SDK_DEPLOY'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_DEPLOY</glossterm>
+ <info>
+ SDK_DEPLOY[doc] = "The directory set up and used by the populate_sdk_base to which the SDK is deployed."
+ </info>
<glossdef>
<para>
The directory set up and used by the
@@ -7210,7 +8513,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_DIR'><glossterm>SDK_DIR</glossterm>
+ <glossentry id='var-SDK_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_DIR</glossterm>
+ <info>
+ SDK_DIR[doc] = "The parent directory used by the OpenEmbedded build system when creating SDK output."
+ </info>
<glossdef>
<para>
The parent directory used by the OpenEmbedded build system
@@ -7232,7 +8538,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
+ <glossentry id='var-SDK_NAME'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_NAME</glossterm>
+ <info>
+ SDK_NAME[doc] = "The base name for SDK output files."
+ </info>
<glossdef>
<para>
The base name for SDK output files.
@@ -7251,7 +8560,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_OUTPUT'><glossterm>SDK_OUTPUT</glossterm>
+ <glossentry id='var-SDK_OUTPUT'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_OUTPUT</glossterm>
+ <info>
+ SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creating SDK output."
+ </info>
<glossdef>
<para>
The location used by the OpenEmbedded build system when
@@ -7275,7 +8587,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDK_PACKAGE_ARCHS'><glossterm>SDK_PACKAGE_ARCHS</glossterm>
+ <glossentry id='var-SDK_PACKAGE_ARCHS'><glossterm><imagedata fileref="figures/define-generic.png" />SDK_PACKAGE_ARCHS</glossterm>
+ <info>
+ SDK_PACKAGE_ARCHS[doc] = "Specifies a list of architectures compatible with the SDK machine. This variable is set automatically and should not normally be hand-edited."
+ </info>
<glossdef>
<para>
Specifies a list of architectures compatible with
@@ -7291,20 +8606,26 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
+ <glossentry id='var-SDKIMAGE_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />SDKIMAGE_FEATURES</glossterm>
+ <info>
+ SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'."
+ </info>
<glossdef>
<para>Equivalent to
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
However, this variable applies to the SDK generated from an
image using the following command:
<literallayout class='monospaced'>
- $ bitbake -c populate_sdk imagename
+ $ bitbake -c populate_sdk <replaceable>imagename</replaceable>
</literallayout>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
+ <glossentry id='var-SDKMACHINE'><glossterm><imagedata fileref="figures/define-generic.png" />SDKMACHINE</glossterm>
+ <info>
+ SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items."
+ </info>
<glossdef>
<para>
The machine for which the Application Development Toolkit
@@ -7333,7 +8654,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SDKPATH'><glossterm>SDKPATH</glossterm>
+ <glossentry id='var-SDKPATH'><glossterm><imagedata fileref="figures/define-generic.png" />SDKPATH</glossterm>
+ <info>
+ SDKPATH[doc] = "Defines the path offered to the user for installation of the SDK that is generated by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
Defines the path offered to the user for installation
@@ -7347,14 +8671,20 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
+ <glossentry id='var-SECTION'><glossterm><imagedata fileref="figures/define-generic.png" />SECTION</glossterm>
+ <info>
+ SECTION[doc] = "The section in which packages should be categorized. Package management utilities can make use of this variable."
+ </info>
<glossdef>
<para>The section in which packages should be categorized.
Package management utilities can make use of this variable.</para>
</glossdef>
</glossentry>
- <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
+ <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm><imagedata fileref="figures/define-generic.png" />SELECTED_OPTIMIZATION</glossterm>
+ <info>
+ SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless DEBUG_BUILD = '1'. In this case, the value of DEBUG_OPTIMIZATION is used."
+ </info>
<glossdef>
<para>
Specifies the optimization flags passed to the C compiler
@@ -7375,7 +8705,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
+ <glossentry id='var-SERIAL_CONSOLE'><glossterm><imagedata fileref="figures/define-generic.png" />SERIAL_CONSOLE</glossterm>
+ <info>
+ SERIAL_CONSOLE[doc] = "The speed and device for the serial port used to attach the serial console. This variable is given to the kernel as the 'console' parameter. After booting occurs, getty is started on that port so remote login is possible."
+ </info>
<glossdef>
<para>
Defines a serial console (TTY) to enable using getty.
@@ -7396,7 +8729,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
+ <glossentry id='var-SERIAL_CONSOLES'><glossterm><imagedata fileref="figures/define-generic.png" />SERIAL_CONSOLES</glossterm>
+ <info>
+ SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty."
+ </info>
<glossdef>
<para>
Defines the serial consoles (TTYs) to enable using getty.
@@ -7410,7 +8746,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
+ <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm><imagedata fileref="figures/define-generic.png" />SERIAL_CONSOLES_CHECK</glossterm>
+ <info>
+ SERIAL_CONSOLES_CHECK[doc] = "Similar to SERIAL_CONSOLES except the device is checked for existence before attempting to enable it. Supported only by SysVinit."
+ </info>
<glossdef>
<para>
Similar to
@@ -7423,7 +8762,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
+ <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm><imagedata fileref="figures/define-generic.png" />SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
+ <info>
+ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe."
+ </info>
<glossdef>
<para>
A list of recipe dependencies that should not be used to
@@ -7451,7 +8793,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
+ <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm><imagedata fileref="figures/define-generic.png" />SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
+ <info>
+ SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change."
+ </info>
<glossdef>
<para>
A list of recipes that are completely stable and will
@@ -7471,7 +8816,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
+ <glossentry id='var-SITEINFO_BITS'><glossterm><imagedata fileref="figures/define-generic.png" />SITEINFO_BITS</glossterm>
+ <info>
+ SITEINFO_BITS[doc] = "Specifies the number of bits for the target system CPU."
+ </info>
<glossdef>
<para>
Specifies the number of bits for the target system CPU.
@@ -7480,7 +8828,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
+ <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm><imagedata fileref="figures/define-generic.png" />SITEINFO_ENDIANNESS</glossterm>
+ <info>
+ SITEINFO_ENDIANNESS[doc] = "Specifies the endian byte order of the target system. The value should be either 'le' for 'little-endian' or 'be' for 'big-endian'."
+ </info>
<glossdef>
<para>
Specifies the endian byte order of the target system.
@@ -7489,7 +8840,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
+ <glossentry id='var-SOC_FAMILY'><glossterm><imagedata fileref="figures/define-generic.png" />SOC_FAMILY</glossterm>
+ <info>
+ SOC_FAMILY[doc] = "Groups together machines based upon the same family of SOC (System On Chip). You typically set this variable in a common .inc file that you include in the configuration files of all the machines."
+ </info>
<glossdef>
<para>
Groups together machines based upon the same family
@@ -7507,7 +8861,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
+ <glossentry id='var-SOLIBS'><glossterm><imagedata fileref="figures/define-generic.png" />SOLIBS</glossterm>
+ <info>
+ SOLIBS[doc] = "Defines the suffix for shared libraries used on the target platform."
+ </info>
<glossdef>
<para>
Defines the suffix for shared libraries used on the
@@ -7525,7 +8882,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
+ <glossentry id='var-SOLIBSDEV'><glossterm><imagedata fileref="figures/define-generic.png" />SOLIBSDEV</glossterm>
+ <info>
+ SOLIBSDEV[doc] = "Defines the suffix for the development symbolic link (symlink) for shared libraries on the target platform."
+ </info>
<glossdef>
<para>
Defines the suffix for the development symbolic link
@@ -7543,7 +8903,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SOURCE_MIRROR_URL'><glossterm>SOURCE_MIRROR_URL</glossterm>
+ <glossentry id='var-SOURCE_MIRROR_URL'><glossterm><imagedata fileref="figures/define-generic.png" />SOURCE_MIRROR_URL</glossterm>
+ <info>
+ SOURCE_MIRROR_URL[doc] = "URL to source mirror that will be used before fetching from original SRC_URI."
+ </info>
<glossdef>
<para>
Defines your own
@@ -7570,7 +8933,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SPDXLICENSEMAP'><glossterm>SPDXLICENSEMAP</glossterm>
+ <glossentry id='var-SPDXLICENSEMAP'><glossterm><imagedata fileref="figures/define-generic.png" />SPDXLICENSEMAP</glossterm>
+ <info>
+ SPDXLICENSEMAP[doc] = "Maps commonly used license names to their SPDX counterparts found in meta/files/common-licenses/."
+ </info>
<glossdef>
<para>
Maps commonly used license names to their SPDX counterparts
@@ -7588,7 +8954,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
+ <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm><imagedata fileref="figures/define-generic.png" />SPECIAL_PKGSUFFIX</glossterm>
+ <info>
+ SPECIAL_PKGSUFFIX[doc] = "A list of prefixes for PN used by the OpenEmbedded build system to create variants of recipes or packages. The list specifies the prefixes to strip off during certain circumstances such as the generation of the BPN variable."
+ </info>
<glossdef>
<para>
A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
@@ -7599,7 +8968,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
+ <glossentry id='var-SRC_URI'><glossterm><imagedata fileref="figures/define-generic.png" />SRC_URI</glossterm>
+ <info>
+ SRC_URI[doc] = "The list of source files - local or remote. This variable tells the OpenEmbedded build system what bits to pull in for the build and how to pull them in."
+ </info>
<glossdef>
<para>The list of source files - local or remote.
This variable tells the OpenEmbedded build system which bits
@@ -7664,8 +9036,9 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
<listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
a repo (Git) repository.</para></listitem>
- <listitem><para><emphasis><filename>svk://</filename> -</emphasis> Fetches files from
- an SVK revision control repository.</para></listitem>
+ <listitem><para><emphasis><filename>ccrc://</filename> -</emphasis>
+ Fetches files from a ClearCase repository.
+ </para></listitem>
<listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
the Internet using <filename>http</filename>.</para></listitem>
<listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
@@ -7750,9 +9123,11 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
+ <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
+ <info>
+ SRC_URI_OVERRIDES_PACKAGE_ARCH[doc] = "By default, the OpenEmbedded build system automatically detects whether SRC_URI contains files that are machine-specific. If so, the build system automatically changes PACKAGE_ARCH. Setting this variable to '0' disables this behavior."
+ </info>
<glossdef>
- <para></para>
<para>
By default, the OpenEmbedded build system automatically detects whether
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
@@ -7764,7 +9139,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
+ <glossentry id='var-SRCDATE'><glossterm><imagedata fileref="figures/define-generic.png" />SRCDATE</glossterm>
+ <info>
+ SRCDATE[doc] = "The date of the source code used to build the package. This variable applies only if the source was fetched from a Source Code Manager (SCM)."
+ </info>
<glossdef>
<para>
The date of the source code used to build the package.
@@ -7773,7 +9151,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
+ <glossentry id='var-SRCPV'><glossterm><imagedata fileref="figures/define-generic.png" />SRCPV</glossterm>
+ <info>
+ SRCPV[doc] = "Returns the version string of the current package. This string is used to help define the value of PV."
+ </info>
<glossdef>
<para>
Returns the version string of the current package.
@@ -7807,7 +9188,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
+ <glossentry id='var-SRCREV'><glossterm><imagedata fileref="figures/define-generic.png" />SRCREV</glossterm>
+ <info>
+ SRCREV[doc] = "The revision of the source code used to build the package. This variable applies to Subversion, Git, Mercurial and Bazaar only."
+ </info>
<glossdef>
<para>
The revision of the source code used to build the package.
@@ -7821,13 +9205,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
+ <glossentry id='var-SSTATE_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />SSTATE_DIR</glossterm>
+ <info>
+ SSTATE_DIR[doc] = "The directory for the shared state cache."
+ </info>
<glossdef>
<para>The directory for the shared state cache.</para>
</glossdef>
</glossentry>
- <glossentry id='var-SSTATE_MIRROR_ALLOW_NETWORK'><glossterm>SSTATE_MIRROR_ALLOW_NETWORK</glossterm>
+ <glossentry id='var-SSTATE_MIRROR_ALLOW_NETWORK'><glossterm><imagedata fileref="figures/define-generic.png" />SSTATE_MIRROR_ALLOW_NETWORK</glossterm>
+ <info>
+ SSTATE_MIRROR_ALLOW_NETWORK[doc] = "If set to "1", allows fetches from mirrors that are specified in SSTATE_MIRRORS to work even when fetching from the network has been disabled by setting BB_NO_NETWORK to "1"."
+ </info>
<glossdef>
<para>
If set to "1", allows fetches from
@@ -7846,7 +9236,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
+ <glossentry id='var-SSTATE_MIRRORS'><glossterm><imagedata fileref="figures/define-generic.png" />SSTATE_MIRRORS</glossterm>
+ <info>
+ SSTATE_MIRRORS[doc] = "Configures the OpenEmbedded build system to search other mirror locations for prebuilt cache data objects before building out the data. You can specify a filesystem directory or a remote URL such as HTTP or FTP."
+ </info>
<glossdef>
<para>
Configures the OpenEmbedded build system to search other
@@ -7877,14 +9270,17 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
directory structure.
<literallayout class='monospaced'>
SSTATE_MIRRORS ?= "\
- file://.* http://someserver.tld/share/sstate/PATH \n \
- file://.* file:///some/local/dir/sstate/PATH"
+ file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH \n \
+ file://.* file:///<replaceable>some-local-dir</replaceable>/sstate/PATH"
</literallayout>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_BASE_LIBDIR_NATIVE'><glossterm>STAGING_BASE_LIBDIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_BASE_LIBDIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_BASE_LIBDIR_NATIVE</glossterm>
+ <info>
+ STAGING_BASE_LIBDIR_NATIVE[doc] = "Specifies the path to the /lib subdirectory of the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/lib</filename>
@@ -7894,7 +9290,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_BASELIBDIR'><glossterm>STAGING_BASELIBDIR</glossterm>
+ <glossentry id='var-STAGING_BASELIBDIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_BASELIBDIR</glossterm>
+ <info>
+ STAGING_BASELIBDIR[doc] = "Specifies the path to the /lib subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/lib</filename>
@@ -7905,7 +9304,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_BINDIR'><glossterm>STAGING_BINDIR</glossterm>
+ <glossentry id='var-STAGING_BINDIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_BINDIR</glossterm>
+ <info>
+ STAGING_BINDIR[doc] = "Specifies the path to the /usr/bin subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the
@@ -7917,7 +9319,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_BINDIR_CROSS'><glossterm>STAGING_BINDIR_CROSS</glossterm>
+ <glossentry id='var-STAGING_BINDIR_CROSS'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_BINDIR_CROSS</glossterm>
+ <info>
+ STAGING_BINDIR_CROSS[doc] = "Specifies the path to the directory containing binary configuration scripts. These scripts provide configuration information for other software that wants to make use of libraries or include files provided by the software associated with the script."
+ </info>
<glossdef>
<para>
Specifies the path to the directory containing binary
@@ -7939,7 +9344,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_BINDIR_NATIVE'><glossterm>STAGING_BINDIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_BINDIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_BINDIR_NATIVE</glossterm>
+ <info>
+ STAGING_BINDIR_NATIVE[doc] = "Specifies the path to the /usr/bin subdirectory of the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
Specifies the path to the
@@ -7949,7 +9357,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_DATADIR'><glossterm>STAGING_DATADIR</glossterm>
+ <glossentry id='var-STAGING_DATADIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DATADIR</glossterm>
+ <info>
+ STAGING_DATADIR[doc] = "Specifies the path to the /usr/share subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/usr/share</filename>
@@ -7960,7 +9371,22 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_DIR'><glossterm>STAGING_DIR</glossterm>
+ <glossentry id='var-STAGING_DATADIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DATADIR_NATIVE</glossterm>
+ <info>
+ STAGING_DATADIR_NATIVE[doc] = "Specifies the path to the /usr/share subdirectory of the sysroot directory for the build host."
+ </info>
+ <glossdef>
+ <para>
+ Specifies the path to the <filename>/usr/share</filename>
+ subdirectory of the sysroot directory for the build host.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-STAGING_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DIR</glossterm>
+ <info>
+ STAGING_DIR[doc] = "Specifies the path to the top-level sysroots directory (i.e. ${TMPDIR}/sysroots)."
+ </info>
<glossdef>
<para>
Specifies the path to the top-level sysroots directory
@@ -7981,7 +9407,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_DIR_HOST'><glossterm>STAGING_DIR_HOST</glossterm>
+ <glossentry id='var-STAGING_DIR_HOST'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DIR_HOST</glossterm>
+ <info>
+ STAGING_DIR_HOST[doc] = "Specifies the path to the primary sysroot directory for which the target is being built."
+ </info>
<glossdef>
<para>
Specifies the path to the primary sysroot directory for
@@ -8007,18 +9436,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_DATADIR_NATIVE'><glossterm>STAGING_DATADIR_NATIVE</glossterm>
- <glossdef>
- <para>
- Specifies the path to the <filename>/usr/share</filename>
- subdirectory of the sysroot directory for the build host.
- </para>
- </glossdef>
- </glossentry>
-
-
-
- <glossentry id='var-STAGING_DIR_NATIVE'><glossterm>STAGING_DIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_DIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DIR_NATIVE</glossterm>
+ <info>
+ STAGING_DIR_NATIVE[doc] = "Specifies the path to the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
Specifies the path to the sysroot directory for the
@@ -8027,7 +9448,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_DIR_TARGET'><glossterm>STAGING_DIR_TARGET</glossterm>
+ <glossentry id='var-STAGING_DIR_TARGET'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_DIR_TARGET</glossterm>
+ <info>
+ STAGING_DIR_TARGET[doc] = "Specifies the path to the sysroot directory for the target for which the current recipe is being built."
+ </info>
<glossdef>
<para>
Specifies the path to the sysroot directory for the
@@ -8051,7 +9475,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_ETCDIR_NATIVE'><glossterm>STAGING_ETCDIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_ETCDIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_ETCDIR_NATIVE</glossterm>
+ <info>
+ STAGING_ETCDIR_NATIVE[doc] = "Specifies the path to the /etc subdirectory of the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/etc</filename>
@@ -8061,7 +9488,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_EXECPREFIXDIR'><glossterm>STAGING_EXECPREFIXDIR</glossterm>
+ <glossentry id='var-STAGING_EXECPREFIXDIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_EXECPREFIXDIR</glossterm>
+ <info>
+ STAGING_EXECPREFIXDIR[doc] = "Specifies the path to the /usr subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/usr</filename>
@@ -8072,7 +9502,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_INCDIR'><glossterm>STAGING_INCDIR</glossterm>
+ <glossentry id='var-STAGING_INCDIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_INCDIR</glossterm>
+ <info>
+ STAGING_INCDIR[doc] = "Specifies the path to the /usr/include subdirectory of the sysroot directory for the target for which the current recipe being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the
@@ -8084,7 +9517,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_INCDIR_NATIVE'><glossterm>STAGING_INCDIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_INCDIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_INCDIR_NATIVE</glossterm>
+ <info>
+ STAGING_INCDIR_NATIVE[doc] = "Specifies the path to the /usr/include subdirectory of the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/usr/include</filename>
@@ -8093,36 +9529,48 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_LIBDIR'><glossterm>STAGING_LIBDIR</glossterm>
+ <glossentry id='var-STAGING_KERNEL_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_KERNEL_DIR</glossterm>
+ <info>
+ STAGING_KERNEL_DIR[doc] = "The directory with kernel headers that are required to build out-of-tree modules."
+ </info>
<glossdef>
<para>
- Specifies the path to the <filename>/usr/lib</filename>
- subdirectory of the sysroot directory for the target for
- which the current recipe is being built
- (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
+ The directory with kernel headers that are required to build out-of-tree
+ modules.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_LIBDIR_NATIVE'><glossterm>STAGING_LIBDIR_NATIVE</glossterm>
+ <glossentry id='var-STAGING_LIBDIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_LIBDIR</glossterm>
+ <info>
+ STAGING_LIBDIR[doc] = "Specifies the path to the /usr/lib subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
+ </info>
<glossdef>
<para>
Specifies the path to the <filename>/usr/lib</filename>
- subdirectory of the sysroot directory for the build host.
+ subdirectory of the sysroot directory for the target for
+ which the current recipe is being built
+ (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
</para>
</glossdef>
</glossentry>
- <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
+ <glossentry id='var-STAGING_LIBDIR_NATIVE'><glossterm><imagedata fileref="figures/define-generic.png" />STAGING_LIBDIR_NATIVE</glossterm>
+ <info>
+ STAGING_LIBDIR_NATIVE[doc] = "Specifies the path to the /usr/lib subdirectory of the sysroot directory for the build host."
+ </info>
<glossdef>
<para>
- The directory with kernel headers that are required to build out-of-tree
- modules.
+ Specifies the path to the <filename>/usr/lib</filename>
+ subdirectory of the sysroot directory for the build host.
</para>
</glossdef>
</glossentry>
- <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
+ <glossentry id='var-STAMP'><glossterm><imagedata fileref="figures/define-generic.png" />STAMP</glossterm>
+ <info>
+ STAMP[doc] = "Specifies the base path used to create recipe stamp files. The path to an actual stamp file is constructed by evaluating this string and then appending additional information."
+ </info>
<glossdef>
<para>
Specifies the base path used to create recipe stamp files.
@@ -8145,7 +9593,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
+ <glossentry id='var-STAMPS_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />STAMPS_DIR</glossterm>
+ <info>
+ STAMPS_DIR[doc] = "Specifies the base directory in which the OpenEmbedded build system places stamps."
+ </info>
<glossdef>
<para>
Specifies the base directory in which the OpenEmbedded
@@ -8156,7 +9607,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
+ <glossentry id='var-SUMMARY'><glossterm><imagedata fileref="figures/define-generic.png" />SUMMARY</glossterm>
+ <info>
+ SUMMARY[doc] = "The short (80 characters or less) summary of the binary package for packaging systems such as opkg, rpm or dpkg. By default, SUMMARY is used to define the DESCRIPTION variable if DESCRIPTION is not set in the recipe."
+ </info>
<glossdef>
<para>The short (72 characters or less) summary of the binary package for packaging
systems such as <filename>opkg</filename>, <filename>rpm</filename> or
@@ -8169,7 +9623,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSLINUX_DEFAULT_CONSOLE'><glossterm>SYSLINUX_DEFAULT_CONSOLE</glossterm>
+ <glossentry id='var-SYSLINUX_DEFAULT_CONSOLE'><glossterm><imagedata fileref="figures/define-generic.png" />SYSLINUX_DEFAULT_CONSOLE</glossterm>
+ <info>
+ SYSLINUX_DEFAULT_CONSOLE[doc] = "Specifies the kernel boot default console."
+ </info>
<glossdef>
<para>
Specifies the kernel boot default console.
@@ -8190,7 +9647,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSLINUX_OPTS'><glossterm>SYSLINUX_OPTS</glossterm>
+ <glossentry id='var-SYSLINUX_OPTS'><glossterm><imagedata fileref="figures/define-generic.png" />SYSLINUX_OPTS</glossterm>
+ <info>
+ SYSLINUX_OPTS[doc] = "Lists additional options to add to the syslinux file."
+ </info>
<glossdef>
<para>
Lists additional options to add to the syslinux file.
@@ -8207,7 +9667,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSLINUX_SERIAL'><glossterm>SYSLINUX_SERIAL</glossterm>
+ <glossentry id='var-SYSLINUX_SERIAL'><glossterm><imagedata fileref="figures/define-generic.png" />SYSLINUX_SERIAL</glossterm>
+ <info>
+ SYSLINUX_SERIAL[doc] = "Specifies the alternate serial port or turns it off."
+ </info>
<glossdef>
<para>
Specifies the alternate serial port or turns it off.
@@ -8223,7 +9686,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSLINUX_SPLASH'><glossterm>SYSLINUX_SPLASH</glossterm>
+ <glossentry id='var-SYSLINUX_SPLASH'><glossterm><imagedata fileref="figures/define-generic.png" />SYSLINUX_SPLASH</glossterm>
+ <info>
+ SYSLINUX_SPLASH[doc] = "An .LSS file used as the background for the VGA boot menu when you are using the boot menu."
+ </info>
<glossdef>
<para>
An <filename>.LSS</filename> file used as the background
@@ -8240,7 +9706,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSLINUX_SERIAL_TTY'><glossterm>SYSLINUX_SERIAL_TTY</glossterm>
+ <glossentry id='var-SYSLINUX_SERIAL_TTY'><glossterm><imagedata fileref="figures/define-generic.png" />SYSLINUX_SERIAL_TTY</glossterm>
+ <info>
+ SYSLINUX_SERIAL_TTY[doc] = "Specifies the alternate console=tty... kernel boot argument."
+ </info>
<glossdef>
<para>
Specifies the alternate console=tty... kernel boot argument.
@@ -8255,7 +9724,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
+ <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm><imagedata fileref="figures/define-generic.png" />SYSROOT_PREPROCESS_FUNCS</glossterm>
+ <info>
+ SYSROOT_PREPROCESS_FUNCS[doc] = "A list of functions to execute after files are staged into the sysroot. These functions are usually used to apply additional processing on the staged files, or to stage additional files."
+ </info>
<glossdef>
<para>
A list of functions to execute after files are staged into
@@ -8267,10 +9739,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm>SYSTEMD_AUTO_ENABLE</glossterm>
+ <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm><imagedata fileref="figures/define-generic.png" />SYSTEMD_AUTO_ENABLE</glossterm>
+ <info>
+ SYSTEMD_AUTO_ENABLE[doc] = "For recipes that inherit the systemd class, this variable specifies whether the service you have specified in SYSTEMD_SERVICE should be started automatically or not."
+ </info>
<glossdef>
<para>
- For recipes that inherit the
+ When inheriting the
<link linkend='ref-classes-systemd'><filename>systemd</filename></link>
class, this variable specifies whether the service you have
specified in
@@ -8290,10 +9765,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSTEMD_PACKAGES'><glossterm>SYSTEMD_PACKAGES</glossterm>
+ <glossentry id='var-SYSTEMD_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />SYSTEMD_PACKAGES</glossterm>
+ <info>
+ SYSTEMD_PACKAGES[doc] = "For recipes that inherit the systemd class, this variable locates the systemd unit files when they are not found in the main recipe's package."
+ </info>
<glossdef>
<para>
- For recipes that inherit the
+ When inheriting the
<link linkend='ref-classes-systemd'><filename>systemd</filename></link>
class, this variable locates the systemd unit files when
they are not found in the main recipe's package.
@@ -8313,10 +9791,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSTEMD_SERVICE'><glossterm>SYSTEMD_SERVICE</glossterm>
+ <glossentry id='var-SYSTEMD_SERVICE'><glossterm><imagedata fileref="figures/define-generic.png" />SYSTEMD_SERVICE</glossterm>
+ <info>
+ SYSTEMD_SERVICE[doc] = "For recipes that inherit the systemd class, this variable specifies the systemd service name for a package."
+ </info>
<glossdef>
<para>
- For recipes that inherit the
+ When inheriting the
<link linkend='ref-classes-systemd'><filename>systemd</filename></link>
class, this variable specifies the systemd service name for
a package.
@@ -8334,7 +9815,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-SYSVINIT_ENABLED_GETTYS'><glossterm>SYSVINIT_ENABLED_GETTYS</glossterm>
+ <glossentry id='var-SYSVINIT_ENABLED_GETTYS'><glossterm><imagedata fileref="figures/define-generic.png" />SYSVINIT_ENABLED_GETTYS</glossterm>
+ <info>
+ SYSVINIT_ENABLED_GETTYS[doc] = "Specifies which virtual terminals should be running a getty, the default is '1'."
+ </info>
<glossdef>
<para>
When using
@@ -8359,7 +9843,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-t'><title>T</title>
- <glossentry id='var-T'><glossterm>T</glossterm>
+ <glossentry id='var-T'><glossterm><imagedata fileref="figures/define-generic.png" />T</glossterm>
+ <info>
+ T[doc] = "This variable points to a directory were BitBake places temporary files, which consist mostly of task logs and scripts, when building a particular recipe."
+ </info>
<glossdef>
<para>This variable points to a directory were BitBake places
temporary files, which consist mostly of task logs and
@@ -8380,7 +9867,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
+ <glossentry id='var-TARGET_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_ARCH</glossterm>
+ <info>
+ TARGET_ARCH[doc] = "The architecture of the device being built. The OpenEmbedded build system supports the following architectures: arm, mips, ppc, x86, x86-64."
+ </info>
<glossdef>
<para>
The target machine's architecture.
@@ -8406,7 +9896,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_AS_ARCH'><glossterm>TARGET_AS_ARCH</glossterm>
+ <glossentry id='var-TARGET_AS_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_AS_ARCH</glossterm>
+ <info>
+ TARGET_AS_ARCH[doc] = "Specifies architecture-specific assembler flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific assembler flags for the
@@ -8422,7 +9915,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_CC_ARCH'><glossterm>TARGET_CC_ARCH</glossterm>
+ <glossentry id='var-TARGET_CC_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_CC_ARCH</glossterm>
+ <info>
+ TARGET_CC_ARCH[doc] = "Specifies architecture-specific C compiler flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific C compiler flags for the
@@ -8442,7 +9938,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_CC_KERNEL_ARCH'><glossterm>TARGET_CC_KERNEL_ARCH</glossterm>
+ <glossentry id='var-TARGET_CC_KERNEL_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_CC_KERNEL_ARCH</glossterm>
+ <info>
+ TARGET_CC_KERNEL_ARCH[doc] = "This is a specific kernel compiler flag for a CPU or Application Binary Interface (ABI) tune."
+ </info>
<glossdef>
<para>
This is a specific kernel compiler flag for a CPU or
@@ -8463,7 +9962,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
+ <glossentry id='var-TARGET_CFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_CFLAGS</glossterm>
+ <info>
+ TARGET_CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as CFLAGS."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C compiler when building
@@ -8485,7 +9987,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_CPPFLAGS'><glossterm>TARGET_CPPFLAGS</glossterm>
+ <glossentry id='var-TARGET_CPPFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_CPPFLAGS</glossterm>
+ <info>
+ TARGET_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the target."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C pre-processor
@@ -8508,7 +10013,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_CXXFLAGS'><glossterm>TARGET_CXXFLAGS</glossterm>
+ <glossentry id='var-TARGET_CXXFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_CXXFLAGS</glossterm>
+ <info>
+ TARGET_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the target."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the C++ compiler when
@@ -8530,7 +10038,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
+ <glossentry id='var-TARGET_FPU'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_FPU</glossterm>
+ <info>
+ TARGET_FPU[doc] = "Specifies the method for handling FPU code. For FPU-less targets, which include most ARM CPUs, the variable must be set to 'soft'. If not, the kernel emulation gets used, which results in a performance penalty."
+ </info>
<glossdef>
<para>Specifies the method for handling FPU code.
For FPU-less targets, which include most ARM CPUs, the variable must be
@@ -8539,7 +10050,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_LD_ARCH'><glossterm>TARGET_LD_ARCH</glossterm>
+ <glossentry id='var-TARGET_LD_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_LD_ARCH</glossterm>
+ <info>
+ TARGET_LD_ARCH[doc] = "Specifies architecture-specific linker flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific linker flags for the
@@ -8555,7 +10069,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_LDFLAGS'><glossterm>TARGET_LDFLAGS</glossterm>
+ <glossentry id='var-TARGET_LDFLAGS'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_LDFLAGS</glossterm>
+ <info>
+ TARGET_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the target."
+ </info>
<glossdef>
<para>
Specifies the flags to pass to the linker when building
@@ -8577,7 +10094,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
+ <glossentry id='var-TARGET_OS'><glossterm><imagedata fileref="figures/define-generic.png" />TARGET_OS</glossterm>
+ <info>
+ TARGET_OS[doc] = "Specifies the target's operating system."
+ </info>
<glossdef>
<para>Specifies the target's operating system.
The variable can be set to "linux" for <filename>eglibc</filename>-based systems and
@@ -8587,7 +10107,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
+ <glossentry id='var-TCLIBC'><glossterm><imagedata fileref="figures/define-generic.png" />TCLIBC</glossterm>
+ <info>
+ TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'glibc' or 'uclibc'."
+ </info>
<glossdef>
<para>
Specifies the GNU standard C library (<filename>libc</filename>)
@@ -8605,7 +10128,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
+ <glossentry id='var-TCMODE'><glossterm><imagedata fileref="figures/define-generic.png" />TCMODE</glossterm>
+ <info>
+ TCMODE[doc] = "Enables an external toolchain (where provided by an additional layer) if set to a value other than 'default'."
+ </info>
<glossdef>
<para>
Specifies the toolchain selector.
@@ -8663,7 +10189,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_EXPORT_DIR'><glossterm>TEST_EXPORT_DIR</glossterm>
+ <glossentry id='var-TEST_EXPORT_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_EXPORT_DIR</glossterm>
+ <info>
+ TEST_EXPORT_DIR[doc] = "The location the OpenEmbedded build system uses to export tests when the TEST_EXPORT_ONLY variable is set to "1"."
+ </info>
<glossdef>
<para>
The location the OpenEmbedded build system uses to export
@@ -8679,7 +10208,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_EXPORT_ONLY'><glossterm>TEST_EXPORT_ONLY</glossterm>
+ <glossentry id='var-TEST_EXPORT_ONLY'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_EXPORT_ONLY</glossterm>
+ <info>
+ TEST_EXPORT_ONLY[doc] = "Specifies to export the tests only. Set this variable to "1" if you do not want to run the tests but you want them to be exported in a manner that you to run them outside of the build system."
+ </info>
<glossdef>
<para>
Specifies to export the tests only.
@@ -8690,7 +10222,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
+ <glossentry id='var-TEST_IMAGE'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_IMAGE</glossterm>
+ <info>
+ TEST_IMAGE[doc] = "Enables test booting of virtual machine images under the QEMU emulator after any root filesystems are created and runs tests against those images."
+ </info>
<glossdef>
<para>
Automatically runs the series of automated tests for
@@ -8720,7 +10255,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
+ <glossentry id='var-TEST_LOG_DIR'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_LOG_DIR</glossterm>
+ <info>
+ TEST_LOG_DIR[doc] = "Holds the SSH log and the boot log for QEMU machines. The <filename>TEST_LOG_DIR</filename> variable defaults to "${WORKDIR}/testimage"."
+ </info>
<glossdef>
<para>
Holds the SSH log and the boot log for QEMU machines.
@@ -8735,7 +10273,47 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
+ <glossentry id='var-TEST_POWERCONTROL_CMD'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_POWERCONTROL_CMD</glossterm>
+ <info>
+ TEST_POWERCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to control the power of the target machine under test"
+ </info>
+ <glossdef>
+ <para>
+ For automated hardware testing, specifies the command to
+ use to control the power of the target machine under test.
+ Typically, this command would point to a script that
+ performs the appropriate action (e.g. interacting
+ with a web-enabled power strip).
+ The specified command should expect to receive as the last
+ argument "off", "on" or "cycle" specifying to power off,
+ on, or cycle (power off and then power on) the device,
+ respectively.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-TEST_POWERCONTROL_EXTRA_ARGS'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_POWERCONTROL_EXTRA_ARGS</glossterm>
+ <info>
+ TEST_POWERCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_POWERCONTROL_CMD"
+ </info>
+ <glossdef>
+ <para>
+ For automated hardware testing, specifies additional
+ arguments to pass through to the command specified in
+ <link linkend='var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></link>.
+ Setting <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
+ is optional.
+ You can use it if you wish, for example, to separate the
+ machine-specific and non-machine-specific parts of the
+ arguments.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_QEMUBOOT_TIMEOUT</glossterm>
+ <info>
+ TEST_QEMUBOOT_TIMEOUT[doc] = "The time in seconds allowed for an image to boot before automated runtime tests begin to run against an image."
+ </info>
<glossdef>
<para>
The time in seconds allowed for an image to boot before
@@ -8755,7 +10333,53 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_SERVER_IP'><glossterm>TEST_SERVER_IP</glossterm>
+ <glossentry id='var-TEST_SERIALCONTROL_CMD'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_SERIALCONTROL_CMD</glossterm>
+ <info>
+ TEST_SERIALCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to connect to the serial console of the target machine under test."
+ </info>
+ <glossdef>
+ <para>
+ For automated hardware testing, specifies the command
+ to use to connect to the serial console of the target
+ machine under test.
+ This command simply needs to connect to the serial console
+ and forward that connection to standard input and output
+ as any normal terminal program does.
+ </para>
+
+ <para>
+ For example, to use the Picocom terminal program on
+ serial device <filename>/dev/ttyUSB0</filename> at
+ 115200bps, you would set the variable as follows:
+ <literallayout class='monospaced'>
+ TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
+ </literallayout>
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-TEST_SERIALCONTROL_EXTRA_ARGS'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_SERIALCONTROL_EXTRA_ARGS</glossterm>
+ <info>
+ TEST_SERIALCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_SERIALCONTROL_CMD."
+ </info>
+ <glossdef>
+ <para>
+ For automated hardware testing, specifies additional
+ arguments to pass through to the command specified in
+ <link linkend='var-TEST_SERIALCONTROL_CMD'><filename>TEST_SERIALCONTROL_CMD</filename></link>.
+ Setting <filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename>
+ is optional.
+ You can use it if you wish, for example, to separate the
+ machine-specific and non-machine-specific parts of the
+ command.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-TEST_SERVER_IP'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_SERVER_IP</glossterm>
+ <info>
+ TEST_SERVER_IP[doc] = "The IP address of the build machine (host machine). This IP address is usually automatically detected."
+ </info>
<glossdef>
<para>
The IP address of the build machine (host machine).
@@ -8773,7 +10397,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_TARGET'><glossterm>TEST_TARGET</glossterm>
+ <glossentry id='var-TEST_TARGET'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_TARGET</glossterm>
+ <info>
+ TEST_TARGET[doc] = "For automated runtime testing, specifies the method of deploying the image and running tests on the target machine."
+ </info>
<glossdef>
<para>
Specifies the target controller to use when running tests
@@ -8838,7 +10465,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_TARGET_IP'><glossterm>TEST_TARGET_IP</glossterm>
+ <glossentry id='var-TEST_TARGET_IP'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_TARGET_IP</glossterm>
+ <info>
+ TEST_TARGET_IP[doc] = "The IP address of your hardware under test."
+ </info>
<glossdef>
<para>
The IP address of your hardware under test.
@@ -8864,7 +10494,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
+ <glossentry id='var-TEST_SUITES'><glossterm><imagedata fileref="figures/define-generic.png" />TEST_SUITES</glossterm>
+ <info>
+ TEST_SUITES[doc] = "An ordered list of tests (modules) to run against an image when performing automated runtime testing."
+ </info>
<glossdef>
<para>
An ordered list of tests (modules) to run against
@@ -8884,7 +10517,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
You can add your own tests to the list of tests by
appending <filename>TEST_SUITES</filename> as follows:
<literallayout class='monospaced'>
- TEST_SUITES_append = " mytest"
+ TEST_SUITES_append = " <replaceable>mytest</replaceable>"
</literallayout>
Alternatively, you can provide the "auto" option to
have all applicable tests run against the image.
@@ -8919,7 +10552,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
+ <glossentry id='var-THISDIR'><glossterm><imagedata fileref="figures/define-generic.png" />THISDIR</glossterm>
+ <info>
+ THISDIR[doc] = "The directory in which the file BitBake is currently parsing is located."
+ </info>
<glossdef>
<para>
The directory in which the file BitBake is currently
@@ -8929,7 +10565,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
+ <glossentry id='var-TMPDIR'><glossterm><imagedata fileref="figures/define-generic.png" />TMPDIR</glossterm>
+ <info>
+ TMPDIR[doc] = "The temporary directory the OpenEmbedded build system uses when it does its work building images. By default, the TMPDIR variable is named tmp within the Build Directory."
+ </info>
<glossdef>
<para>
This variable is the base directory the OpenEmbedded
@@ -8967,7 +10606,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
+ <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm><imagedata fileref="figures/define-generic.png" />TOOLCHAIN_HOST_TASK</glossterm>
+ <info>
+ TOOLCHAIN_HOST_TASK[doc] = "This variable lists packages the OpenEmbedded build system uses when building an SDK, which contains a cross-development environment."
+ </info>
<glossdef>
<para>
This variable lists packages the OpenEmbedded build system
@@ -8997,7 +10639,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
+ <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm><imagedata fileref="figures/define-generic.png" />TOOLCHAIN_TARGET_TASK</glossterm>
+ <info>
+ TOOLCHAIN_TARGET_TASK[doc] = "This variable lists packages the OpenEmbedded build system uses when it creates the target part of an SDK, which includes libraries and headers."
+ </info>
<glossdef>
<para>
This variable lists packages the OpenEmbedded build system
@@ -9019,7 +10664,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
+ <glossentry id='var-TOPDIR'><glossterm><imagedata fileref="figures/define-generic.png" />TOPDIR</glossterm>
+ <info>
+ TOPDIR[doc] = "The Build Directory. BitBake automatically sets this variable. The OpenEmbedded build system uses the Build Directory when building images."
+ </info>
<glossdef>
<para>
The top-level
@@ -9033,7 +10681,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
+ <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TRANSLATED_TARGET_ARCH</glossterm>
+ <info>
+ TRANSLATED_TARGET_ARCH[doc] = "A sanitized version of TARGET_ARCH. This variable is used where the architecture is needed in a value where underscores are not allowed."
+ </info>
<glossdef>
<para>
A sanitized version of
@@ -9051,7 +10702,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_ARCH'><glossterm>TUNE_ARCH</glossterm>
+ <glossentry id='var-TUNE_ARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_ARCH</glossterm>
+ <info>
+ TUNE_ARCH[doc] = "The GNU canonical architecture for a specific architecture (i.e. arm, armeb, mips, mips64, and so forth)."
+ </info>
<glossdef>
<para>
The GNU canonical architecture for a specific architecture
@@ -9106,7 +10760,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_ASARGS'><glossterm>TUNE_ASARGS</glossterm>
+ <glossentry id='var-TUNE_ASARGS'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_ASARGS</glossterm>
+ <info>
+ TUNE_ASARGS[doc] = "Specifies architecture-specific assembler flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific assembler flags for
@@ -9115,7 +10772,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>TUNE_ASARGS</filename> is set using
the tune include files, which are typically under
<filename>meta/conf/machine/include/</filename> and are
- influenced through <filename>TUNE_FEATURES</filename>.
+ influenced through
+ <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
For example, the
<filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
file defines the flags for the x86 architecture as follows:
@@ -9123,14 +10781,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
</literallayout>
<note>
- Board Support Packages (BSPs) can supply their own
- set of flags.
+ Board Support Packages (BSPs) select the tune.
+ The selected tune, in turn, affects the tune variables
+ themselves (i.e. the tune can supply its own
+ set of flags).
</note>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_CCARGS'><glossterm>TUNE_CCARGS</glossterm>
+ <glossentry id='var-TUNE_CCARGS'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_CCARGS</glossterm>
+ <info>
+ TUNE_CCARGS[doc] = "Specifies architecture-specific C compiler flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific C compiler flags for
@@ -9139,16 +10802,22 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>TUNE_CCARGS</filename> is set using
the tune include files, which are typically under
<filename>meta/conf/machine/include/</filename> and are
- influenced through <filename>TUNE_FEATURES</filename>.
+ influenced through
+ <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
<note>
- Board Support Packages (BSPs) can supply their own
- set of flags.
+ Board Support Packages (BSPs) select the tune.
+ The selected tune, in turn, affects the tune variables
+ themselves (i.e. the tune can supply its own
+ set of flags).
</note>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_LDARGS'><glossterm>TUNE_LDARGS</glossterm>
+ <glossentry id='var-TUNE_LDARGS'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_LDARGS</glossterm>
+ <info>
+ TUNE_LDARGS[doc] = "Specifies architecture-specific linker flags for the target system."
+ </info>
<glossdef>
<para>
Specifies architecture-specific linker flags for
@@ -9157,7 +10826,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>TUNE_LDARGS</filename> is set using
the tune include files, which are typically under
<filename>meta/conf/machine/include/</filename> and are
- influenced through <filename>TUNE_FEATURES</filename>.
+ influenced through
+ <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
For example, the
<filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
file defines the flags for the x86 architecture as follows:
@@ -9165,14 +10835,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
</literallayout>
<note>
- Board Support Packages (BSPs) can supply their own
- set of flags.
+ Board Support Packages (BSPs) select the tune.
+ The selected tune, in turn, affects the tune variables
+ themselves (i.e. the tune can supply its own
+ set of flags).
</note>
</para>
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_FEATURES'><glossterm>TUNE_FEATURES</glossterm>
+ <glossentry id='var-TUNE_FEATURES'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_FEATURES</glossterm>
+ <info>
+ TUNE_FEATURES[doc] = "Features used to "tune" a compiler for optimal use given a specific processor."
+ </info>
<glossdef>
<para>
Features used to "tune" a compiler for optimal use
@@ -9202,22 +10877,20 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
+ <glossentry id='var-TUNE_PKGARCH'><glossterm><imagedata fileref="figures/define-generic.png" />TUNE_PKGARCH</glossterm>
+ <info>
+ TUNE_PKGARCH[doc] = "The package architecture understood by the packaging system to define the architecture, ABI, and tuning of output packages."
+ </info>
<glossdef>
<para>
The package architecture understood by the packaging
system to define the architecture, ABI, and tuning of
output packages.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id='var-TUNE_PKGARCH_tune'><glossterm>TUNE_PKGARCH_tune</glossterm>
- <glossdef>
- <para>
- The CPU or Application Binary Interface (ABI) specific
- tuning of the
- <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>.
+ The specific tune is defined using the "_tune" override
+ as follows:
+ <literallayout class='monospaced'>
+ TUNE_PKGARCH_tune-<replaceable>tune</replaceable> = "<replaceable>tune</replaceable>"
+ </literallayout>
</para>
<para>
@@ -9234,7 +10907,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNEABI'><glossterm>TUNEABI</glossterm>
+ <glossentry id='var-TUNEABI'><glossterm><imagedata fileref="figures/define-generic.png" />TUNEABI</glossterm>
+ <info>
+ TUNEABI[doc] = "An underlying ABI used by a particular tuning in a given toolchain layer. This feature allows providers using prebuilt libraries to check compatibility of a tuning against their selection of libraries."
+ </info>
<glossdef>
<para>
An underlying Application Binary Interface (ABI) used by
@@ -9258,7 +10934,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNEABI_OVERRIDE'><glossterm>TUNEABI_OVERRIDE</glossterm>
+ <glossentry id='var-TUNEABI_OVERRIDE'><glossterm><imagedata fileref="figures/define-generic.png" />TUNEABI_OVERRIDE</glossterm>
+ <info>
+ TUNEABI_OVERRIDE[doc] = "If set, ignores TUNEABI_WHITELIST."
+ </info>
<glossdef>
<para>
If set, the OpenEmbedded system ignores the
@@ -9281,7 +10960,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNEABI_WHITELIST'><glossterm>TUNEABI_WHITELIST</glossterm>
+ <glossentry id='var-TUNEABI_WHITELIST'><glossterm><imagedata fileref="figures/define-generic.png" />TUNEABI_WHITELIST</glossterm>
+ <info>
+ TUNEABI_WHITELIST[doc] = "A whitelist of permissible TUNEABI values. If the variable is not set, all values are allowed."
+ </info>
<glossdef>
<para>
A whitelist of permissible
@@ -9305,11 +10987,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNECONFLICT'><glossterm>TUNECONFLICT[&lt;feature&gt;]</glossterm>
+ <glossentry id='var-TUNECONFLICTS'><glossterm><imagedata fileref="figures/define-generic.png" />TUNECONFLICTS[<replaceable>feature</replaceable>]</glossterm>
+ <info>
+ TUNECONFLICTS[doc] = "Specifies CPU or Application Binary Interface (ABI) tuning features that conflict with specified feature."
+ </info>
<glossdef>
<para>
Specifies CPU or Application Binary Interface (ABI)
- tuning features that conflict with &gt;feature&lt;.
+ tuning features that conflict with <replaceable>feature</replaceable>.
</para>
<para>
@@ -9327,7 +11012,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-TUNEVALID'><glossterm>TUNEVALID[&lt;feature&gt;]</glossterm>
+ <glossentry id='var-TUNEVALID'><glossterm><imagedata fileref="figures/define-generic.png" />TUNEVALID[<replaceable>feature</replaceable>]</glossterm>
+ <info>
+ TUNEVALID[doc] = "Descriptions, stored as flags, of valid tuning features."
+ </info>
<glossdef>
<para>
Specifies a valid CPU or Application Binary Interface (ABI)
@@ -9350,7 +11038,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-u'><title>U</title>
- <glossentry id='var-UBOOT_CONFIG'><glossterm>UBOOT_CONFIG</glossterm>
+ <glossentry id='var-UBOOT_CONFIG'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_CONFIG</glossterm>
+ <info>
+ UBOOT_CONFIG[doc] = "Configures the UBOOT_MACHINE and can also define IMAGE_FSTYPES for individual cases."
+ </info>
<glossdef>
<para>
Configures the
@@ -9389,7 +11080,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
+ <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_ENTRYPOINT</glossterm>
+ <info>
+ UBOOT_ENTRYPOINT[doc] = "Specifies the entry point for the U-Boot image."
+ </info>
<glossdef>
<para>
Specifies the entry point for the U-Boot image.
@@ -9401,7 +11095,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
+ <glossentry id='var-UBOOT_LOADADDRESS'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_LOADADDRESS</glossterm>
+ <info>
+ UBOOT_LOADADDRESS[doc] = "Specifies the load address for the U-Boot image."
+ </info>
<glossdef>
<para>
Specifies the load address for the U-Boot image.
@@ -9413,7 +11110,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_LOCALVERSION'><glossterm>UBOOT_LOCALVERSION</glossterm>
+ <glossentry id='var-UBOOT_LOCALVERSION'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_LOCALVERSION</glossterm>
+ <info>
+ UBOOT_LOCALVERSION[doc] = "Appends a string to the name of the local version of the U-Boot image."
+ </info>
<glossdef>
<para>
Appends a string to the name of the local version of the
@@ -9429,7 +11129,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
+ <glossentry id='var-UBOOT_MACHINE'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_MACHINE</glossterm>
+ <info>
+ UBOOT_MACHINE[doc] = "Specifies the value passed on the make command line when building a U-Boot image."
+ </info>
<glossdef>
<para>
Specifies the value passed on the
@@ -9438,7 +11141,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The value indicates the target platform configuration.
You typically set this variable from the machine
configuration file (i.e.
- <filename>conf/machine/&lt;machine_name&gt;.conf</filename>).
+ <filename>conf/machine/<replaceable>machine_name</replaceable>.conf</filename>).
</para>
<para>
@@ -9449,7 +11152,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_MAKE_TARGET'><glossterm>UBOOT_MAKE_TARGET</glossterm>
+ <glossentry id='var-UBOOT_MAKE_TARGET'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_MAKE_TARGET</glossterm>
+ <info>
+ UBOOT_MAKE_TARGET[doc] = "Specifies the target called in the Makefile."
+ </info>
<glossdef>
<para>
Specifies the target called in the
@@ -9459,7 +11165,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_SUFFIX'><glossterm>UBOOT_SUFFIX</glossterm>
+ <glossentry id='var-UBOOT_SUFFIX'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_SUFFIX</glossterm>
+ <info>
+ UBOOT_SUFFIX[doc] = "Points to the generated U-Boot extension."
+ </info>
<glossdef>
<para>
Points to the generated U-Boot extension.
@@ -9474,7 +11183,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
+ <glossentry id='var-UBOOT_TARGET'><glossterm><imagedata fileref="figures/define-generic.png" />UBOOT_TARGET</glossterm>
+ <info>
+ UBOOT_TARGET[doc] = "Specifies the target used for building U-Boot."
+ </info>
<glossdef>
<para>
Specifies the target used for building U-Boot.
@@ -9487,7 +11199,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USE_VT'><glossterm>USE_VT</glossterm>
+ <glossentry id='var-USE_VT'><glossterm><imagedata fileref="figures/define-generic.png" />USE_VT</glossterm>
+ <info>
+ USE_VT[doc] = "When using SysVinit, determines whether or not to run a getty on any virtual terminals in order to enable logging in through those terminals."
+ </info>
<glossdef>
<para>
When using
@@ -9509,7 +11224,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
+ <glossentry id='var-USER_CLASSES'><glossterm><imagedata fileref="figures/define-generic.png" />USER_CLASSES</glossterm>
+ <info>
+ USER_CLASSES[doc] = "List of additional classes to use when building images that enable extra features."
+ </info>
<glossdef>
<para>
A list of classes to globally inherit.
@@ -9533,7 +11251,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USERADD_ERROR_DYNAMIC'><glossterm>USERADD_ERROR_DYNAMIC</glossterm>
+ <glossentry id='var-USERADD_ERROR_DYNAMIC'><glossterm><imagedata fileref="figures/define-generic.png" />USERADD_ERROR_DYNAMIC</glossterm>
+ <info>
+ USERADD_ERROR_DYNAMIC[doc] = "Forces the OpenEmbedded build system to produce an error if the user identification (uid) and group identification (gid) values are not defined in files/passwd and files/group files."
+ </info>
<glossdef>
<para>
Forces the OpenEmbedded build system to produce an error
@@ -9570,7 +11291,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USERADD_GID_TABLES'><glossterm>USERADD_GID_TABLES</glossterm>
+ <glossentry id='var-USERADD_GID_TABLES'><glossterm><imagedata fileref="figures/define-generic.png" />USERADD_GID_TABLES</glossterm>
+ <info>
+ USERADD_GID_TABLES[doc] = "Specifies a password file to use for obtaining static group identification (gid) values when the OpenEmbedded build system adds a group to the system during package installation."
+ </info>
<glossdef>
<para>
Specifies a password file to use for obtaining static
@@ -9602,43 +11326,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USERADD_UID_TABLES'><glossterm>USERADD_UID_TABLES</glossterm>
- <glossdef>
- <para>
- Specifies a password file to use for obtaining static
- user identification (<filename>uid</filename>) values
- when the OpenEmbedded build system adds a user to the
- system during package installation.
- </para>
-
- <para>
- When applying static user identification
- (<filename>uid</filename>) values, the OpenEmbedded build
- system looks in
- <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
- for a <filename>files/passwd</filename> file and then applies
- those <filename>uid</filename> values.
- Set the variable as follows in your
- <filename>local.conf</filename> file:
- <literallayout class='monospaced'>
- USERADD_UID_TABLES = "files/passwd"
- </literallayout>
- </para>
-
- <note>
- Setting the
- <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
- variable to "useradd-staticids" causes the build system
- to use static <filename>uid</filename> values.
- </note>
- </glossdef>
- </glossentry>
-
- <glossentry id='var-USERADD_PACKAGES'><glossterm>USERADD_PACKAGES</glossterm>
+ <glossentry id='var-USERADD_PACKAGES'><glossterm><imagedata fileref="figures/define-generic.png" />USERADD_PACKAGES</glossterm>
+ <info>
+ USERADD_PACKAGES[doc] = "When a recipe inherits the useradd class, this variable specifies the individual packages within the recipe that require users and/or groups to be added."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>useradd</filename> class, this variable
+ When inheriting the
+ <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
+ class, this variable
specifies the individual packages within the recipe that
require users and/or groups to be added.
</para>
@@ -9666,11 +11362,15 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USERADD_PARAM'><glossterm>USERADD_PARAM</glossterm>
+ <glossentry id='var-USERADD_PARAM'><glossterm><imagedata fileref="figures/define-generic.png" />USERADD_PARAM</glossterm>
+ <info>
+ USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the useradd command if you wish to add a user to the system when the package is installed."
+ </info>
<glossdef>
<para>
- When a recipe inherits the
- <filename>useradd</filename> class, this variable
+ When inheriting the
+ <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
+ class, this variable
specifies for a package what parameters should be passed
to the <filename>useradd</filename> command
if you wish to add a user to the system when the package
@@ -9692,7 +11392,45 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-USERADDEXTENSION'><glossterm>USERADDEXTENSION</glossterm>
+ <glossentry id='var-USERADD_UID_TABLES'><glossterm><imagedata fileref="figures/define-generic.png" />USERADD_UID_TABLES</glossterm>
+ <info>
+ USERADD_UID_TABLES[doc] = "Specifies a password file to use for obtaining static user identification (uid) values when the OpenEmbedded build system adds a user to the system during package installation."
+ </info>
+ <glossdef>
+ <para>
+ Specifies a password file to use for obtaining static
+ user identification (<filename>uid</filename>) values
+ when the OpenEmbedded build system adds a user to the
+ system during package installation.
+ </para>
+
+ <para>
+ When applying static user identification
+ (<filename>uid</filename>) values, the OpenEmbedded build
+ system looks in
+ <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
+ for a <filename>files/passwd</filename> file and then applies
+ those <filename>uid</filename> values.
+ Set the variable as follows in your
+ <filename>local.conf</filename> file:
+ <literallayout class='monospaced'>
+ USERADD_UID_TABLES = "files/passwd"
+ </literallayout>
+ </para>
+
+ <note>
+ Setting the
+ <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
+ variable to "useradd-staticids" causes the build system
+ to use static <filename>uid</filename> values.
+ </note>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-USERADDEXTENSION'><glossterm><imagedata fileref="figures/define-generic.png" />USERADDEXTENSION</glossterm>
+ <info>
+ USERADDEXTENSION[doc] = "When set to "useradd-staticids", causes the OpenEmbedded build system to base all user and group additions on a static passwd and group files found in BBPATH."
+ </info>
<glossdef>
<para>
When set to "useradd-staticids", causes the
@@ -9744,7 +11482,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossdiv id='var-glossary-w'><title>W</title>
- <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
+ <glossentry id='var-WARN_QA'><glossterm><imagedata fileref="figures/define-generic.png" />WARN_QA</glossterm>
+ <info>
+ WARN_QA[doc] = "Specifies the quality assurance checks whose failures are reported as warnings by the OpenEmbedded build system."
+ </info>
<glossdef>
<para>
Specifies the quality assurance checks whose failures are
@@ -9759,7 +11500,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
- <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
+ <glossentry id='var-WORKDIR'><glossterm><imagedata fileref="figures/define-generic.png" />WORKDIR</glossterm>
+ <info>
+ WORKDIR[doc] = "The pathname of the working directory in which the OpenEmbedded build system builds a recipe. This directory is located within the TMPDIR directory structure and changes as different packages are built."
+ </info>
<glossdef>
<para>
The pathname of the work directory in which the OpenEmbedded
@@ -9815,8 +11559,32 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdiv>
-<!-- <glossdiv id='var-glossary-x'><title>X</title>-->
-<!-- </glossdiv>-->
+ <glossdiv id='var-glossary-x'><title>X</title>
+
+ <glossentry id='var-XSERVER'><glossterm><imagedata fileref="figures/define-generic.png" />XSERVER</glossterm>
+ <info>
+ XSERVER[doc] = "Specifies the packages that should be installed
+ to provide an X server and drivers for the current machine."
+ </info>
+ <glossdef>
+ <para>
+ Specifies the packages that should be installed to
+ provide an X server and drivers for the current machine,
+ assuming your image directly includes
+ <filename>packagegroup-core-x11-xserver</filename> or,
+ perhaps indirectly, includes "x11-base" in
+ <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
+ </para>
+
+ <para>
+ The default value of <filename>XSERVER</filename>, if not
+ specified in the machine configuration, is
+ "xserver-xorg xf86-video-fbdev xf86-input-evdev".
+ </para>
+ </glossdef>
+ </glossentry>
+
+ </glossdiv>
<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
<!-- </glossdiv>-->
diff --git a/documentation/ref-manual/resources.xml b/documentation/ref-manual/resources.xml
index 686b48a546..17b8e97145 100644
--- a/documentation/ref-manual/resources.xml
+++ b/documentation/ref-manual/resources.xml
@@ -54,6 +54,8 @@
announcements.</para></listitem>
</itemizedlist>
</para>
+ For more Yocto Project-related mailing lists, see the Yocto Project community mailing lists page
+ <ulink url='&YOCTO_HOME_URL;/tools-resources/community/mailing-lists'>here</ulink>.
</section>
<section id='resources-irc'>
@@ -80,7 +82,7 @@
Project.</para></listitem>
<listitem><para><emphasis>
<ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
- The company who acquired OpenedHand in 2008 and began
+ The company that acquired OpenedHand in 2008 and began
development on the Yocto Project.</para></listitem>
<listitem><para><emphasis>
<ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
@@ -89,7 +91,7 @@
Poky derives from and contributes back to the OpenEmbedded
project.</para></listitem>
<listitem><para><emphasis>
- <ulink url='http://developer.berlios.de/projects/bitbake/'>
+ <ulink url='http://www.openembedded.org/wiki/BitBake'>
BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
<listitem><para><emphasis>
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>:</emphasis>
@@ -116,7 +118,7 @@
pull requests,
or by submitting patches through email.
For information on how to do both as well as information on how
- to find out who is the maintainer for areas of code, see the
+ to identify the maintainer for each area of code, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
section in the Yocto Project Development Manual.
</para>
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
index b0588351d5..6bb3381e72 100644
--- a/documentation/ref-manual/technical-details.xml
+++ b/documentation/ref-manual/technical-details.xml
@@ -85,7 +85,7 @@
</para>
<para>
- The most common usage for BitBake is <filename>bitbake &lt;packagename&gt;</filename>, where
+ The most common usage for BitBake is <filename>bitbake <replaceable>packagename</replaceable></filename>, where
<filename>packagename</filename> is the name of the package you want to build
(referred to as the "target" in this manual).
The target often equates to the first part of a recipe's filename
@@ -304,7 +304,8 @@
<para>
Here is the bootstrap process for the relocatable toolchain:
<literallayout class='monospaced'>
- gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> eglibc-initial -> nativesdk-eglibc -> gcc-crosssdk -> gcc-cross-canadian
+ gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers ->
+ eglibc-initial -> nativesdk-eglibc -> gcc-crosssdk -> gcc-cross-canadian
</literallayout>
<itemizedlist>
<listitem><para><filename>gcc</filename>:
@@ -608,13 +609,13 @@
make some dependency and hash information available to the build.
This information includes:
<itemizedlist>
- <listitem><para><filename>BB_BASEHASH_task-&lt;taskname&gt;</filename>:
+ <listitem><para><filename>BB_BASEHASH_task-</filename><replaceable>taskname</replaceable>:
The base hashes for each task in the recipe.
</para></listitem>
- <listitem><para><filename>BB_BASEHASH_&lt;filename:taskname&gt;</filename>:
+ <listitem><para><filename>BB_BASEHASH_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
The base hashes for each dependent task.
</para></listitem>
- <listitem><para><filename>BBHASHDEPS_&lt;filename:taskname&gt;</filename>:
+ <listitem><para><filename>BBHASHDEPS_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
The task dependencies for each task.
</para></listitem>
<listitem><para><filename>BB_TASKHASH</filename>:
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
index 3c82d8185b..41f872c07e 100644
--- a/documentation/ref-manual/usingpoky.xml
+++ b/documentation/ref-manual/usingpoky.xml
@@ -35,12 +35,12 @@
<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
Here is an example:
<literallayout class='monospaced'>
- $ source &OE_INIT_FILE; [&lt;build_dir&gt;]
+ $ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>]
</literallayout>
</para>
<para>
- The <filename>build_dir</filename> argument is optional and specifies the directory the
+ The <replaceable>build_dir</replaceable> argument is optional and specifies the directory the
OpenEmbedded build system uses for the build -
the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
If you do not specify a Build Directory, it defaults to a directory
@@ -53,12 +53,12 @@
<para>
Once the build environment is set up, you can build a target using:
<literallayout class='monospaced'>
- $ bitbake &lt;target&gt;
+ $ bitbake <replaceable>target</replaceable>
</literallayout>
</para>
<para>
- The <filename>target</filename> is the name of the recipe you want to build.
+ The <replaceable>target</replaceable> is the name of the recipe you want to build.
Common targets are the images in <filename>meta/recipes-core/images</filename>,
<filename>meta/recipes-sato/images</filename>, etc. all found in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
@@ -69,8 +69,9 @@
</para>
<note>
- Building an image without GNU General Public License Version 3 (GPLv3) components
- is supported for only minimal and base images.
+ Building an image without GNU General Public License Version
+ 3 (GPLv3), or similarly licensed, components is supported for
+ only minimal and base images.
See the "<link linkend='ref-images'>Images</link>" chapter for more information.
</note>
</section>
@@ -153,14 +154,14 @@
<title>Task Failures</title>
<para>The log file for shell tasks is available in
- <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
- For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
+ <filename>${WORKDIR}/temp/log.do_<replaceable>taskname</replaceable>.pid</filename>.
+ For example, the <filename>do_compile</filename> task for the QEMU minimal image for the x86
machine (<filename>qemux86</filename>) might be
<filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.20830</filename>.
To see what
<ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
runs to generate that log, look at the corresponding
- <filename>run.do_taskname.pid</filename> file located in the same directory.
+ <filename>run.do_<replaceable>taskname</replaceable>.pid</filename> file located in the same directory.
</para>
<para>
@@ -179,7 +180,7 @@
<filename>do_patch</filename>, <filename>do_configure</filename>,
<filename>do_compile</filename>, <filename>do_install</filename>,
<filename>do_package</filename>,
- <filename>do_package_write</filename>, and
+ <filename>do_package_write_*</filename>, and
<filename>do_build</filename>.
The default task is <filename>do_build</filename> and any tasks
on which it depends build first.
@@ -202,7 +203,7 @@
$ bitbake matchbox-desktop
.
.
- [make some changes to the source code in the work directory]
+ <replaceable>make some changes to the source code in the work directory</replaceable>
.
.
$ bitbake matchbox-desktop -c compile -f
@@ -237,7 +238,7 @@
<para>
Sometimes it can be hard to see why BitBake wants to build
other packages before building a given package you have specified.
- The <filename>bitbake -g &lt;targetname&gt;</filename> command
+ The <filename>bitbake -g <replaceable>targetname</replaceable></filename> command
creates the <filename>pn-buildlist</filename>,
<filename>pn-depends.dot</filename>,
<filename>package-depends.dot</filename>, and
@@ -246,7 +247,7 @@
These files show what will be built and the package and task
dependencies, which are useful for debugging problems.
You can use the
- <filename>bitbake -g -u depexp &lt;targetname&gt;</filename>
+ <filename>bitbake -g -u depexp <replaceable>targetname</replaceable></filename>
command to display the results in a more human-readable form.
</para>
</section>
@@ -263,7 +264,7 @@
</para>
<para>
- The output from <filename>bitbake -DDD -v targetname</filename> can reveal why
+ The output from <filename>bitbake -DDD -v</filename> <replaceable>targetname</replaceable> can reveal why
BitBake chose a certain version of a package or why BitBake
picked a certain provider.
This command could also help you in a situation where you think BitBake did something
@@ -309,7 +310,7 @@
To build a specific recipe (<filename>.bb</filename> file),
you can use the following command form:
<literallayout class='monospaced'>
- $ bitbake -b &lt;somepath/somerecipe.bb&gt;
+ $ bitbake -b <replaceable>somepath</replaceable>/<replaceable>somerecipe</replaceable>.bb
</literallayout>
This command form does not check for dependencies.
Consequently, you should use it
@@ -333,7 +334,7 @@
This next example shows the parsing environment for a specific
recipe:
<literallayout class='monospaced'>
- $ bitbake -e &lt;recipename&gt;
+ $ bitbake -e <replaceable>recipename</replaceable>
</literallayout>
</para>
</section>
@@ -539,7 +540,7 @@
<para>
Build history information is kept in
- <filename>$</filename><link linkend='var-TOPDIR'><filename>TOPDIR</filename></link><filename>/buildhistory</filename>
+ <filename>${</filename><link linkend='var-TOPDIR'><filename>TOPDIR</filename></link><filename>}/buildhistory</filename>
in the Build Directory as defined by the
<link linkend='var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></link>
variable.
@@ -678,9 +679,11 @@
The files are defined by
<link linkend='var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></link>.
</para></listitem>
- <listitem><para><filename>build-id:</filename>
+ <listitem><para><filename>build-id.txt:</filename>
Human-readable information about the build configuration
- and metadata source revisions.</para></listitem>
+ and metadata source revisions.
+ This file contains the full build header as printed
+ by BitBake.</para></listitem>
<listitem><para><filename>*.dot:</filename>
Dependency graphs for the image that are
compatible with <filename>graphviz</filename>.
@@ -720,7 +723,7 @@
IMAGE_FEATURES = debug-tweaks x11-base apps-x11-core \
package-management ssh-server-dropbear package-management
IMAGE_LINGUAS = en-us en-gb
- IMAGE_INSTALL = task-core-boot task-base-extended
+ IMAGE_INSTALL = packagegroup-core-boot packagegroup-base-extended
BAD_RECOMMENDATIONS =
ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
@@ -885,6 +888,148 @@
</section>
</section>
+<section id='speeding-up-the-build'>
+ <title>Speeding Up the Build</title>
+
+ <para>
+ Build time can be an issue.
+ By default, the build system uses three simple controls to try and
+ maximize build efficiency:
+ <itemizedlist>
+ <listitem><para>
+ <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename></ulink>
+ </para></listitem>
+ <listitem><para>
+ <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
+ </para></listitem>
+ </itemizedlist>
+ These three variables all scale to the number of processor cores
+ available on the build system.
+ This auto-scaling ensures that the build system fundamentally takes
+ advantage of potential parallel operations during the build
+ based on the build machine's capabilities.
+ </para>
+
+ <para>
+ If you need to achieve even faster builds than what the build system
+ produces by default, you can consider and implement some of the
+ following:
+ <itemizedlist>
+ <listitem><para>
+ <filename>BB_NUMBER_THREADS</filename>,
+ <filename>BB_NUMBER_PARSE_THREADS</filename>, and
+ <filename>PARALLEL_MAKE</filename>:
+ As previously mentioned, the build system scales the values
+ for these variables.
+ However, you can manually override them in your
+ <filename>local.conf</filename> file if you are not satisfied
+ with the defaults.
+ </para></listitem>
+ <listitem><para>
+ File system type:
+ The file system type that the build is being performed on can
+ also influence performance.
+ Using <filename>ext4</filename> is recommended as compared
+ to <filename>ext2</filename> and <filename>ext3</filename>
+ due to <filename>ext4</filename> improved features
+ such as extents.
+ </para></listitem>
+ <listitem><para>
+ Disabling the updating of access time using
+ <filename>noatime</filename>:
+ The <filename>noatime</filename> mount option prevents the
+ build system from updating file and directory access times.
+ </para></listitem>
+ <listitem><para>
+ Setting a longer commit:
+ Using the "commit=" mount option increases the interval
+ in seconds between disk cache writes.
+ Changing this interval from the five second default to
+ something longer increases the risk of data loss but decreases
+ the need to write to the disk, thus increasing the build
+ performance.
+ </para></listitem>
+ <listitem><para>
+ Choosing the packaging backend:
+ Of the available packaging backends, IPK is the fastest.
+ Additionally, selecting a singular packaging backend also
+ helps.
+ </para></listitem>
+ <listitem><para>
+ Using <filename>/tmp</filename> as a temporary file system:
+ While this can help speed up the build, the benefits are
+ limited due to the compiler using
+ <filename>-pipe</filename>.
+ The build system goes to some lengths to avoid
+ <filename>sync()</filename> calls into the
+ file system on the principle that if there was a significant
+ failure, the
+ <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ contents could easily be rebuilt.
+ </para></listitem>
+ <listitem><para>
+ Inheriting the
+ <link linkend='ref-classes-rm-work'><filename>rm_work</filename></link>
+ class:
+ Inheriting this class has shown to speed up builds due to
+ significantly lower amounts of data stored in the data
+ cache as well as on disk.
+ Inheriting this class also makes cleanup of
+ <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
+ faster, at the expense of being easily able to dive into the
+ source code.
+ File system maintainers have recommended that the fastest way
+ to clean up large numbers of files is to reformat partitions
+ rather than delete files due to the linear nature of partitions.
+ This, of course, assumes you structure the disk partitions and
+ file systems in a way that this is practical.
+ </para></listitem>
+ </itemizedlist>
+ Aside from the previous list, you should keep some trade offs in
+ mind that can help you speed up the build:
+ <itemizedlist>
+ <listitem><para>
+ Exclude debug symbols and other debug information:
+ If you do not need these symbols and other debug information,
+ disabling the <filename>*-dbg</filename> package generation
+ can speed up the build.
+ You can disable this generation by setting the
+ <link linkend='var-INHIBIT_PACKAGE_DEBUG_SPLIT'><filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename></link>
+ variable to "1".
+ </para></listitem>
+ <listitem><para>
+ Disable static library generation for recipes derived from
+ <filename>autoconf</filename> or <filename>libtool</filename>:
+ Following is an example showing how to disable static
+ libraries and still provide an override to handle exceptions:
+ <literallayout class='monospaced'>
+ STATICLIBCONF = "--disable-static"
+ STATICLIBCONF_sqlite3-native = ""
+ EXTRA_OECONF += "${STATICLIBCONF}"
+ </literallayout>
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ Some recipes need static libraries in order to work
+ correctly (e.g. <filename>pseudo-native</filename>
+ needs <filename>sqlite3-native</filename>).
+ Overrides, as in the previous example, account for
+ these kinds of exceptions.
+ </para></listitem>
+ <listitem><para>
+ Some packages have packaging code that assumes the
+ presence of the static libraries.
+ If so, you might need to exclude them as well.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/documentation/template/qa-code-permalinks.xsl b/documentation/template/qa-code-permalinks.xsl
new file mode 100644
index 0000000000..a309095c60
--- /dev/null
+++ b/documentation/template/qa-code-permalinks.xsl
@@ -0,0 +1,23 @@
+<!--
+This XSL sheet enables creation of permalinks for <para><code>
+constructs. Right now, this construct occurs only in the ref-manual
+book's qa issues and warnings chapter. However, if the construct
+were to appear anywhere in that ref-manual, a permalink would be
+generated. I don't foresee any <para><code> constructs being used
+in the future but if they are then a permalink with a generically
+numbered permalink would be generated.
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:d="http://docbook.org/ns/docbook"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsl:template match="para/code">
+ <xsl:apply-imports/>
+ <xsl:if test="$generate.permalink != 0">
+ <xsl:call-template name="permalink">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/documentation/tools/mega-manual.sed b/documentation/tools/mega-manual.sed
index 69a5b825c7..748632bb55 100644
--- a/documentation/tools/mega-manual.sed
+++ b/documentation/tools/mega-manual.sed
@@ -1,14 +1,31 @@
-# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style).
+# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
+# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
+# in the mega-manual.
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
-# Processes all other manuals (<word>-<word> style)
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
+# it is not included in the mega-manual.
+# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
+# This was the one-liner that worked before we introduced the BitBake User Manual, which is
+# not in the mega-manual.
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
# Process cases where just an external manual is referenced without an id anchor
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.8\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
diff --git a/documentation/yocto-project-qs/yocto-project-qs-customization.xsl b/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
index 5d11e7ee70..3dad6b96c5 100644
--- a/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
+++ b/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:import href="yocto-project-qs-titlepage.xsl"/>
<xsl:include href="../template/permalinks.xsl"/>
diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
index ea2b35234c..9f1a4fbb36 100644
--- a/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -1,4 +1,4 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
@@ -86,10 +86,12 @@
the Yocto Project Reference Manual.
</para></listitem>
<listitem><para><emphasis>Developer Screencast:</emphasis> The
- <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New
- Developer Screencast Tutorial</ulink> provides a 30-minute video
- created for users unfamiliar with the Yocto Project but familiar
- with Linux build systems.</para></listitem>
+ <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
+ provides a 30-minute video created for users unfamiliar with
+ the Yocto Project but familiar with Linux build systems.
+ While this screencast is somewhat dated, the introductory
+ and fundamental concepts are useful for the beginner.
+ </para></listitem>
</itemizedlist>
</para>
</section>
@@ -177,7 +179,8 @@
decrease the time needed to build images.
</para></listitem>
<listitem><para>
- The right packages.
+ Appropriate packages installed on the system you are using for
+ builds.
</para></listitem>
<listitem><para>
A release of the Yocto Project.
@@ -404,13 +407,30 @@
Use the following commands to build your image.
The OpenEmbedded build process creates an entire Linux
distribution, including the toolchain, from source.
- <note>
- By default, the build process searches for source code using
- a pre-determined order through a set of locations.
- If you encounter problems with the build process finding and
- downloading source code, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>How does the OpenEmbedded build system obtain source code and will it work behind my firewall or proxy server?</ulink>"
- entry in the Yocto Project Reference Manual FAQ.
+ <note><title>Note about Network Proxies</title>
+ <para>
+ By default, the build process searches for source code
+ using a pre-determined order through a set of locations.
+ If you are working behind a firewall and your build system
+ is not set up for proxies, you could encounter problems
+ with the build process when fetching source code (e.g.
+ fetcher failures or Git failures).
+ </para>
+
+ <para>
+ If you do not know your proxy settings, consult your
+ local network infrastructure resources and get that
+ information.
+ A good starting point could also be to check your web
+ browser settings.
+ Finally, you can find more information on using the Yocto
+ Project behind a firewall in the Yocto Project Reference
+ Manual
+ <ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</ulink>
+ and on the
+ "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
+ wiki page.
+ </para>
</note>
</para>
@@ -492,7 +512,7 @@
Another couple of variables of interest are the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink> and the
<ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> variables.
- By default, these variables are set to how ever many processor
+ By default, these variables are set to the number of processor
cores your build host uses.
However, if your build host uses multiple processor cores,
you should increase these settings to twice the number of
@@ -518,7 +538,7 @@
<filename>bitbake --help</filename> command, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
section in the Yocto Project Reference Manual, or see the
- "<ulink url='&YOCTO_DOCS_BB_URL;#user-manual-command'>BitBake Command</ulink>"
+ "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
section in the BitBake User Manual.
<literallayout class='monospaced'>
$ bitbake -k core-image-sato
@@ -529,7 +549,7 @@
"<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python</ulink>"
section in the Yocto Project Reference Manual.
</note>
- The final command runs the image:
+ The final command runs the image using the QEMU emulator:
<literallayout class='monospaced'>
$ runqemu qemux86
</literallayout>
@@ -605,25 +625,25 @@
</para>
<literallayout class='monospaced'>
- poky-eglibc-&lt;<emphasis>host_system</emphasis>&gt;-&lt;<emphasis>image_type</emphasis>&gt;-&lt;<emphasis>arch</emphasis>&gt;-toolchain-&lt;<emphasis>release_version</emphasis>&gt;.sh
+ poky-eglibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-<replaceable>release_version</replaceable>.sh
Where:
- &lt;<emphasis>host_system</emphasis>&gt; is a string representing your development system:
+ <replaceable>host_system</replaceable> is a string representing your development system:
i686 or x86_64.
- &lt;<emphasis>image_type</emphasis>&gt; is a string representing the image you wish to
+ <replaceable>image_type</replaceable> is a string representing the image you wish to
develop a Software Development Toolkit (SDK) for use against.
The Yocto Project builds toolchain installers using the
following BitBake command:
bitbake core-image-sato -c populate_sdk
- &lt;<emphasis>arch</emphasis>&gt; is a string representing the tuned target architecture:
+ <replaceable>arch</replaceable> is a string representing the tuned target architecture:
i586, x86_64, powerpc, mips, armv7a or armv5te
- &lt;<emphasis>release_version</emphasis>&gt; is a string representing the release number of the
+ <replaceable>release_version</replaceable> is a string representing the release number of the
Yocto Project:
&DISTRO;, &DISTRO;+snapshot
@@ -689,11 +709,11 @@
<para>
Most kernel files have one of the following forms:
<literallayout class='monospaced'>
- *zImage-qemu&lt;<emphasis>arch</emphasis>&gt;.bin
- vmlinux-qemu&lt;<emphasis>arch</emphasis>&gt;.bin
+ *zImage-qemu<replaceable>arch</replaceable>.bin
+ vmlinux-qemu<replaceable>arch</replaceable>.bin
Where:
- &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ <replaceable>arch</replaceable> is a string representing the target architecture:
x86, x86-64, ppc, mips, or arm.
</literallayout>
</para>
@@ -723,17 +743,17 @@
The <filename>tar</filename> form can be flattened out in your host development system
and used for build purposes with the Yocto Project.
<literallayout class='monospaced'>
- core-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.ext3
- core-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.tar.bz2
+ core-image-<replaceable>profile</replaceable>-qemu<replaceable>arch</replaceable>.ext3
+ core-image-<replaceable>profile</replaceable>-qemu<replaceable>arch</replaceable>.tar.bz2
Where:
- &lt;<emphasis>profile</emphasis>&gt; is the filesystem image's profile:
+ <replaceable>profile</replaceable> is the filesystem image's profile:
lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato,
sato-dev, or sato-sdk. For information on these types of image
- profiles, see the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in the Yocto Project
- Reference Manual.
+ profiles, see the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+ chapter in the Yocto Project Reference Manual.
- &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ <replaceable>arch</replaceable> is a string representing the target architecture:
x86, x86-64, ppc, mips, or arm.
</literallayout>
</para>
@@ -746,13 +766,13 @@
Before you start the QEMU emulator, you need to set up the emulation environment.
The following command form sets up the emulation environment.
<literallayout class='monospaced'>
- $ source &YOCTO_ADTPATH_DIR;/environment-setup-&lt;<emphasis>arch</emphasis>&gt;-poky-linux-&lt;<emphasis>if</emphasis>&gt;
+ $ source &YOCTO_ADTPATH_DIR;/environment-setup-<replaceable>arch</replaceable>-poky-linux-<replaceable>if</replaceable>
Where:
- &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ <replaceable>arch</replaceable> is a string representing the target architecture:
i586, x86_64, ppc603e, mips, or armv5te.
- &lt;<emphasis>if</emphasis>&gt; is a string representing an embedded application binary interface.
+ <replaceable>if</replaceable> is a string representing an embedded application binary interface.
Not all setup scripts include this string.
</literallayout>
</para>
@@ -760,15 +780,15 @@
<para>
Finally, this command form invokes the QEMU emulator
<literallayout class='monospaced'>
- $ runqemu &lt;<emphasis>qemuarch</emphasis>&gt; &lt;<emphasis>kernel-image</emphasis>&gt; &lt;<emphasis>filesystem-image</emphasis>&gt;
+ $ runqemu <replaceable>qemuarch</replaceable> <replaceable>kernel-image</replaceable> <replaceable>filesystem-image</replaceable>
Where:
- &lt;<emphasis>qemuarch</emphasis>&gt; is a string representing the target architecture: qemux86, qemux86-64,
+ <replaceable>qemuarch</replaceable> is a string representing the target architecture: qemux86, qemux86-64,
qemuppc, qemumips, or qemuarm.
- &lt;<emphasis>kernel-image</emphasis>&gt; is the architecture-specific kernel image.
+ <replaceable>kernel-image</replaceable> is the architecture-specific kernel image.
- &lt;<emphasis>filesystem-image</emphasis>&gt; is the .ext3 filesystem image.
+ <replaceable>filesystem-image</replaceable> is the .ext3 filesystem image.
</literallayout>
</para>
diff --git a/meta-yocto-bsp/conf/machine/beaglebone.conf b/meta-yocto-bsp/conf/machine/beaglebone.conf
index 42637158df..fb0189d5d7 100644
--- a/meta-yocto-bsp/conf/machine/beaglebone.conf
+++ b/meta-yocto-bsp/conf/machine/beaglebone.conf
@@ -24,7 +24,7 @@ SERIAL_CONSOLE = "115200 ttyO0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "3.14%"
-KERNEL_IMAGETYPE = "uImage"
+KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
@@ -35,3 +35,5 @@ UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
+
+IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py b/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
index b2e905078e..0f1aeb398f 100644
--- a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
+++ b/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
@@ -45,7 +45,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget):
'mount -L testrootfs /mnt/testrootfs',
'rm -rf /mnt/testrootfs/*',
'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
- '[ -e /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage',
+ '[ -e /mnt/testrootfs/boot/uImage ] || [ -L /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage',
]
for _, dtbfn in self.dtbs.iteritems():
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend
index 2305c333ee..eb313ffe98 100644
--- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -7,11 +7,11 @@ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
-SRCREV_machine_genericx86 ?= "41d5fe27dc3d3e769cb6af01770cac3d75a91e1a"
-SRCREV_machine_genericx86-64 ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_machine_edgerouter ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_machine_beaglebone ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_machine_mpc8315e-rdb ?= "824683a5531beffbfc0537f55ff477ad28e761fa"
+SRCREV_machine_genericx86 ?= "a39fd81fa54776b2ac8c288251846890c3124dee"
+SRCREV_machine_genericx86-64 ?= "dbe5b52e93ff114b2c0f5da6f6af91f52c18f2b8"
+SRCREV_machine_edgerouter ?= "dbe5b52e93ff114b2c0f5da6f6af91f52c18f2b8"
+SRCREV_machine_beaglebone ?= "dbe5b52e93ff114b2c0f5da6f6af91f52c18f2b8"
+SRCREV_machine_mpc8315e-rdb ?= "4b2929392ec56ca8ef90cc98042609795c44aa3c"
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend
deleted file mode 100644
index f2023376ae..0000000000
--- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-SRCREV_machine_genericx86 ?= "cdd7a546922ca1c46c94adeec3b9c90dc9aaad2d"
-SRCREV_machine_mpc8315e-rdb ?= "ed373937e5460d3321e1f243cb89ed512d0c9047"
-
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-
diff --git a/meta-yocto/conf/distro/include/maintainers.inc b/meta-yocto/conf/distro/include/maintainers.inc
index 58c29951d9..3a55d1ef53 100644
--- a/meta-yocto/conf/distro/include/maintainers.inc
+++ b/meta-yocto/conf/distro/include/maintainers.inc
@@ -28,7 +28,7 @@
# Please keep this list in alphabetical order.
#
RECIPE_MAINTAINER_pn-acl = "Chong Lu <Chong.Lu@windriver.com>"
-RECIPE_MAINTAINER_pn-acpid = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-acpid = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-adt-installer = "Jessica Zhang <jessica.zhang@intel.com>"
RECIPE_MAINTAINER_pn-alsa-lib = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-alsa-state = "Cristian Iorga <cristian.iorga@intel.com>"
@@ -38,10 +38,10 @@ RECIPE_MAINTAINER_pn-alsa-utils-alsaconf = "Cristian Iorga <cristian.iorga@intel
RECIPE_MAINTAINER_pn-apmd = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-apr = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-apr-util = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-apt = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-aspell = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-apt = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-aspell = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-atk = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-at = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-at = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-at-spi2-atk = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-at-spi2-core = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-attr = "Chong Lu <Chong.Lu@windriver.com>"
@@ -55,7 +55,7 @@ RECIPE_MAINTAINER_pn-babeltrace = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-base-files = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-base-passwd = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-bc = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-bc = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-bdwgc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-beecrypt = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-bigreqsproto = "Saul Wold <sgw@linux.intel.com>"
@@ -74,6 +74,7 @@ RECIPE_MAINTAINER_pn-builder = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-busybox = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-byacc = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-bzip2 = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-ca-certificates = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-cairo = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-calibrateproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-ccache = "Wenzong Fan <wenzong.fan@windriver.com>"
@@ -92,8 +93,8 @@ RECIPE_MAINTAINER_pn-cogl-1.0 = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-compositeproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-connman = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-connman-gnome = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-consolekit = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-console-tools = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-consolekit = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-console-tools = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-core-image-base = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-core-image-clutter = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-core-image-directfb = "Saul Wold <sgw@linux.intel.com>"
@@ -113,21 +114,21 @@ RECIPE_MAINTAINER_pn-core-image-sato-sdk = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-core-image-x11 = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-coreutils = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-cpio = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-cracklib ="Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-createrepo = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-cronie = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cracklib = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-createrepo = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-cronie = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-cross-localedef-native = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-cups = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-curl = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cups = "Chong Lu <Chong.Lu@windriver.com>"
+RECIPE_MAINTAINER_pn-curl = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-cwautomacros = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-damageproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-db = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-dbus = "Chong Lu <Chong.Lu@windriver.com>"
-RECIPE_MAINTAINER_pn-dbus-ptest = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-dbus-glib = "Chong Lu <Chong.Lu@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-test = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-dbus-wait = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-desktop-file-utils-native = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dhcp = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-diffstat = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-diffutils = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-directfb-examples = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -143,7 +144,7 @@ RECIPE_MAINTAINER_pn-docbook-sgml-dtd-4.5-native = "Paul Eggleton <paul.eggleton
RECIPE_MAINTAINER_pn-docbook-sgml-dtd = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-docbook-utils = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-dosfstools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dpkg = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-dpkg = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-dri2proto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-dropbear = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-dtc = "Saul Wold <sgw@linux.intel.com>"
@@ -157,7 +158,7 @@ RECIPE_MAINTAINER_pn-eglibc-scripts = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-elfutils = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-enchant = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-encodings = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-ethtool = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ethtool = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-expat = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-file = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
@@ -168,7 +169,7 @@ RECIPE_MAINTAINER_pn-font-alias = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-fontconfig = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-fontsproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-font-util = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-foomatic-filters = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-foomatic-filters = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-formfactor = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-fotowall = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-freetype = "Ross Burton <ross.burton@intel.com>"
@@ -177,14 +178,15 @@ RECIPE_MAINTAINER_pn-gaku = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-gamin = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-gcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gcc-source = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-gccmakedep = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gcc-runtime = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gcc-runtime = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-gconf = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-gdb = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-gdbm = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-gdk-pixbuf = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-genext2fs = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gettext-minimal-native = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gettext-minimal-native = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-gettext = "Wenzong Fan <wenzong.fan@windriver.com>"
RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
@@ -194,20 +196,21 @@ RECIPE_MAINTAINER_pn-glibc = "Richard Purdie <richard.purdie@linuxfoundation.org
RECIPE_MAINTAINER_pn-glib-networking = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-glproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-gmp = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnome-common = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-doc-utils = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-icon-theme = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-mime-data = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-common = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gnome-doc-utils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gnome-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gnome-mime-data = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnupg = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-gnu-efi = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-gnutls = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-gperf = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-gpgme = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-grep = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-grub = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-gst-ffmpeg = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-gst-fluendo-mp3 = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-gst-fluendo-mpegdemux = "Cristian Iorga <cristian.iorga@intel.com>"
@@ -240,8 +243,8 @@ RECIPE_MAINTAINER_pn-gummiboot = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-gzip = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-hal = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-harfbuzz = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-hdparm = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-help2man-native = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-hdparm = "Chong Lu <Chong.Lu@windriver.com>"
+RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-hostap-conf = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-hostap-utils = "Cristian Iorga <cristian.iorga@intel.com>"
@@ -259,9 +262,9 @@ RECIPE_MAINTAINER_pn-insserv = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-intltool = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-iproute2 = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-iptables = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-iputils = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-iputils = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-irda-utils = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-jpeg = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-jpeg = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-json-glib = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-kbd = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-kbproto = "Ross Burton <ross.burton@intel.com>"
@@ -270,26 +273,26 @@ RECIPE_MAINTAINER_pn-kernelshark = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-kern-tools-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-kexec-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-keymaps = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-kmod = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-lame = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-latencytop = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-ldconfig-native = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-leafpad = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-less = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-less = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-liba52 = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libacpi = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libacpi = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-libaio = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libarchive = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-libarchive = "Paul Barker <paul@paulbarker.me.uk>"
RECIPE_MAINTAINER_pn-libart-lgpl = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libassuan = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libatomics-ops = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libav = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libbsd = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libcap = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libbsd = "Chong Lu <Chong.Lu@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-libcgroup = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libcheck = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libcheck = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-libclass-isa-perl = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libcroco = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libdaemon = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libdmx = "Saul Wold <sgw@linux.intel.com>"
@@ -297,6 +300,7 @@ RECIPE_MAINTAINER_pn-libdrm = "Richard Purdie <richard.purdie@linuxfoundation.or
RECIPE_MAINTAINER_pn-libdumpvalue-perl = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libenv-perl = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-liberation-fonts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libevdev = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-libevent = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-libexif = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libfakekey = "Ross Burton <ross.burton@intel.com>"
@@ -304,8 +308,9 @@ RECIPE_MAINTAINER_pn-libffi = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libfile-checktree-perl = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libfm = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libfontenc = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libgcc = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libgcrypt = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libgcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libgfortran = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-libglade = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libglu = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libgpg-error = "Paul Eggleton <paul.eggleton@linux.intel.com>"
@@ -315,13 +320,15 @@ RECIPE_MAINTAINER_pn-libice = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libiconv = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libid3tag = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libidn = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libinput = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libjson = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-libksba = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libmad = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libmatchbox = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libmpc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libnfsidmap = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libnfsidmap = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libnl = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libnotify = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libnss-mdns = "Saul Wold <sgw@linux.intel.com>"
@@ -330,12 +337,13 @@ RECIPE_MAINTAINER_pn-liboil = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libomxil = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libowl-av = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libowl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libpam = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libpam = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libpcap = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libpciaccess = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-libpcre = "Chong Lu <Chong.Lu@windriver.com>"
-RECIPE_MAINTAINER_pn-libpng = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libpng12 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libpfm4 = "Matthew McClintock <msm@freescale.com>"
+RECIPE_MAINTAINER_pn-libpng = "Randy Witt <randy.e.witt@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libpng12 = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libpod-plainer-perl = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-libproxy = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libpthread-stubs = "Saul Wold <sgw@linux.intel.com>"
@@ -346,24 +354,24 @@ RECIPE_MAINTAINER_pn-libsm = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libsndfile1 = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libsoup-2.4 = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libsoup = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libtasn1 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libtasn1 = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libtelepathy = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libtheora = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libtimedate-perl = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libtimedate-perl = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-libtirpc = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-libunique = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libunistring = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libunistring = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-liburcu = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-liburi-perl = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libusb1 = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb-compat = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb1 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb-compat = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-libuser = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-libvorbis = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-libx11-diet = "Kai Kang <kai.kang@windriver.com>"
RECIPE_MAINTAINER_pn-libx11 = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxau = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libxcalibrate ="Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libxcalibrate = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxcb = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxcomposite = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxcursor = "Ross Burton <ross.burton@intel.com>"
@@ -391,6 +399,7 @@ RECIPE_MAINTAINER_pn-libxrender = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxres = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxscrnsaver = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxsettings-client = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-libxshmfence = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxslt = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxt = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-libxtst = "Ross Burton <ross.burton@intel.com>"
@@ -406,27 +415,29 @@ RECIPE_MAINTAINER_pn-linux-firmware = "Cristian Iorga <cristian.iorga@intel.com>
RECIPE_MAINTAINER_pn-linux-libc-headers = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-linux-libc-headers-yocto = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-linux-yocto = "Darren Hart <dvhart@linux.intel.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-dev = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-linux-yocto-rt = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-lrzsz = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-lsbinitscripts = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-lsbtest = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-lsb = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-lsof = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lsof = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-ltp = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-lzop = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-lzo = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-lz4 = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-mailx = "Kai Kang <kai.kang@windriver.com>"
RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-makedevs = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-man-pages = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-man = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-man = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-matchbox-desktop = "Ross Burton <ross.burton@intel.com>"
@@ -437,15 +448,16 @@ RECIPE_MAINTAINER_pn-matchbox-session = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-matchbox-terminal = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-matchbox-wm = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mc = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-mdadm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-mc = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-mdadm = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-menu-cache = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mesa-demos = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-mesa = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-mesa-demos = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-mesa-gl = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-meta-ide-support = "Jessica Zhang <jessica.zhang@intel.com>"
RECIPE_MAINTAINER_pn-meta-toolchain-qte = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-meta-toolchain = "Jessica Zhang <jessica.zhang@intel.com>"
-RECIPE_MAINTAINER_pn-midori = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-midori = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-mingetty = "Kai Kang <kai.kang@windriver.com>"
RECIPE_MAINTAINER_pn-minicom = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-mini-x-session = "Saul Wold <sgw@linux.intel.com>"
@@ -455,14 +467,13 @@ RECIPE_MAINTAINER_pn-mkfontscale = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-mktemp = "Chong Lu <Chong.Lu@windriver.com>"
RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-modutils-initscripts = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-modutils-initscripts = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-modutils-initscripts = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-mpeg2dec = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-mpfr = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-msmtp = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-mtdev = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-mtd-utils = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-mtools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-mtools = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-mx-1.0 = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-nativesdk-packagegroup-qte-toolchain-host = "Paul Eggleton <paul.eggleton@linux.intel.com>"
@@ -472,23 +483,23 @@ RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-neard = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-neon = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-netbase = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-net-tools = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-nfs-export-root = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-nfs-utils = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nfs-export-root = "Chong Lu <Chong.Lu@windriver.com>"
+RECIPE_MAINTAINER_pn-nfs-utils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-npth = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-nspr = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-ocf-linux = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ocf-linux = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-ofono = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-oh-puzzles = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-openjade = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-opensp = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-openssh = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-openssl = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-opkg-collateral = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-opkg-config-base = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-opkg = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-opkg-utils = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-opkg-collateral = "Paul Barker <paul@paulbarker.me.uk>"
+RECIPE_MAINTAINER_pn-opkg-config-base = "Paul Barker <paul@paulbarker.me.uk>"
+RECIPE_MAINTAINER_pn-opkg = "Paul Barker <paul@paulbarker.me.uk>"
+RECIPE_MAINTAINER_pn-opkg-utils = "Paul Barker <paul@paulbarker.me.uk>"
RECIPE_MAINTAINER_pn-oprofile = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-oprofileui = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-oprofileui-server = "Saul Wold <sgw@linux.intel.com>"
@@ -502,7 +513,7 @@ RECIPE_MAINTAINER_pn-packagegroup-core-device-devel = "Saul Wold <sgw@linux.inte
RECIPE_MAINTAINER_pn-packagegroup-core-directfb = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-packagegroup-core-full-cmdline = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-packagegroup-core-lsb = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-nfs = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-nfs = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-packagegroup-core-qt4e = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-packagegroup-core-qt = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-packagegroup-core-sdk = "Saul Wold <sgw@linux.intel.com>"
@@ -524,21 +535,22 @@ RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-pax-utils = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-pax = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-pciutils = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pcmanfm = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pcmciautils = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-pcmanfm = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-pcmciautils = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-perf = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-perl = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-piglit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pigz = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-pixman = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pkgconfig = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-pkgconfig = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-pm-utils = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-pointercal = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-poky-feed-config-opkg = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-pong-clock = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-popt = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-portmap = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-portmap = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-powertop = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -551,13 +563,18 @@ RECIPE_MAINTAINER_pn-psplash = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-pth = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-pulseaudio = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-puzzles = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-python-argparse = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-python-async = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-dbus = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-distribute = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-docutils = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-python-git = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-python-gitdb = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-python-gst = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-imaging = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-python-mako = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-python-nose = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-python-numpy = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-python-pycairo = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-pycurl = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-pygobject = "Richard Purdie <richard.purdie@linuxfoundation.org>"
@@ -566,7 +583,9 @@ RECIPE_MAINTAINER_pn-python-pyrex = "Richard Purdie <richard.purdie@linuxfoundat
RECIPE_MAINTAINER_pn-python-scons = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-setuptools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-python-smartpm = "Paul Eggleton <paul.eggleton@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-smmap = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3 = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-python3-distribute = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-qemu-helper-native = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-qemu = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-qmmp = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -586,7 +605,7 @@ RECIPE_MAINTAINER_pn-readline = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-recordproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-remake = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-renderproto = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-resolvconf = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-resolvconf = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-resourceproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-rgb = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -596,26 +615,26 @@ RECIPE_MAINTAINER_pn-rsync = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-rt-tests = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-run-postinsts = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-rxvt-unicode = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sato-icon-theme = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sato-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-sato-screenshot = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-sbc = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-screen = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-screen = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-scrnsaverproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-setserial = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-setserial = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-settings-daemon = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-sgml-common = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-sgmlspl = "Paul Eggleton <paul.eggleton@linux.intel.com>"
RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shadow-sysroot = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-shared-mime-info = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-shutdown-desktop = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-slang = "Kai Kang <kai.kang@windriver.com>"
RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-speex = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-sqlite3 = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-squashfs-tools = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-sqlite3 = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-startup-notification = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-stat = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-strace = "Chong Lu <Chong.Lu@windriver.com>"
@@ -627,57 +646,61 @@ RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-syslinux = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-sysprof = "Tom Zanussi <tom.zanussi@intel.com>"
RECIPE_MAINTAINER_pn-sysstat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemtap = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-systemtap-uprobes = "Tom Zanussi <tom.zanussi@intel.com>"
RECIPE_MAINTAINER_pn-sysvinit-inittab = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-sysvinit = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-taglib = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-tar-replacement-native = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-tar-replacement-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-tcf-agent = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-tcf-agent = "Randy Witt <randy.e.witt@linux.intel.com>"
RECIPE_MAINTAINER_pn-tcl = "Chong Lu <Chong.Lu@windriver.com>"
-RECIPE_MAINTAINER_pn-tcp-wrappers = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-tcp-wrappers = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-telepathy-glib = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-telepathy-idle = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-telepathy-mission-control = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-telepathy-python = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-texi2html = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-texinfo = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-texi2html = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-texinfo = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-tiff = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-tiny-init = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-trace-cmd = "Darren Hart <dvhart@linux.intel.com>"
RECIPE_MAINTAINER_pn-tremor = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-tslib = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-tzcode-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-tzdata = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-u-boot = "Denys Dmytriyenko <denis@denix.org>"
+RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Denys Dmytriyenko <denis@denix.org>"
+RECIPE_MAINTAINER_pn-u-boot-mkimage = "Denys Dmytriyenko <denis@denix.org>"
RECIPE_MAINTAINER_pn-ubootchart = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-u-boot-mkimage = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-udev-extraconf = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-udev = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-uclibc = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-udev-extraconf = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-udev = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-unifdef = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-unzip = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-unzip = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-update-rc.d = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-usbinit = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-usbutils = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MAINTAINER_pn-unfs3 = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-util-linux = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-unfs3 = "Randy Witt <randy.e.witt@linux.intel.com>"
+RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-util-macros = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-v86d = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-vala = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-valgrind = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-videoproto = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-vte ="Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-vte = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-waffle = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-watchdog = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-wayland = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-webkit-gtk = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-web-webkit = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-weston = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-wget = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-which = "Saul Wold <sgw@linux.intel.com>"
+RECIPE_MAINTAINER_pn-which = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-wireless-tools = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-wpa-supplicant = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-x11-common = "Ross Burton <ross.burton@intel.com>"
@@ -708,6 +731,7 @@ RECIPE_MAINTAINER_pn-xf86-input-vmmouse = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86miscproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86-video-intel = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-modesetting = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86-video-omapfb = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86-video-omap = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86-video-vesa = "Ross Burton <ross.burton@intel.com>"
@@ -715,22 +739,23 @@ RECIPE_MAINTAINER_pn-xf86-video-vmware = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xf86vidmodeproto = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xhost = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xineramaproto = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-xinetd = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-xinetd = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-xinit = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xinput = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xinput-calibrator = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xkbcomp = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xkeyboard-config = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-xmlto = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-xmodmap = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xorg-minimal-fonts = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xprop = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xproto = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-xrandr = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-xrandr = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-xrestop = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xserver-nodm-init = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xserver-xf86-config = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xserver-xorg = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-xset = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-xset = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-xtrans = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xtscal = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-xvideo-tests = "Cristian Iorga <cristian.iorga@intel.com>"
diff --git a/meta-yocto/conf/distro/include/package_regex.inc b/meta-yocto/conf/distro/include/package_regex.inc
index 92202fd51f..119849c87c 100644
--- a/meta-yocto/conf/distro/include/package_regex.inc
+++ b/meta-yocto/conf/distro/include/package_regex.inc
@@ -7,361 +7,376 @@
#"
# The format is as a bitbake variable override for each recipe
#"
-# REGEX_URI_pn-<recipe name> = ""recipe_url"
+# REGEX_URI_pn-<recipe name> = "recipe_url"
# - This is the url used by the package checking system to
# get the latest version of the package
-# REGEX_pn-<recipe name> = ""package_regex"
+# REGEX_pn-<recipe name> = "package_regex"
# - This is the regex the package checking system uses to
# parse the page found at REGEX_URI_pn-<recipe name>
#
COMMON_REGEX = "((\d+[\.\-_]*)+)"
#This will need to be changed a little bit when versions are bigger than 9.
-REGEX_URI_pn-acpid = "http://sourceforge.net/projects/acpid/files/acpid/"
-REGEX_pn-acpid = "[hH][rR][eE][fF]=\"/projects/acpid/files/acpid/(acpid\-)?(?P<pver>(\d\.(\d+[\.\-_]*)+))/\""
+REGEX_URI_pn-acpid = "http://sourceforge.net/projects/acpid2/files/"
+REGEX_pn-acpid = "/projects/acpid2/files/(acpid\-)?(?P<pver>(\d\.(\d+[\.\-_]*)+)).tar.xz/"
REGEX_URI_pn-adt-installer = "http://code.google.com/p/opkg/downloads/list"
REGEX_URI_pn-arptables = "http://sourceforge.net/projects/ebtables/files/arptables/"
-REGEX_pn-arptables = "[hH][rR][eE][fF]=\"/projects/ebtables/files/arptables/arptables-v(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-arptables = "/projects/ebtables/files/arptables/arptables-v(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-beecrypt = "http://sourceforge.net/projects/beecrypt/files/beecrypt/"
-REGEX_pn-beecrypt = "[hH][rR][eE][fF]=\"/projects/beecrypt/files/beecrypt/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-beecrypt = "/projects/beecrypt/files/beecrypt/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-beecrypt-native = "http://sourceforge.net/projects/beecrypt/files/beecrypt/"
-REGEX_pn-beecrypt-native = "[hH][rR][eE][fF]=\"/projects/beecrypt/files/beecrypt/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-bdwgc = "[hH][rR][eE][fF]=\"gc\-(?P<pver>((\d+[a-z]?[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-beecrypt-native = "/projects/beecrypt/files/beecrypt/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_URI_pn-bdwgc = "http://www.hboehm.info/gc/gc_source/"
+REGEX_pn-bdwgc = "gc\-(?P<pver>((\d+[a-z]?[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-bind = "ftp://ftp.isc.org/isc/bind9/"
-REGEX_pn-bind = "[hH][rR][eE][fF]=\"(?P<pver>((P?\d+[\.\-_]*)+))/\""
+REGEX_pn-bind = "(?P<pver>((P?\d+[\.\-_]*)+))/"
REGEX_URI_pn-bjam-native = "http://sourceforge.net/projects/boost/files/boost/"
-REGEX_pn-bjam-native = "[hH][rR][eE][fF]=\"/projects/boost/files/boost/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-blktool = "[hH][rR][eE][fF]=\"blktool_(?P<pver>((\d+[\.\-_]*)+))\.(diff|orig\.tar)\.gz\""
+REGEX_pn-bjam-native = "/projects/boost/files/boost/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-blktool = "blktool_(?P<pver>((\d+[\.\-_]*)+))\.(diff|orig\.tar)\.gz"
REGEX_URI_pn-boost = "http://sourceforge.net/projects/boost/files/boost/"
-REGEX_pn-boost = "[hH][rR][eE][fF]=\"/projects/boost/files/boost/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-boost = "/projects/boost/files/boost/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_pn-btrfs-tools = "(?P<pver>(\d+(\.\d+)*(\-rc\d+)*))"
REGEX_pn-build-appliance-image = "(?P<pver>([0-9][\.|_]?)+)$"
REGEX_URI_pn-bzip2 = "http://www.bzip.org/downloads.html"
REGEX_pn-chkconfig-alternatives-native = "chkconfig\-(?P<pver>((\d+[\.\-_]*)+))"
REGEX_URI_pn-chrpath = "http://alioth.debian.org/frs/?group_id=31052"
-REGEX_pn-chrpath = "[hH][rR][eE][fF]=\"/frs/download.php/file/\d+/chrpath-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-cmake = "[hH][rR][eE][fF]=\"cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-cmake-native = "[hH][rR][eE][fF]=\"cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-nativeesdk-cmake = "[hH][rR][eE][fF]=\"cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_URI_pn-console-tools = "http://sourceforge.net/projects/lct/files/console-tools/"
-REGEX_pn-console-tools = "[hH][rR][eE][fF]=\"/projects/lct/files/console-tools/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-chrpath = "/frs/download.php/file/\d+/chrpath-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-cmake = "cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-cmake-native = "cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-nativeesdk-cmake = "cmake\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_URI_pn-console-tools = "http://sourceforge.net/projects/lct/files/console-tools-devel/"
+REGEX_pn-console-tools = "/projects/lct/files/console-tools-devel/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-cracklib = "http://sourceforge.net/projects/cracklib/files/cracklib/"
-REGEX_pn-cracklib = "[hH][rR][eE][fF]=\"/projects/cracklib/files/cracklib/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-cracklib = "/projects/cracklib/files/cracklib/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-createrepo = "http://createrepo.baseurl.org/download/"
-REGEX_pn-createrepo = "[hH][rR][eE][fF]=\"createrepo\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-createrepo = "createrepo\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-createrepo-native = "http://createrepo.baseurl.org/download/"
-REGEX_pn-createrepo-native = "[hH][rR][eE][fF]=\"createrepo\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-createrepo-native = "createrepo\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-cups = "http://www.cups.org/software.php"
-REGEX_pn-cups = "<tt>cups\-(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz<\/tt>"
+REGEX_pn-cups = "cups\-(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz"
REGEX_URI_pn-curlpp = "http://code.google.com/p/curlpp/downloads/list"
REGEX_URI_pn-cwautomacros = "http://sourceforge.net/projects/cwautomacros.berlios/files/"
-REGEX_pn-cwautomacros = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/cwautomacros.berlios/files/cwautomacros\-(?P<pver>(\d+))\.tar\.bz2\/download""
+REGEX_pn-cwautomacros = "http://sourceforge.net/projects/cwautomacros.berlios/files/cwautomacros\-(?P<pver>(\d+))\.tar\.bz2\/download"
REGEX_URI_pn-cwautomacros-native = "http://sourceforge.net/projects/cwautomacros.berlios/files/"
-REGEX_pn-cwautomacros-native = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/cwautomacros.berlios/files/cwautomacros\-(?P<pver>(\d+))\.tar\.bz2\/download\""
+REGEX_pn-cwautomacros-native = "http://sourceforge.net/projects/cwautomacros.berlios/files/cwautomacros\-(?P<pver>(\d+))\.tar\.bz2\/download"
REGEX_URI_pn-db = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-REGEX_pn-db = "[hH][rR][eE][fF]=\"http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-db = "http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-db-native = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-REGEX_pn-db-native = "[hH][rR][eE][fF]=\"http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-db-native = "http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-nativesdk-db = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-REGEX_pn-nativesdk-db = "[hH][rR][eE][fF]=\"http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-nativesdk-db = "http://download.oracle.com/otn/berkeley-db/db-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-distcc = "http://code.google.com/p/distcc/downloads/list"
-REGEX_pn-distcc = "[hH][rR][eE][fF]=\"//distcc.googlecode.com/files/distcc-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2\""
+REGEX_pn-distcc = "//distcc.googlecode.com/files/distcc-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2"
REGEX_URI_pn-docbook-dsssl-stylesheets-native = "http://sourceforge.net/projects/docbook/files/docbook-dsssl/"
-REGEX_pn-docbook-dsssl-stylesheets-native = "[hH][rR][eE][fF]=\"/projects/docbook/files/docbook-dsssl/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-docbook-dsssl-stylesheets-native = "/projects/docbook/files/docbook-dsssl/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-docbook-sgml-dtd-3.1-native = "http://docbook.org/sgml/3.1/"
-PRSPV_pn-docbook-sgml-dtd-3.1-native = "${@d.getVar('PV',1).replace('.','')}"
REGEX_URI_pn-docbook-sgml-dtd-4.1-native = "http://docbook.org/sgml/4.1/"
-PRSPV_pn-docbook-sgml-dtd-4.1-native = "${@d.getVar('PV',1).replace('.','')}"
REGEX_URI_pn-docbook-sgml-dtd-4.5-native = "http://docbook.org/sgml/4.5/"
REGEX_URI_pn-e2fsprogs = "http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/"
-REGEX_pn-e2fsprogs = "[hH][rR][eE][fF]=\"/projects/e2fsprogs/files/e2fsprogs/v(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-elfutils = "[hH][rR][eE][fF]=\"(elfutils\-)?(?P<pver>((\d+[\.\-_]*)+))(/|\.tar\.bz2)\""
+REGEX_pn-e2fsprogs = "/projects/e2fsprogs/files/e2fsprogs/v(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-elfutils = "(elfutils\-)?(?P<pver>((\d+[\.\-_]*)+))(/|\.tar\.bz2)"
REGEX_URI_pn-expat = "http://sourceforge.net/projects/expat/files/expat/"
-REGEX_pn-expat-native = "[hH][rR][eE][fF]=\"/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-expat-native = "/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-expat-native = "http://sourceforge.net/projects/expat/files/expat/"
-REGEX_pn-expat = "[hH][rR][eE][fF]=\"/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-expat = "/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-nativesdk-expat = "http://sourceforge.net/projects/expat/files/expat/"
-REGEX_pn-nativesdk-expat = "[hH][rR][eE][fF]=\"/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-nativesdk-expat = "/projects/expat/files/expat/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-fetchmail = "http://sourceforge.net/projects/fetchmail.berlios/files/"
-REGEX_URI_pn-flac = "http://sourceforge.net/projects/flac/files/flac-linux-i386/"
-REGEX_pn-flac = "[hH][rR][eE][fF]=\"/projects/flac/files/flac-linux-i386/flac\-(?P<pver>((\d+[\.\-_]*)+))\-linux\-i386/\""
REGEX_URI_pn-flex = "http://sourceforge.net/projects/flex/files/"
-REGEX_pn-flex = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/flex/files/flex-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download\""
-REGEX_pn-foomatic-filters = "[hH][rR][eE][fF]=\"foomatic-filters-(?P<pver>((\d|\d\d)\.*)+)\.tar\.gz\""
+REGEX_pn-flex = "http://sourceforge.net/projects/flex/files/flex-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download"
+REGEX_pn-foomatic-filters = "foomatic-filters-(?P<pver>((\d|\d\d)\.*)+)\.tar\.gz"
REGEX_URI_pn-fotowall = "https://code.google.com/p/fotowall/downloads/list"
-REGEX_pn-fotowall = "[hH][rR][eE][fF]=\"//fotowall.googlecode.com/files/[F|f]otowall\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2\""
+REGEX_pn-fotowall = "//fotowall.googlecode.com/files/[F|f]otowall\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2"
REGEX_URI_pn-freetype = "http://sourceforge.net/projects/freetype/files/freetype2"
-REGEX_pn-freetype = "[hH][rR][eE][fF]=\"/projects/freetype/files/freetype\d/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-freetype = "/projects/freetype/files/freetype\d/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-freetype-native = "http://sourceforge.net/projects/freetype/files/freetype2"
-REGEX_pn-freetype-native = "[hH][rR][eE][fF]=\"/projects/freetype/files/freetype\d/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_URI_pn-git = "http://code.google.com/p/git-core/downloads/list"
-REGEX_pn-git = "[hH][rR][eE][fF]=\"//git-core.googlecode.com/files/git-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-freetype-native = "/projects/freetype/files/freetype\d/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-glew = "http://sourceforge.net/projects/glew/files/glew"
-REGEX_pn-glew = " [hH][rR][eE][fF]=\"/projects/glew/files/glew/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-glew = "/projects/glew/files/glew/(?P<pver>((\d+[\.\-_]*)+))/"
#REGEX_pn-gnutls = "ftp://ftp.gnutls.org/gcrypt/gnutls/"
-REGEX_pn-gstreamer = "[hH][rR][eE][fF]=\"gstreamer\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0 = "[hH][rR][eE][fF]=\"gstreamer\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-ffmpeg = "[hH][rR][eE][fF]=\"gst-ffmpeg\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-fluendo-mpegdemux = "[hH][rR][eE][fF]=\"gst-fluendo-mpegdemux\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-fluendo-mp3 = "[hH][rR][eE][fF]=\"gst-fluendo-mp3\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-plugins-base = "[hH][rR][eE][fF]=\"gst\-plugins\-base\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-plugins-base = "[hH][rR][eE][fF]=\"gst\-plugins\-base\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-plugins-bad = "[hH][rR][eE][fF]=\"gst\-plugins\-bad\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-plugins-bad = "[hH][rR][eE][fF]=\"gst\-plugins\-bad\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-plugins-gl = "[hH][rR][eE][fF]=\"gst\-plugins\-gl\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-plugins-good = "[hH][rR][eE][fF]=\"gst\-plugins\-good\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-plugins-good = "[hH][rR][eE][fF]=\"gst\-plugins\-good\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-libav = "[hH][rR][eE][fF]=\"gst\-libav\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-omx = "[hH][rR][eE][fF]=\"gst\-omx\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-openmax = "[hH][rR][eE][fF]=\"gst\-openmax\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gstreamer1.0-plugins-ugly = "[hH][rR][eE][fF]=\"gst\-plugins\-ugly\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gst-plugins-ugly = "[hH][rR][eE][fF]=\"gst\-plugins\-ugly\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)\""
-REGEX_pn-gtk+ = "[hH][rR][eE][fF]=\"gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz\""
-REGEX_pn-gtk+3 = "[hH][rR][eE][fF]=\"gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz\""
-REGEX_pn-gtk-update-icon-cache-native = "[hH][rR][eE][fF]=\"gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz\""
-REGEX_pn-webkit-gtk = "[hH][rR][eE][fF]=\"webkitgtk\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz\""
+REGEX_pn-gstreamer = "gstreamer\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0 = "gstreamer\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-ffmpeg = "gst-ffmpeg\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-fluendo-mpegdemux = "gst-fluendo-mpegdemux\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-fluendo-mp3 = "gst-fluendo-mp3\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-plugins-base = "gst\-plugins\-base\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-plugins-base = "gst\-plugins\-base\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-plugins-bad = "gst\-plugins\-bad\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-plugins-bad = "gst\-plugins\-bad\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-plugins-gl = "gst\-plugins\-gl\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-plugins-good = "gst\-plugins\-good\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-plugins-good = "gst\-plugins\-good\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-libav = "gst\-libav\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-omx = "gst\-omx\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-openmax = "gst\-openmax\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gstreamer1.0-plugins-ugly = "gst\-plugins\-ugly\-(?P<pver>(\d+\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gst-plugins-ugly = "gst\-plugins\-ugly\-(?P<pver>(0\.\d*[0|2|4|6|8]\.\d+))\.tar\.(gz|xz|bz2)"
+REGEX_pn-gtk+ = "gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz"
+REGEX_pn-gtk+3 = "gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz"
+REGEX_pn-gtk-update-icon-cache-native = "gtk\+\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz"
+REGEX_pn-webkit-gtk = "webkitgtk\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.xz"
REGEX_URI_pn-hdparm = "http://sourceforge.net/projects/hdparm/files/hdparm/"
-REGEX_pn-hdparm = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/hdparm/files/hdparm/hdparm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download\""
-REGEX_URI_pn-icu = "http://site.icu-project.org/download"
-REGEX_pn-icu = "[hH][rR][eE][fF]=\"http://site.icu-project.org/download/((\d+[\.\-_]*)+)#(TOC\-)?ICU4J\-Download\" rel=\"nofollow\">(<b>)?(?P<pver>((\d+[\.\-_]*)+))(</b>)?"
+REGEX_pn-hdparm = "http://sourceforge.net/projects/hdparm/files/hdparm/hdparm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download"
REGEX_URI_pn-intltool = "https://launchpad.net/intltool/+download"
-REGEX_pn-intltool = "[hH][rR][eE][fF]=\"https://launchpad.net/intltool/trunk/(?P<pver>((\d+[\.\-_]*)+))/\+download/intltool\-(\d+[\.\-_]*)+\.tar\.gz\""
+REGEX_pn-intltool = "https://launchpad.net/intltool/trunk/(?P<pver>((\d+[\.\-_]*)+))/\+download/intltool\-(\d+[\.\-_]*)+\.tar\.gz"
REGEX_URI_pn-intltool-native = "https://launchpad.net/intltool/+download"
-REGEX_pn-intltool-native = "[hH][rR][eE][fF]=\"https://launchpad.net/intltool/trunk/(?P<pver>((\d+[\.\-_]*)+))/\+download/intltool\-(\d+[\.\-_]*)+\.tar\.gz\""
+REGEX_pn-intltool-native = "https://launchpad.net/intltool/trunk/(?P<pver>((\d+[\.\-_]*)+))/\+download/intltool\-(\d+[\.\-_]*)+\.tar\.gz"
REGEX_URI_pn-irda-utils = "http://sourceforge.net/projects/irda/files/irda-utils/"
-REGEX_pn-irda-utils = "[hH][rR][eE][fF]=\"/projects/irda/files/irda-utils/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-iputils = "[Hh][Rr][Ee][Ff]=\"iputils\-(?P<pver>(s\d+))\.tar\.bz2\""
+REGEX_pn-irda-utils = "/projects/irda/files/irda-utils/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-iputils = "iputils\-(?P<pver>(s\d+))\.tar\.bz2"
REGEX_URI_pn-jpeg = "http://www.ijg.org/files/"
-REGEX_pn-jpeg = "[hH][rR][eE][fF]=\"jpegsrc.v(?P<pver>((\d+[a-z]*\d*)+))\.tar\.gz""
+REGEX_pn-jpeg = "jpegsrc.v(?P<pver>((\d+[a-z]*\d*)+))\.tar\.gz"
REGEX_URI_pn-js = "http://ftp.mozilla.org/pub/mozilla.org/js/"
-REGEX_pn-js = "[hH][rR][eE][fF]=\"js-?(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_URI_pn-json-c = "http://s3.amazonaws.com/json-c_releases/"
-REGEX_pn-json-c = "releases/json-c-(?P<pver>(\d+[\.\-_]*)+).tar.gz"
-REGEX_URI_pn-kconfig-frontends = "http://ymorin.is-a-geek.org/download/kconfig-frontends/"
-REGEX_pn-kconfig-frontends = "[hH][rR][eE][fF]=\'kconfig\-frontends\-(?P<pver>((\d+[\.\-]*)+))\.tar\.xz\'"
-GIT_REGEX_pn-kern-tools-native = "HEEEAD"
+REGEX_pn-js = "js-?(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_URI_pn-json-c = "https://github.com/json-c/json-c/releases"
+REGEX_pn-json-c = "json-c-(?P<pver>(\d+[\.\-_]*)+)-\d\d\d\d\d\d\d\d\.tar\.gz"
REGEX_URI_pn-lame = "http://sourceforge.net/projects/lame/files/lame/"
-REGEX_pn-lame = "[hH][rR][eE][fF]=\"/projects/lame/files/lame/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-lame = "/projects/lame/files/lame/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-less = "http://www.greenwoodsoftware.com/less/download.html"
-REGEX_pn-less = "[hH][rR][eE][fF]=\"less\-(?P<pver>(\d+))\.tar\.gz\""
+REGEX_pn-less = "less\-(?P<pver>(\d+))\.tar\.gz"
REGEX_URI_pn-liba52 = "http://liba52.sourceforge.net/downloads.html"
-REGEX_pn-liba52 = "[hH][rR][eE][fF]=\"/files/a52\w*\-(?P<pver>((\d+[a-z]?[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-liba52 = "/files/a52\w*\-(?P<pver>((\d+[a-z]?[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libacpi = "http://www.ngolde.de/libacpi.html"
REGEX_URI_pn-libaio = "http://ftp.debian.org/debian/pool/main/liba/libaio/"
-REGEX_pn-libaio = "[hH][rR][eE][fF]=\"libaio_(?P<pver>((\d+[\.\-_]*)+)).orig.tar.gz\""
+REGEX_pn-libaio = "libaio_(?P<pver>((\d+[\.\-_]*)+)).orig.tar.gz"
REGEX_URI_pn-libarchive = "http://www.libarchive.org/"
-REGEX_pn-libarchive = "[hH][rR][eE][fF]=\"downloads/libarchive\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-libarchive = "downloads/libarchive\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libcgroup = "http://sourceforge.net/projects/libcg/files/libcgroup/"
-#REGEX_pn-libcgroup = "[hH][rR][eE][fF]=\"/projects/libcg/files/libcgroup/v?(?P<pver>((\.?\d+[\.\-_]*)+(rc\d?)*)+)/\""
-REGEX_pn-libcgroup = "[hH][rR][eE][fF]=\"/projects/libcg/files/libcgroup/v?(?P<pver>((\.?\d+[\.\-_]*))+)/\""
+#REGEX_pn-libcgroup = "/projects/libcg/files/libcgroup/v?(?P<pver>((\.?\d+[\.\-_]*)+(rc\d?)*)+)/"
+REGEX_pn-libcgroup = "/projects/libcg/files/libcgroup/v?(?P<pver>((\.?\d+[\.\-_]*))+)/"
REGEX_URI_pn-libcheck = "http://sourceforge.net/projects/check/files/check/"
-REGEX_pn-libcheck = "[hH][rR][eE][fF]=\"/projects/check/files/check/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libcheck = "/projects/check/files/check/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libdnet = "http://code.google.com/p/libdnet/downloads/list"
#REGEX_URI_pn-libevent = "http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/"
REGEX_URI_pn-libevent = "http://libevent.org/"
-#REGEX_pn-libevent = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-(?P<pver>((\d+[\.\-_]*)+))\-stable\.tar\.gz/download\""
-REGEX_pn-libevent = "[hH][rR][eE][fF]=\"https://github.com/downloads/libevent/libevent/libevent-(?P<pver>((\d+[\.\-_]*)+))\-stable\.tar\.gz\""
+#REGEX_pn-libevent = "http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-(?P<pver>((\d+[\.\-_]*)+))\-stable\.tar\.gz/download"
+REGEX_pn-libevent = "https://github.com/downloads/libevent/libevent/libevent-(?P<pver>((\d+[\.\-_]*)+))\-stable\.tar\.gz"
REGEX_URI_pn-libexif = "http://sourceforge.net/projects/libexif/files/libexif/"
-REGEX_pn-libexif = "[hH][rR][eE][fF]=\"/projects/libexif/files/libexif/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-libffi = "[hH][rR][eE][fF]=\"libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-libffi-native = "[hH][rR][eE][fF]=\"ftp://sourceware.org:21/pub/libffi/libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-nativesdk-libffi = "[hH][rR][eE][fF]=\"ftp://sourceware.org:21/pub/libffi/libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-libexif = "/projects/libexif/files/libexif/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-libffi = "libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-libffi-native = "ftp://sourceware.org:21/pub/libffi/libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-nativesdk-libffi = "ftp://sourceware.org:21/pub/libffi/libffi\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libfm = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
-REGEX_pn-libfm = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/pcmanfm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download\""
-REGEX_URI_pn-libical = "http://sourceforge.net/projects/libical/files/libical/"
-REGEX_pn-libical = "[hH][rR][eE][fF]=\"/projects/libical/files/libical/libical-(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libfm = "pcmanfm-(?P<pver>((\d+[\.\-_]*)+)).tar.xz/download$"
+REGEX_URI_pn-libical = "https://github.com/libical/libical/releases"
+REGEX_pn-libical = "/releases/tag/v(?P<pver>((\d+[\.\-_]*)+))"
REGEX_URI_pn-libid3tag = "http://sourceforge.net/projects/mad/files/libid3tag/"
-REGEX_pn-libid3tag = "[hH][rR][eE][fF]=\"/projects/mad/files/libid3tag/(?P<pver>((\d+[\.\-_]*)+([a-z]?)))/\""
+REGEX_pn-libid3tag = "/projects/mad/files/libid3tag/(?P<pver>((\d+[\.\-_]*)+([a-z]?)))/"
REGEX_URI_pn-libmad = "http://sourceforge.net/projects/mad/files/libmad/"
-REGEX_pn-libmad = "[hH][rR][eE][fF]=\"/projects/mad/files/libmad/(?P<pver>((\d+[\.\-_]*)+([a-z]?)))/\""
+REGEX_pn-libmad = "/projects/mad/files/libmad/(?P<pver>((\d+[\.\-_]*)+([a-z]?)))/"
REGEX_URI_pn-libogg = "http://downloads.xiph.org/releases/ogg/"
-REGEX_pn-libogg = "[hH][rR][eE][fF]=\"libogg\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-libogg = "libogg\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libmpc = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
REGEX_URI_pn-libomxil = "http://sourceforge.net/projects/omxil/files/omxil/"
-REGEX_pn-libomxil = "[hH][rR][eE][fF]=\"/projects/omxil/files/omxil/Bellagio.20(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libomxil = "/projects/omxil/files/omxil/Bellagio.20(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libpcap = "http://www.tcpdump.org/release/"
-REGEX_pn-libpcap = "[hH][rR][eE][fF]=\"libpcap-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
+REGEX_pn-libpcap = "libpcap-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-libpcre = "http://sourceforge.net/projects/pcre/files/pcre/"
-REGEX_pn-libpcre = "[hH][rR][eE][fF]=\"/projects/pcre/files/pcre/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libpcre = "/projects/pcre/files/pcre/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libpcre-native = "http://sourceforge.net/projects/pcre/files/pcre/"
-REGEX_pn-libpcre-native = "[hH][rR][eE][fF]=\"/projects/pcre/files/pcre/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libpcre-native = "/projects/pcre/files/pcre/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libpfm4 = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
-REGEX_URI_pn-libpng = "http://sourceforge.net/projects/libpng/files/"
-REGEX_pn-libpng = "[hH][rR][eE][fF]=\"/projects/libpng/files/latest/download\?source=files\" title=\"/libpng\d+(/(\d+\.?)+/)?libpng-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
+REGEX_pn-libpfm4 = "/projects/perfmon2/files/libpfm4/libpfm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/"
+REGEX_URI_pn-libpng = "http://sourceforge.net/projects/libpng/files/libpng16/"
+REGEX_pn-libpng = "/projects/libpng/files/libpng16/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libpng-native = "ftp://ftp.simplesystems.org/pub/libpng/png/src/"
-REGEX_pn-libpng-native = "[hH][rR][eE][fF]=\"ftp://ftp.simplesystems.org:21/pub/libpng/png/src/libpng-(?P<pver>((\d+[\.\-_]*)+)).tar.gz""
+REGEX_pn-libpng-native = "ftp://ftp.simplesystems.org:21/pub/libpng/png/src/libpng-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-libpng12 = "http://sourceforge.net/projects/libpng/files/libpng12/"
-REGEX_pn-libpng12 = "[hH][rR][eE][fF]=\"/projects/libpng/files/libpng12/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libpng12 = "/projects/libpng/files/libpng12/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libproxy = "http://code.google.com/p/libproxy/downloads/list"
-REGEX_pn-libtheora = "[Hh][Rr][Ee][Ff]=\"libtheora\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-libtheora = "libtheora\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libsamplerate0 = "http://www.mega-nerd.com/SRC/download.html"
-REGEX_pn-libsamplerate0 = "[hH][rR][eE][fF]=\"libsamplerate\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-libsamplerate0 = "libsamplerate\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-libtirpc = "http://sourceforge.net/projects/libtirpc/files/libtirpc/"
-REGEX_pn-libtirpc = "[hH][rR][eE][fF]=\"/projects/libtirpc/files/libtirpc/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-libtirpc = "/projects/libtirpc/files/libtirpc/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libusb-compat = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
-REGEX_pn-libusb-compat = "[hH][rR][eE][fF]=\"/projects/libusb/files/libusb-compat-0.1/libusb-compat-(?P<pver>((\d+[\.\-_]*)+))/""
+REGEX_pn-libusb-compat = "/projects/libusb/files/libusb-compat-0.1/libusb-compat-(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libusb1 = "http://sourceforge.net/projects/libusb/files/libusb-1.0/"
-REGEX_pn-libusb1 = "[hH][rR][eE][fF]=\"/projects/libusb/files/libusb-1.0/libusb-(?P<pver>((\d+[\.\-_]*)+))/""
+REGEX_pn-libusb1 = "/projects/libusb/files/libusb-1.0/libusb-(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-libvorbis = "http://downloads.xiph.org/releases/vorbis/"
-REGEX_pn-libvorbis = "[hH][rR][eE][fF]=\"libvorbis-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_pn-libxslt = "[Hh][Rr][Ee][Ff]=\"libxslt\-(?P<pver>((\d+\.*)+))\.tar\.gz\""
+REGEX_pn-libvorbis = "libvorbis-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_pn-libxslt = "libxslt\-(?P<pver>((\d+\.*)+))\.tar\.gz"
REGEX_pn-linux-libc-headers-yocto = "v((?P<pver>((\d+[\.\-_]*)+)))"
REGEX_URI_pn-lrzsz = "http://ohse.de/uwe/software/lrzsz.html"
REGEX_URI_pn-lsb = "http://sourceforge.net/projects/lsb/files/lsb_release/"
-REGEX_pn-lsb = "[hH][rR][eE][fF]=\"/projects/lsb/files/lsb_release/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-lsb = "/projects/lsb/files/lsb_release/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-lsbinitscripts = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/"
-REGEX_pn-lsbinitscripts = "[hH][rR][eE][fF]=\"initscripts\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2/\""
+REGEX_pn-lsbinitscripts = "initscripts\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2/"
REGEX_URI_pn-ltp = "http://sourceforge.net/projects/ltp/files/LTP%20Source"
-REGEX_pn-ltp = "[hH][rR][eE][fF]=\"/projects/ltp/files/LTP%20Source/ltp\-(?P<pver>(\d+))/\""
+REGEX_pn-ltp = "/projects/ltp/files/LTP%20Source/ltp\-(?P<pver>(\d+))/"
REGEX_URI_pn-lzop = "http://www.lzop.org/download/"
-REGEX_pn-lzop = "[hH][rR][eE][fF]=\"lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-lzop = "lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-lzop-native = "http://www.lzop.org/download/"
-REGEX_pn-lzop-native = "[hH][rR][eE][fF]=\"lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-lzop-native = "lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-nativesdk-lzop = "http://www.lzop.org/download/"
-REGEX_pn-nativesdk-lzop = "[hH][rR][eE][fF]=\"lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_URI_pn-mailx = "http://sourceforge.net/projects/heirloom/files/heirloom-mailx/"
-REGEX_pn-mailx = "[hH][rR][eE][fF]=\"/projects/heirloom/files/heirloom-mailx/(?P<pver>((\d+[\.]*)+))/\""
+REGEX_pn-nativesdk-lzop = "lzop\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-memcached = "http://code.google.com/p/memcached/downloads/list"
REGEX_URI_pn-menu-cache = "http://sourceforge.net/projects/lxde/files/menu-cache/"
-REGEX_pn-menu-cache = "[hH][rR][eE][fF]=\"/projects/lxde/files/menu\-cache/menu-cache%20(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-mesa = "[hH][rR][eE][fF]=\"MesaLib-(?P<pver>((\d+[\.\-_]*)+))(\-rc\d+)*.tar.gz\""
+REGEX_pn-menu-cache = "/projects/lxde/files/menu\-cache/menu-cache%20(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-mesa = "MesaLib-(?P<pver>((\d+[\.\-_]*)+))(\-rc\d+)*.tar.gz"
REGEX_URI_pn-mesa-glsl-native = "ftp://ftp.freedesktop.org/pub/mesa/"
-REGEX_pn-mesa-glsl-native = "[hH][rR][eE][fF]=\"ftp://ftp.freedesktop.org:21/pub/mesa/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-mesa-glsl-native = "ftp://ftp.freedesktop.org:21/pub/mesa/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-minicom = "https://alioth.debian.org/frs/?group_id=30018"
-REGEX_pn-minicom = "[hH][rR][eE][fF]=\"/frs/download.php/file/\d+/minicom\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-minicom = "/frs/download.php/file/\d+/minicom\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-mingetty = "http://sourceforge.net/projects/mingetty/files/mingetty"
-REGEX_pn-mingetty = "[hH][rR][eE][fF]=\"/projects/mingetty/files/mingetty/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-mingetty = "/projects/mingetty/files/mingetty/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-mpeg2dec = "http://libmpeg2.sourceforge.net/downloads.html"
-REGEX_pn-mpeg2dec = "[hH][rR][eE][fF]=\"/files/mpeg2dec-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
+REGEX_pn-mpeg2dec = "/files/mpeg2dec-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-mpfr = "http://ftp.gnu.org/gnu/mpfr/"
-REGEX_pn-mpfr = "[hH][rR][eE][fF]=\"mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz""
+REGEX_pn-mpfr = "mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-mpfr-native = "http://ftp.gnu.org/gnu/mpfr/"
-REGEX_pn-mpfr-native = "[hH][rR][eE][fF]=\"mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
+REGEX_pn-mpfr-native = "mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-msmtp = "http://sourceforge.net/projects/msmtp/files/msmtp/"
-REGEX_pn-msmtp = "[hH][rR][eE][fF]=\"/projects/msmtp/files/msmtp/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-msmtp = "/projects/msmtp/files/msmtp/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-nativesdk-mpfr = "http://ftp.gnu.org/gnu/mpfr/"
-REGEX_pn-nativesdk-mpfr = "[hH][rR][eE][fF]=\"mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
+REGEX_pn-nativesdk-mpfr = "mpfr-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-net-snmp = "http://sourceforge.net/projects/net-snmp/files/net-snmp/"
-REGEX_pn-net-snmp = "[hH][rR][eE][fF]=\"/projects/net-snmp/files/net-snmp/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-net-snmp = "/projects/net-snmp/files/net-snmp/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-netcat = "http://sourceforge.net/projects/netcat/files/netcat/"
-REGEX_pn-netcat = "[hH][rR][eE][fF]=\"/projects/netcat/files/netcat/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-netcat = "/projects/netcat/files/netcat/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-nfs-utils = "http://sourceforge.net/projects/nfs/files/nfs-utils/"
-REGEX_pn-nfs-utils = "[hH][rR][eE][fF]=\"/projects/nfs/files/nfs-utils/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-nfs-utils = "/projects/nfs/files/nfs-utils/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-ocf-linux = "http://sourceforge.net/projects/ocf-linux/files/ocf-linux/"
-REGEX_pn-ocf-linux = "[hH][rR][eE][fF]=\"/projects/ocf-linux/files/ocf-linux/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-ocf-linux = "/projects/ocf-linux/files/ocf-linux/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-openjade-native = "http://sourceforge.net/projects/openjade/files/openjade/"
-REGEX_pn-openjade-native = "[hH][rR][eE][fF]=\"/projects/openjade/files/openjade/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-openjade-native = "/projects/openjade/files/openjade/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-opensp = "http://sourceforge.net/projects/openjade/files/opensp/"
-REGEX_pn-opensp = "[hH][rR][eE][fF]=\"/projects/openjade/files/opensp/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-opensp = "/projects/openjade/files/opensp/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-opensp-native = "http://sourceforge.net/projects/openjade/files/opensp/"
-REGEX_pn-opensp-native = "[hH][rR][eE][fF]=\"/projects/openjade/files/opensp/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_URI_pn-opkg = "http://code.google.com/p/opkg/downloads/list"
+REGEX_pn-opensp-native = "/projects/openjade/files/opensp/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-oprofile = "http://sourceforge.net/projects/oprofile/files/oprofile/"
-REGEX_pn-oprofile = "[hH][rR][eE][fF]=\"/projects/oprofile/files/oprofile/oprofile-(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-oprofile = "/projects/oprofile/files/oprofile/oprofile-(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-ossp-uuid = "http://code.google.com/p/gnome-build-stage-1/downloads/list"
REGEX_URI_pn-pcmanfm = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
-REGEX_pn-pcmanfm = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/pcmanfm/files/PCManFM.20.2B.20Libfm.20.28tarball.20release.29/PCManFM/pcmanfm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download\""
-REGEX_URI_pn-procps = "http://procps.sourceforge.net/download.html"
-REGEX_pn-procps = "[hH][rR][eE][fF]=\"procps\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-pcmanfm = "http://sourceforge.net/projects/pcmanfm/files/PCManFM.20.2B.20Libfm.20.28tarball.20release.29/PCManFM/pcmanfm-(?P<pver>((\d+[\.\-_]*)+)).tar.gz/download"
+REGEX_pn-procps = "procps\-ng\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.(g|x)z"
REGEX_URI_pn-powertop = "https://01.org/powertop/downloads"
REGEX_URI_pn-pptp-linux = "http://sourceforge.net/projects/pptpclient/files/pptp/"
-REGEX_pn-pptp-linux = "[hH][rR][eE][fF]=\"/projects/pptpclient/files/pptp/pptp-(?P<pver>((\d+[\.\-_]*)+))/\""
-GIT_REGEX_pn-prelink = "cross_prelink"
+REGEX_pn-pptp-linux = "/projects/pptpclient/files/pptp/pptp-(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_pn-prelink = "(?P<pver>cross_prelink)"
REGEX_URI_pn-psmisc = "http://sourceforge.net/projects/psmisc/files/psmisc/"
-REGEX_pn-psmisc = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/psmisc/files/psmisc/psmisc\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz/download\""
+REGEX_pn-psmisc = "http://sourceforge.net/projects/psmisc/files/psmisc/psmisc\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz/download"
REGEX_URI_pn-ptpd = "http://sourceforge.net/projects/ptpd/files/ptpd/"
-REGEX_pn-ptpd = "[hH][rR][eE][fF]=\"/projects/ptpd/files/ptpd/(?P<pver>((\d+[\.\-_]*)+))/stats/timeline\""
+REGEX_pn-ptpd = "/projects/ptpd/files/ptpd/(?P<pver>((\d+[\.\-_]*)+))/stats/timeline"
REGEX_URI_pn-python-argparse = "https://code.google.com/p/argparse/downloads/list"
REGEX_URI_pn-python-docutils = "http://sourceforge.net/projects/docutils/files/docutils/"
-REGEX_pn-python-docutils = "[hH][rR][eE][fF]=\"/projects/docutils/files/docutils/(?P<pver>((\d+[\.\-_]*)+)).*/\""
+REGEX_pn-python-docutils = "/projects/docutils/files/docutils/(?P<pver>((\d+[\.\-_]*)+)).*/"
REGEX_URI_pn-python-numpy = "http://sourceforge.net/projects/numpy/files/NumPy/"
-REGEX_pn-python-numpy = "[hH][rR][eE][fF]=\"/projects/numpy/files/latest/download\?source=files\" title=\"/NumPy/(\d+\.?)+/numpy-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
+REGEX_pn-python-numpy = "/projects/numpy/files/NumPy/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-python-pycurl = "http://pycurl.sourceforge.net/download/"
-REGEX_pn-python-pycurl = "[hH][rR][eE][fF]=\"pycurl-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
+REGEX_pn-python-pycurl = "pycurl-(?P<pver>((\d+[\.\-_]*)+)).tar.gz"
REGEX_URI_pn-python-scons = "http://sourceforge.net/projects/scons/files/scons/"
-REGEX_pn-python-scons = "[hH][rR][eE][fF]=\"/projects/scons/files/scons/(?P<pver>((\d+[\.\-_]*)+)).*/\""
+REGEX_pn-python-scons = "/projects/scons/files/scons/(?P<pver>((\d+[\.\-_]*)+)).*/"
REGEX_URI_pn-python-scons-native = "http://sourceforge.net/projects/scons/files/scons/"
-REGEX_pn-python-scons-native = "[hH][rR][eE][fF]=\"/projects/scons/files/scons/(?P<pver>((\d+[\.\-_]*)+)).*/\""
-REGEX_pn-python-setuptools = "[hH][rR][eE][fF]=\"setuptools\-(?P<pver>((\d+([a-z]\d+)?[\.\-_]*)+))\.(tar\.gz|\.zip)\""
+REGEX_pn-python-scons-native = "/projects/scons/files/scons/(?P<pver>((\d+[\.\-_]*)+)).*/"
+REGEX_pn-python-setuptools = "setuptools\-(?P<pver>((\d+([a-z]\d+)?[\.\-_]*)+))\.(tar\.gz|\.zip)"
REGEX_URI_pn-quota = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
-REGEX_pn-quota = "[hH][rR][eE][fF]=\"/projects/linuxquota/files/quota-tools/(?P<pver>((\d+[\.\-_]*)+([-\w\d]+)))/\""
+REGEX_pn-quota = "/projects/linuxquota/files/quota-tools/(?P<pver>((\d+[\.\-_]*)+([-\w\d]+)))/"
REGEX_pn-remake = "(?P<pver>(\d+\.(\d+\.)*\d*(\+dbg\-\d+(\.\d+)*)*))"
REGEX_URI_pn-rpcbind = "http://sourceforge.net/projects/rpcbind/files/rpcbind/"
-REGEX_pn-rpcbind = "[hH][rR][eE][fF]=\"/projects/rpcbind/files/rpcbind/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-rpm = "[hH][rR][eE][fF]=\"rpm\-(?P<pver>((\d+[\.\-_]*)+)\-(\d+[\.]*)+)\.src\.rpm\""
-REGEX_pn-rpm-native = "[hH][rR][eE][fF]=\"rpm\-(?P<pver>((\d+[\.\-_]*)+)\-(\d+[\.]*)+)\.src\.rpm\""
+REGEX_pn-rpcbind = "/projects/rpcbind/files/rpcbind/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-rpm = "rpm\-(?P<pver>((\d+[\.\-_]*)+)\-(\d+[\.]*)+)\.src\.rpm"
+REGEX_pn-rpm-native = "rpm\-(?P<pver>((\d+[\.\-_]*)+)\-(\d+[\.]*)+)\.src\.rpm"
REGEX_URI_pn-setserial = "http://sourceforge.net/projects/setserial/files/setserial/"
-REGEX_pn-setserial = "[hH][rR][eE][fF]=\"/projects/setserial/files/setserial/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-shared-mime-info = "[hH][rR][eE][fF]=\"shared\-mime\-info\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.(bz2|gz|xz)\""
-REGEX_pn-shared-mime-info-native = "[hH][rR][eE][fF]=\"shared\-mime\-info\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.(bz2|gz|xz)\""
+REGEX_pn-setserial = "/projects/setserial/files/setserial/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-shared-mime-info = "shared\-mime\-info\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.(bz2|gz|xz)"
+REGEX_pn-shared-mime-info-native = "shared\-mime\-info\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.(bz2|gz|xz)"
REGEX_URI_pn-socat = "http://www.dest-unreach.org/socat/download/"
-REGEX_pn-socat = "[hH][rR][eE][fF]=\"socat\-(?P<pver>((\d+[\.\-]*)+))\.tar\.bz2\""
+REGEX_pn-socat = "socat\-(?P<pver>((\d+[\.\-]*)+))\.tar\.bz2"
REGEX_URI_pn-speex = "http://downloads.us.xiph.org/releases/speex/"
-REGEX_pn-speex = "[hH][rR][eE][fF]=\"speex\-(?P<pver>((\d+\.*)+))\.tar\.gz\""
+REGEX_pn-speex = "speex\-(?P<pver>((\d+\.*)+)(rc\d)?)\.tar\.gz"
REGEX_URI_pn-sqlite3 = "http://www.sqlite.org/download.html"
REGEX_pn-sqlite3 = "sqlite-autoconf-(?P<pver>(\d+)).tar.gz"
REGEX_URI_pn-sqlite3-native = "http://www.sqlite.org/download.html"
-REGEX_pn-sqlite3-native = "[hH][rR][eE][fF]=\"/sqlite-autoconf-(?P<pver>(\d+)).tar.gz\""
+REGEX_pn-sqlite3-native = "/sqlite-autoconf-(?P<pver>(\d+)).tar.gz"
REGEX_URI_pn-nativesdk-sqlite3 = "http://www.sqlite.org/download.html"
-REGEX_pn-nativesdk-sqlite3 = "[hH][rR][eE][fF]=\"/sqlite-autoconf-(?P<pver>(\d+)).tar.gz\""
+REGEX_pn-nativesdk-sqlite3 = "/sqlite-autoconf-(?P<pver>(\d+)).tar.gz"
REGEX_URI_pn-squashfs-tools = "http://sourceforge.net/projects/squashfs/files/squashfs/"
-REGEX_pn-squashfs-tools = "[hH][rR][eE][fF]=\"/projects/squashfs/files/squashfs/squashfs(?P<pver>((\d+[\.\-_]*)+)).*/\""
+REGEX_pn-squashfs-tools = "/projects/squashfs/files/squashfs/squashfs(?P<pver>((\d+[\.\-_]*)+)).*/"
REGEX_URI_pn-strace = "http://sourceforge.net/projects/strace/files/strace/"
-REGEX_pn-strace = "[hH][rR][eE][fF]=\"/projects/strace/files/strace/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-strace = "/projects/strace/files/strace/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-strace-native = "http://sourceforge.net/projects/strace/files/strace/"
-REGEX_pn-strace-native = "[hH][rR][eE][fF]=\"/projects/strace/files/strace/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-strace-native = "/projects/strace/files/strace/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-stunnel = "http://www.stunnel.org/downloads.html"
-REGEX_pn-stunnel = "[hH][rR][eE][fF]=\"downloads/stunnel-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-stunnel = "downloads/stunnel-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-sysfsutils = "http://sourceforge.net/projects/linux-diag/files/sysfsutils/"
-REGEX_pn-sysfsutils = "[hH][rR][eE][fF]=\"/projects/linux-diag/files/sysfsutils/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-sysfsutils = "/projects/linux-diag/files/sysfsutils/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-sysstat = "http://sebastien.godard.pagesperso-orange.fr/download.html"
-REGEX_pn-sysstat = "[hH][rR][eE][fF]=\"http://pagesperso-orange.fr/sebastien.godard/sysstat\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-sysstat = "http://pagesperso-orange.fr/sebastien.godard/sysstat\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-taglib = "http://github.com/taglib/taglib/releases/"
REGEX_URI_pn-tcl = "http://sourceforge.net/projects/tcl/files/Tcl/"
-REGEX_pn-tcl = "[hH][rR][eE][fF]=\"/projects/tcl/files/Tcl/(?P<pver>((\d+(b\d+)?[\.\-_]*)+))/\""
+REGEX_pn-tcl = "/projects/tcl/files/Tcl/(?P<pver>((\d+(b\d+)?[\.\-_]*)+))/"
REGEX_URI_pn-tcl-native = "http://sourceforge.net/projects/tcl/files/Tcl/"
-REGEX_pn-tcl-native = "[hH][rR][eE][fF]=\"/projects/tcl/files/Tcl/(?P<pver>((\d+(b\d+)?[\.\-_]*)+))/\""
+REGEX_pn-tcl-native = "/projects/tcl/files/Tcl/(?P<pver>((\d+(b\d+)?[\.\-_]*)+))/"
REGEX_URI_pn-tcpreplay = "http://sourceforge.net/projects/tcpreplay/files/tcpreplay/"
-REGEX_pn-tcpreplay = "[hH][rR][eE][fF]=\"/projects/tcpreplay/files/tcpreplay/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-tcpreplay = "/projects/tcpreplay/files/tcpreplay/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-tiff-native = "ftp://ftp.remotesensing.org/pub/libtiff/"
-REGEX_pn-tiff-native = "[hH][rR][eE][fF]=\"ftp://ftp.remotesensing.org:21/pub/libtiff/tiff-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
-REGEX_URI_pn-tslib = "http://sourceforge.net/projects/tslib.berlios/files/"
+REGEX_pn-tiff-native = "ftp://ftp.remotesensing.org:21/pub/libtiff/tiff-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_URI_pn-tslib = "https://github.com/kergoth/tslib/releases"
+REGEX_pn-tslib = "/releases/tag/(?P<pver>((\d+[\.\-_]*)+))"
REGEX_URI_pn-traceroute = "http://sourceforge.net/projects/traceroute/files/traceroute/"
-REGEX_pn-traceroute = "[hH][rR][eE][fF]=\"/projects/traceroute/files/traceroute/traceroute-(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-tslib = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/tslib.berlios/files/tslib\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.bz2/download\""
+REGEX_pn-traceroute = "/projects/traceroute/files/traceroute/traceroute-(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-tunctl = "http://sourceforge.net/projects/tunctl/files/tunctl/"
-REGEX_pn-tunctl = "[hH][rR][eE][fF]=\"/projects/tunctl/files/tunctl/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-tzdata = "[hH][rR][eE][fF]=\"tzdata(?P<pver>((\d+[a-z])+))\.tar\.gz\""
+REGEX_pn-tunctl = "/projects/tunctl/files/tunctl/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-tzdata = "tzdata(?P<pver>((\d+[a-z])+))\.tar\.gz"
REGEX_URI_pn-unzip = "http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/"
-REGEX_pn-unzip = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip(?P<pver>(\d+))\.tar\.gz/download\""
-PRSPV_pn-unzip = "${@d.getVar('PV',1).replace('.','')}"
+REGEX_pn-unzip = "http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip(?P<pver>(\d+))\.tar\.gz/download"
REGEX_URI_pn-unzip-native = "http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/"
-REGEX_pn-unzip-native = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip(?P<pver>(\d+))\.tar\.gz/download\""
-PRSPV_pn-unzip-native = "${@d.getVar('PV',1).replace('.','')}"
+REGEX_pn-unzip-native = "http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip(?P<pver>(\d+))\.tar\.gz/download"
#REGEX_URI_pn-v86d = "http://dev.gentoo.org/~spock/projects/uvesafb/archive/"
-REGEX_pn-v86d = "[hH][rR][eE][fF]=\"v86d\-(?P<pver>((\d+[\.]*)+))\.tar\.bz2\""
+REGEX_pn-v86d = "v86d\-(?P<pver>((\d+[\.]*)+))\.tar\.bz2"
REGEX_URI_pn-vblade = "http://sourceforge.net/projects/aoetools/files/vblade/"
-REGEX_pn-vblade = "[hH][rR][eE][fF]=\"/projects/aoetools/files/vblade/vblade-(?P<pver>((\d+[\.\-_]*)+))\.tgz/stats/timeline\""
+REGEX_pn-vblade = "/projects/aoetools/files/vblade/vblade-(?P<pver>((\d+[\.\-_]*)+))\.tgz/stats/timeline"
REGEX_URI_pn-vsftpd = "https://security.appspot.com/vsftpd.html"
-REGEX_pn-vsftpd = "[hH][rR][eE][fF]=\"https://security.appspot.com/downloads/vsftpd-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz\""
+REGEX_pn-vsftpd = "https://security.appspot.com/downloads/vsftpd-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
REGEX_URI_pn-watchdog = "http://sourceforge.net/projects/watchdog/files/watchdog/"
-REGEX_pn-watchdog = "[hH][rR][eE][fF]=\"/projects/watchdog/files/watchdog/(?P<pver>((\d+[\.\-_]*)+))/\""
+REGEX_pn-watchdog = "/projects/watchdog/files/watchdog/(?P<pver>((\d+[\.\-_]*)+))/"
REGEX_URI_pn-wireless-tools = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
-REGEX_pn-wireless-tools = "[hH][rR][eE][fF]=\"wireless_tools\.(?P<pver>(\d+))\.tar\.gz\""
+REGEX_pn-wireless-tools = "wireless_tools\.(?P<pver>(\d+)(\..*|))\.tar\.gz"
REGEX_URI_pn-x11vnc = "http://sourceforge.net/projects/libvncserver/files/x11vnc/"
-REGEX_pn-x11vnc = "[hH][rR][eE][fF]=\"/projects/libvncserver/files/x11vnc/(?P<pver>((\d+[\.\-_]*)+))/\""
-REGEX_pn-xdg-utils = "[hH][rR][eE][fF]=\"xdg\-utils\-(?P<pver>((\d+[\.\-_]*)+))\.(tar\.gz|tgz)\""
+REGEX_pn-x11vnc = "/projects/libvncserver/files/x11vnc/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_pn-xdg-utils = "xdg\-utils\-(?P<pver>((\d+[\.\-_]*)+))\.(tar\.gz|tgz)"
REGEX_pn-xf86-video-omap = "(?P<pver>(\d+\.(\d\.?)*))"
REGEX_URI_pn-zip = "http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/"
-REGEX_pn-zip = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/zip(?P<pver>(\d+))\.tar\.gz/download\""
-PRSPV_pn-zip = "${@d.getVar('PV',1).replace('.','')}"
+REGEX_pn-zip = "http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/zip(?P<pver>(\d+))\.tar\.gz/download"
REGEX_URI_pn-zip-native = "http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/"
-REGEX_pn-zip-native = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/zip(?P<pver>(\d+))\.tar\.gz/download\""
-PRSPV_pn-zip-native = "${@d.getVar('PV',1).replace('.','')}"
+REGEX_pn-zip-native = "http://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/3.0/zip(?P<pver>(\d+))\.tar\.gz/download"
REGEX_URI_pn-zisofs-tools-native ="http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/"
+REGEX_pn-qt-mobility-embedded="qt-mobility-opensource-src-(?P<pver>((\d+[\.\-_]*)+)).*\.tar\.xz"
+REGEX_URI_pn-qt-mobility-embedded="http://pkgs.fedoraproject.org/repo/pkgs/qt-mobility/"
+REGEX_pn-qt-mobility-x11="qt-mobility-opensource-src-(?P<pver>((\d+[\.\-_]*)+)).*\.tar\.xz"
+REGEX_URI_pn-qt-mobility-x11="http://pkgs.fedoraproject.org/repo/pkgs/qt-mobility/"
+REGEX_pn-expect="/projects/expect/files/Expect/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_URI_pn-expect="http://sourceforge.net/projects/expect/files/Expect/"
+REGEX_pn-gnu-efi="/projects/gnu-efi/files/gnu-efi_(?P<pver>((\d+[\.\-_]*)+).)\.orig\.tar\.gz/"
+REGEX_URI_pn-gnu-efi="http://sourceforge.net/projects/gnu-efi/files/"
+REGEX_pn-python-smartpm="/smart/\+milestone/(?P<pver>((\d+[\.\-_]*)+))"
+REGEX_URI_pn-python-smartpm="https://launchpad.net/smart/trunk/"
+REGEX_URI_pn-libatomics-ops="http://www.hpl.hp.com/research/linux/atomic_ops/download.php4"
+REGEX_URI_pn-sudo="http://www.sudo.ws"
+REGEX_pn-sudo="sudo-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz"
+REGEX_URI_pn-docbook-xsl-stylesheets="http://sourceforge.net/projects/docbook/files/docbook-xsl/"
+REGEX_pn-docbook-xsl-stylesheets="/projects/docbook/files/docbook-xsl/(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_URI_pn-waffle="http://www.waffle-gl.org/releases.html"
+REGEX_URI_pn-qt4-x11-free="http://download.qt-project.org/official_releases/qt/4.8/"
+REGEX_pn-qt4-x11-free="(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_URI_pn-qt4-embedded="http://download.qt-project.org/official_releases/qt/4.8/"
+REGEX_pn-qt4-embedded="(?P<pver>((\d+[\.\-_]*)+))/"
+REGEX_URI_pn-dosfstools="http://daniel-baumann.ch/software/dosfstools/"
+REGEX_pn-midori="midori_(?P<pver>((\d+[\.\-_]*)+))_all_\.tar\.bz2"
+REGEX_URI_pn-midori="http://midori-browser.org/download/source/"
+REGEX_pn-icu="(?P<pver>((\d+[\.\-_]*)+))"
+REGEX_URI_pn-icu="http://download.icu-project.org/files/icu4c/"
+REGEX_URI_pn-pcmciautils="http://mirror.linux.org.au/linux/utils/kernel/pcmcia/"
+REGEX_URI_pn-man="http://www.ibiblio.org/pub/Linux/apps/doctools/man/"
# Regex used to parse tags and extract version
GITTAGREGEX_pn-build-appliance-image = "(?P<pver>(([0-9][\.|_]?)+[0-9]))"
GITTAGREGEX_pn-chkconfig-alternatives-native = "chkconfig\-(?P<pver>((\d+[\.\-_]*)+))"
GITTAGREGEX_pn-remake = "(?P<pver>(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))"
GITTAGREGEX_pn-xf86-video-omap = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-linux-yocto = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-linux-yocto-dev = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-uclibc = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-uclibc-initial = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-mesa = "(?P<pver>(\d+\.(\d\.?)*))"
+GITTAGREGEX_pn-glibc = "(?P<pver>(\d+\.(\d\.?)*))"
diff --git a/meta-yocto/conf/distro/include/poky-floating-revisions.inc b/meta-yocto/conf/distro/include/poky-floating-revisions.inc
index 41dd71fb0f..5b8c3a0ea8 100644
--- a/meta-yocto/conf/distro/include/poky-floating-revisions.inc
+++ b/meta-yocto/conf/distro/include/poky-floating-revisions.inc
@@ -50,23 +50,23 @@ SRCREV_pn-tasks ?= "${AUTOREV}"
SRCREV_pn-ofono ?= "${AUTOREV}"
SRCREV_pn-dri2proto = "${AUTOREV}"
-#PREFERRED_VERSION_dri2proto ?= "1.99.1+git${SRCREV}"
+#PREFERRED_VERSION_dri2proto ?= "1.99.1+git%"
SRCREV_pn-libdrm = "${AUTOREV}"
-#PREFERRED_VERSION_libdrm ?= "2.4.0+git${SRCREV}"
+#PREFERRED_VERSION_libdrm ?= "2.4.0+git%"
SRCREV_pn-libxcb = "${AUTOREV}"
-#PREFERRED_VERSION_libxcb ?= "1.1.90.1+gitr${SRCREV}"
+#PREFERRED_VERSION_libxcb ?= "1.1.90.1+gitr%"
SRCREV_pn-lib-proto = "${AUTOREV}"
-#PREFERRED_VERSION_xcb-proto ?= "1.2+gitr${SRCREV}"
+#PREFERRED_VERSION_xcb-proto ?= "1.2+gitr%"
SRCREV_pn-libxcb-sdk = "${AUTOREV}"
-#PREFERRED_VERSION_libxcb-sdk ?= "1.1.90.1+gitr${SRCREV}"
+#PREFERRED_VERSION_libxcb-sdk ?= "1.1.90.1+gitr%"
SRCREV_pn-xf86-input-evdev = "${AUTOREV}"
#PREFERRED_VERSION_xf86-input-evdev ?= "2.0.4"
SRCREV_pn-xf86-input-mouse = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-mouse ?= "1.3.0+git${SRCREV}"
+#PREFERRED_VERSION_xf86-input-mouse ?= "1.3.0+git%"
SRCREV_pn-xf86-input-keyboard = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-keyboard ?= "1.3.1+git${SRCREV}"
+#PREFERRED_VERSION_xf86-input-keyboard ?= "1.3.1+git%"
SRCREV_pn-xf86-input-synaptics = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-synaptics ?= "0.15.2+git${SRCREV}"
+#PREFERRED_VERSION_xf86-input-synaptics ?= "0.15.2+git%"
#SRCDATE_oprofile ?= "${DATE}"
diff --git a/meta-yocto/conf/distro/include/upstream_tracking.inc b/meta-yocto/conf/distro/include/upstream_tracking.inc
index d80ede480a..7032067263 100644
--- a/meta-yocto/conf/distro/include/upstream_tracking.inc
+++ b/meta-yocto/conf/distro/include/upstream_tracking.inc
@@ -24,14 +24,6 @@
#
RECIPE_UPSTREAM_VERSION_pn-adt-installer = "1.1"
CHECK_DATE_pn-adt-installer = "Sep 11, 2012"
-RECIPE_UPSTREAM_DATE_pn-avahi-ui = "Oct 01, 2010"
-RECIPE_UPSTREAM_VERSION_pn-avahi = "0.6.31"
-RECIPE_UPSTREAM_DATE_pn-avahi = "Oct 01, 2010"
-RECIPE_UPSTREAM_VERSION_pn-bash = "4.2"
-RECIPE_UPSTREAM_DATE_pn-bash = "Dec 01, 2009"
-RECIPE_UPSTREAM_VERSION_pn-bc = "1.06"
-CHECK_DATA_pn-bc = "Jul 27, 2012"
-RECIPE_UPSTREAM_DATE_pn-bc = "Nov 01, 2000"
RECIPE_UPSTREAM_VERSION_pn-bdwgc = "gc-7.2d"
CHECK_DATE_pn-bdwgc = "Aug 27, 2012"
RECIPE_NO_UPDATE_REASON_pn-bluez4 = "BlueZ 5.x is not backward-compatible; components that interact with bluez not updated"
@@ -40,34 +32,10 @@ RECIPE_NO_UPDATE_REASON_pn-cdrtools = "v3.x uses incompatible CDDL license"
RECIPE_UPSTREAM_VERSION_pn-clutter = "1.10.0"
RECIPE_UPSTREAM_DATE_pn-clutter = "Mar 22, 2012"
CHECK_DATE_pn-clutter = "Aug 28, 2012"
-RECIPE_UPSTREAM_VERSION_pn-core-image-minimal = "1.0"
RECIPE_NO_UPDATE_REASON_pn-createrepo = "Versions after 0.9.* use YUM, so we hold at 0.4.11"
-RECIPE_UPSTREAM_VERSION_pn-cups = "1.6.2"
-RECIPE_UPSTREAM_DATE_pn-cups = "Mar 18, 2013"
-CHECK_DATE_pn-cups = "Jun 11, 2013"
RECIPE_NO_UPDATE_REASON_pn-db= "API compatibility issue"
-RECIPE_NO_UPDATE_REASON_pn-dbus = "D-BUS 1.7.x is the development version, not stable."
-RECIPE_NO_UPDATE_REASON_pn-docbook-sgml-dtd-3.1-native = "PRS Reports Incorrectly"
-RECIPE_NO_UPDATE_REASON_pn-docbook-sgml-dtd-4.1-native = "PRS Reports Incorrectly"
-RECIPE_NO_UPDATE_REASON_pn-docbook-sgml-dtd-4.5-native = "PRS Reports Incorrectly"
-RECIPE_UPSTREAM_VERSION_pn-eee-acpi-scripts = "1.1.12+9d4cdedca25b396405f8587f9c4fbf8229e041c2"
-RECIPE_UPSTREAM_DATE_pn-eee-acpi-scripts = "Oct 3, 2011"
-CHECK_DATE_pn-eee-acpi-scripts = "Aug 28, 2012"
-RECIPE_UPSTREAM_VERSION_pn-formfactor = "0.0"
-RECIPE_UPSTREAM_DATE_pn-formfactor = "n/a"
-RECIPE_UPSTREAM_VERSION_pn-fstests="0.0+svnr426"
-CHECK_DATE_pn-fstests = "Jul 06, 2011"
-RECIPE_UPSTREAM_VERSION_pn-gaku="0.0+svnr399"
+RECIPE_NO_UPDATE_REASON_pn-dbus = "D-BUS 1.9.x is the development version, not stable."
RECIPE_NO_UPDATE_REASON_pn-gawk = "Version 4.1.0 requires Automake 1.13, but have 1.12.6"
-RECIPE_UPSTREAM_DATE_pn-gaku="Jul 03, 2008"
-CHECK_DATE_pn-gaku = "Aug 29, 2012"
-RECIPE_UPSTREAM_VERSION_pn-gdk-pixbuf = "2.27.2"
-RECIPE_UPSTREAM_DATE_pn-gdk-pixbuf = "Mar 3, 2013"
-CHECK_DATE_pn-gdk-pixbuf = "Mar 5, 2013"
-RECIPE_NO_UPDATE_REASON_pn-gdk-pixbuf = "2.27.2 is unstable"
-RECIPE_UPSTREAM_VERSION_pn-glibc = "2.11.2"
-RECIPE_UPSTREAM_DATE_pn-glibc = "May 01, 2010"
-RECIPE_NO_UPDATE_REASON_pn-glibc = "two glibc plugins are based on 2.10.1"
RECIPE_NO_UPDATE_REASON_pn-glib-networking = "Pending Glib-2.0 Update"
RECIPE_UPSTREAM_VERSION_pn-gnome-desktop = "3.7.90"
RECIPE_UPSTREAM_DATE_pn-gnome-desktop = "Feb 19, 2013"
@@ -83,65 +51,36 @@ CHECK_DATE_pn-gnome-keyring = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-gnome-keyring = "waiting for the sato gtk3 port"
RECIPE_NO_UPDATE_REASON_pn-gobject_introspection = "Does not cross-compile"
RECIPE_NO_UPDATE_REASON_pn-groff = "1.18.1.4 is latest GPLv2 Version no 1.21"
-RECIPE_NO_UPDATE_REASON_pn-grub="grub2 is a different thing"
+RECIPE_NO_UPDATE_REASON_pn-bash = "The latest version in yocto is 4.3.30"
RECIPE_UPSTREAM_DATE_pn-gst-meta-base="n/a"
RECIPE_NO_UPDATE_REASON_pn-gst-plugins-base = "not compatible with gst-fluendo 0.10.x"
-RECIPE_NO_UPDATE_REASON_pn-gst-ffmpeg = "not compatible with gst-fluendo 0.10.x"
RECIPE_NO_UPDATE_REASON_pn-gst-plugins-bad = "not compatible with gst-fluendo 0.10.x"
RECIPE_NO_UPDATE_REASON_pn-gst-plugins-good = "not compatible with gst-fluendo 0.10.x"
-RECIPE_NO_UPDATE_REASON_pn-gst-plugins-ugly = "not compatible with gst-fluendo 0.10.x"
RECIPE_NO_UPDATE_REASON_pn-gstreamer=" not compatible with gst-fluendo 0.10.x "
RECIPE_NO_UPDATE_REASON_pn-gtk+ = "Do not upgrade to version: 2.99.2 because prefer stable tree"
-RECIPE_NO_UPDATE_REASON_pn-gtk-doc-stub = "PRS Reports Incorrectly"
RECIPE_UPSTREAM_VERSION_pn-gtk-engines = "2.91.1"
RECIPE_UPSTREAM_DATE_pn-gtk-engines = "Oct 9, 2010"
CHECK_DATE_pn-gtk-engines = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-gtk-engines = "2.91.1 is a 3.0 beta release"
-RECIPE_UPSTREAM_VERSION_pn-icu = "4.8.1.1"
-RECIPE_UPSTREAM_DATE_pn-icu = "Oct 10, 2011"
-CHECK_DATE_pn-icu = "Aug 29, 2012"
RECIPE_UPSTREAM_VERSION_pn-initscripts = "9.40"
RECIPE_UPSTREAM_DATE_pn-initscripts = "Aug 06, 2012"
CHECK_DATE_pn-initscripts = "Aug 29, 2012"
-RECIPE_UPSTREAM_VERSION_pn-inputproto = "2.2.99.1"
-RECIPE_UPSTREAM_DATE_pn-inputproto = "Jan 5, 2013"
-CHECK_DATE_pn-inputproto = "Mar 5, 2013"
-RECIPE_NO_UPDATE_REASON_pn-inputproto = "2.2.99.1 is unstable"
RECIPE_UPSTREAM_VERSION_pn-jpeg = "9"
RECIPE_UPSTREAM_DATE_pn-jpeg = "Jan 13, 2013"
CHECK_DATE_pn-jpeg = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-jpeg = "webkit-gtk 1.8.3 doesn't work with jpeg 9"
-RECIPE_NO_UPDATE_REASON_pn-kconfig-frontends = "PRS Reports Incorrectly"
RECIPE_NO_UPDATE_REASON_pn-kernelshark = "0.2 is the latest version."
-RECIPE_UPSTREAM_VERSION_pn-keymaps = "1.0"
-RECIPE_UPSTREAM_DATE_pn-keymaps = "n/a"
-RECIPE_UPSTREAM_VERSION_pn-kmod = "9"
-RECIPE_UPSTREAM_DATE_pn-kmod = "Jun 19, 2012"
-CHECK_DATE_pn-kmod = "Jul 27, 2012"
RECIPE_NO_UPDATE_REASON_pn-liberation-fonts = "2.00.0 - fontforge package required "
RECIPE_UPSTREAM_VERSION_pn-libgnome-keyring = "3.7.91"
RECIPE_UPSTREAM_DATE_pn-libgnome-keyring = "Mar 4, 2013"
CHECK_DATE_pn-libgnome-keyring = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-libgnome-keyring = "waiting for the sato gtk3 port"
-RECIPE_UPSTREAM_VERSION_pn-libiconv = "1.14"
-RECIPE_UPSTREAM_DATE_pn-libiconv = "Aug 07, 2011"
-CHECK_DATE_pn-libiconv = "Aug 30, 2012"
RECIPE_NO_UPDATE_REASON_pn-libnl = "libnl-3.2.2 is incompatible with libnl2, so no Upgrade"
RECIPE_UPSTREAM_VERSION_pn-libsoup = "2.41.90"
-RECIPE_UPSTREAM_VERSION_pn-libpng = "1.6.6"
-RECIPE_UPSTREAM_DATE_pn-libpng = "Sep 16, 2013"
-CHECK_DATE_pn-libpng = "Oct 02, 2013"
-RECIPE_UPSTREAM_VERSION_pn-libpng12 = "1.2.50"
-RECIPE_UPSTREAM_DATE_pn-libpng12 = "Jul 10, 2012"
-CHECK_DATE_pn-libpng12 = "Oct 02, 2013"
RECIPE_UPSTREAM_DATE_pn-libsoup = "Feb 19, 2013"
CHECK_DATE_pn-libsoup = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-libsoup = "2.41.90 is unstable"
-RECIPE_NO_UPDATE_REASON_pn-libtheora = "1.1.1 is latest stable release not 1.2.0alpha1"
RECIPE_NO_UPDATE_REASON_pn-libunique = "Do not upgrade to version: 2.91.4 because it requires gtk+ >= 2.90.0 and the stable version of gtk+ used by poky is 2.20.1"
-RECIPE_UPSTREAM_VERSION_pn-liburcu = "0.7.0"
-RECIPE_UPSTREAM_DATE_pn-liburcu = "May 25, 2012"
-CHECK_DATE_pn-liburcu = "Aug 30, 2012"
RECIPE_UPSTREAM_VERSION_pn-libusb = "1.0.9"
RECIPE_UPSTREAM_DATE_pn-libusb = "Apr 20, 2012"
CHECK_DATE_pn-libusb = "Aug 30, 2012"
@@ -149,64 +88,35 @@ RECIPE_UPSTREAM_DATE_pn-linuxdoc-tools-native = "Nov 22, 2009"
RECIPE_UPSTREAM_VERSION_pn-linuxdoc-tools-native = "0.9.66"
CHECK_DATE_pn-linuxdoc-tools-native = "Aug 31, 2012"
RECIPE_NO_UPDATE_REASON-libxml2 = "only release candidates available "
-RECIPE_UPSTREAM_VERSION_pn-lsbtest = "1.0"
-RECIPE_UPSTREAM_VERSION_pn-meta-ide-support = "check"
-RECIPE_UPSTREAM_VERSION_pn-minicom = "2.6.2"
-RECIPE_UPSTREAM_DATE_pn-minicom = "Feb 06, 2013"
-CHECK_DATE_pn-minicom = "Oct 22, 2013"
+CHECK_DATE_pn-lsof = "Dec 16, 2014"
+RECIPE_UPSTREAM_VERSION_pn-lz4 = "r123"
+RECIPE_UPSTREAM_DATE_pn-lz4 = "Aug 28, 2014"
+CHECK_DATE_pn-lz4 = "Aug 30, 2014"
RECIPE_UPSTREAM_DATE_pn-module-init-tools = "Jun 02, 2011"
RECIPE_UPSTREAM_VERSION_pn-module-init-tools = "3.15"
CHECK_DATE_pn-module-init-tools = "Aug 31, 2012"
-RECIPE_UPSTREAM_DATE_pn-modutils-initscripts = "n/a"
-RECIPE_NO_UPDATE_REASON_pn-mpeg2dec = "Why are we currently at 0.4.1?"
RECIPE_NO_UPDATE_REASON_pn-mx-1.0 = "PRS 1.99 is dev version"
-RECIPE_UPSTREAM_VERSION_pn-ofono = "1.6"
-RECIPE_UPSTREAM_DATE_pn-ofono="Apr 20, 2012"
-CHECK_DATE_pn-ofono = "Aug 31, 2012"
-RECIPE_NO_UPDATE_REASON_pn-openssl = "1.0.1 is beta 1.0.0c is latest"
-RECIPE_UPSTREAM_DATE_pn-opkg-collateral = "n/a"
-RECIPE_UPSTREAM_VERSION_pn-opkg = "0.1.8"
-RECIPE_NO_UPDATE_REASON_pn-oprofileui-server = "PRS Reports Incorrectly"
-CHECK_DATE_pn-opkg = "Aug 31, 2012"
-RECIPE_UPSTREAM_DATE_pn-opkg = "Feb 01, 2010"
+CHECK_DATE_pn-nettle = "Aug 21, 2014"
+RECIPE_NO_UPDATE_REASON_pn-nettle = "3.0.0 breaks gnutls, api changes"
RECIPE_NO_UPDATE_REASON_pn-pkgconfig = "removes glib-conf, adds circular depends"
-RECIPE_UPSTREAM_VERSION_pn-pointercal = "0.0"
-RECIPE_UPSTREAM_DATE_pn-pointercal = "n/a"
RECIPE_UPSTREAM_DATE_pn-poky-feed-config-opkg = "n/a"
RECIPE_UPSTREAM_DATE_pn-polkit = "Jan 09, 2013"
RECIPE_UPSTREAM_VERSION_pn-polkit = "0.110"
CHECK_DATE_pn-polkit = "Mar 14, 2013"
RECIPE_NO_UPDATE_REASON_pn-polkit = "requires spidermonkey 1.8.5, not available in poky"
-RECIPE_UPSTREAM_VERSION_pn-pong-clock = "1.0"
-RECIPE_NO_UPDATE_REASON_pn-powertop = "Do not upgrade to version 1.97 since it's a beta release of the comming PowerTOP 2.0"
-RECIPE_UPSTREAM_VERSION_pn-ppp-dialin = "check"
-RECIPE_UPSTREAM_VERSION_pn-prelink="1.0+git1+9552f214c7faa816fdb55b289a457f0cab034f00"
+RECIPE_NO_UPDATE_REASON_pn-python-distribute = "0.7.3 only upgrades 0.6.32, can't install on its own, also obsolete"
+RECIPE_UPSTREAM_VERSION_pn-python-distribute = "0.7.3"
RECIPE_NO_UPDATE_REASON_pn-python-pygobject = "Newer versions of python-pygobject depend on gobject-introspection which doesn't cross-compile"
-CHECK_DATE_pn-prelink = "Aug 31, 2012"
+RECIPE_UPSTREAM_VERSION_pn-python-pygobject = "3.13.3"
RECIPE_UPSTREAM_DATE_pn-qemu-helper-native = "n/a"
RECIPE_NO_UPDATE_REASON_pn-qemugl = "Do not upgrade to version: 33466cd8 because the upstream is broken in x86_64 build"
-RECIPE_UPSTREAM_VERSION_pn-rpm = "5.4.10"
-RECIPE_UPSTREAM_DATE_pn-rpm = "Jul 06, 2012"
-CHECK_DATE_pn-rpm = "Sep 03, 2012"
-RECIPE_UPSTREAM_VERSION_pn-run-postinsts = "check"
-RECIPE_NO_UPDATE_REASON_pn-sato-screenshot = "PRS Reports Incorrectly"
-RECIPE_NO_UPDATE_REASON_pn-socat = "2.0.0 is beta"
-RECIPE_UPSTREAM_VERSION_pn-sqlite3 = "3.8.0.2"
-RECIPE_UPSTREAM_DATE_pn-sqlite3 = "Sep 03, 2013"
-CHECK_DATE_pn-sqlite3= "Oct 02, 2013"
-RECIPE_UPSTREAM_VERSION_pn-squashfs-tools = "4.2"
-RECIPE_UPSTREAM_DATE_pn-squashfs-tools = "Feb 28, 2011"
-CHECK_DATE_pn-squashfs-tools = "Nov 09, 2012"
RECIPE_NO_UPDATE_REASON_pn-syslinux="Waiting for 4.06 for 3.3 kernel headers support"
RECIPE_NO_UPDATE_REASON_pn-texinfo = "Checking script parses directory wrong"
RECIPE_UPSTREAM_VERSION_pn-tinylogin = "1.4"
CHECK_DATE_pn-tinylogin = "Sep 03, 2012"
RECIPE_UPSTREAM_DATE_pn-tinylogin = "Jan 03, 2003"
RECIPE_NO_UPDATE_REASON_pn-tinylogin = "TinyLogin was merged into BusyBox."
-RECIPE_UPSTREAM_VERSION_pn-tremor="20120122"
-RECIPE_UPSTREAM_DATE_pn-tremor="Jan 22, 2012"
-CHECK_DATE_pn-tremor = "Mar 11, 2013"
-RECIPE_NO_UPDATE_REASON_pn-tremor = "Same revision on different SVN modules"
+
RECIPE_UPSTREAM_VERSION_pn-ubootchart = "0.0+r12"
CHECK_DATE_pn-ubootchart = "Sep 11, 2012"
RECIPE_UPSTREAM_DATE_pn-udev-extraconf = "n/a"
@@ -216,10 +126,6 @@ CHECK_DATE_pn-unifdef-native = "Sep 03, 2012"
RECIPE_UPSTREAM_VERSION_pn-unzip = "6.0"
RECIPE_UPSTREAM_DATE_pn-unzip = "Apr 25, 2009"
CHECK_DATE_pn-unzip = "Sep 03, 2012"
-RECIPE_UPSTREAM_VERSION_pn-usbinit = "n/a"
-RECIPE_UPSTREAM_VERSION_pn-usbutils = "006"
-RECIPE_UPSTREAM_DATE_pn-usbutils = "Jul 06, 2012"
-CHECK_DATE_pn-usbutils = "Sep 03, 2012"
RECIPE_NO_UPDATE_REASON_pn-vte = "Pending Glib-2.0 Update"
RECIPE_UPSTREAM_VERSION_pn-webkit-gtk = "1.10.2"
RECIPE_UPSTREAM_DATE_pn-webkit-gtk = "Dec 12, 2012"
@@ -227,17 +133,39 @@ CHECK_DATE_pn-webkit-gtk = "Mar 5, 2013"
RECIPE_NO_UPDATE_REASON_pn-webkit-gtk = ">= 1.10.2 needs ruby"
RECIPE_UPSTREAM_DATE_pn-x11-common="Sep 22, 2008"
RECIPE_UPSTREAM_VERSION_pn-x11-common = "1:7.6"
-CHECK_DAte_pn-x11-common = "Sep 03, 2012"
+CHECK_DATE_pn-x11-common = "Sep 03, 2012"
RECIPE_NO_UPDATE_REASON_pn-xdg-utils = "only release candidates available "
-RECIPE_UPSTREAM_VERSION_pn-xev = "1.0.4"
-RECIPE_UPSTREAM_DATE_pn-xev = "Oct 13, 2009"
-CHECK_DATE_pn-xev = "Sep 04, 2012"
RECIPE_UPSTREAM_DATE_pn-xorg-minimal-fonts = "n/a"
RECIPE_UPSTREAM_DATE_pn-xserver-nodm-init=""
-RECIPE_UPSTREAM_VERSION_pn-xz = "5.0.4"
-RECIPE_UPSTREAM_DATE_pn-xz = "unknown"
-CHECK_DATE_pn-xz = "Sep 04, 2012"
RECIPE_NO_UPDATE_REASON_pn-zaurusd = "SVN rev 426 is last Stable release"
RECIPE_UPSTREAM_VERSION_pn-zip = "3.0"
RECIPE_UPSTREAM_DATE_pn-zip = "Sep 01, 2009"
CHECK_DATE_pn-zip = "Sep 04, 2012"
+
+# GIT don't have tag
+RECIPE_UPSTREAM_VERSION_pn-x264 = "r2491"
+RECIPE_UPSTREAM_DATE_pn-x264 = "Nov 13, 2014"
+CHECK_DATE_pn-x264 = "Dec 17, 2014"
+
+RECIPE_UPSTREAM_VERSION_pn-mobile-broadband-provider-info = "20140618"
+RECIPE_UPSTREAM_DATE_pn-mobile-broadband-provider-info = "Jun 18, 2014"
+CHECK_DATE_pn-mobile-broadband-provider-info = "Dec 17, 2014"
+
+# SVN support isn't implemented
+RECIPE_UPSTREAM_VERSION_pn-tremor="20120314"
+RECIPE_UPSTREAM_DATE_pn-tremor="Jan 22, 2012"
+CHECK_DATE_pn-tremor = "Mar 11, 2013"
+RECIPE_NO_UPDATE_REASON_pn-tremor = "Same revision on different SVN modules"
+
+RECIPE_UPSTREAM_VERSION_pn-puzzles="r10286"
+RECIPE_UPSTREAM_DATE_pn-puzzles="Oct 20, 2014"
+CHECK_DATE_pn-puzzles = "Dec 18, 2014"
+
+RECIPE_UPSTREAM_VERSION_pn-unfs3="0.9.22.r494"
+RECIPE_UPSTREAM_DATE_pn-unfs3="Mar 14, 2014"
+CHECK_DATE_pn-unfs3 = "Dec 18, 2014"
+
+# Incompatible version format
+RECIPE_UPSTREAM_VERSION_pn-sqlite3="3.8.7.4"
+RECIPE_UPSTREAM_DATE_pn-sqlite3="Jan 22, 2012"
+CHECK_DATE_pn-sqlite3 = "Mar 11, 2013"
diff --git a/meta-yocto/conf/distro/poky-lsb.conf b/meta-yocto/conf/distro/poky-lsb.conf
index b0c2cf87f5..a9030a262e 100644
--- a/meta-yocto/conf/distro/poky-lsb.conf
+++ b/meta-yocto/conf/distro/poky-lsb.conf
@@ -11,4 +11,5 @@ PREFERRED_PROVIDER_virtual/libx11 = "libx11"
# Ensure the kernel nfs server is enabled
KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
-
+# Use the LTSI Kernel for LSB Testing
+PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "3.10%"
diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
index 335049103f..75508c107f 100644
--- a/meta-yocto/conf/distro/poky-tiny.conf
+++ b/meta-yocto/conf/distro/poky-tiny.conf
@@ -49,7 +49,9 @@ TCLIBCAPPEND = ""
# Disable wide char support for ncurses as we don't include it in
# in the LIBC features below.
-ENABLE_WIDEC="false"
+# Leave native enable to avoid build failures
+ENABLE_WIDEC = "false"
+ENABLE_WIDEC_class-native = "true"
# Drop native language support. This removes the
# eglibc->bash->gettext->libc-posix-clang-wchar dependency.
@@ -91,6 +93,8 @@ DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \
# Enable LFS - see bug YOCTO #5865
DISTRO_FEATURES_append_libc-uclibc = " largefile"
+DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
+
# Use tmpdevfs and the busybox runtime services
VIRTUAL-RUNTIME_dev_manager = ""
VIRTUAL-RUNTIME_login_manager = ""
@@ -119,7 +123,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
# this script for the purposes of tiny, remove the dependency from here.
RDEPENDS_${PN}-mtrace_pn-eglibc = ""
-INHERIT += "blacklist"
PNBLACKLIST[build-appliance-image] = "not buildable with poky-tiny"
PNBLACKLIST[core-image-base] = "not buildable with poky-tiny"
PNBLACKLIST[core-image-clutter] = "not buildable with poky-tiny"
diff --git a/meta-yocto/conf/distro/poky.conf b/meta-yocto/conf/distro/poky.conf
index e7e1948b03..479182f56c 100644
--- a/meta-yocto/conf/distro/poky.conf
+++ b/meta-yocto/conf/distro/poky.conf
@@ -1,7 +1,7 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
-DISTRO_VERSION = "1.6+snapshot-${DATE}"
-DISTRO_CODENAME = "next"
+DISTRO_VERSION = "1.7"
+DISTRO_CODENAME = "dizzy"
SDK_VENDOR = "-pokysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -30,13 +30,12 @@ PREFERRED_VERSION_linux-yocto_qemuppc ?= "3.14%"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
-EXTRAOPKGCONFIG = "poky-feed-config-opkg"
-
DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"
-POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}"
+POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "packagegroup-core-device-devel",d)}"
DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemuarm64 = " ${POKYQEMUDEPS}"
DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}"
DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}"
DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}"
@@ -44,8 +43,8 @@ DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
TCLIBCAPPEND = ""
-QEMU_TARGETS ?= "arm i386 mips mipsel ppc x86_64"
-# Other QEMU_TARGETS "mips64 mips64el sh4"
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 ppc x86_64"
+# Other QEMU_TARGETS "mips64el sh4"
PREMIRRORS ??= "\
bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
@@ -73,22 +72,16 @@ CONNECTIVITY_CHECK_URIS ?= " \
http://bugzilla.yoctoproject.org/report.cgi"
SANITY_TESTED_DISTROS ?= " \
- Poky-1.4 \n \
- Poky-1.5 \n \
- Poky-1.6 \n \
+ poky-1.6 \n \
+ poky-1.7 \n \
Ubuntu-12.04 \n \
- Ubuntu-13.10 \n \
Ubuntu-14.04 \n \
- Fedora-19 \n \
+ Ubuntu-14.10 \n \
Fedora-20 \n \
- CentOS-6.4 \n \
- CentOS-6.5 \n \
- Debian-7.0 \n \
- Debian-7.1 \n \
- Debian-7.2 \n \
- Debian-7.3 \n \
- Debian-7.4 \n \
- SUSE-LINUX-12.2 \n \
+ CentOS-6.* \n \
+ CentOS-7.* \n \
+ Debian-7.* \n \
+ Debian-8.* \n \
openSUSE-project-12.3 \n \
openSUSE-project-13.1 \n \
"
@@ -101,16 +94,14 @@ BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
# that breaks the format and have been previously discussed on the mailing list
# with general agreement from the core team.
#
-OELAYOUT_ABI = "8"
+OELAYOUT_ABI = "10"
# add poky sanity bbclass
INHERIT += "poky-sanity"
# QA check settings - a little stricter than the OE-Core defaults
-WARN_QA = "textrel files-invalid incompatible-license xorg-driver-abi libdir \
- unknown-configure-option"
-ERROR_QA = "dev-so debug-deps dev-deps debug-files arch pkgconfig la perms \
- useless-rpaths rpaths staticdev ldflags pkgvarcheck already-stripped \
- compile-host-path dep-cmp installed-vs-shipped install-host-path \
- packages-list perm-config perm-line perm-link pkgv-undefined \
- pn-overrides split-strip var-undefined version-going-backwards"
+WARN_TO_ERROR_QA = "already-stripped compile-host-path install-host-path \
+ installed-vs-shipped ldflags pn-overrides rpaths staticdev \
+ useless-rpaths"
+WARN_QA_remove = "${WARN_TO_ERROR_QA}"
+ERROR_QA_append = " ${WARN_TO_ERROR_QA}"
diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
index bcb086481c..a1d99f913e 100644
--- a/meta-yocto/conf/local.conf.sample
+++ b/meta-yocto/conf/local.conf.sample
@@ -12,34 +12,13 @@
# variable as required.
#
-# Parallelism Options
-#
-# These two options control how much parallelism BitBake should use. The first
-# option determines how many tasks bitbake should run in parallel:
-#
-#BB_NUMBER_THREADS ?= "4"
-#
-# Default to setting automatically based on cpu count
-BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
-#
-# The second option controls how many processes make should run in parallel when
-# running compile tasks:
-#
-#PARALLEL_MAKE ?= "-j 4"
-#
-# Default to setting automatically based on cpu count
-PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
-#
-# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
-# be appropriate for example.
-
-#
# Machine Selection
#
# You need to select a specific machine to target the build with. There are a selection
# of emulated machines available which can boot and run in the QEMU emulator:
#
#MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
#MACHINE ?= "qemumips"
#MACHINE ?= "qemuppc"
#MACHINE ?= "qemux86"
@@ -242,8 +221,8 @@ BB_DISKMON_DIRS = "\
# By default qemu will build with a builtin VNC server where graphical output can be
# seen. The two lines below enable the SDL backend too. This assumes there is a
# libsdl library available on your build system.
-PACKAGECONFIG_pn-qemu-native = "sdl"
-PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
+PACKAGECONFIG_append_pn-qemu-native = " sdl"
+PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
index b156319163..ccdd326827 100644
--- a/meta-yocto/conf/local.conf.sample.extended
+++ b/meta-yocto/conf/local.conf.sample.extended
@@ -2,8 +2,31 @@
# certain recipes.
#BBMASK = ""
-# eglibc configurability is used to reduce minimal image's size.
-# the all supported eglibc options are listed in DISTRO_FEATURES_LIBC
+#
+# Parallelism Options
+#
+# These two options control how much parallelism BitBake should use. The first
+# option determines how many tasks bitbake should run in parallel:
+#
+#BB_NUMBER_THREADS ?= "4"
+#
+# Default to setting automatically based on cpu count
+#BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+#
+# The second option controls how many processes make should run in parallel when
+# running compile tasks:
+#
+#PARALLEL_MAKE ?= "-j 4"
+#
+# Default to setting automatically based on cpu count
+#PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+#
+# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
+# be appropriate for example.
+
+
+# glibc configurability is used to reduce minimal image's size.
+# the all supported glibc options are listed in DISTRO_FEATURES_LIBC
# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
# and DISTRO_FEATURES definitions to local.conf to enable the options.
#DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
@@ -122,6 +145,13 @@
#MULTILIBS = "multilib:lib32"
#DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+# Set RPM_PREFER_ELF_ARCH to configure preferred ABI when using rpm packaging
+# backend to generate a rootfs, choices are:
+# 1: ELF32 wins
+# 2: ELF64 wins
+# 4: ELF64 N32 wins (for mips64 or mips64el only)
+#RPM_PREFER_ELF_ARCH ?= "2"
+
# The network based PR service host and port
# Uncomment the following lines to enable PRservice.
# Set PRSERV_HOST to 'localhost:0' to automatically
@@ -252,7 +282,7 @@
#useradd -p '' tester; \
#groupadd developers; \
#userdel nobody; \
-#groupdel -g video; \
+#groupdel video; \
#groupmod -g 1020 developers; \
#usermod -s /bin/sh tester; \
#"
@@ -331,3 +361,14 @@
# feed layout is used where package files are placed in <outdir>/<arch>/.
#
#IPK_HIERARCHICAL_FEED = "1"
+#
+
+# Using RPM4
+#
+# Currently the rootfs_rpm code has a hard depends on rpmresolve:do_populate_sysroot,
+# when using rpm4 the rpmresolve code will not compile due to a missing header file.
+# That dependency needs to be removed when using RPM4, also the PREFRRED_VERSION needs
+# to be set. This example shows how to enable rpm4
+# PREFERRED_VERSION_rpm = "4.11.2"
+# PREFERRED_VERSION_rpm-native = "4.11.2"
+# RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"
diff --git a/meta-yocto/conf/toasterconf.json b/meta-yocto/conf/toasterconf.json
new file mode 100644
index 0000000000..51dbc8cdc9
--- /dev/null
+++ b/meta-yocto/conf/toasterconf.json
@@ -0,0 +1,104 @@
+{
+ "config": {
+ "MACHINE" : "qemux86",
+ "DISTRO" : "poky",
+ "IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
+ "IMAGE_INSTALL_append": "",
+ "PACKAGE_CLASSES": "package_rpm",
+ "SDKMACHINE" : "x86_64"
+ },
+ "layersources": [
+ {
+ "name": "Local Yocto Project",
+ "sourcetype": "local",
+ "apiurl": "../../",
+ "branches": ["HEAD", "master", "dizzy"],
+ "layers": [
+ {
+ "name": "openembedded-core",
+ "local_path": "meta",
+ "vcs_url": "remote:origin",
+ "dirpath": "meta"
+ },
+ {
+ "name": "meta-yocto",
+ "local_path": "meta-yocto",
+ "vcs_url": "remote:origin",
+ "dirpath": "meta-yocto"
+ },
+ {
+ "name": "meta-yocto-bsp",
+ "local_path": "meta-yocto-bsp",
+ "vcs_url": "remote:origin",
+ "dirpath": "meta-yocto-bsp"
+ }
+
+ ]
+ },
+ {
+ "name": "OpenEmbedded",
+ "sourcetype": "layerindex",
+ "apiurl": "http://layers.openembedded.org/layerindex/api/",
+ "branches": ["master", "dizzy"]
+ },
+ {
+ "name": "Imported layers",
+ "sourcetype": "imported",
+ "apiurl": "",
+ "branches": ["master", "dizzy", "HEAD"]
+
+ }
+ ],
+ "bitbake" : [
+ {
+ "name": "master",
+ "giturl": "remote:origin",
+ "branch": "master",
+ "dirpath": "bitbake"
+ },
+ {
+ "name": "dizzy",
+ "giturl": "remote:origin",
+ "branch": "dizzy",
+ "dirpath": "bitbake"
+ },
+ {
+ "name": "HEAD",
+ "giturl": "remote:origin",
+ "branch": "HEAD",
+ "dirpath": "bitbake"
+ }
+ ],
+
+ "defaultrelease": "master",
+
+ "releases": [
+ {
+ "name": "master",
+ "description": "Yocto Project master",
+ "bitbake": "master",
+ "branch": "master",
+ "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+ "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds using the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\">Yocto Project master branch</a>, where active development takes place. This is not a stable branch, so your builds might not work as expected."
+ },
+ {
+ "name": "dizzy",
+ "description": "Yocto Project 1.7 Dizzy",
+ "bitbake": "dizzy",
+ "branch": "dizzy",
+ "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+ "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds with the <a href=\"https://www.yoctoproject.org/downloads/core/dizzy1\">Yocto Project 1.7 \"Dizzy\"</a> release"
+ },
+ {
+ "name": "local",
+ "description": "Local Yocto Project",
+ "bitbake": "HEAD",
+ "branch": "HEAD",
+ "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+ "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer."
+ }
+ ]
+}
diff --git a/meta-yocto/recipes-core/tiny-init/tiny-init.bb b/meta-yocto/recipes-core/tiny-init/tiny-init.bb
index 5d90051b1d..4d4e34dc8b 100644
--- a/meta-yocto/recipes-core/tiny-init/tiny-init.bb
+++ b/meta-yocto/recipes-core/tiny-init/tiny-init.bb
@@ -11,6 +11,8 @@ SRC_URI = "file://init \
file://rc.local.sample \
"
+S = "${WORKDIR}"
+
do_configure() {
:
}
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index d41dd4bee8..4bc99272c4 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -28,9 +28,16 @@ python () {
d.setVar("SDK_ARCH", "none")
d.setVar("SDK_CC_ARCH", "none")
+ # Avoid this being unnecessarily different due to nuances of
+ # the target machine that aren't important for "all" arch
+ # packages.
+ d.setVar("LDFLAGS", "")
+
# No need to do shared library processing or debug symbol handling
d.setVar("EXCLUDE_FROM_SHLIBS", "1")
d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
d.setVar("INHIBIT_PACKAGE_STRIP", "1")
+ elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
+ bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE", True))
}
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index efd413bdc4..b598aa3ad6 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -136,7 +136,7 @@ python do_ar_original() {
bb.note('Archiving the original source...')
fetch = bb.fetch2.Fetch([], d)
for url in fetch.urls:
- local = fetch.localpath(url)
+ local = fetch.localpath(url).rstrip("/");
if os.path.isfile(local):
shutil.copy(local, ar_outdir)
elif os.path.isdir(local):
@@ -146,7 +146,12 @@ python do_ar_original() {
fetch.unpack(tmpdir, (url,))
os.chdir(tmpdir)
- tarname = os.path.join(ar_outdir, basename + '.tar.gz')
+ # We eliminate any AUTOINC+ in the revision.
+ try:
+ src_rev = bb.fetch2.get_srcrev(d).replace('AUTOINC+','')
+ except:
+ src_rev = 'NOREV'
+ tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
tar = tarfile.open(tarname, 'w:gz')
tar.add('.')
tar.close()
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 19edc54f6d..402ee1bf01 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -109,7 +109,12 @@ autotools_preconfigure() {
else
# At least remove the .la files since automake won't automatically
# regenerate them even if CFLAGS/LDFLAGS are different
- cd ${S}; find ${S} -name \*.la -delete
+ cd ${S}
+ if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
+ echo "Running \"${MAKE} clean\" in ${S}"
+ ${MAKE} clean
+ fi
+ find ${S} -name \*.la -delete
fi
fi
fi
@@ -135,23 +140,59 @@ python autotools_copy_aclocals () {
return
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ #bb.warn(str(taskdepdata))
pn = d.getVar("PN", True)
aclocaldir = d.getVar("ACLOCALDIR", True)
oe.path.remove(aclocaldir)
bb.utils.mkdirhier(aclocaldir)
+ start = None
configuredeps = []
+
for dep in taskdepdata:
data = taskdepdata[dep]
- if data[1] == "do_configure" and data[0] != pn:
- configuredeps.append(data[0])
+ if data[1] == "do_configure" and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+
+ # We need to find configure tasks which are either from <target> -> <target>
+ # or <native> -> <native> but not <target> -> <native> unless they're direct
+ # dependencies. This mirrors what would get restored from sstate.
+ done = [dep]
+ next = [dep]
+ while next:
+ new = []
+ for dep in next:
+ data = taskdepdata[dep]
+ for datadep in data[3]:
+ if datadep in done:
+ continue
+ done.append(datadep)
+ if (not data[0].endswith("-native")) and taskdepdata[datadep][0].endswith("-native") and dep != start:
+ continue
+ new.append(datadep)
+ if taskdepdata[datadep][1] == "do_configure":
+ configuredeps.append(taskdepdata[datadep][0])
+ next = new
+
+ #configuredeps2 = []
+ #for dep in taskdepdata:
+ # data = taskdepdata[dep]
+ # if data[1] == "do_configure" and data[0] != pn:
+ # configuredeps2.append(data[0])
+ #configuredeps.sort()
+ #configuredeps2.sort()
+ #bb.warn(str(configuredeps))
+ #bb.warn(str(configuredeps2))
cp = []
for c in configuredeps:
if c.endswith("-native"):
manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
elif c.startswith("nativesdk-"):
- manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}-%s.populate_sysroot" % c)
- elif "-cross-" in c or "-crosssdk-" in c:
+ manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
+ elif "-cross-" in c or "-crosssdk" in c:
continue
else:
manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE}-%s.populate_sysroot" % c)
@@ -168,7 +209,7 @@ python autotools_copy_aclocals () {
if not os.path.exists(t):
os.symlink(c, t)
}
-autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH BB_TASKDEPDATA"
+autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
autotools_do_configure() {
# WARNING: gross hack follows:
@@ -195,7 +236,7 @@ autotools_do_configure() {
else
acpaths="${acpaths}"
fi
- AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
+ AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'`
automake --version
echo "AUTOV is $AUTOV"
if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index c0d2c8ec88..789af3b10b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -97,6 +97,7 @@ PATH_prepend = "${@extra_path_elements(d)}"
addtask fetch
do_fetch[dirs] = "${DL_DIR}"
do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
+do_fetch[vardeps] += "SRCREV"
python base_do_fetch() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
@@ -112,7 +113,6 @@ python base_do_fetch() {
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
-do_unpack[cleandirs] = "${S}/patches"
python base_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
@@ -120,11 +120,21 @@ python base_do_unpack() {
rootdir = d.getVar('WORKDIR', True)
+ # Ensure that we cleanup ${S}/patches
+ # TODO: Investigate if we can remove
+ # the entire ${S} in this case.
+ s_dir = d.getVar('S', True)
+ p_dir = os.path.join(s_dir, 'patches')
+ bb.utils.remove(p_dir, True)
+
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.unpack(rootdir)
except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
+
+ if not os.path.exists(s_dir):
+ bb.warn("%s ('S') don't exist, you must set 'S' to a proper value" % s_dir)
}
def pkgarch_mapping(d):
@@ -133,113 +143,6 @@ def pkgarch_mapping(d):
if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
d.setVar("TUNE_PKGARCH", "armv7a")
-def preferred_ml_updates(d):
- # If any PREFERRED_PROVIDER or PREFERRED_VERSION are set,
- # we need to mirror these variables in the multilib case;
- multilibs = d.getVar('MULTILIBS', True) or ""
- if not multilibs:
- return
-
- prefixes = []
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- prefixes.append(eext[1])
-
- versions = []
- providers = []
- for v in d.keys():
- if v.startswith("PREFERRED_VERSION_"):
- versions.append(v)
- if v.startswith("PREFERRED_PROVIDER_"):
- providers.append(v)
-
- for v in versions:
- val = d.getVar(v, False)
- pkg = v.replace("PREFERRED_VERSION_", "")
- if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
- continue
- if '-cross-' in pkg and '${' in pkg:
- for p in prefixes:
- localdata = bb.data.createCopy(d)
- override = ":virtclass-multilib-" + p
- localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
- newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
- if newname != v:
- newval = localdata.expand(val)
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- vexp = d.expand(v)
- if v != vexp and d.getVar(v, False):
- d.renameVar(v, vexp)
- continue
- for p in prefixes:
- newname = "PREFERRED_VERSION_" + p + "-" + pkg
- if not d.getVar(newname, False):
- d.setVar(newname, val)
-
- for prov in providers:
- val = d.getVar(prov, False)
- pkg = prov.replace("PREFERRED_PROVIDER_", "")
- if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
- continue
- if 'cross-canadian' in pkg:
- for p in prefixes:
- localdata = bb.data.createCopy(d)
- override = ":virtclass-multilib-" + p
- localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
- newname = localdata.expand(prov)
- if newname != prov:
- newval = localdata.expand(val)
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- provexp = d.expand(prov)
- if prov != provexp and d.getVar(prov, False):
- d.renameVar(prov, provexp)
- continue
- virt = ""
- if pkg.startswith("virtual/"):
- pkg = pkg.replace("virtual/", "")
- virt = "virtual/"
- for p in prefixes:
- if pkg != "kernel":
- newval = p + "-" + val
-
- # implement variable keys
- localdata = bb.data.createCopy(d)
- override = ":virtclass-multilib-" + p
- localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- bb.data.update_data(localdata)
- newname = localdata.expand(prov)
- if newname != prov and not d.getVar(newname, False):
- d.setVar(newname, localdata.expand(newval))
-
- # implement alternative multilib name
- newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
- if not d.getVar(newname, False):
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- provexp = d.expand(prov)
- if prov != provexp and d.getVar(prov, False):
- d.renameVar(prov, provexp)
-
-
- mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
- extramp = []
- for p in mp:
- if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
- continue
- virt = ""
- if p.startswith("virtual/"):
- p = p.replace("virtual/", "")
- virt = "virtual/"
- for pref in prefixes:
- extramp.append(virt + pref + "-" + p)
- d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
-
-
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS", True) or "").split()
layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
@@ -290,7 +193,6 @@ python base_eventhandler() {
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
e.data.setVar('BB_VERSION', bb.__version__)
pkgarch_mapping(e.data)
- preferred_ml_updates(e.data)
oe.utils.features_backfill("DISTRO_FEATURES", e.data)
oe.utils.features_backfill("MACHINE_FEATURES", e.data)
@@ -323,15 +225,29 @@ python base_eventhandler() {
}
+CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
+CLEANBROKEN = "0"
+
addtask configure after do_patch
-do_configure[dirs] = "${S} ${B}"
+do_configure[dirs] = "${B}"
do_configure[deptask] = "do_populate_sysroot"
base_do_configure() {
- :
+ if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+ if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
+ cd ${B}
+ if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
+ oe_runmake clean
+ fi
+ find ${B} -name \*.la -delete
+ fi
+ fi
+ if [ -n "${CONFIGURESTAMPFILE}" ]; then
+ echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+ fi
}
addtask compile after do_configure
-do_compile[dirs] = "${S} ${B}"
+do_compile[dirs] = "${B}"
base_do_compile() {
if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
oe_runmake || die "make failed"
@@ -341,7 +257,7 @@ base_do_compile() {
}
addtask install after do_compile
-do_install[dirs] = "${D} ${S} ${B}"
+do_install[dirs] = "${D} ${B}"
# Remove and re-create ${D} so that is it guaranteed to be empty
do_install[cleandirs] = "${D}"
@@ -354,8 +270,6 @@ base_do_package() {
}
addtask build after do_populate_sysroot
-do_build = ""
-do_build[func] = "1"
do_build[noexec] = "1"
do_build[recrdeptask] += "do_deploy"
do_build () {
@@ -442,8 +356,6 @@ python () {
extrardeps = []
extraconf = []
for flag, flagval in sorted(pkgconfigflags.items()):
- if flag == "defaultval":
- continue
items = flagval.split(",")
num = len(items)
if num > 4:
@@ -471,7 +383,7 @@ python () {
# obsolete. Return a warning to the user.
princ = d.getVar('PRINC', True)
if princ and princ != "0":
- bb.warn("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated. The PR server should be used to automatically increment the PR. See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
+ bb.error("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated. The PR server should be used to automatically increment the PR. See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
pr = d.getVar('PR', True)
pr_prefix = re.search("\D+",pr)
prval = re.search("\d+",pr)
@@ -487,6 +399,7 @@ python () {
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
if bb.data.inherits_class('license', d):
+ check_license_format(d)
unmatched_license_flag = check_license_flags(d)
if unmatched_license_flag:
bb.debug(1, "Skipping %s because it has a restricted license not"
@@ -540,6 +453,8 @@ python () {
check_license = False
if check_license and bad_licenses:
+ bad_licenses = expand_wildcard_licenses(d, bad_licenses)
+
whitelist = []
for lic in bad_licenses:
for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:
diff --git a/meta/classes/binconfig-disabled.bbclass b/meta/classes/binconfig-disabled.bbclass
index 27f904eb42..0acc9648b0 100644
--- a/meta/classes/binconfig-disabled.bbclass
+++ b/meta/classes/binconfig-disabled.bbclass
@@ -10,6 +10,19 @@ FILES_${PN}-dev += "${bindir}/*-config"
do_install_append () {
for x in ${BINCONFIG}; do
echo "#!/bin/sh" > ${D}$x
+ # Make the disabled script emit invalid parameters for those configure
+ # scripts which call it without checking the return code.
+ echo "echo '--should-not-have-used-$x'" > ${D}$x
echo "exit 1" >> ${D}$x
done
}
+
+SYSROOT_PREPROCESS_FUNCS += "binconfig_disabled_sysroot_preprocess"
+
+binconfig_disabled_sysroot_preprocess () {
+ for x in ${BINCONFIG}; do
+ configname=`basename $x`
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ install ${D}$x ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ done
+}
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 0da9932f4f..44f738b02e 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -20,6 +20,7 @@
# ${ROOTFS} - the rootfs image to incorporate
do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
+ virtual/kernel:do_deploy \
syslinux:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
@@ -69,12 +70,21 @@ boot_direct_populate() {
install -d $dest
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
-
- if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
- install -m 0644 ${INITRD} $dest/initrd
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage $dest/vmlinuz
+
+ # initrd is made of concatenation of multiple filesystem images
+ if [ -n "${INITRD}" ]; then
+ rm -f $dest/initrd
+ for fs in ${INITRD}
+ do
+ if [ -s "${fs}" ]; then
+ cat ${fs} >> $dest/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
+ fi
+ done
+ chmod 0644 $dest/initrd
fi
-
}
build_boot_dd() {
@@ -93,9 +103,9 @@ build_boot_dd() {
if [ "${IS_VMDK}" = "true" ]; then
if [ "x${AUTO_SYSLINUXMENU}" = "x1" ] ; then
- install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
+ install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 $HDDDIR/${SYSLINUXDIR}/
if [ "x${SYSLINUX_SPLASH}" != "x" ] ; then
- install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
+ install -m 0644 ${SYSLINUX_SPLASH} $HDDDIR/${SYSLINUXDIR}/splash.lss
fi
fi
fi
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 7678567600..b1c03ba068 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -18,15 +18,17 @@
# an hdd)
# External variables (also used by syslinux.bbclass)
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
# ${NOISO} - skip building the ISO image if set to 1
# ${NOHDD} - skip building the HDD image if set to 1
+# ${HDDIMG_ID} - FAT image volume-id
# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
cdrtools-native:do_populate_sysroot \
+ virtual/kernel:do_deploy \
${@oe.utils.ifelse(d.getVar('COMPRESSISO'),'zisofs-tools-native:do_populate_sysroot','')}"
PACKAGES = " "
@@ -65,10 +67,20 @@ populate() {
install -d ${DEST}
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
-
- if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
- install -m 0644 ${INITRD} ${DEST}/initrd
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage ${DEST}/vmlinuz
+
+ # initrd is made of concatenation of multiple filesystem images
+ if [ -n "${INITRD}" ]; then
+ rm -f ${DEST}/initrd
+ for fs in ${INITRD}
+ do
+ if [ -s "${fs}" ]; then
+ cat ${fs} >> ${DEST}/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
+ fi
+ done
+ chmod 0644 ${DEST}/initrd
fi
if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
@@ -79,10 +91,19 @@ populate() {
build_iso() {
# Only create an ISO if we have an INITRD and NOISO was not set
- if [ -z "${INITRD}" ] || [ ! -s "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
+ if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
bbnote "ISO image will not be created."
return
fi
+ # ${INITRD} is a list of multiple filesystem images
+ for fs in ${INITRD}
+ do
+ if [ ! -s "${fs}" ]; then
+ bbnote "ISO image will not be created. ${fs} is invalid."
+ return
+ fi
+ done
+
populate ${ISODIR}
@@ -193,7 +214,14 @@ build_fat_img() {
FATSIZE="-F 32"
fi
- mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} ${BLOCKS}
+ if [ -z "${HDDIMG_ID}" ]; then
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ ${BLOCKS}
+ else
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ ${BLOCKS} -i ${HDDIMG_ID}
+ fi
+
# Copy FATSOURCEDIR recursively into the image file directly
mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
}
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 20382ce410..90cfe4f954 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -17,7 +17,7 @@ BUILDHISTORY_COMMIT ?= "0"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
-SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
+SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory"
# We want to avoid influence the signatures of sstate tasks - first the function itself:
sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
# then the value added to SSTATEPOSTINSTFUNCS:
@@ -155,7 +155,7 @@ python buildhistory_emit_pkghistory() {
with open(os.path.join(pkgdata_dir, pn)) as f:
for line in f.readlines():
if line.startswith('PACKAGES: '):
- packages = squashspaces(line.split(': ', 1)[1])
+ packages = oe.utils.squashspaces(line.split(': ', 1)[1])
break
except IOError as e:
if e.errno == errno.ENOENT:
@@ -181,7 +181,7 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
- rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or ""))
+ rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS', True) or ""))
rcpinfo.packages = packages
write_recipehistory(rcpinfo, d)
@@ -222,13 +222,13 @@ python buildhistory_emit_pkghistory() {
pkginfo.pkge = pkge
pkginfo.pkgv = pkgv
pkginfo.pkgr = pkgr
- pkginfo.rprovides = sortpkglist(squashspaces(pkgdata.get('RPROVIDES', "")))
- pkginfo.rdepends = sortpkglist(squashspaces(pkgdata.get('RDEPENDS', "")))
- pkginfo.rrecommends = sortpkglist(squashspaces(pkgdata.get('RRECOMMENDS', "")))
- pkginfo.rsuggests = sortpkglist(squashspaces(pkgdata.get('RSUGGESTS', "")))
- pkginfo.rreplaces = sortpkglist(squashspaces(pkgdata.get('RREPLACES', "")))
- pkginfo.rconflicts = sortpkglist(squashspaces(pkgdata.get('RCONFLICTS', "")))
- pkginfo.files = squashspaces(pkgdata.get('FILES', ""))
+ pkginfo.rprovides = sortpkglist(oe.utils.squashspaces(pkgdata.get('RPROVIDES', "")))
+ pkginfo.rdepends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RDEPENDS', "")))
+ pkginfo.rrecommends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RRECOMMENDS', "")))
+ pkginfo.rsuggests = sortpkglist(oe.utils.squashspaces(pkgdata.get('RSUGGESTS', "")))
+ pkginfo.rreplaces = sortpkglist(oe.utils.squashspaces(pkgdata.get('RREPLACES', "")))
+ pkginfo.rconflicts = sortpkglist(oe.utils.squashspaces(pkgdata.get('RCONFLICTS', "")))
+ pkginfo.files = oe.utils.squashspaces(pkgdata.get('FILES', ""))
for filevar in pkginfo.filevars:
pkginfo.filevars[filevar] = pkgdata.get(filevar, "")
@@ -461,10 +461,10 @@ END
echo "IMAGESIZE = $imagesize" >> ${BUILDHISTORY_DIR_IMAGE}/image-info.txt
# Add some configuration information
- echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${BUILDHISTORY_DIR_IMAGE}/build-id
+ echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${BUILDHISTORY_DIR_IMAGE}/build-id.txt
- cat >> ${BUILDHISTORY_DIR_IMAGE}/build-id <<END
-${@buildhistory_get_layers(d)}
+ cat >> ${BUILDHISTORY_DIR_IMAGE}/build-id.txt <<END
+${@buildhistory_get_build_id(d)}
END
}
@@ -484,8 +484,9 @@ END
echo "SDKSIZE = $sdksize" >> ${BUILDHISTORY_DIR_SDK}/sdk-info.txt
}
-# By prepending we get in before the removal of packaging files
-ROOTFS_POSTPROCESS_COMMAND =+ " buildhistory_list_installed_image ;\
+# By using ROOTFS_POSTUNINSTALL_COMMAND we get in after uninstallation of
+# unneeded packages but before the removal of packaging files
+ROOTFS_POSTUNINSTALL_COMMAND += " buildhistory_list_installed_image ;\
buildhistory_get_image_installed ; "
IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
@@ -498,11 +499,23 @@ POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host ;
SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; "
-def buildhistory_get_layers(d):
+def buildhistory_get_build_id(d):
if d.getVar('BB_WORKERCONTEXT', True) != '1':
return ""
- layertext = "Configured metadata layers:\n%s\n" % '\n'.join(get_layers_branch_rev(d))
- return layertext
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+ statuslines = []
+ for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
+ g = globals()
+ if func not in g:
+ bb.warn("Build configuration function '%s' does not exist" % func)
+ else:
+ flines = g[func](localdata)
+ if flines:
+ statuslines.extend(flines)
+
+ statusheader = d.getVar('BUILDCFG_HEADER', True)
+ return('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
def buildhistory_get_metadata_revs(d):
# We want an easily machine-readable format here, so get_layers_branch_rev isn't quite what we want
@@ -513,11 +526,6 @@ def buildhistory_get_metadata_revs(d):
for i in layers]
return '\n'.join(medadata_revs)
-
-def squashspaces(string):
- import re
- return re.sub("\s+", " ", string).strip()
-
def outputvars(vars, listvars, d):
vars = vars.split()
listvars = listvars.split()
@@ -526,7 +534,7 @@ def outputvars(vars, listvars, d):
value = d.getVar(var, True) or ""
if var in listvars:
# Squash out spaces
- value = squashspaces(value)
+ value = oe.utils.squashspaces(value)
ret += "%s = %s\n" % (var, value)
return ret.rstrip('\n')
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 7765020e98..77b19372ba 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -54,7 +54,6 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
continue
newpath = "@loader_path/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/")))
- bb.warn("%s %s %s %s" % (fpath, rpath, newpath, rootdir))
p = sub.Popen([d.expand("${HOST_PREFIX}install_name_tool"), '-change', rpath, newpath, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
err, out = p.communicate()
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index ab2adec782..3549c38f15 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -13,10 +13,11 @@ inherit autotools
# C/C++ Compiler (without cpu arch/tune arguments)
OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
+OECMAKE_AR ?= "${AR}"
# Compiler flags
OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
-OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive"
+OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}"
OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CFLAGS} -DNDEBUG"
OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG"
OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
@@ -34,10 +35,14 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).
set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
+set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
+set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
+set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
+set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
@@ -76,6 +81,8 @@ cmake_do_configure() {
rm -rf ${B}
mkdir -p ${B}
cd ${B}
+ else
+ find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
fi
# Just like autotools cmake can use a site file to cache result that need generated binaries to run
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 34c0c4e6c7..43acfd531b 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -9,10 +9,11 @@ addtask configure after do_unpack do_patch before do_compile
inherit terminal
-OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO"
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
HOSTLDFLAGS = "${BUILD_LDFLAGS}"
-HOST_LOADLIBES = "-lncurses"
+CROSS_CURSES_LIB = "-lncurses -ltinfo"
+CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
python do_menuconfig() {
@@ -58,7 +59,7 @@ python do_diffconfig() {
bb.fatal("No config files found. Did you do menuconfig ?\n%s" % e)
if isdiff:
- statement = 'diff -Nurp ' + configorig + ' ' + config + '| sed -n "s/^\+//p" >' + fragment
+ statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment
subprocess.call(statement, shell=True)
shutil.copy(configorig, config)
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
new file mode 100644
index 0000000000..9b58d82ce5
--- /dev/null
+++ b/meta/classes/compress_doc.bbclass
@@ -0,0 +1,260 @@
+# Compress man pages in ${mandir} and info pages in ${infodir}
+#
+# 1. The doc will be compressed to gz format by default.
+#
+# 2. It will automatically correct the compressed doc which is not
+# in ${DOC_COMPRESS} but in ${DOC_COMPRESS_LIST} to the format
+# of ${DOC_COMPRESS} policy
+#
+# 3. It is easy to add a new type compression by editing
+# local.conf, such as:
+# DOC_COMPRESS_LIST_append = ' abc'
+# DOC_COMPRESS = 'abc'
+# DOC_COMPRESS_CMD[abc] = 'abc compress cmd ***'
+# DOC_DECOMPRESS_CMD[abc] = 'abc decompress cmd ***'
+
+# All supported compression policy
+DOC_COMPRESS_LIST ?= "gz xz bz2"
+
+# Compression policy, must be one of ${DOC_COMPRESS_LIST}
+DOC_COMPRESS ?= "gz"
+
+# Compression shell command
+DOC_COMPRESS_CMD[gz] ?= 'gzip -v -9 -n'
+DOC_COMPRESS_CMD[bz2] ?= "bzip2 -v -9"
+DOC_COMPRESS_CMD[xz] ?= "xz -v"
+
+# Decompression shell command
+DOC_DECOMPRESS_CMD[gz] ?= 'gunzip -v'
+DOC_DECOMPRESS_CMD[bz2] ?= "bunzip2 -v"
+DOC_DECOMPRESS_CMD[xz] ?= "unxz -v"
+
+PACKAGE_PREPROCESS_FUNCS += "package_do_compress_doc compress_doc_updatealternatives"
+python package_do_compress_doc() {
+ compress_mode = d.getVar('DOC_COMPRESS', True)
+ compress_list = (d.getVar('DOC_COMPRESS_LIST', True) or '').split()
+ if compress_mode not in compress_list:
+ bb.fatal('Compression policy %s not supported (not listed in %s)\n' % (compress_mode, compress_list))
+
+ dvar = d.getVar('PKGD', True)
+ compress_cmds = {}
+ decompress_cmds = {}
+ for mode in compress_list:
+ compress_cmds[mode] = d.getVarFlag('DOC_COMPRESS_CMD', mode)
+ decompress_cmds[mode] = d.getVarFlag('DOC_DECOMPRESS_CMD', mode)
+
+ mandir = os.path.abspath(dvar + os.sep + d.getVar("mandir", True))
+ if os.path.exists(mandir):
+ # Decompress doc files which format is not compress_mode
+ decompress_doc(mandir, compress_mode, decompress_cmds)
+ compress_doc(mandir, compress_mode, compress_cmds)
+
+ infodir = os.path.abspath(dvar + os.sep + d.getVar("infodir", True))
+ if os.path.exists(infodir):
+ # Decompress doc files which format is not compress_mode
+ decompress_doc(infodir, compress_mode, decompress_cmds)
+ compress_doc(infodir, compress_mode, compress_cmds)
+}
+
+def _get_compress_format(file, compress_format_list):
+ for compress_format in compress_format_list:
+ compress_suffix = '.' + compress_format
+ if file.endswith(compress_suffix):
+ return compress_format
+
+ return ''
+
+# Collect hardlinks to dict, each element in dict lists hardlinks
+# which points to the same doc file.
+# {hardlink10: [hardlink11, hardlink12],,,}
+# The hardlink10, hardlink11 and hardlink12 are the same file.
+def _collect_hardlink(hardlink_dict, file):
+ for hardlink in hardlink_dict:
+ # Add to the existed hardlink
+ if os.path.samefile(hardlink, file):
+ hardlink_dict[hardlink].append(file)
+ return hardlink_dict
+
+ hardlink_dict[file] = []
+ return hardlink_dict
+
+def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False):
+ for target in hardlink_dict:
+ if decompress:
+ compress_format = _get_compress_format(target, shell_cmds.keys())
+ cmd = "%s -f %s" % (shell_cmds[compress_format], target)
+ bb.note('decompress hardlink %s' % target)
+ else:
+ cmd = "%s -f %s" % (shell_cmds[compress_mode], target)
+ bb.note('compress hardlink %s' % target)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ return
+
+ for hardlink_dup in hardlink_dict[target]:
+ if decompress:
+ # Remove compress suffix
+ compress_suffix = '.' + compress_format
+ new_hardlink = hardlink_dup[:-len(compress_suffix)]
+ new_target = target[:-len(compress_suffix)]
+ else:
+ # Append compress suffix
+ compress_suffix = '.' + compress_mode
+ new_hardlink = hardlink_dup + compress_suffix
+ new_target = target + compress_suffix
+
+ bb.note('hardlink %s-->%s' % (new_hardlink, new_target))
+ if not os.path.exists(new_hardlink):
+ os.link(new_target, new_hardlink)
+ if os.path.exists(hardlink_dup):
+ os.unlink(hardlink_dup)
+
+def _process_symlink(file, compress_format, decompress=False):
+ compress_suffix = '.' + compress_format
+ if decompress:
+ # Remove compress suffix
+ new_linkname = file[:-len(compress_suffix)]
+ new_source = os.readlink(file)[:-len(compress_suffix)]
+ else:
+ # Append compress suffix
+ new_linkname = file + compress_suffix
+ new_source = os.readlink(file) + compress_suffix
+
+ bb.note('symlink %s-->%s' % (new_linkname, new_source))
+ if not os.path.exists(new_linkname):
+ os.symlink(new_source, new_linkname)
+
+ os.unlink(file)
+
+def _is_info(file):
+ flags = '.info .info-'.split()
+ for flag in flags:
+ if flag in os.path.basename(file):
+ return True
+
+ return False
+
+def _is_man(file):
+ import re
+
+ # It refers MANSECT-var in man(1.6g)'s man.config
+ # ".1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o"
+ # Not start with '.', and contain the above colon-seperate element
+ p = re.compile(r'[^\.]+\.([1-9lnop]|0p|tcl)')
+ if p.search(file):
+ return True
+
+ return False
+
+def _is_compress_doc(file, compress_format_list):
+ compress_format = _get_compress_format(file, compress_format_list)
+ compress_suffix = '.' + compress_format
+ if file.endswith(compress_suffix):
+ # Remove the compress suffix
+ uncompress_file = file[:-len(compress_suffix)]
+ if _is_info(uncompress_file) or _is_man(uncompress_file):
+ return True, compress_format
+
+ return False, ''
+
+def compress_doc(topdir, compress_mode, compress_cmds):
+ hardlink_dict = {}
+ for root, dirs, files in os.walk(topdir):
+ for f in files:
+ file = os.path.join(root, f)
+ if os.path.isdir(file):
+ continue
+
+ if _is_info(file) or _is_man(file):
+ # Symlink
+ if os.path.islink(file):
+ _process_symlink(file, compress_mode)
+ # Hardlink
+ elif os.lstat(file).st_nlink > 1:
+ _collect_hardlink(hardlink_dict, file)
+ # Normal file
+ elif os.path.isfile(file):
+ cmd = "%s %s" % (compress_cmds[compress_mode], file)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ continue
+ bb.note('compress file %s' % file)
+
+ _process_hardlink(hardlink_dict, compress_mode, compress_cmds)
+
+# Decompress doc files which format is not compress_mode
+def decompress_doc(topdir, compress_mode, decompress_cmds):
+ hardlink_dict = {}
+ decompress = True
+ for root, dirs, files in os.walk(topdir):
+ for f in files:
+ file = os.path.join(root, f)
+ if os.path.isdir(file):
+ continue
+
+ res, compress_format = _is_compress_doc(file, decompress_cmds.keys())
+ # Decompress files which format is not compress_mode
+ if res and compress_mode!=compress_format:
+ # Symlink
+ if os.path.islink(file):
+ _process_symlink(file, compress_format, decompress)
+ # Hardlink
+ elif os.lstat(file).st_nlink > 1:
+ _collect_hardlink(hardlink_dict, file)
+ # Normal file
+ elif os.path.isfile(file):
+ cmd = "%s %s" % (decompress_cmds[compress_format], file)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ continue
+ bb.note('decompress file %s' % file)
+
+ _process_hardlink(hardlink_dict, compress_mode, decompress_cmds, decompress)
+
+python compress_doc_updatealternatives () {
+ if not bb.data.inherits_class('update-alternatives', d):
+ return
+
+ mandir = d.getVar("mandir", True)
+ infodir = d.getVar("infodir", True)
+ compress_mode = d.getVar('DOC_COMPRESS', True)
+ for pkg in (d.getVar('PACKAGES', True) or "").split():
+ old_names = (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split()
+ new_names = []
+ for old_name in old_names:
+ old_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', old_name, True)
+ old_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True) or \
+ d.getVarFlag('ALTERNATIVE_TARGET', old_name, True) or \
+ d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or \
+ d.getVar('ALTERNATIVE_TARGET', True) or \
+ old_link
+ # Sometimes old_target is specified as relative to the link name.
+ old_target = os.path.join(os.path.dirname(old_link), old_target)
+
+ # The updatealternatives used for compress doc
+ if mandir in old_target or infodir in old_target:
+ new_name = old_name + '.' + compress_mode
+ new_link = old_link + '.' + compress_mode
+ new_target = old_target + '.' + compress_mode
+ d.delVarFlag('ALTERNATIVE_LINK_NAME', old_name)
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', new_name, new_link)
+ if d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name, True):
+ d.delVarFlag('ALTERNATIVE_TARGET_%s' % pkg, old_name)
+ d.setVarFlag('ALTERNATIVE_TARGET_%s' % pkg, new_name, new_target)
+ elif d.getVarFlag('ALTERNATIVE_TARGET', old_name, True):
+ d.delVarFlag('ALTERNATIVE_TARGET', old_name)
+ d.setVarFlag('ALTERNATIVE_TARGET', new_name, new_target)
+ elif d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True):
+ d.setVar('ALTERNATIVE_TARGET_%s' % pkg, new_target)
+ elif d.getVar('ALTERNATIVE_TARGET', old_name, True):
+ d.setVar('ALTERNATIVE_TARGET', new_target)
+
+ new_names.append(new_name)
+
+ if new_names:
+ d.setVar('ALTERNATIVE_%s' % pkg, ' '.join(new_names))
+}
+
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 1b36cba773..62363fb334 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
# IMAGE_FEATURES control content of the core reference images
#
-# By default we install packagegroup-core-boot and packagegroup-base packages - this gives us
-# working (console only) rootfs.
+# By default we install packagegroup-core-boot and packagegroup-base-extended packages;
+# this gives us working (console only) rootfs.
#
# Available IMAGE_FEATURES:
#
@@ -30,6 +30,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
# - dev-pkgs - development packages (headers, etc.) for all installed packages in the rootfs
# - dbg-pkgs - debug symbol packages for all installed packages in the rootfs
# - doc-pkgs - documentation packages for all installed packages in the rootfs
+# - ptest-pkgs - ptest packages for all ptest-enabled recipes
# - read-only-rootfs - tweaks an image to support read-only rootfs
#
FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 7088039fa0..e2bbd2f63a 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -47,8 +47,8 @@ cpan_do_compile () {
cpan_do_install () {
oe_runmake DESTDIR="${D}" install_vendor
- for PERLSCRIPT in `grep -rIEl '#!${bindir}/perl-native.*/perl' ${D}`; do
- sed -i -e 's|^#!${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' $PERLSCRIPT
+ for PERLSCRIPT in `grep -rIEl '#! *${bindir}/perl-native.*/perl' ${D}`; do
+ sed -i -e 's|${bindir}/perl-native.*/perl|/usr/bin/env nativeperl|' $PERLSCRIPT
done
}
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 5b0ad61b4c..2eb8162314 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -3,6 +3,8 @@
#
inherit cpan-base perlnative
+EXTRA_CPAN_BUILD_FLAGS ?= ""
+
# Env var which tells perl if it should use host (no) or target (yes) settings
export PERLCONFIGTARGET = "${@is_target(d)}"
export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
@@ -36,7 +38,8 @@ cpan_build_do_configure () {
--install_path script=${bindir} \
--install_path bin=${bindir} \
--install_path bindoc=${mandir}/man1 \
- --install_path libdoc=${mandir}/man3
+ --install_path libdoc=${mandir}/man3 \
+ ${EXTRA_CPAN_BUILD_FLAGS}
}
cpan_build_do_compile () {
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 25e246ddc3..a8565e91e3 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -16,6 +16,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
#
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
CANADIANEXTRAOS = ""
+MODIFYTOS ??= "1"
python () {
archs = d.getVar('PACKAGE_ARCHS', True).split()
sdkarchs = []
@@ -23,6 +24,9 @@ python () {
sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
+ # Allow the following code segment to be disabled, e.g. meta-environment
+ if d.getVar("MODIFYTOS", True) != "1":
+ return
# PowerPC can build "linux" and "linux-gnuspe"
tarch = d.getVar("TARGET_ARCH", True)
if tarch == "powerpc":
@@ -84,11 +88,12 @@ EXTRANATIVEPATH += "chrpath-native"
# Path mangling needed by the cross packaging
# Note that we use := here to ensure that libdir and includedir are
# target paths.
-target_libdir := "${libdir}"
-target_includedir := "${includedir}"
-target_base_libdir := "${base_libdir}"
+target_base_prefix := "${base_prefix}"
target_prefix := "${prefix}"
target_exec_prefix := "${exec_prefix}"
+target_base_libdir = "${target_base_prefix}/${baselib}"
+target_libdir = "${target_exec_prefix}/${baselib}"
+target_includedir := "${includedir}"
# Change to place files in SDKPATH
base_prefix = "${SDKPATHNATIVE}"
@@ -110,6 +115,7 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
do_populate_sysroot[stamp-extra-info] = ""
+do_packagedata[stamp-extra-info] = ""
USE_NLS = "${SDKUSE_NLS}"
@@ -119,8 +125,8 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
# If MLPREFIX is set by multilib code, shlibs
# points to the wrong place so force it
-SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs"
-SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs"
+SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2"
+SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2"
cross_canadian_bindirlinks () {
for i in ${CANADIANEXTRAOS}
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 261a37465e..87d5cf5d37 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,6 +1,7 @@
inherit cross
CLASSOVERRIDE = "class-crosssdk"
+MACHINEOVERRIDES = ""
PACKAGE_ARCH = "${SDK_ARCH}"
python () {
# set TUNE_PKGARCH to SDK_ARCH
@@ -30,6 +31,6 @@ do_populate_sysroot[stamp-extra-info] = ""
do_packagedata[stamp-extra-info] = ""
# Need to force this to ensure consitency accross architectures
-EXTRA_OECONF_FPU = ""
+EXTRA_OECONF_GCC_FLOAT = ""
USE_NLS = "no"
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index d7ea151a5d..c859703669 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -8,6 +8,11 @@
#
# Better expressed as ensure all RDEPENDS package before we package
# This means we can't have circular RDEPENDS/RRECOMMENDS
+
+AUTO_LIBNAME_PKGS = "${PACKAGES}"
+
+inherit package
+
DEBIANRDEP = "do_packagedata"
do_package_write_ipk[rdeptask] = "${DEBIANRDEP}"
do_package_write_deb[rdeptask] = "${DEBIANRDEP}"
@@ -47,6 +52,13 @@ python debian_package_name_hook () {
return 0
return (s[stat.ST_MODE] & stat.S_IEXEC)
+ def add_rprovides(pkg, d):
+ newpkg = d.getVar('PKG_' + pkg)
+ if newpkg and newpkg != pkg:
+ provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
+ if pkg not in provs:
+ d.appendVar('RPROVIDES_' + pkg, " " + pkg)
+
def auto_libname(packages, orig_pkg):
sonames = []
has_bins = 0
@@ -94,6 +106,7 @@ python debian_package_name_hook () {
(pkgname, devname) = soname_result
for pkg in packages.split():
if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
+ add_rprovides(pkg, d)
continue
debian_pn = d.getVar('DEBIANNAME_' + pkg)
if debian_pn:
@@ -108,6 +121,9 @@ python debian_package_name_hook () {
newpkg = mlpre + newpkg
if newpkg != pkg:
d.setVar('PKG_' + pkg, newpkg)
+ add_rprovides(pkg, d)
+ else:
+ add_rprovides(orig_pkg, d)
# reversed sort is needed when some package is substring of another
# ie in ncurses we get without reverse sort:
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index a890de7911..83aa381fe7 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -268,240 +268,6 @@ python do_checkpkg() {
import tempfile
import subprocess
- """
- sanity check to ensure same name and type. Match as many patterns as possible
- such as:
- gnome-common-2.20.0.tar.gz (most common format)
- gtk+-2.90.1.tar.gz
- xf86-input-synaptics-12.6.9.tar.gz
- dri2proto-2.3.tar.gz
- blktool_4.orig.tar.gz
- libid3tag-0.15.1b.tar.gz
- unzip552.tar.gz
- icu4c-3_6-src.tgz
- genext2fs_1.3.orig.tar.gz
- gst-fluendo-mp3
- """
- prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*\+?[\-_]" # match most patterns which uses "-" as separator to version digits
- prefix2 = "[a-zA-Z]+" # a loose pattern such as for unzip552.tar.gz
- prefix3 = "[0-9]+[\-]?[a-zA-Z]+" # a loose pattern such as for 80325-quicky-0.4.tar.gz
- prefix = "(%s|%s|%s)" % (prefix1, prefix2, prefix3)
- ver_regex = "(([A-Z]*\d+[a-zA-Z]*[\.\-_]*)+)"#"((\d+[\.\-_[a-z]])+)"
- # src.rpm extension was added only for rpm package. Can be removed if the rpm
- # packaged will always be considered as having to be manually upgraded
- suffix = "(tar\.gz|tgz|tar\.bz2|tar\.lz4|zip|xz|rpm|bz2|lz4|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)"
-
- suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz", "tar.lz4", "bz2", "lz4", "orig.tar.gz", "src.tar.gz", "src.rpm", "src.tgz", "svnr\d+.tar.bz2", "stable.tar.gz", "src.rpm")
- sinterstr = "(?P<name>%s?)v?(?P<ver>%s)(\-source)?" % (prefix, ver_regex)
- sdirstr = "(?P<name>%s)\.?v?(?P<ver>%s)(\-source)?[\.\-](?P<type>%s$)" % (prefix, ver_regex, suffix)
-
- def parse_inter(s):
- m = re.search(sinterstr, s)
- if not m:
- return None
- else:
- return (m.group('name'), m.group('ver'), "")
-
- def parse_dir(s):
- m = re.search(sdirstr, s)
- if not m:
- return None
- else:
- return (m.group('name'), m.group('ver'), m.group('type'))
-
- def modelate_version(version):
- if version[0] in ['.', '-']:
- if version[1].isdigit():
- version = version[1] + version[0] + version[2:len(version)]
- else:
- version = version[1:len(version)]
-
- version = re.sub('\-', '.', version)
- version = re.sub('_', '.', version)
- version = re.sub('(rc)+', '.-1.', version)
- version = re.sub('(alpha)+', '.-3.', version)
- version = re.sub('(beta)+', '.-2.', version)
- if version[0] == 'v':
- version = version[1:len(version)]
- return version
-
- """
- Check whether 'new' is newer than 'old' version. We use existing vercmp() for the
- purpose. PE is cleared in comparison as it's not for build, and PV is cleared too
- for simplicity as it's somehow difficult to get from various upstream format
- """
- def __vercmp(old, new):
- (on, ov, ot) = old
- (en, ev, et) = new
- if on != en or (et and et not in suffixtuple):
- return False
- ov = modelate_version(ov)
- ev = modelate_version(ev)
-
- result = bb.utils.vercmp(("0", ov, ""), ("0", ev, ""))
- if result < 0:
- return True
- else:
- return False
-
- """
- wrapper for fetch upstream directory info
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'tmpf' - tmpfile for fetcher output
- We don't want to exit whole build due to one recipe error. So handle all exceptions
- gracefully w/o leaking to outer.
- """
- def internal_fetch_wget(url, ud, d, tmpf):
- status = "ErrFetchUnknown"
-
- agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
- fetchcmd = "/usr/bin/env wget -t 1 --passive-ftp -O %s --user-agent=\"%s\" '%s'" % (tmpf.name, agent, url)
- try:
- fetcher = bb.fetch2.wget.Wget(d)
- fetcher._runwget(ud, d, fetchcmd, True)
- status = "SUCC"
- except bb.fetch2.BBFetchException, e:
- status = "ErrFetch"
-
- return status
-
- """
- Check on middle version directory such as "2.4/" in "http://xxx/2.4/pkg-2.4.1.tar.gz",
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'curver' - current version
- Return new version if success, or else error in "Errxxxx" style
- """
- def check_new_dir(url, curver, ud, d):
- pn = d.getVar('PN', True)
- f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-1-" % pn)
- status = internal_fetch_wget(url, ud, d, f)
- fhtml = f.read()
- if status == "SUCC" and len(fhtml):
- newver = parse_inter(curver)
-
- """
- match "*4.1/">*4.1/ where '*' matches chars
- N.B. add package name, only match for digits
- """
- regex = d.getVar('REGEX', True)
- if regex == '':
- regex = "^%s" %prefix
- m = re.search("^%s" % regex, curver)
- if m:
- s = "%s[^\d\"]*?(\d+[\.\-_])+\d+/?" % m.group()
- else:
- s = "(\d+[\.\-_])+\d+/?"
-
- searchstr = "[hH][rR][eE][fF]=\"%s\">" % s
-
- reg = re.compile(searchstr)
- valid = 0
- for line in fhtml.split("\n"):
- if line.find(curver) >= 0:
- valid = 1
- m = reg.search(line)
- if m:
- ver = m.group().split("\"")[1]
- ver = ver.strip("/")
- ver = parse_inter(ver)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
-
- """Expect a match for curver in directory list, or else it indicates unknown format"""
- if not valid:
- status = "ErrParseInterDir"
- else:
- """rejoin the path name"""
- status = newver[0] + newver[1]
- elif not len(fhtml):
- status = "ErrHostNoDir"
-
- f.close()
- if status != "ErrHostNoDir" and re.match("Err", status):
- logpath = d.getVar('LOG_DIR', True)
- subprocess.call("cp %s %s/" % (f.name, logpath), shell=True)
- os.unlink(f.name)
- return status
-
- """
- Check on the last directory to search '2.4.1' in "http://xxx/2.4/pkg-2.4.1.tar.gz",
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'curname' - current package name
- Return new version if success, or else error in "Errxxxx" style
- """
- def check_new_version(url, curname, ud, d):
- """possible to have no version in pkg name, such as spectrum-fw"""
- if not re.search("\d+", curname):
- return pcurver
- pn = d.getVar('PN', True)
- newver_regex = d.getVar('REGEX', True)
- f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-2-" % pn)
- status = internal_fetch_wget(url, ud, d, f)
- fhtml = f.read()
-
- if status == "SUCC" and len(fhtml):
- newver = parse_dir(curname)
-
- if not newver_regex:
- """this is the default matching pattern, if recipe does not """
- """provide a regex expression """
- """match "{PN}-5.21.1.tar.gz">{PN}-5.21.1.tar.gz """
- pn1 = re.search("^%s" % prefix, curname).group()
- s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
- searchstr = "[hH][rR][eE][fF]=\"%s\".*[>\"]" % s
- reg = searchstr
- else:
- reg = newver_regex
- valid = 0
- count = 0
- for line in fhtml.split("\n"):
- if pn == 'kconfig-frontends':
- m = re.findall(reg, line)
- if m:
- valid = 1
- for match in m:
- (on, ov, oe) = newver
- ver = (on, match[0], oe)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
- continue
- count += 1
- m = re.search(reg, line)
- if m:
- valid = 1
- if not newver_regex:
- ver = m.group().split("\"")[1].split("/")[-1]
- if ver == "download":
- ver = m.group().split("\"")[1].split("/")[-2]
- ver = parse_dir(ver)
- else:
- """ we cheat a little here, but we assume that the
- regular expression in the recipe will extract exacly
- the version """
- (on, ov, oe) = newver
- ver = (on, m.group('pver'), oe)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
- """Expect a match for curver in directory list, or else it indicates unknown format"""
- if not valid:
- status = "ErrParseDir"
- else:
- """newver still contains a full package name string"""
- status = re.sub('_', '.', newver[1])
- elif not len(fhtml):
- status = "ErrHostNoDir"
-
- f.close()
- """if host hasn't directory information, no need to save tmp file"""
- if status != "ErrHostNoDir" and re.match("Err", status):
- logpath = d.getVar('LOG_DIR', True)
- subprocess.call("cp %s %s/" % (f.name, logpath), shell=True)
- os.unlink(f.name)
- return status
-
"""first check whether a uri is provided"""
src_uri = d.getVar('SRC_URI', True)
if not src_uri:
@@ -543,9 +309,6 @@ python do_checkpkg() {
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
bb.data.update_data(localdata)
- chk_uri = d.getVar('REGEX_URI', True)
- if not chk_uri:
- chk_uri = src_uri
pdesc = localdata.getVar('DESCRIPTION', True)
pgrp = localdata.getVar('SECTION', True)
if localdata.getVar('PRSPV', True):
@@ -562,232 +325,63 @@ python do_checkpkg() {
psrcuri = localdata.getVar('SRC_URI', True)
maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
+ """ Get upstream version version """
+ pupver = None
+ pstatus = "ErrUnknown"
found = 0
+
for uri in src_uri.split():
- m = re.compile('(?P<type>[^:]*)').match(uri)
- if not m:
- raise MalformedUrl(uri)
- elif m.group('type') in ('http', 'https', 'ftp', 'cvs', 'svn', 'git'):
- found = 1
- pproto = m.group('type')
- break
+ m = re.compile('(?P<type>[^:]*)').match(uri)
+ if not m:
+ raise MalformedUrl(uri)
+ elif m.group('type') in ('http', 'https', 'ftp', 'cvs', 'svn', 'git'):
+ found = 1
+ psrcuri = uri
+ pproto = m.group('type')
+ break
if not found:
pproto = "file"
- pupver = "N/A"
- pstatus = "ErrUnknown"
-
- (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(uri)
- if type in ['http', 'https', 'ftp']:
- if d.getVar('PRSPV', True):
- pcurver = d.getVar('PRSPV', True)
- else:
- pcurver = d.getVar('PV', True)
- else:
- if d.getVar('PRSPV', True):
- pcurver = d.getVar('PRSPV', True)
- else:
- pcurver = d.getVar("SRCREV", True)
-
-
- if type in ['http', 'https', 'ftp']:
- ud = bb.fetch2.FetchData(uri, d)
- newver = pcurver
- altpath = path
- dirver = "-"
- curname = "-"
-
- """
- match version number amid the path, such as "5.7" in:
- http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz
- N.B. how about sth. like "../5.7/5.8/..."? Not find such example so far :-P
- """
- m = re.search(r"[^/]*(\d+\.)+\d+([\-_]r\d+)*/", path)
- if m:
- altpath = path.split(m.group())[0]
- dirver = m.group().strip("/")
-
- """use new path and remove param. for wget only param is md5sum"""
- alturi = bb.fetch.encodeurl([type, host, altpath, user, pswd, {}])
- my_uri = d.getVar('REGEX_URI', True)
- if my_uri:
- if d.getVar('PRSPV', True):
- newver = d.getVar('PRSPV', True)
- else:
- newver = d.getVar('PV', True)
- else:
- newver = check_new_dir(alturi, dirver, ud, d)
- altpath = path
- if not re.match("Err", newver) and dirver != newver:
- altpath = altpath.replace(dirver, newver, True)
- # For folder in folder cases - try to enter the folder again and then try parsing
- """Now try to acquire all remote files in current directory"""
- if not re.match("Err", newver):
- curname = altpath.split("/")[-1]
-
- """get remote name by skipping pacakge name"""
- m = re.search(r"/.*/", altpath)
- if not m:
- altpath = "/"
- else:
- altpath = m.group()
-
- chk_uri = d.getVar('REGEX_URI', True)
- if not chk_uri:
- alturi = bb.fetch.encodeurl([type, host, altpath, user, pswd, {}])
- else:
- alturi = chk_uri
- newver = check_new_version(alturi, curname, ud, d)
- while(newver == "ErrHostNoDir"):
- if alturi == "/download":
- break
- else:
- alturi = "/".join(alturi.split("/")[0:-2]) + "/download"
- newver = check_new_version(alturi, curname, ud, d)
- if not re.match("Err", newver):
- pupver = newver
- if pupver != pcurver:
- pstatus = "UPDATE"
- else:
- pstatus = "MATCH"
-
- if re.match("Err", newver):
- pstatus = newver + ":" + altpath + ":" + dirver + ":" + curname
- elif type == 'git':
- if user:
- gituser = user + '@'
- else:
- gituser = ""
-
- if 'protocol' in parm:
- gitproto = parm['protocol']
- else:
- gitproto = "git"
- # Get all tags and HEAD
- if d.getVar('GIT_REGEX', True):
- gitcmd = "git ls-remote %s://%s%s%s %s 2>&1" % (gitproto, gituser, host, path, d.getVar('GIT_REGEX', True))
- else:
- gitcmd = "git ls-remote %s://%s%s%s *tag* 2>&1" % (gitproto, gituser, host, path)
- gitcmd2 = "git ls-remote %s://%s%s%s HEAD 2>&1" % (gitproto, gituser, host, path)
-
- tmp = os.popen(gitcmd).read()
- if 'unable to connect' in tmp:
- tmp = None
- tmp2 = os.popen(gitcmd2).read()
- if 'unable to connect' in tmp2:
- tmp2 = None
- #This is for those repos have tag like: refs/tags/1.2.2
- phash = pversion.rsplit("+")[-1]
- if tmp:
- tmpline = tmp.split("\n")
- verflag = 0
- pupver = pversion
- for line in tmpline:
- if len(line)==0:
- break;
- puptag = line.split("/")[-1]
- upstr_regex = d.getVar('REGEX', True)
- if upstr_regex:
- puptag = re.search(upstr_regex, puptag)
- else:
- puptag = re.search("(?P<pver>([0-9][\.|_]?)+)", puptag)
- if puptag == None:
- continue
- puptag = puptag.group('pver')
- puptag = re.sub("_",".",puptag)
- plocaltag = pupver.split("+git")[0]
- if "git" in plocaltag:
- plocaltag = plocaltag.split("-")[0]
- result = bb.utils.vercmp(("0", puptag, ""), ("0", plocaltag, ""))
-
- if result > 0:
- verflag = 1
- pupver = puptag
- elif verflag == 0 :
- pupver = plocaltag
- #This is for those no tag repo
- elif tmp2:
+ if pproto in ['http', 'https', 'ftp', 'git']:
+ try:
+ ud = bb.fetch2.FetchData(psrcuri, d)
+ pupver = ud.method.latest_versionstring(ud, d)
+ if pproto == 'git':
+ if pupver == "":
pupver = pversion.rsplit("+")[0]
- phash = pupver
- else:
- pstatus = "ErrGitAccess"
- if not ('ErrGitAccess' in pstatus):
-
- latest_head = tmp2.rsplit("\t")[0][:7]
- tmp3 = re.search('(?P<git_ver>(\d+[\.-]?)+)(?P<git_prefix>(\+git[r|\-|]?)AUTOINC\+)(?P<head_md5>([\w|_]+))', pversion)
- tmp4 = re.search('(?P<git_ver>(\d+[\.-]?)+)(?P<git_prefix>(\+git[r|\-|]?)AUTOINC\+)(?P<head_md5>([\w|_]+))', pupver)
- if not tmp4:
- tmp4 = re.search('(?P<git_ver>(\d+[\.-]?)+)', pupver)
-
- if tmp3:
- # Get status of the package - MATCH/UPDATE
- result = bb.utils.vercmp(("0", tmp3.group('git_ver'), ""), ("0",tmp3.group('git_ver') , ""))
- # Get the latest tag
- pstatus = 'MATCH'
- if result < 0:
- latest_pv = tmp3.group('git_ver')
- else:
- latest_pv = pupver
- if not(tmp3.group('head_md5')[:7] in latest_head) or not(latest_head in tmp3.group('head_md5')[:7]):
- pstatus = 'UPDATE'
-
- git_prefix = tmp3.group('git_prefix')
- pupver = latest_pv + tmp3.group('git_prefix') + latest_head
- else:
- if not tmp3:
- bb.plain("#DEBUG# Package %s: current version (%s) doesn't match the usual pattern" %(pname, pversion))
- elif type == 'svn':
- ud = bb.fetch2.FetchData(uri, d)
-
- svnFetcher = bb.fetch2.svn.Svn(d)
- svnFetcher.urldata_init(ud, d)
- try:
- pupver = svnFetcher.latest_revision(ud, d, ud.names[0])
- except bb.fetch2.FetchError:
- pstatus = "ErrSvnAccess"
-
- if pupver:
- if pupver in pversion:
- pstatus = "MATCH"
- else:
- pstatus = "UPDATE"
- else:
- pstatus = "ErrSvnAccess"
-
- if 'rev' in ud.parm:
- pcurver = ud.parm['rev']
-
- if pstatus != "ErrSvnAccess":
- tag = pversion.rsplit("+svn")[0]
- svn_prefix = re.search('(\+svn[r|\-]?)', pversion)
- if tag and svn_prefix:
- pupver = tag + svn_prefix.group() + pupver
-
- elif type == 'cvs':
- pupver = "HEAD"
- pstatus = "UPDATE"
- elif type == 'file':
- """local file is always up-to-date"""
- pupver = pcurver
- pstatus = "MATCH"
+ if re.search(pversion, "gitrAUTOINC"):
+ pupver += "+gitrAUTOINC+"
+ else:
+ pupver += "+gitAUTOINC+"
+ latest_revision = ud.method.latest_revision(ud, d, ud.names[0])
+ pupver += latest_revision[:10]
+ except Exception as inst:
+ bb.warn("%s: unexpected error: %s" % (pname, repr(inst)))
+ pstatus = "ErrAccess"
+ elif pproto == "file":
+ """Local files are always updated"""
+ pupver = pversion
else:
- pstatus = "ErrUnsupportedProto"
+ pstatus = "ErrUnsupportedProto"
+ bb.note("do_checkpkg, protocol %s isn't implemented" % pproto)
- if re.match("Err", pstatus):
- pstatus += ":%s%s" % (host, path)
+ if not pupver:
+ pupver = "N/A"
+ elif pupver == pversion:
+ pstatus = "MATCH"
+ else:
+ pstatus = "UPDATE"
"""Read from manual distro tracking fields as alternative"""
pmver = d.getVar("RECIPE_UPSTREAM_VERSION", True)
if not pmver:
- pmver = "N/A"
- pmstatus = "ErrNoRecipeData"
+ pmver = "N/A"
+ pmstatus = "ErrNoRecipeData"
+ elif pmver == pupver:
+ pmstatus = "MATCH"
else:
- if pmver == pcurver:
- pmstatus = "MATCH"
- else:
- pmstatus = "UPDATE"
+ pmstatus = "UPDATE"
- psrcuri = psrcuri.split()[0]
pdepends = "".join(pdepends.split("\t"))
pdesc = "".join(pdesc.split("\t"))
no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 2ac62747a2..4e429d78d8 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -49,5 +49,8 @@ python () {
for task in d.getVar("SRCTREECOVEREDTASKS", True).split():
bb.build.deltask(task, d)
+
+ # Ensure compilation happens every time
+ d.setVarFlag('do_compile', 'nostamp', '1')
}
diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index afd3fd2252..2bf1e4bd1b 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -18,13 +18,16 @@ else
fi
}
-python populate_packages_append() {
+python () {
font_pkgs = d.getVar('FONT_PACKAGES', True).split()
deps = d.getVar("FONT_EXTRA_RDEPENDS", True)
for pkg in font_pkgs:
if deps: d.appendVar('RDEPENDS_' + pkg, ' '+deps)
+}
+python add_fontcache_postinsts() {
+ for pkg in d.getVar('FONT_PACKAGES', True).split():
bb.note("adding fonts postinst and postrm scripts to %s" % pkg)
postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
if not postinst:
@@ -38,3 +41,5 @@ python populate_packages_append() {
postrm += d.getVar('fontcache_common', True)
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
+
+PACKAGEFUNCS += "add_fontcache_postinsts"
diff --git a/meta/classes/gnomebase.bbclass b/meta/classes/gnomebase.bbclass
index 739bf60649..6ca13cb1e0 100644
--- a/meta/classes/gnomebase.bbclass
+++ b/meta/classes/gnomebase.bbclass
@@ -9,13 +9,13 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}
DEPENDS += "gnome-common-native"
FILES_${PN} += "${datadir}/application-registry \
- ${datadir}/mime-info \
- ${datadir}/mime/packages \
- ${datadir}/mime/application \
- ${datadir}/gnome-2.0 \
- ${datadir}/polkit* \
- ${datadir}/GConf \
- ${datadir}/glib-2.0/schemas \
+ ${datadir}/mime-info \
+ ${datadir}/mime/packages \
+ ${datadir}/mime/application \
+ ${datadir}/gnome-2.0 \
+ ${datadir}/polkit* \
+ ${datadir}/GConf \
+ ${datadir}/glib-2.0/schemas \
"
FILES_${PN}-doc += "${datadir}/devhelp"
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 505d032cc8..47bd35e049 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -7,7 +7,7 @@
# Provide grub-efi specific functions for building bootable images.
# External variables
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
# ${LABELS} - a list of targets for the automatic config
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 3ec8c0667d..2f9e3cf8ef 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -91,6 +91,10 @@ def create_path(compilers, bb, d):
return staging
def use_icc(bb,d):
+ if d.getVar('ICECC_DISABLED') == "1":
+ # don't even try it, when explicitly disabled
+ return "no"
+
# allarch recipes don't use compiler
if icc_is_allarch(bb, d):
return "no"
@@ -133,8 +137,7 @@ def use_icc(bb,d):
return "yes"
def icc_is_allarch(bb, d):
- return \
- bb.data.inherits_class("allarch", d);
+ return d.getVar("PACKAGE_ARCH") == "all"
def icc_is_kernel(bb, d):
return \
@@ -148,10 +151,6 @@ def icc_is_native(bb, d):
# Don't pollute allarch signatures with TARGET_FPU
icc_version[vardepsexclude] += "TARGET_FPU"
def icc_version(bb, d):
- if d.getVar('ICECC_DISABLED') == "1":
- # don't even try it, when explicitly disabled
- return ""
-
if use_icc(bb, d) == "no":
return ""
@@ -179,7 +178,7 @@ def icc_version(bb, d):
return tar_file
def icc_path(bb,d):
- if d.getVar('ICECC_DISABLED') == "1":
+ if use_icc(bb, d) == "no":
# don't create unnecessary directories when icecc is disabled
return
@@ -246,7 +245,7 @@ def set_icecc_env():
return
set_icecc_env() {
- if [ "${ICECC_DISABLED}" = "1" ]
+ if [ "${@use_icc(bb, d)}" = "no" ]
then
return
fi
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass
new file mode 100644
index 0000000000..aa17cc8f9e
--- /dev/null
+++ b/meta/classes/image-buildinfo.bbclass
@@ -0,0 +1,69 @@
+#
+# Writes build information to target filesystem on /etc/build
+#
+# Copyright (C) 2014 Intel Corporation
+# Author: Alejandro Enedino Hernandez Samaniego <alejandro.hernandez@intel.com>
+#
+# Licensed under the MIT license, see COPYING.MIT for details
+#
+# Usage: add INHERIT += "image-buildinfo" to your conf file
+#
+
+# Desired variables to display
+IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
+
+# From buildhistory.bbclass
+def image_buildinfo_outputvars(vars, listvars, d):
+ vars = vars.split()
+ listvars = listvars.split()
+ ret = ""
+ for var in vars:
+ value = d.getVar(var, True) or ""
+ if (d.getVarFlag(var, 'type') == "list"):
+ value = oe.utils.squashspaces(value)
+ ret += "%s = %s\n" % (var, value)
+ return ret.rstrip('\n')
+
+# Gets git branch's status (clean or dirty)
+def get_layer_git_status(path):
+ f = os.popen("cd %s; git diff --stat 2>&1 | tail -n 1" % path)
+ data = f.read()
+ if f.close() is None:
+ if len(data) != 0:
+ return "-- modified"
+ return ""
+
+# Returns layer revisions along with their respective status
+def get_layer_revs(d):
+ layers = (d.getVar("BBLAYERS", True) or "").split()
+ medadata_revs = ["%-17s = %s:%s %s" % (os.path.basename(i), \
+ base_get_metadata_git_branch(i, None).strip(), \
+ base_get_metadata_git_revision(i, None), \
+ get_layer_git_status(i)) \
+ for i in layers]
+ return '\n'.join(medadata_revs)
+
+def buildinfo_target(d):
+ # Get context
+ if d.getVar('BB_WORKERCONTEXT', True) != '1':
+ return ""
+ # Single and list variables to be read
+ vars = (d.getVar("IMAGE_BUILDINFO_VARS", True) or "")
+ listvars = (d.getVar("IMAGE_BUILDINFO_LVARS", True) or "")
+ return image_buildinfo_outputvars(vars, listvars, d)
+
+# Write build information to target filesystem
+buildinfo () {
+cat > ${IMAGE_ROOTFS}${sysconfdir}/build << END
+-----------------------
+Build Configuration: |
+-----------------------
+${@buildinfo_target(d)}
+-----------------------
+Layer Revisions: |
+-----------------------
+${@get_layer_revs(d)}
+END
+}
+
+IMAGE_PREPROCESS_COMMAND += "buildinfo;"
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index c7e6937fa9..7b770fb353 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -2,7 +2,7 @@
AUTO_SYSLINUXCFG = "1"
INITRD_IMAGE ?= "core-image-minimal-initramfs"
INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz"
-SYSLINUX_ROOT = "root=/dev/ram0 "
+SYSLINUX_ROOT = "root=/dev/ram0"
SYSLINUX_TIMEOUT ?= "10"
SYSLINUX_LABELS ?= "boot install"
LABELS_append = " ${SYSLINUX_LABELS} "
diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index 11f082b373..c455a8e2d4 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -16,7 +16,7 @@ mklibs_optimize_image_doit() {
> ${WORKDIR}/mklibs/executables.list
case ${TARGET_ARCH} in
- powerpc | mips | microblaze )
+ powerpc | mips | mipsel | microblaze )
dynamic_loader="${base_libdir}/ld.so.1"
;;
powerpc64)
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index 124a090605..89318560db 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -11,7 +11,7 @@ BB_DEFAULT_TASK = "generate_swabber_report"
# Ideally these should be fixed but as a temporary measure disable parallel
# builds for troublesome recipes
PARALLEL_MAKE_pn-openssl = ""
-PARALLEL_MAKE_pn-eglibc = ""
+PARALLEL_MAKE_pn-glibc = ""
PARALLEL_MAKE_pn-glib-2.0 = ""
PARALLEL_MAKE_pn-libxml2 = ""
PARALLEL_MAKE_pn-readline = ""
diff --git a/meta/classes/image-vmdk.bbclass b/meta/classes/image-vmdk.bbclass
index 703c00ea3c..77b7facd41 100644
--- a/meta/classes/image-vmdk.bbclass
+++ b/meta/classes/image-vmdk.bbclass
@@ -1,7 +1,7 @@
#NOISO = "1"
-SYSLINUX_ROOT = "root=/dev/hda2 "
+SYSLINUX_ROOT ?= "root=/dev/sda2"
SYSLINUX_PROMPT ?= "0"
SYSLINUX_TIMEOUT ?= "10"
SYSLINUX_LABELS = "boot"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a03b880402..b2a3e97820 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -52,7 +52,10 @@ def check_image_features(d):
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
for feature in features:
if feature not in valid_features:
- bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
+ if bb.utils.contains('EXTRA_IMAGE_FEATURES', feature, True, False, d):
+ raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES (added via EXTRA_IMAGE_FEATURES) is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
+ else:
+ raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
IMAGE_INSTALL ?= ""
IMAGE_INSTALL[type] = "list"
@@ -63,6 +66,7 @@ PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
EXCLUDE_FROM_WORLD = "1"
USE_DEVFS ?= "1"
+USE_DEPMOD ?= "1"
PID = "${@os.getpid()}"
@@ -72,10 +76,37 @@ LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
LDCONFIGDEPEND_libc-uclibc = ""
LDCONFIGDEPEND_libc-musl = ""
-do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
-do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
+do_rootfs[depends] += " \
+ makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \
+ virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \
+ virtual/kernel:do_packagedata"
do_rootfs[recrdeptask] += "do_packagedata"
-do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
+
+def command_variables(d):
+ return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND',
+ 'IMAGE_PREPROCESS_COMMAND','ROOTFS_POSTPROCESS_COMMAND','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
+ 'RPM_POSTPROCESS_COMMANDS']
+
+python () {
+ variables = command_variables(d)
+ for var in variables:
+ if d.getVar(var):
+ d.setVarFlag(var, 'func', '1')
+}
+
+def rootfs_variables(d):
+ from oe.rootfs import variable_depends
+ variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPEDEP_','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
+ 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS','SDK_OS',
+ 'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','MULTILIBRE_ALLOW_REP',
+ 'MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
+ 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','BUILDNAME','USE_DEVFS',
+ 'COMPRESSIONTYPES']
+ variables.extend(command_variables(d))
+ variables.extend(variable_depends(d))
+ return " ".join(variables)
+
+do_rootfs[vardeps] += "${@rootfs_variables(d)}"
do_build[depends] += "virtual/kernel:do_deploy"
@@ -120,17 +151,6 @@ python () {
d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
- # Ensure we have the vendor list for complementary package handling
- ml_vendor_list = ""
- multilibs = d.getVar('MULTILIBS', True) or ""
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- localdata = bb.data.createCopy(d)
- vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False)
- ml_vendor_list += " " + vendor
- d.setVar('MULTILIB_VENDORS', ml_vendor_list)
-
check_image_features(d)
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
if initramfs_image != "":
@@ -138,18 +158,17 @@ python () {
d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_rootfs" % initramfs_image)
}
-IMAGE_CLASSES ?= "image_types"
+IMAGE_CLASSES += "image_types"
inherit ${IMAGE_CLASSES}
IMAGE_POSTPROCESS_COMMAND ?= ""
-MACHINE_POSTPROCESS_COMMAND ?= ""
# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
# Enable postinst logging if debug-tweaks is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
# Write manifest
IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
-ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; "
+ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
# Set default postinst log file
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
# Set default target for systemd images
@@ -161,7 +180,9 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', True).split()))}"
-PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
+# Prefer image, but use the fallback files for lookups if the image ones
+# aren't yet available.
+PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
@@ -172,17 +193,17 @@ do_rootfs[cleandirs] += "${S}"
do_rootfs[umask] = "022"
# A hook function to support read-only-rootfs IMAGE_FEATURES
-# Currently, it only supports sysvinit system.
read_only_rootfs_hook () {
+ # Tweak the mount option and fs_passno for rootfs in fstab
+ sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+
if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
- # Tweak the mount option and fs_passno for rootfs in fstab
- sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
- # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
+ # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS
fi
- # Run populate-volatile.sh at rootfs time to set up basic files
- # and directories to support read-only rootfs.
+ # Run populate-volatile.sh at rootfs time to set up basic files
+ # and directories to support read-only rootfs.
if [ -x ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh ]; then
${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
fi
@@ -199,6 +220,27 @@ read_only_rootfs_hook () {
fi
fi
fi
+
+ if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+ # Update user database files so that services don't fail for a read-only systemd system
+ for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
+ [ -e $conffile ] || continue
+ grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
+ if [ "$type" = "u" ]; then
+ useradd_params=""
+ [ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
+ [ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
+ useradd_params="$useradd_params --system $name"
+ eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
+ elif [ "$type" = "g" ]; then
+ groupadd_params=""
+ [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
+ groupadd_params="$groupadd_params --system $name"
+ eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
+ fi
+ done
+ done
+ fi
}
PACKAGE_EXCLUDE ??= ""
@@ -350,16 +392,10 @@ python write_image_manifest () {
image_manifest.write(image_list_installed_packages(d, 'ver'))
}
-# Make login manager(s) enable automatic login.
-# Useful for devices where we do not want to log in at all (e.g. phones)
-set_image_autologin () {
- sed -i 's%^AUTOLOGIN=\"false"%AUTOLOGIN="true"%g' ${IMAGE_ROOTFS}/etc/sysconfig/gpelogin
-}
-
# Can be use to create /etc/timestamp during image construction to give a reasonably
# sane default time setting
rootfs_update_timestamp () {
- date -u +%4Y%2m%2d%2H%2M >${IMAGE_ROOTFS}/etc/timestamp
+ date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
}
# Prevent X from being started
@@ -393,6 +429,7 @@ do_compile[noexec] = "1"
do_install[noexec] = "1"
do_populate_sysroot[noexec] = "1"
do_package[noexec] = "1"
+do_package_qa[noexec] = "1"
do_packagedata[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 99a07da0fc..d6cc87f79d 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -13,7 +13,7 @@ def imagetypes_getdepends(d):
deps = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
- if type == "vmdk" or type == "live" or type == "iso" or type == "hddimg":
+ if type in ["vmdk", "live", "iso", "hddimg"]:
type = "ext3"
basetype = type
for ctype in ctypes:
@@ -21,6 +21,8 @@ def imagetypes_getdepends(d):
basetype = type[:-len("." + ctype)]
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
break
+ for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
+ adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
depstr = ""
@@ -57,19 +59,24 @@ IMAGE_CMD_ext3 = "oe_mkext234fs ext3 ${EXTRA_IMAGECMD}"
IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ${EXTRA_IMAGECMD}"
IMAGE_CMD_btrfs () {
- touch ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
- mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
+ dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs count=${ROOTFS_SIZE} bs=1024
+ mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
}
IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
+IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
IMAGE_CMD_tar = "tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ."
+do_rootfs[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
- if [ ! -e ${IMAGE_ROOTFS}/init ]; then
- mkdir -p ${WORKDIR}/cpio_append
- touch ${WORKDIR}/cpio_append/init
+ if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then
+ if [ -L ${IMAGE_ROOTFS}/sbin/init -o -e ${IMAGE_ROOTFS}/sbin/init ]; then
+ ln -sf /sbin/init ${WORKDIR}/cpio_append/init
+ else
+ touch ${WORKDIR}/cpio_append/init
+ fi
(cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
fi
}
@@ -96,6 +103,8 @@ IMAGE_CMD_ubi () {
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}
ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg
}
+IMAGE_TYPEDEP_ubi = "ubifs"
+
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
EXTRA_IMAGECMD = ""
@@ -121,12 +130,27 @@ IMAGE_DEPENDS_ext4 = "e2fsprogs-native"
IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
IMAGE_DEPENDS_squashfs-xz = "squashfs-tools-native"
+IMAGE_DEPENDS_squashfs-lzo = "squashfs-tools-native"
IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 jffs2.sum cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf"
+IMAGE_TYPES = " \
+ jffs2 jffs2.sum \
+ cramfs \
+ ext2 ext2.gz ext2.bz2 ext2.lzma \
+ ext3 ext3.gz \
+ btrfs \
+ iso \
+ hddimg \
+ squashfs squashfs-xz squashfs-lzo \
+ ubi ubifs \
+ tar tar.gz tar.bz2 tar.xz tar.lz4 \
+ cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
+ vmdk \
+ elf \
+"
COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 9ffe6751d8..143ec46c55 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -29,7 +29,7 @@ QA_SANE = "True"
WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
textrel already-stripped incompatible-license files-invalid \
installed-vs-shipped compile-host-path install-host-path \
- pn-overrides infodir \
+ pn-overrides infodir build-deps file-rdeps \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -151,24 +151,24 @@ def package_qa_clean_path(path,d):
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
return path.replace(d.getVar('TMPDIR',True),"")
-def package_qa_write_error(error, d):
+def package_qa_write_error(type, error, d):
logfile = d.getVar('QA_LOGFILE', True)
if logfile:
p = d.getVar('P', True)
f = file( logfile, "a+")
- print >> f, "%s: %s" % (p, error)
+ print >> f, "%s: %s [%s]" % (p, error, type)
f.close()
def package_qa_handle_error(error_class, error_msg, d):
- package_qa_write_error(error_msg, d)
+ package_qa_write_error(error_class, error_msg, d)
if error_class in (d.getVar("ERROR_QA", True) or "").split():
- bb.error("QA Issue: %s" % error_msg)
+ bb.error("QA Issue: %s [%s]" % (error_msg, error_class))
d.setVar("QA_SANE", False)
return False
elif error_class in (d.getVar("WARN_QA", True) or "").split():
- bb.warn("QA Issue: %s" % error_msg)
+ bb.warn("QA Issue: %s [%s]" % (error_msg, error_class))
else:
- bb.note("QA Issue: %s" % error_msg)
+ bb.note("QA Issue: %s [%s]" % (error_msg, error_class))
return True
QAPATHTEST[libexec] = "package_qa_check_libexec"
@@ -180,7 +180,7 @@ def package_qa_check_libexec(path,name, d, elf, messages):
return True
if 'libexec' in path.split(os.path.sep):
- messages.append("%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec))
+ messages["libexec"] = "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)
return False
return True
@@ -208,7 +208,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
rpath = m.group(1)
for dir in bad_dirs:
if dir in rpath:
- messages.append("package %s contains bad RPATH %s in file %s" % (name, rpath, file))
+ messages["rpaths"] = "package %s contains bad RPATH %s in file %s" % (name, rpath, file)
QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths"
def package_qa_check_useless_rpaths(file, name, d, elf, messages):
@@ -238,7 +238,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
- messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
+ messages["useless-rpaths"] = "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)
QAPATHTEST[dev-so] = "package_qa_check_dev"
def package_qa_check_dev(path, name, d, elf, messages):
@@ -247,8 +247,8 @@ def package_qa_check_dev(path, name, d, elf, messages):
"""
if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
- messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
- (name, package_qa_clean_path(path,d)))
+ messages["dev-so"] = "non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
+ (name, package_qa_clean_path(path,d))
QAPATHTEST[staticdev] = "package_qa_check_staticdev"
def package_qa_check_staticdev(path, name, d, elf, messages):
@@ -260,8 +260,8 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
"""
if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a"):
- messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
- (name, package_qa_clean_path(path,d)))
+ messages["staticdev"] = "non -staticdev package contains static .a library: %s path '%s'" % \
+ (name, package_qa_clean_path(path,d))
def package_qa_check_libdir(d):
"""
@@ -315,8 +315,8 @@ def package_qa_check_dbg(path, name, d, elf, messages):
if not "-dbg" in name and not "-ptest" in name:
if '.debug' in path.split(os.path.sep):
- messages.append("non debug package contains .debug directory: %s path %s" % \
- (name, package_qa_clean_path(path,d)))
+ messages["debug-files"] = "non debug package contains .debug directory: %s path %s" % \
+ (name, package_qa_clean_path(path,d))
QAPATHTEST[perms] = "package_qa_check_perm"
def package_qa_check_perm(path,name,d, elf, messages):
@@ -461,16 +461,16 @@ def package_qa_check_arch(path,name,d, elf, messages):
# Check the architecture and endiannes of the binary
if not ((machine == elf.machine()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32"))):
- messages.append("Architecture did not match (%d to %d) on %s" % \
- (machine, elf.machine(), package_qa_clean_path(path,d)))
+ ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ messages["arch"] = "Architecture did not match (%d to %d) on %s" % \
+ (machine, elf.machine(), package_qa_clean_path(path,d))
elif not ((bits == elf.abiSize()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32"))):
- messages.append("Bit size did not match (%d to %d) %s on %s" % \
- (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
+ ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ messages["arch"] = "Bit size did not match (%d to %d) %s on %s" % \
+ (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d))
elif not littleendian == elf.isLittleEndian():
- messages.append("Endiannes did not match (%d to %d) on %s" % \
- (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
+ messages["arch"] = "Endiannes did not match (%d to %d) on %s" % \
+ (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d))
QAPATHTEST[desktop] = "package_qa_check_desktop"
def package_qa_check_desktop(path, name, d, elf, messages):
@@ -482,7 +482,7 @@ def package_qa_check_desktop(path, name, d, elf, messages):
output = os.popen("%s %s" % (desktop_file_validate, path))
# This only produces output on errors
for l in output:
- messages.append("Desktop file issue: " + l.strip())
+ messages["desktop"] = "Desktop file issue: " + l.strip()
QAPATHTEST[textrel] = "package_qa_textrel"
def package_qa_textrel(path, name, d, elf, messages):
@@ -506,7 +506,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = False
if not sane:
- messages.append("ELF binary '%s' has relocations in .text" % path)
+ messages["textrel"] = "ELF binary '%s' has relocations in .text" % path
QAPATHTEST[ldflags] = "package_qa_hash_style"
def package_qa_hash_style(path, name, d, elf, messages):
@@ -541,7 +541,7 @@ def package_qa_hash_style(path, name, d, elf, messages):
sane = True
if has_syms and not sane:
- messages.append("No GNU_HASH in the elf binary: '%s'" % path)
+ messages["ldflags"] = "No GNU_HASH in the elf binary: '%s'" % path
QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
@@ -561,7 +561,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
with open(path) as f:
file_content = f.read()
if tmpdir in file_content:
- messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
+ messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
@@ -580,7 +580,7 @@ def package_qa_check_xorg_driver_abi(path, name, d, elf, messages):
for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + name, True) or ""):
if rdep.startswith("%sxorg-abi-" % mlprefix):
return
- messages.append("Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path)))
+ messages["xorg-driver-abi"] = "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path))
QAPATHTEST[infodir] = "package_qa_check_infodir"
def package_qa_check_infodir(path, name, d, elf, messages):
@@ -590,7 +590,7 @@ def package_qa_check_infodir(path, name, d, elf, messages):
infodir = d.expand("${infodir}/dir")
if infodir in path:
- messages.append("The /usr/share/info/dir file is not meant to be shipped in a particular package.")
+ messages["infodir"] = "The /usr/share/info/dir file is not meant to be shipped in a particular package."
QAPATHTEST[symlink-to-sysroot] = "package_qa_check_symlink_to_sysroot"
def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
@@ -603,7 +603,7 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
tmpdir = d.getVar('TMPDIR', True)
if target.startswith(tmpdir):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
- messages.append("Symlink %s in %s points to TMPDIR" % (trimmed, name))
+ messages["symlink-to-sysroot"] = "Symlink %s in %s points to TMPDIR" % (trimmed, name)
def package_qa_check_license(workdir, d):
"""
@@ -735,8 +735,8 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
- warnings = []
- errors = []
+ warnings = {}
+ errors = {}
for path in pkgfiles[package]:
elf = oe.qa.ELFFile(path)
try:
@@ -749,15 +749,13 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
func(path, package, d, elf, errors)
for w in warnings:
- bb.warn("QA Issue: %s" % w)
- package_qa_write_error(w, d)
+ package_qa_handle_error(w, warnings[w], d)
for e in errors:
- bb.error("QA Issue: %s" % e)
- package_qa_write_error(e, d)
+ package_qa_handle_error(e, errors[e], d)
return len(errors) == 0
-def package_qa_check_rdepends(pkg, pkgdest, skip, d):
+def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# Don't do this check for kernel/module recipes, there aren't too many debug/development
# packages and you can get false positives e.g. on kernel-module-lirc-dev
if bb.data.inherits_class("kernel", d) or bb.data.inherits_class("module-base", d):
@@ -773,13 +771,102 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
# Now do the sanity check!!!
- for rdepend in rdepends:
- if "-dbg" in rdepend and "debug-deps" not in skip:
- error_msg = "%s rdepends on %s" % (pkg,rdepend)
- sane = package_qa_handle_error("debug-deps", error_msg, d)
- if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
- error_msg = "%s rdepends on %s" % (pkg, rdepend)
- sane = package_qa_handle_error("dev-deps", error_msg, d)
+ if "build-deps" not in skip:
+ for rdepend in rdepends:
+ if "-dbg" in rdepend and "debug-deps" not in skip:
+ error_msg = "%s rdepends on %s" % (pkg,rdepend)
+ sane = package_qa_handle_error("debug-deps", error_msg, d)
+ if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
+ error_msg = "%s rdepends on %s" % (pkg, rdepend)
+ sane = package_qa_handle_error("dev-deps", error_msg, d)
+ if rdepend not in packages:
+ rdep_data = oe.packagedata.read_subpkgdata(rdepend, d)
+ if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
+ continue
+ if not rdep_data or not 'PN' in rdep_data:
+ pkgdata_dir = d.getVar("PKGDATA_DIR", True)
+ try:
+ possibles = os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdepend))
+ except OSError:
+ possibles = []
+ for p in possibles:
+ rdep_data = oe.packagedata.read_subpkgdata(p, d)
+ if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
+ break
+ if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
+ continue
+ error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
+ sane = package_qa_handle_error("build-deps", error_msg, d)
+
+ if "file-rdeps" not in skip:
+ ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
+ if bb.data.inherits_class('nativesdk', d):
+ ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
+ # For Saving the FILERDEPENDS
+ filerdepends = set()
+ rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
+ for key in rdep_data:
+ if key.startswith("FILERDEPENDS_"):
+ for subkey in rdep_data[key].split():
+ filerdepends.add(subkey)
+ filerdepends -= ignored_file_rdeps
+
+ if filerdepends:
+ next = rdepends
+ done = rdepends[:]
+ # Find all the rdepends on the dependency chain
+ while next:
+ new = []
+ for rdep in next:
+ rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
+ sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
+ if not sub_rdeps:
+ continue
+ for sub_rdep in sub_rdeps.split():
+ if sub_rdep in done:
+ continue
+ if not sub_rdep.startswith('(') and \
+ oe.packagedata.has_subpkgdata(sub_rdep, d):
+ # It's a new rdep
+ done.append(sub_rdep)
+ new.append(sub_rdep)
+ next = new
+
+ # Add the rprovides of itself
+ if pkg not in done:
+ done.insert(0, pkg)
+
+ # The python is not a package, but python-core provides it, so
+ # skip checking /usr/bin/python if python is in the rdeps, in
+ # case there is a RDEPENDS_pkg = "python" in the recipe.
+ for py in [ d.getVar('MLPREFIX', True) + "python", "python" ]:
+ if py in done:
+ filerdepends.discard("/usr/bin/python")
+ done.remove(py)
+ for rdep in done:
+ # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
+ rdep_rprovides = set()
+ rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
+ for key in rdep_data:
+ if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
+ for subkey in rdep_data[key].split():
+ rdep_rprovides.add(subkey)
+ # Add the files list to the rprovides
+ if key == "FILES_INFO":
+ # Use eval() to make it as a dict
+ for subkey in eval(rdep_data[key]):
+ rdep_rprovides.add(subkey)
+ filerdepends -= rdep_rprovides
+ if not filerdepends:
+ # Break if all the file rdepends are met
+ break
+ else:
+ # Clear it for the next loop
+ rdep_rprovides.clear()
+ if filerdepends:
+ error_msg = "%s requires %s, but no providers in its RDEPENDS" % \
+ (pkg, ', '.join(str(e) for e in filerdepends))
+ sane = package_qa_handle_error("file-rdeps", error_msg, d)
return sane
@@ -822,6 +909,7 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
+ import oe.packagedata
bb.note("DO PACKAGE QA")
@@ -872,6 +960,11 @@ python do_package_qa () {
# The package name matches the [a-z0-9.+-]+ regular expression
pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ taskdeps = set()
+ for dep in taskdepdata:
+ taskdeps.add(taskdepdata[dep][0])
+
g = globals()
walk_sane = True
rdepends_sane = True
@@ -902,7 +995,7 @@ python do_package_qa () {
path = "%s/%s" % (pkgdest, package)
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
walk_sane = False
- if not package_qa_check_rdepends(package, pkgdest, skip, d):
+ if not package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d):
rdepends_sane = False
if not package_qa_check_deps(package, pkgdest, skip, d):
deps_sane = False
@@ -917,7 +1010,8 @@ python do_package_qa () {
bb.note("DONE with PACKAGE QA")
}
-addtask do_package_qa after do_package before do_build
+do_package_qa[rdeptask] = "do_packagedata"
+addtask do_package_qa after do_packagedata do_package before do_build
SSTATETASKS += "do_package_qa"
do_package_qa[sstate-inputdirs] = ""
@@ -1018,12 +1112,25 @@ do_configure[postfuncs] += "do_qa_configure "
python () {
tests = d.getVar('ALL_QA', True).split()
if "desktop" in tests:
- d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native")
+ d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
###########################################################################
# Check various variables
###########################################################################
+ # Checking ${FILESEXTRAPATHS}
+ extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
+ if '__default' not in extrapaths.split(":"):
+ msg = "FILESEXTRAPATHS-variable, must always use _prepend (or _append)\n"
+ msg += "type of assignment, and don't forget the colon.\n"
+ msg += "Please assign it with the format of:\n"
+ msg += " FILESEXTRAPATHS_append := \":${THISDIR}/Your_Files_Path\" or\n"
+ msg += " FILESEXTRAPATHS_prepend := \"${THISDIR}/Your_Files_Path:\"\n"
+ msg += "in your bbappend file\n\n"
+ msg += "Your incorrect assignment is:\n"
+ msg += "%s\n" % extrapaths
+ bb.warn(msg)
+
if d.getVar('do_stage', True) is not None:
bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with OE-core" % d.getVar("FILE", True))
@@ -1040,6 +1147,8 @@ python () {
for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
if d.getVar(var):
issues.append(var)
+ else:
+ d.setVarFlag('do_package_qa', 'rdeptask', '')
for i in issues:
package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d)
}
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 0c045c91e9..32b80856e0 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -70,12 +70,12 @@ python split_kernel_module_packages () {
m = kerverrexp.match(kernelver)
if m:
kernelver_stripped = m.group(1)
- staging_kernel_dir = d.getVar("STAGING_KERNEL_DIR", True)
+ staging_kernel_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
system_map_file = "%s/boot/System.map-%s" % (dvar, kernelver)
if not os.path.exists(system_map_file):
system_map_file = "%s/System.map-%s" % (staging_kernel_dir, kernelver)
if not os.path.exists(system_map_file):
- bb.fatal("System.map-%s does not exist in '%s/boot' nor STAGING_KERNEL_DIR '%s'" % (kernelver, dvar, staging_kernel_dir))
+ bb.fatal("System.map-%s does not exist in '%s/boot' nor STAGING_KERNEL_BUILDDIR '%s'" % (kernelver, dvar, staging_kernel_dir))
cmd = "depmod -n -a -b %s -F %s %s" % (dvar, system_map_file, kernelver_stripped)
f = os.popen(cmd, 'r')
@@ -132,12 +132,18 @@ python split_kernel_module_packages () {
# appropriate modprobe commands to the postinst
autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split()
autoload = d.getVar('module_autoload_%s' % basename, True)
- if autoload:
- bb.error("KERNEL_MODULE_AUTOLOAD has replaced module_autoload_%s, please replace it!" % basename)
+ if autoload and autoload == basename:
+ bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename)
+ if autoload and basename not in autoloadlist:
+ bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
if basename in autoloadlist:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
- f.write('%s\n' % basename)
+ if autoload:
+ for m in autoload.split():
+ f.write('%s\n' % m)
+ else:
+ f.write('%s\n' % basename)
f.close()
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
if not postinst:
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 6010dc94e0..223825e546 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -1,5 +1,3 @@
-S = "${WORKDIR}/linux"
-
# remove tasks that modify the source tree in case externalsrc is inherited
SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_patch"
@@ -71,6 +69,11 @@ do_patch() {
fi
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+ machine_srcrev="${SRCREV_machine}"
+ if [ -z "${machine_srcrev}" ]; then
+ # fallback to SRCREV if a non machine_meta tree is being built
+ machine_srcrev="${SRCREV}"
+ fi
# if we have a defined/set meta branch we should not be generating
# any meta data. The passed branch has what we need.
@@ -80,8 +83,7 @@ do_patch() {
createme ${createme_flags} ${ARCH} ${machine_branch}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not create ${machine_branch}"
- exit 1
+ bbfatal "Could not create ${machine_branch}"
fi
sccs="${@" ".join(find_sccs(d))}"
@@ -110,36 +112,27 @@ do_patch() {
done
fi
- if [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ]; then
- updateme_flags="--branch ${machine_branch}"
- fi
-
# updates or generates the target description
updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
${includes} ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not update ${machine_branch}"
- exit 1
+ bbfatal "Could not update ${machine_branch}"
fi
# executes and modifies the source tree as required
patchme ${KMACHINE}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not apply patches for ${KMACHINE}."
- echo " Patch failures can be resolved in the devshell (bitbake -c devshell ${PN})"
- exit 1
+ bberror "Could not apply patches for ${KMACHINE}."
+ bbfatal "Patch failures can be resolved in the devshell (bitbake -c devshell ${PN})"
fi
- # Perform a final check. If something other than the default kernel
- # branch was requested, and that's not where we ended up, then we
- # should thrown an error, since we aren't building what was expected
- final_branch="$(git symbolic-ref HEAD 2>/dev/null)"
- final_branch=${final_branch##refs/heads/}
- if [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ] &&
- [ "${final_branch}" != "${machine_branch}" ]; then
- echo "ERROR: branch ${machine_branch} was requested, but was not properly"
- echo " configured to be built. The current branch is ${final_branch}"
- exit 1
+ # check to see if the specified SRCREV is reachable from the final branch.
+ # if it wasn't something wrong has happened, and we should error.
+ if [ "${machine_srcrev}" != "AUTOINC" ]; then
+ if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
+ bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
+ bbfatal "Check the BSP description for incorrect branch selection, or other errors."
+ fi
fi
}
@@ -183,36 +176,17 @@ do_kernel_checkout() {
cd ${S}
if [ ! -f "Makefile" ]; then
- echo "[ERROR]: S is not set to the linux source directory. Check "
- echo " the recipe and set S to the proper extracted subdirectory"
- exit 1
+ bberror "S is not set to the linux source directory. Check "
+ bbfatal "the recipe and set S to the proper extracted subdirectory"
fi
+ rm -f .gitignore
git init
git add .
git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
+ git clean -d -f
fi
# end debare
- # If KMETA is defined, the branch must exist, but a machine branch
- # can be missing since it may be created later by the tools.
- if [ -n "${KMETA}" ]; then
- git branch -a --no-color | grep -q ${KMETA}
- if [ $? -ne 0 ]; then
- echo "ERROR. The branch '${KMETA}' is required and was not"
- echo "found. Ensure that the SRC_URI points to a valid linux-yocto"
- echo "kernel repository"
- exit 1
- fi
- fi
-
- machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
-
- if [ "${KBRANCH}" != "${machine_branch}" ]; then
- echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same."
- echo " KBRANCH will be adjusted to match, but this typically is a"
- echo " misconfiguration and should be checked."
- fi
-
# convert any remote branches to local tracking ones
for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
@@ -222,15 +196,27 @@ do_kernel_checkout() {
fi
done
+ # If KMETA is defined, the branch must exist, but a machine branch
+ # can be missing since it may be created later by the tools.
+ if [ -n "${KMETA}" ]; then
+ git show-ref --quiet --verify -- "refs/heads/${KMETA}"
+ if [ $? -eq 1 ]; then
+ bberror "The branch '${KMETA}' is required and was not found"
+ bberror "Ensure that the SRC_URI points to a valid linux-yocto"
+ bbfatal "kernel repository"
+ fi
+ fi
+
+
# Create a working tree copy of the kernel by checking out a branch
+ machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 0 ]; then
- # checkout and clobber any unimportant files
- git checkout -f ${machine_branch}
- else
- echo "Not checking out ${machine_branch}, it will be created later"
- git checkout -f master
+ if [ $? -ne 0 ]; then
+ machine_branch="master"
fi
+
+ # checkout and clobber any unimportant files
+ git checkout -f ${machine_branch}
}
do_kernel_checkout[dirs] = "${S}"
@@ -238,7 +224,7 @@ addtask kernel_checkout before do_patch after do_unpack
do_kernel_configme[dirs] += "${S} ${B}"
do_kernel_configme() {
- echo "[INFO] doing kernel configme"
+ bbnote "kernel configme"
export KMETA=${KMETA}
if [ -n "${KCONFIG_MODE}" ]; then
@@ -255,8 +241,7 @@ do_kernel_configme() {
PATH=${PATH}:${S}/scripts/util
configme ${configmeflags} --reconfig --output ${B} ${LINUX_KERNEL_TYPE} ${KMACHINE}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
- exit 1
+ bbfatal "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
fi
echo "# Global settings from linux recipe" >> ${B}/.config
@@ -292,104 +277,66 @@ python do_kernel_configcheck() {
# their SRCREV values. If they are NOT on the right commits, the branches
# are corrected to the proper commit.
do_validate_branches() {
+ set +e
cd ${S}
export KMETA=${KMETA}
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+ machine_srcrev="${SRCREV_machine}"
- set +e
# if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to
# check and we can exit early
- if [ "${SRCREV_machine}" = "AUTOINC" ] || [ "${SRCREV_machine}" = "INVALID" ] ||
- [ "${SRCREV_machine}" = "" ]; then
- return
- fi
-
- # If something other than the default branch was requested, it must
- # exist in the tree, and it's a hard error if it wasn't
- git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 1 ]; then
- if [ -n "${KBRANCH_DEFAULT}" ] &&
- [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ]; then
- echo "ERROR: branch ${machine_branch} was set for kernel compilation, "
- echo " but it does not exist in the kernel repository."
- echo " Check the value of KBRANCH and ensure that it describes"
- echo " a valid banch in the source kernel repository"
- exit 1
+ if [ "${machine_srcrev}" = "AUTOINC" ]; then
+ bbnote "SRCREV validation is not required for AUTOREV"
+ elif [ "${machine_srcrev}" = "" ]; then
+ if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then
+ # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
+ # that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
+ # this case, we need to reset to the give SRCREV before heading to patching
+ bbnote "custom recipe is being built, forcing SRCREV to ${SRCREV}"
+ force_srcrev="${SRCREV}"
fi
- fi
-
- if [ -z "${SRCREV_machine}" ]; then
- target_branch_head="${SRCREV}"
else
- target_branch_head="${SRCREV_machine}"
- fi
-
- # $SRCREV could have also been AUTOINC, so check again
- if [ "${target_branch_head}" = "AUTOINC" ]; then
- return
- fi
-
- ref=`git show ${target_branch_head} 2>&1 | head -n1 || true`
- if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
- echo "ERROR ${target_branch_head} is not a valid commit ID."
- echo "The kernel source tree may be out of sync"
- exit 1
+ git cat-file -t ${machine_srcrev} > /dev/null
+ if [ $? -ne 0 ]; then
+ bberror "${machine_srcrev} is not a valid commit ID."
+ bbfatal "The kernel source tree may be out of sync"
+ fi
+ force_srcrev=${machine_srcrev}
fi
- containing_branches=`git branch --contains $target_branch_head | sed 's/^..//'`
- if [ -z "$containing_branches" ]; then
- echo "ERROR: SRCREV was set to \"$target_branch_head\", but no branches"
- echo " contain this commit"
- exit 1
- fi
+ ## KMETA branch validation.
+ target_meta_head="${SRCREV_meta}"
+ if [ "${target_meta_head}" = "AUTOINC" ] || [ "${target_meta_head}" = "" ]; then
+ bbnote "SRCREV validation skipped for AUTOREV or empty meta branch"
+ else
+ meta_head=`git show-ref -s --heads ${KMETA}`
- # force the SRCREV in each branch that contains the specified
- # SRCREV (if it isn't the current HEAD of that branch)
- git checkout -q master
- for b in $containing_branches; do
- branch_head=`git show-ref -s --heads ${b}`
- if [ "$branch_head" != "$target_branch_head" ]; then
- echo "[INFO] Setting branch $b to ${target_branch_head}"
- if [ "$b" = "master" ]; then
- git reset --hard $target_branch_head > /dev/null
- else
- git branch -D $b > /dev/null
- git branch $b $target_branch_head > /dev/null
- fi
+ git cat-file -t ${target_meta_head} > /dev/null
+ if [ $? -ne 0 ]; then
+ bberror "${target_meta_head} is not a valid commit ID"
+ bbfatal "The kernel source tree may be out of sync"
fi
- done
-
- ## KMETA branch validation.
- ## We do validation if the meta branch exists, and AUTOREV hasn't been set
- meta_head=`git show-ref -s --heads ${KMETA}`
- target_meta_head="${SRCREV_meta}"
- git show-ref --quiet --verify -- "refs/heads/${KMETA}"
- if [ $? -eq 0 ] && [ "${target_meta_head}" != "AUTOINC" ]; then
if [ "$meta_head" != "$target_meta_head" ]; then
- ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
- if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
- echo "ERROR ${target_meta_head} is not a valid commit ID"
- echo "The kernel source tree may be out of sync"
- exit 1
- else
- echo "[INFO] Setting branch ${KMETA} to ${target_meta_head}"
- git branch -m ${KMETA} ${KMETA}-orig
- git checkout -q -b ${KMETA} ${target_meta_head}
- if [ $? -ne 0 ];then
- echo "ERROR: could not checkout ${KMETA} branch from known hash ${target_meta_head}"
- exit 1
- fi
+ bbnote "Setting branch ${KMETA} to ${target_meta_head}"
+ git branch -m ${KMETA} ${KMETA}-orig
+ git checkout -q -b ${KMETA} ${target_meta_head}
+ if [ $? -ne 0 ];then
+ bbfatal "Could not checkout ${KMETA} branch from known hash ${target_meta_head}"
fi
fi
fi
- git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 0 ]; then
- # restore the branch for builds
- git checkout -q -f ${machine_branch}
- else
- git checkout -q master
+ git checkout -q -f ${machine_branch}
+ if [ -n "${force_srcrev}" ]; then
+ # see if the branch we are about to patch has been properly reset to the defined
+ # SRCREV .. if not, we reset it.
+ branch_head=`git rev-parse HEAD`
+ if [ "${force_srcrev}" != "${branch_head}" ]; then
+ current_branch=`git rev-parse --abbrev-ref HEAD`
+ git branch "$current_branch-orig"
+ git reset --hard ${force_srcrev}
+ fi
fi
}
@@ -405,8 +352,7 @@ do_kernel_link_vmlinux() {
ln -sf ../../../vmlinux
}
-OE_TERMINAL_EXPORTS += "GUILT_BASE KBUILD_OUTPUT"
-GUILT_BASE = "meta"
+OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
KBUILD_OUTPUT = "${B}"
python () {
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b2e9d4cb36..125ed88406 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,12 @@
inherit linux-kernel-base kernel-module-split
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native"
+
+S = "${STAGING_KERNEL_DIR}"
+B = "${WORKDIR}/build"
+KBUILD_OUTPUT = "${B}"
+OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
# we include gcc above, we dont need virtual/libc
INHIBIT_DEFAULT_DEPS = "1"
@@ -12,7 +17,7 @@ INITRAMFS_TASK ?= ""
INITRAMFS_IMAGE_BUNDLE ?= ""
python __anonymous () {
- kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
+ kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
if kerneltype == 'uImage':
depends = d.getVar("DEPENDS", True)
depends = "%s u-boot-mkimage-native" % depends
@@ -31,6 +36,26 @@ python __anonymous () {
d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}')
}
+# Old style kernels may set ${S} = ${WORKDIR}/git for example
+# We need to move these over to STAGING_KERNEL_DIR. We can't just
+# create the symlink in advance as the git fetcher can't cope with
+# the symlink.
+do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
+do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
+base_do_unpack_append () {
+ s = d.getVar("S", True)
+ if s[-1] == '/':
+ # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
+ s=s[:-1]
+ kernsrc = d.getVar("STAGING_KERNEL_DIR", True)
+ if s != kernsrc:
+ bb.utils.mkdirhier(kernsrc)
+ bb.utils.remove(kernsrc, recurse=True)
+ import subprocess
+ subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True)
+ os.symlink(kernsrc, s)
+}
+
inherit kernel-arch deploy
PACKAGES_DYNAMIC += "^kernel-module-.*"
@@ -55,7 +80,7 @@ KERNEL_IMAGEDEST = "boot"
#
export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
-KERNEL_VERSION = "${@get_kernelversion('${B}')}"
+KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
KERNEL_LOCALVERSION ?= ""
@@ -206,114 +231,70 @@ kernel_do_install() {
[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
install -d ${D}${sysconfdir}/modules-load.d
install -d ${D}${sysconfdir}/modprobe.d
+}
+do_install[prefuncs] += "package_get_auto_pr"
- #
- # Support for external module building - create a minimal copy of the
- # kernel source tree.
- #
- kerneldir=${D}${KERNEL_SRC_PATH}
- install -d $kerneldir
-
- #
- # Store the kernel version in sysroots for module-base.bbclass
- #
-
- echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
+addtask shared_workdir after do_compile before do_install
- #
- # Store kernel image name to allow use during image generation
- #
+emit_depmod_pkgdata() {
+ # Stash data for depmod
+ install -d ${PKGDESTWORK}/kernel-depmod/
+ echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
+ cp System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+}
- echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name
+PACKAGEFUNCS += "emit_depmod_pkgdata"
- #
- # Copy the entire source tree. In case an external build directory is
- # used, copy the build directory over first, then copy over the source
- # dir. This ensures the original Makefiles are used and not the
- # redirecting Makefiles in the build directory.
- #
- find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./Documentation*" -not -path "./source*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
- cp .config $kerneldir
- if [ "${S}" != "${B}" ]; then
- pwd="$PWD"
- cd "${S}"
- find . -depth -not -path "./Documentation*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
- cd "$pwd"
- fi
-
- # Test to ensure that the output file and image type are not actually
- # the same file. If hardlinking is used, they will be the same, and there's
- # no need to install.
- ! [ ${KERNEL_OUTPUT} -ef $kerneldir/${KERNEL_IMAGETYPE} ] && install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
- install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
+do_shared_workdir () {
+ cd ${B}
- # Dummy Makefile so the clean below works
- mkdir $kerneldir/Documentation
- touch $kerneldir/Documentation/Makefile
+ kerneldir=${STAGING_KERNEL_BUILDDIR}
+ install -d $kerneldir
#
- # Clean and remove files not needed for building modules.
- # Some distributions go through a lot more trouble to strip out
- # unecessary headers, for now, we just prune the obvious bits.
- #
- # We don't want to leave host-arch binaries in /sysroots, so
- # we clean the scripts dir while leaving the generated config
- # and include files.
+ # Store the kernel version in sysroots for module-base.bbclass
#
- oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
- # hide directories that shouldn't have their .c, s and S files deleted
- for d in tools scripts lib; do
- mv $kerneldir/$d $kerneldir/.$d
- done
-
- # delete .c, .s and .S files, unless we hid a directory as .<dir>. This technique is
- # much faster than find -prune and -exec
- find $kerneldir -not -path '*/\.*' -type f -name "*.[csS]" -delete
+ echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
- # put the hidden dirs back
- for d in tools scripts lib; do
- mv $kerneldir/.$d $kerneldir/$d
- done
+ # Copy files required for module builds
+ cp System.map $kerneldir/System.map-${KERNEL_VERSION}
+ cp Module.symvers $kerneldir/
+ cp .config $kerneldir/
+ mkdir -p $kerneldir/include/config
+ cp include/config/kernel.release $kerneldir/include/config/kernel.release
+
+ # We can also copy over all the generated files and avoid special cases
+ # like version.h, but we've opted to keep this small until file creep starts
+ # to happen
+ if [ -e include/linux/version.h ]; then
+ mkdir -p $kerneldir/include/linux
+ cp include/linux/version.h $kerneldir/include/linux/version.h
+ fi
# As of Linux kernel version 3.0.1, the clean target removes
# arch/powerpc/lib/crtsavres.o which is present in
# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
if [ ${ARCH} = "powerpc" ]; then
- cp -l arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
- # Necessary for building modules like compat-wireless.
- if [ -f include/generated/bounds.h ]; then
- cp -l include/generated/bounds.h $kerneldir/include/generated/bounds.h
- fi
+ mkdir -p $kerneldir/include/generated/
+ cp -fR include/generated/* $kerneldir/include/generated/
+
if [ -d arch/${ARCH}/include/generated ]; then
mkdir -p $kerneldir/arch/${ARCH}/include/generated/
- cp -flR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
- fi
-
- # Remove the following binaries which cause strip or arch QA errors
- # during do_package for cross-compiled platforms
- bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
- arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
- scripts/kconfig/conf.o scripts/kconfig/kxgettext.o"
- for entry in $bin_files; do
- rm -f $kerneldir/$entry
- done
-
- # kernels <2.6.30 don't have $kerneldir/tools directory so we check if it exists before calling sed
- if [ -f $kerneldir/tools/perf/Makefile ]; then
- # Fix SLANG_INC for slang.h
- sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile
+ cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
fi
}
-do_install[prefuncs] += "package_get_auto_pr"
-python sysroot_stage_all () {
- oe.path.copyhardlinktree(d.expand("${D}${KERNEL_SRC_PATH}"), d.expand("${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}"))
+# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
+sysroot_stage_all () {
+ :
}
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call oldnoconfig || yes '' | oe_runmake oldconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
@@ -322,6 +303,10 @@ kernel_do_configure() {
# $ make kernelrelease => 2.6.37+
touch ${B}/.scmversion ${S}/.scmversion
+ if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
+ mv "${S}/.config" "${B}/.config"
+ fi
+
# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
@@ -346,7 +331,7 @@ PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-mod
FILES_${PN} = ""
FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order /lib/modules/${KERNEL_VERSION}/modules.builtin"
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
+FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"
FILES_kernel-vmlinux = "/boot/vmlinux*"
FILES_kernel-modules = ""
RDEPENDS_kernel = "kernel-base"
@@ -384,14 +369,12 @@ pkg_postrm_kernel-image () {
PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
python split_kernel_packages () {
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
}
do_strip() {
if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
- if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then
+ if [ "${KERNEL_IMAGETYPE}" != "vmlinux" ]; then
bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}"
return
fi
@@ -403,7 +386,7 @@ do_strip() {
gawk '{print $1}'`
for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
- if [[ "$headers" != *"$str"* ]]; then
+ if [ "$headers" != *"$str"* ]; then
bbwarn "Section not found: $str";
fi
@@ -499,7 +482,7 @@ kernel_do_deploy() {
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
do_deploy[prefuncs] += "package_get_auto_pr"
-addtask deploy before do_build after do_install
+addtask deploy after do_populate_sysroot
EXPORT_FUNCTIONS do_deploy
diff --git a/meta/classes/kernelsrc.bbclass b/meta/classes/kernelsrc.bbclass
new file mode 100644
index 0000000000..4208eff6fc
--- /dev/null
+++ b/meta/classes/kernelsrc.bbclass
@@ -0,0 +1,10 @@
+S = "${STAGING_KERNEL_DIR}"
+do_fetch[noexec] = "1"
+do_unpack[depends] += "virtual/kernel:do_patch"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_package[depends] += "virtual/kernel:do_populate_sysroot"
+KERNEL_VERSION = "${@get_kernelversion_file("${S}")}"
+
+inherit linux-kernel-base
+
diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
index daf499d3eb..bbc80167dd 100644
--- a/meta/classes/libc-common.bbclass
+++ b/meta/classes/libc-common.bbclass
@@ -25,12 +25,19 @@ def get_libc_fpu_setting(bb, d):
python populate_packages_prepend () {
if d.getVar('DEBIAN_NAMES', True):
+ pkgs = d.getVar('PACKAGES', True).split()
bpn = d.getVar('BPN', True)
- d.setVar('PKG_'+bpn, 'libc6')
- d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
- d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
+ prefix = d.getVar('MLPREFIX', True) or ""
+ # Set the base package...
+ d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
+ libcprefix = prefix + bpn + '-'
+ for p in pkgs:
+ # And all the subpackages.
+ if p.startswith(libcprefix):
+ renamed = p.replace(bpn, 'libc6', 1)
+ d.setVar('PKG_' + p, renamed)
# For backward compatibility with old -dbg package
- d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
- d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
- d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
+ d.appendVar('RPROVIDES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
+ d.appendVar('RCONFLICTS_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
+ d.appendVar('RREPLACES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
}
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index c1bc399c18..793936e10b 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -268,6 +268,7 @@ python package_do_split_gconvs () {
locale_arch_options = { \
"arm": " --uint32-align=4 --little-endian ", \
"armeb": " --uint32-align=4 --big-endian ", \
+ "aarch64": " --uint32-align=4 --little-endian ", \
"aarch64_be": " --uint32-align=4 --big-endian ", \
"sh4": " --uint32-align=4 --big-endian ", \
"powerpc": " --uint32-align=4 --big-endian ", \
@@ -298,9 +299,7 @@ python package_do_split_gconvs () {
--inputfile=%s/i18n/locales/%s --charmap=%s %s" \
% (treedir, datadir, locale, encoding, name)
- qemu_options = d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True)
- if not qemu_options:
- qemu_options = d.getVar('QEMU_OPTIONS', True)
+ qemu_options = d.getVar('QEMU_OPTIONS', True)
cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
-E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 08f0665e7d..d659b767c5 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -17,12 +17,12 @@ do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}"
do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
python write_package_manifest() {
- # Get list of installed packages
- license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
- bb.utils.mkdirhier(license_image_dir)
- from oe.rootfs import image_list_installed_packages
- open(os.path.join(license_image_dir, 'package.manifest'),
- 'w+').write(image_list_installed_packages(d))
+ # Get list of installed packages
+ license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
+ bb.utils.mkdirhier(license_image_dir)
+ from oe.rootfs import image_list_installed_packages
+ open(os.path.join(license_image_dir, 'package.manifest'),
+ 'w+').write(image_list_installed_packages(d))
}
license_create_manifest() {
@@ -49,24 +49,25 @@ license_create_manifest() {
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
pkged_name="$(basename $(readlink ${filename}))"
- pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
if [ -z ${pkged_lic} ]; then
# fallback checking value of LICENSE
- pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
fi
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
- printf "LICENSE:" >> ${LICENSE_MANIFEST}
- for lic in ${pkged_lic}; do
+ echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
+ echo "" >> ${LICENSE_MANIFEST}
+
+ lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
+ for lic in ${lics}; do
# to reference a license file trim trailing + symbol
if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
fi
- printf " ${lic}" >> ${LICENSE_MANIFEST}
done
- printf "\n\n" >> ${LICENSE_MANIFEST}
done
# Two options here:
@@ -145,9 +146,16 @@ def copy_license_files(lic_files_paths, destdir):
bb.utils.mkdirhier(destdir)
for (basename, path) in lic_files_paths:
try:
- ret = shutil.copyfile(path, os.path.join(destdir, basename))
+ src = path
+ dst = os.path.join(destdir, basename)
+ if os.path.exists(dst):
+ os.remove(dst)
+ if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
+ os.link(src, dst)
+ else:
+ shutil.copyfile(src, dst)
except Exception as e:
- bb.warn("Could not copy license file %s: %s" % (basename, e))
+ bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
def find_license_files(d):
"""
@@ -264,10 +272,50 @@ def return_spdx(d, license):
"""
return d.getVarFlag('SPDXLICENSEMAP', license, True)
+def canonical_license(d, license):
+ """
+ Return the canonical (SPDX) form of the license if available (so GPLv3
+ becomes GPL-3.0), for the license named 'X+', return canonical form of
+ 'X' if availabel and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
+ or the passed license if there is no canonical form.
+ """
+ lic = d.getVarFlag('SPDXLICENSEMAP', license, True) or ""
+ if not lic and license.endswith('+'):
+ lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True)
+ if lic:
+ lic += '+'
+ return lic or license
+
+def expand_wildcard_licenses(d, wildcard_licenses):
+ """
+ Return actual spdx format license names if wildcard used. We expand
+ wildcards from SPDXLICENSEMAP flags and SRC_DISTRIBUTE_LICENSES values.
+ """
+ import fnmatch
+ licenses = []
+ spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
+ for wld_lic in wildcard_licenses:
+ spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
+ licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
+
+ spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES') or '').split()
+ for wld_lic in wildcard_licenses:
+ licenses += fnmatch.filter(spdx_lics, wld_lic)
+
+ licenses = list(set(licenses))
+ return licenses
+
+def incompatible_license_contains(license, truevalue, falsevalue, d):
+ license = canonical_license(d, license)
+ bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split()
+ bad_licenses = expand_wildcard_licenses(d, bad_licenses)
+ return truevalue if license in bad_licenses else falsevalue
+
def incompatible_license(d, dont_want_licenses, package=None):
"""
- This function checks if a recipe has only incompatible licenses. It also take into consideration 'or'
- operand.
+ This function checks if a recipe has only incompatible licenses. It also
+ take into consideration 'or' operand. dont_want_licenses should be passed
+ as canonical (SPDX) names.
"""
import re
import oe.license
@@ -298,7 +346,7 @@ def incompatible_license(d, dont_want_licenses, package=None):
licenses = oe.license.flattened_licenses(license, choose_lic_set)
except oe.license.LicenseError as exc:
bb.fatal('%s: %s' % (d.getVar('P', True), exc))
- return any(not license_ok(l) for l in licenses)
+ return any(not license_ok(canonical_license(d, l)) for l in licenses)
def check_license_flags(d):
"""
@@ -361,6 +409,28 @@ def check_license_flags(d):
return unmatched_flag
return None
+def check_license_format(d):
+ """
+ This function checks if LICENSE is well defined,
+ Validate operators in LICENSES.
+ No spaces are allowed between LICENSES.
+ """
+ pn = d.getVar('PN', True)
+ licenses = d.getVar('LICENSE', True)
+ from oe.license import license_operator
+ from oe.license import license_pattern
+
+ elements = filter(lambda x: x.strip(), license_operator.split(licenses))
+ for pos, element in enumerate(elements):
+ if license_pattern.match(element):
+ if pos > 0 and license_pattern.match(elements[pos - 1]):
+ bb.warn("Recipe %s, LICENSE (%s) has invalid format, " \
+ "LICENSES must have operator \"%s\" between them." %
+ (pn, licenses, license_operator.pattern))
+ elif not license_operator.match(element):
+ bb.warn("Recipe %s, LICENSE (%s) has invalid operator (%s) not in" \
+ " \"%s\"." % (pn, licenses, element, license_operator.pattern))
+
SSTATETASKS += "do_populate_lic"
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
diff --git a/meta/classes/linux-kernel-base.bbclass b/meta/classes/linux-kernel-base.bbclass
index 4f2b0a4a98..89ce71605c 100644
--- a/meta/classes/linux-kernel-base.bbclass
+++ b/meta/classes/linux-kernel-base.bbclass
@@ -1,5 +1,5 @@
# parse kernel ABI version out of <linux/version.h>
-def get_kernelversion(p):
+def get_kernelversion_headers(p):
import re
fn = p + '/include/linux/utsrelease.h'
@@ -9,7 +9,6 @@ def get_kernelversion(p):
if not os.path.isfile(fn):
fn = p + '/include/linux/version.h'
- import re
try:
f = open(fn, 'r')
except IOError:
@@ -24,6 +23,16 @@ def get_kernelversion(p):
return m.group(1)
return None
+
+def get_kernelversion_file(p):
+ fn = p + '/kernel-abiversion'
+
+ try:
+ with open(fn, 'r') as f:
+ return f.readlines()[0].strip()
+ except IOError:
+ return None
+
def linux_module_packages(s, d):
suffix = ""
return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index ba0edf9486..237e61821d 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -60,7 +60,7 @@ def base_get_metadata_svn_revision(path, d):
try:
with open("%s/.svn/entries" % path) as f:
revision = f.readlines()[3].strip()
- except IOError, IndexError:
+ except (IOError, IndexError):
pass
return revision
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
index 9537ba9f43..3eb2e9226e 100644
--- a/meta/classes/module-base.bbclass
+++ b/meta/classes/module-base.bbclass
@@ -3,16 +3,24 @@ inherit kernel-arch
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
+# This points to the build artefacts from the main kernel build
+# such as .config and System.map
+# Confusingly it is not the module build output (which is ${B}) but
+# we didn't pick the name.
+export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
+
+export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
KERNEL_OBJECT_SUFFIX = ".ko"
# kernel modules are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
# Function to ensure the kernel scripts are created. Expected to
# be called before do_compile. See module.bbclass for an exmaple.
do_make_scripts() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
- -C ${STAGING_KERNEL_DIR} scripts
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts
}
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index ad6f7af1bb..a03cc74de4 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -6,21 +6,23 @@ addtask make_scripts after do_patch before do_compile
do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
do_make_scripts[deptask] = "do_populate_sysroot"
+EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
+
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
KERNEL_VERSION=${KERNEL_VERSION} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" \
+ O=${STAGING_KERNEL_BUILDDIR} \
${MAKE_TARGETS}
}
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ O=${STAGING_KERNEL_BUILDDIR} \
modules_install
}
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 9a1cb1d916..eea2fd59a1 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -21,6 +21,9 @@ python multilib_virtclass_handler () {
if bb.data.inherits_class('image', e.data):
e.data.setVar("MLPREFIX", variant + "-")
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
+ target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" + variant, False)
+ if target_vendor:
+ e.data.setVar("TARGET_VENDOR", target_vendor)
return
if bb.data.inherits_class('cross-canadian', e.data):
@@ -50,7 +53,7 @@ python multilib_virtclass_handler () {
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
# Expand the WHITELISTs with multilib prefix
- for whitelist in ["HOSTTOOLS_WHITELIST_GPLv3", "WHITELIST_GPLv3", "LGPLv2_WHITELIST_GPLv3"]:
+ for whitelist in ["HOSTTOOLS_WHITELIST_GPL-3.0", "WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
pkgs = e.data.getVar(whitelist, True)
for pkg in pkgs.split():
pkgs += " " + variant + "-" + pkg
@@ -60,6 +63,7 @@ python multilib_virtclass_handler () {
newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
if newtune:
e.data.setVar("DEFAULTTUNE", newtune)
+ e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
}
addhandler multilib_virtclass_handler
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 3315ba9327..8ea2a5a4b8 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -1,11 +1,122 @@
-python multilib_virtclass_handler_global () {
- if not e.data:
+def preferred_ml_updates(d):
+ # If any PREFERRED_PROVIDER or PREFERRED_VERSION are set,
+ # we need to mirror these variables in the multilib case;
+ multilibs = d.getVar('MULTILIBS', True) or ""
+ if not multilibs:
return
- if isinstance(e, bb.event.RecipePreFinalise):
+ prefixes = []
+ for ext in multilibs.split():
+ eext = ext.split(':')
+ if len(eext) > 1 and eext[0] == 'multilib':
+ prefixes.append(eext[1])
+
+ versions = []
+ providers = []
+ for v in d.keys():
+ if v.startswith("PREFERRED_VERSION_"):
+ versions.append(v)
+ if v.startswith("PREFERRED_PROVIDER_"):
+ providers.append(v)
+
+ for v in versions:
+ val = d.getVar(v, False)
+ pkg = v.replace("PREFERRED_VERSION_", "")
+ if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+ continue
+ if '-cross-' in pkg and '${' in pkg:
+ for p in prefixes:
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
+ if newname != v:
+ newval = localdata.expand(val)
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ vexp = d.expand(v)
+ if v != vexp and d.getVar(v, False):
+ d.renameVar(v, vexp)
+ continue
+ for p in prefixes:
+ newname = "PREFERRED_VERSION_" + p + "-" + pkg
+ if not d.getVar(newname, False):
+ d.setVar(newname, val)
+
+ for prov in providers:
+ val = d.getVar(prov, False)
+ pkg = prov.replace("PREFERRED_PROVIDER_", "")
+ if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+ continue
+ if 'cross-canadian' in pkg:
+ for p in prefixes:
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(prov)
+ if newname != prov:
+ newval = localdata.expand(val)
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+ continue
+ virt = ""
+ if pkg.startswith("virtual/"):
+ pkg = pkg.replace("virtual/", "")
+ virt = "virtual/"
+ for p in prefixes:
+ if pkg != "kernel":
+ newval = p + "-" + val
+
+ # implement variable keys
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(prov)
+ if newname != prov and not d.getVar(newname, False):
+ d.setVar(newname, localdata.expand(newval))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
+ if not d.getVar(newname, False):
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+
+
+ mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
+ extramp = []
+ for p in mp:
+ if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
+ continue
+ virt = ""
+ if p.startswith("virtual/"):
+ p = p.replace("virtual/", "")
+ virt = "virtual/"
+ for pref in prefixes:
+ extramp.append(virt + pref + "-" + p)
+ d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
+
+python multilib_virtclass_handler_vendor () {
+ if isinstance(e, bb.event.ConfigParsed):
for v in e.data.getVar("MULTILIB_VARIANTS", True).split():
if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None:
e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
+ preferred_ml_updates(e.data)
+}
+addhandler multilib_virtclass_handler_vendor
+multilib_virtclass_handler_vendor[eventmask] = "bb.event.ConfigParsed"
+
+python multilib_virtclass_handler_global () {
+ if not e.data:
+ return
variant = e.data.getVar("BBEXTENDVARIANT", True)
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 9dec318aa8..5ca5c95b4d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -61,16 +61,17 @@ PTEST_ENABLED = "0"
export CONFIG_SITE = "${COREBASE}/meta/site/native"
# set the compiler as well. It could have been set to something else
-export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
-export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}"
-export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}"
-export CPP = "${HOST_PREFIX}gcc ${HOST_CC_ARCH} -E"
-export LD = "${HOST_PREFIX}ld ${HOST_LD_ARCH} "
-export CCLD = "${CC}"
-export AR = "${HOST_PREFIX}ar"
-export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
-export RANLIB = "${HOST_PREFIX}ranlib"
-export STRIP = "${HOST_PREFIX}strip"
+export CC = "${BUILD_CC}"
+export CXX = "${BUILD_CXX}"
+export FC = "${BUILD_FC}"
+export CPP = "${BUILD_CPP}"
+export LD = "${BUILD_LD}"
+export CCLD = "${BUILD_CCLD}"
+export AR = "${BUILD_AR}"
+export AS = "${BUILD_AS}"
+export RANLIB = "${BUILD_RANLIB}"
+export STRIP = "${BUILD_STRIP}"
+export NM = "${BUILD_NM}"
# Path prefixes
base_prefix = "${STAGING_DIR_NATIVE}"
@@ -109,6 +110,7 @@ PKG_CONFIG_SYSROOT_DIR = ""
# we dont want libc-uclibc or libc-glibc to kick in for native recipes
LIBCOVERRIDE = ""
CLASSOVERRIDE = "class-native"
+MACHINEOVERRIDES = ""
PATH_prepend = "${COREBASE}/scripts/native-intercept:"
@@ -130,7 +132,9 @@ python native_virtclass_handler () {
deps = bb.utils.explode_deps(deps)
newdeps = []
for dep in deps:
- if "-cross-" in dep:
+ if dep == pn:
+ continue
+ elif "-cross-" in dep:
newdeps.append(dep.replace("-cross", "-native"))
elif not dep.endswith("-native"):
newdeps.append(dep + "-native")
@@ -162,6 +166,7 @@ native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
deltask package
deltask packagedata
+deltask package_qa
deltask package_write_ipk
deltask package_write_deb
deltask package_write_rpm
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 7f94258bf1..5e78116ab8 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -8,6 +8,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
NATIVESDKLIBC ?= "libc-glibc"
LIBCOVERRIDE = ":${NATIVESDKLIBC}"
CLASSOVERRIDE = "class-nativesdk"
+MACHINEOVERRIDES = ""
#
# Update PACKAGE_ARCH and PACKAGE_ARCHS
@@ -42,7 +43,7 @@ TARGET_CC_ARCH = "${SDK_CC_ARCH}"
TARGET_LD_ARCH = "${SDK_LD_ARCH}"
TARGET_AS_ARCH = "${SDK_AS_ARCH}"
TARGET_FPU = ""
-EXTRA_OECONF_FPU = ""
+EXTRA_OECONF_GCC_FLOAT = ""
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
CFLAGS = "${BUILDSDK_CFLAGS}"
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
index f2e7540dcf..d00f468d9a 100644
--- a/meta/classes/oelint.bbclass
+++ b/meta/classes/oelint.bbclass
@@ -1,174 +1,85 @@
addtask lint before do_fetch
do_lint[nostamp] = "1"
python do_lint() {
- def testVar(var, explain=None):
- try:
- s = d[var]
- return s["content"]
- except KeyError:
- bb.error("%s is not set" % var)
- if explain: bb.note(explain)
- return None
-
-
- ##############################
- # Test that DESCRIPTION exists
- #
- testVar("DESCRIPTION")
-
-
- ##############################
- # Test that HOMEPAGE exists
- #
- s = testVar("HOMEPAGE")
- if s=="unknown":
- bb.error("HOMEPAGE is not set")
- elif not s.startswith("http://"):
- bb.error("HOMEPAGE doesn't start with http://")
-
-
-
- ##############################
- # Test for valid LICENSE
- #
- valid_licenses = {
- "GPL-2" : "GPLv2",
- "GPL LGPL FDL" : True,
- "GPL PSF" : True,
- "GPL/QPL" : True,
- "GPL" : True,
- "GPLv2" : True,
- "IBM" : True,
- "LGPL GPL" : True,
- "LGPL" : True,
- "MIT" : True,
- "OSL" : True,
- "Perl" : True,
- "Public Domain" : True,
- "QPL" : "GPL/QPL",
- }
- s = testVar("LICENSE")
- if s=="unknown":
- bb.error("LICENSE is not set")
- elif s.startswith("Vendor"):
- pass
- else:
- try:
- newlic = valid_licenses[s]
- if newlic == False:
- bb.note("LICENSE '%s' is not recommended" % s)
- elif newlic != True:
- bb.note("LICENSE '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- bb.note("LICENSE '%s' is not recommended" % s)
-
-
- ##############################
- # Test for valid MAINTAINER
- #
- s = testVar("MAINTAINER")
- if s=="OpenEmbedded Team <openembedded-devel@openembedded.org>":
- bb.error("explicit MAINTAINER is missing, using default")
- elif s and s.find("@") == -1:
- bb.error("You forgot to put an e-mail address into MAINTAINER")
-
-
- ##############################
- # Test for valid SECTION
- #
- # if Correct section: True section name is valid
- # False section name is invalid, no suggestion
- # string section name is invalid, better name suggested
- #
- valid_sections = {
- # Current Section Correct section
- "apps" : True,
- "audio" : True,
- "base" : True,
- "console/games" : True,
- "console/net" : "console/network",
- "console/network" : True,
- "console/utils" : True,
- "devel" : True,
- "developing" : "devel",
- "devel/python" : True,
- "fonts" : True,
- "games" : True,
- "games/libs" : True,
- "gnome/base" : True,
- "gnome/libs" : True,
- "gpe" : True,
- "gpe/libs" : True,
- "gui" : False,
- "libc" : "libs",
- "libs" : True,
- "libs/net" : True,
- "multimedia" : True,
- "net" : "network",
- "NET" : "network",
- "network" : True,
- "opie/applets" : True,
- "opie/applications" : True,
- "opie/base" : True,
- "opie/codecs" : True,
- "opie/decorations" : True,
- "opie/fontfactories" : True,
- "opie/fonts" : True,
- "opie/games" : True,
- "opie/help" : True,
- "opie/inputmethods" : True,
- "opie/libs" : True,
- "opie/multimedia" : True,
- "opie/pim" : True,
- "opie/setting" : "opie/settings",
- "opie/settings" : True,
- "opie/Shell" : False,
- "opie/styles" : True,
- "opie/today" : True,
- "scientific" : True,
- "utils" : True,
- "x11" : True,
- "x11/libs" : True,
- "x11/wm" : True,
- }
- s = testVar("SECTION")
- if s:
- try:
- newsect = valid_sections[s]
- if newsect == False:
- bb.note("SECTION '%s' is not recommended" % s)
- elif newsect != True:
- bb.note("SECTION '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- bb.note("SECTION '%s' is not recommended" % s)
-
- if not s.islower():
- bb.error("SECTION should only use lower case")
-
-
-
-
- ##############################
- # Test for valid PRIORITY
- #
- valid_priorities = {
- "standard" : True,
- "required" : True,
- "optional" : True,
- "extra" : True,
- }
- s = testVar("PRIORITY")
- if s:
- try:
- newprio = valid_priorities[s]
- if newprio == False:
- bb.note("PRIORITY '%s' is not recommended" % s)
- elif newprio != True:
- bb.note("PRIORITY '%s' is not recommended, better use '%s'" % (s, newprio))
- except:
- bb.note("PRIORITY '%s' is not recommended" % s)
-
- if not s.islower():
- bb.error("PRIORITY should only use lower case")
-
+ pkgname = d.getVar("PN", True)
+
+ ##############################
+ # Test that DESCRIPTION exists
+ #
+ description = d.getVar("DESCRIPTION")
+ if description[1:10] == '{SUMMARY}':
+ bb.warn("%s: DESCRIPTION is not set" % pkgname)
+
+
+ ##############################
+ # Test that HOMEPAGE exists
+ #
+ homepage = d.getVar("HOMEPAGE")
+ if homepage == '':
+ bb.warn("%s: HOMEPAGE is not set" % pkgname)
+ elif not homepage.startswith("http://") and not homepage.startswith("https://"):
+ bb.warn("%s: HOMEPAGE doesn't start with http:// or https://" % pkgname)
+
+
+ ##############################
+ # Test for valid SECTION
+ #
+ section = d.getVar("SECTION")
+ if section == '':
+ bb.warn("%s: SECTION is not set" % pkgname)
+ elif not section.islower():
+ bb.warn("%s: SECTION should only use lower case" % pkgname)
+
+
+ ##############################
+ # Check that all patches have Signed-off-by and Upstream-Status
+ #
+ srcuri = d.getVar("SRC_URI").split()
+ fpaths = (d.getVar('FILESPATH', True) or '').split(':')
+
+ def findPatch(patchname):
+ for dir in fpaths:
+ patchpath = dir + patchname
+ if os.path.exists(patchpath):
+ return patchpath
+
+ def findKey(path, key):
+ ret = True
+ f = file('%s' % path, mode = 'r')
+ line = f.readline()
+ while line:
+ if line.find(key) != -1:
+ ret = False
+ line = f.readline()
+ f.close()
+ return ret
+
+ length = len("file://")
+ for item in srcuri:
+ if item.startswith("file://"):
+ item = item[length:]
+ if item.endswith(".patch") or item.endswith(".diff"):
+ path = findPatch(item)
+ if findKey(path, "Signed-off-by"):
+ bb.warn("%s: %s doesn't have Signed-off-by" % (pkgname, item))
+ if findKey(path, "Upstream-Status"):
+ bb.warn("%s: %s doesn't have Upstream-Status" % (pkgname, item))
+
+
+ ##############################
+ # Check for ${PN} or ${P} usage in SRC_URI or S
+ # Should use ${BPN} or ${BP} instead to avoid breaking multilib
+ #
+ for s in srcuri:
+ if not s.startswith("file://"):
+ if not s.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in SRC_URI" % pkgname)
+ if not s.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in SRC_URI" % pkgname)
+
+ srcpath = d.getVar("S")
+ if not srcpath.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in S" % pkgname)
+ if not srcpath.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in S" % pkgname)
}
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 735837667f..f6c92cb620 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -208,16 +208,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
else:
the_files.append(aux_files_pattern_verbatim % m.group(1))
d.setVar('FILES_' + pkg, " ".join(the_files))
- if extra_depends != '':
- d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
- d.setVar('DESCRIPTION_' + pkg, description % on)
- d.setVar('SUMMARY_' + pkg, summary % on)
- if postinst:
- d.setVar('pkg_postinst_' + pkg, postinst)
- if postrm:
- d.setVar('pkg_postrm_' + pkg, postrm)
else:
d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
+ if extra_depends != '':
+ d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
+ if not d.getVar('DESCRIPTION_' + pkg, True):
+ d.setVar('DESCRIPTION_' + pkg, description % on)
+ if not d.getVar('SUMMARY_' + pkg, True):
+ d.setVar('SUMMARY_' + pkg, summary % on)
+ if postinst:
+ d.setVar('pkg_postinst_' + pkg, postinst)
+ if postrm:
+ d.setVar('pkg_postrm_' + pkg, postrm)
if callable(hook):
hook(f, pkg, file_regex, output_pattern, m.group(1))
@@ -374,6 +376,9 @@ def get_package_additional_metadata (pkg_type, d):
def runtime_mapping_rename (varname, pkg, d):
#bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
+ if bb.data.inherits_class('packagegroup', d):
+ return
+
new_depends = {}
deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "")
for depend in deps:
@@ -389,28 +394,53 @@ def runtime_mapping_rename (varname, pkg, d):
#
python package_get_auto_pr() {
- # per recipe PRSERV_HOST
+ import oe.prservice
+ import re
+
+ # Support per recipe PRSERV_HOST
pn = d.getVar('PN', True)
host = d.getVar("PRSERV_HOST_" + pn, True)
if not (host is None):
d.setVar("PRSERV_HOST", host)
- if d.getVar('PRSERV_HOST', True):
- try:
- auto_pr=prserv_get_pr_auto(d)
- except Exception as e:
- bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
- if auto_pr is None:
- if d.getVar('PRSERV_LOCKDOWN', True):
- bb.fatal("Can NOT get PRAUTO from lockdown exported file")
- else:
- bb.fatal("Can NOT get PRAUTO from remote PR service")
- return
- d.setVar('PRAUTO',str(auto_pr))
- else:
- pkgv = d.getVar("PKGV", True)
+ pkgv = d.getVar("PKGV", True)
+
+ # PR Server not active, handle AUTOINC
+ if not d.getVar('PRSERV_HOST', True):
if 'AUTOINC' in pkgv:
d.setVar("PKGV", pkgv.replace("AUTOINC", "0"))
+ return
+
+ auto_pr = None
+ pv = d.getVar("PV", True)
+ version = d.getVar("PRAUTOINX", True)
+ pkgarch = d.getVar("PACKAGE_ARCH", True)
+ checksum = d.getVar("BB_TASKHASH", True)
+
+ if d.getVar('PRSERV_LOCKDOWN', True):
+ auto_pr = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
+ if auto_pr is None:
+ bb.fatal("Can NOT get PRAUTO from lockdown exported file")
+ d.setVar('PRAUTO',str(auto_pr))
+ return
+
+ try:
+ conn = d.getVar("__PRSERV_CONN", True)
+ if conn is None:
+ conn = oe.prservice.prserv_make_conn(d)
+ if conn is not None:
+ if "AUTOINC" in pkgv:
+ srcpv = bb.fetch2.get_srcrev(d)
+ base_ver = "AUTOINC-%s" % version[:version.find(srcpv)]
+ value = conn.getPR(base_ver, pkgarch, srcpv)
+ d.setVar("PKGV", pkgv.replace("AUTOINC", str(value)))
+
+ auto_pr = conn.getPR(version, pkgarch, checksum)
+ except Exception as e:
+ bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
+ if auto_pr is None:
+ bb.fatal("Can NOT get PRAUTO from remote PR service")
+ d.setVar('PRAUTO',str(auto_pr))
}
LOCALEBASEPN ??= "${PN}"
@@ -928,13 +958,7 @@ python split_and_strip_files () {
for f in kernmods:
sfiles.append((f, 16, strip))
-
- import multiprocessing
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- processed = list(pool.imap(oe.package.runstrip, sfiles))
- pool.close()
- pool.join()
+ oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
#
# End of strip
@@ -1119,6 +1143,18 @@ python package_fixsymlinks () {
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
+
+python package_package_name_hook() {
+ """
+ A package_name_hook function can be used to rewrite the package names by
+ changing PKG. For an example, see debian.bbclass.
+ """
+ pass
+}
+
+EXPORT_FUNCTIONS package_name_hook
+
+
PKGDESTWORK = "${WORKDIR}/pkgdata"
python emit_pkgdata() {
@@ -1232,10 +1268,6 @@ python emit_pkgdata() {
sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
sf.close()
- # Symlinks needed for reverse lookups (from the final package name)
- subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
- oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
-
# Symlinks needed for rprovides lookup
if rprov:
for p in rprov.strip().split():
@@ -1250,6 +1282,10 @@ python emit_pkgdata() {
os.chdir(root)
g = glob('*')
if g or allow_empty == "1":
+ # Symlinks needed for reverse lookups (from the final package name)
+ subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
+ oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
+
packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
open(packagedfile, 'w').close()
@@ -1299,12 +1335,7 @@ python package_do_filedeps() {
for files in chunks(pkgfiles[pkg], 100):
pkglist.append((pkg, files, rpmdeps, pkgdest))
- import multiprocessing
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- processed = list(pool.imap(oe.package.filedeprunner, pkglist))
- pool.close()
- pool.join()
+ processed = oe.utils.multiprocess_exec( pkglist, oe.package.filedeprunner)
provides_files = {}
requires_files = {}
@@ -1338,6 +1369,7 @@ SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
python package_do_shlibs() {
import re, pipes
+ import subprocess as sub
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
if exclude_shlibs:
@@ -1360,32 +1392,11 @@ python package_do_shlibs() {
pkgdest = d.getVar('PKGDEST', True)
- shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
- def read_shlib_providers():
- list_re = re.compile('^(.*)\.list$')
- # Go from least to most specific since the last one found wins
- for dir in reversed(shlibs_dirs):
- bb.debug(2, "Reading shlib providers in %s" % (dir))
- if not os.path.exists(dir):
- continue
- for file in os.listdir(dir):
- m = list_re.match(file)
- if m:
- dep_pkg = m.group(1)
- fd = open(os.path.join(dir, file))
- lines = fd.readlines()
- fd.close()
- for l in lines:
- s = l.strip().split(":")
- if s[0] not in shlib_provider:
- shlib_provider[s[0]] = {}
- shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
-
def linux_so(file, needed, sonames, renames, pkgver):
needs_ldconfig = False
ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
@@ -1422,7 +1433,7 @@ python package_do_shlibs() {
def darwin_so(file, needed, sonames, renames, pkgver):
if not os.path.exists(file):
return
- ldir = os.path.dirname(file).replace(pkgdest, '')
+ ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
def get_combinations(base):
#
@@ -1447,38 +1458,29 @@ python package_do_shlibs() {
prov = (combo, ldir, pkgver)
sonames.append(prov)
if file.endswith('.dylib') or file.endswith('.so'):
- lafile = file.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
- # Drop suffix
- lafile = lafile.rsplit(".",1)[0]
- lapath = os.path.dirname(lafile)
- lafile = os.path.basename(lafile)
- # Find all combinations
- combos = get_combinations(lafile)
- for combo in combos:
- if os.path.exists(lapath + '/' + combo + '.la'):
- break
- lafile = lapath + '/' + combo + '.la'
-
- #bb.note("Foo2: %s" % lafile)
- #bb.note("Foo %s" % file)
- if os.path.exists(lafile):
- fd = open(lafile, 'r')
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s*dependency_libs=\s*'(.*)'", l)
- if m:
- deps = m.group(1).split(" ")
- for dep in deps:
- #bb.note("Trying %s for %s" % (dep, pkg))
- name = None
- if dep.endswith(".la"):
- name = os.path.basename(dep).replace(".la", "")
- elif dep.startswith("-l"):
- name = dep.replace("-l", "lib")
- if name and name not in needed[pkg]:
- needed[pkg].append((name, lafile, []))
- #bb.note("Adding %s for %s" % (name, pkg))
+ rpath = []
+ p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
+ err, out = p.communicate()
+ # If returned succesfully, process stderr for results
+ if p.returncode == 0:
+ for l in err.split("\n"):
+ l = l.strip()
+ if l.startswith('path '):
+ rpath.append(l.split()[1])
+
+ p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
+ err, out = p.communicate()
+ # If returned succesfully, process stderr for results
+ if p.returncode == 0:
+ for l in err.split("\n"):
+ l = l.strip()
+ if not l or l.endswith(":"):
+ continue
+ if "is not an object file" in l:
+ continue
+ name = os.path.basename(l.split()[0]).rsplit(".", 1)[0]
+ if name and name not in needed[pkg]:
+ needed[pkg].append((name, file, []))
if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
snap_symlinks = True
@@ -1491,8 +1493,7 @@ python package_do_shlibs() {
use_ldconfig = False
needed = {}
- shlib_provider = {}
- read_shlib_providers()
+ shlib_provider = oe.package.read_shlib_providers(d)
for pkg in packages.split():
private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) or ""
@@ -1558,6 +1559,8 @@ python package_do_shlibs() {
if len(dep_pkg) == 2:
lib_ver = dep_pkg[1]
dep_pkg = dep_pkg[0]
+ if l not in shlib_provider:
+ shlib_provider[l] = {}
shlib_provider[l][libdir] = (dep_pkg, lib_ver)
libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]
@@ -1572,12 +1575,15 @@ python package_do_shlibs() {
# /opt/abc/lib/libfoo.so.1 and contains /usr/bin/abc depending on system library libfoo.so.1
# but skipping it is still better alternative than providing own
# version and then adding runtime dependency for the same system library
- if private_libs and n in private_libs:
+ if private_libs and n[0] in private_libs:
bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0]))
continue
if n[0] in shlib_provider.keys():
+ shlib_provider_path = list()
+ for k in shlib_provider[n[0]].keys():
+ shlib_provider_path.append(k)
match = None
- for p in n[2] + libsearchpath:
+ for p in n[2] + shlib_provider_path + libsearchpath:
if p in shlib_provider[n[0]]:
match = p
break
@@ -1934,9 +1940,9 @@ python do_package () {
# Optimisations
###########################################################################
- # Contunually rexpanding complex expressions is inefficient, particularly when
- # we write to the datastore and invalidate the expansion cache. This code
- # pre-expands some frequently used variables
+ # Continually expanding complex expressions is inefficient, particularly
+ # when we write to the datastore and invalidate the expansion cache. This
+ # code pre-expands some frequently used variables
def expandVar(x, d):
d.setVar(x, d.getVar(x, True))
@@ -2025,7 +2031,4 @@ def mapping_rename_hook(d):
runtime_mapping_rename("RDEPENDS", pkg, d)
runtime_mapping_rename("RRECOMMENDS", pkg, d)
runtime_mapping_rename("RSUGGESTS", pkg, d)
- runtime_mapping_rename("RPROVIDES", pkg, d)
- runtime_mapping_rename("RREPLACES", pkg, d)
- runtime_mapping_rename("RCONFLICTS", pkg, d)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 7bc29df165..5b5f7e2c9a 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -239,13 +239,26 @@ python do_package_deb () {
scriptvar = localdata.getVar('pkg_%s' % script, True)
if not scriptvar:
continue
+ scriptvar = scriptvar.strip()
try:
scriptfile = open(os.path.join(controldir, script), 'w')
except OSError:
bb.utils.unlockfile(lf)
raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
- scriptfile.write("#!/bin/sh\n")
- scriptfile.write(scriptvar)
+
+ if scriptvar.startswith("#!"):
+ pos = scriptvar.find("\n") + 1
+ scriptfile.write(scriptvar[:pos])
+ else:
+ pos = 0
+ scriptfile.write("#!/bin/sh\n")
+
+ # Prevent the prerm/postrm scripts from being run during an upgrade
+ if script in ('prerm', 'postrm'):
+ scriptfile.write('[ "$1" != "upgrade" ] || exit 0\n')
+
+ scriptfile.write(scriptvar[pos:])
+ scriptfile.write('\n')
scriptfile.close()
os.chmod(os.path.join(controldir, script), 0755)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 2949d1d2e0..44fd3eb29c 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -63,7 +63,32 @@ python do_package_ipk () {
bb.data.update_data(localdata)
basedir = os.path.join(os.path.dirname(root))
arch = localdata.getVar('PACKAGE_ARCH', True)
- pkgoutdir = "%s/%s" % (outdir, arch)
+
+ if localdata.getVar('IPK_HIERARCHICAL_FEED') == "1":
+ # Spread packages across subdirectories so each isn't too crowded
+ if pkgname.startswith('lib'):
+ pkg_prefix = 'lib' + pkgname[3]
+ else:
+ pkg_prefix = pkgname[0]
+
+ # Keep -dbg, -dev, -doc, -staticdev, -locale and -locale-* packages
+ # together. These package suffixes are taken from the definitions of
+ # PACKAGES and PACKAGES_DYNAMIC in meta/conf/bitbake.conf
+ if pkgname[-4:] in ('-dbg', '-dev', '-doc'):
+ pkg_subdir = pkgname[:-4]
+ elif pkgname.endswith('-staticdev'):
+ pkg_subdir = pkgname[:-10]
+ elif pkgname.endswith('-locale'):
+ pkg_subdir = pkgname[:-7]
+ elif '-locale-' in pkgname:
+ pkg_subdir = pkgname[:pkgname.find('-locale-')]
+ else:
+ pkg_subdir = pkgname
+
+ pkgoutdir = "%s/%s/%s/%s" % (outdir, arch, pkg_prefix, pkg_subdir)
+ else:
+ pkgoutdir = "%s/%s" % (outdir, arch)
+
bb.utils.mkdirhier(pkgoutdir)
os.chdir(root)
cleanupcontrol(root)
@@ -182,7 +207,7 @@ python do_package_ipk () {
ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
- src_uri = localdata.getVar("SRC_URI", True) or "None"
+ src_uri = localdata.getVar("SRC_URI", True).strip() or "None"
if src_uri:
src_uri = re.sub("\s+", " ", src_uri)
ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 0a32b3e5dc..92ddf7a30f 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -185,7 +185,7 @@ python write_specfile () {
if not len(depends_dict[dep]):
array.append("%s: %s" % (tag, dep))
- def walk_files(walkpath, target, conffiles):
+ def walk_files(walkpath, target, conffiles, dirfiles):
# We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
# when packaging. We just ignore these files which are created in
# packages-split/ and not package/
@@ -196,11 +196,24 @@ python write_specfile () {
path = rootpath.replace(walkpath, "")
if path.endswith("DEBIAN") or path.endswith("CONTROL"):
continue
- for dir in dirs:
- if dir == "CONTROL" or dir == "DEBIAN":
- continue
- # All packages own the directories their files are in...
- target.append('%dir "' + path + '/' + dir + '"')
+
+ # Directory handling can happen in two ways, either DIRFILES is not set at all
+ # in which case we fall back to the older behaviour of packages owning all their
+ # directories
+ if dirfiles is None:
+ for dir in dirs:
+ if dir == "CONTROL" or dir == "DEBIAN":
+ continue
+ # All packages own the directories their files are in...
+ target.append('%dir "' + path + '/' + dir + '"')
+ else:
+ # packages own only empty directories or explict directory.
+ # This will prevent the overlapping of security permission.
+ if path and not files and not dirs:
+ target.append('%dir "' + path + '"')
+ elif path and path in dirfiles:
+ target.append('%dir "' + path + '"')
+
for file in files:
if file == "CONTROL" or file == "DEBIAN":
continue
@@ -293,6 +306,7 @@ python write_specfile () {
spec_files_bottom = []
perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0"
+ extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA", True) or "0") == "1"
for pkg in packages.split():
localdata = bb.data.createCopy(d)
@@ -311,6 +325,9 @@ python write_specfile () {
bb.data.update_data(localdata)
conffiles = (localdata.getVar('CONFFILES', True) or "").split()
+ dirfiles = localdata.getVar('DIRFILES', True)
+ if dirfiles is not None:
+ dirfiles = dirfiles.split()
splitname = strip_multilib(pkgname, d)
@@ -367,12 +384,14 @@ python write_specfile () {
srcrpostrm = splitrpostrm
file_list = []
- walk_files(root, file_list, conffiles)
+ walk_files(root, file_list, conffiles, dirfiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.append('%files')
+ if extra_pkgdata:
+ package_rpm_extra_pkgdata(splitname, spec_files_top, localdata)
spec_files_top.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
@@ -474,11 +493,13 @@ python write_specfile () {
# Now process files
file_list = []
- walk_files(root, file_list, conffiles)
+ walk_files(root, file_list, conffiles, dirfiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
+ if extra_pkgdata:
+ package_rpm_extra_pkgdata(splitname, spec_files_bottom, localdata)
spec_files_bottom.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
@@ -669,6 +690,7 @@ python do_package_rpm () {
cmd = rpmbuild
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
+ cmd = cmd + " --define '_builddir " + d.getVar('S', True) + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
if perfiledeps:
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 6606bc6f71..56cfead82a 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -9,7 +9,12 @@ PACKAGES = "${PN}"
# By default, packagegroup packages do not depend on a certain architecture.
# Only if dependencies are modified by MACHINE_FEATURES, packages
# need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass
-inherit allarch
+PACKAGE_ARCH ?= "all"
+
+# Fully expanded - so it applies the overrides as well
+PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
+
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
# This automatically adds -dbg and -dev flavours of all PACKAGES
# to the list. Their dependencies (RRECOMMENDS) are handled as usual
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a12bf1169e..8b7e9ea8dd 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -20,7 +20,7 @@ def complementary_globs(featurevar, d):
SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs"
SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
-inherit populate_sdk_${IMAGE_PKGTYPE}
+inherit rootfs_${IMAGE_PKGTYPE}
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
@@ -32,12 +32,15 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
-TOOLCHAIN_TARGET_TASK ?= "packagegroup-core-standalone-sdk-target packagegroup-core-standalone-sdk-target-dbg"
+TOOLCHAIN_TARGET_TASK ?= " \
+ ${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
+ ${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target-dbg')} \
+ "
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native sed-native"
+SDK_DEPENDS = "virtual/fakeroot-native"
# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
# could be set to the MACHINE_ARCH
@@ -48,6 +51,19 @@ PID = "${@os.getpid()}"
EXCLUDE_FROM_WORLD = "1"
SDK_PACKAGING_FUNC ?= "create_shar"
+SDK_POST_INSTALL_COMMAND ?= ""
+
+SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest"
+python write_target_sdk_manifest () {
+ from oe.sdk import sdk_list_installed_packages
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_MANIFEST", True))
+ if not os.path.exists(sdkmanifestdir):
+ bb.utils.mkdirhier(sdkmanifestdir)
+ with open(d.getVar('SDK_MANIFEST', True), 'w') as output:
+ output.write(sdk_list_installed_packages(d, True, 'ver'))
+}
+
+POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; "
fakeroot python do_populate_sdk() {
from oe.sdk import populate_sdk
@@ -57,6 +73,13 @@ fakeroot python do_populate_sdk() {
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)
+ ld = bb.data.createCopy(d)
+ ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata")
+ runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld)
+ runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld)
+ d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK", True))
+ d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", True))
+
# create target/host SDK manifests
create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True),
manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
@@ -65,25 +88,8 @@ fakeroot python do_populate_sdk() {
populate_sdk(d)
- # Handle multilibs in the SDK environment, siteconfig, etc files...
- localdata = bb.data.createCopy(d)
-
- # make sure we only use the WORKDIR value from 'd', or it can change
- localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
-
- # make sure we only use the SDKTARGETSYSROOT value from 'd'
- localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
-
# Process DEFAULTTUNE
- bb.build.exec_func("create_sdk_files", localdata)
-
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- # Load overrides from 'd' to avoid having to reset the value...
- overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- bb.data.update_data(localdata)
- bb.build.exec_func("create_sdk_files", localdata)
+ bb.build.exec_func("create_sdk_files", d)
bb.build.exec_func("tar_sdk", d)
@@ -91,14 +97,6 @@ fakeroot python do_populate_sdk() {
}
fakeroot create_sdk_files() {
- # Setup site file for external use
- toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
-
- toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
-
- # Add version information
- toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
-
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
# Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
@@ -117,190 +115,21 @@ fakeroot tar_sdk() {
}
fakeroot create_shar() {
- cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
-#!/bin/bash
-
-INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
-SDK_ARCH=$(echo ${SDK_ARCH} | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
-
-if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
- # Allow for installation of ix86 SDK on x86_64 host
- if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
- echo "Error: Installation machine not supported!"
- exit 1
- fi
-fi
-
-DEFAULT_INSTALL_DIR="${SDKPATH}"
-SUDO_EXEC=""
-target_sdk_dir=""
-answer=""
-relocate=1
-savescripts=0
-verbose=0
-while getopts ":yd:DRS" OPT; do
- case $OPT in
- y)
- answer="Y"
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
- ;;
- d)
- target_sdk_dir=$OPTARG
- ;;
- D)
- verbose=1
- ;;
- R)
- relocate=0
- savescripts=1
- ;;
- S)
- savescripts=1
- ;;
- *)
- echo "Usage: $(basename $0) [-y] [-d <dir>]"
- echo " -y Automatic yes to all prompts"
- echo " -d <dir> Install the SDK to <dir>"
- echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
- echo " -S Save relocation scripts"
- echo " -R Do not relocate executables"
- echo " -D use set -x to see what is going on"
- exit 1
- ;;
- esac
-done
-
-if [ $verbose = 1 ] ; then
- set -x
-fi
-
-if [ "$target_sdk_dir" = "" ]; then
- read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
-fi
-
-eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
-if [ -d "$target_sdk_dir" ]; then
- target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
-else
- target_sdk_dir=$(readlink -m "$target_sdk_dir")
-fi
-
-if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
- echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
- exit 1
-fi
-
-if [ -e "$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" ]; then
- echo "The directory \"$target_sdk_dir\" already contains a SDK for this architecture."
- printf "If you continue, existing files will be overwritten! Proceed[y/N]?"
-
- default_answer="n"
-else
- printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
-
- default_answer="y"
-fi
-
-if [ "$answer" = "" ]; then
- read answer
- [ "$answer" = "" ] && answer="$default_answer"
-else
- echo $answer
-fi
-
-if [ "$answer" != "Y" -a "$answer" != "y" ]; then
- echo "Installation aborted!"
- exit 1
-fi
-
-# Try to create the directory (this will not succeed if user doesn't have rights)
-mkdir -p $target_sdk_dir >/dev/null 2>&1
-
-# if don't have the right to access dir, gain by sudo
-if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
- SUDO_EXEC=$(which "sudo")
- if [ -z $SUDO_EXEC ]; then
- echo "No command 'sudo' found, please install sudo first. Abort!"
- exit 1
- fi
-
- # test sudo could gain root right
- $SUDO_EXEC pwd >/dev/null 2>&1
- [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
-
- # now that we have sudo rights, create the directory
- $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
-fi
-
-payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
-
-printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir
-echo "done"
-
-printf "Setting it up..."
-# fix environment paths
-for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
- $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
-done
-
-# fix dynamic loader paths in all ELF SDK binaries
-native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
-dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
-if [ "$dl_path" = "" ] ; then
- echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
- exit 1
-fi
-executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111)
-
-tdir=`mktemp -d`
-if [ x$tdir = x ] ; then
- echo "SDK relocate failed, could not create a temporary directory"
- exit 1
-fi
-echo "#!/bin/bash" > $tdir/relocate_sdk.sh
-echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
-$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
-$SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
-rm -rf $tdir
-if [ $relocate = 1 ] ; then
- $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.sh
- if [ $? -ne 0 ]; then
- echo "SDK could not be set up. Relocate script failed. Abort!"
- exit 1
- fi
-fi
-
-# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
-$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
-
-# change all symlinks pointing to ${SDKPATH}
-for l in $($SUDO_EXEC find $native_sysroot -type l); do
- $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
-done
-
-# find out all perl scripts in $native_sysroot and modify them replacing the
-# host perl with SDK perl.
-for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do
- $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
- "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
-done
-
-echo done
-
-# delete the relocating script, so that user is forced to re-run the installer
-# if he/she wants another location for the sdk
-if [ $savescripts = 0 ] ; then
- $SUDO_EXEC rm ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
-fi
-
-echo "SDK has been successfully set up and is ready to be used."
-
-exit 0
-
-MARKER:
+ # copy in the template shar extractor script
+ cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
+ cat << "EOF" > ${T}/post_install_command
+${SDK_POST_INSTALL_COMMAND}
EOF
+ sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
+ # substitute variables
+ sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \
+ -e 's#@SDKPATH@#${SDKPATH}#g' \
+ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
+ -e '/@SDK_POST_INSTALL_COMMAND@/d' \
+ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
# add execution permission
chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
@@ -329,7 +158,7 @@ populate_sdk_log_check() {
}
do_populate_sdk[dirs] = "${TOPDIR}"
-do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])}"
+do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}"
do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}"
do_populate_sdk[recrdeptask] += "do_packagedata do_package_write_rpm do_package_write_ipk do_package_write_deb"
addtask populate_sdk
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
deleted file mode 100644
index acb1f73983..0000000000
--- a/meta/classes/populate_sdk_deb.bbclass
+++ /dev/null
@@ -1,13 +0,0 @@
-do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
-
-DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\
- [d.getVar('SDK_ARCH', True) in \
- ["x86", "i486", "i586", "i686", "pentium"]]}"
-
-DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "amd64"]\
- [d.getVar('SDK_ARCH', True) == "x86_64"]}"
-
-do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
-
-# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
-DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
deleted file mode 100644
index 8b2cb6dc48..0000000000
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ /dev/null
@@ -1,3 +0,0 @@
-do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
-
-do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
deleted file mode 100644
index 4954d00490..0000000000
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ /dev/null
@@ -1,16 +0,0 @@
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-do_populate_sdk[depends] += "rpm-native:do_populate_sysroot"
-do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot"
-do_populate_sdk[depends] += "python-smartpm-native:do_populate_sysroot"
-
-# Needed for update-alternatives
-do_populate_sdk[depends] += "opkg-native:do_populate_sysroot"
-
-# Creating the repo info in do_rootfs
-do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot"
-
-rpmlibdir = "/var/lib/rpm"
-
-do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
diff --git a/meta/classes/prserv.bbclass b/meta/classes/prserv.bbclass
index b440d863ef..139597f9cb 100644
--- a/meta/classes/prserv.bbclass
+++ b/meta/classes/prserv.bbclass
@@ -1,33 +1,2 @@
-def prserv_get_pr_auto(d):
- import oe.prservice
- import re
- pv = d.getVar("PV", True)
- if not d.getVar('PRSERV_HOST', True):
- if 'AUTOINC' in pv:
- d.setVar("PKGV", pv.replace("AUTOINC", "0"))
- bb.warn("Not using network based PR service")
- return None
- version = d.getVar("PRAUTOINX", True)
- pkgarch = d.getVar("PACKAGE_ARCH", True)
- checksum = d.getVar("BB_TASKHASH", True)
-
- conn = d.getVar("__PRSERV_CONN", True)
- if conn is None:
- conn = oe.prservice.prserv_make_conn(d)
- if conn is None:
- return None
-
- if "AUTOINC" in pv:
- srcpv = bb.fetch2.get_srcrev(d)
- base_ver = "AUTOINC-%s" % version[:version.find(srcpv)]
- value = conn.getPR(base_ver, pkgarch, srcpv)
- d.setVar("PKGV", pv.replace("AUTOINC", str(value)))
-
- if d.getVar('PRSERV_LOCKDOWN', True):
- auto_rev = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
- else:
- auto_rev = conn.getPR(version, pkgarch, checksum)
-
- return auto_rev
diff --git a/meta/classes/ptest-gnome.bbclass b/meta/classes/ptest-gnome.bbclass
new file mode 100644
index 0000000000..b2949af9bb
--- /dev/null
+++ b/meta/classes/ptest-gnome.bbclass
@@ -0,0 +1,8 @@
+inherit ptest
+
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
+
+FILES_${PN}-ptest += "${libexecdir}/installed-tests/ \
+ ${datadir}/installed-tests/"
+
+RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index fdd22bbc86..97029dc525 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -2,5 +2,7 @@
inherit python-dir
PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+# PYTHON_EXECUTABLE is used by cmake
+PYTHON_EXECUTABLE="${PYTHON}"
EXTRANATIVEPATH += "${PYTHON_PN}-native"
DEPENDS += " ${PYTHON_PN}-native "
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index abee8aaa7c..601f587534 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -29,19 +29,23 @@ def qemu_run_binary(data, rootfs_path, binary):
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
+ qemu_options = data.getVar("QEMU_OPTIONS", True)
- return "PSEUDO_UNLOAD=1 " + qemu_binary + " -L " + rootfs_path\
+ return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ rootfs_path + binary
-QEMU_OPTIONS = ""
-QEMU_OPTIONS_iwmmxt = "-cpu pxa270-c5"
-QEMU_OPTIONS_armv6 = "-cpu arm1136"
-QEMU_OPTIONS_armv7a = "-cpu cortex-a8"
-QEMU_OPTIONS_e500v2 = "-cpu e500v2"
-QEMU_OPTIONS_e500mc = "-cpu e500mc"
-QEMU_OPTIONS_e5500 = "-cpu e5500"
-QEMU_OPTIONS_e5500-64b = "-cpu e5500"
-QEMU_OPTIONS_e6500 = "-cpu e6500"
-QEMU_OPTIONS_e6500-64b = "-cpu e6500"
-QEMU_OPTIONS_ppc7400 = "-cpu 7400"
+# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are
+# PACKAGE_ARCH, not overrides and hence have to do this dance. Simply being arch
+# specific isn't good enough.
+QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
+QEMU_EXTRAOPTIONS_iwmmxt = " -cpu pxa270-c5"
+QEMU_EXTRAOPTIONS_armv6 = " -cpu arm1136"
+QEMU_EXTRAOPTIONS_armv7a = " -cpu cortex-a8"
+QEMU_EXTRAOPTIONS_e500v2 = " -cpu e500v2"
+QEMU_EXTRAOPTIONS_e500mc = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_e5500 = " -cpu e5500"
+QEMU_EXTRAOPTIONS_e5500-64b = " -cpu e5500"
+QEMU_EXTRAOPTIONS_e6500 = " -cpu e6500"
+QEMU_EXTRAOPTIONS_e6500-64b = " -cpu e6500"
+QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
diff --git a/meta/classes/qt4e.bbclass b/meta/classes/qt4e.bbclass
index 850bb6a717..13b1050aac 100644
--- a/meta/classes/qt4e.bbclass
+++ b/meta/classes/qt4e.bbclass
@@ -19,6 +19,3 @@ EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
# Qt4 uses atomic instructions not supported in thumb mode
ARM_INSTRUCTION_SET = "arm"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
diff --git a/meta/classes/qt4x11.bbclass b/meta/classes/qt4x11.bbclass
index 65d196afc6..6f06d34755 100644
--- a/meta/classes/qt4x11.bbclass
+++ b/meta/classes/qt4x11.bbclass
@@ -1,7 +1,10 @@
QT4DEPENDS ?= "qt4-x11 "
DEPENDS_prepend = "${QT4DEPENDS}"
-inherit qmake2
+# depends on qt4-x11
+REQUIRED_DISTRO_FEATURES += "x11"
+
+inherit qmake2 distro_features_check
QT_BASE_NAME = "qt4"
QT_DIR_NAME = "qt4"
@@ -9,6 +12,3 @@ QT_LIBINFIX = ""
# Qt4 uses atomic instructions not supported in thumb mode
ARM_INSTRUCTION_SET = "arm"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 5fe2355842..5f155e332b 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -44,11 +44,18 @@ python errorreport_handler () {
task = e.task
taskdata={}
log = e.data.getVar('BB_LOGFILE', True)
- logFile = open(log, 'r')
taskdata['package'] = e.data.expand("${PF}")
taskdata['task'] = task
- taskdata['log'] = logFile.read()
- logFile.close()
+ if log:
+ try:
+ logFile = open(log, 'r')
+ taskdata['log'] = logFile.read().decode('utf-8')
+ logFile.close()
+ except:
+ taskdata['log'] = "Unable to read log file"
+
+ else:
+ taskdata['log'] = "No Log"
jsondata = json.loads(errorreport_getdata(e))
jsondata['failures'].append(taskdata)
errorreport_savedata(e, jsondata, "error-report.txt")
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index f0f6d18249..e68d02a783 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -97,3 +97,24 @@ do_rm_work_all () {
}
do_rm_work_all[recrdeptask] = "do_rm_work"
addtask rm_work_all after do_rm_work
+
+do_populate_sdk[postfuncs] += "rm_work_populatesdk"
+rm_work_populatesdk () {
+ :
+}
+rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
+
+do_rootfs[postfuncs] += "rm_work_rootfs"
+rm_work_rootfs () {
+ :
+}
+rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
+
+python () {
+ # If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
+ excludes = (d.getVar("RM_WORK_EXCLUDE", True) or "").split()
+ pn = d.getVar("PN", True)
+ if pn in excludes:
+ d.delVarFlag('rm_work_rootfs', 'cleandirs')
+ d.delVarFlag('rm_work_populatesdk', 'cleandirs')
+}
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index a42a472822..d51b4582d2 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -6,11 +6,13 @@ ROOTFS_PKGMANAGE = "dpkg apt"
ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
+do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_package_write_deb"
rootfs_deb_do_rootfs[vardepsexclude] += "BUILDNAME"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
python rootfs_deb_bad_recommendations() {
if d.getVar("BAD_RECOMMENDATIONS", True):
@@ -22,3 +24,16 @@ DEB_POSTPROCESS_COMMANDS = ""
opkglibdir = "${localstatedir}/lib/opkg"
+python () {
+ # Map TARGET_ARCH to Debian's ideas about architectures
+ darch = d.getVar('SDK_ARCH', True)
+ if darch in ["x86", "i486", "i586", "i686", "pentium"]:
+ d.setVar('DEB_SDK_ARCH', 'i386')
+ elif darch == "x86_64":
+ d.setVar('DEB_SDK_ARCH', 'amd64')
+ elif darch == "arm":
+ d.setVar('DEB_SDK_ARCH', 'armel')
+}
+
+# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
+DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index f5fef00166..6139cc7d59 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -10,11 +10,13 @@ ROOTFS_PKGMANAGE = "opkg opkg-collateral ${EXTRAOPKGCONFIG}"
ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
+do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_package_write_ipk"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
rootfs_ipk_do_rootfs[vardepsexclude] += "BUILDNAME"
do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
+do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
OPKG_PREPROCESS_COMMANDS = ""
@@ -35,4 +37,3 @@ python () {
d.setVar('OPKG_PREPROCESS_COMMANDS', "")
d.setVar('OPKG_POSTPROCESS_COMMANDS', '')
}
-
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 9e97d341d9..d85d001a62 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -11,15 +11,15 @@ IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smar
# Smart is python based, so be sure python-native is available to us.
EXTRANATIVEPATH += "python-native"
-do_rootfs[depends] += "rpm-native:do_populate_sysroot"
-do_rootfs[depends] += "rpmresolve-native:do_populate_sysroot"
-do_rootfs[depends] += "python-smartpm-native:do_populate_sysroot"
+# opkg is needed for update-alternatives
+RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
+ rpmresolve-native:do_populate_sysroot \
+ python-smartpm-native:do_populate_sysroot \
+ createrepo-native:do_populate_sysroot \
+ opkg-native:do_populate_sysroot"
-# Needed for update-alternatives
-do_rootfs[depends] += "opkg-native:do_populate_sysroot"
-
-# Creating the repo info in do_rootfs
-do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
+do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
+do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
do_rootfs[recrdeptask] += "do_package_write_rpm"
rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
@@ -28,6 +28,7 @@ do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
python () {
if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
@@ -40,3 +41,7 @@ python () {
d.setVar('RPM_POSTPROCESS_COMMANDS', '')
}
+# Smart is python based, so be sure python-native is available to us.
+EXTRANATIVEPATH += "python-native"
+
+rpmlibdir = "/var/lib/rpm"
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ed65814be2..2f75558104 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -87,17 +87,54 @@ def raise_sanity_error(msg, d, network_error=False):
%s""" % msg)
+# Check flags associated with a tuning.
+def check_toolchain_tune_args(data, tune, multilib, errs):
+ found_errors = False
+ if check_toolchain_args_present(data, tune, multilib, errs, 'CCARGS'):
+ found_errors = True
+ if check_toolchain_args_present(data, tune, multilib, errs, 'ASARGS'):
+ found_errors = True
+ if check_toolchain_args_present(data, tune, multilib, errs, 'LDARGS'):
+ found_errors = True
+
+ return found_errors
+
+def check_toolchain_args_present(data, tune, multilib, tune_errors, which):
+ args_set = (data.getVar("TUNE_%s" % which, True) or "").split()
+ args_wanted = (data.getVar("TUNEABI_REQUIRED_%s_tune-%s" % (which, tune), True) or "").split()
+ args_missing = []
+
+ # If no args are listed/required, we are done.
+ if not args_wanted:
+ return
+ for arg in args_wanted:
+ if arg not in args_set:
+ args_missing.append(arg)
+
+ found_errors = False
+ if args_missing:
+ found_errors = True
+ tune_errors.append("TUNEABI for %s requires '%s' in TUNE_%s (%s)." %
+ (tune, ' '.join(args_missing), which, ' '.join(args_set)))
+ return found_errors
+
# Check a single tune for validity.
def check_toolchain_tune(data, tune, multilib):
tune_errors = []
if not tune:
return "No tuning found for %s multilib." % multilib
+ localdata = bb.data.createCopy(data)
+ if multilib != "default":
+ # Apply the overrides so we can look at the details.
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + multilib
+ localdata.setVar("OVERRIDES", overrides)
+ bb.data.update_data(localdata)
bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
- features = (data.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
+ features = (localdata.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
if not features:
return "Tuning '%s' has no defined features, and cannot be used." % tune
- valid_tunes = data.getVarFlags('TUNEVALID') or {}
- conflicts = data.getVarFlags('TUNECONFLICTS') or {}
+ valid_tunes = localdata.getVarFlags('TUNEVALID') or {}
+ conflicts = localdata.getVarFlags('TUNECONFLICTS') or {}
# [doc] is the documentation for the variable, not a real feature
if 'doc' in valid_tunes:
del valid_tunes['doc']
@@ -113,15 +150,17 @@ def check_toolchain_tune(data, tune, multilib):
bb.debug(2, " %s: %s" % (feature, valid_tunes[feature]))
else:
tune_errors.append("Feature '%s' is not defined." % feature)
- whitelist = data.getVar("TUNEABI_WHITELIST", True) or ''
- override = data.getVar("TUNEABI_OVERRIDE", True) or ''
+ whitelist = localdata.getVar("TUNEABI_WHITELIST", True)
if whitelist:
- tuneabi = data.getVar("TUNEABI_tune-%s" % tune, True) or ''
+ tuneabi = localdata.getVar("TUNEABI_tune-%s" % tune, True)
if not tuneabi:
tuneabi = tune
if True not in [x in whitelist.split() for x in tuneabi.split()]:
tune_errors.append("Tuning '%s' (%s) cannot be used with any supported tuning/ABI." %
(tune, tuneabi))
+ else:
+ if not check_toolchain_tune_args(localdata, tuneabi, multilib, tune_errors):
+ bb.debug(2, "Sanity check: Compiler args OK for %s." % tune)
if tune_errors:
return "Tuning '%s' has the following errors:\n" % tune + '\n'.join(tune_errors)
@@ -225,7 +264,7 @@ def check_connectivity(d):
# CONNECTIVITY_CHECK_URIS are set
network_enabled = not d.getVar('BB_NO_NETWORK', True)
check_enabled = len(test_uris)
- # Take a copy of the data store and unset MIRRORS and PREMIRROS
+ # Take a copy of the data store and unset MIRRORS and PREMIRRORS
data = bb.data.createCopy(d)
data.delVar('PREMIRRORS')
data.delVar('MIRRORS')
@@ -480,6 +519,16 @@ def sanity_handle_abichanges(status, d):
status.addresult("Your configuration is using stamp files including the sstate hash but your build directory was built with stamp files that do not include this.\nTo continue, either rebuild or switch back to the OEBasic signature handler with BB_SIGNATURE_HANDLER = 'OEBasic'.\n")
elif (abi != current_abi and current_abi == "9"):
status.addresult("The layout of the TMPDIR STAMPS directory has changed. Please clean out TMPDIR and rebuild (sstate will be still be valid and reused)\n")
+ elif (abi != current_abi and current_abi == "10" and (abi == "8" or abi == "9")):
+ bb.note("Converting staging layout from version 8/9 to layout version 10")
+ cmd = d.expand("grep -r -l sysroot-providers/virtual_kernel ${SSTATE_MANIFESTS}")
+ ret, result = oe.utils.getstatusoutput(cmd)
+ result = result.split()
+ for f in result:
+ bb.note("Uninstalling manifest file %s" % f)
+ sstate_clean_manifest(f, d)
+ with open(abifile, "w") as f:
+ f.write(current_abi)
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
status.addresult("Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi))
@@ -514,6 +563,7 @@ def check_sanity_version_change(status, d):
import xml.parsers.expat
except ImportError:
status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
+ import stat
status.addresult(check_make_version(d))
status.addresult(check_tar_version(d))
@@ -566,6 +616,11 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
tmpdir = d.getVar('TMPDIR', True)
status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
+ tmpdirmode = os.stat(tmpdir).st_mode
+ if (tmpdirmode & stat.S_ISGID):
+ status.addresult("TMPDIR is setgid, please don't build in a setgid directory")
+ if (tmpdirmode & stat.S_ISUID):
+ status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
# Some third-party software apparently relies on chmod etc. being suid root (!!)
import stat
@@ -708,6 +763,44 @@ def check_sanity_everybuild(status, d):
if oeroot.find(' ') != -1:
status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.")
+ # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
+ import re
+ mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
+ protocols = ['http', 'ftp', 'file', 'https', \
+ 'git', 'gitsm', 'hg', 'osc', 'p4', 'svk', 'svn', \
+ 'bzr', 'cvs']
+ for mirror_var in mirror_vars:
+ mirrors = (d.getVar(mirror_var, True) or '').replace('\\n', '\n').split('\n')
+ for mirror_entry in mirrors:
+ mirror_entry = mirror_entry.strip()
+ if not mirror_entry:
+ # ignore blank lines
+ continue
+
+ try:
+ pattern, mirror = mirror_entry.split()
+ except ValueError:
+ bb.warn('Invalid %s: %s, should be 2 members.' % (mirror_var, mirror_entry.strip()))
+ continue
+
+ decoded = bb.fetch2.decodeurl(pattern)
+ try:
+ pattern_scheme = re.compile(decoded[0])
+ except re.error as exc:
+ bb.warn('Invalid scheme regex (%s) in %s; %s' % (pattern, mirror_var, mirror_entry))
+ continue
+
+ if not any(pattern_scheme.match(protocol) for protocol in protocols):
+ bb.warn('Invalid protocol (%s) in %s: %s' % (decoded[0], mirror_var, mirror_entry))
+ continue
+
+ if not any(mirror.startswith(protocol + '://') for protocol in protocols):
+ bb.warn('Invalid protocol in %s: %s' % (mirror_var, mirror_entry))
+ continue
+
+ if mirror.startswith('file://') and not mirror.startswith('file:///'):
+ bb.warn('Invalid file url in %s: %s, must be absolute path (file:///)' % (mirror_var, mirror_entry))
+
# Check that TMPDIR hasn't changed location since the last time we were run
tmpdir = d.getVar('TMPDIR', True)
checkfile = os.path.join(tmpdir, "saved_tmpdir")
diff --git a/meta/classes/siteconfig.bbclass b/meta/classes/siteconfig.bbclass
index 9a4d03b887..45dce489de 100644
--- a/meta/classes/siteconfig.bbclass
+++ b/meta/classes/siteconfig.bbclass
@@ -18,13 +18,13 @@ siteconfig_do_siteconfig_gencache () {
>${WORKDIR}/site_config_${MACHINE}/configure.ac
cd ${WORKDIR}/site_config_${MACHINE}
autoconf
- rm -f ${PN}_cache
- CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
+ rm -f ${BPN}_cache
+ CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
- < ${PN}_cache > ${PN}_config
+ < ${BPN}_cache > ${BPN}_config
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
- cp ${PN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
+ cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
}
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index e90632aeef..b41db46bc0 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -18,10 +18,10 @@
def siteinfo_data(d):
archinfo = {
"allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch
- "aarch64": "endian-little bit-64 arm-common",
- "aarch64_be": "endian-big bit-64 arm-common",
- "arm": "endian-little bit-32 arm-common",
- "armeb": "endian-big bit-32 arm-common",
+ "aarch64": "endian-little bit-64 arm-common arm-64",
+ "aarch64_be": "endian-big bit-64 arm-common arm-64",
+ "arm": "endian-little bit-32 arm-common arm-32",
+ "armeb": "endian-big bit-32 arm-common arm-32",
"avr32": "endian-big bit-32 avr32-common",
"bfin": "endian-little bit-32 bfin-common",
"i386": "endian-little bit-32 ix86-common",
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 55ce3aff4f..454c53e96f 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -15,252 +15,291 @@
# SPDX file will be output to the path which is defined as[SPDX_MANIFEST_DIR]
# in ./meta/conf/licenses.conf.
-SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir"
SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir"
+# If ${S} isn't actually the top-level source directory, set SPDX_S to point at
+# the real top-level directory.
+SPDX_S ?= "${S}"
+
python do_spdx () {
import os, sys
- import json
+ import json, shutil
info = {}
- info['workdir'] = (d.getVar('WORKDIR', True) or "")
- info['sourcedir'] = (d.getVar('S', True) or "")
- info['pn'] = (d.getVar( 'PN', True ) or "")
- info['pv'] = (d.getVar( 'PV', True ) or "")
- info['src_uri'] = (d.getVar( 'SRC_URI', True ) or "")
- info['spdx_version'] = (d.getVar('SPDX_VERSION', True) or '')
- info['data_license'] = (d.getVar('DATA_LICENSE', True) or '')
-
- spdx_sstate_dir = (d.getVar('SPDXSSTATEDIR', True) or "")
- manifest_dir = (d.getVar('SPDX_MANIFEST_DIR', True) or "")
+ info['workdir'] = d.getVar('WORKDIR', True)
+ info['sourcedir'] = d.getVar('SPDX_S', True)
+ info['pn'] = d.getVar('PN', True)
+ info['pv'] = d.getVar('PV', True)
+ info['spdx_version'] = d.getVar('SPDX_VERSION', True)
+ info['data_license'] = d.getVar('DATA_LICENSE', True)
+
+ sstatedir = d.getVar('SPDXSSTATEDIR', True)
+ sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] + ".spdx")
+
+ manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True)
info['outfile'] = os.path.join(manifest_dir, info['pn'] + ".spdx" )
- sstatefile = os.path.join(spdx_sstate_dir,
- info['pn'] + info['pv'] + ".spdx" )
- info['spdx_temp_dir'] = (d.getVar('SPDX_TEMP_DIR', True) or "")
- info['tar_file'] = os.path.join( info['workdir'], info['pn'] + ".tar.gz" )
+ info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True)
+ info['tar_file'] = os.path.join(info['workdir'], info['pn'] + ".tar.gz" )
+
+ # Make sure important dirs exist
+ try:
+ bb.utils.mkdirhier(manifest_dir)
+ bb.utils.mkdirhier(sstatedir)
+ bb.utils.mkdirhier(info['spdx_temp_dir'])
+ except OSError as e:
+ bb.error("SPDX: Could not set up required directories: " + str(e))
+ return
## get everything from cache. use it to decide if
## something needs to be rerun
- cur_ver_code = get_ver_code( info['sourcedir'] )
+ cur_ver_code = get_ver_code(info['sourcedir'])
cache_cur = False
- if not os.path.exists( spdx_sstate_dir ):
- bb.utils.mkdirhier( spdx_sstate_dir )
- if not os.path.exists( info['spdx_temp_dir'] ):
- bb.utils.mkdirhier( info['spdx_temp_dir'] )
- if os.path.exists( sstatefile ):
+ if os.path.exists(sstatefile):
## cache for this package exists. read it in
- cached_spdx = get_cached_spdx( sstatefile )
+ cached_spdx = get_cached_spdx(sstatefile)
if cached_spdx['PackageVerificationCode'] == cur_ver_code:
- bb.warn(info['pn'] + "'s ver code same as cache's. do nothing")
+ bb.warn("SPDX: Verification code for " + info['pn']
+ + "is same as cache's. do nothing")
cache_cur = True
else:
- local_file_info = setup_foss_scan( info,
- True, cached_spdx['Files'] )
+ local_file_info = setup_foss_scan(info, True, cached_spdx['Files'])
else:
- local_file_info = setup_foss_scan( info, False, None )
+ local_file_info = setup_foss_scan(info, False, None)
if cache_cur:
spdx_file_info = cached_spdx['Files']
+ foss_package_info = cached_spdx['Package']
+ foss_license_info = cached_spdx['Licenses']
else:
## setup fossology command
- foss_server = (d.getVar('FOSS_SERVER', True) or "")
- foss_flags = (d.getVar('FOSS_WGET_FLAGS', True) or "")
+ foss_server = d.getVar('FOSS_SERVER', True)
+ foss_flags = d.getVar('FOSS_WGET_FLAGS', True)
+ foss_full_spdx = d.getVar('FOSS_FULL_SPDX', True) == "true" or False
foss_command = "wget %s --post-file=%s %s"\
- % (foss_flags,info['tar_file'],foss_server)
+ % (foss_flags, info['tar_file'], foss_server)
- #bb.warn(info['pn'] + json.dumps(local_file_info))
- foss_file_info = run_fossology( foss_command )
- spdx_file_info = create_spdx_doc( local_file_info, foss_file_info )
- ## write to cache
- write_cached_spdx(sstatefile,cur_ver_code,spdx_file_info)
+ foss_result = run_fossology(foss_command, foss_full_spdx)
+ if foss_result is not None:
+ (foss_package_info, foss_file_info, foss_license_info) = foss_result
+ spdx_file_info = create_spdx_doc(local_file_info, foss_file_info)
+ ## write to cache
+ write_cached_spdx(sstatefile, cur_ver_code, foss_package_info,
+ spdx_file_info, foss_license_info)
+ else:
+ bb.error("SPDX: Could not communicate with FOSSology server. Command was: " + foss_command)
+ return
## Get document and package level information
- spdx_header_info = get_header_info(info, cur_ver_code, spdx_file_info)
+ spdx_header_info = get_header_info(info, cur_ver_code, foss_package_info)
## CREATE MANIFEST
- create_manifest(info,spdx_header_info,spdx_file_info)
+ create_manifest(info, spdx_header_info, spdx_file_info, foss_license_info)
## clean up the temp stuff
- remove_dir_tree( info['spdx_temp_dir'] )
+ shutil.rmtree(info['spdx_temp_dir'], ignore_errors=True)
if os.path.exists(info['tar_file']):
- remove_file( info['tar_file'] )
+ remove_file(info['tar_file'])
}
addtask spdx after do_patch before do_configure
-def create_manifest(info,header,files):
- with open(info['outfile'], 'w') as f:
+def create_manifest(info, header, files, licenses):
+ import codecs
+ with codecs.open(info['outfile'], mode='w', encoding='utf-8') as f:
+ # Write header
f.write(header + '\n')
+
+ # Write file data
for chksum, block in files.iteritems():
+ f.write("FileName: " + block['FileName'] + '\n')
+ for key, value in block.iteritems():
+ if not key == 'FileName':
+ f.write(key + ": " + value + '\n')
+ f.write('\n')
+
+ # Write license data
+ for id, block in licenses.iteritems():
+ f.write("LicenseID: " + id + '\n')
for key, value in block.iteritems():
- f.write(key + ": " + value)
- f.write('\n')
+ f.write(key + ": " + value + '\n')
f.write('\n')
-def get_cached_spdx( sstatefile ):
+def get_cached_spdx(sstatefile):
import json
+ import codecs
cached_spdx_info = {}
- with open( sstatefile, 'r' ) as f:
+ with codecs.open(sstatefile, mode='r', encoding='utf-8') as f:
try:
cached_spdx_info = json.load(f)
except ValueError as e:
cached_spdx_info = None
return cached_spdx_info
-def write_cached_spdx( sstatefile, ver_code, files ):
+def write_cached_spdx(sstatefile, ver_code, package_info, files, license_info):
import json
+ import codecs
spdx_doc = {}
spdx_doc['PackageVerificationCode'] = ver_code
spdx_doc['Files'] = {}
spdx_doc['Files'] = files
- with open( sstatefile, 'w' ) as f:
+ spdx_doc['Package'] = {}
+ spdx_doc['Package'] = package_info
+ spdx_doc['Licenses'] = {}
+ spdx_doc['Licenses'] = license_info
+ with codecs.open(sstatefile, mode='w', encoding='utf-8') as f:
f.write(json.dumps(spdx_doc))
-def setup_foss_scan( info, cache, cached_files ):
+def setup_foss_scan(info, cache, cached_files):
import errno, shutil
import tarfile
file_info = {}
cache_dict = {}
- for f_dir, f in list_files( info['sourcedir'] ):
- full_path = os.path.join( f_dir, f )
+ for f_dir, f in list_files(info['sourcedir']):
+ full_path = os.path.join(f_dir, f)
abs_path = os.path.join(info['sourcedir'], full_path)
- dest_dir = os.path.join( info['spdx_temp_dir'], f_dir )
- dest_path = os.path.join( info['spdx_temp_dir'], full_path )
- try:
- stats = os.stat(abs_path)
- except OSError as e:
- bb.warn( "Stat failed" + str(e) + "\n")
- continue
-
- checksum = hash_file( abs_path )
- mtime = time.asctime(time.localtime(stats.st_mtime))
-
- ## retain cache information if it exists
- file_info[checksum] = {}
- if cache and checksum in cached_files:
- file_info[checksum] = cached_files[checksum]
- else:
- file_info[checksum]['FileName'] = full_path
-
- try:
- os.makedirs( dest_dir )
- except OSError as e:
- if e.errno == errno.EEXIST and os.path.isdir(dest_dir):
- pass
+ dest_dir = os.path.join(info['spdx_temp_dir'], f_dir)
+ dest_path = os.path.join(info['spdx_temp_dir'], full_path)
+
+ checksum = hash_file(abs_path)
+ if not checksum is None:
+ file_info[checksum] = {}
+ ## retain cache information if it exists
+ if cache and checksum in cached_files:
+ file_info[checksum] = cached_files[checksum]
+ ## have the file included in what's sent to the FOSSology server
else:
- bb.warn( "mkdir failed " + str(e) + "\n" )
- continue
-
- if(cache and checksum not in cached_files) or not cache:
- try:
- shutil.copyfile( abs_path, dest_path )
- except shutil.Error as e:
- bb.warn( str(e) + "\n" )
- except IOError as e:
- bb.warn( str(e) + "\n" )
+ file_info[checksum]['FileName'] = full_path
+ try:
+ bb.utils.mkdirhier(dest_dir)
+ shutil.copyfile(abs_path, dest_path)
+ except OSError as e:
+ bb.warn("SPDX: mkdirhier failed: " + str(e))
+ except shutil.Error as e:
+ bb.warn("SPDX: copyfile failed: " + str(e))
+ except IOError as e:
+ bb.warn("SPDX: copyfile failed: " + str(e))
+ else:
+ bb.warn("SPDX: Could not get checksum for file: " + f)
- with tarfile.open( info['tar_file'], "w:gz" ) as tar:
- tar.add( info['spdx_temp_dir'], arcname=os.path.basename(info['spdx_temp_dir']) )
- tar.close()
+ with tarfile.open(info['tar_file'], "w:gz") as tar:
+ tar.add(info['spdx_temp_dir'], arcname=os.path.basename(info['spdx_temp_dir']))
return file_info
-
-def remove_dir_tree( dir_name ):
- import shutil
+def remove_file(file_name):
try:
- shutil.rmtree( dir_name )
- except:
- pass
-
-def remove_file( file_name ):
- try:
- os.remove( file_name )
+ os.remove(file_name)
except OSError as e:
pass
-def list_files( dir ):
- for root, subFolders, files in os.walk( dir ):
+def list_files(dir):
+ for root, subFolders, files in os.walk(dir):
for f in files:
- rel_root = os.path.relpath( root, dir )
+ rel_root = os.path.relpath(root, dir)
yield rel_root, f
return
-def hash_file( file_name ):
+def hash_file(file_name):
try:
- f = open( file_name, 'rb' )
- data_string = f.read()
+ with open(file_name, 'rb') as f:
+ data_string = f.read()
+ sha1 = hash_string(data_string)
+ return sha1
except:
- return None
- finally:
- f.close()
- sha1 = hash_string( data_string )
- return sha1
+ return None
-def hash_string( data ):
+def hash_string(data):
import hashlib
sha1 = hashlib.sha1()
- sha1.update( data )
+ sha1.update(data)
return sha1.hexdigest()
-def run_fossology( foss_command ):
+def run_fossology(foss_command, full_spdx):
import string, re
import subprocess
p = subprocess.Popen(foss_command.split(),
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
foss_output, foss_error = p.communicate()
-
- records = []
- records = re.findall('FileName:.*?</text>', foss_output, re.S)
+ if p.returncode != 0:
+ return None
+
+ foss_output = unicode(foss_output, "utf-8")
+ foss_output = string.replace(foss_output, '\r', '')
+
+ # Package info
+ package_info = {}
+ if full_spdx:
+ # All mandatory, only one occurance
+ package_info['PackageCopyrightText'] = re.findall('PackageCopyrightText: (.*?</text>)', foss_output, re.S)[0]
+ package_info['PackageLicenseDeclared'] = re.findall('PackageLicenseDeclared: (.*)', foss_output)[0]
+ package_info['PackageLicenseConcluded'] = re.findall('PackageLicenseConcluded: (.*)', foss_output)[0]
+ # These may be more than one
+ package_info['PackageLicenseInfoFromFiles'] = re.findall('PackageLicenseInfoFromFiles: (.*)', foss_output)
+ else:
+ DEFAULT = "NOASSERTION"
+ package_info['PackageCopyrightText'] = "<text>" + DEFAULT + "</text>"
+ package_info['PackageLicenseDeclared'] = DEFAULT
+ package_info['PackageLicenseConcluded'] = DEFAULT
+ package_info['PackageLicenseInfoFromFiles'] = []
+ # File info
file_info = {}
+ records = []
+ # FileName is also in PackageFileName, so we match on FileType as well.
+ records = re.findall('FileName:.*?FileType:.*?</text>', foss_output, re.S)
for rec in records:
- rec = string.replace( rec, '\r', '' )
- chksum = re.findall( 'FileChecksum: SHA1: (.*)\n', rec)[0]
+ chksum = re.findall('FileChecksum: SHA1: (.*)\n', rec)[0]
file_info[chksum] = {}
- file_info[chksum]['FileCopyrightText'] = re.findall( 'FileCopyrightText: '
+ file_info[chksum]['FileCopyrightText'] = re.findall('FileCopyrightText: '
+ '(.*?</text>)', rec, re.S )[0]
- fields = ['FileType','LicenseConcluded',
- 'LicenseInfoInFile','FileName']
+ fields = ['FileName', 'FileType', 'LicenseConcluded', 'LicenseInfoInFile']
for field in fields:
file_info[chksum][field] = re.findall(field + ': (.*)', rec)[0]
- return file_info
+ # Licenses
+ license_info = {}
+ licenses = []
+ licenses = re.findall('LicenseID:.*?LicenseName:.*?\n', foss_output, re.S)
+ for lic in licenses:
+ license_id = re.findall('LicenseID: (.*)\n', lic)[0]
+ license_info[license_id] = {}
+ license_info[license_id]['ExtractedText'] = re.findall('ExtractedText: (.*?</text>)', lic, re.S)[0]
+ license_info[license_id]['LicenseName'] = re.findall('LicenseName: (.*)', lic)[0]
+
+ return (package_info, file_info, license_info)
-def create_spdx_doc( file_info, scanned_files ):
+def create_spdx_doc(file_info, scanned_files):
import json
## push foss changes back into cache
for chksum, lic_info in scanned_files.iteritems():
if chksum in file_info:
- file_info[chksum]['FileName'] = file_info[chksum]['FileName']
file_info[chksum]['FileType'] = lic_info['FileType']
file_info[chksum]['FileChecksum: SHA1'] = chksum
file_info[chksum]['LicenseInfoInFile'] = lic_info['LicenseInfoInFile']
file_info[chksum]['LicenseConcluded'] = lic_info['LicenseConcluded']
file_info[chksum]['FileCopyrightText'] = lic_info['FileCopyrightText']
else:
- bb.warn(lic_info['FileName'] + " : " + chksum
+ bb.warn("SPDX: " + lic_info['FileName'] + " : " + chksum
+ " : is not in the local file info: "
- + json.dumps(lic_info,indent=1))
+ + json.dumps(lic_info, indent=1))
return file_info
-def get_ver_code( dirname ):
+def get_ver_code(dirname):
chksums = []
- for f_dir, f in list_files( dirname ):
- try:
- stats = os.stat(os.path.join(dirname,f_dir,f))
- except OSError as e:
- bb.warn( "Stat failed" + str(e) + "\n")
- continue
- chksums.append(hash_file(os.path.join(dirname,f_dir,f)))
- ver_code_string = ''.join( chksums ).lower()
- ver_code = hash_string( ver_code_string )
+ for f_dir, f in list_files(dirname):
+ hash = hash_file(os.path.join(dirname, f_dir, f))
+ if not hash is None:
+ chksums.append(hash)
+ else:
+ bb.warn("SPDX: Could not hash file: " + path)
+ ver_code_string = ''.join(chksums).lower()
+ ver_code = hash_string(ver_code_string)
return ver_code
-def get_header_info( info, spdx_verification_code, spdx_files ):
+def get_header_info(info, spdx_verification_code, package_info):
"""
Put together the header SPDX information.
Eventually this needs to become a lot less
@@ -271,14 +310,12 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head = []
DEFAULT = "NOASSERTION"
- #spdx_verification_code = get_ver_code( info['sourcedir'] )
- package_checksum = ''
- if os.path.exists(info['tar_file']):
- package_checksum = hash_file( info['tar_file'] )
- else:
+ package_checksum = hash_file(info['tar_file'])
+ if package_checksum is None:
package_checksum = DEFAULT
## document level information
+ head.append("## SPDX Document Information")
head.append("SPDXVersion: " + info['spdx_version'])
head.append("DataLicense: " + info['data_license'])
head.append("DocumentComment: <text>SPDX for "
@@ -286,9 +323,11 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head.append("")
## Creator information
- now = datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
+ ## Note that this does not give time in UTC.
+ now = datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')
head.append("## Creation Information")
- head.append("Creator: fossology-spdx")
+ ## Tools are supposed to have a version, but FOSSology+SPDX provides none.
+ head.append("Creator: Tool: FOSSology+SPDX")
head.append("Created: " + now)
head.append("CreatorComment: <text>UNO</text>")
head.append("")
@@ -297,21 +336,26 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head.append("## Package Information")
head.append("PackageName: " + info['pn'])
head.append("PackageVersion: " + info['pv'])
- head.append("PackageDownloadLocation: " + DEFAULT)
- head.append("PackageSummary: <text></text>")
head.append("PackageFileName: " + os.path.basename(info['tar_file']))
head.append("PackageSupplier: Person:" + DEFAULT)
+ head.append("PackageDownloadLocation: " + DEFAULT)
+ head.append("PackageSummary: <text></text>")
head.append("PackageOriginator: Person:" + DEFAULT)
head.append("PackageChecksum: SHA1: " + package_checksum)
head.append("PackageVerificationCode: " + spdx_verification_code)
head.append("PackageDescription: <text>" + info['pn']
+ " version " + info['pv'] + "</text>")
head.append("")
- head.append("PackageCopyrightText: <text>" + DEFAULT + "</text>")
+ head.append("PackageCopyrightText: "
+ + package_info['PackageCopyrightText'])
head.append("")
- head.append("PackageLicenseDeclared: " + DEFAULT)
- head.append("PackageLicenseConcluded: " + DEFAULT)
- head.append("PackageLicenseInfoFromFiles: " + DEFAULT)
+ head.append("PackageLicenseDeclared: "
+ + package_info['PackageLicenseDeclared'])
+ head.append("PackageLicenseConcluded: "
+ + package_info['PackageLicenseConcluded'])
+
+ for licref in package_info['PackageLicenseInfoFromFiles']:
+ head.append("PackageLicenseInfoFromFiles: " + licref)
head.append("")
## header for file level
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 90119732dd..ace6bdb57a 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -21,7 +21,8 @@ SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC
# of the system, we let the sstate paths take care of this.
SSTATE_EXTRAPATH[vardepvalue] = ""
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/"
+# For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/all/"
# Avoid docbook/sgml catalog warnings for now
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
@@ -32,24 +33,34 @@ BB_HASHFILENAME = "${SSTATE_EXTRAPATH} ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
-SSTATEPREINSTFUNCS ?= ""
-SSTATEPOSTINSTFUNCS ?= ""
+SSTATECREATEFUNCS = "sstate_hardcode_path"
+SSTATEPOSTCREATEFUNCS = ""
+SSTATEPREINSTFUNCS = ""
+SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
+SSTATEPOSTINSTFUNCS = ""
EXTRA_STAGING_FIXMES ?= ""
+SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
+
# Specify dirs in which the shell function is executed and don't use ${B}
# as default dirs to avoid possible race about ${B} with other task.
sstate_create_package[dirs] = "${SSTATE_BUILDDIR}"
sstate_unpack_package[dirs] = "${SSTATE_INSTDIR}"
+# Do not run sstate_hardcode_path() in ${B}:
+# the ${B} maybe removed by cmake_do_configure() while
+# sstate_hardcode_path() running.
+sstate_hardcode_path[dirs] = "${SSTATE_BUILDDIR}"
+
python () {
if bb.data.inherits_class('native', d):
d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))
elif bb.data.inherits_class('crosssdk', d):
- d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}"))
+ d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross', d):
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${TARGET_ARCH}"))
elif bb.data.inherits_class('nativesdk', d):
- d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}"))
+ d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross-canadian', d):
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH", True) == "all":
@@ -182,7 +193,29 @@ def sstate_install(ss, d):
if search_output != "":
match.append("Matched in %s" % search_output.rstrip())
if match:
- bb.warn("The recipe %s is trying to install files into a shared area when those files already exist. Those files and their manifest location are:\n %s\nPlease verify which package should provide the above files." % (d.getVar('PN', True), "\n ".join(match)))
+ bb.error("The recipe %s is trying to install files into a shared " \
+ "area when those files already exist. Those files and their manifest " \
+ "location are:\n %s\nPlease verify which recipe should provide the " \
+ "above files.\nThe build has stopped as continuing in this scenario WILL " \
+ "break things, if not now, possibly in the future (we've seen builds fail " \
+ "several months later). If the system knew how to recover from this " \
+ "automatically it would however there are several different scenarios " \
+ "which can result in this and we don't know which one this is. It may be " \
+ "you have switched providers of something like virtual/kernel (e.g. from " \
+ "linux-yocto to linux-yocto-dev), in that case you need to execute the " \
+ "clean task for both recipes and it will resolve this error. It may be " \
+ "you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning " \
+ "those recipes should again resolve this error however switching " \
+ "DISTRO_FEATURES on an existing build directory is not supported, you " \
+ "should really clean out tmp and rebuild (reusing sstate should be safe). " \
+ "It could be the overlapping files detected are harmless in which case " \
+ "adding them to SSTATE_DUPWHITELIST may be the correct solution. It could " \
+ "also be your build is including two different conflicting versions of " \
+ "things (e.g. bluez 4 and bluez 5 and the correct solution for that would " \
+ "be to resolve the conflict. If in doubt, please ask on the mailing list, " \
+ "sharing the error and filelist above." % \
+ (d.getVar('PN', True), "\n ".join(match)))
+ bb.fatal("If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.")
# Write out the manifest
f = open(manifest, "w")
@@ -239,16 +272,32 @@ def sstate_installpkg(ss, d):
d.setVar('SSTATE_INSTDIR', sstateinst)
d.setVar('SSTATE_PKG', sstatepkg)
- for preinst in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split():
- bb.build.exec_func(preinst, d)
+ for f in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split() + ['sstate_unpack_package'] + (d.getVar('SSTATEPOSTUNPACKFUNCS', True) or '').split():
+ bb.build.exec_func(f, d)
- bb.build.exec_func('sstate_unpack_package', d)
+ for state in ss['dirs']:
+ prepdir(state[1])
+ os.rename(sstateinst + state[0], state[1])
+ sstate_install(ss, d)
+ for plain in ss['plaindirs']:
+ workdir = d.getVar('WORKDIR', True)
+ src = sstateinst + "/" + plain.replace(workdir, '')
+ dest = plain
+ bb.utils.mkdirhier(src)
+ prepdir(dest)
+ os.rename(src, dest)
+
+ return True
+
+python sstate_hardcode_path_unpack () {
# Fixup hardcoded paths
#
# Note: The logic below must match the reverse logic in
# sstate_hardcode_path(d)
+ import subprocess
+ sstateinst = d.getVar('SSTATE_INSTDIR', True)
fixmefn = sstateinst + "fixmepath"
if os.path.isfile(fixmefn):
staging = d.getVar('STAGING_DIR', True)
@@ -276,21 +325,7 @@ def sstate_installpkg(ss, d):
# Need to remove this or we'd copy it into the target directory and may
# conflict with another writer
os.remove(fixmefn)
-
- for state in ss['dirs']:
- prepdir(state[1])
- os.rename(sstateinst + state[0], state[1])
- sstate_install(ss, d)
-
- for plain in ss['plaindirs']:
- workdir = d.getVar('WORKDIR', True)
- src = sstateinst + "/" + plain.replace(workdir, '')
- dest = plain
- bb.utils.mkdirhier(src)
- prepdir(dest)
- os.rename(src, dest)
-
- return True
+}
def sstate_clean_cachefile(ss, d):
import oe.path
@@ -395,7 +430,7 @@ python sstate_cleanall() {
sstate_clean(shared_state, ld)
}
-def sstate_hardcode_path(d):
+python sstate_hardcode_path () {
import subprocess, platform
# Need to remove hardcoded paths and fix these when we install the
@@ -413,7 +448,7 @@ def sstate_hardcode_path(d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
elif bb.data.inherits_class('cross', d):
- sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging)
+ sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
else:
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
@@ -449,6 +484,7 @@ def sstate_hardcode_path(d):
else:
bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
subprocess.call(sstate_filelist_relative_cmd, shell=True)
+}
def sstate_package(ss, d):
import oe.path
@@ -506,9 +542,11 @@ def sstate_package(ss, d):
d.setVar('SSTATE_BUILDDIR', sstatebuild)
d.setVar('SSTATE_PKG', sstatepkg)
- sstate_hardcode_path(d)
- bb.build.exec_func('sstate_create_package', d)
-
+
+ for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + ['sstate_create_package'] + \
+ (d.getVar('SSTATEPOSTCREATEFUNCS', True) or '').split():
+ bb.build.exec_func(f, d)
+
bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
return
@@ -591,7 +629,8 @@ sstate_create_package () {
if [ "$(ls -A)" ]; then
set +e
tar -czf $TFILE *
- if [ $? -ne 0 ] && [ $? -ne 1 ]; then
+ ret=$?
+ if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then
exit 1
fi
set -e
@@ -612,6 +651,8 @@ sstate_unpack_package () {
mkdir -p ${SSTATE_INSTDIR}
cd ${SSTATE_INSTDIR}
tar -xmvzf ${SSTATE_PKG}
+ # Use "! -w ||" to return true for read only files
+ [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
}
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
@@ -704,6 +745,9 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
evdata['found'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )
bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d)
+ if hasattr(bb.parse.siggen, "checkhashes"):
+ bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)
+
return ret
BB_SETSCENE_DEPVALID = "setscene_depvalid"
@@ -733,15 +777,15 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
if dep in notneeded:
continue
# do_package_write_* and do_package doesn't need do_package
- if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
+ if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package_qa']:
continue
# do_package_write_* and do_package doesn't need do_populate_sysroot, unless is a postinstall dependency
- if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
+ if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package_qa']:
if isPostInstDep(taskdependees[task][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']:
return False
continue
# Native/Cross packages don't exist and are noexec anyway
- if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package']:
+ if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package', 'do_package_qa']:
continue
# Consider sysroot depending on sysroot tasks
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 7c43e7618d..57b2743196 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -106,6 +106,7 @@ python do_populate_sysroot () {
}
do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}"
+do_populate_sysroot[vardepsexclude] += "MULTI_PROVIDER_WHITELIST"
SSTATETASKS += "do_populate_sysroot"
do_populate_sysroot[cleandirs] = "${SYSROOT_DESTDIR}"
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index b9701bf237..d6498d98bb 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -5,7 +5,7 @@
# Provide syslinux specific functions for building bootable images.
# External variables
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
# ${AUTO_SYSLINUXMENU} - set this to 1 to enable creating an automatic menu
# ${LABELS} - a list of targets for the automatic config
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index a6ad723dfd..c34884bd38 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -55,6 +55,8 @@ fi
systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
+systemd_populate_packages[vardepsexclude] += "OVERRIDES"
+
python systemd_populate_packages() {
if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
@@ -141,10 +143,7 @@ python systemd_populate_packages() {
if has_exactly_one_service:
has_exactly_one_service = len(get_package_var(d, 'SYSTEMD_SERVICE', systemd_packages).split()) == 1
- keys = 'Also' # Conflicts??
- if has_exactly_one_service:
- # single service gets also the /dev/null dummies
- keys = 'Also Conflicts'
+ keys = 'Also'
# scan for all in SYSTEMD_SERVICE[]
for pkg_systemd in systemd_packages.split():
for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split():
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 285c6a9d42..683173854d 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -19,7 +19,7 @@
# Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies.
# A layer can add its own tests in lib/oeqa/runtime, provided it extends BBPATH as normal in its layer.conf.
-# TEST_LOG_DIR contains a ssh log (what command is running, output and return codes) and a qemu boot log till login
+# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login.
# Booting is handled by this class, and it's not a test in itself.
# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.
@@ -30,8 +30,9 @@ TEST_EXPORT_ONLY ?= "0"
DEFAULT_TEST_SUITES = "ping auto"
DEFAULT_TEST_SUITES_pn-core-image-minimal = "ping"
-DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg python"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart kernelmodule dmesg python"
+DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg python parselogs"
+DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart kernelmodule dmesg python parselogs"
+DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
@@ -53,8 +54,15 @@ do_testimage[nostamp] = "1"
do_testimage[depends] += "${TESTIMAGEDEPENDS}"
do_testimage[lockfiles] += "${TESTIMAGELOCK}"
+python do_testsdk() {
+ testsdk_main(d)
+}
+addtask testsdk
+do_testsdk[nostamp] = "1"
+do_testsdk[depends] += "${TESTIMAGEDEPENDS}"
+do_testsdk[lockfiles] += "${TESTIMAGELOCK}"
-def get_tests_list(d):
+def get_tests_list(d, type="runtime"):
testsuites = d.getVar("TEST_SUITES", True).split()
bbpath = d.getVar("BBPATH", True).split(':')
@@ -65,12 +73,12 @@ def get_tests_list(d):
if testname != "auto":
found = False
for p in bbpath:
- if os.path.exists(os.path.join(p, 'lib', 'oeqa', 'runtime', testname + '.py')):
- testslist.append("oeqa.runtime." + testname)
+ if os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname + '.py')):
+ testslist.append("oeqa." + type + "." + testname)
found = True
break
if not found:
- bb.error('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
+ bb.fatal('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
if "auto" in testsuites:
def add_auto_list(path):
@@ -78,12 +86,12 @@ def get_tests_list(d):
bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
for f in files:
- module = 'oeqa.runtime.' + f[:-3]
+ module = 'oeqa.' + type + '.' + f[:-3]
if module not in testslist:
testslist.append(module)
for p in bbpath:
- testpath = os.path.join(p, 'lib', 'oeqa', 'runtime')
+ testpath = os.path.join(p, 'lib', 'oeqa', type)
bb.debug(2, 'Searching for tests in %s' % testpath)
if os.path.exists(testpath):
add_auto_list(testpath)
@@ -230,3 +238,86 @@ def testimage_main(d):
target.stop()
testimage_main[vardepsexclude] =+ "BB_ORIGENV"
+
+
+def testsdk_main(d):
+ import unittest
+ import os
+ import glob
+ import oeqa.runtime
+ import oeqa.sdk
+ import time
+ import subprocess
+ from oeqa.oetest import loadTests, runTests
+
+ pn = d.getVar("PN", True)
+ bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+
+ # tests in TEST_SUITES become required tests
+ # they won't be skipped even if they aren't suitable.
+ # testslist is what we'll actually pass to the unittest loader
+ testslist = get_tests_list(d, "sdk")
+ testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"]
+
+ sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
+ bb.utils.remove(sdktestdir, True)
+ bb.utils.mkdirhier(sdktestdir)
+
+ tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
+ if not os.path.exists(tcname):
+ bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake meta-toolchain' .")
+ subprocess.call("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
+
+ targets = glob.glob(d.expand(sdktestdir + "/tc/sysroots/*${TARGET_VENDOR}-linux*"))
+ if len(targets) > 1:
+ bb.fatal("Error, multiple targets within the SDK found and we don't know which to test? %s" % str(targets))
+ sdkenv = sdktestdir + "/tc/environment-setup-" + os.path.basename(targets[0])
+
+ class TestContext(object):
+ def __init__(self):
+ self.d = d
+ self.testslist = testslist
+ self.testsrequired = testsrequired
+ self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files")
+ self.sdktestdir = sdktestdir
+ self.sdkenv = sdkenv
+ self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
+ self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
+ manifest = os.path.join(d.getVar("SDK_MANIFEST", True))
+ try:
+ with open(manifest) as f:
+ self.pkgmanifest = f.read()
+ except IOError as e:
+ bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
+
+ # test context
+ tc = TestContext()
+
+ # this is a dummy load of tests
+ # we are doing that to find compile errors in the tests themselves
+ # before booting the image
+ try:
+ loadTests(tc, "sdk")
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ try:
+ starttime = time.time()
+ result = runTests(tc, "sdk")
+ stoptime = time.time()
+ if result.wasSuccessful():
+ bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
+ msg = "%s - OK - All required tests passed" % pn
+ skipped = len(result.skipped)
+ if skipped:
+ msg += " (skipped=%d)" % skipped
+ bb.plain(msg)
+ else:
+ raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
+ finally:
+ pass
+ bb.utils.remove(sdktestdir, True)
+
+testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
+
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 95499a5cdd..55d0d28157 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -71,7 +71,7 @@ python toaster_layerinfo_dumpdata() {
layer_url = 'http://layers.openembedded.org/layerindex/layer/{layer}/'
layer_url_name = _get_url_map_name(layer_name)
- layer_info['name'] = layer_name
+ layer_info['name'] = layer_url_name
layer_info['local_path'] = layer_path
layer_info['layer_index_url'] = layer_url.format(layer=layer_url_name)
layer_info['version'] = _get_layer_version_information(layer_path)
@@ -149,14 +149,26 @@ python toaster_image_dumpdata() {
image_name = d.getVar('IMAGE_NAME', True);
image_info_data = {}
+ artifact_info_data = {}
+ # collect all artifacts
for dirpath, dirnames, filenames in os.walk(deploy_dir_image):
for fn in filenames:
- if fn.startswith(image_name):
- image_output = os.path.join(dirpath, fn)
- image_info_data[image_output] = os.stat(image_output).st_size
+ try:
+ if fn.startswith(image_name):
+ image_output = os.path.join(dirpath, fn)
+ image_info_data[image_output] = os.stat(image_output).st_size
+ else:
+ import stat
+ artifact_path = os.path.join(dirpath, fn)
+ filestat = os.stat(artifact_path)
+ if stat.S_ISREG(filestat.st_mode):
+ artifact_info_data[artifact_path] = filestat.st_size
+ except OSError as e:
+ bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
bb.event.fire(bb.event.MetadataEvent("ImageFileSize",image_info_data), d)
+ bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d)
}
@@ -187,8 +199,10 @@ python toaster_collect_task_stats() {
def _read_stats(filename):
cpu_usage = 0
disk_io = 0
- startio = ''
- endio = ''
+ startio = '0'
+ endio = '0'
+ started = '0'
+ ended = '0'
pn = ''
taskname = ''
statinfo = {}
@@ -198,20 +212,28 @@ python toaster_collect_task_stats() {
k,v = line.strip().split(": ", 1)
statinfo[k] = v
- try:
- cpu_usage = statinfo["CPU usage"]
- endio = statinfo["EndTimeIO"]
- startio = statinfo["StartTimeIO"]
- except KeyError:
- pass # we may have incomplete data here
+ if "CPU usage" in statinfo:
+ cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
+
+ if "EndTimeIO" in statinfo:
+ endio = str(statinfo["EndTimeIO"]).strip('% \n\r')
+
+ if "StartTimeIO" in statinfo:
+ startio = str(statinfo["StartTimeIO"]).strip('% \n\r')
+
+ if "Started" in statinfo:
+ started = str(statinfo["Started"]).strip('% \n\r')
+
+ if "Ended" in statinfo:
+ ended = str(statinfo["Ended"]).strip('% \n\r')
+
+ disk_io = int(endio) - int(startio)
- if startio and endio:
- disk_io = int(endio.strip('\n ')) - int(startio.strip('\n '))
+ elapsed_time = float(ended) - float(started)
- if cpu_usage:
- cpu_usage = float(cpu_usage.strip('% \n'))
+ cpu_usage = float(cpu_usage)
- return {'cpu_usage': cpu_usage, 'disk_io': disk_io}
+ return {'cpu_usage': cpu_usage, 'disk_io': disk_io, 'elapsed_time': elapsed_time}
if isinstance(e, (bb.build.TaskSucceeded, bb.build.TaskFailed)):
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 413effecfa..9836db4a4c 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -16,9 +16,10 @@ toolchain_create_sdk_env_script () {
echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
EXTRAPATH=""
for i in ${CANADIANEXTRAOS}; do
- EXTRAPATH="$EXTRAPATH:"`echo ${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS} | sed -e 's,${TARGET_PREFIX},${TARGET_PREFIX}$i,g'`
+ EXTRAPATH="$EXTRAPATH:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$PATH' >> $script
+ echo 'export CCACHE_PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$CCACHE_PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
@@ -37,6 +38,7 @@ toolchain_create_tree_env_script () {
rm -f $script
touch $script
echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
+ echo 'export CCACHE_PATH=${STAGING_DIR_NATIVE}/usr/bin:${CCACHE_PATH}' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
@@ -68,15 +70,31 @@ toolchain_shared_env_script () {
echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
+ echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
+
+ cat >> $script <<EOF
+
+# Append environment subscripts
+if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+EOF
}
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
-TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
+TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses"
#This function create a site config file
@@ -116,5 +134,7 @@ python __anonymous () {
deps = ""
for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
deps += " %s:do_populate_sysroot" % dep
+ for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
+ deps += " %s-%s:do_populate_sysroot" % (variant, dep)
d.appendVarFlag('do_configure', 'depends', deps)
}
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 8ac1b71bc2..b467659cbb 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -38,9 +38,6 @@ python () {
ubootconfig = ubootconfig[0]
for f, v in ubootconfigflags.items():
- if f == 'defaultval':
- continue
-
items = v.split(',')
if items[0] and len(items) > 2:
raise bb.parse.SkipPackage('Only config,images can be specified!')
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
new file mode 100644
index 0000000000..51391dbc4a
--- /dev/null
+++ b/meta/classes/uninative.bbclass
@@ -0,0 +1,44 @@
+NATIVELSBSTRING = "universal"
+
+UNINATIVE_LOADER = "${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2"
+
+addhandler uninative_eventhandler
+uninative_eventhandler[eventmask] = "bb.event.BuildStarted"
+
+python uninative_eventhandler() {
+ loader = e.data.getVar("UNINATIVE_LOADER", True)
+ if not os.path.exists(loader):
+ import subprocess
+ cmd = e.data.expand("mkdir -p ${STAGING_DIR}; cd ${STAGING_DIR}; tar -xjf ${COREBASE}/${BUILD_ARCH}-nativesdk-libc.tar.bz2; ${STAGING_DIR}/relocate_sdk.py ${STAGING_DIR_NATIVE} ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_BINDIR_NATIVE}/patchelf-uninative")
+ #bb.warn("nativesdk lib extraction: " + cmd)
+ subprocess.check_call(cmd, shell=True)
+}
+
+SSTATEPOSTUNPACKFUNCS_append = " uninative_changeinterp"
+
+python uninative_changeinterp () {
+ import subprocess
+ import stat
+ import oe.qa
+
+ if not (bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d)):
+ return
+
+ sstateinst = d.getVar('SSTATE_INSTDIR', True)
+ for walkroot, dirs, files in os.walk(sstateinst):
+ for file in files:
+ f = os.path.join(walkroot, file)
+ if os.path.islink(f):
+ continue
+ s = os.stat(f)
+ if not ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH)):
+ continue
+ elf = oe.qa.ELFFile(f)
+ try:
+ elf.open()
+ except:
+ continue
+
+ #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
+ subprocess.call("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f), shell=True)
+}
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 19b081d235..bc1aa7dad6 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -72,6 +72,7 @@ PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd "
PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
+populate_packages_updatercd[vardepsexclude] += "OVERRIDES"
python populate_packages_updatercd () {
def update_rcd_auto_depend(pkg):
@@ -121,7 +122,7 @@ python populate_packages_updatercd () {
# Check that this class isn't being inhibited (generally, by
# systemd.bbclass) before doing any work.
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
+ if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index a89cb10a4a..421a70a6ab 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -58,7 +58,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
except:
@@ -194,7 +196,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
# If we're processing multiple lines, we could have left over values here...
gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index ea15dabb84..0b9a843b24 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -24,6 +24,8 @@ if test "x$D" != "x"; then
# Installing into a sysroot
SYSROOT="$D"
OPT="--root $D"
+ # user/group lookups should match useradd/groupadd --root
+ export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}"
fi
# If we're not doing a special SSTATE/SYSROOT install
@@ -126,7 +128,7 @@ SYSROOTPOSTFUNC_class-cross = ""
SYSROOTPOSTFUNC_class-native = ""
SYSROOTPOSTFUNC_class-nativesdk = ""
-USERADDSETSCENEDEPS = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
+USERADDSETSCENEDEPS = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
USERADDSETSCENEDEPS_class-cross = ""
USERADDSETSCENEDEPS_class-native = ""
USERADDSETSCENEDEPS_class-nativesdk = ""
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 0ee13e04d7..0f2a484091 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -312,6 +312,8 @@ def explode_deps(s):
def base_set_filespath(path, d):
filespath = []
extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
+ # Remove default flag which was used for checking
+ extrapaths = extrapaths.replace("__default:", "")
# Don't prepend empty strings to the path list
if extrapaths != "":
path = extrapaths.split(":") + path
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf
index e8cf9a3127..2867850688 100644
--- a/meta/conf/abi_version.conf
+++ b/meta/conf/abi_version.conf
@@ -4,4 +4,4 @@
# that breaks the format and have been previously discussed on the mailing list
# with general agreement from the core team.
#
-OELAYOUT_ABI = "9"
+OELAYOUT_ABI = "10"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 311e9a04c4..b5b54b7819 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -133,7 +133,7 @@ SDK_LD_ARCH = "${BUILD_LD_ARCH}"
SDK_AS_ARCH = "${BUILD_AS_ARCH}"
TUNE_PKGARCH ??= ""
-PACKAGE_ARCH = "${TUNE_PKGARCH}"
+PACKAGE_ARCH ??= "${TUNE_PKGARCH}"
MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}"
PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
@@ -169,7 +169,8 @@ ASSUME_PROVIDED = "\
python-native-runtime \
tar-native \
virtual/libintl-native \
- texinfo-native\
+ texinfo-native \
+ bash-native \
"
# gzip-native should be listed above?
@@ -311,6 +312,8 @@ FILES_${PN}-locale = "${datadir}/locale"
FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}"
# FILESPATH is set in base.bbclass
#FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+# This default was only used for checking
+FILESEXTRAPATHS ?= "__default:"
##################################################################
# General work and output directories for the build system.
@@ -391,8 +394,9 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
# Kernel info.
##################################################################
-OLDEST_KERNEL = "2.6.16"
-STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/usr/src/kernel"
+OLDEST_KERNEL = "2.6.32"
+STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
+STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
##################################################################
# Specific image creation and rootfs population info.
@@ -456,7 +460,7 @@ PYTHON = "${@sys.executable}"
export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
-export BUILD_CPP = "${BUILD_PREFIX}cpp ${BUILD_CC_ARCH}"
+export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_AR = "${BUILD_PREFIX}ar"
@@ -516,6 +520,8 @@ LINKER_HASH_STYLE_mips = "sysv"
LINKER_HASH_STYLE_mipsel = "sysv"
LINKER_HASH_STYLE_mips64 = "sysv"
LINKER_HASH_STYLE_mips64el = "sysv"
+LINKER_HASH_STYLE_mips64n32 = "sysv"
+LINKER_HASH_STYLE_mips64eln32 = "sysv"
TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
export LDFLAGS = "${TARGET_LDFLAGS}"
@@ -583,7 +589,7 @@ SRC_URI = ""
# Use pseudo as the fakeroot implementation
PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
-PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}"
+PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
export PSEUDO_DISABLED = "1"
#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
#export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
@@ -599,9 +605,6 @@ PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
# Miscellaneous utilities.
##################################################################
-MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
-MKTEMPCMD = "mktemp -q ${TMPBASE}"
-
# GNU patch tries to be intellgent about checking out read-only files from
# a RCS, which freaks out those special folks with active Perforce clients
# the following makes patch ignore RCS:
@@ -627,9 +630,6 @@ export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
-# library package naming
-AUTO_LIBNAME_PKGS = "${PACKAGES}"
-
###
### Config file processing
###
@@ -688,12 +688,22 @@ IMAGE_FSTYPES ?= "tar.gz"
INITRAMFS_FSTYPES ?= "cpio.gz"
DEFAULT_TASK_PROVIDER ?= "packagegroup-base"
MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
-IMAGE_ROOTFS_SIZE ?= "65536"
+
+# The size in Kbytes for the generated image if it is larger than
+# the required size (du -ks IMAGE_ROOTFS * IMAGE_OVERHEAD_FACTOR),
+# and no effect if less than it.
+IMAGE_ROOTFS_SIZE ??= "65536"
# Forcefully set CACHE now so future changes to things like
# MACHINE don't change the path to the cache
CACHE := "${CACHE}"
+# Default to setting automatically based on cpu count
+BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+
+# Default to setting automatically based on cpu count
+PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+
##################################################################
# Magic Cookie for SANITY CHECK
##################################################################
@@ -764,11 +774,11 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \
- WARN_QA ERROR_QA WORKDIR STAMPCLEAN"
+ WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR"
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED"
-BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends \
+BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
file-checksums python func task export unexport noexec nostamp dirs cleandirs \
sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 4437267ff3..71c65b1462 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -6,7 +6,7 @@ include conf/distro/include/world-broken.inc
TCMODE ?= "default"
require conf/distro/include/tcmode-${TCMODE}.inc
-TCLIBC ?= "eglibc"
+TCLIBC ?= "glibc"
require conf/distro/include/tclibc-${TCLIBC}.inc
# Allow single libc distros to disable this code
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 1bc8e46b8a..04037c3399 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -23,9 +23,9 @@ IMAGE_FEATURES ?= ""
# This is a list of packages that are used by the build system to build the distribution, they are not
# directly part of the distribution.
-HOSTTOOLS_WHITELIST_GPLv3 ?= ""
-WHITELIST_GPLv3 ?= "less"
-LGPLv2_WHITELIST_GPLv3 ?= "libassuan gnutls libtasn1 libidn libgcc libgcc-initial gcc-runtime"
+HOSTTOOLS_WHITELIST_GPL-3.0 ?= ""
+WHITELIST_GPL-3.0 ?= "less"
+LGPLv2_WHITELIST_GPL-3.0 ?= "libassuan gnutls libtasn1 libidn gcc-source libgcc libgcc-initial gcc-runtime"
COMMERCIAL_AUDIO_PLUGINS ?= ""
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index a1167fdfbf..4dc42a7add 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -21,6 +21,7 @@ PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"
VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg"
VIRTUAL-RUNTIME_apm ?= "apm"
VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
+VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
#
# Default recipe providers
@@ -43,5 +44,7 @@ PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','sy
# There are issues with runtime packages and PREFERRED_PROVIDER, see YOCTO #5044 for details
# on this rather strange entry.
PREFERRED_PROVIDER_bluez4 ?= "bluez4"
+PREFERRED_PROVIDER_bluez-hcidump ?= "bluez-hcidump"
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
PREFERRED_PROVIDER_ltp ?= "ltp"
+PREFERRED_PROVIDER_getopt ?= "util-linux-getopt"
diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc
index a9a931d772..6e92aa5499 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -10,5 +10,6 @@ PREFERRED_VERSION_python-native ?= "2.7.3"
# Force the older version of liberation-fonts until we fix the fontforge issue
PREFERRED_VERSION_liberation-fonts ?= "1.04"
-# Intel video stack 2013Q3 and newer need a version >=2.99.902
-PREFERRED_VERSION_xf86-video-intel ?= "2.99.910"
+# Force db-native's version to keep sync with db while
+# 'AGPL-3.0' in ${INCOMPATIBLE_LICENSE} blacklist
+PREFERRED_VERSION_db-native = "${@incompatible_license_contains('AGPL-3.0', '5.%', '6.%', d)}"
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index fa604fd5a4..16a5748680 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -16,18 +16,21 @@ SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}"
# Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assigned
# to CPPFLAGS it gets picked into CFLAGS in bitbake.
#TARGET_CPPFLAGS_pn-curl += "-D_FORTIFY_SOURCE=2"
-SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CLAGS}"
+SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-curl = "-fstack-protector-all -pie -fpie"
SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-directfb = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-eglibc = ""
-SECURITY_CFLAGS_pn-eglibc-initial = ""
+SECURITY_CFLAGS_pn-glibc = ""
+SECURITY_CFLAGS_pn-glibc-initial = ""
SECURITY_CFLAGS_pn-enchant = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-expect = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-flac = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gcc-runtime = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-gcc-sanitizers = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gdb = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gmp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gnutls = "${SECURITY_NO_PIE_CFLAGS}"
@@ -43,6 +46,7 @@ SECURITY_CFLAGS_pn-gst-plugins-gl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gstreamer1.0-plugins-good = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-harfbuzz = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-kexec-tools = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libaio = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libcap = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libgcc = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libid3tag = "${SECURITY_NO_PIE_CFLAGS}"
@@ -51,6 +55,7 @@ SECURITY_CFLAGS_pn-libglu = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libpcap = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libpcre = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libproxy = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-ltp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-lttng-ust = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa-gl = "${SECURITY_NO_PIE_CFLAGS}"
diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
deleted file mode 100644
index 15f5ee5a30..0000000000
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# eglibc specific configuration
-#
-
-LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
-
-# Add glibc overrides to the overrides for eglibc.
-LIBCOVERRIDE = ":libc-glibc"
-OVERRIDES .= "${LIBCOVERRIDE}"
-
-PREFERRED_PROVIDER_virtual/libiconv ?= "eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/libintl ?= "eglibc"
-PREFERRED_PROVIDER_virtual/libc ?= "eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libc ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/libc-locale ?= "eglibc-locale"
-
-CXXFLAGS += "-fvisibility-inlines-hidden"
-
-LIBC_DEPENDENCIES = "libsegfault \
- eglibc \
- eglibc-dbg \
- eglibc-dev \
- eglibc-utils \
- eglibc-thread-db \
- ${@get_libc_locales_dependencies(d)}"
-
-LIBC_LOCALE_DEPENDENCIES = "\
- eglibc-localedata-i18n \
- eglibc-gconv-ibm850 \
- eglibc-gconv-cp1252 \
- eglibc-gconv-iso8859-1 \
- eglibc-gconv-iso8859-15"
-
-def get_libc_locales_dependencies(d):
- if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
- return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
- else:
- return ''
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
new file mode 100644
index 0000000000..649918fd2b
--- /dev/null
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -0,0 +1,40 @@
+#
+# glibc specific configuration
+#
+
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
+
+# Add glibc overrides to the overrides for glibc.
+LIBCOVERRIDE = ":libc-glibc"
+OVERRIDES .= "${LIBCOVERRIDE}"
+
+PREFERRED_PROVIDER_virtual/libiconv ?= "glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/libintl ?= "glibc"
+PREFERRED_PROVIDER_virtual/libc ?= "glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libc ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/libc-locale ?= "glibc-locale"
+
+CXXFLAGS += "-fvisibility-inlines-hidden"
+
+LIBC_DEPENDENCIES = "libsegfault \
+ glibc \
+ glibc-dbg \
+ glibc-dev \
+ glibc-utils \
+ glibc-thread-db \
+ ${@get_libc_locales_dependencies(d)}"
+
+LIBC_LOCALE_DEPENDENCIES = "\
+ glibc-localedata-i18n \
+ glibc-gconv-ibm850 \
+ glibc-gconv-cp1252 \
+ glibc-gconv-iso8859-1 \
+ glibc-gconv-iso8859-15"
+
+def get_libc_locales_dependencies(d):
+ if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
+ return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
+ else:
+ return ''
diff --git a/meta/conf/distro/include/tclibc-musl.inc b/meta/conf/distro/include/tclibc-musl.inc
index d375d8d31d..d1272a39a0 100644
--- a/meta/conf/distro/include/tclibc-musl.inc
+++ b/meta/conf/distro/include/tclibc-musl.inc
@@ -11,8 +11,8 @@ OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libc ?= "musl"
PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
USE_NLS ?= "no"
diff --git a/meta/conf/distro/include/tclibc-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc
index a4d8c3920d..14c3cdbb8a 100644
--- a/meta/conf/distro/include/tclibc-uclibc.inc
+++ b/meta/conf/distro/include/tclibc-uclibc.inc
@@ -11,8 +11,8 @@ OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libc ?= "uclibc"
PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
USE_NLS ?= "no"
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 3488c925a5..7428aa99ff 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -9,7 +9,7 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime"
PREFERRED_PROVIDER_gdb = "gdb"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk = "binutils-crosssdk-${SDK_ARCH}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= "binutils-crosssdk-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = "gcc-crosssdk-initial-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_ARCH}"
@@ -25,9 +25,9 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "4.9%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.24"
-EGLIBCVERSION ?= "2.19"
+GLIBCVERSION ?= "2.20"
UCLIBCVERSION ?= "0.9.33+git%"
-LINUXLIBCVERSION ?= "3.14"
+LINUXLIBCVERSION ?= "3.17.7"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -36,26 +36,31 @@ PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-runtime ?= "${GCCVERSION}"
+PREFERRED_VERSION_gcc-sanitizers ?= "${GCCVERSION}"
+PREFERRED_VERSION_gcc-source ?= "${GCCVERSION}"
PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}"
+PREFERRED_VERSION_nativesdk-gcc-sanitizers ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_libgcc ?= "${GCCVERSION}"
PREFERRED_VERSION_libgcc-initial ?= "${GCCVERSION}"
PREFERRED_VERSION_nativesdk-libgcc ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_nativesdk-libgcc-initial ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_binutils ?= "${BINUVERSION}"
+PREFERRED_VERSION_binutils-native ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-cross-${TARGET_ARCH} ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-crosssdk-${SDK_ARCH} ?= "${BINUVERSION}"
PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${BINUVERSION}"
PREFERRED_VERSION_linux-libc-headers ?= "${LINUXLIBCVERSION}"
PREFERRED_VERSION_nativesdk-linux-libc-headers ?= "${LINUXLIBCVERSION}"
-PREFERRED_VERSION_eglibc ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_eglibc-locale ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_nativesdk-eglibc ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_eglibc-initial ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_nativesdk-eglibc-initial ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_cross-localedef-native ?= "${EGLIBCVERSION}"
+PREFERRED_VERSION_glibc ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_glibc-locale ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_glibc-mtrace ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_glibc-scripts ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_nativesdk-glibc ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_nativesdk-glibc-initial ?= "${GLIBCVERSION}"
+PREFERRED_VERSION_cross-localedef-native ?= "${GLIBCVERSION}"
PREFERRED_VERSION_uclibc ?= "${UCLIBCVERSION}"
PREFERRED_VERSION_uclibc-initial ?= "${UCLIBCVERSION}"
-PREFERRED_VERSION_elfutils ?= "0.148"
# don't use version earlier than 1.4 for gzip-native, as it's necessary for
# some packages using an archive format incompatible with earlier gzip
PREFERRED_VERSION_gzip-native ?= "1.6"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 7fa3f318b9..3a918e8bbf 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -18,6 +18,7 @@ do_compile_ptest_base[doc] = "Compiles the runtime test suite included in the so
do_configure[doc] = "Configures the source by enabling and disabling any build-time and configuration options for the software being built"
do_configure_ptest_base[doc] = "Configures the runtime test suite included in the software being built"
do_deploy[doc] = "Writes deployable output files to the deploy directory"
+do_devpyshell[doc] = "Starts an interactive Python shell for development/debugging"
do_devshell[doc] = "Starts a shell with the environment set up for development/debugging"
do_diffconfig[doc] = "Compares the old and new config files after running do_menuconfig for the kernel"
do_fetch[doc] = "Fetches the source code"
@@ -33,7 +34,7 @@ do_listtasks[doc] = "Lists all defined tasks for a target"
do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
do_package[doc] = "Analyzes the content of the holding area and splits it into subsets based on available packages and files"
do_package_index[doc] = "Creates or updates the index in the Package Feed area"
-do_package_write[doc] = "Creates the actual packages and places them in the Package Feed area"
+do_package_qa[doc] = "Runs QA checks on packaged files"
do_package_write_deb[doc] = "Creates the actual DEB packages and places them in the Package Feed area"
do_package_write_ipk[doc] = "Creates the actual IPK packages and places them in the Package Feed area"
do_package_write_rpm[doc] = "Creates the actual RPM packages and places them in the Package Feed area"
@@ -52,6 +53,7 @@ do_spdx[doc] = "A build stage that takes the source code and scans it on a remot
do_strip[doc] = "Strips unneeded sections out of the Linux kernel image"
do_testimage[doc] = "Boots an image and performs runtime tests within the image"
do_testimage_auto[doc] = "Boots an image and performs runtime tests within the image immediately after it has been built"
+do_testsdk[doc] = "Installs an SDK and performs runtime tests on the tools installed by it"
do_uboot_mkimage[doc] = "Creates a uImage file from the kernel for the U-Boot bootloader"
do_unpack[doc] = "Unpacks the source code into a working directory"
do_validate_branches[doc] = "Ensures that the source/meta branches are on the locations specified by their SRCREV values for a linux-yocto style kernel"
@@ -75,7 +77,7 @@ AUTOREV[doc] = "When SRCREV is set to the value of this variable, it specifies t
#B
B[doc] = "The Build Directory. The OpenEmbedded build system places generated objects into the Build Directory during a recipe's build process."
-BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK packaging backend."
+BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK or RPM packaging backends."
BB_DANGLINGAPPENDS_WARNONLY[doc] = "Defines how BitBake handles situations where an append file (.bbappend) has no corresponding recipe file (.bb)."
BB_DISKMON_DIRS[doc] = "Monitors disk space and available inodes during the build and allows you to control the build based on these parameters."
BB_DISKMON_WARNINTERVAL[doc] = "Defines the disk space and free inode warning intervals. To set these intervals, define the variable in the conf/local.conf file in the Build Directory."
@@ -108,6 +110,7 @@ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, specifies whether to split th
CACHE[doc] = "The directory holding the cache of the metadata."
CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as TARGET_CFLAGS."
CLASSOVERRIDE[doc] = "An internal variable specifying the special class override that should currently apply (e.g. "class-target", "class-native", and so forth)."
+CLEANBROKEN[doc] = "Specifies if 'make clean' does not work for a recipe (and therefore the build system should not try to use it during do_configure)"
COMBINED_FEATURES[doc] = "A set of features common between MACHINE_FEATURES and DISTRO_FEATURES."
COMMON_LICENSE_DIR[doc] = "Points to meta/files/common-licenses in the Source Directory, which is where generic license files reside."
COMPATIBLE_HOST[doc] = "A regular expression that resolves to one or more hosts (when the recipe is native) or one or more targets (when the recipe is non-native) with which a recipe is compatible."
@@ -148,7 +151,7 @@ DL_DIR[doc] = "The central download directory used by the build process to store
#E
-ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for eglibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
+ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for glibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
ERROR_QA[doc] = "Specifies the quality assurance checks whose failures are reported as errors by the OpenEmbedded build system."
EXCLUDE_FROM_WORLD[doc] = "Directs BitBake to exclude a recipe from world builds (i.e. bitbake world)."
EXTENDPE[doc] = "Used with file and pathnames to create a prefix for a recipe's version based on the recipe's PE value. If PE is set and greater than zero for a recipe, EXTENDPE becomes that value."
@@ -205,6 +208,7 @@ ICECC_USER_CLASS_BL[doc] = "Identifies user classes that you do not want the Ice
ICECC_USER_PACKAGE_BL[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider."
ICECC_USER_PACKAGE_WL[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support."
IMAGE_BASENAME[doc] = "The base name of image output files."
+IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)."
IMAGE_CLASSES[doc] = "A list of classes that all images should inherit."
IMAGE_FEATURES[doc] = "The primary list of features to include in an image. Configure this variable in an image recipe."
IMAGE_FSTYPES[doc] = "Formats of root filesystem images that you want to have created."
@@ -219,13 +223,13 @@ IMAGE_ROOTFS_EXTRA_SPACE[doc] = "Defines additional free disk space created in t
IMAGE_ROOTFS_SIZE[doc] = "Defines the size in Kbytes for the generated image."
IMAGE_TYPES[doc] = "Specifies the complete list of supported image types by default."
INC_PR[doc] = "Helps define the recipe revision for recipes that share a common include file."
-INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build."
+INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build. Wildcard is supported, such as '*GPLv3'"
INHIBIT_DEFAULT_DEPS[doc] = "Prevents the default dependencies, namely the C compiler and standard C library (libc), from being added to DEPENDS."
INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binaries in resulting packages."
INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk (initramfs), which is used during boot."
-INITRD[doc] = "Indicates a filesystem image to use as an initial RAM disk (initrd)."
+INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
INITSCRIPT_NAME[doc] = "The filename of the initialization script as installed to ${sysconfdir}/init.d."
INITSCRIPT_PACKAGES[doc] = "A list of the packages that contain initscripts. This variable is used in recipes when using update-rc.d.bbclass. The variable is optional and defaults to the PN variable."
INITSCRIPT_PARAMS[doc] = "Specifies the options to pass to update-rc.d. The variable is mandatory and is used in recipes when using update-rc.d.bbclass."
@@ -240,6 +244,8 @@ KBRANCH_DEFAULT[doc] = "Defines the Linux kernel source repository's default bra
KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel."
KERNEL_FEATURES[doc] = "Includes additional metadata from the Yocto Project kernel Git repository. The metadata you add through this variable includes config fragments and features descriptions."
KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'."
+KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
+KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules"
KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
@@ -407,11 +413,16 @@ TARGET_FPU[doc] = "Specifies the method for handling FPU code. For FPU-less targ
TARGET_OS[doc] = "Specifies the target's operating system."
TARGET_PREFIX[doc] = "The prefix for the cross-compile toolchain (e.g. arm-linux-)."
TARGET_SYS[doc] = "The target system is comprised of TARGET_ARCH,TARGET_VENDOR and TARGET_OS."
-TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'eglibc' or 'uclibc'."
+TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'glibc' or 'uclibc'."
TCMODE[doc] = "Enables an external toolchain (where provided by an additional layer) if set to a value other than 'default'."
TEST_IMAGE[doc] = "Enables test booting of virtual machine images under the QEMU emulator after any root filesystems are created and runs tests against those images."
TEST_QEMUBOOT_TIMEOUT[doc] = "The time in seconds allowed for an image to boot before automated runtime tests begin to run against an image."
TEST_SUITES[doc] = "An ordered list of tests (modules) to run against an image when performing automated runtime testing."
+TEST_POWERCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to control the power of the target machine under test"
+TEST_POWERCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_POWERCONTROL_CMD"
+TEST_SERIALCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to connect to the serial console of the target machine under test"
+TEST_SERIALCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_SERIALCONTROL_CMD"
+TEST_TARGET[doc] = "For automated runtime testing, specifies the method of deploying the image and running tests on the target machine"
THISDIR[doc] = "The directory in which the file BitBake is currently parsing is located."
TIME[doc] = "The time the build was started using HMS format."
TMPDIR[doc] = "The temporary directory the OpenEmbedded build system uses when it does its work building images. By default, the TMPDIR variable is named tmp within the Build Directory."
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 75ca2325d1..de96548bd2 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -14,6 +14,7 @@ LAYERVERSION_core = "4"
# Set a variable to get to the top of the metadata location
COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
+# opkg-utils is for update-altnernatives :(
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
sysvinit-inittab \
shadow-securetty \
@@ -30,10 +31,15 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += " \
udev-extraconf \
packagegroup-x11-xserver \
systemd-serialgetty \
+ initscripts \
+ shadow \
+ shadow-sysroot \
+ base-passwd \
+ opkg-utils \
"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
- gcc-cross-${TARGET_ARCH}->eglibc \
+ gcc-cross-${TARGET_ARCH}->glibc \
gcc-cross-${TARGET_ARCH}->musl \
gcc-cross-${TARGET_ARCH}->uclibc \
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index c378a415d3..629916b6a5 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -36,7 +36,7 @@ SRC_DISTRIBUTE_LICENSES += "OSL-3.0 PD PHP-3.0 PostgreSQL Proprietary"
SRC_DISTRIBUTE_LICENSES += "Python-2.0 QPL-1.0 RHeCos-1 RHeCos-1.1 RPL-1.5"
SRC_DISTRIBUTE_LICENSES += "RPSL-1.0 RSCPL Ruby SAX-PD SGI-1 Simple-2.0 Sleepycat"
SRC_DISTRIBUTE_LICENSES += "SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C"
-SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.1 Xnet YPL-1.1"
+SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.1 Xnet XSL YPL-1.1"
SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
# Standards are great! Everyone has their own. In an effort to standardize licensing
@@ -49,7 +49,6 @@ SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
#
# We should NEVER have a GPL/LGPL without a version!!!!
# Any mapping to MPL/LGPL/GPL should be fixed
-# see: https://wiki.yoctoproject.org/wiki/License_Audit
# AGPL variations
SPDXLICENSEMAP[AGPL-3] = "AGPL-3.0"
@@ -144,7 +143,7 @@ DATA_LICENSE = "CC0-1.0"
# information.
#
-FOSS_COPYRIGHT = "true"
+FOSS_NO_COPYRIGHT = "true"
# A option defined as[FOSS_RECURSIVE_UNPACK] in ./meta/conf/licenses.conf. is
# used to control if FOSSology server need recursively unpack tar.gz file which
@@ -160,12 +159,30 @@ FOSS_COPYRIGHT = "true"
FOSS_RECURSIVE_UNPACK = "false"
-# FOSSologySPDX instance server.
+# An option defined as [FOSS_FULL_SPDX] in ./meta/conf/licenses.conf is used to
+# control what kind of SPDX output to get from the FOSSology server.
+#
+# FOSS_FULL_SPDX = "true":
+# Tell FOSSology server to return full SPDX output, like if the program was
+# run from the command line. This is needed in order to get license refs for
+# the full package rather than individual files only.
+#
+# FOSS_FULL_SPDX = "false":
+# Tell FOSSology to only process license information for files. All package
+# license tags in the report will be "NOASSERTION"
+#
+
+FOSS_FULL_SPDX = "true"
+
+# FOSSologySPDX instance server. http://localhost/repo is the default
+# installation location for FOSSology.
+#
# For more information on FOSSologySPDX commandline:
# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology-SPDX-Web-API
#
-FOSS_SERVER = "http://localhost//?mod=spdx_license_once&noCopyright=${FOSS_COPYRIGHT}&recursiveUnpack=${FOSS_RECURSIVE_UNPACK}"
+FOSS_BASE_URL = "http://localhost/repo/?mod=spdx_license_once"
+FOSS_SERVER = "${FOSS_BASE_URL}&fullSPDXFlag=${FOSS_FULL_SPDX}&noCopyright=${FOSS_NO_COPYRIGHT}&recursiveUnpack=${FOSS_RECURSIVE_UNPACK}"
FOSS_WGET_FLAGS = "-qO - --no-check-certificate --timeout=0"
diff --git a/meta/conf/machine/include/arm/arch-arm64.inc b/meta/conf/machine/include/arm/arch-arm64.inc
new file mode 100644
index 0000000000..5376b87dd6
--- /dev/null
+++ b/meta/conf/machine/include/arm/arch-arm64.inc
@@ -0,0 +1,36 @@
+DEFAULTTUNE ?= "aarch64"
+
+require conf/machine/include/arm/arch-armv7a.inc
+
+TUNEVALID[aarch64] = "Enable instructions for aarch64"
+
+MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}"
+
+# Little Endian base configs
+AVAILTUNES += "aarch64 aarch64_be"
+ARMPKGARCH_tune-aarch64 ?= "aarch64"
+ARMPKGARCH_tune-aarch64_be ?= "aarch64_be"
+TUNE_FEATURES_tune-aarch64 ?= "aarch64"
+TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian"
+BASE_LIB_tune-aarch64 = "lib64"
+BASE_LIB_tune-aarch64_be = "lib64"
+
+PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
+PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
+
+ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}"
+TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
+TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
+ABIEXTENSION_64 = ""
+TARGET_FPU_64 = ""
+
+# Duplicated from arch-arm.inc
+TUNE_ARCH_32 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}"
+TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
+ABIEXTENSION_32 = "eabi"
+TARGET_FPU_32 = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}"
+
+TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_ARCH_64}", "${TUNE_ARCH_32}" ,d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_PKGARCH_64}", "${TUNE_PKGARCH_32}" ,d)}"
+ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}"
+TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"
diff --git a/meta/conf/machine/include/arm/arch-armv8.inc b/meta/conf/machine/include/arm/arch-armv8.inc
new file mode 100644
index 0000000000..5e832fae6d
--- /dev/null
+++ b/meta/conf/machine/include/arm/arch-armv8.inc
@@ -0,0 +1 @@
+require conf/machine/include/arm/arch-arm64.inc
diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index a94386f577..0db5ec136a 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -18,6 +18,8 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d
# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}"
python () {
+ if bb.utils.contains('TUNE_FEATURES', 'thumb', 'False', 'True', d):
+ return
selected = d.getVar('ARM_INSTRUCTION_SET', True)
if selected == None:
return
@@ -37,8 +39,10 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_
# arm system and vice versa. It is strongly recommended that DISTROs not
# turn this off - the actual cost is very small.
TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
-OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
+THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
+THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}"
+OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${THUMB_OVERRIDES}', '', d)}"
# what about armv7m devices which don't support -marm (e.g. Cortex-M3)?
-TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
+TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index 02626d300e..c41fa5e864 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -100,3 +100,7 @@ TUNE_FEATURES_tune-mips64el-nf = "n64"
BASE_LIB_tune-mips64el-nf = "lib64"
MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
+
+# On mips we need to redefine this to include the ABIEXTENSION
+# we can avoid the python bit as there are no _ or - to translate
+TRANSLATED_TARGET_ARCH = "${TARGET_ARCH}${ABIEXTENSION}"
diff --git a/meta/conf/machine/include/tune-mips32r2.inc b/meta/conf/machine/include/tune-mips32r2.inc
index fb60592a8b..c9deff84e2 100644
--- a/meta/conf/machine/include/tune-mips32r2.inc
+++ b/meta/conf/machine/include/tune-mips32r2.inc
@@ -1,6 +1,6 @@
DEFAULTTUNE ?= "mips32r2"
-require conf/machine/include/mips/arch-mips.inc
+require conf/machine/include/tune-mips32.inc
TUNEVALID[mips32r2] = "Enable mips32r2 specific processor optimizations"
TUNECONFLICTS[mips32r2] = "n64 n32"
diff --git a/meta/conf/machine/include/tune-mips64.inc b/meta/conf/machine/include/tune-mips64.inc
index ba79e2b53f..9be0e0f8d9 100644
--- a/meta/conf/machine/include/tune-mips64.inc
+++ b/meta/conf/machine/include/tune-mips64.inc
@@ -1,3 +1,3 @@
DEFAULTTUNE ?= "mips64"
-require conf/machine/include/mips/arch-mips.inc
+require conf/machine/include/tune-mips32r2.inc
diff --git a/meta/conf/machine/include/tune-power5.inc b/meta/conf/machine/include/tune-power5.inc
new file mode 100644
index 0000000000..30be86941a
--- /dev/null
+++ b/meta/conf/machine/include/tune-power5.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppc64p5"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[power5] = "Enable IBM Power5 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power5", " -mcpu=power5", "", d)}"
+
+AVAILTUNES += "ppcp5 ppc64p5"
+TUNE_FEATURES_tune-ppcp5 = "m32 fpu-hard power5 altivec"
+BASE_LIB_tune-ppcp5 = "lib"
+TUNE_PKGARCH_tune-ppcp5 = "ppcp5"
+PACKAGE_EXTRA_ARCHS_tune-ppcp5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp5"
+
+TUNE_FEATURES_tune-ppc64p5 = "m64 fpu-hard power5 altivec"
+BASE_LIB_tune-ppc64p5 = "lib64"
+TUNE_PKGARCH_tune-ppc64p5 = "ppc64p5"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p5"
+
+# glibc configure options to get power5 specific library
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power5", "--with-cpu=power5", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power5", "--with-cpu=power5", "", d)}"
diff --git a/meta/conf/machine/include/tune-power6.inc b/meta/conf/machine/include/tune-power6.inc
new file mode 100644
index 0000000000..7563798120
--- /dev/null
+++ b/meta/conf/machine/include/tune-power6.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppcpr6"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[power6] = "Enable IBM Power6 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power6", " -mcpu=power6", "", d)}"
+
+AVAILTUNES += "ppcp6 ppc64p6"
+TUNE_FEATURES_tune-ppcp6 = "m32 fpu-hard power6 altivec"
+BASE_LIB_tune-ppcp6 = "lib"
+TUNE_PKGARCH_tune-ppcp6 = "ppcp6"
+PACKAGE_EXTRA_ARCHS_tune-ppcp6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp6"
+
+TUNE_FEATURES_tune-ppc64p6 = "m64 fpu-hard power6 altivec"
+BASE_LIB_tune-ppc64p6 = "lib64"
+TUNE_PKGARCH_tune-ppc64p6 = "ppc64p6"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p6"
+
+# glibc configure options to get power6 specific library
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power6", "--with-cpu=power6", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power6", "--with-cpu=power6", "", d)}"
diff --git a/meta/conf/machine/include/tune-power7.inc b/meta/conf/machine/include/tune-power7.inc
new file mode 100644
index 0000000000..7069e75026
--- /dev/null
+++ b/meta/conf/machine/include/tune-power7.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppcpr7"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[power7] = "Enable IBM Power7 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power7", " -mcpu=power7", "", d)}"
+
+AVAILTUNES += "ppcp7 ppc64p7"
+TUNE_FEATURES_tune-ppcp7 = "m32 fpu-hard power7 altivec"
+BASE_LIB_tune-ppcp7 = "lib"
+TUNE_PKGARCH_tune-ppcp7 = "ppcp7"
+PACKAGE_EXTRA_ARCHS_tune-ppcp7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp7"
+
+TUNE_FEATURES_tune-ppc64p7 = "m64 fpu-hard power7 altivec"
+BASE_LIB_tune-ppc64p7 = "lib64"
+TUNE_PKGARCH_tune-ppc64p7 = "ppc64p7"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p7"
+
+# glibc configure options to get power7 specific library
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power7", "--with-cpu=power7", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power7", "--with-cpu=power7", "", d)}"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
new file mode 100644
index 0000000000..20bcfbac99
--- /dev/null
+++ b/meta/conf/machine/qemuarm64.conf
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: generic armv8 machine
+#@DESCRIPTION: Machine configuration for running a generic armv8
+
+require conf/machine/include/arm/arch-armv8.inc
+require conf/machine/include/qemu.inc
+
+MACHINE_FEATURES = ""
+
+KERNEL_IMAGETYPE = "Image"
+
+SERIAL_CONSOLE = "38400 ttyAMA0"
diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index ce1c419d1e..d9d2421616 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -3,7 +3,7 @@
#@DESCRIPTION: mti_malta32_be
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips32.inc
+require conf/machine/include/tune-mips32r2.inc
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index 642a2d9b52..837f9f4ab0 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -20,6 +20,8 @@ XSERVER = "xserver-xorg \
xf86-input-vmmouse \
xf86-input-keyboard \
xf86-input-evdev \
+ xf86-video-cirrus \
+ xf86-video-fbdev \
xf86-video-vmware"
MACHINE_FEATURES += "x86"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index ebc27dba47..3562276932 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -19,6 +19,8 @@ XSERVER = "xserver-xorg \
xf86-input-vmmouse \
xf86-input-keyboard \
xf86-input-evdev \
+ xf86-video-cirrus \
+ xf86-video-fbdev \
xf86-video-vmware"
MACHINE_FEATURES += "x86"
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 733236d6bb..37e8481112 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -14,6 +14,6 @@ INHERIT += "multilib_global"
BBCLASSEXTEND_append = " ${MULTILIBS}"
-MULTILIB_GLOBAL_VARIANTS = "lib32 lib64 libx32"
+MULTILIB_GLOBAL_VARIANTS ?= "lib32 lib64 libx32"
OPKG_ARGS_append = " --force-maintainer --force-overwrite"
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index e518b84146..1d55fa71d9 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -3,7 +3,7 @@
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "1.23.1"
+BB_MIN_VERSION = "1.25.0"
SANITY_ABIFILE = "${TMPDIR}/abi_version"
diff --git a/meta/conf/toasterconf.json b/meta/conf/toasterconf.json
new file mode 100644
index 0000000000..fe1564ec26
--- /dev/null
+++ b/meta/conf/toasterconf.json
@@ -0,0 +1,84 @@
+{
+ "config": {"MACHINE": "qemux86", "DISTRO": "poky"},
+ "layersources": [
+ {
+ "name": "Local OpenEmbedded",
+ "sourcetype": "local",
+ "apiurl": "../../",
+ "branches": ["HEAD", "master", "dizzy"],
+ "layers": [
+ {
+ "name": "openembedded-core",
+ "local_path": "meta",
+ "vcs_url": "remote:origin",
+ "dirpath": "meta"
+ }
+ ]
+ },
+ {
+ "name": "OpenEmbedded",
+ "sourcetype": "layerindex",
+ "apiurl": "http://layers.openembedded.org/layerindex/api/",
+ "branches": ["master", "dizzy"]
+ },
+ {
+ "name": "Imported layers",
+ "sourcetype": "imported",
+ "apiurl": "",
+ "branches": ["master", "dizzy", "HEAD"]
+
+ }
+ ],
+ "bitbake" : [
+ {
+ "name": "master",
+ "giturl": "git://git.openembedded.org/bitbake",
+ "branch": "master",
+ "dirpath": ""
+ },
+ {
+ "name": "dizzy",
+ "giturl": "git://git.openembedded.org/bitbake",
+ "branch": "1.24",
+ "dirpath": ""
+ },
+ {
+ "name": "HEAD",
+ "giturl": "git://git.openembedded.org/bitbake",
+ "branch": "HEAD",
+ "dirpath": ""
+ }
+ ],
+
+ "defaultrelease": "master",
+
+ "releases": [
+ {
+ "name": "master",
+ "description": "OpenEmbedded master",
+ "bitbake": "master",
+ "branch": "master",
+ "defaultlayers": [ "openembedded-core" ],
+ "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds using the OpenEmbedded master branch, where active development takes place. This is not a stable branch, so your builds might not work as expected."
+ },
+ {
+ "name": "dizzy",
+ "description": "OpenEmbedded Dizzy",
+ "bitbake": "dizzy",
+ "branch": "dizzy",
+ "defaultlayers": [ "openembedded-core" ],
+ "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds with the OpenEmbedded Dizzy release"
+ },
+ {
+ "name": "local",
+ "description": "Local OpenEmbedded",
+ "bitbake": "HEAD",
+ "branch": "HEAD",
+ "defaultlayers": [ "openembedded-core" ],
+ "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds with the version of OpenEmbedded that you have cloned or downloaded to your computer."
+ }
+ ]
+}
diff --git a/meta/files/common-licenses/SMAIL_GPL b/meta/files/common-licenses/SMAIL_GPL
new file mode 100644
index 0000000000..dfc3fd16cf
--- /dev/null
+++ b/meta/files/common-licenses/SMAIL_GPL
@@ -0,0 +1,164 @@
+This is the Debian GNU/Linux package debianutils.
+
+It is an original Debian package. Programs in it were maintained by
+Guy Maor <maor@debian.org>, and are now maintained by Clint Adams
+<schizo@debian.org>.
+
+All its programs except readlink, savelog, and which may be
+redistributed under the terms of the GNU GPL, Version 2 or later,
+found on Debian systems in the file /usr/share/common-licenses/GPL.
+
+which is in the public domain.
+
+readlink is Copyright (c) 1997 Kenneth Stailey, and may also be
+distributed under the terms of the BSD copyright.
+
+savelog may be redistributed under the following terms: (The rest of
+this file consists of savelog's distribution terms.)
+
+#ident "@(#)smail:RELEASE-3_2:COPYING,v 1.2 1996/06/14 18:59:10 woods Exp"
+
+ SMAIL GENERAL PUBLIC LICENSE
+ (Clarified 11 Feb 1988)
+
+ Copyright (C) 1988 Landon Curt Noll & Ronald S. Karr
+ Copyright (C) 1992 Ronald S. Karr
+ Copyleft (GNU) 1988 Landon Curt Noll & Ronald S. Karr
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed. You can also
+ use this wording to make the terms for other programs.
+
+ The license agreements of most software companies keep you at the
+mercy of those companies. By contrast, our general public license is
+intended to give everyone the right to share SMAIL. To make sure that
+you get the rights we want you to have, we need to make restrictions
+that forbid anyone to deny you these rights or to ask you to surrender
+the rights. Hence this license agreement.
+
+ Specifically, we want to make sure that you have the right to give
+away copies of SMAIL, that you receive source code or else can get it
+if you want it, that you can change SMAIL or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To make sure that everyone has such rights, we have to forbid you to
+deprive anyone else of these rights. For example, if you distribute
+copies of SMAIL, you must give the recipients all the rights that you
+have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+ Also, for our own protection, we must make certain that everyone
+finds out that there is no warranty for SMAIL. If SMAIL is modified by
+someone else and passed on, we want its recipients to know that what
+they have is not what we distributed, so that any problems introduced
+by others will not reflect on our reputation.
+
+ Therefore we (Landon Curt Noll and Ronald S. Karr) make the following
+terms which say what you must do to be allowed to distribute or change
+SMAIL.
+
+
+ COPYING POLICIES
+
+ 1. You may copy and distribute verbatim copies of SMAIL source code
+as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy a valid copyright notice "Copyright
+(C) 1988 Landon Curt Noll & Ronald S. Karr" (or with whatever year is
+appropriate); keep intact the notices on all files that refer to this
+License Agreement and to the absence of any warranty; and give any
+other recipients of the SMAIL program a copy of this License
+Agreement along with the program. You may charge a distribution fee
+for the physical act of transferring a copy.
+
+ 2. You may modify your copy or copies of SMAIL or any portion of it,
+and copy and distribute such modifications under the terms of
+Paragraph 1 above, provided that you also do the following:
+
+ a) cause the modified files to carry prominent notices stating
+ that you changed the files and the date of any change; and
+
+ b) cause the whole of any work that you distribute or publish,
+ that in whole or in part contains or is a derivative of SMAIL or
+ any part thereof, to be licensed at no charge to all third
+ parties on terms identical to those contained in this License
+ Agreement (except that you may choose to grant more extensive
+ warranty protection to some or all third parties, at your option).
+
+ c) You may charge a distribution fee for the physical act of
+ transferring a copy, and you may at your option offer warranty
+ protection in exchange for a fee.
+
+Mere aggregation of another unrelated program with this program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other program under the scope of these terms.
+
+ 3. You may copy and distribute SMAIL (or a portion or derivative of it,
+under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+ a) accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ b) accompany it with a written offer, valid for at least three
+ years, to give any third party free (except for a nominal
+ shipping charge) a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ c) accompany it with the information you received as to where the
+ corresponding source code may be obtained. (This alternative is
+ allowed only for non-commercial distribution and only if you
+ received the program in object code or executable form alone.)
+
+For an executable file, complete source code means all the source code for
+all modules it contains; but, as a special exception, it need not include
+source code for modules which are standard libraries that accompany the
+operating system on which the executable file runs.
+
+ 4. You may not copy, sublicense, distribute or transfer SMAIL
+except as expressly provided under this License Agreement. Any attempt
+otherwise to copy, sublicense, distribute or transfer SMAIL is void and
+your rights to use the program under this License agreement shall be
+automatically terminated. However, parties who have received computer
+software programs from you with this License Agreement will not have
+their licenses terminated so long as such parties remain in full compliance.
+
+ 5. If you wish to incorporate parts of SMAIL into other free
+programs whose distribution conditions are different, write to Landon
+Curt Noll & Ronald S. Karr via the Free Software Foundation at 51
+Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. We have not yet
+worked out a simple rule that can be stated here, but we will often
+permit this. We will be guided by the two goals of preserving the
+free status of all derivatives of our free software and of promoting
+the sharing and reuse of software.
+
+Your comments and suggestions about our licensing policies and our
+software are welcome! This contract was based on the contract made by
+the Free Software Foundation. Please contact the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA, or call (617) 542-5942 for details on copylefted material in
+general.
+
+ NO WARRANTY
+
+ BECAUSE SMAIL IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO
+WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING, LANDON CURT NOLL & RONALD S. KARR AND/OR
+OTHER PARTIES PROVIDE SMAIL "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF SMAIL IS WITH
+YOU. SHOULD SMAIL PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL LANDON CURT NOLL &
+RONALD S. KARR AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
+SMAIL AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) SMAIL, EVEN IF YOU HAVE
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY
+ANY OTHER PARTY.
diff --git a/meta/files/common-licenses/XSL b/meta/files/common-licenses/XSL
new file mode 100644
index 0000000000..0a82d60c1c
--- /dev/null
+++ b/meta/files/common-licenses/XSL
@@ -0,0 +1,48 @@
+Copyright
+---------
+Copyright (C) 1999-2007 Norman Walsh
+Copyright (C) 2003 Jiří Kosek
+Copyright (C) 2004-2007 Steve Ball
+Copyright (C) 2005-2008 The DocBook Project
+Copyright (C) 2011-2012 O'Reilly Media
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the ``Software''), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+Warranty
+--------
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+The DocBook XSL stylesheets are maintained by Norman Walsh,
+<ndw@nwalsh.com>, and members of the DocBook Project,
+<docbook-developers@sf.net>
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index c829bece2b..109cbe553c 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -50,18 +50,18 @@ ${localstatedir}/log link volatile/log
${localstatedir}/lock link /run/lock
${localstatedir}/tmp link volatile/tmp
+/home 0755 root root false - - -
+/srv 0755 root root false - - -
+${prefix}/src 0755 root root false - - -
+${localstatedir}/local 0755 root root false - - -
+
# Special permissions from base-files
# Set 1777
/tmp 01777 root root false - - -
${localstatedir}/volatile/tmp 01777 root root false - - -
-# Set 2775
-/home 02755 root root false - - -
-${prefix}/src 02755 root root false - - -
-${localstatedir}/local 02755 root root false - - -
-
-# Set 3755
+# Set 755-lsb
/srv 0755 root root false - - -
-# Set 4775
-/var/mail 02755 root root false - - -
+# Set 2775-lsb
+/var/mail 02775 root mail false - - -
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh
new file mode 100644
index 0000000000..0d679a66db
--- /dev/null
+++ b/meta/files/toolchain-shar-template.sh
@@ -0,0 +1,190 @@
+#!/bin/bash
+
+INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
+SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
+
+if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
+ # Allow for installation of ix86 SDK on x86_64 host
+ if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
+ echo "Error: Installation machine not supported!"
+ exit 1
+ fi
+fi
+
+DEFAULT_INSTALL_DIR="@SDKPATH@"
+SUDO_EXEC=""
+target_sdk_dir=""
+answer=""
+relocate=1
+savescripts=0
+verbose=0
+while getopts ":yd:DRS" OPT; do
+ case $OPT in
+ y)
+ answer="Y"
+ [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+ ;;
+ d)
+ target_sdk_dir=$OPTARG
+ ;;
+ D)
+ verbose=1
+ ;;
+ R)
+ relocate=0
+ savescripts=1
+ ;;
+ S)
+ savescripts=1
+ ;;
+ *)
+ echo "Usage: $(basename $0) [-y] [-d <dir>]"
+ echo " -y Automatic yes to all prompts"
+ echo " -d <dir> Install the SDK to <dir>"
+ echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
+ echo " -S Save relocation scripts"
+ echo " -R Do not relocate executables"
+ echo " -D use set -x to see what is going on"
+ exit 1
+ ;;
+ esac
+done
+
+if [ $verbose = 1 ] ; then
+ set -x
+fi
+
+if [ "$target_sdk_dir" = "" ]; then
+ read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
+ [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+fi
+
+eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
+if [ -d "$target_sdk_dir" ]; then
+ target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
+else
+ target_sdk_dir=$(readlink -m "$target_sdk_dir")
+fi
+
+if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
+ echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
+ exit 1
+fi
+
+if [ -e "$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@" ]; then
+ echo "The directory \"$target_sdk_dir\" already contains a SDK for this architecture."
+ printf "If you continue, existing files will be overwritten! Proceed[y/N]?"
+
+ default_answer="n"
+else
+ printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
+
+ default_answer="y"
+fi
+
+if [ "$answer" = "" ]; then
+ read answer
+ [ "$answer" = "" ] && answer="$default_answer"
+else
+ echo $answer
+fi
+
+if [ "$answer" != "Y" -a "$answer" != "y" ]; then
+ echo "Installation aborted!"
+ exit 1
+fi
+
+# Try to create the directory (this will not succeed if user doesn't have rights)
+mkdir -p $target_sdk_dir >/dev/null 2>&1
+
+# if don't have the right to access dir, gain by sudo
+if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
+ SUDO_EXEC=$(which "sudo")
+ if [ -z $SUDO_EXEC ]; then
+ echo "No command 'sudo' found, please install sudo first. Abort!"
+ exit 1
+ fi
+
+ # test sudo could gain root right
+ $SUDO_EXEC pwd >/dev/null 2>&1
+ [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
+
+ # now that we have sudo rights, create the directory
+ $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
+fi
+
+payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
+
+printf "Extracting SDK..."
+tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir
+echo "done"
+
+printf "Setting it up..."
+# fix environment paths
+for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
+ $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
+done
+
+# fix dynamic loader paths in all ELF SDK binaries
+native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
+dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
+if [ "$dl_path" = "" ] ; then
+ echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
+ exit 1
+fi
+executable_files=$($SUDO_EXEC find $native_sysroot -type f \
+ \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
+
+tdir=`mktemp -d`
+if [ x$tdir = x ] ; then
+ echo "SDK relocate failed, could not create a temporary directory"
+ exit 1
+fi
+echo "#!/bin/bash" > $tdir/relocate_sdk.sh
+echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
+$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
+$SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
+rm -rf $tdir
+if [ $relocate = 1 ] ; then
+ $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.sh
+ if [ $? -ne 0 ]; then
+ echo "SDK could not be set up. Relocate script failed. Abort!"
+ exit 1
+ fi
+fi
+
+# replace @SDKPATH@ with the new prefix in all text files: configs/scripts/etc
+for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
+ $SUDO_EXEC find $replace -type f -exec file '{}' \; | \
+ grep ":.*\(ASCII\|script\|source\).*text" | \
+ awk -F':' '{printf "\"%s\"\n", $1}' | \
+ $SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
+done
+
+# change all symlinks pointing to @SDKPATH@
+for l in $($SUDO_EXEC find $native_sysroot -type l); do
+ $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
+done
+
+# find out all perl scripts in $native_sysroot and modify them replacing the
+# host perl with SDK perl.
+for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep -l "^#!.*perl" '{}' \;); do
+ $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
+ "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
+done
+
+echo done
+
+@SDK_POST_INSTALL_COMMAND@
+
+# delete the relocating script, so that user is forced to re-run the installer
+# if he/she wants another location for the sdk
+if [ $savescripts = 0 ] ; then
+ $SUDO_EXEC rm ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
+fi
+
+echo "SDK has been successfully set up and is ready to be used."
+
+exit 0
+
+MARKER:
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index 71c7759e91..8da87b771a 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -57,20 +57,32 @@ class ClassExtender(object):
if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep):
return dep
else:
+ # Do not extend for that already have multilib prefix
+ var = self.d.getVar("MULTILIB_VARIANTS", True)
+ if var:
+ var = var.split()
+ for v in var:
+ if dep.startswith(v):
+ return dep
return self.extend_name(dep)
def map_depends_variable(self, varname, suffix = ""):
+ # We need to preserve EXTENDPKGV so it can be expanded correctly later
if suffix:
varname = varname + "_" + suffix
+ orig = self.d.getVar("EXTENDPKGV", False)
+ self.d.setVar("EXTENDPKGV", "EXTENDPKGV")
deps = self.d.getVar(varname, True)
if not deps:
+ self.d.setVar("EXTENDPKGV", orig)
return
deps = bb.utils.explode_dep_versions2(deps)
newdeps = {}
for dep in deps:
newdeps[self.map_depends(dep)] = deps[dep]
- self.d.setVar(varname, bb.utils.join_deps(newdeps, False))
+ self.d.setVar(varname, bb.utils.join_deps(newdeps, False).replace("EXTENDPKGV", "${EXTENDPKGV}"))
+ self.d.setVar("EXTENDPKGV", orig)
def map_packagevars(self):
for pkg in (self.d.getVar("PACKAGES", True).split() + [""]):
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index c9b9033132..0ce303d570 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -48,11 +48,13 @@ class ImageDepGraph(object):
graph = dict()
def add_node(node):
+ base_type = self._image_base_type(node)
deps = (self.d.getVar('IMAGE_TYPEDEP_' + node, True) or "")
- if deps != "":
+ base_deps = (self.d.getVar('IMAGE_TYPEDEP_' + base_type, True) or "")
+ if deps != "" or base_deps != "":
graph[node] = deps
- for dep in deps.split():
+ for dep in deps.split() + base_deps.split():
if not dep in graph:
add_node(dep)
else:
@@ -72,6 +74,18 @@ class ImageDepGraph(object):
for item in remove_list:
self.graph.pop(item, None)
+ def _image_base_type(self, type):
+ ctypes = self.d.getVar('COMPRESSIONTYPES', True).split()
+ if type in ["vmdk", "live", "iso", "hddimg"]:
+ type = "ext3"
+ basetype = type
+ for ctype in ctypes:
+ if type.endswith("." + ctype):
+ basetype = type[:-len("." + ctype)]
+ break
+
+ return basetype
+
def _compute_dependencies(self):
"""
returns dict object of nodes with [no_of_depends_on, no_of_depended_by]
@@ -109,7 +123,7 @@ class ImageDepGraph(object):
# remove added nodes from deps_array
for item in group:
for node in self.graph:
- if item in self.graph[node]:
+ if item in self.graph[node].split():
self.deps_array[node][0] -= 1
self.deps_array.pop(item, None)
@@ -144,6 +158,7 @@ class Image(ImageDepGraph):
overhead_factor = float(self.d.getVar('IMAGE_OVERHEAD_FACTOR', True))
rootfs_req_size = int(self.d.getVar('IMAGE_ROOTFS_SIZE', True))
rootfs_extra_space = eval(self.d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
+ rootfs_maxsize = self.d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
output = subprocess.check_output(['du', '-ks',
self.d.getVar('IMAGE_ROOTFS', True)])
@@ -158,6 +173,13 @@ class Image(ImageDepGraph):
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
+ if rootfs_maxsize:
+ rootfs_maxsize_int = int(rootfs_maxsize)
+ if base_size > rootfs_maxsize_int:
+ bb.fatal("The rootfs size %d(K) overrides the max size %d(K)" % \
+ (base_size, rootfs_maxsize_int))
+
return base_size
def _create_symlinks(self, subimages):
@@ -274,7 +296,11 @@ class Image(ImageDepGraph):
bb.data.update_data(localdata)
localdata.setVar('type', type)
- cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
+ image_cmd = localdata.getVar("IMAGE_CMD", True)
+ if image_cmd:
+ cmds.append("\t" + image_cmd)
+ else:
+ bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % type)
cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
if type in cimages:
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index f8b532220a..7c728fcd23 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -30,7 +30,8 @@ def runstrip(arg):
elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
- stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ # Use mv to break hardlinks
+ stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
bb.debug(1, "runstrip: %s" % stripcmd)
ret = subprocess.call(stripcmd, shell=True)
@@ -97,3 +98,29 @@ def filedeprunner(arg):
raise e
return (pkg, provides, requires)
+
+
+def read_shlib_providers(d):
+ import re
+
+ shlib_provider = {}
+ shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
+ list_re = re.compile('^(.*)\.list$')
+ # Go from least to most specific since the last one found wins
+ for dir in reversed(shlibs_dirs):
+ bb.debug(2, "Reading shlib providers in %s" % (dir))
+ if not os.path.exists(dir):
+ continue
+ for file in os.listdir(dir):
+ m = list_re.match(file)
+ if m:
+ dep_pkg = m.group(1)
+ fd = open(os.path.join(dir, file))
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ s = l.strip().split(":")
+ if s[0] not in shlib_provider:
+ shlib_provider[s[0]] = {}
+ shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
+ return shlib_provider
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5444422305..6f49c69110 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -7,6 +7,7 @@ import multiprocessing
import re
import bb
import tempfile
+import oe.utils
# this can be used by all PM backends to create the index files in parallel
@@ -15,11 +16,14 @@ def create_index(arg):
try:
bb.note("Executing '%s' ..." % index_cmd)
- subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
return("Index creation command '%s' failed with return code %d:\n%s" %
(e.cmd, e.returncode, e.output))
+ if result:
+ bb.note(result)
+
return None
@@ -62,6 +66,9 @@ class RpmIndexer(Indexer):
localdata = bb.data.createCopy(self.d)
default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
default_tune = localdata.getVar(default_tune_key, False)
+ if default_tune is None:
+ default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
+ default_tune = localdata.getVar(default_tune_key, False)
if default_tune:
localdata.setVar("DEFAULTTUNE", default_tune)
bb.data.update_data(localdata)
@@ -116,15 +123,9 @@ class RpmIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
-
- for result in results:
- if result is not None:
- return(result)
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
class OpkgIndexer(Indexer):
@@ -161,15 +162,10 @@ class OpkgIndexer(Indexer):
bb.note("There are no packages in %s!" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
- for result in results:
- if result is not None:
- return(result)
class DpkgIndexer(Indexer):
@@ -183,6 +179,9 @@ class DpkgIndexer(Indexer):
if a not in pkg_archs:
arch_list.append(a)
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+ arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
+
apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
gzip = bb.utils.which(os.getenv('PATH'), "gzip")
@@ -210,15 +209,10 @@ class DpkgIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
- for result in results:
- if result is not None:
- return(result)
class PkgsList(object):
@@ -243,6 +237,15 @@ class RpmPkgsList(PkgsList):
self.ml_prefix_list, self.ml_os_list = \
RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
+ # Determine rpm version
+ cmd = "%s --version" % self.rpm_cmd
+ try:
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Getting rpm version failed. Command '%s' "
+ "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ self.rpm_version = int(output.split()[-1].split('.')[0])
+
'''
Translate the RPM/Smart format names to the OE multilib format names
'''
@@ -291,11 +294,16 @@ class RpmPkgsList(PkgsList):
def list(self, format=None):
if format == "deps":
+ if self.rpm_version == 4:
+ bb.fatal("'deps' format dependency listings are not supported with rpm 4 since rpmresolve does not work")
return self._list_pkg_deps()
cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
cmd += ' -D "_dbpath /var/lib/rpm" -qa'
- cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+ if self.rpm_version == 4:
+ cmd += " --qf '[%{NAME} %{ARCH} %{VERSION}\n]'"
+ else:
+ cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
try:
# bb.note(cmd)
@@ -312,7 +320,10 @@ class RpmPkgsList(PkgsList):
pkg = line.split()[0]
arch = line.split()[1]
ver = line.split()[2]
- pkgorigin = line.split()[3]
+ if self.rpm_version == 4:
+ pkgorigin = "unknown"
+ else:
+ pkgorigin = line.split()[3]
new_pkg, new_arch = self._pkg_translate_smart_to_oe(pkg, arch)
if format == "arch":
@@ -567,7 +578,7 @@ class RpmPM(PackageManager):
self.install_dir = os.path.join(self.target_rootfs, "install")
self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
- self.smart_opt = "--data-dir=" + os.path.join(target_rootfs,
+ self.smart_opt = "--quiet --data-dir=" + os.path.join(target_rootfs,
'var/lib/smart')
self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
@@ -580,6 +591,7 @@ class RpmPM(PackageManager):
self.indexer = RpmIndexer(self.d, self.deploy_dir)
self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
+ self.rpm_version = self.pkgs_list.rpm_version
self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
@@ -769,43 +781,46 @@ class RpmPM(PackageManager):
# After change the __db.* cache size, log file will not be
# generated automatically, that will raise some warnings,
# so touch a bare log for rpm write into it.
- rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
- if not os.path.exists(rpmlib_log):
- bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
- open(rpmlib_log, 'w+').close()
-
- DB_CONFIG_CONTENT = "# ================ Environment\n" \
- "set_data_dir .\n" \
- "set_create_dir .\n" \
- "set_lg_dir ./log\n" \
- "set_tmp_dir ./tmp\n" \
- "set_flags db_log_autoremove on\n" \
- "\n" \
- "# -- thread_count must be >= 8\n" \
- "set_thread_count 64\n" \
- "\n" \
- "# ================ Logging\n" \
- "\n" \
- "# ================ Memory Pool\n" \
- "set_cachesize 0 1048576 0\n" \
- "set_mp_mmapsize 268435456\n" \
- "\n" \
- "# ================ Locking\n" \
- "set_lk_max_locks 16384\n" \
- "set_lk_max_lockers 16384\n" \
- "set_lk_max_objects 16384\n" \
- "mutex_set_max 163840\n" \
- "\n" \
- "# ================ Replication\n"
-
- db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
- if not os.path.exists(db_config_dir):
- open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
+ if self.rpm_version == 5:
+ rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
+ if not os.path.exists(rpmlib_log):
+ bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
+ open(rpmlib_log, 'w+').close()
+
+ DB_CONFIG_CONTENT = "# ================ Environment\n" \
+ "set_data_dir .\n" \
+ "set_create_dir .\n" \
+ "set_lg_dir ./log\n" \
+ "set_tmp_dir ./tmp\n" \
+ "set_flags db_log_autoremove on\n" \
+ "\n" \
+ "# -- thread_count must be >= 8\n" \
+ "set_thread_count 64\n" \
+ "\n" \
+ "# ================ Logging\n" \
+ "\n" \
+ "# ================ Memory Pool\n" \
+ "set_cachesize 0 1048576 0\n" \
+ "set_mp_mmapsize 268435456\n" \
+ "\n" \
+ "# ================ Locking\n" \
+ "set_lk_max_locks 16384\n" \
+ "set_lk_max_lockers 16384\n" \
+ "set_lk_max_objects 16384\n" \
+ "mutex_set_max 163840\n" \
+ "\n" \
+ "# ================ Replication\n"
+
+ db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
+ if not os.path.exists(db_config_dir):
+ open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
# Create database so that smart doesn't complain (lazy init)
- cmd = "%s --root %s --dbpath /var/lib/rpm -qa > /dev/null" % (
- self.rpm_cmd,
- self.target_rootfs)
+ opt = "-qa"
+ if self.rpm_version == 4:
+ opt = "--initdb"
+ cmd = "%s --root %s --dbpath /var/lib/rpm %s > /dev/null" % (
+ self.rpm_cmd, self.target_rootfs, opt)
try:
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
@@ -821,11 +836,31 @@ class RpmPM(PackageManager):
self._invoke_smart('config --set rpm-extra-macros._var=%s' %
self.d.getVar('localstatedir', True))
cmd = 'config --set rpm-extra-macros._tmppath=/install/tmp'
+
+ prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True)
+ if prefer_color:
+ if prefer_color not in ['0', '1', '2', '4']:
+ bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
+ "\t1: ELF32 wins\n"
+ "\t2: ELF64 wins\n"
+ "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
+ prefer_color)
+ if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
+ ['mips64', 'mips64el']:
+ bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
+ "only.")
+ self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
+ % prefer_color)
+
self._invoke_smart(cmd)
+ self._invoke_smart('config --set rpm-ignoresize=1')
# Write common configuration for host and target usage
self._invoke_smart('config --set rpm-nolinktos=1')
self._invoke_smart('config --set rpm-noparentdirs=1')
+ check_signature = self.d.getVar('RPM_CHECK_SIGNATURES', True)
+ if check_signature and check_signature.strip() == "0":
+ self._invoke_smart('config --set rpm-check-signatures=false')
for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
self._invoke_smart('flag --set ignore-recommends %s' % i)
@@ -864,6 +899,11 @@ class RpmPM(PackageManager):
# If we ever run into needing more the 899 scripts, we'll have to.
# change num to start with 1000.
#
+ if self.rpm_version == 4:
+ scriptletcmd = "$2 $3 $4\n"
+ else:
+ scriptletcmd = "$2 $1/$3 $4\n"
+
SCRIPTLET_FORMAT = "#!/bin/bash\n" \
"\n" \
"export PATH=%s\n" \
@@ -874,7 +914,7 @@ class RpmPM(PackageManager):
"export INTERCEPT_DIR=%s\n" \
"export NATIVE_ROOT=%s\n" \
"\n" \
- "$2 $1/$3 $4\n" \
+ + scriptletcmd + \
"if [ $? -ne 0 ]; then\n" \
" if [ $4 -eq 1 ]; then\n" \
" mkdir -p $1/etc/rpm-postinsts\n" \
@@ -1234,9 +1274,9 @@ class OpkgPM(PackageManager):
with open(cfg_file_name, "w+") as cfg_file:
cfg_file.write("src/gz local-%s %s/%s" %
- arch,
- self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
- arch)
+ (arch,
+ self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
+ arch))
def _create_config(self):
with open(self.config_file, "w+") as config_file:
@@ -1383,6 +1423,10 @@ class OpkgPM(PackageManager):
else:
status.write(line + "\n")
+ # Append a blank line after each package entry to ensure that it
+ # is separated from the following entry
+ status.write("\n")
+
'''
The following function dummy installs pkgs and returns the log of output.
'''
@@ -1453,6 +1497,10 @@ class DpkgPM(PackageManager):
self.apt_args = d.getVar("APT_ARGS", True)
+ self.all_arch_list = archs.split()
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+ self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
+
self._create_configs(archs, base_archs)
self.indexer = DpkgIndexer(self.d, self.deploy_dir)
@@ -1610,8 +1658,8 @@ class DpkgPM(PackageManager):
sources_conf = os.path.join("%s/etc/apt/sources.list"
% self.target_rootfs)
arch_list = []
- archs = self.d.getVar('PACKAGE_ARCHS', True)
- for arch in archs.split():
+
+ for arch in self.all_arch_list:
if not os.path.exists(os.path.join(self.deploy_dir, arch)):
continue
arch_list.append(arch)
@@ -1634,7 +1682,7 @@ class DpkgPM(PackageManager):
bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
arch_list = []
- for arch in archs.split():
+ for arch in self.all_arch_list:
if not os.path.exists(os.path.join(self.deploy_dir, arch)):
continue
arch_list.append(arch)
@@ -1650,7 +1698,7 @@ class DpkgPM(PackageManager):
priority += 5
pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
- for pkg in pkg_exclude:
+ for pkg in pkg_exclude.split():
prefs_file.write(
"Package: %s\n"
"Pin: release *\n"
@@ -1663,15 +1711,28 @@ class DpkgPM(PackageManager):
sources_file.write("deb file:%s/ ./\n" %
os.path.join(self.deploy_dir, arch))
+ base_arch_list = base_archs.split()
+ multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True);
+ for variant in multilib_variants.split():
+ if variant == "lib32":
+ base_arch_list.append("i386")
+ elif variant == "lib64":
+ base_arch_list.append("amd64")
+
with open(self.apt_conf_file, "w+") as apt_conf:
with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
for line in apt_conf_sample.read().split("\n"):
- line = re.sub("Architecture \".*\";",
- "Architecture \"%s\";" % base_archs, line)
- line = re.sub("#ROOTFS#", self.target_rootfs, line)
- line = re.sub("#APTCONF#", self.apt_conf_dir, line)
-
- apt_conf.write(line + "\n")
+ match_arch = re.match(" Architecture \".*\";$", line)
+ architectures = ""
+ if match_arch:
+ for base_arch in base_arch_list:
+ architectures += "\"%s\";" % base_arch
+ apt_conf.write(" Architectures {%s};\n" % architectures);
+ apt_conf.write(" Architecture \"%s\";\n" % base_archs)
+ else:
+ line = re.sub("#ROOTFS#", self.target_rootfs, line)
+ line = re.sub("#APTCONF#", self.apt_conf_dir, line)
+ apt_conf.write(line + "\n")
target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "info"))
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index b085c9d6b5..b838be80be 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -199,10 +199,108 @@ class PatchTree(PatchSet):
self.Pop(all=True)
class GitApplyTree(PatchTree):
+ patch_line_prefix = '%% original patch'
+
def __init__(self, dir, d):
PatchTree.__init__(self, dir, d)
+ @staticmethod
+ def extractPatchHeader(patchfile):
+ """
+ Extract just the header lines from the top of a patch file
+ """
+ lines = []
+ with open(patchfile, 'r') as f:
+ for line in f.readlines():
+ if line.startswith('Index: ') or line.startswith('diff -') or line.startswith('---'):
+ break
+ lines.append(line)
+ return lines
+
+ @staticmethod
+ def prepareCommit(patchfile):
+ """
+ Prepare a git commit command line based on the header from a patch file
+ (typically this is useful for patches that cannot be applied with "git am" due to formatting)
+ """
+ import tempfile
+ import re
+ author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>')
+ # Process patch header and extract useful information
+ lines = GitApplyTree.extractPatchHeader(patchfile)
+ outlines = []
+ author = None
+ date = None
+ for line in lines:
+ if line.startswith('Subject: '):
+ subject = line.split(':', 1)[1]
+ # Remove any [PATCH][oe-core] etc.
+ subject = re.sub(r'\[.+?\]\s*', '', subject)
+ outlines.insert(0, '%s\n\n' % subject.strip())
+ continue
+ if line.startswith('From: ') or line.startswith('Author: '):
+ authorval = line.split(':', 1)[1].strip().replace('"', '')
+ # git is fussy about author formatting i.e. it must be Name <email@domain>
+ if author_re.match(authorval):
+ author = authorval
+ continue
+ if line.startswith('Date: '):
+ if date is None:
+ dateval = line.split(':', 1)[1].strip()
+ # Very crude check for date format, since git will blow up if it's not in the right
+ # format. Without e.g. a python-dateutils dependency we can't do a whole lot more
+ if len(dateval) > 12:
+ date = dateval
+ continue
+ if line.startswith('Signed-off-by: '):
+ authorval = line.split(':', 1)[1].strip().replace('"', '')
+ # git is fussy about author formatting i.e. it must be Name <email@domain>
+ if author_re.match(authorval):
+ author = authorval
+ outlines.append(line)
+ # Write out commit message to a file
+ with tempfile.NamedTemporaryFile('w', delete=False) as tf:
+ tmpfile = tf.name
+ for line in outlines:
+ tf.write(line)
+ # Prepare git command
+ cmd = ["git", "commit", "-F", tmpfile]
+ # git doesn't like plain email addresses as authors
+ if author and '<' in author:
+ cmd.append('--author="%s"' % author)
+ if date:
+ cmd.append('--date="%s"' % date)
+ return (tmpfile, cmd)
+
+ @staticmethod
+ def extractPatches(tree, startcommit, outdir):
+ import tempfile
+ import shutil
+ tempdir = tempfile.mkdtemp(prefix='oepatch')
+ try:
+ shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
+ out = runcmd(["sh", "-c", " ".join(shellcmd)], tree)
+ if out:
+ for srcfile in out.split():
+ patchlines = []
+ outfile = None
+ with open(srcfile, 'r') as f:
+ for line in f:
+ if line.startswith(GitApplyTree.patch_line_prefix):
+ outfile = line.split()[-1].strip()
+ continue
+ patchlines.append(line)
+ if not outfile:
+ outfile = os.path.basename(srcfile)
+ with open(os.path.join(outdir, outfile), 'w') as of:
+ for line in patchlines:
+ of.write(line)
+ finally:
+ shutil.rmtree(tempdir)
+
def _applypatch(self, patch, force = False, reverse = False, run = True):
+ import shutil
+
def _applypatchhelper(shellcmd, patch, force = False, reverse = False, run = True):
if reverse:
shellcmd.append('-R')
@@ -214,12 +312,62 @@ class GitApplyTree(PatchTree):
return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Add hooks which add a pointer to the original patch file name in the commit message
+ commithook = os.path.join(self.dir, '.git', 'hooks', 'commit-msg')
+ commithook_backup = commithook + '.devtool-orig'
+ applyhook = os.path.join(self.dir, '.git', 'hooks', 'applypatch-msg')
+ applyhook_backup = applyhook + '.devtool-orig'
+ if os.path.exists(commithook):
+ shutil.move(commithook, commithook_backup)
+ if os.path.exists(applyhook):
+ shutil.move(applyhook, applyhook_backup)
+ with open(commithook, 'w') as f:
+ # NOTE: the formatting here is significant; if you change it you'll also need to
+ # change other places which read it back
+ f.write('echo >> $1\n')
+ f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix)
+ os.chmod(commithook, 0755)
+ shutil.copy2(commithook, applyhook)
try:
- shellcmd = ["git", "--work-tree=.", "am", "-3", "-p%s" % patch['strippath']]
- return _applypatchhelper(shellcmd, patch, force, reverse, run)
- except CmdError:
- shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
- return _applypatchhelper(shellcmd, patch, force, reverse, run)
+ patchfilevar = 'PATCHFILE="%s"' % os.path.basename(patch['file'])
+ try:
+ shellcmd = [patchfilevar, "git", "--work-tree=.", "am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
+ return _applypatchhelper(shellcmd, patch, force, reverse, run)
+ except CmdError:
+ # Need to abort the git am, or we'll still be within it at the end
+ try:
+ shellcmd = ["git", "--work-tree=.", "am", "--abort"]
+ runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ except CmdError:
+ pass
+ # Fall back to git apply
+ shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
+ try:
+ output = _applypatchhelper(shellcmd, patch, force, reverse, run)
+ except CmdError:
+ # Fall back to patch
+ output = PatchTree._applypatch(self, patch, force, reverse, run)
+ # Add all files
+ shellcmd = ["git", "add", "-f", "."]
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Exclude the patches directory
+ shellcmd = ["git", "reset", "HEAD", self.patchdir]
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Commit the result
+ (tmpfile, shellcmd) = self.prepareCommit(patch['file'])
+ try:
+ shellcmd.insert(0, patchfilevar)
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ finally:
+ os.remove(tmpfile)
+ return output
+ finally:
+ os.remove(commithook)
+ os.remove(applyhook)
+ if os.path.exists(commithook_backup):
+ shutil.move(commithook_backup, commithook)
+ if os.path.exists(applyhook_backup):
+ shutil.move(applyhook_backup, applyhook)
class QuiltTree(PatchSet):
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
new file mode 100644
index 0000000000..1758dcecba
--- /dev/null
+++ b/meta/lib/oe/recipeutils.py
@@ -0,0 +1,279 @@
+# Utility functions for reading and modifying recipes
+#
+# Some code borrowed from the OE layer index
+#
+# Copyright (C) 2013-2014 Intel Corporation
+#
+
+import sys
+import os
+import os.path
+import tempfile
+import textwrap
+import difflib
+import utils
+import shutil
+import re
+from collections import OrderedDict, defaultdict
+
+
+# Help us to find places to insert values
+recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRC_URI', 'do_fetch', 'do_unpack', 'do_patch', 'EXTRA_OECONF', 'do_configure', 'EXTRA_OEMAKE', 'do_compile', 'do_install', 'do_populate_sysroot', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'do_package', 'do_deploy']
+# Variables that sometimes are a bit long but shouldn't be wrapped
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER']
+list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
+meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
+
+
+def pn_to_recipe(cooker, pn):
+ """Convert a recipe name (PN) to the path to the recipe file"""
+ import bb.providers
+
+ if pn in cooker.recipecache.pkg_pn:
+ filenames = cooker.recipecache.pkg_pn[pn]
+ best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecache, cooker.recipecache.pkg_pn)
+ return best[3]
+ else:
+ return None
+
+
+def get_unavailable_reasons(cooker, pn):
+ """If a recipe could not be found, find out why if possible"""
+ import bb.taskdata
+ taskdata = bb.taskdata.TaskData(None, skiplist=cooker.skiplist)
+ return taskdata.get_reasons(pn)
+
+
+def parse_recipe(fn, d):
+ """Parse an individual recipe"""
+ import bb.cache
+ envdata = bb.cache.Cache.loadDataFull(fn, [], d)
+ return envdata
+
+
+def get_var_files(fn, varlist, d):
+ """Find the file in which each of a list of variables is set.
+ Note: requires variable history to be enabled when parsing.
+ """
+ envdata = parse_recipe(fn, d)
+ varfiles = {}
+ for v in varlist:
+ history = envdata.varhistory.variable(v)
+ files = []
+ for event in history:
+ if 'file' in event and not 'flag' in event:
+ files.append(event['file'])
+ if files:
+ actualfile = files[-1]
+ else:
+ actualfile = None
+ varfiles[v] = actualfile
+
+ return varfiles
+
+
+def patch_recipe_file(fn, values, patch=False, relpath=''):
+ """Update or insert variable values into a recipe file (assuming you
+ have already identified the exact file you want to update.)
+ Note that some manual inspection/intervention may be required
+ since this cannot handle all situations.
+ """
+ remainingnames = {}
+ for k in values.keys():
+ remainingnames[k] = recipe_progression.index(k) if k in recipe_progression else -1
+ remainingnames = OrderedDict(sorted(remainingnames.iteritems(), key=lambda x: x[1]))
+
+ with tempfile.NamedTemporaryFile('w', delete=False) as tf:
+ def outputvalue(name):
+ rawtext = '%s = "%s"\n' % (name, values[name])
+ if name in nowrap_vars:
+ tf.write(rawtext)
+ elif name in list_vars:
+ splitvalue = values[name].split()
+ if len(splitvalue) > 1:
+ linesplit = ' \\\n' + (' ' * (len(name) + 4))
+ tf.write('%s = "%s%s"\n' % (name, linesplit.join(splitvalue), linesplit))
+ else:
+ tf.write(rawtext)
+ else:
+ wrapped = textwrap.wrap(rawtext)
+ for wrapline in wrapped[:-1]:
+ tf.write('%s \\\n' % wrapline)
+ tf.write('%s\n' % wrapped[-1])
+
+ tfn = tf.name
+ with open(fn, 'r') as f:
+ # First runthrough - find existing names (so we know not to insert based on recipe_progression)
+ # Second runthrough - make the changes
+ existingnames = []
+ for runthrough in [1, 2]:
+ currname = None
+ for line in f:
+ if not currname:
+ insert = False
+ for k in remainingnames.keys():
+ for p in recipe_progression:
+ if re.match('^%s[ ?:=]' % p, line):
+ if remainingnames[k] > -1 and recipe_progression.index(p) > remainingnames[k] and runthrough > 1 and not k in existingnames:
+ outputvalue(k)
+ del remainingnames[k]
+ break
+ for k in remainingnames.keys():
+ if re.match('^%s[ ?:=]' % k, line):
+ currname = k
+ if runthrough == 1:
+ existingnames.append(k)
+ else:
+ del remainingnames[k]
+ break
+ if currname and runthrough > 1:
+ outputvalue(currname)
+
+ if currname:
+ sline = line.rstrip()
+ if not sline.endswith('\\'):
+ currname = None
+ continue
+ if runthrough > 1:
+ tf.write(line)
+ f.seek(0)
+ if remainingnames:
+ tf.write('\n')
+ for k in remainingnames.keys():
+ outputvalue(k)
+
+ with open(tfn, 'U') as f:
+ tolines = f.readlines()
+ if patch:
+ with open(fn, 'U') as f:
+ fromlines = f.readlines()
+ relfn = os.path.relpath(fn, relpath)
+ diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
+ os.remove(tfn)
+ return diff
+ else:
+ with open(fn, 'w') as f:
+ f.writelines(tolines)
+ os.remove(tfn)
+ return None
+
+def localise_file_vars(fn, varfiles, varlist):
+ """Given a list of variables and variable history (fetched with get_var_files())
+ find where each variable should be set/changed. This handles for example where a
+ recipe includes an inc file where variables might be changed - in most cases
+ we want to update the inc file when changing the variable value rather than adding
+ it to the recipe itself.
+ """
+ fndir = os.path.dirname(fn) + os.sep
+
+ first_meta_file = None
+ for v in meta_vars:
+ f = varfiles.get(v, None)
+ if f:
+ actualdir = os.path.dirname(f) + os.sep
+ if actualdir.startswith(fndir):
+ first_meta_file = f
+ break
+
+ filevars = defaultdict(list)
+ for v in varlist:
+ f = varfiles[v]
+ # Only return files that are in the same directory as the recipe or in some directory below there
+ # (this excludes bbclass files and common inc files that wouldn't be appropriate to set the variable
+ # in if we were going to set a value specific to this recipe)
+ if f:
+ actualfile = f
+ else:
+ # Variable isn't in a file, if it's one of the "meta" vars, use the first file with a meta var in it
+ if first_meta_file:
+ actualfile = first_meta_file
+ else:
+ actualfile = fn
+
+ actualdir = os.path.dirname(actualfile) + os.sep
+ if not actualdir.startswith(fndir):
+ actualfile = fn
+ filevars[actualfile].append(v)
+
+ return filevars
+
+def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
+ """Modify a list of variable values in the specified recipe. Handles inc files if
+ used by the recipe.
+ """
+ varlist = varvalues.keys()
+ varfiles = get_var_files(fn, varlist, d)
+ locs = localise_file_vars(fn, varfiles, varlist)
+ patches = []
+ for f,v in locs.iteritems():
+ vals = {k: varvalues[k] for k in v}
+ patchdata = patch_recipe_file(f, vals, patch, relpath)
+ if patch:
+ patches.append(patchdata)
+
+ if patch:
+ return patches
+ else:
+ return None
+
+
+
+def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
+ """Copy (local) recipe files, including both files included via include/require,
+ and files referred to in the SRC_URI variable."""
+ import bb.fetch2
+ import oe.path
+
+ # FIXME need a warning if the unexpanded SRC_URI value contains variable references
+
+ uris = (d.getVar('SRC_URI', True) or "").split()
+ fetch = bb.fetch2.Fetch(uris, d)
+ if download:
+ fetch.download()
+
+ # Copy local files to target directory and gather any remote files
+ bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep
+ remotes = []
+ includes = [path for path in d.getVar('BBINCLUDED', True).split() if
+ path.startswith(bb_dir) and os.path.exists(path)]
+ for path in fetch.localpaths() + includes:
+ # Only import files that are under the meta directory
+ if path.startswith(bb_dir):
+ if not whole_dir:
+ relpath = os.path.relpath(path, bb_dir)
+ subdir = os.path.join(tgt_dir, os.path.dirname(relpath))
+ if not os.path.exists(subdir):
+ os.makedirs(subdir)
+ shutil.copy2(path, os.path.join(tgt_dir, relpath))
+ else:
+ remotes.append(path)
+ # Simply copy whole meta dir, if requested
+ if whole_dir:
+ shutil.copytree(bb_dir, tgt_dir)
+
+ return remotes
+
+
+def get_recipe_patches(d):
+ """Get a list of the patches included in SRC_URI within a recipe."""
+ patchfiles = []
+ # Execute src_patches() defined in patch.bbclass - this works since that class
+ # is inherited globally
+ patches = bb.utils.exec_flat_python_func('src_patches', d)
+ for patch in patches:
+ _, _, local, _, _, parm = bb.fetch.decodeurl(patch)
+ patchfiles.append(local)
+ return patchfiles
+
+
+def validate_pn(pn):
+ """Perform validation on a recipe name (PN) for a new recipe."""
+ reserved_names = ['forcevariable', 'append', 'prepend', 'remove']
+ if not re.match('[0-9a-z-]+', pn):
+ return 'Recipe name "%s" is invalid: only characters 0-9, a-z and - are allowed' % pn
+ elif pn in reserved_names:
+ return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
+ elif pn.startswith('pn-'):
+ return 'Recipe name "%s" is invalid: names starting with "pn-" are reserved' % pn
+ return ''
+
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index bc2524f593..f42a2ae7b3 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -111,24 +111,25 @@ class Rootfs(object):
True, False, self.d):
delayed_postinsts = self._get_delayed_postinsts()
if delayed_postinsts is not None:
- bb.fatal("The following packages could not be configured"
+ bb.fatal("The following packages could not be configured "
"offline and rootfs is read-only: %s" %
delayed_postinsts)
if self.d.getVar('USE_DEVFS', True) != "1":
self._create_devfs()
- self._uninstall_uneeded()
+ self._uninstall_unneeded()
self._insert_feed_uris()
self._run_ldconfig()
- self._generate_kernel_module_deps()
+ if self.d.getVar('USE_DEPMOD', True) != "0":
+ self._generate_kernel_module_deps()
self._cleanup()
- def _uninstall_uneeded(self):
+ def _uninstall_unneeded(self):
# Remove unneeded init script symlinks
delayed_postinsts = self._get_delayed_postinsts()
if delayed_postinsts is None:
@@ -137,34 +138,39 @@ class Rootfs(object):
self.d.getVar('IMAGE_ROOTFS', True),
"run-postinsts", "remove"])
- # Remove unneeded package-management related components
- if bb.utils.contains("IMAGE_FEATURES", "package-management",
- True, False, self.d):
- return
+ runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
+ True, False, self.d)
+ if not runtime_pkgmanage:
+ # Remove components that we don't need if we're not going to install
+ # additional packages at runtime
+ if delayed_postinsts is None:
+ installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
+ pkgs_to_remove = list()
+ with open(installed_pkgs_dir, "r+") as installed_pkgs:
+ pkgs_installed = installed_pkgs.read().split('\n')
+ for pkg_installed in pkgs_installed[:]:
+ pkg = pkg_installed.split()[0]
+ if pkg in ["update-rc.d",
+ "base-passwd",
+ self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
+ ]:
+ pkgs_to_remove.append(pkg)
+ pkgs_installed.remove(pkg_installed)
+
+ if len(pkgs_to_remove) > 0:
+ self.pm.remove(pkgs_to_remove, False)
+ # Update installed_pkgs.txt
+ open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
- if delayed_postinsts is None:
- installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
- pkgs_to_remove = list()
- with open(installed_pkgs_dir, "r+") as installed_pkgs:
- pkgs_installed = installed_pkgs.read().split('\n')
- for pkg_installed in pkgs_installed[:]:
- pkg = pkg_installed.split()[0]
- if pkg in ["update-rc.d",
- "base-passwd",
- self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
- ]:
- pkgs_to_remove.append(pkg)
- pkgs_installed.remove(pkg_installed)
-
- if len(pkgs_to_remove) > 0:
- self.pm.remove(pkgs_to_remove, False)
- # Update installed_pkgs.txt
- open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
+ else:
+ self._save_postinsts()
- else:
- self._save_postinsts()
+ post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True)
+ execute_pre_post_process(self.d, post_uninstall_cmds)
- self.pm.remove_packaging_data()
+ if not runtime_pkgmanage:
+ # Remove the package manager data files
+ self.pm.remove_packaging_data()
def _run_intercepts(self):
intercepts_dir = os.path.join(self.d.getVar('WORKDIR', True),
@@ -209,16 +215,17 @@ class Rootfs(object):
'new', '-v'])
def _generate_kernel_module_deps(self):
- kernel_abi_ver_file = os.path.join(self.d.getVar('STAGING_KERNEL_DIR', True),
+ kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR', True), "kernel-depmod",
'kernel-abiversion')
- if os.path.exists(kernel_abi_ver_file):
- kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
- modules_dir = os.path.join(self.image_rootfs, 'lib', 'modules', kernel_ver)
+ if not os.path.exists(kernel_abi_ver_file):
+ bb.fatal("No kernel-abiversion file found (%s), cannot run depmod, aborting" % kernel_abi_ver_file)
+
+ kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
+ modules_dir = os.path.join(self.image_rootfs, 'lib', 'modules', kernel_ver)
- bb.utils.mkdirhier(modules_dir)
+ bb.utils.mkdirhier(modules_dir)
- self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs,
- kernel_ver])
+ self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver])
"""
Create devfs:
@@ -327,6 +334,11 @@ class RpmRootfs(Rootfs):
self.pm.rpm_setup_smart_target_config()
+ @staticmethod
+ def _depends_list():
+ return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
+ 'RPM_POSTPROCESS_COMMANDS', 'RPM_PREFER_ELF_ARCH']
+
def _get_delayed_postinsts(self):
postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
if os.path.isdir(postinst_dir):
@@ -342,7 +354,21 @@ class RpmRootfs(Rootfs):
# already saved in /etc/rpm-postinsts
pass
- def _log_check(self):
+ def _log_check_warn(self):
+ r = re.compile('^(warn|Warn|NOTE: warn|NOTE: Warn)')
+ log_path = self.d.expand("${T}/log.do_rootfs")
+ with open(log_path, 'r') as log:
+ for line in log.read().split('\n'):
+ if 'log_check' in line:
+ continue
+
+ m = r.search(line)
+ if m:
+ bb.warn('log_check: There is a warn message in the logfile')
+ bb.warn('log_check: Matched keyword: [%s]' % m.group())
+ bb.warn('log_check: %s\n' % line)
+
+ def _log_check_error(self):
r = re.compile('(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)')
log_path = self.d.expand("${T}/log.do_rootfs")
with open(log_path, 'r') as log:
@@ -365,6 +391,10 @@ class RpmRootfs(Rootfs):
if found_error == 6:
bb.fatal(message)
+ def _log_check(self):
+ self._log_check_warn()
+ self._log_check_error()
+
def _handle_intercept_failure(self, registered_pkgs):
rpm_postinsts_dir = self.image_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
bb.utils.mkdirhier(rpm_postinsts_dir)
@@ -379,6 +409,7 @@ class RpmRootfs(Rootfs):
# __db.00* (Berkeley DB files that hold locks, rpm specific environment
# settings, etc.), that should not get into the final rootfs
self.pm.unlock_rpm_db()
+ bb.utils.remove(self.image_rootfs + "/install", True)
class DpkgRootfs(Rootfs):
@@ -417,6 +448,10 @@ class DpkgRootfs(Rootfs):
self.pm.run_pre_post_installs()
+ @staticmethod
+ def _depends_list():
+ return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND']
+
def _get_delayed_postinsts(self):
pkg_list = []
with open(self.image_rootfs + "/var/lib/dpkg/status") as status:
@@ -679,6 +714,10 @@ class OpkgRootfs(Rootfs):
if self.inc_opkg_image_gen == "1":
self.pm.backup_packaging_data()
+ @staticmethod
+ def _depends_list():
+ return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
+
def _get_delayed_postinsts(self):
pkg_list = []
status_file = os.path.join(self.image_rootfs,
@@ -722,6 +761,15 @@ class OpkgRootfs(Rootfs):
def _cleanup(self):
pass
+def get_class_for_type(imgtype):
+ return {"rpm": RpmRootfs,
+ "ipk": OpkgRootfs,
+ "deb": DpkgRootfs}[imgtype]
+
+def variable_depends(d, manifest_dir=None):
+ img_type = d.getVar('IMAGE_PKGTYPE', True)
+ cls = get_class_for_type(img_type)
+ return cls._depends_list()
def create_rootfs(d, manifest_dir=None):
env_bkp = os.environ.copy()
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index ca349c433c..a6767412c7 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -269,6 +269,8 @@ class DpkgSdk(Sdk):
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
+ self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', True))
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -303,7 +305,7 @@ def sdk_list_installed_packages(d, target, format=None, rootfs_dir=None):
os_var = ["SDK_OS", None][target is True]
return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list(format)
elif img_type == "ipk":
- conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_Target"][target is True]
+ conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list(format)
elif img_type == "deb":
return DpkgPkgsList(d, rootfs_dir).list(format)
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index d58147f78f..af7617ee61 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -14,6 +14,9 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
def isPackageGroup(fn):
inherits = " ".join(dataCache.inherits[fn])
return "/packagegroup.bbclass" in inherits
+ def isAllArch(fn):
+ inherits = " ".join(dataCache.inherits[fn])
+ return "/allarch.bbclass" in inherits
def isImage(fn):
return "/image.bbclass" in " ".join(dataCache.inherits[fn])
@@ -36,8 +39,8 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Only target packages beyond here
- # packagegroups are assumed to have well behaved names which don't change between architecures/tunes
- if isPackageGroup(fn):
+ # allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes
+ if isPackageGroup(fn) and isAllArch(fn):
return False
# Exclude well defined machine specific configurations which don't change ABI
@@ -58,6 +61,18 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Default to keep dependencies
return True
+def sstate_lockedsigs(d):
+ sigs = {}
+ types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split()
+ for t in types:
+ lockedsigs = (d.getVar("SIGGEN_LOCKEDSIGS_%s" % t, True) or "").split()
+ for ls in lockedsigs:
+ pn, task, h = ls.split(":", 2)
+ if pn not in sigs:
+ sigs[pn] = {}
+ sigs[pn][task] = h
+ return sigs
+
class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
name = "OEBasic"
def init_rundepcheck(self, data):
@@ -72,10 +87,99 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
def init_rundepcheck(self, data):
self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split()
self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split()
+ self.lockedsigs = sstate_lockedsigs(data)
+ self.lockedhashes = {}
+ self.lockedpnmap = {}
+ self.lockedhashfn = {}
+ self.machine = data.getVar("MACHINE", True)
+ self.mismatch_msgs = []
pass
def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
+ def get_taskdata(self):
+ data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata()
+ return (data, self.lockedpnmap, self.lockedhashfn)
+
+ def set_taskdata(self, data):
+ coredata, self.lockedpnmap, self.lockedhashfn = data
+ super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
+
+ def dump_sigs(self, dataCache, options):
+ self.dump_lockedsigs()
+ return super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigs(dataCache, options)
+
+ def get_taskhash(self, fn, task, deps, dataCache):
+ h = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskhash(fn, task, deps, dataCache)
+
+ recipename = dataCache.pkg_fn[fn]
+ self.lockedpnmap[fn] = recipename
+ self.lockedhashfn[fn] = dataCache.hashfn[fn]
+ if recipename in self.lockedsigs:
+ if task in self.lockedsigs[recipename]:
+ k = fn + "." + task
+ h_locked = self.lockedsigs[recipename][task]
+ self.lockedhashes[k] = h_locked
+ self.taskhash[k] = h_locked
+ #bb.warn("Using %s %s %s" % (recipename, task, h))
+
+ if h != h_locked:
+ self.mismatch_msgs.append('The %s:%s sig (%s) changed, use locked sig %s to instead'
+ % (recipename, task, h, h_locked))
+
+ return h_locked
+ #bb.warn("%s %s %s" % (recipename, task, h))
+ return h
+
+ def dump_sigtask(self, fn, task, stampbase, runtime):
+ k = fn + "." + task
+ if k in self.lockedhashes:
+ return
+ super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime)
+
+ def dump_lockedsigs(self, sigfile=None):
+ if not sigfile:
+ sigfile = os.getcwd() + "/locked-sigs.inc"
+
+ bb.plain("Writing locked sigs to %s" % sigfile)
+ types = {}
+ for k in self.runtaskdeps:
+ fn = k.rsplit(".",1)[0]
+ t = self.lockedhashfn[fn].split(" ")[1].split(":")[5]
+ t = 't-' + t.replace('_', '-')
+ if t not in types:
+ types[t] = []
+ types[t].append(k)
+
+ with open(sigfile, "w") as f:
+ for t in types:
+ f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t)
+ types[t].sort()
+ sortedk = sorted(types[t], key=lambda k: self.lockedpnmap[k.rsplit(".",1)[0]])
+ for k in sortedk:
+ fn = k.rsplit(".",1)[0]
+ task = k.rsplit(".",1)[1]
+ if k not in self.taskhash:
+ continue
+ f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n")
+ f.write(' "\n')
+ f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
+
+ def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_CHECK_LEVEL", True)
+ for task in range(len(sq_fn)):
+ if task not in ret:
+ for pn in self.lockedsigs:
+ if sq_hash[task] in self.lockedsigs[pn].itervalues():
+ self.mismatch_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
+ % (pn, sq_task[task], sq_hash[task]))
+
+ if self.mismatch_msgs and checklevel == 'warn':
+ bb.warn("\n".join(self.mismatch_msgs))
+ elif self.mismatch_msgs and checklevel == 'error':
+ bb.fatal("\n".join(self.mismatch_msgs))
+
+
# Insert these classes into siggen's namespace so it can see and select them
bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 0a623c75b1..17d09045e4 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -52,7 +52,7 @@ class XTerminal(Terminal):
raise UnsupportedTerminal(self.name)
class Gnome(XTerminal):
- command = 'gnome-terminal -t "{title}" -x {command}'
+ command = 'gnome-terminal -t "{title}" --disable-factory -x {command}'
priority = 2
class Mate(XTerminal):
@@ -63,6 +63,10 @@ class Xfce(XTerminal):
command = 'xfce4-terminal -T "{title}" -e "{command}"'
priority = 2
+class Terminology(XTerminal):
+ command = 'terminology -T="{title}" -e {command}'
+ priority = 2
+
class Konsole(XTerminal):
command = 'konsole -T "{title}" -e {command}'
priority = 2
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 0a1d1080c9..1f84ba4b25 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -151,3 +151,36 @@ def execute_pre_post_process(d, cmds):
if cmd != '':
bb.note("Executing %s ..." % cmd)
bb.build.exec_func(cmd, d)
+
+def multiprocess_exec(commands, function):
+ import signal
+ import multiprocessing
+
+ if not commands:
+ return []
+
+ def init_worker():
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+
+ nproc = min(multiprocessing.cpu_count(), len(commands))
+ pool = bb.utils.multiprocessingpool(nproc, init_worker)
+ imap = pool.imap(function, commands)
+
+ try:
+ res = list(imap)
+ pool.close()
+ pool.join()
+ results = []
+ for result in res:
+ if result is not None:
+ results.append(result)
+ return results
+
+ except KeyboardInterrupt:
+ pool.terminate()
+ pool.join()
+ raise
+
+def squashspaces(string):
+ import re
+ return re.sub("\s+", " ", string).strip()
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 0db6cb80a9..0b7e7dc42d 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -10,25 +10,29 @@
import os, re, mmap
import unittest
import inspect
-
-
-def loadTests(tc):
-
- # set the context object passed from the test class
- setattr(oeTest, "tc", tc)
- # set ps command to use
- setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
- # prepare test suite, loader and runner
- suite = unittest.TestSuite()
+import subprocess
+from oeqa.utils.decorators import LogResults
+
+def loadTests(tc, type="runtime"):
+ if type == "runtime":
+ # set the context object passed from the test class
+ setattr(oeTest, "tc", tc)
+ # set ps command to use
+ setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
+ # prepare test suite, loader and runner
+ suite = unittest.TestSuite()
+ elif type == "sdk":
+ # set the context object passed from the test class
+ setattr(oeTest, "tc", tc)
testloader = unittest.TestLoader()
testloader.sortTestMethodsUsing = None
suite = testloader.loadTestsFromNames(tc.testslist)
return suite
-def runTests(tc):
+def runTests(tc, type="runtime"):
- suite = loadTests(tc)
+ suite = loadTests(tc, type)
print("Test modules %s" % tc.testslist)
print("Found %s tests" % suite.countTestCases())
runner = unittest.TextTestRunner(verbosity=2)
@@ -36,24 +40,10 @@ def runTests(tc):
return result
-
+@LogResults
class oeTest(unittest.TestCase):
longMessage = True
- testFailures = []
- testSkipped = []
- testErrors = []
-
- def run(self, result=None):
- super(oeTest, self).run(result)
-
- # we add to our own lists the results, we use those for decorators
- if len(result.failures) > len(oeTest.testFailures):
- oeTest.testFailures.append(str(result.failures[-1][0]).split()[0])
- if len(result.skipped) > len(oeTest.testSkipped):
- oeTest.testSkipped.append(str(result.skipped[-1][0]).split()[0])
- if len(result.errors) > len(oeTest.testErrors):
- oeTest.testErrors.append(str(result.errors[-1][0]).split()[0])
@classmethod
def hasPackage(self, pkg):
@@ -71,13 +61,22 @@ class oeTest(unittest.TestCase):
else:
return False
-
class oeRuntimeTest(oeTest):
-
def __init__(self, methodName='runTest'):
self.target = oeRuntimeTest.tc.target
super(oeRuntimeTest, self).__init__(methodName)
+ #TODO: use package_manager.py to install packages on any type of image
+ def install_packages(self, packagelist):
+ for package in packagelist:
+ (status, result) = self.target.run("smart install -y "+package)
+ if status != 0:
+ return status
+
+class oeSDKTest(oeTest):
+ def __init__(self, methodName='runTest'):
+ self.sdktestdir = oeSDKTest.tc.sdktestdir
+ super(oeSDKTest, self).__init__(methodName)
def getmodule(pos=2):
# stack returns a list of tuples containg frame information
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
new file mode 100644
index 0000000000..4c58dc1d7f
--- /dev/null
+++ b/meta/lib/oeqa/runtime/_ptest.py
@@ -0,0 +1,124 @@
+import unittest, os, shutil
+from oeqa.oetest import oeRuntimeTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.logparser import *
+from oeqa.utils.httpserver import HTTPService
+import bb
+import glob
+from oe.package_manager import RpmPkgsList
+import subprocess
+
+def setUpModule():
+ if not oeRuntimeTest.hasFeature("package-management"):
+ skipModule("Image doesn't have package management feature")
+ if not oeRuntimeTest.hasPackage("smart"):
+ skipModule("Image doesn't have smart installed")
+ if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
+ skipModule("Rpm is not the primary package manager")
+
+class PtestRunnerTest(oeRuntimeTest):
+
+ # a ptest log parser
+ def parse_ptest(self, logfile):
+ parser = Lparser(test_0_pass_regex="^PASS:(.+)", test_0_fail_regex="^FAIL:(.+)", section_0_begin_regex="^BEGIN: .*/(.+)/ptest", section_0_end_regex="^END: .*/(.+)/ptest")
+ parser.init()
+ result = Result()
+
+ with open(logfile) as f:
+ for line in f:
+ result_tuple = parser.parse_line(line)
+ if not result_tuple:
+ continue
+ result_tuple = line_type, category, status, name = parser.parse_line(line)
+
+ if line_type == 'section' and status == 'begin':
+ current_section = name
+ continue
+
+ if line_type == 'section' and status == 'end':
+ current_section = None
+ continue
+
+ if line_type == 'test' and status == 'pass':
+ result.store(current_section, name, status)
+ continue
+
+ if line_type == 'test' and status == 'fail':
+ result.store(current_section, name, status)
+ continue
+
+ result.sort_tests()
+ return result
+
+ @classmethod
+ def setUpClass(self):
+ #note the existing channels that are on the board before creating new ones
+# self.existingchannels = set()
+# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0)
+# for x in result.split("\n"):
+# self.existingchannels.add(x)
+ self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.target.server_ip)
+ self.repo_server.start()
+
+ @classmethod
+ def tearDownClass(self):
+ self.repo_server.stop()
+ #remove created channels to be able to repeat the tests on same image
+# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0)
+# for x in result.split("\n"):
+# if x not in self.existingchannels:
+# oeRuntimeTest.tc.target.run('smart channel --remove '+x[1:-1]+' -y', 0)
+
+ def add_smart_channel(self):
+ image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True)
+ deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
+ pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True).replace("-","_").split()
+ for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
+ if arch in pkgarchs:
+ self.target.run('smart channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url), 0)
+ self.target.run('smart update', 0)
+
+ def install_complementary(self, globs=None):
+ installed_pkgs_file = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True),
+ "installed_pkgs.txt")
+ self.pkgs_list = RpmPkgsList(oeRuntimeTest.tc.d, oeRuntimeTest.tc.d.getVar('IMAGE_ROOTFS', True), oeRuntimeTest.tc.d.getVar('arch_var', True), oeRuntimeTest.tc.d.getVar('os_var', True))
+ with open(installed_pkgs_file, "w+") as installed_pkgs:
+ installed_pkgs.write(self.pkgs_list.list("arch"))
+
+ cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
+ "glob", oeRuntimeTest.tc.d.getVar('PKGDATA_DIR', True), installed_pkgs_file,
+ globs]
+ try:
+ bb.note("Installing complementary packages ...")
+ complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Could not compute complementary packages list. Command "
+ "'%s' returned %d:\n%s" %
+ (' '.join(cmd), e.returncode, e.output))
+
+ return complementary_pkgs.split()
+
+ def setUp(self):
+ self.buildhist_dir = oeRuntimeTest.tc.d.getVar("BUILDHISTORY_DIR_IMAGE", True)
+ self.assertTrue(os.path.exists(self.buildhist_dir))
+ self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME', True))
+
+ @skipUnlessPassed('test_ssh')
+ def test_ptestrunner(self):
+ self.add_smart_channel()
+ cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest")
+ if not cond:
+ self.install_packages(self.install_complementary("*-ptest"))
+ self.install_packages(['ptest-runner'])
+
+ self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0)
+ self.target.copy_from('/tmp/ptest.log', self.ptest_log)
+ shutil.copyfile(self.ptest_log, os.path.join(self.buildhist_dir, "ptest.log"))
+
+ result = self.parse_ptest(os.path.join(self.buildhist_dir, "ptest.log"))
+ log_results_to_location = "./results"
+ if os.path.exists(log_results_to_location):
+ shutil.rmtree(log_results_to_location)
+ os.makedirs(log_results_to_location)
+
+ result.log_as_files(log_results_to_location, test_status = ['fail'])
diff --git a/meta/lib/oeqa/runtime/buildcvs.py b/meta/lib/oeqa/runtime/buildcvs.py
index f1fbf19c1f..fe6cbfbcd5 100644
--- a/meta/lib/oeqa/runtime/buildcvs.py
+++ b/meta/lib/oeqa/runtime/buildcvs.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class BuildCvsTest(oeRuntimeTest):
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2")
self.project.download_archive()
+ @testcase(205)
@skipUnlessPassed("test_ssh")
def test_cvs(self):
self.assertEqual(self.project.run_configure(), 0,
diff --git a/meta/lib/oeqa/runtime/buildiptables.py b/meta/lib/oeqa/runtime/buildiptables.py
index f6061a7f98..09e252df8c 100644
--- a/meta/lib/oeqa/runtime/buildiptables.py
+++ b/meta/lib/oeqa/runtime/buildiptables.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class BuildIptablesTest(oeRuntimeTest):
"http://netfilter.org/projects/iptables/files/iptables-1.4.13.tar.bz2")
self.project.download_archive()
+ @testcase(206)
@skipUnlessPassed("test_ssh")
def test_iptables(self):
self.assertEqual(self.project.run_configure(), 0,
diff --git a/meta/lib/oeqa/runtime/buildsudoku.py b/meta/lib/oeqa/runtime/buildsudoku.py
index a754f1d9ea..802b060010 100644
--- a/meta/lib/oeqa/runtime/buildsudoku.py
+++ b/meta/lib/oeqa/runtime/buildsudoku.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class SudokuTest(oeRuntimeTest):
"http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
self.project.download_archive()
+ @testcase(207)
@skipUnlessPassed("test_ssh")
def test_sudoku(self):
self.assertEqual(self.project.run_configure(), 0,
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
index c03688206f..cc537f7766 100644
--- a/meta/lib/oeqa/runtime/connman.py
+++ b/meta/lib/oeqa/runtime/connman.py
@@ -21,7 +21,7 @@ class ConnmanTest(oeRuntimeTest):
(status, output) = self.target.run('/usr/sbin/connmand --help')
self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
-
+ @testcase(221)
@skipUnlessPassed('test_connmand_help')
def test_connmand_running(self):
(status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index a208e29ada..97e8ee42ad 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -4,6 +4,7 @@ import re
class DateTest(oeRuntimeTest):
+ @testcase(211)
@skipUnlessPassed("test_ssh")
def test_date(self):
(status, output) = self.target.run('date +"%Y-%m-%d %T"')
diff --git a/meta/lib/oeqa/runtime/df.py b/meta/lib/oeqa/runtime/df.py
index b6da35027c..09569d5ff6 100644
--- a/meta/lib/oeqa/runtime/df.py
+++ b/meta/lib/oeqa/runtime/df.py
@@ -5,6 +5,7 @@ from oeqa.utils.decorators import *
class DfTest(oeRuntimeTest):
+ @testcase(234)
@skipUnlessPassed("test_ssh")
def test_df(self):
(status,output) = self.target.run("df / | sed -n '2p' | awk '{print $4}'")
diff --git a/meta/lib/oeqa/runtime/dmesg.py b/meta/lib/oeqa/runtime/dmesg.py
index 64247ea704..5831471e50 100644
--- a/meta/lib/oeqa/runtime/dmesg.py
+++ b/meta/lib/oeqa/runtime/dmesg.py
@@ -5,7 +5,8 @@ from oeqa.utils.decorators import *
class DmesgTest(oeRuntimeTest):
+ @testcase(215)
@skipUnlessPassed('test_ssh')
def test_dmesg(self):
- (status, output) = self.target.run('dmesg | grep -v mmci-pl18x | grep -v "error changing net interface name" | grep -iv "dma timeout" | grep -i error')
+ (status, output) = self.target.run('dmesg | grep -v mmci-pl18x | grep -v "error changing net interface name" | grep -iv "dma timeout" | grep -v usbhid | grep -i error')
self.assertEqual(status, 1, msg = "Error messages in dmesg log: %s" % output)
diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/runtime/files/test.cpp
new file mode 100644
index 0000000000..9e1a76473d
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/test.cpp
@@ -0,0 +1,3 @@
+#include <limits>
+
+int main() {} \ No newline at end of file
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index b63badd3e4..a7f62e1758 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -14,19 +14,29 @@ class GccCompileTest(oeRuntimeTest):
def setUpClass(self):
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c")
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
+ oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.cpp"), "/tmp/test.cpp")
+ @testcase(203)
def test_gcc_compile(self):
(status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output)
(status, output) = self.target.run('/tmp/test')
self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
+ @testcase(200)
def test_gpp_compile(self):
(status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
(status, output) = self.target.run('/tmp/test')
self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
+ def test_gpp2_compile(self):
+ (status, output) = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
+ self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
+ (status, output) = self.target.run('/tmp/test')
+ self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
+
+ @testcase(204)
def test_make(self):
(status, output) = self.target.run('cd /tmp; make -f testmakefile')
self.assertEqual(status, 0, msg="running make failed, output %s" % output)
diff --git a/meta/lib/oeqa/runtime/kernelmodule.py b/meta/lib/oeqa/runtime/kernelmodule.py
index cbc5742eff..2e81720327 100644
--- a/meta/lib/oeqa/runtime/kernelmodule.py
+++ b/meta/lib/oeqa/runtime/kernelmodule.py
@@ -14,6 +14,7 @@ class KernelModuleTest(oeRuntimeTest):
self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod.c"), "/tmp/hellomod.c")
self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod_makefile"), "/tmp/Makefile")
+ @testcase('316')
@skipUnlessPassed('test_ssh')
@skipUnlessPassed('test_gcc_compile')
def test_kernel_module(self):
diff --git a/meta/lib/oeqa/runtime/ldd.py b/meta/lib/oeqa/runtime/ldd.py
index 4374530fc4..bce56c4270 100644
--- a/meta/lib/oeqa/runtime/ldd.py
+++ b/meta/lib/oeqa/runtime/ldd.py
@@ -1,5 +1,5 @@
import unittest
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -13,6 +13,7 @@ class LddTest(oeRuntimeTest):
(status, output) = self.target.run('which ldd')
self.assertEqual(status, 0, msg = "ldd does not exist in PATH: which ldd: %s" % output)
+ @testcase(239)
@skipUnlessPassed('test_ldd_exists')
def test_ldd_rtldlist_check(self):
(status, output) = self.target.run('for i in $(which ldd | xargs cat | grep "^RTLDLIST"|cut -d\'=\' -f2|tr -d \'"\'); do test -f $i && echo $i && break; done')
diff --git a/meta/lib/oeqa/runtime/logrotate.py b/meta/lib/oeqa/runtime/logrotate.py
index 80489a3267..86d791c300 100644
--- a/meta/lib/oeqa/runtime/logrotate.py
+++ b/meta/lib/oeqa/runtime/logrotate.py
@@ -19,6 +19,7 @@ class LogrotateTest(oeRuntimeTest):
(status, output) = self.target.run("sed -i 's#wtmp {#wtmp {\\n olddir /home/root/logrotate_dir#' /etc/logrotate.conf")
self.assertEqual(status, 0, msg = "Could not write to logrotate.conf file. Status and output: %s and %s)" % (status, output))
+ @testcase(289)
@skipUnlessPassed("test_1_logrotate_setup")
def test_2_logrotate(self):
(status, output) = self.target.run('logrotate -f /etc/logrotate.conf')
diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
index 13a3b54b18..ab0a6ccd69 100644
--- a/meta/lib/oeqa/runtime/multilib.py
+++ b/meta/lib/oeqa/runtime/multilib.py
@@ -10,6 +10,7 @@ def setUpModule():
class MultilibTest(oeRuntimeTest):
+ @testcase('279')
@skipUnlessPassed('test_ssh')
def test_file_connman(self):
self.assertTrue(oeRuntimeTest.hasPackage('connman-gnome'), msg="This test assumes connman-gnome is installed")
diff --git a/meta/lib/oeqa/runtime/pam.py b/meta/lib/oeqa/runtime/pam.py
index 52e1eb88e6..c8205c9abc 100644
--- a/meta/lib/oeqa/runtime/pam.py
+++ b/meta/lib/oeqa/runtime/pam.py
@@ -2,7 +2,7 @@
# Note that the image under test must have "pam" in DISTRO_FEATURES
import unittest
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -12,13 +12,14 @@ def setUpModule():
class PamBasicTest(oeRuntimeTest):
+ @testcase(287)
@skipUnlessPassed('test_ssh')
def test_pam(self):
(status, output) = self.target.run('login --help')
self.assertEqual(status, 1, msg = "login command does not work as expected. Status and output:%s and %s" %(status, output))
(status, output) = self.target.run('passwd --help')
- self.assertEqual(status, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
+ self.assertEqual(status, 0, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
(status, output) = self.target.run('su --help')
- self.assertEqual(status, 2, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
+ self.assertEqual(status, 0, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
(status, output) = self.target.run('useradd --help')
- self.assertEqual(status, 2, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))
+ self.assertEqual(status, 0, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))
diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py
new file mode 100644
index 0000000000..2953742f23
--- /dev/null
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -0,0 +1,202 @@
+import os
+import unittest
+from oeqa.oetest import oeRuntimeTest
+from oeqa.utils.decorators import *
+
+#in the future these lists could be moved outside of module
+errors = ["error", "cannot", "can\'t", "failed"]
+
+common_errors = [
+ "(WW) warning, (EE) error, (NI) not implemented, (??) unknown.",
+ "dma timeout",
+ "can\'t add hid device:",
+ "usbhid: probe of ",
+ "_OSC failed (AE_ERROR)",
+ "_OSC failed (AE_SUPPORT)",
+ "AE_ALREADY_EXISTS"
+ "ACPI _OSC request failed (AE_SUPPORT)"
+ "can\'t disable ASPM",
+ "Failed to load module \"vesa\"",
+ "Failed to load module vesa",
+ "Failed to load module \"modesetting\"",
+ "Failed to load module modesetting",
+ "Failed to load module \"glx\"",
+ "Failed to load module glx",
+ "[drm] Cannot find any crtc or sizes - going 1024x768"
+ ]
+
+x86_common = [
+ '[drm:psb_do_init] *ERROR* Debug is',
+ 'wrong ELF class',
+ 'Could not enable PowerButton event',
+ 'probe of LNXPWRBN:00 failed with error -22',
+] + common_errors
+
+qemux86_common = [
+ 'Fast TSC calibration',
+ '_OSC failed (AE_NOT_FOUND); disabling ASPM',
+ 'Open ACPI failed (/var/run/acpid.socket) (No such file or directory)',
+ 'wrong ELF class',
+] + common_errors
+
+ignore_errors = {
+ 'default' : common_errors,
+ 'qemux86' : [
+ 'Failed to access perfctr msr (MSR c1 is 0)',
+ "fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.",
+ ] + qemux86_common,
+ 'qemux86-64' : qemux86_common,
+ 'qemumips' : [
+ 'Failed to load module "glx"',
+ ] + common_errors,
+ 'qemuppc' : [
+ 'PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]',
+ 'host side 80-wire cable detection failed, limiting max speed',
+ 'mode "640x480" test failed',
+ 'Failed to load module "glx"',
+ ] + common_errors,
+ 'qemuarm' : [
+ 'mmci-pl18x: probe of fpga:05 failed with error -22',
+ 'mmci-pl18x: probe of fpga:0b failed with error -22',
+ 'Failed to load module "glx"'
+ ] + common_errors,
+ 'emenlow' : x86_common,
+ 'crownbay' : x86_common,
+ 'genericx86' : x86_common,
+ 'genericx86-64' : x86_common,
+ 'edgerouter' : [
+ 'Fatal server error:',
+ ] + common_errors,
+ 'minnow' : [
+ 'netlink init failed',
+ 'NETLINK INITIALIZATION FAILED',
+ ] + common_errors,
+ 'jasperforest' : [
+ 'Activated service \'org.bluez\' failed:',
+ 'Unable to find NFC netlink family',
+ 'netlink init failed',
+ 'NETLINK INITIALIZATION FAILED',
+ ] + common_errors,
+}
+
+log_locations = ["/var/log/","/var/log/dmesg", "/tmp/dmesg_output.log"]
+
+class ParseLogsTest(oeRuntimeTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.errors = errors
+ self.ignore_errors = ignore_errors
+ self.log_locations = log_locations
+ self.msg = ""
+
+ def getMachine(self):
+ (status, output) = self.target.run("uname -n")
+ return output
+
+ #get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases.
+ def getHardwareInfo(self):
+ hwi = ""
+ (status, cpu_name) = self.target.run("cat /proc/cpuinfo | grep \"model name\" | head -n1 | awk 'BEGIN{FS=\":\"}{print $2}'")
+ (status, cpu_physical_cores) = self.target.run("cat /proc/cpuinfo | grep \"cpu cores\" | head -n1 | awk {'print $4'}")
+ (status, cpu_logical_cores) = self.target.run("cat /proc/cpuinfo | grep \"processor\" | wc -l")
+ (status, cpu_arch) = self.target.run("uname -m")
+ hwi += "Machine information: \n"
+ hwi += "*******************************\n"
+ hwi += "Machine name: "+self.getMachine()+"\n"
+ hwi += "CPU: "+str(cpu_name)+"\n"
+ hwi += "Arch: "+str(cpu_arch)+"\n"
+ hwi += "Physical cores: "+str(cpu_physical_cores)+"\n"
+ hwi += "Logical cores: "+str(cpu_logical_cores)+"\n"
+ hwi += "*******************************\n"
+ return hwi
+
+ #go through the log locations provided and if it's a folder create a list with all the .log files in it, if it's a file just add
+ #it to that list
+ def getLogList(self, log_locations):
+ logs = []
+ for location in log_locations:
+ (status, output) = self.target.run("test -f "+str(location))
+ if (status == 0):
+ logs.append(str(location))
+ else:
+ (status, output) = self.target.run("test -d "+str(location))
+ if (status == 0):
+ (status, output) = self.target.run("find "+str(location)+"/*.log -maxdepth 1 -type f")
+ if (status == 0):
+ output = output.splitlines()
+ for logfile in output:
+ logs.append(os.path.join(location,str(logfile)))
+ return logs
+
+ #build the grep command to be used with filters and exclusions
+ def build_grepcmd(self, errors, ignore_errors, log):
+ grepcmd = "grep "
+ grepcmd +="-Ei \""
+ for error in errors:
+ grepcmd += error+"|"
+ grepcmd = grepcmd[:-1]
+ grepcmd += "\" "+str(log)+" | grep -Eiv \'"
+ try:
+ errorlist = ignore_errors[self.getMachine()]
+ except KeyError:
+ self.msg += "No ignore list found for this machine, using default\n"
+ errorlist = ignore_errors['default']
+ for ignore_error in errorlist:
+ ignore_error = ignore_error.replace("(", "\(")
+ ignore_error = ignore_error.replace(")", "\)")
+ ignore_error = ignore_error.replace("'", ".")
+ ignore_error = ignore_error.replace("?", "\?")
+ ignore_error = ignore_error.replace("[", "\[")
+ ignore_error = ignore_error.replace("]", "\]")
+ ignore_error = ignore_error.replace("*", "\*")
+ grepcmd += ignore_error+"|"
+ grepcmd = grepcmd[:-1]
+ grepcmd += "\'"
+ return grepcmd
+
+ #grep only the errors so that their context could be collected. Default context is 10 lines before and after the error itself
+ def parse_logs(self, errors, ignore_errors, logs, lines_before = 10, lines_after = 10):
+ results = {}
+ rez = []
+ for log in logs:
+ thegrep = self.build_grepcmd(errors, ignore_errors, log)
+ try:
+ (status, result) = self.target.run(thegrep)
+ except:
+ pass
+ if result:
+ results[log] = {}
+ rez = result.splitlines()
+ for xrez in rez:
+ command = "grep \"\\"+str(xrez)+"\" -B "+str(lines_before)+" -A "+str(lines_after)+" "+str(log)
+ try:
+ (status, yrez) = self.target.run(command)
+ except:
+ pass
+ results[log][xrez]=yrez
+ return results
+
+ #get the output of dmesg and write it in a file. This file is added to log_locations.
+ def write_dmesg(self):
+ (status, dmesg) = self.target.run("dmesg")
+ (status, dmesg2) = self.target.run("echo \""+str(dmesg)+"\" > /tmp/dmesg_output.log")
+
+ @skipUnlessPassed('test_ssh')
+ def test_parselogs(self):
+ self.write_dmesg()
+ log_list = self.getLogList(self.log_locations)
+ result = self.parse_logs(self.errors, self.ignore_errors, log_list)
+ print self.getHardwareInfo()
+ errcount = 0
+ for log in result:
+ self.msg += "Log: "+log+"\n"
+ self.msg += "-----------------------\n"
+ for error in result[log]:
+ errcount += 1
+ self.msg += "Central error: "+str(error)+"\n"
+ self.msg += "***********************\n"
+ self.msg += result[str(log)][str(error)]+"\n"
+ self.msg += "***********************\n"
+ self.msg += "%s errors found in logs." % errcount
+ self.assertEqual(errcount, 0, msg=self.msg)
diff --git a/meta/lib/oeqa/runtime/perl.py b/meta/lib/oeqa/runtime/perl.py
index c9bb684c11..65da028d4b 100644
--- a/meta/lib/oeqa/runtime/perl.py
+++ b/meta/lib/oeqa/runtime/perl.py
@@ -18,6 +18,7 @@ class PerlTest(oeRuntimeTest):
(status, output) = self.target.run('which perl')
self.assertEqual(status, 0, msg="Perl binary not in PATH or not on target.")
+ @testcase(208)
def test_perl_works(self):
(status, output) = self.target.run('perl /tmp/test.pl')
self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py
index c037ab2c18..0387b9a03e 100644
--- a/meta/lib/oeqa/runtime/python.py
+++ b/meta/lib/oeqa/runtime/python.py
@@ -18,6 +18,7 @@ class PythonTest(oeRuntimeTest):
(status, output) = self.target.run('which python')
self.assertEqual(status, 0, msg="Python binary not in PATH or not on target.")
+ @testcase(965)
def test_python_stdout(self):
(status, output) = self.target.run('python /tmp/test.py')
self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 084d22f96b..b17e8b46a8 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -18,6 +18,7 @@ class RpmBasicTest(oeRuntimeTest):
(status, output) = self.target.run('rpm --help')
self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
+ @testcase(191)
@skipUnlessPassed('test_rpm_help')
def test_rpm_query(self):
(status, output) = self.target.run('rpm -q rpm')
@@ -34,11 +35,13 @@ class RpmInstallRemoveTest(oeRuntimeTest):
testrpmfile = f
oeRuntimeTest.tc.target.copy_to(os.path.join(rpmdir,testrpmfile), "/tmp/rpm-doc.rpm")
+ @testcase(192)
@skipUnlessPassed('test_rpm_help')
def test_rpm_install(self):
(status, output) = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
self.assertEqual(status, 0, msg="Failed to install rpm-doc package: %s" % output)
+ @testcase(194)
@skipUnlessPassed('test_rpm_install')
def test_rpm_remove(self):
(status,output) = self.target.run('rpm -e rpm-doc')
diff --git a/meta/lib/oeqa/runtime/scanelf.py b/meta/lib/oeqa/runtime/scanelf.py
index b9abf24640..43a024ab9a 100644
--- a/meta/lib/oeqa/runtime/scanelf.py
+++ b/meta/lib/oeqa/runtime/scanelf.py
@@ -11,6 +11,7 @@ class ScanelfTest(oeRuntimeTest):
def setUp(self):
self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path'
+ @testcase(966)
@skipUnlessPassed('test_ssh')
def test_scanelf_textrel(self):
# print TEXTREL information
@@ -18,6 +19,7 @@ class ScanelfTest(oeRuntimeTest):
(status, output) = self.target.run(self.scancmd)
self.assertEqual(output.strip(), "", "\n".join([self.scancmd, output]))
+ @testcase(967)
@skipUnlessPassed('test_ssh')
def test_scanelf_rpath(self):
# print RPATH information
diff --git a/meta/lib/oeqa/runtime/scp.py b/meta/lib/oeqa/runtime/scp.py
index 03095bf966..48e87d2d0b 100644
--- a/meta/lib/oeqa/runtime/scp.py
+++ b/meta/lib/oeqa/runtime/scp.py
@@ -1,6 +1,6 @@
import os
from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import skipUnlessPassed
+from oeqa.utils.decorators import skipUnlessPassed, testcase
def setUpModule():
if not (oeRuntimeTest.hasPackage("dropbear") or oeRuntimeTest.hasPackage("openssh-sshd")):
@@ -8,6 +8,7 @@ def setUpModule():
class ScpTest(oeRuntimeTest):
+ @testcase(220)
@skipUnlessPassed('test_ssh')
def test_scp_file(self):
test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
diff --git a/meta/lib/oeqa/runtime/skeletoninit.py b/meta/lib/oeqa/runtime/skeletoninit.py
index 557e715a3e..7c7f402e5d 100644
--- a/meta/lib/oeqa/runtime/skeletoninit.py
+++ b/meta/lib/oeqa/runtime/skeletoninit.py
@@ -2,7 +2,7 @@
# Note that the image under test must have meta-skeleton layer in bblayers and IMAGE_INSTALL_append = " service" in local.conf
import unittest
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -20,6 +20,7 @@ class SkeletonBasicTest(oeRuntimeTest):
(status, output) = self.target.run('ls /usr/sbin/skeleton-test')
self.assertEqual(status, 0, msg = "skeleton-test not found. Output:\n%s" % output)
+ @testcase(284)
@skipUnlessPassed('test_skeleton_availability')
@unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
def test_skeleton_script(self):
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 195f1170c6..3b49314df7 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -1,6 +1,6 @@
import unittest
import re
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.httpserver import HTTPService
@@ -25,6 +25,7 @@ class SmartTest(oeRuntimeTest):
class SmartBasicTest(SmartTest):
+ @testcase(716)
@skipUnlessPassed('test_ssh')
def test_smart_help(self):
self.smart('--help')
@@ -32,15 +33,19 @@ class SmartBasicTest(SmartTest):
def test_smart_version(self):
self.smart('--version')
+ @testcase(721)
def test_smart_info(self):
self.smart('info python-smartpm')
+ @testcase(421)
def test_smart_query(self):
self.smart('query python-smartpm')
+ @testcase(720)
def test_smart_search(self):
self.smart('search python-smartpm')
+ @testcase(722)
def test_smart_stats(self):
self.smart('stats')
@@ -58,6 +63,7 @@ class SmartRepoTest(SmartTest):
def test_smart_channel(self):
self.smart('channel', 1)
+ @testcase(719)
def test_smart_channel_add(self):
image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True)
deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
@@ -76,6 +82,7 @@ class SmartRepoTest(SmartTest):
def test_smart_channel_show(self):
self.smart('channel --show')
+ @testcase(717)
def test_smart_channel_rpmsys(self):
self.smart('channel --show rpmsys')
self.smart('channel --disable rpmsys')
@@ -86,17 +93,20 @@ class SmartRepoTest(SmartTest):
self.smart('remove -y psplash-default')
self.smart('install -y psplash-default')
+ @testcase(728)
@skipUnlessPassed('test_smart_install')
def test_smart_install_dependency(self):
self.smart('remove -y psplash')
self.smart('install -y psplash-default')
+ @testcase(723)
@skipUnlessPassed('test_smart_channel_add')
def test_smart_install_from_disk(self):
self.smart('remove -y psplash-default')
self.smart('download psplash-default')
self.smart('install -y ./psplash-default*')
+ @testcase(725)
@skipUnlessPassed('test_smart_channel_add')
def test_smart_install_from_http(self):
output = self.smart('download --urls psplash-default')
@@ -105,6 +115,7 @@ class SmartRepoTest(SmartTest):
self.smart('remove -y psplash-default')
self.smart('install -y %s' % url.group(0))
+ @testcase(729)
@skipUnlessPassed('test_smart_install')
def test_smart_reinstall(self):
self.smart('reinstall -y psplash-default')
diff --git a/meta/lib/oeqa/runtime/ssh.py b/meta/lib/oeqa/runtime/ssh.py
index e64866019f..0e76d5d512 100644
--- a/meta/lib/oeqa/runtime/ssh.py
+++ b/meta/lib/oeqa/runtime/ssh.py
@@ -10,6 +10,7 @@ def setUpModule():
class SshTest(oeRuntimeTest):
+ @testcase(224)
@skipUnlessPassed('test_ping')
def test_ssh(self):
(status, output) = self.target.run('uname -a')
diff --git a/meta/lib/oeqa/runtime/syslog.py b/meta/lib/oeqa/runtime/syslog.py
index b95b36175a..7fa018e97f 100644
--- a/meta/lib/oeqa/runtime/syslog.py
+++ b/meta/lib/oeqa/runtime/syslog.py
@@ -13,6 +13,7 @@ class SyslogTest(oeRuntimeTest):
(status,output) = self.target.run('/sbin/syslogd --help')
self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
+ @testcase(201)
@skipUnlessPassed("test_syslog_help")
def test_syslog_running(self):
(status,output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [s]yslogd')
@@ -33,6 +34,7 @@ class SyslogTestConfig(oeRuntimeTest):
else:
(status,output) = self.target.run('systemctl restart syslog.service')
+ @testcase(202)
@skipUnlessPassed("test_syslog_restart")
@skipUnlessPassed("test_syslog_logger")
@unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
index 6de84f891b..1451698bb3 100644
--- a/meta/lib/oeqa/runtime/systemd.py
+++ b/meta/lib/oeqa/runtime/systemd.py
@@ -28,6 +28,7 @@ class SystemdBasicTests(SystemdTest):
def test_systemd_basic(self):
self.systemctl('--version')
+ @testcase(551)
@skipUnlessPassed('test_system_basic')
def test_systemd_list(self):
self.systemctl('list-unit-files')
@@ -51,6 +52,7 @@ class SystemdBasicTests(SystemdTest):
return (False, output)
time.sleep(10)
+ @testcase(550)
@skipUnlessPassed('test_systemd_basic')
def test_systemd_failed(self):
settled, output = self.settle()
@@ -69,6 +71,7 @@ class SystemdServiceTests(SystemdTest):
def test_systemd_status(self):
self.systemctl('status --full', 'avahi-daemon.service')
+ @testcase(695)
@skipUnlessPassed('test_systemd_status')
def test_systemd_stop_start(self):
self.systemctl('stop', 'avahi-daemon.service')
@@ -76,6 +79,7 @@ class SystemdServiceTests(SystemdTest):
self.systemctl('start','avahi-daemon.service')
self.systemctl('is-active', 'avahi-daemon.service', verbose=True)
+ @testcase(696)
@skipUnlessPassed('test_systemd_basic')
def test_systemd_disable_enable(self):
self.systemctl('disable', 'avahi-daemon.service')
diff --git a/meta/lib/oeqa/runtime/vnc.py b/meta/lib/oeqa/runtime/vnc.py
index 5ed10727bc..f31deff306 100644
--- a/meta/lib/oeqa/runtime/vnc.py
+++ b/meta/lib/oeqa/runtime/vnc.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModuleUnless
from oeqa.utils.decorators import *
import re
@@ -7,6 +7,7 @@ def setUpModule():
class VNCTest(oeRuntimeTest):
+ @testcase(213)
@skipUnlessPassed('test_ssh')
def test_vnc(self):
(status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log')
diff --git a/meta/lib/oeqa/runtime/x32lib.py b/meta/lib/oeqa/runtime/x32lib.py
index 6bad201b12..ce5e214035 100644
--- a/meta/lib/oeqa/runtime/x32lib.py
+++ b/meta/lib/oeqa/runtime/x32lib.py
@@ -10,6 +10,7 @@ def setUpModule():
class X32libTest(oeRuntimeTest):
+ @testcase(281)
@skipUnlessPassed("test_ssh")
def test_x32_file(self):
status1 = self.target.run("readelf -h /bin/ls | grep Class | grep ELF32")[0]
diff --git a/meta/lib/oeqa/runtime/xorg.py b/meta/lib/oeqa/runtime/xorg.py
index 12dccd8198..a07031e5c8 100644
--- a/meta/lib/oeqa/runtime/xorg.py
+++ b/meta/lib/oeqa/runtime/xorg.py
@@ -14,8 +14,4 @@ class XorgTest(oeRuntimeTest):
(status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -v xinit | grep [X]org')
self.assertEqual(status, 0, msg="Xorg does not appear to be running %s" % self.target.run(oeRuntimeTest.pscmd)[1])
- @skipUnlessPassed('test_ssh')
- def test_xorg_error(self):
- (status, output) = self.target.run('cat /var/log/Xorg.0.log | grep -v "(EE) error," | grep -v "PreInit" | grep -v "evdev:" | grep -v "glx" | grep "(EE)"')
- self.assertEqual(status, 1, msg="Errors in Xorg log: %s" % output)
diff --git a/meta/lib/oeqa/sdk/__init__.py b/meta/lib/oeqa/sdk/__init__.py
new file mode 100644
index 0000000000..4cf3fa76b6
--- /dev/null
+++ b/meta/lib/oeqa/sdk/__init__.py
@@ -0,0 +1,3 @@
+# Enable other layers to have tests in the same named directory
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/sdk/buildcvs.py b/meta/lib/oeqa/sdk/buildcvs.py
new file mode 100644
index 0000000000..c7146fa4af
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildcvs.py
@@ -0,0 +1,25 @@
+from oeqa.oetest import oeSDKTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import SDKBuildProject
+
+class BuildCvsTest(oeSDKTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/cvs/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
+ "http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2")
+ self.project.download_archive()
+
+ def test_cvs(self):
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+
+ self.assertEqual(self.project.run_install(), 0,
+ msg="Running make install failed")
+
+ @classmethod
+ def tearDownClass(self):
+ self.project.clean()
diff --git a/meta/lib/oeqa/sdk/buildiptables.py b/meta/lib/oeqa/sdk/buildiptables.py
new file mode 100644
index 0000000000..062e5316e7
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildiptables.py
@@ -0,0 +1,26 @@
+from oeqa.oetest import oeSDKTest
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import SDKBuildProject
+
+
+class BuildIptablesTest(oeSDKTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/iptables/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
+ "http://netfilter.org/projects/iptables/files/iptables-1.4.13.tar.bz2")
+ self.project.download_archive()
+
+ def test_iptables(self):
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+
+ self.assertEqual(self.project.run_install(), 0,
+ msg="Running make install failed")
+
+ @classmethod
+ def tearDownClass(self):
+ self.project.clean()
diff --git a/meta/lib/oeqa/sdk/buildsudoku.py b/meta/lib/oeqa/sdk/buildsudoku.py
new file mode 100644
index 0000000000..dea77c6599
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildsudoku.py
@@ -0,0 +1,26 @@
+from oeqa.oetest import oeSDKTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import SDKBuildProject
+
+def setUpModule():
+ if not oeSDKTest.hasPackage("gtk\+"):
+ skipModule("Image doesn't have gtk+ in manifest")
+
+class SudokuTest(oeSDKTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/sudoku/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
+ "http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
+ self.project.download_archive()
+
+ def test_sudoku(self):
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+
+ @classmethod
+ def tearDownClass(self):
+ self.project.clean()
diff --git a/meta/lib/oeqa/selftest/_toaster.py b/meta/lib/oeqa/selftest/_toaster.py
index 5a42e937bc..1cf28a0144 100644
--- a/meta/lib/oeqa/selftest/_toaster.py
+++ b/meta/lib/oeqa/selftest/_toaster.py
@@ -14,6 +14,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings")
import toastermain.settings
from django.db.models import Q
from orm.models import *
+from oeqa.utils.decorators import testcase
class ToasterSetup(oeSelfTest):
@@ -31,19 +32,22 @@ class ToasterSetup(oeSelfTest):
class Toaster_DB_Tests(ToasterSetup):
# Check if build name is unique - tc_id=795
- def test_Build_Unique_Name_TC795(self):
+ @testcase(795)
+ def test_Build_Unique_Name(self):
all_builds = Build.objects.all().count()
distinct_builds = Build.objects.values('id').distinct().count()
self.assertEqual(distinct_builds, all_builds, msg = 'Build name is not unique')
# Check if build coocker log path is unique - tc_id=819
- def test_Build_Unique_Cooker_Log_Path_TC819(self):
+ @testcase(819)
+ def test_Build_Unique_Cooker_Log_Path(self):
distinct_path = Build.objects.values('cooker_log_path').distinct().count()
total_builds = Build.objects.values('id').count()
self.assertEqual(distinct_path, total_builds, msg = 'Build coocker log path is not unique')
# Check if the number of errors matches the number of orm_logmessage.level entries with value 2 - tc_id=820
- def test_Build_Errors_No_TC820(self):
+ @testcase(820)
+ def test_Build_Errors_No(self):
builds = Build.objects.values('id', 'errors_no')
cnt_err = []
for build in builds:
@@ -53,7 +57,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check if the number of warnings matches the number of orm_logmessage.level entries with value 1 - tc=821
- def test_Build_Warnings_No_TC821(self):
+ @testcase(821)
+ def test_Build_Warnings_No(self):
builds = Build.objects.values('id', 'warnings_no')
cnt_err = []
for build in builds:
@@ -63,7 +68,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check if the build succeeded then the errors_no is 0 - tc_id=822
- def test_Build_Suceeded_Errors_No_TC822(self):
+ @testcase(822)
+ def test_Build_Suceeded_Errors_No(self):
builds = Build.objects.filter(outcome = 0).values('id', 'errors_no')
cnt_err = []
for build in builds:
@@ -71,8 +77,9 @@ class Toaster_DB_Tests(ToasterSetup):
cnt_err.append(build['id'])
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
- # Check if task order is unique for one build - tc=824
- def test_Task_Unique_Order_TC824(self):
+ # Check if task order is unique for one build - tc=824
+ @testcase(824)
+ def test_Task_Unique_Order(self):
builds = Build.objects.values('id')
cnt_err = []
for build in builds:
@@ -83,7 +90,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check task order sequence for one build - tc=825
- def test_Task_Order_Sequence_TC825(self):
+ @testcase(825)
+ def test_Task_Order_Sequence(self):
builds = builds = Build.objects.values('id')
cnt_err = []
for build in builds:
@@ -100,7 +108,8 @@ class Toaster_DB_Tests(ToasterSetup):
#def test_Task_Disk_IO_TC828(self):
# Check if outcome = 2 (SSTATE) then sstate_result must be 3 (RESTORED) - tc=832
- def test_Task_If_Outcome_2_Sstate_Result_Must_Be_3_TC832(self):
+ @testcase(832)
+ def test_Task_If_Outcome_2_Sstate_Result_Must_Be_3(self):
tasks = Task.objects.filter(outcome = 2).values('id', 'sstate_result')
cnt_err = []
for task in tasks:
@@ -109,7 +118,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if outcome = 1 (COVERED) or 3 (EXISTING) then sstate_result must be 0 (SSTATE_NA) - tc=833
- def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0_TC833(self):
+ @testcase(833)
+ def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0(self):
tasks = Task.objects.filter(outcome__in = (1, 3)).values('id', 'sstate_result')
cnt_err = []
for task in tasks:
@@ -118,7 +128,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if outcome is 0 (SUCCESS) or 4 (FAILED) then sstate_result must be 0 (NA), 1 (MISS) or 2 (FAILED) - tc=834
- def test_Task_If_Outcome_0_4_Sstate_Result_Must_Be_0_1_2_TC834(self):
+ @testcase(834)
+ def test_Task_If_Outcome_0_4_Sstate_Result_Must_Be_0_1_2(self):
tasks = Task.objects.filter(outcome__in = (0, 4)).values('id', 'sstate_result')
cnt_err = []
for task in tasks:
@@ -127,7 +138,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if task_executed = TRUE (1), script_type must be 0 (CODING_NA), 2 (CODING_PYTHON), 3 (CODING_SHELL) - tc=891
- def test_Task_If_Task_Executed_True_Script_Type_0_2_3_TC891(self):
+ @testcase(891)
+ def test_Task_If_Task_Executed_True_Script_Type_0_2_3(self):
tasks = Task.objects.filter(task_executed = 1).values('id', 'script_type')
cnt_err = []
for task in tasks:
@@ -136,7 +148,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if task_executed = TRUE (1), outcome must be 0 (SUCCESS) or 4 (FAILED) - tc=836
- def test_Task_If_Task_Executed_True_Outcome_0_4_TC836(self):
+ @testcase(836)
+ def test_Task_If_Task_Executed_True_Outcome_0_4(self):
tasks = Task.objects.filter(task_executed = 1).values('id', 'outcome')
cnt_err = []
for task in tasks:
@@ -145,7 +158,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if task_executed = FALSE (0), script_type must be 0 - tc=890
- def test_Task_If_Task_Executed_False_Script_Type_0_TC890(self):
+ @testcase(890)
+ def test_Task_If_Task_Executed_False_Script_Type_0(self):
tasks = Task.objects.filter(task_executed = 0).values('id', 'script_type')
cnt_err = []
for task in tasks:
@@ -154,7 +168,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Check if task_executed = FALSE (0) and build outcome = SUCCEEDED (0), task outcome must be 1 (COVERED), 2 (CACHED), 3 (PREBUILT), 5 (EMPTY) - tc=837
- def test_Task_If_Task_Executed_False_Outcome_1_2_3_5_TC837(self):
+ @testcase(837)
+ def test_Task_If_Task_Executed_False_Outcome_1_2_3_5(self):
builds = Build.objects.filter(outcome = 0).values('id')
cnt_err = []
for build in builds:
@@ -165,7 +180,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Key verification - tc=888
- def test_Target_Installed_Package_TC888(self):
+ @testcase(888)
+ def test_Target_Installed_Package(self):
rows = Target_Installed_Package.objects.values('id', 'target_id', 'package_id')
cnt_err = []
for row in rows:
@@ -176,7 +192,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for target installed package id: %s' % cnt_err)
# Key verification - tc=889
- def test_Task_Dependency_TC889(self):
+ @testcase(889)
+ def test_Task_Dependency(self):
rows = Task_Dependency.objects.values('id', 'task_id', 'depends_on_id')
cnt_err = []
for row in rows:
@@ -188,6 +205,7 @@ class Toaster_DB_Tests(ToasterSetup):
# Check if build target file_name is populated only if is_image=true AND orm_build.outcome=0 then if the file exists and its size matches the file_size value
### Need to add the tc in the test run
+ @testcase(1037)
def test_Target_File_Name_Populated(self):
builds = Build.objects.filter(outcome = 0).values('id')
for build in builds:
@@ -210,7 +228,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for target image file id: %s' % cnt_err)
# Key verification - tc=884
- def test_Package_Dependency_TC884(self):
+ @testcase(884)
+ def test_Package_Dependency(self):
cnt_err = []
deps = Package_Dependency.objects.values('id', 'package_id', 'depends_on_id')
for dep in deps:
@@ -219,7 +238,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package dependency id: %s' % cnt_err)
# Check if recipe name does not start with a number (0-9) - tc=838
- def test_Recipe_Name_TC838(self):
+ @testcase(838)
+ def test_Recipe_Name(self):
recipes = Recipe.objects.values('id', 'name')
cnt_err = []
for recipe in recipes:
@@ -228,7 +248,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe section matches the content of the SECTION variable (if set) in file_path - tc=839
- def test_Recipe_DB_Section_Match_Recipe_File_Section_TC839(self):
+ @testcase(839)
+ def test_Recipe_DB_Section_Match_Recipe_File_Section(self):
recipes = Recipe.objects.values('id', 'section', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -245,7 +266,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe license matches the content of the LICENSE variable (if set) in file_path - tc=840
- def test_Recipe_DB_License_Match_Recipe_File_License_TC840(self):
+ @testcase(840)
+ def test_Recipe_DB_License_Match_Recipe_File_License(self):
recipes = Recipe.objects.values('id', 'license', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -262,7 +284,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe homepage matches the content of the HOMEPAGE variable (if set) in file_path - tc=841
- def test_Recipe_DB_Homepage_Match_Recipe_File_Homepage_TC841(self):
+ @testcase(841)
+ def test_Recipe_DB_Homepage_Match_Recipe_File_Homepage(self):
recipes = Recipe.objects.values('id', 'homepage', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -279,7 +302,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe bugtracker matches the content of the BUGTRACKER variable (if set) in file_path - tc=842
- def test_Recipe_DB_Bugtracker_Match_Recipe_File_Bugtracker_TC842(self):
+ @testcase(842)
+ def test_Recipe_DB_Bugtracker_Match_Recipe_File_Bugtracker(self):
recipes = Recipe.objects.values('id', 'bugtracker', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -296,7 +320,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Recipe key verification, recipe name does not depends on a recipe having the same name - tc=883
- def test_Recipe_Dependency_TC883(self):
+ @testcase(883)
+ def test_Recipe_Dependency(self):
deps = Recipe_Dependency.objects.values('id', 'recipe_id', 'depends_on_id')
cnt_err = []
for dep in deps:
@@ -310,7 +335,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe dependency id: %s' % cnt_err)
# Check if package name does not start with a number (0-9) - tc=846
- def test_Package_Name_For_Number_TC846(self):
+ @testcase(846)
+ def test_Package_Name_For_Number(self):
packages = Package.objects.filter(~Q(size = -1)).values('id', 'name')
cnt_err = []
for package in packages:
@@ -319,7 +345,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
# Check if package version starts with a number (0-9) - tc=847
- def test_Package_Version_Starts_With_Number_TC847(self):
+ @testcase(847)
+ def test_Package_Version_Starts_With_Number(self):
packages = Package.objects.filter(~Q(size = -1)).values('id', 'version')
cnt_err = []
for package in packages:
@@ -328,7 +355,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
# Check if package revision starts with 'r' - tc=848
- def test_Package_Revision_Starts_With_r_TC848(self):
+ @testcase(848)
+ def test_Package_Revision_Starts_With_r(self):
packages = Package.objects.filter(~Q(size = -1)).values('id', 'revision')
cnt_err = []
for package in packages:
@@ -338,6 +366,7 @@ class Toaster_DB_Tests(ToasterSetup):
# Check the validity of the package build_id
### TC must be added in test run
+ @testcase(1038)
def test_Package_Build_Id(self):
packages = Package.objects.filter(~Q(size = -1)).values('id', 'build_id')
cnt_err = []
@@ -349,6 +378,7 @@ class Toaster_DB_Tests(ToasterSetup):
# Check the validity of package recipe_id
### TC must be added in test run
+ @testcase(1039)
def test_Package_Recipe_Id(self):
packages = Package.objects.filter(~Q(size = -1)).values('id', 'recipe_id')
cnt_err = []
@@ -360,6 +390,7 @@ class Toaster_DB_Tests(ToasterSetup):
# Check if package installed_size field is not null
### TC must be aded in test run
+ @testcase(1040)
def test_Package_Installed_Size_Not_NULL(self):
packages = Package.objects.filter(installed_size__isnull = True).values('id')
cnt_err = []
@@ -368,7 +399,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
# Check if all layers requests return exit code is 200 - tc=843
- def test_Layers_Requests_Exit_Code_TC843(self):
+ @testcase(843)
+ def test_Layers_Requests_Exit_Code(self):
layers = Layer.objects.values('id', 'layer_index_url')
cnt_err = []
for layer in layers:
@@ -378,7 +410,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for layer id: %s' % cnt_err)
# Check if the output of bitbake-layers show_layers matches the info from database - tc=895
- def test_Layers_Show_Layers_TC895(self):
+ @testcase(895)
+ def test_Layers_Show_Layers(self):
layers = Layer.objects.values('id', 'name', 'local_path')
cmd = commands.getoutput('bitbake-layers show_layers')
cnt_err = []
@@ -388,7 +421,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for layer id: %s' % cnt_err)
# Check if django server starts regardless of the timezone set on the machine - tc=905
- def test_Start_Django_Timezone_TC905(self):
+ @testcase(905)
+ def test_Start_Django_Timezone(self):
current_path = os.getcwd()
zonefilelist = []
ZONEINFOPATH = '/usr/share/zoneinfo/'
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index d730bfd755..5708d3dc9b 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -7,28 +7,33 @@ import shutil
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
class BitbakeTests(oeSelfTest):
+ @testcase(789)
def test_run_bitbake_from_dir_1(self):
os.chdir(os.path.join(self.builddir, 'conf'))
bitbake('-e')
+ @testcase(790)
def test_run_bitbake_from_dir_2(self):
my_env = os.environ.copy()
my_env['BBPATH'] = my_env['BUILDDIR']
os.chdir(os.path.dirname(os.environ['BUILDDIR']))
bitbake('-e', env=my_env)
+ @testcase(806)
def test_event_handler(self):
self.write_config("INHERIT += \"test_events\"")
result = bitbake('m4-native')
- find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Preparing runqueue", result.output)
+ find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Preparing RunQueue", result.output)
find_build_completed = re.search("Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output)
self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
self.assertFalse('Test for bb.event.InvalidEvent' in result.output)
+ @testcase(103)
def test_local_sstate(self):
bitbake('m4-native -ccleansstate')
bitbake('m4-native')
@@ -37,14 +42,17 @@ class BitbakeTests(oeSelfTest):
find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
self.assertTrue(find_setscene)
+ @testcase(105)
def test_bitbake_invalid_recipe(self):
result = bitbake('-b asdf', ignore_status=True)
self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output)
+ @testcase(107)
def test_bitbake_invalid_target(self):
result = bitbake('asdf', ignore_status=True)
self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output)
+ @testcase(106)
def test_warnings_errors(self):
result = bitbake('-b asdf', ignore_status=True)
find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output)
@@ -52,6 +60,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
+ @testcase(108)
def test_invalid_patch(self):
self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
result = bitbake('man -c patch', ignore_status=True)
@@ -59,14 +68,17 @@ class BitbakeTests(oeSelfTest):
bitbake('-cclean man')
self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output)
+ @testcase(163)
def test_force_task(self):
bitbake('m4-native')
+ self.add_command_to_tearDown('bitbake -c clean m4-native')
result = bitbake('-C compile m4-native')
look_for_tasks = ['do_compile', 'do_install', 'do_populate_sysroot']
for task in look_for_tasks:
find_task = re.search("m4-native.*%s" % task, result.output)
self.assertTrue(find_task)
+ @testcase(167)
def test_bitbake_g(self):
result = bitbake('-g core-image-full-cmdline')
self.assertTrue('NOTE: PN build list saved to \'pn-buildlist\'' in result.output)
@@ -74,6 +86,7 @@ class BitbakeTests(oeSelfTest):
for f in ['pn-buildlist', 'pn-depends.dot', 'package-depends.dot', 'task-depends.dot']:
os.remove(f)
+ @testcase(899)
def test_image_manifest(self):
bitbake('core-image-minimal')
deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
@@ -81,6 +94,7 @@ class BitbakeTests(oeSelfTest):
manifest = os.path.join(deploydir, imagename + ".manifest")
self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image")
+ @testcase(168)
def test_invalid_recipe_src_uri(self):
data = 'SRC_URI = "file://invalid"'
self.write_recipeinc('man', data)
@@ -89,9 +103,10 @@ class BitbakeTests(oeSelfTest):
bitbake('-ccleanall man')
self.delete_recipeinc('man')
self.assertEqual(result.status, 1, msg='Command succeded when it should have failed')
- self.assertTrue('ERROR: Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
+ self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output)
+ @testcase(171)
def test_rename_downloaded_file(self):
data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
self.write_recipeinc('aspell', data)
@@ -103,25 +118,30 @@ class BitbakeTests(oeSelfTest):
self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')))
bitbake('-ccleanall aspell')
+ @testcase(1028)
def test_environment(self):
self.append_config("TEST_ENV=\"localconf\"")
result = runCmd('bitbake -e | grep TEST_ENV=')
self.assertTrue('localconf' in result.output)
self.remove_config("TEST_ENV=\"localconf\"")
+ @testcase(1029)
def test_dry_run(self):
result = runCmd('bitbake -n m4-native')
self.assertEqual(0, result.status)
+ @testcase(1030)
def test_just_parse(self):
result = runCmd('bitbake -p')
self.assertEqual(0, result.status)
+ @testcase(1031)
def test_version(self):
result = runCmd('bitbake -s | grep wget')
find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output)
self.assertTrue(find)
+ @testcase(1032)
def test_prefile(self):
preconf = os.path.join(self.builddir, 'conf/prefile.conf')
self.track_for_cleanup(preconf)
@@ -133,6 +153,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue('localconf' in result.output)
self.remove_config("TEST_PREFILE=\"localconf\"")
+ @testcase(1033)
def test_postfile(self):
postconf = os.path.join(self.builddir, 'conf/postfile.conf')
self.track_for_cleanup(postconf)
@@ -142,10 +163,12 @@ class BitbakeTests(oeSelfTest):
self.assertTrue('postfile' in result.output)
self.remove_config("TEST_POSTFILE=\"localconf\"")
+ @testcase(1034)
def test_checkuri(self):
result = runCmd('bitbake -c checkuri m4')
self.assertEqual(0, result.status)
+ @testcase(1035)
def test_continue(self):
self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
runCmd('bitbake -c cleanall man xcursor-transparent-theme')
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 27fc452e72..926ffe9993 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -7,21 +7,30 @@ from oeqa.selftest.base import oeSelfTest
from oeqa.selftest.buildhistory import BuildhistoryBase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
import oeqa.utils.ftools as ftools
+from oeqa.utils.decorators import testcase
class ImageOptionsTests(oeSelfTest):
+ @testcase(761)
def test_incremental_image_generation(self):
+ image_pkgtype = get_bb_var("IMAGE_PKGTYPE")
+ if image_pkgtype != 'rpm':
+ self.skipTest('Not using RPM as main package format')
bitbake("-c cleanall core-image-minimal")
self.write_config('INC_RPM_IMAGE_GEN = "1"')
self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
bitbake("core-image-minimal")
- res = runCmd("grep 'Installing openssh-sshd' %s" % (os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")), ignore_status=True)
+ log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
+ log_data_created = ftools.read_file(log_data_file)
+ incremental_created = re.search("NOTE: load old install solution for incremental install\nNOTE: old install solution not exist\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: Installing the following packages:.*packagegroup-core-ssh-openssh", log_data_created)
self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
- self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs")
+ self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
bitbake("core-image-minimal")
- res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True)
- self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image")
+ log_data_removed = ftools.read_file(log_data_file)
+ incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
+ self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
+ @testcase(925)
def test_rm_old_image(self):
bitbake("core-image-minimal")
deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
@@ -37,6 +46,7 @@ class ImageOptionsTests(oeSelfTest):
remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
self.assertFalse(remaining_not_expected, msg="\nThe following image files ware not removed: %s" % ', '.join(map(str, remaining_not_expected)))
+ @testcase(286)
def test_ccache_tool(self):
bitbake("ccache-native")
self.assertTrue(os.path.isfile(os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', 'ccache-native'), "ccache")))
@@ -50,6 +60,7 @@ class ImageOptionsTests(oeSelfTest):
class DiskMonTest(oeSelfTest):
+ @testcase(277)
def test_stoptask_behavior(self):
self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
res = bitbake("m4", ignore_status = True)
@@ -65,6 +76,7 @@ class DiskMonTest(oeSelfTest):
class SanityOptionsTest(oeSelfTest):
+ @testcase(927)
def test_options_warnqa_errorqa_switch(self):
bitbake("xcursor-transparent-theme -ccleansstate")
@@ -74,16 +86,17 @@ class SanityOptionsTest(oeSelfTest):
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
res = bitbake("xcursor-transparent-theme", ignore_status=True)
self.delete_recipeinc('xcursor-transparent-theme')
- self.assertTrue("ERROR: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output)
+ self.assertTrue("ERROR: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
self.assertEqual(res.status, 1)
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
self.append_config('ERROR_QA_remove = "packages-list"')
self.append_config('WARN_QA_append = " packages-list"')
- res = bitbake("xcursor-transparent-theme")
bitbake("xcursor-transparent-theme -ccleansstate")
+ res = bitbake("xcursor-transparent-theme")
self.delete_recipeinc('xcursor-transparent-theme')
- self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output)
+ self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
+ @testcase(278)
def test_sanity_userspace_dependency(self):
self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"')
bitbake("-ccleansstate gzip nfs-utils")
@@ -93,10 +106,12 @@ class SanityOptionsTest(oeSelfTest):
class BuildhistoryTests(BuildhistoryBase):
+ @testcase(293)
def test_buildhistory_basic(self):
self.run_buildhistory_operation('xcursor-transparent-theme')
self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')))
+ @testcase(294)
def test_buildhistory_buildtime_pr_backwards(self):
self.add_command_to_tearDown('cleanup-workdir')
target = 'xcursor-transparent-theme'
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
new file mode 100644
index 0000000000..74fb325803
--- /dev/null
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -0,0 +1,241 @@
+import unittest
+import os
+import logging
+import re
+import shutil
+import tempfile
+import glob
+
+import oeqa.utils.ftools as ftools
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
+
+class DevtoolTests(oeSelfTest):
+
+ def test_create_workspace(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ result = runCmd('bitbake-layers show-layers')
+ self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+ # Try creating a workspace layer with a specific path
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ result = runCmd('devtool create-workspace %s' % tempdir)
+ self.assertTrue(os.path.isfile(os.path.join(tempdir, 'conf', 'layer.conf')))
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn(tempdir, result.output)
+ # Try creating a workspace layer with the default path
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool create-workspace')
+ self.assertTrue(os.path.isfile(os.path.join(workspacedir, 'conf', 'layer.conf')))
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn(tempdir, result.output)
+ self.assertIn(workspacedir, result.output)
+
+ def test_recipetool_create(self):
+ # Try adding a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ tempsrc = os.path.join(tempdir, 'srctree')
+ os.makedirs(tempsrc)
+ recipefile = os.path.join(tempdir, 'logrotate_3.8.7.bb')
+ srcuri = 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.7.tar.gz'
+ result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = 'GPLv2'
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=18810669f13b87348459e611d31ab760'
+ checkvars['SRC_URI'] = 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz'
+ checkvars['SRC_URI[md5sum]'] = '99e08503ef24c3e2e3ff74cc5f3be213'
+ checkvars['SRC_URI[sha256sum]'] = 'f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64'
+ with open(recipefile, 'r') as f:
+ for line in f:
+ if '=' in line:
+ splitline = line.split('=', 1)
+ var = splitline[0].rstrip()
+ value = splitline[1].strip().strip('"')
+ if var in checkvars:
+ needvalue = checkvars.pop(var)
+ self.assertEqual(value, needvalue)
+ if line.startswith('inherit '):
+ inherits = line.split()[1:]
+
+ self.assertEqual(checkvars, {}, 'Some variables not found')
+
+ def test_recipetool_create_git(self):
+ # Ensure we have the right data in shlibs/pkgdata
+ bitbake('libpng pango libx11 libxext')
+ # Try adding a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ tempsrc = os.path.join(tempdir, 'srctree')
+ os.makedirs(tempsrc)
+ recipefile = os.path.join(tempdir, 'libmatchbox.bb')
+ srcuri = 'git://git.yoctoproject.org/libmatchbox'
+ result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc))
+ self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
+ checkvars = {}
+ checkvars['LICENSE'] = 'LGPLv2.1'
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34'
+ checkvars['S'] = '${WORKDIR}/git'
+ checkvars['PV'] = '1.0+git${SRCPV}'
+ checkvars['SRC_URI'] = srcuri
+ checkvars['DEPENDS'] = 'libpng pango libx11 libxext'
+ inherits = []
+ with open(recipefile, 'r') as f:
+ for line in f:
+ if '=' in line:
+ splitline = line.split('=', 1)
+ var = splitline[0].rstrip()
+ value = splitline[1].strip().strip('"')
+ if var in checkvars:
+ needvalue = checkvars.pop(var)
+ self.assertEqual(value, needvalue)
+ if line.startswith('inherit '):
+ inherits = line.split()[1:]
+
+ self.assertEqual(checkvars, {}, 'Some variables not found')
+
+ self.assertIn('autotools', inherits, 'Missing inherit of autotools')
+ self.assertIn('pkgconfig', inherits, 'Missing inherit of pkgconfig')
+
+ def test_devtool_add(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Fetch source
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2'
+ result = runCmd('wget %s' % url, cwd=tempdir)
+ result = runCmd('tar xfv pv-1.5.3.tar.bz2', cwd=tempdir)
+ srcdir = os.path.join(tempdir, 'pv-1.5.3')
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
+ # Test devtool add
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake -c cleansstate pv')
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool add pv %s' % srcdir)
+ self.assertTrue(os.path.exists(os.path.join(workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn('pv', result.output)
+ self.assertIn(srcdir, result.output)
+ # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
+ bitbake('pv -c cleansstate')
+ # Test devtool build
+ result = runCmd('devtool build pv')
+ installdir = get_bb_var('D', 'pv')
+ self.assertTrue(installdir, 'Could not query installdir variable')
+ bindir = get_bb_var('bindir', 'pv')
+ self.assertTrue(bindir, 'Could not query bindir variable')
+ if bindir[0] == '/':
+ bindir = bindir[1:]
+ self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
+
+ def test_devtool_modify(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Clean up anything in the workdir/sysroot/sstate cache
+ bitbake('mdadm -c cleansstate')
+ # Try modifying a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ self.add_command_to_tearDown('bitbake -c clean mdadm')
+ result = runCmd('devtool modify mdadm -x %s' % tempdir)
+ self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 'Extracted source could not be found')
+ self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
+ self.assertTrue(os.path.exists(os.path.join(workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
+ matches = glob.glob(os.path.join(workspacedir, 'appends', 'mdadm_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn('mdadm', result.output)
+ self.assertIn(tempdir, result.output)
+ # Check git repo
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "", 'Created git repo is not clean')
+ result = runCmd('git symbolic-ref HEAD', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "refs/heads/devtool", 'Wrong branch in git repo')
+ # Try building
+ bitbake('mdadm')
+ # Try making (minor) modifications to the source
+ result = runCmd("sed -i 's!^\.TH.*!.TH MDADM 8 \"\" v9.999-custom!' %s" % os.path.join(tempdir, 'mdadm.8.in'))
+ bitbake('mdadm -c package')
+ pkgd = get_bb_var('PKGD', 'mdadm')
+ self.assertTrue(pkgd, 'Could not query PKGD variable')
+ mandir = get_bb_var('mandir', 'mdadm')
+ self.assertTrue(mandir, 'Could not query mandir variable')
+ if mandir[0] == '/':
+ mandir = mandir[1:]
+ with open(os.path.join(pkgd, mandir, 'man8', 'mdadm.8'), 'r') as f:
+ for line in f:
+ if line.startswith('.TH'):
+ self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified')
+ # Test devtool reset
+ result = runCmd('devtool reset mdadm')
+ result = runCmd('devtool status')
+ self.assertNotIn('mdadm', result.output)
+
+ def test_devtool_update_recipe(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ testrecipe = 'minicom'
+ recipefile = get_bb_var('FILE', testrecipe)
+ result = runCmd('git status . --porcelain', cwd=os.path.dirname(recipefile))
+ self.assertEqual(result.output.strip(), "", '%s recipe is not clean' % testrecipe)
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # (don't bother with cleaning the recipe on teardown, we won't be building it)
+ result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+ # Check git repo
+ self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "", 'Created git repo is not clean')
+ result = runCmd('git symbolic-ref HEAD', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "refs/heads/devtool", 'Wrong branch in git repo')
+ # Add a couple of commits
+ # FIXME: this only tests adding, need to also test update and remove
+ result = runCmd('echo "Additional line" >> README', cwd=tempdir)
+ result = runCmd('git commit -a -m "Change the README"', cwd=tempdir)
+ result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
+ result = runCmd('git add devtool-new-file', cwd=tempdir)
+ result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
+ self.add_command_to_tearDown('cd %s; rm %s/*.patch; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
+ result = runCmd('devtool update-recipe %s' % testrecipe)
+ result = runCmd('git status . --porcelain', cwd=os.path.dirname(recipefile))
+ self.assertNotEqual(result.output.strip(), "", '%s recipe should be modified' % testrecipe)
+ status = result.output.splitlines()
+ self.assertEqual(len(status), 3, 'Less/more files modified than expected. Entire status:\n%s' % result.output)
+ for line in status:
+ if line.endswith('0001-Change-the-README.patch'):
+ self.assertEqual(line[:3], '?? ', 'Unexpected status in line: %s' % line)
+ elif line.endswith('0002-Add-a-new-file.patch'):
+ self.assertEqual(line[:3], '?? ', 'Unexpected status in line: %s' % line)
+ elif re.search('minicom_[^_]*.bb$', line):
+ self.assertEqual(line[:3], ' M ', 'Unexpected status in line: %s' % line)
+ else:
+ raise AssertionError('Unexpected modified file in status: %s' % line)
+
+ def test_devtool_extract(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ # Try devtool extract
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool extract remake %s' % tempdir)
+ self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+ self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
diff --git a/meta/lib/oeqa/selftest/oescripts.py b/meta/lib/oeqa/selftest/oescripts.py
index 4aab2ed095..31cd50809c 100644
--- a/meta/lib/oeqa/selftest/oescripts.py
+++ b/meta/lib/oeqa/selftest/oescripts.py
@@ -8,9 +8,11 @@ import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.selftest.buildhistory import BuildhistoryBase
from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.decorators import testcase
class TestScripts(oeSelfTest):
+ @testcase(300)
def test_cleanup_workdir(self):
path = os.path.dirname(get_bb_var('WORKDIR', 'gzip'))
old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb')
@@ -41,6 +43,7 @@ class TestScripts(oeSelfTest):
class BuildhistoryDiffTests(BuildhistoryBase):
+ @testcase(295)
def test_buildhistory_diff(self):
self.add_command_to_tearDown('cleanup-workdir')
target = 'xcursor-transparent-theme'
@@ -49,12 +52,3 @@ class BuildhistoryDiffTests(BuildhistoryBase):
result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
expected_output = 'PR changed from "r1" to "r0"'
self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output)
-
-
-
-
-
-
-
-
-
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py
index 789c05f1e5..fb6d68d3bf 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -8,6 +8,7 @@ import datetime
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
class BitbakePrTests(oeSelfTest):
@@ -87,27 +88,34 @@ class BitbakePrTests(oeSelfTest):
bitbake("-ccleansstate %s" % package_name)
self.assertTrue(pr_2 - pr_1 == 1)
-
+ @testcase(930)
def test_import_export_replace_db(self):
self.run_test_pr_export_import('m4')
+ @testcase(931)
def test_import_export_override_db(self):
self.run_test_pr_export_import('m4', replace_current_db=False)
+ @testcase(932)
def test_pr_service_rpm_arch_dep(self):
self.run_test_pr_service('m4', 'rpm', 'do_package')
+ @testcase(934)
def test_pr_service_deb_arch_dep(self):
self.run_test_pr_service('m4', 'deb', 'do_package')
+ @testcase(933)
def test_pr_service_ipk_arch_dep(self):
self.run_test_pr_service('m4', 'ipk', 'do_package')
+ @testcase(935)
def test_pr_service_rpm_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'rpm', 'do_package')
+ @testcase(937)
def test_pr_service_deb_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'deb', 'do_package')
+ @testcase(936)
def test_pr_service_ipk_arch_indep(self):
self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package')
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 44dcea847f..d578ddd489 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -8,7 +8,7 @@ import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
from oeqa.selftest.sstate import SStateBase
-
+from oeqa.utils.decorators import testcase
class SStateTests(SStateBase):
@@ -28,19 +28,23 @@ class SStateTests(SStateBase):
else:
self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
+ @testcase(975)
def test_sstate_creation_distro_specific_pass(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+ @testcase(975)
def test_sstate_creation_distro_specific_fail(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
+ @testcase(976)
def test_sstate_creation_distro_nonspecific_pass(self):
- self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(976)
def test_sstate_creation_distro_nonspecific_fail(self):
- self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
+ self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
# Test the sstate files deletion part of the do_cleansstate task
@@ -60,16 +64,19 @@ class SStateTests(SStateBase):
tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
+ @testcase(977)
def test_cleansstate_task_distro_specific_nonspecific(self):
targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_nonspecific(self):
- self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_specific(self):
targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+ self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
# Test rebuilding of distro-specific sstate files
@@ -98,14 +105,17 @@ class SStateTests(SStateBase):
created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
+ @testcase(175)
def test_rebuild_distro_specific_sstate_cross_native_targets(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True)
+ @testcase(175)
def test_rebuild_distro_specific_sstate_cross_target(self):
targetarch = get_bb_var('TUNE_ARCH')
self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True)
+ @testcase(175)
def test_rebuild_distro_specific_sstate_native_target(self):
self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
@@ -153,7 +163,7 @@ class SStateTests(SStateBase):
expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
-
+ @testcase(973)
def test_sstate_cache_management_script_using_pr_1(self):
global_config = []
target_config = []
@@ -161,6 +171,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "0"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(978)
def test_sstate_cache_management_script_using_pr_2(self):
global_config = []
target_config = []
@@ -170,6 +181,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "1"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(979)
def test_sstate_cache_management_script_using_pr_3(self):
global_config = []
target_config = []
@@ -181,6 +193,7 @@ class SStateTests(SStateBase):
target_config.append('PR = "1"')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
+ @testcase(974)
def test_sstate_cache_management_script_using_machine(self):
global_config = []
target_config = []
@@ -189,11 +202,3 @@ class SStateTests(SStateBase):
global_config.append('MACHINE = "qemux86"')
target_config.append('')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
-
-
-
-
-
-
-
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 802bc2f208..5b601d9806 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -110,11 +110,11 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, **opti
def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **options):
if postconfig:
- postconfig_file = os.path.join(os.environ.get('BUILDDIR'), 'oeqa-post.conf')
- ftools.write_file(postconfig_file, postconfig)
- extra_args = "-R %s" % postconfig_file
+ postconfig_file = os.path.join(os.environ.get('BUILDDIR'), 'oeqa-post.conf')
+ ftools.write_file(postconfig_file, postconfig)
+ extra_args = "-R %s" % postconfig_file
else:
- extra_args = ""
+ extra_args = ""
if isinstance(command, basestring):
cmd = "bitbake " + extra_args + " " + command
@@ -122,7 +122,7 @@ def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **optio
cmd = [ "bitbake" ] + [a for a in (command + extra_args.split(" ")) if a not in [""]]
try:
- return runCmd(cmd, ignore_status, timeout, **options)
+ return runCmd(cmd, ignore_status, timeout, **options)
finally:
if postconfig:
os.remove(postconfig_file)
@@ -138,9 +138,9 @@ def get_bb_var(var, target=None, postconfig=None):
val = None
bbenv = get_bb_env(target, postconfig=postconfig)
for line in bbenv.splitlines():
- if line.startswith(var + "="):
+ if line.startswith(var + "=") or line.startswith("export " + var + "="):
val = line.split('=')[1]
- val = val.replace('\"','')
+ val = val.strip('\"')
break
return val
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index a0d94e6d24..ff5f278bc1 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -6,9 +6,42 @@
# Most useful is skipUnlessPassed which can be used for
# creating dependecies between two test methods.
-from oeqa.oetest import *
+import os
import logging
import sys
+import unittest
+
+#get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame
+class getResults(object):
+ def __init__(self):
+ #dynamically determine the unittest.case frame and use it to get the name of the test method
+ upperf = sys._current_frames().values()[0]
+ while (upperf.f_globals['__name__'] != 'unittest.case'):
+ upperf = upperf.f_back
+
+ def handleList(items):
+ ret = []
+ # items is a list of tuples, (test, failure) or (_ErrorHandler(), Exception())
+ for i in items:
+ s = i[0].id()
+ #Handle the _ErrorHolder objects from skipModule failures
+ if "setUpModule (" in s:
+ ret.append(s.replace("setUpModule (", "").replace(")",""))
+ else:
+ ret.append(s)
+ return ret
+ self.faillist = handleList(upperf.f_locals['result'].failures)
+ self.errorlist = handleList(upperf.f_locals['result'].errors)
+ self.skiplist = handleList(upperf.f_locals['result'].skipped)
+
+ def getFailList(self):
+ return self.faillist
+
+ def getErrorList(self):
+ return self.errorlist
+
+ def getSkipList(self):
+ return self.skiplist
class skipIfFailure(object):
@@ -17,7 +50,8 @@ class skipIfFailure(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in (oeTest.testFailures or oeTest.testErrors):
+ res = getResults()
+ if self.testcase in (res.getFailList() or res.getErrorList()):
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -30,7 +64,8 @@ class skipIfSkipped(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in oeTest.testSkipped:
+ res = getResults()
+ if self.testcase in res.getSkipList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -43,9 +78,10 @@ class skipUnlessPassed(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in oeTest.testSkipped or \
- self.testcase in oeTest.testFailures or \
- self.testcase in oeTest.testErrors:
+ res = getResults()
+ if self.testcase in res.getSkipList() or \
+ self.testcase in res.getFailList() or \
+ self.testcase in res.getErrorList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -57,10 +93,15 @@ class testcase(object):
self.test_case = test_case
def __call__(self, func):
- def wrapped_f(*args):
- return func(*args)
- wrapped_f.test_case = self.test_case
- return wrapped_f
+ def wrapped_f(*args):
+ return func(*args)
+ wrapped_f.test_case = self.test_case
+ wrapped_f.__name__ = func.__name__
+ return wrapped_f
+
+class NoParsingFilter(logging.Filter):
+ def filter(self, record):
+ return record.levelno == 100
def LogResults(original_class):
orig_method = original_class.run
@@ -68,49 +109,51 @@ def LogResults(original_class):
#rewrite the run method of unittest.TestCase to add testcase logging
def run(self, result, *args, **kws):
orig_method(self, result, *args, **kws)
- passed = True
- testMethod = getattr(self, self._testMethodName)
-
- #if test case is decorated then use it's number, else use it's name
- try:
- test_case = testMethod.test_case
- except AttributeError:
- test_case = self._testMethodName
-
- #create custom logging level for filtering.
- custom_log_level = 100
- logging.addLevelName(custom_log_level, 'RESULTS')
- caller = os.path.basename(sys.argv[0])
-
- def results(self, message, *args, **kws):
- if self.isEnabledFor(custom_log_level):
- self.log(custom_log_level, message, *args, **kws)
- logging.Logger.results = results
-
- logging.basicConfig(filename=os.path.join(os.getcwd(),'results-'+caller+'.log'),
+ passed = True
+ testMethod = getattr(self, self._testMethodName)
+
+ #if test case is decorated then use it's number, else use it's name
+ try:
+ test_case = testMethod.test_case
+ except AttributeError:
+ test_case = self._testMethodName
+
+ #create custom logging level for filtering.
+ custom_log_level = 100
+ logging.addLevelName(custom_log_level, 'RESULTS')
+ caller = os.path.basename(sys.argv[0])
+
+ def results(self, message, *args, **kws):
+ if self.isEnabledFor(custom_log_level):
+ self.log(custom_log_level, message, *args, **kws)
+ logging.Logger.results = results
+
+ logging.basicConfig(filename=os.path.join(os.getcwd(),'results-'+caller+'.log'),
filemode='w',
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%H:%M:%S',
level=custom_log_level)
- local_log = logging.getLogger(caller)
+ for handler in logging.root.handlers:
+ handler.addFilter(NoParsingFilter())
+ local_log = logging.getLogger(caller)
- #check status of tests and record it
+ #check status of tests and record it
for (name, msg) in result.errors:
- if self._testMethodName == str(name).split(' ')[0]:
- local_log.results("Testcase "+str(test_case)+": ERROR")
- local_log.results("Testcase "+str(test_case)+":\n"+msg)
- passed = False
+ if self._testMethodName == str(name).split(' ')[0]:
+ local_log.results("Testcase "+str(test_case)+": ERROR")
+ local_log.results("Testcase "+str(test_case)+":\n"+msg)
+ passed = False
for (name, msg) in result.failures:
- if self._testMethodName == str(name).split(' ')[0]:
- local_log.results("Testcase "+str(test_case)+": FAILED")
- local_log.results("Testcase "+str(test_case)+":\n"+msg)
- passed = False
+ if self._testMethodName == str(name).split(' ')[0]:
+ local_log.results("Testcase "+str(test_case)+": FAILED")
+ local_log.results("Testcase "+str(test_case)+":\n"+msg)
+ passed = False
for (name, msg) in result.skipped:
- if self._testMethodName == str(name).split(' ')[0]:
- local_log.results("Testcase "+str(test_case)+": SKIPPED")
- passed = False
- if passed:
- local_log.results("Testcase "+str(test_case)+": PASSED")
+ if self._testMethodName == str(name).split(' ')[0]:
+ local_log.results("Testcase "+str(test_case)+": SKIPPED")
+ passed = False
+ if passed:
+ local_log.results("Testcase "+str(test_case)+": PASSED")
original_class.run = run
return original_class
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index f161a1bddd..76518d8ef9 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -5,6 +5,8 @@ import os
class HTTPServer(SimpleHTTPServer.BaseHTTPServer.HTTPServer):
def server_start(self, root_dir):
+ import signal
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
os.chdir(root_dir)
self.serve_forever()
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
new file mode 100644
index 0000000000..87b50354cd
--- /dev/null
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import re
+import ftools
+
+
+# A parser that can be used to identify weather a line is a test result or a section statement.
+class Lparser(object):
+
+ def __init__(self, test_0_pass_regex, test_0_fail_regex, section_0_begin_regex=None, section_0_end_regex=None, **kwargs):
+ # Initialize the arguments dictionary
+ if kwargs:
+ self.args = kwargs
+ else:
+ self.args = {}
+
+ # Add the default args to the dictionary
+ self.args['test_0_pass_regex'] = test_0_pass_regex
+ self.args['test_0_fail_regex'] = test_0_fail_regex
+ if section_0_begin_regex:
+ self.args['section_0_begin_regex'] = section_0_begin_regex
+ if section_0_end_regex:
+ self.args['section_0_end_regex'] = section_0_end_regex
+
+ self.test_possible_status = ['pass', 'fail', 'error']
+ self.section_possible_status = ['begin', 'end']
+
+ self.initialized = False
+
+
+ # Initialize the parser with the current configuration
+ def init(self):
+
+ # extra arguments can be added by the user to define new test and section categories. They must follow a pre-defined pattern: <type>_<category_name>_<status>_regex
+ self.test_argument_pattern = "^test_(.+?)_(%s)_regex" % '|'.join(map(str, self.test_possible_status))
+ self.section_argument_pattern = "^section_(.+?)_(%s)_regex" % '|'.join(map(str, self.section_possible_status))
+
+ # Initialize the test and section regex dictionaries
+ self.test_regex = {}
+ self.section_regex ={}
+
+ for arg, value in self.args.items():
+ if not value:
+ raise Exception('The value of provided argument %s is %s. Should have a valid value.' % (key, value))
+ is_test = re.search(self.test_argument_pattern, arg)
+ is_section = re.search(self.section_argument_pattern, arg)
+ if is_test:
+ if not is_test.group(1) in self.test_regex:
+ self.test_regex[is_test.group(1)] = {}
+ self.test_regex[is_test.group(1)][is_test.group(2)] = re.compile(value)
+ elif is_section:
+ if not is_section.group(1) in self.section_regex:
+ self.section_regex[is_section.group(1)] = {}
+ self.section_regex[is_section.group(1)][is_section.group(2)] = re.compile(value)
+ else:
+ # TODO: Make these call a traceback instead of a simple exception..
+ raise Exception("The provided argument name does not correspond to any valid type. Please give one of the following types:\nfor tests: %s\nfor sections: %s" % (self.test_argument_pattern, self.section_argument_pattern))
+
+ self.initialized = True
+
+ # Parse a line and return a tuple containing the type of result (test/section) and its category, status and name
+ def parse_line(self, line):
+ if not self.initialized:
+ raise Exception("The parser is not initialized..")
+
+ for test_category, test_status_list in self.test_regex.items():
+ for test_status, status_regex in test_status_list.items():
+ test_name = status_regex.search(line)
+ if test_name:
+ return ['test', test_category, test_status, test_name.group(1)]
+
+ for section_category, section_status_list in self.section_regex.items():
+ for section_status, status_regex in section_status_list.items():
+ section_name = status_regex.search(line)
+ if section_name:
+ return ['section', section_category, section_status, section_name.group(1)]
+ return None
+
+
+class Result(object):
+
+ def __init__(self):
+ self.result_dict = {}
+
+ def store(self, section, test, status):
+ if not section in self.result_dict:
+ self.result_dict[section] = []
+
+ self.result_dict[section].append((test, status))
+
+ # sort tests by the test name(the first element of the tuple), for each section. This can be helpful when using git to diff for changes by making sure they are always in the same order.
+ def sort_tests(self):
+ for package in self.result_dict:
+ sorted_results = sorted(self.result_dict[package], key=lambda tup: tup[0])
+ self.result_dict[package] = sorted_results
+
+ # Log the results as files. The file name is the section name and the contents are the tests in that section.
+ def log_as_files(self, target_dir, test_status):
+ status_regex = re.compile('|'.join(map(str, test_status)))
+ if not type(test_status) == type([]):
+ raise Exception("test_status should be a list. Got " + str(test_status) + " instead.")
+ if not os.path.exists(target_dir):
+ raise Exception("Target directory does not exist: %s" % target_dir)
+
+ for section, test_results in self.result_dict.items():
+ prefix = ''
+ for x in test_status:
+ prefix +=x+'.'
+ if (section != ''):
+ prefix += section
+ section_file = os.path.join(target_dir, prefix)
+ # purge the file contents if it exists
+ open(section_file, 'w').close()
+ for test_result in test_results:
+ (test_name, status) = test_result
+ # we log only the tests with status in the test_status list
+ match_status = status_regex.search(status)
+ if match_status:
+ ftools.append_file(section_file, status + ": " + test_name)
+
+ # Not yet implemented!
+ def log_to_lava(self):
+ pass
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 32296762c0..eeb08ba716 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -6,23 +6,25 @@
import os
import re
+import bb.utils
import subprocess
+from abc import ABCMeta, abstractmethod
+class BuildProject():
-class TargetBuildProject():
+ __metaclass__ = ABCMeta
- def __init__(self, target, d, uri, foldername=None):
- self.target = target
+ def __init__(self, d, uri, foldername=None, tmpdir="/tmp/"):
self.d = d
self.uri = uri
- self.targetdir = "~/"
self.archive = os.path.basename(uri)
- self.localarchive = "/tmp/" + self.archive
+ self.localarchive = os.path.join(tmpdir,self.archive)
self.fname = re.sub(r'.tar.bz2|tar.gz$', '', self.archive)
if foldername:
self.fname = foldername
- def download_archive(self):
+ # Download self.archive to self.localarchive
+ def _download_archive(self):
exportvars = ['HTTP_PROXY', 'http_proxy',
'HTTPS_PROXY', 'https_proxy',
@@ -41,6 +43,38 @@ class TargetBuildProject():
cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
subprocess.check_call(cmd, shell=True)
+ # This method should provide a way to run a command in the desired environment.
+ @abstractmethod
+ def _run(self, cmd):
+ pass
+
+ # The timeout parameter of target.run is set to 0 to make the ssh command
+ # run with no timeout.
+ def run_configure(self, configure_args=''):
+ return self._run('cd %s; ./configure %s' % (self.targetdir, configure_args))
+
+ def run_make(self, make_args=''):
+ return self._run('cd %s; make %s' % (self.targetdir, make_args))
+
+ def run_install(self, install_args=''):
+ return self._run('cd %s; make install %s' % (self.targetdir, install_args))
+
+ def clean(self):
+ self._run('rm -rf %s' % self.targetdir)
+ subprocess.call('rm -f %s' % self.localarchive, shell=True)
+ pass
+
+class TargetBuildProject(BuildProject):
+
+ def __init__(self, target, d, uri, foldername=None):
+ self.target = target
+ self.targetdir = "~/"
+ BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp")
+
+ def download_archive(self):
+
+ self._download_archive()
+
(status, output) = self.target.copy_to(self.localarchive, self.targetdir)
if status != 0:
raise Exception("Failed to copy archive to target, output: %s" % output)
@@ -54,15 +88,45 @@ class TargetBuildProject():
# The timeout parameter of target.run is set to 0 to make the ssh command
# run with no timeout.
- def run_configure(self):
- return self.target.run('cd %s; ./configure' % self.targetdir, 0)[0]
+ def _run(self, cmd):
+ return self.target.run(cmd, 0)[0]
- def run_make(self):
- return self.target.run('cd %s; make' % self.targetdir, 0)[0]
- def run_install(self):
- return self.target.run('cd %s; make install' % self.targetdir, 0)[0]
+class SDKBuildProject(BuildProject):
+
+ def __init__(self, testpath, sdkenv, d, uri, foldername=None):
+ self.sdkenv = sdkenv
+ self.testdir = testpath
+ self.targetdir = testpath
+ bb.utils.mkdirhier(testpath)
+ self.datetime = d.getVar('DATETIME', True)
+ self.testlogdir = d.getVar("TEST_LOG_DIR", True)
+ bb.utils.mkdirhier(self.testlogdir)
+ self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % self.datetime)
+ BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath)
+
+ def download_archive(self):
+
+ self._download_archive()
+
+ cmd = 'tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)
+ subprocess.check_call(cmd, shell=True)
+
+ #Change targetdir to project folder
+ self.targetdir = self.targetdir + self.fname
+
+ def run_configure(self, configure_args=''):
+ return super(SDKBuildProject, self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'))
+
+ def run_install(self, install_args=''):
+ return super(SDKBuildProject, self).run_install(install_args=(install_args or "DESTDIR=%s/../install" % self.targetdir))
+
+ def log(self, msg):
+ if self.logfile:
+ with open(self.logfile, "a") as f:
+ f.write("%s\n" % msg)
+
+ def _run(self, cmd):
+ self.log("Running source %s; " % self.sdkenv + cmd)
+ return subprocess.call("source %s; " % self.sdkenv + cmd, shell=True)
- def clean(self):
- self.target.run('rm -rf %s' % self.targetdir)
- subprocess.call('rm -f %s' % self.localarchive, shell=True)
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index fad7afdf26..e0156192a0 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -4,30 +4,27 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
SECTION = "base"
LICENSE = "GPLv2+"
-SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
file://init \
- file://set_socket_noblock.patch "
+ file://acpid.service \
+ "
-inherit update-rc.d
+inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "acpid"
INITSCRIPT_PARAMS = "defaults"
-# Makefile ignores our CFLAGS, so override it.
-#
-EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
+SYSTEMD_SERVICE_${PN} = "acpid.service"
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
-}
-
-do_install () {
- install -d ${D}${bindir}
- oe_runmake 'INSTPREFIX=${D}' install
+do_install_append () {
install -d ${D}${sysconfdir}/init.d
sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
install -d ${D}${sysconfdir}/acpi
install -d ${D}${sysconfdir}/acpi/events
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service
}
diff --git a/meta/recipes-bsp/acpid/acpid/acpid.service b/meta/recipes-bsp/acpid/acpid/acpid.service
new file mode 100644
index 0000000000..f70e740965
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI Event Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/acpid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch b/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
deleted file mode 100644
index 54d64351d7..0000000000
--- a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/acpid.c
-+++ b/acpid.c
-@@ -307,6 +307,7 @@ main(int argc, char **argv)
- non_root_clients++;
- }
- fcntl(cli_fd, F_SETFD, FD_CLOEXEC);
-+ fcntl(cli_fd, F_SETFL, O_NONBLOCK);
- snprintf(buf, sizeof(buf)-1, "%d[%d:%d]",
- creds.pid, creds.uid, creds.gid);
- acpid_add_client(cli_fd, buf);
diff --git a/meta/recipes-bsp/acpid/acpid_1.0.10.bb b/meta/recipes-bsp/acpid/acpid_2.0.23.bb
index df55badbd4..a5317a4daa 100644
--- a/meta/recipes-bsp/acpid/acpid_1.0.10.bb
+++ b/meta/recipes-bsp/acpid/acpid_2.0.23.bb
@@ -3,6 +3,5 @@ require acpid.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "61156ef32015c56dc0f2e3317f4ae09e"
-SRC_URI[sha256sum] = "22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760"
+SRC_URI[md5sum] = "d7bcdcdefcd53b03730e50ba842554ea"
+SRC_URI[sha256sum] = "4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee"
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index 874d6bbe83..d0f7bb3305 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -18,17 +18,30 @@ SRC_URI = "\
file://alsa-state-init \
"
+S = "${WORKDIR}"
+
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
inherit update-rc.d
INITSCRIPT_NAME = "alsa-state"
INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
do_install() {
- sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ fi
install -d ${D}/${localstatedir}/lib/alsa
+ install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa
}
@@ -50,9 +63,5 @@ pkg_postinst_${PN}() {
then
${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
fi
- # INITSCRIPT_PARAMS changed, so remove the old and
- # install the new setting.
- update-rc.d -f ${INITSCRIPT_NAME} remove
- update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
fi
}
diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
index d1ae2a255c..5c30bd510d 100644
--- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb
+++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
@@ -12,7 +12,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
INHIBIT_DEFAULT_DEPS = "1"
do_install() {
- # Only install file if it has a contents
+ # Install file only if it has contents
install -d ${D}${sysconfdir}/formfactor/
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
if [ -s "${S}/machconfig" ]; then
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
deleted file mode 100644
index 27c94e8a74..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix parallel make failure
-
-Upstream-Status: Submitted [Maintainer directly]
-
-Add a missing dependency which resulted in a race leading to failure
-on larger values of -j.
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-
-Index: gnu-efi-3.0/Makefile
-===================================================================
---- gnu-efi-3.0.orig/Makefile
-+++ gnu-efi-3.0/Makefile
-@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults
-
- SUBDIRS = lib gnuefi inc apps
-
-+gnuefi: lib
-+
- all: check_gcc $(SUBDIRS)
-
- $(SUBDIRS):
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb
new file mode 100644
index 0000000000..ad7f2e368a
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Libraries for producing EFI binaries"
+HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
+SECTION = "devel"
+LICENSE = "GPLv2+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=9;md5=2240d7bbdf0928294c2f4a68b14d6591 \
+ file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
+ file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
+ file://lib/arm/div64.S;beginline=6;endline=12;md5=a96c84f5ad12b4f011f98b5d039242f2 \
+ file://lib/arm/math.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/initplat.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/lib1funcs.S;beginline=9;endline=33;md5=f56d5ebbc87136bc66cfe24db82bcf01 \
+ file://lib/aarch64/math.c;beginline=9;endline=33;md5=cfade4c560e033a7bb02dab282872c7d \
+ file://lib/aarch64/initplat.c;beginline=9;endline=33;md5=900cb1ffbe3e1ded344102be921830f1 \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://parallel-make-archives.patch \
+ "
+SRC_URI[md5sum] = "c4099c443b6b0c2b04dedc33e7814ec0"
+SRC_URI[sha256sum] = "e2e8d5940347eebfb00eaaeef107a8ba59e7838e40bc716c74d9a36fff648f1f"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+
+def gnu_efi_arch(d):
+ import re
+ tarch = d.getVar("TARGET_ARCH", True)
+ if re.match("i[3456789]86", tarch):
+ return "ia32"
+ return tarch
+
+EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
+ 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
+ "
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+}
+
+FILES_${PN} += "${libdir}/*.lds"
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
deleted file mode 100644
index dbf2a07a8a..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Libraries for producing EFI binaries"
-HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=5fb358a180f484b285b0d99acdc29666"
-
-SRC_URI = "http://downloads.sourceforge.net/gnu-efi/gnu-efi_3.0u.orig.tar.gz \
- file://parallel-make.patch \
- file://parallel-make-archives.patch \
- "
-SRC_URI[md5sum] = "d15d3c700e79a1e2938544d73edc572d"
-SRC_URI[sha256sum] = "3c0d450d5829204ca05dcb3b2aae772e52c379b7c7e09146759c6315606f934e"
-
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-
-S = "${WORKDIR}/gnu-efi-3.0"
-
-def gnu_efi_arch(d):
- import re
- tarch = d.getVar("TARGET_ARCH", True)
- if re.match("i[3456789]86", tarch):
- return "ia32"
- return tarch
-
-EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
- 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
- "
-
-do_install() {
- oe_runmake install INSTALLROOT="${D}"
-}
-
-FILES_${PN} += "${libdir}/*.lds"
diff --git a/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
new file mode 100644
index 0000000000..46aaa97cf2
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
@@ -0,0 +1,32 @@
+From 275fe0269ecc00af4788afaf9dc151a50b25645b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 28 Aug 2014 19:26:14 -0700
+Subject: [PATCH] Fix build with glibc 2.20
+
+* grub-core/kern/emu/hostfs.c: squahes below warning
+ warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Submitted
+
+---
+ grub-core/kern/emu/hostfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
+index 7e725f6..8dd8e65 100644
+--- a/grub-core/kern/emu/hostfs.c
++++ b/grub-core/kern/emu/hostfs.c
+@@ -19,7 +19,7 @@
+
+ #include <config-util.h>
+
+-#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
+ #include <grub/fs.h>
+ #include <grub/file.h>
+ #include <grub/disk.h>
+--
+2.1.0
+
diff --git a/meta/recipes-bsp/grub/files/cfg b/meta/recipes-bsp/grub/files/cfg
index ffffe47638..8ca53d24d7 100644
--- a/meta/recipes-bsp/grub/files/cfg
+++ b/meta/recipes-bsp/grub/files/cfg
@@ -1,2 +1,2 @@
-search.file /EFI/BOOT/grub.cfg root
+search.file ($cmdpath)/EFI/BOOT/grub.cfg root
set prefix=($root)/EFI/BOOT
diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
new file mode 100644
index 0000000000..079992afba
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
@@ -0,0 +1,44 @@
+grub-core/net/tftp.c: fix endianness problem.
+
+ * grub-core/net/tftp.c (ack): Fix endianness problem.
+ (tftp_receive): Likewise.
+ Reported by: Michael Davidsaver.
+
+Upstream-Status: Backport
+
+diff --git a/ChangeLog b/ChangeLog
+index 81bdae9..c2f42d5 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,9 @@
++2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
++
++ * grub-core/net/tftp.c (ack): Fix endianness problem.
++ (tftp_receive): Likewise.
++ Reported by: Michael Davidsaver.
++
+ 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * configure.ac: Bump version to 2.00.
+diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
+index 9c70efb..d0f39ea 100644
+--- a/grub-core/net/tftp.c
++++ b/grub-core/net/tftp.c
+@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
+
+ tftph_ack = (struct tftphdr *) nb_ack.data;
+ tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
+- tftph_ack->u.ack.block = block;
++ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
+
+ err = grub_net_send_udp_packet (data->sock, &nb_ack);
+ if (err)
+@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
+ grub_priority_queue_pop (data->pq);
+
+ if (file->device->net->packs.count < 50)
+- err = ack (data, tftph->u.data.block);
++ err = ack (data, data->block + 1);
+ else
+ {
+ file->device->net->stall = 1;
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
deleted file mode 100644
index 70f60015c2..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones@redhat.com>
-Date: Fri, 25 May 2012 15:28:19 -0400
-Subject: [PATCH] gnulib accused in build breaking shocker.
-
-Upstream-Status: pending [Fedora will push this]
-
----
- grub-core/gnulib/stdio.in.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
-index 80b9dbf..69932d9 100644
---- a/grub-core/gnulib/stdio.in.h
-+++ b/grub-core/gnulib/stdio.in.h
-@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
- #undef gets
-+#if 0
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
---
-1.7.10.1
-
diff --git a/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
new file mode 100644
index 0000000000..4f12628a4b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
@@ -0,0 +1,32 @@
+From eb6368e65f6988eebad26cebdec057f797bceb40 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 9 Sep 2014 00:02:30 -0700
+Subject: [PATCH] Fix build with glibc 2.20
+
+* grub-core/kern/emu/hostfs.c: squahes below warning
+ warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ grub-core/kern/emu/hostfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
+index 3cb089c..a51ee32 100644
+--- a/grub-core/kern/emu/hostfs.c
++++ b/grub-core/kern/emu/hostfs.c
+@@ -16,7 +16,7 @@
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+-#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
+ #include <grub/fs.h>
+ #include <grub/file.h>
+ #include <grub/disk.h>
+--
+1.7.9.5
+
diff --git a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch
index 326951df44..326951df44 100644
--- a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch
+++ b/meta/recipes-bsp/grub/files/grub-install.in.patch
diff --git a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
new file mode 100644
index 0000000000..6259a1abe3
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
@@ -0,0 +1,104 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+remove the grub-sparc64-setup files from the x86 builds.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+--- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700
++++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700
+@@ -4692,9 +4692,9 @@
+ endif
+
+ if COND_emu
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4715,9 +4715,9 @@
+ endif
+
+ if COND_i386_pc
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4738,9 +4738,9 @@
+ endif
+
+ if COND_i386_efi
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4761,9 +4761,9 @@
+ endif
+
+ if COND_i386_qemu
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4784,9 +4784,9 @@
+ endif
+
+ if COND_i386_coreboot
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4807,9 +4807,9 @@
+ endif
+
+ if COND_i386_multiboot
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4830,9 +4830,9 @@
+ endif
+
+ if COND_i386_ieee1275
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4853,9 +4853,9 @@
+ endif
+
+ if COND_x86_64_efi
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
diff --git a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch
index 463f7847ad..463f7847ad 100644
--- a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch
+++ b/meta/recipes-bsp/grub/files/remove-gets.patch
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 7b49493e3e..7b44eab8d1 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -1,38 +1,12 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
-intended to unify bootloading across x86 operating systems. In \
-addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images. \
-This recipe builds an EFI binary for the target. It does not install \
-or package anything, it only deploys a target-arch GRUB EFI image."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-# FIXME: We should be able to optionally drop freetype as a dependency
-DEPENDS = "autogen-native flex-native bison-native"
DEPENDS_class-target = "grub-efi-native"
-PR = "r2"
+RDEPENDS_${PN}_class-target = "diffutils freetype"
+PR = "r3"
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+SRC_URI += " \
file://cfg \
- file://grub-2.00-fpmath-sse-387-fix.patch \
- file://grub-2.00-fix-enable_execute_stack-check.patch \
- file://check-if-liblzma-is-disabled.patch \
- file://grub-no-unused-result.patch \
- file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
- file://fix-issue-with-flex-2.5.37.patch \
- file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
- file://grub-2.00-add-oe-kernel.patch \
"
-SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
S = "${WORKDIR}/grub-${PV}"
@@ -52,17 +26,13 @@ python __anonymous () {
d.setVar("GRUB_IMAGE", grubimage)
}
-inherit autotools-brokensep gettext texinfo deploy
+inherit deploy
CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
--enable-efiemu=no --program-prefix='' \
--enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
-do_install_class-target() {
- :
-}
-
do_install_class-native() {
install -d ${D}${bindir}
install -m 755 grub-mkimage ${D}${bindir}
@@ -85,7 +55,12 @@ do_deploy_class-native() {
addtask deploy after do_install before do_build
-FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug"
+FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \
+ /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \
+ "
+FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
+ ${datadir}/grub \
+ "
BBCLASSEXTEND = "native"
-ALLOW_EMPTY_${PN} = "1"
+
diff --git a/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch b/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
deleted file mode 100644
index 48ace56506..0000000000
--- a/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-util/grub-gen-asciih.c: fix build warning->error
-
-A potential problem is flagged by the compiler and generates a warning. This
-warning is promoted to an error via -Werror. This patch fixes the original
-issue, avoids the warning, and therefore avoids the build error.
-
-Upstream-Status: Pending
-
-Index: git/util/grub-gen-asciih.c
-===================================================================
---- git.orig/util/grub-gen-asciih.c
-+++ git/util/grub-gen-asciih.c
-@@ -131,6 +131,8 @@ write_font_ascii_bitmap (FILE *file, FT_
- struct grub_glyph_info glyph;
- int char_code;
-
-+ memset (&glyph, 0, sizeof(glyph));
-+
- fprintf (file, "/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n");
- fprintf (file, "unsigned char ascii_bitmaps[] =\n");
- fprintf (file, "{\n");
-@@ -144,6 +146,12 @@ write_font_ascii_bitmap (FILE *file, FT_
- return;
- add_glyph (glyph_idx, face, char_code, &glyph);
-
-+ if (glyph.bitmap == 0)
-+ {
-+ fprintf (stderr, "grub-gen-asciih: add_glyph not successful");
-+ exit (1);
-+ }
-+
- if (glyph.width == 8 && glyph.height == 16
- && glyph.x_ofs == 0 && glyph.y_ofs == 0)
- {
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
new file mode 100644
index 0000000000..39469576cc
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -0,0 +1,44 @@
+SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+
+DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
+intended to unify bootloading across x86 operating systems. In \
+addition to loading the Linux kernel, it implements the Multiboot \
+standard, which allows for flexible loading of multiple boot images."
+
+HOMEPAGE = "http://www.gnu.org/software/grub/"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+ file://grub-2.00-fpmath-sse-387-fix.patch \
+ file://check-if-liblzma-is-disabled.patch \
+ file://fix-issue-with-flex-2.5.37.patch \
+ file://grub-2.00-add-oe-kernel.patch \
+ file://grub-install.in.patch \
+ file://remove-gets.patch \
+ file://fix-endianness-problem.patch \
+ file://grub2-remove-sparc64-setup-from-x86-builds.patch \
+ file://grub-2.00-fix-enable_execute_stack-check.patch \
+ file://grub-no-unused-result.patch \
+ file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
+ file://grub-efi-fix-with-glibc-2.20.patch \
+ "
+
+DEPENDS = "flex-native bison-native xz"
+
+SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
+SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
+
+inherit autotools gettext texinfo
+
+# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
+# conflicted, remove it since no one uses it.
+SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
+remove_sysroot_mkconfig_lib() {
+ rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
+}
+
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb
index ce2d680eec..a11e960fe5 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -1,39 +1,11 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
-intended to unify bootloading across x86 operating systems. In \
-addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "autogen-native flex-native bison-native xz"
RDEPENDS_${PN} = "diffutils freetype"
PR = "r1"
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://grub-install.in.patch \
- file://grub-2.00-fpmath-sse-387-fix.patch \
- file://remove-gets.patch \
- file://check-if-liblzma-is-disabled.patch \
- file://fix-issue-with-flex-2.5.37.patch \
- file://grub-2.00-add-oe-kernel.patch \
- "
-
-SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
-
FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
-inherit autotools gettext texinfo
-
PACKAGECONFIG ??= ""
PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
index 7f89739179..3ab675b298 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -1,27 +1,17 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
-intended to unify bootloading across x86 operating systems. In \
-addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "autogen-native flex-native bison-native xz freetype"
+DEPENDS += "autogen-native"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm = "1"
PV = "2.00+${SRCPV}"
-SRCREV = "4b8b9135f1676924a8458da528d264bbc7bbb301"
+SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"
SRC_URI = "git://git.savannah.gnu.org/grub.git \
+ file://grub-2.00-fpmath-sse-387-fix.patch \
file://autogen.sh-exclude-pc.patch \
file://grub-2.00-add-oe-kernel.patch \
- file://asciih-fix-build-warning-error.patch \
+ file://0001-Fix-build-with-glibc-2.20.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
index e2c7cc0344..e1d4c5477c 100644
--- a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
@@ -10,6 +10,8 @@ SRC_URI = "file://hostap_cs.modalias \
inherit allarch
+S = "${WORKDIR}"
+
do_compile() {
}
diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
new file mode 100644
index 0000000000..c4655cf092
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
@@ -0,0 +1,27 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- hostap-utils-0.4.7.orig/Makefile
++++ hostap-utils-0.4.7/Makefile
+@@ -14,17 +14,17 @@ prism2_srec.o: prism2_srec.c util.h
+ hostap_crypt_conf: hostap_crypt_conf.c
+
+ hostap_diag: hostap_diag.o util.o
+- $(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o
++ $(CC) -o hostap_diag $(CFLAGS) $(LDFLAGS) hostap_diag.o util.o
+
+ hostap_diag.o: hostap_diag.c util.h
+
+ util.o: util.c util.h
+
+ hostap_io_debug: hostap_io_debug.c
+- $(CC) -o hostap_io_debug $(CFLAGS) hostap_io_debug.c
++ $(CC) -o hostap_io_debug $(CFLAGS) $(LDFLAGS) hostap_io_debug.c
+
+ hostap_rid: hostap_rid.o util.o
+- $(CC) -o hostap_rid $(CFLAGS) hostap_rid.o util.o
++ $(CC) -o hostap_rid $(CFLAGS) $(LDFLAGS) hostap_rid.o util.o
+
+ hostap_rid.o: hostap_rid.c util.h
diff --git a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
index 7b224a8a4d..be5481f6f7 100644
--- a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
+++ b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
@@ -1,4 +1,5 @@
require hostap-utils.inc
+SRC_URI += "file://ldflags.patch"
SRC_URI[md5sum] = "afe041581b8f01666e353bec20917c85"
SRC_URI[sha256sum] = "c6f598d8e356c1620fa009eca0a700bf1105e16817eefd77d891994261009355"
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 123db3e0f2..5793a76529 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -2,10 +2,7 @@ SUMMARY = "Keyboard maps"
DESCRIPTION = "Keymaps and initscript to set the keymap on bootup."
SECTION = "base"
-# Distro can override initscripts provider
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} kbd"
+RDEPENDS_${PN} = "kbd"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
@@ -14,6 +11,13 @@ PR = "r31"
INHIBIT_DEFAULT_DEPS = "1"
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
inherit update-rc.d
SRC_URI = "file://keymap.sh \
@@ -22,7 +26,25 @@ SRC_URI = "file://keymap.sh \
INITSCRIPT_NAME = "keymap.sh"
INITSCRIPT_PARAMS = "start 01 S ."
+S = "${WORKDIR}"
+
do_install () {
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+ # Only install the script if 'sysvinit' is in DISTRO_FEATURES
+ # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+ fi
}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask keymap.service
+ fi
+}
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch b/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch
deleted file mode 100644
index 413ef0e1e5..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Link directly to lib/libpci.so.3.1.5 will hard code this versioned
-string into lspci and other utilities, which is not desirable and
-won't work. In the other hand, linking to a symbolic link lib/libpci.so
-doesn't have this issue.
-
-Upstream-Status: Pending
-
-7/30/2010 - created by Qing He <qing.he@intel.com>
-
-diff --git a/Makefile b/Makefile
-index 74c570a..31337e0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -56,9 +56,9 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h
-
- export
-
--all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
-+all: lib/$(PCILIB_DEV) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
-
--lib/$(PCILIB): $(PCIINC) force
-+lib/$(PCILIB) lib/$(PCILIB_DEV): $(PCIINC) force
- $(MAKE) -C lib all
-
- force:
-@@ -66,8 +66,8 @@ force:
- lib/config.h lib/config.mk:
- cd lib && ./configure
-
--lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB)
--setpci: setpci.o common.o lib/$(PCILIB)
-+lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB_DEV)
-+setpci: setpci.o common.o lib/$(PCILIB_DEV)
-
- LSPCIINC=lspci.h pciutils.h $(PCIINC)
- lspci.o: lspci.c $(LSPCIINC)
-@@ -89,7 +89,7 @@ update-pciids: update-pciids.sh
- chmod +x $@
-
- # The example of use of libpci
--example: example.o lib/$(PCILIB)
-+example: example.o lib/$(PCILIB_DEV)
- example.o: example.c $(PCIINC)
-
- %: %.o
-diff --git a/lib/Makefile b/lib/Makefile
-index 1eb06a5..a8dab56 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -42,7 +42,7 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI
- OBJS += nbsd-libpci
- endif
-
--all: $(PCILIB) $(PCILIBPC)
-+all: $(PCILIB_DEV) $(PCILIBPC)
-
- ifeq ($(SHARED),no)
- $(PCILIB): $(addsuffix .o,$(OBJS))
-@@ -53,6 +53,9 @@ else
- CFLAGS += -fPIC -fvisibility=hidden
- $(PCILIB): $(addsuffix .o,$(OBJS))
- $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
-+
-+$(PCILIB_DEV): $(PCILIB)
-+ ln -s $< $@
- endif
-
- $(PCILIBPC): libpci.pc.in
-diff --git a/lib/configure b/lib/configure
-index 27388bc..6c508cf 100755
---- a/lib/configure
-+++ b/lib/configure
-@@ -216,16 +216,18 @@ fi
- echo "Checking whether to build a shared library... $SHARED (set manually)"
- if [ "$SHARED" = no ] ; then
- echo >>$m 'PCILIB=$(LIBNAME).a'
-+ echo >>$m 'PCILIB_DEV=$(LIBNAME).a'
- echo >>$m 'LDLIBS=$(WITH_LIBS)'
- echo >>$m 'LIB_LDLIBS='
- else
- echo >>$m 'PCILIB=$(LIBNAME).so.$(VERSION)'
-+ echo >>$m 'PCILIB_DEV=$(LIBNAME).so'
- # We link the dependencies _to_ the library, so we do not need explicit deps in .pc
- echo >>$m 'LDLIBS='
- echo >>$m 'LIB_LDLIBS=$(WITH_LIBS)'
- echo >>$c '#define PCI_SHARED_LIB'
- if [ "$SHARED" = yes ] ; then
-- echo >>$m 'SONAME=-Wl,-soname,$(LIBNAME).so$(ABI_VERSION)'
-+ echo >>$m 'SONAME=-Wl,-soname -Wl,$(LIBNAME).so$(ABI_VERSION)'
- fi
- fi
- echo >>$m 'PCILIBPC=$(LIBNAME).pc'
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.2.1.bb b/meta/recipes-bsp/pciutils/pciutils_3.3.0.bb
index 852a93e1b1..b713512dc6 100644
--- a/meta/recipes-bsp/pciutils/pciutils_3.2.1.bb
+++ b/meta/recipes-bsp/pciutils/pciutils_3.3.0.bb
@@ -8,16 +8,18 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "zlib kmod"
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
file://configure.patch \
- file://lib-build-fix.patch \
file://guess-fix.patch \
file://makefile.patch"
-SRC_URI[md5sum] = "425b1acad6854cc2bbb06ac8e48e76fc"
-SRC_URI[sha256sum] = "12d52b19042e2fd058af12e7d877bbbce72213cb3a0b5ec7ff0703ac09e3dcde"
+SRC_URI[md5sum] = "3c19adf32a8457983b71ff376ef7dafe"
+SRC_URI[sha256sum] = "413395d4bdc66fdedd6c993ed9083d1dd73812bf2a679d320f73de35c7801301"
-PARALLEL_MAKE = ""
+inherit multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
@@ -25,15 +27,12 @@ PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
do_configure () {
(
cd lib && \
- ${PCI_CONF_FLAG} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+ # EXTRA_OECONF for this recipe could only possibly contain 'HWDB=yes/no', so we put it
+ # before ./configure
+ ${PCI_CONF_FLAG} ${EXTRA_OECONF} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
)
}
-do_compile_prepend () {
- # Avoid this error: ln: failed to create symbolic link `libpci.so': File exists
- rm -f ${S}/lib/libpci.so
-}
-
export PREFIX = "${prefix}"
export SBINDIR = "${sbindir}"
export SHAREDIR = "${datadir}"
@@ -49,6 +48,8 @@ do_install () {
install -d ${D}${bindir}
ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+ oe_multilib_header pci/config.h
}
PACKAGES =+ "${PN}-ids libpci libpci-dev libpci-dbg"
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils.inc b/meta/recipes-bsp/pcmciautils/pcmciautils.inc
index eafe82045c..04056e39c6 100644
--- a/meta/recipes-bsp/pcmciautils/pcmciautils.inc
+++ b/meta/recipes-bsp/pcmciautils/pcmciautils.inc
@@ -1,5 +1,5 @@
SUMMARY = "Linux kernel userland utilities for the PCMCIA subsystem"
-HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
+HOMEPAGE = "https://www.kernel.org/pub/linux/utils/kernel/pcmcia/"
SECTION = "kernel/userland"
LICENSE = "GPLv2"
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "udev sysfsutils flex-native"
RDEPENDS_${PN} = "udev module-init-tools"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/pcmcia/pcmciautils-${PV}.tar.bz2"
+SRC_URI = "http://mirror.linux.org.au/linux/utils/kernel/pcmcia/${BP}.tar.bz2"
S = "${WORKDIR}/pcmciautils-${PV}"
diff --git a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
index 21d270442c..8d35187d63 100644
--- a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
+++ b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
@@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "8ed899032866d88b2933a1d34cc75e8ae42dcde20e1cc21836baaae3d4
inherit pkgconfig autotools
-RDEPENDS_${PN} = "grep"
+RDEPENDS_${PN} = "grep bash"
do_configure_prepend () {
( cd ${S}; autoreconf -f -i -s )
diff --git a/meta/recipes-bsp/setserial/setserial/ldflags.patch b/meta/recipes-bsp/setserial/setserial/ldflags.patch
new file mode 100644
index 0000000000..4313d2c797
--- /dev/null
+++ b/meta/recipes-bsp/setserial/setserial/ldflags.patch
@@ -0,0 +1,24 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- setserial-2.17.orig/Makefile.in
++++ setserial-2.17/Makefile.in
+@@ -13,6 +13,7 @@ STRIP = @STRIP@
+ CC = @CC@
+ RM = rm -f
+ CFLAGS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ DEFS = @DEFS@
+ INCS = -I.
+ TAR = tar
+@@ -20,7 +21,7 @@ TAR = tar
+ all: setserial setserial.cat
+
+ setserial: setserial.c
+- $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
++ $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
+
+ setserial.cat: setserial.8
+ nroff -man setserial.8 > setserial.cat
diff --git a/meta/recipes-bsp/setserial/setserial_2.17.bb b/meta/recipes-bsp/setserial/setserial_2.17.bb
index 65d6068d15..8dbddd7dc5 100644
--- a/meta/recipes-bsp/setserial/setserial_2.17.bb
+++ b/meta/recipes-bsp/setserial/setserial_2.17.bb
@@ -8,10 +8,13 @@ LICENSE = "GPLv2.0"
LIC_FILES_CHKSUM = "file://version.h;beginline=1;endline=6;md5=2e7c59cb9e57e356ae81f50f4e4dfd99"
PR = "r3"
+DEPENDS += "groff-native"
+
inherit autotools-brokensep
SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${BPN}-${PV}.tar.gz \
file://add_stdlib.patch \
+ file://ldflags.patch \
"
SRC_URI[md5sum] = "c4867d72c41564318e0107745eb7a0f2"
diff --git a/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch b/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch
deleted file mode 100644
index 77e35bbc7c..0000000000
--- a/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 5701384cea4a829b772bf7a96a74825b58c22385 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys@ti.com>
-Date: Thu, 17 Apr 2014 12:25:40 -0400
-Subject: [PATCH] am335x_evm.h: Add, use DEFAULT_LINUX_BOOT_ENV environment
- string
-
-Modified version of the patch currently being reviewed for mainline:
-http://patchwork.ozlabs.org/patch/334861/
-
-To deal with a reoccurring problem properly we need to specify addresses
-for the Linux kernel, Flatted Device Tree and ramdisk that obey the
-constraints within the kernel's Documentation/arm/Booting file but also
-make sure that we relocate things within a valid address range.
-
-Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-Signed-off-by: Tom Rini <trini@ti.com>
-
-Upstream-Status: Pending
----
- include/configs/am335x_evm.h | 31 ++++++++++++++++++++++++++-----
- 1 file changed, 26 insertions(+), 5 deletions(-)
-
-diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
-index c5a6d4b..01e32b3 100644
---- a/include/configs/am335x_evm.h
-+++ b/include/configs/am335x_evm.h
-@@ -54,10 +54,7 @@
- #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
- #ifndef CONFIG_SPL_BUILD
- #define CONFIG_EXTRA_ENV_SETTINGS \
-- "loadaddr=0x80200000\0" \
-- "fdtaddr=0x80F80000\0" \
-- "fdt_high=0xffffffff\0" \
-- "rdaddr=0x81000000\0" \
-+ DEFAULT_LINUX_BOOT_ENV \
- "bootdir=/boot\0" \
- "bootfile=uImage\0" \
- "fdtfile=undefined\0" \
-@@ -197,7 +194,31 @@
- #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
- + (8 * 1024 * 1024))
-
--#define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */
-+/*
-+ * Our DDR memory always starts at 0x80000000 and U-Boot shall have
-+ * relocated itself to higher in memory by the time this value is used.
-+ * However, set this to a 32MB offset to allow for easier Linux kernel
-+ * booting as the default is often used as the kernel load address.
-+ */
-+#define CONFIG_SYS_LOAD_ADDR 0x82000000 /* Default load address */
-+
-+/*
-+ * We setup defaults based on constraints from the Linux kernel, which should
-+ * also be safe elsewhere. We have the default load at 32MB into DDR (for
-+ * the kernel), FDT above 128MB (the maximum location for the end of the
-+ * kernel), and the ramdisk 512KB above that (allowing for hopefully never
-+ * seen large trees). We say all of this must be within the first 256MB
-+ * as that will normally be within the kernel lowmem and thus visible via
-+ * bootm_size and we only run on platforms with 256MB or more of memory.
-+ */
-+#define DEFAULT_LINUX_BOOT_ENV \
-+ "loadaddr=0x82000000\0" \
-+ "kernel_addr_r=0x82000000\0" \
-+ "fdtaddr=0x88000000\0" \
-+ "fdt_addr_r=0x88000000\0" \
-+ "rdaddr=0x88080000\0" \
-+ "ramdisk_addr_r=0x88080000\0" \
-+ "bootm_size=0x10000000\0"
-
- #define CONFIG_MMC
- #define CONFIG_GENERIC_MMC
---
-1.9.2
-
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb
deleted file mode 100644
index e6163972dc..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-inherit uboot-config cross
-
-EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
-
-do_compile () {
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake env
-}
-
-do_install () {
- install -d ${D}${bindir_cross}
- install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
- install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
-}
-
-SYSROOT_PREPROCESS_FUNCS = "uboot_fw_utils_cross"
-uboot_fw_utils_cross() {
- sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
deleted file mode 100644
index 89fed8bee4..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"'
-
-inherit uboot-config
-
-do_compile () {
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake env
-}
-
-do_install () {
- install -d ${D}${base_sbindir}
- install -d ${D}${sysconfdir}
- install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
- install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
- install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb
new file mode 100644
index 0000000000..9a304c8c5d
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb
@@ -0,0 +1,47 @@
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+SECTION = "bootloader"
+DEPENDS = "mtd-utils"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+inherit uboot-config
+
+do_compile () {
+ oe_runmake ${UBOOT_MACHINE}
+ oe_runmake env
+}
+
+do_install () {
+ install -d ${D}${base_sbindir}
+ install -d ${D}${sysconfdir}
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+ install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
+}
+
+do_install_class-cross () {
+ install -d ${D}${bindir_cross}
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
+}
+
+SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
+uboot_fw_utils_cross() {
+ sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb
deleted file mode 100644
index 2ca6050bf9..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
-
-do_compile () {
- oe_runmake tools
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
- ln -sf uboot-mkimage ${D}${bindir}/mkimage
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb
new file mode 100644
index 0000000000..eabf680ec6
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb
@@ -0,0 +1,34 @@
+SUMMARY = "U-Boot bootloader image creation tool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+SECTION = "bootloader"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
+
+do_compile () {
+ # Make sure the recompile is OK
+ rm -f ${B}/tools/.depend
+
+ make HOSTCC="${BUILD_CC}" HOSTLD="${BUILD_LD}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTSTRIP=true dot-config=0 scripts_basic
+ sed 's/^tools-only: scripts_basic /tools-only: /' -i Makefile
+ oe_runmake tools-only
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+ ln -sf uboot-mkimage ${D}${bindir}/mkimage
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 53c87c28f0..c695b73b48 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -3,6 +3,15 @@ HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
SECTION = "bootloaders"
PROVIDES = "virtual/bootloader"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit uboot-config deploy
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
@@ -14,7 +23,7 @@ UBOOT_LOCALVERSION ?= ""
# Some versions of u-boot use .bin and others use .img. By default use .bin
# but enable individual recipes to change this value.
-UBOOT_SUFFIX ?= "bin"
+UBOOT_SUFFIX ??= "bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot_2013.07.bb
deleted file mode 100644
index f8a88568d2..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require u-boot.inc
-
-# To build u-boot for your machine, provide the following lines in your machine
-# config, replacing the assignments as appropriate for your machine.
-# UBOOT_MACHINE = "omap3_beagle_config"
-# UBOOT_ENTRYPOINT = "0x80008000"
-# UBOOT_LOADADDRESS = "0x80008000"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
- file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
- file://0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch \
-"
-
-S = "${WORKDIR}/git"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot_2014.07.bb
new file mode 100644
index 0000000000..44cc52eb6c
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot_2014.07.bb
@@ -0,0 +1,9 @@
+require u-boot.inc
+
+DEPENDS += "dtc-native"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
diff --git a/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch b/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
new file mode 100644
index 0000000000..6455567174
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
@@ -0,0 +1,41 @@
+This patch adds support for detecting iconv support using autotools
+uclibc does not have iconv implementation inside libc like glibc, therefore
+the existing checks were not sufficient, it worked for glibc but not for
+uclibc. The new patch portably detects the iconv support and adds the
+libiconv to linker cmdline
+
+This patch should be submitted upstream too
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: usbutils-008/configure.ac
+===================================================================
+--- usbutils-008.orig/configure.ac
++++ usbutils-008/configure.ac
+@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+
+ AC_CHECK_HEADERS([byteswap.h])
+-AC_CHECK_FUNCS([nl_langinfo iconv])
++
++AM_GNU_GETTEXT
++AM_ICONV
+
+ PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
+
+Index: usbutils-008/Makefile.am
+===================================================================
+--- usbutils-008.orig/Makefile.am
++++ usbutils-008/Makefile.am
+@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
+
+ lsusb_LDADD = \
+ $(LIBUSB_LIBS) \
+- $(UDEV_LIBS)
++ $(UDEV_LIBS) \
++ $(LIBICONV)
+
+ man_MANS = \
+ lsusb.8 \
diff --git a/meta/recipes-bsp/usbutils/usbutils_008.bb b/meta/recipes-bsp/usbutils/usbutils_008.bb
new file mode 100644
index 0000000000..0f2d8d47c4
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils_008.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "libusb zlib virtual/libiconv systemd"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+ file://usb-devices-avoid-dependency-on-bash.patch \
+ file://Fix-NULL-pointer-crash.patch \
+ file://iconv.patch \
+ "
+
+SRC_URI[md5sum] = "cb20148c2e784577e924a7b4c560c8fb"
+SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
+
+inherit autotools gettext pkgconfig distro_features_check
+# This version of usbutils relies on the udev from systemd, so unless
+# we can decouple udev from system, we require systemd for now.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+
+RDEPENDS_${PN} = "libudev"
+RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
diff --git a/meta/recipes-bsp/v86d/v86d/uvesafb.conf b/meta/recipes-bsp/v86d/v86d/uvesafb.conf
new file mode 100644
index 0000000000..43789755d3
--- /dev/null
+++ b/meta/recipes-bsp/v86d/v86d/uvesafb.conf
@@ -0,0 +1,2 @@
+# Load uvesafb.ko at boot
+uvesafb
diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index b980331ac3..f50207212f 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -12,6 +12,7 @@ PR = "r2"
SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
file://Update-x86emu-from-X.org.patch \
file://fbsetup \
+ file://uvesafb.conf \
file://ar-from-env.patch"
SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
@@ -35,8 +36,34 @@ do_install () {
install -d ${D}${base_sbindir}
install v86d ${D}${base_sbindir}/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/fbsetup ${D}${sysconfdir}/init.d/fbsetup
+ # Only install fbsetup script if 'sysvinit' is in DISTRO_FEATURES
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/fbsetup ${D}${sysconfdir}/init.d/fbsetup
+ fi
+
+ # Install systemd related configuration file
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${sysconfdir}/modules-load.d
+ install -m 0644 ${WORKDIR}/uvesafb.conf ${D}${sysconfdir}/modules-load.d
+ fi
+}
+
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}
inherit update-rc.d
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask fbsetup.service
+ fi
+}
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
index 557c1c1651..eea4d70fab 100644
--- a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
@@ -45,7 +45,11 @@ RDEPENDS_python-avahi = "python-core python-dbus"
do_install_append () {
rm ${D}${sysconfdir} -rf
rm ${D}${base_libdir} -rf
- rm ${D}${base_libdir} -rf
+ rm ${D}${systemd_unitdir} -rf
+ # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
+ # but not ${base_libdir} here. And the /lib may not exist
+ # whithout systemd.
+ [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
rm ${D}${bindir}/avahi-b*
rm ${D}${bindir}/avahi-p*
rm ${D}${bindir}/avahi-r*
@@ -64,6 +68,5 @@ do_install_append () {
rm ${D}${mandir}/man1/a*
rm ${D}${mandir}/man5 -rf
rm ${D}${mandir}/man8 -rf
- rmdir ${D}${localstatedir}
}
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 3318f40384..b060437c12 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -73,6 +73,9 @@ do_configure_prepend() {
PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
+# As avahi doesn't put any files into PN, clear the files list to avoid problems
+# if extra libraries appear.
+FILES_avahi = ""
FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
${sysconfdir}/avahi/avahi-autoipd.action \
${sysconfdir}/dhcp/*/avahi-autoipd \
@@ -99,6 +102,8 @@ FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
FILES_avahi-utils = "${bindir}/avahi-*"
+RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})"
+
# uclibc has no nss
RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
@@ -122,7 +127,8 @@ do_install() {
# don't install /var/run when populating rootfs. Do it through volatile
# /var/run of current version is empty, so just remove it.
# if /var/run become non-empty in the future, need to install it via volatile
- rm -rf ${D}/var/run
+ rm -rf ${D}${localstatedir}/run
+ rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
rm -rf ${D}${datadir}/dbus-1/interfaces
rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
rm -rf ${D}${libdir}/avahi
diff --git a/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch b/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch
new file mode 100644
index 0000000000..4f1a3f8e89
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch
@@ -0,0 +1,35 @@
+From 8fa549fe5390875d56f75e20d364394cd5ccf388 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 3 Nov 2014 21:52:02 -0500
+Subject: [PATCH] bind: add crosscripts search path for xml2-config
+
+The configure script was testing xml2-config from bin but in openembedded
+bin folder is not copied to sysroot so the test was failing. Added another
+condition to test libxml-2.0.pc which is present in lib folder. Used pkg-config
+to get libs and cflags information.
+
+Upstream-Status: Inappropriate [ openembedded specific ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
+---
+ configure.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 3d04f4c..6032f67 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1433,6 +1433,9 @@ case "$use_libxml2" in
+ if test -f "$use_libxml2/bin/xml2-config" ; then
+ libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
+ libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
++ elif test -f "$use_libxml2/lib/pkgconfig/libxml-2.0.pc" ; then
++ libxml2_libs=`pkg-config libxml-2.0 --libs`
++ libxml2_cflags=`pkg-config libxml-2.0 --cflags`
+ fi
+ ;;
+ esac
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/bind/bind/bind9 b/meta/recipes-connectivity/bind/bind/bind9
new file mode 100644
index 0000000000..968679ff7f
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind9
@@ -0,0 +1,2 @@
+# startup options for the server
+OPTIONS="-u bind"
diff --git a/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch b/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
new file mode 100644
index 0000000000..62142d2313
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
@@ -0,0 +1,990 @@
+From 603a0e2637b35a2da820bc807f69bcf09c682dce Mon Sep 17 00:00:00 2001
+From: Evan Hunt <each@isc.org>
+Date: Mon, 17 Nov 2014 23:49:07 -0800
+Subject: [PATCH] [v9_9] limit recursion depth and iterative queries
+
+4006. [security] A flaw in delegation handling could be exploited
+ to put named into an infinite loop. This has
+ been addressed by placing limits on the number
+ of levels of recursion named will allow (default 7),
+ and the number of iterative queries that it will
+ send (default 50) before terminating a recursive
+ query (CVE-2014-8500).
+
+ The recursion depth limit is configured via the
+ "max-recursion-depth" option. [RT #35780]
+
+Upstream-Status: Backport
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+ bin/named/config.c | 3 +-
+ bin/named/include/named/query.h | 2 -
+ bin/named/query.c | 7 ++-
+ bin/named/server.c | 5 ++
+ bin/tests/system/many/clean.sh | 7 +++
+ bin/tests/system/many/ns1/named.conf | 33 +++++++++++++
+ bin/tests/system/many/ns2/named.conf | 30 ++++++++++++
+ bin/tests/system/many/ns3/named.conf | 32 +++++++++++++
+ bin/tests/system/many/ns4/named.conf | 30 ++++++++++++
+ bin/tests/system/many/ns5/hints.db | 2 +
+ bin/tests/system/many/ns5/named.conf | 29 ++++++++++++
+ bin/tests/system/many/setup.sh | 75 ++++++++++++++++++++++++++++++
+ bin/tests/system/many/tests.sh | 48 +++++++++++++++++++
+ doc/arm/Bv9ARM-book.xml | 12 +++++
+ lib/dns/adb.c | 58 ++++++++++++++++-------
+ lib/dns/include/dns/adb.h | 8 ++++
+ lib/dns/include/dns/resolver.h | 25 ++++++++++
+ lib/dns/resolver.c | 90 ++++++++++++++++++++++++++++++------
+ lib/isccfg/namedconf.c | 1 +
+ 20 files changed, 471 insertions(+), 37 deletions(-)
+ create mode 100644 bin/tests/system/many/clean.sh
+ create mode 100644 bin/tests/system/many/ns1/named.conf
+ create mode 100644 bin/tests/system/many/ns2/named.conf
+ create mode 100644 bin/tests/system/many/ns3/named.conf
+ create mode 100644 bin/tests/system/many/ns4/named.conf
+ create mode 100644 bin/tests/system/many/ns5/hints.db
+ create mode 100644 bin/tests/system/many/ns5/named.conf
+ create mode 100644 bin/tests/system/many/setup.sh
+ create mode 100644 bin/tests/system/many/tests.sh
+
+diff --git a/bin/named/config.c b/bin/named/config.c
+index 2782720..5ee8c4e 100644
+--- a/bin/named/config.c
++++ b/bin/named/config.c
+@@ -15,8 +15,6 @@
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: config.c,v 1.123 2012/01/06 23:46:41 tbox Exp $ */
+-
+ /*! \file */
+
+ #include <config.h>
+@@ -160,6 +158,7 @@ options {\n\
+ dnssec-accept-expired no;\n\
+ clients-per-query 10;\n\
+ max-clients-per-query 100;\n\
++ max-recursion-depth 7;\n\
+ zero-no-soa-ttl-cache no;\n\
+ nsec3-test-zone no;\n\
+ allow-new-zones no;\n\
+diff --git a/bin/named/include/named/query.h b/bin/named/include/named/query.h
+index 3beabb8..b5e3900 100644
+--- a/bin/named/include/named/query.h
++++ b/bin/named/include/named/query.h
+@@ -15,8 +15,6 @@
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: query.h,v 1.45 2011/01/13 04:59:24 tbox Exp $ */
+-
+ #ifndef NAMED_QUERY_H
+ #define NAMED_QUERY_H 1
+
+diff --git a/bin/named/query.c b/bin/named/query.c
+index 982f76d..47bfc6a 100644
+--- a/bin/named/query.c
++++ b/bin/named/query.c
+@@ -3877,12 +3877,11 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
+ peeraddr = &client->peeraddr;
+ else
+ peeraddr = NULL;
+- result = dns_resolver_createfetch2(client->view->resolver,
++ result = dns_resolver_createfetch3(client->view->resolver,
+ qname, qtype, qdomain, nameservers,
+ NULL, peeraddr, client->message->id,
+- client->query.fetchoptions,
+- client->task,
+- query_resume, client,
++ client->query.fetchoptions, 0,
++ client->task, query_resume, client,
+ rdataset, sigrdataset,
+ &client->query.fetch);
+
+diff --git a/bin/named/server.c b/bin/named/server.c
+index ac015a4..0559977 100644
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -3161,6 +3161,11 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
+ cfg_obj_asuint32(obj),
+ max_clients_per_query);
+
++ obj = NULL;
++ result = ns_config_get(maps, "max-recursion-depth", &obj);
++ INSIST(result == ISC_R_SUCCESS);
++ dns_resolver_setmaxdepth(view->resolver, cfg_obj_asuint32(obj));
++
+ #ifdef ALLOW_FILTER_AAAA_ON_V4
+ obj = NULL;
+ result = ns_config_get(maps, "filter-aaaa-on-v4", &obj);
+diff --git a/bin/tests/system/many/clean.sh b/bin/tests/system/many/clean.sh
+new file mode 100644
+index 0000000..119b1f5
+--- /dev/null
++++ b/bin/tests/system/many/clean.sh
+@@ -0,0 +1,7 @@
++rm -f ns1/[1-9]*example.tld?.db
++rm -f ns2/[1-9]*example.tld?.db
++rm -f ns1/zones.conf
++rm -f ns2/zones.conf
++rm -f */root.db
++rm -f ns3/tld1.db
++rm -f ns4/tld2.db
+diff --git a/bin/tests/system/many/ns1/named.conf b/bin/tests/system/many/ns1/named.conf
+new file mode 100644
+index 0000000..abc9dca
+--- /dev/null
++++ b/bin/tests/system/many/ns1/named.conf
+@@ -0,0 +1,33 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.1;
++ notify-source 10.53.0.1;
++ transfer-source 10.53.0.1;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.1; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++include "zones.conf";
++
++// zone "tld1" { type master; file "tld1.db"; };
++// zone "tld2" { type master; file "tld2.db"; };
+diff --git a/bin/tests/system/many/ns2/named.conf b/bin/tests/system/many/ns2/named.conf
+new file mode 100644
+index 0000000..16266e2
+--- /dev/null
++++ b/bin/tests/system/many/ns2/named.conf
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.2;
++ notify-source 10.53.0.2;
++ transfer-source 10.53.0.2;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.2; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++include "zones.conf";
+diff --git a/bin/tests/system/many/ns3/named.conf b/bin/tests/system/many/ns3/named.conf
+new file mode 100644
+index 0000000..b950afe
+--- /dev/null
++++ b/bin/tests/system/many/ns3/named.conf
+@@ -0,0 +1,32 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.3;
++ notify-source 10.53.0.3;
++ transfer-source 10.53.0.3;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.3; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++zone "." { type master; file "root.db"; };
++
++zone "tld1" { type master; file "tld1.db"; };
+diff --git a/bin/tests/system/many/ns4/named.conf b/bin/tests/system/many/ns4/named.conf
+new file mode 100644
+index 0000000..ca9aa6a
+--- /dev/null
++++ b/bin/tests/system/many/ns4/named.conf
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.4;
++ notify-source 10.53.0.4;
++ transfer-source 10.53.0.4;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.4; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++zone "tld2" { type master; file "tld2.db"; };
+diff --git a/bin/tests/system/many/ns5/hints.db b/bin/tests/system/many/ns5/hints.db
+new file mode 100644
+index 0000000..c05809b
+--- /dev/null
++++ b/bin/tests/system/many/ns5/hints.db
+@@ -0,0 +1,2 @@
++. 60 in ns ns.nil.
++ns.nil. 60 in A 10.53.0.3
+diff --git a/bin/tests/system/many/ns5/named.conf b/bin/tests/system/many/ns5/named.conf
+new file mode 100644
+index 0000000..fce7d59
+--- /dev/null
++++ b/bin/tests/system/many/ns5/named.conf
+@@ -0,0 +1,29 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.5;
++ notify-source 10.53.0.5;
++ transfer-source 10.53.0.5;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.5; };
++ listen-on-v6 { none; };
++};
++
++zone "." { type hint; file "hints.db"; };
+diff --git a/bin/tests/system/many/setup.sh b/bin/tests/system/many/setup.sh
+new file mode 100644
+index 0000000..80695b5
+--- /dev/null
++++ b/bin/tests/system/many/setup.sh
+@@ -0,0 +1,75 @@
++i=1
++
++cat > ns3/root.db << EOF
++. 60 in soa ns.nil. hostmaster.ns.nil. 1 0 0 0 0
++. 60 in ns ns.nil.
++ns.nil. 60 in a 10.53.0.3
++tld1. 60 in ns ns.tld1.
++ns.tld1. 60 in a 10.53.0.3
++tld2. 60 in ns ns.tld2.
++ns.tld2. 60 in a 10.53.0.4
++EOF
++
++cat > ns3/tld1.db << EOF
++tld1. 60 in soa ns.tld1. hostmaster.ns.tld1. 1 0 0 0 0
++tld1. 60 in ns ns.tld1.
++ns.tld1. 60 in a 10.53.0.1
++EOF
++
++cat > ns4/tld2.db << EOF
++tld2. 60 in soa ns.tld2. hostmaster.ns.tld4. 1 0 0 0 0
++tld2. 60 in ns ns.tld2.
++ns.tld2. 60 in a 10.53.0.1
++EOF
++
++: > ns1/zones.conf
++: > ns2/zones.conf
++
++while [ $i -lt 1000 ]
++do
++j=`expr $i + 1`
++s=`expr $j % 2 + 1`
++n=`expr $i % 2 + 1`
++t=`expr $s + 2`
++
++# i=1 j=2 s=1 n=2
++# i=2 j=3 s=1 n=2
++# i=3 j=4 s=1 n=2
++
++cat > ns1/${i}example.tld${s}.db << EOF
++${i}example.tld${s}. 60 in soa ns.${j}example.tld${n}. hostmaster 1 0 0 0 0
++${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
++
++cat >> ns1/zones.conf << EOF
++zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
++EOF
++
++cat >> ns${t}/tld${s}.db << EOF
++${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
++EOF
++
++i=$j
++
++done
++
++j=`expr $i + 1`
++s=`expr $j % 2 + 1`
++n=`expr $s % 2 + 1`
++t=`expr $s + 2`
++
++cat > ns1/${i}example.tld${s}.db << EOF
++${i}example.tld${s}. 60 in soa ns.${i}example.tld${s}. hostmaster 1 0 0 0 0
++${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
++
++cat >> ns1/zones.conf << EOF
++zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
++EOF
++
++cat >> ns${t}/tld${s}.db << EOF
++${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
+diff --git a/bin/tests/system/many/tests.sh b/bin/tests/system/many/tests.sh
+new file mode 100644
+index 0000000..37964e2
+--- /dev/null
++++ b/bin/tests/system/many/tests.sh
+@@ -0,0 +1,48 @@
++#!/bin/sh
++#
++# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++#
++# Permission to use, copy, modify, and/or distribute this software for any
++# purpose with or without fee is hereby granted, provided that the above
++# copyright notice and this permission notice appear in all copies.
++#
++# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
++# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
++# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
++# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++# PERFORMANCE OF THIS SOFTWARE.
++
++SYSTEMTESTTOP=..
++. $SYSTEMTESTTOP/conf.sh
++
++status=0
++n=0
++
++n=`expr $n + 1`
++echo "I: attempt lookup 1example.tld2 soa ($n)"
++ret=0
++$DIG +tcp 1example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++n=`expr $n + 1`
++echo "I: attempt lookup 992example.tld2 soa ($n)"
++ret=0
++$DIG +tcp 992example.tld2 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++n=`expr $n + 1`
++echo "I: attempt lookup 993example.tld1 soa ($n)"
++ret=0
++$DIG +tcp 993example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++echo "I:exit status: $status"
++exit $status
+diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
+index 9f7bd38..fff4249 100644
+--- a/doc/arm/Bv9ARM-book.xml
++++ b/doc/arm/Bv9ARM-book.xml
+@@ -4861,6 +4861,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]
+ <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
+ <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
+ <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
++ <optional> max-recursion-depth <replaceable>number</replaceable> ; </optional>
+ <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
+ <optional> empty-server <replaceable>name</replaceable> ; </optional>
+ <optional> empty-contact <replaceable>name</replaceable> ; </optional>
+@@ -8680,6 +8681,17 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
+ </listitem>
+ </varlistentry>
+
++ <varlistentry id="max-recursion-depth">
++ <term><command>max-recursion-depth</command></term>
++ <listitem>
++ <para>
++ Sets the maximum number of levels of recursion
++ permitted at any one time while resolving a name.
++ The default is 7.
++ </para>
++ </listitem>
++ </varlistentry>
++
+ <varlistentry>
+ <term><command>notify-delay</command></term>
+ <listitem>
+diff --git a/lib/dns/adb.c b/lib/dns/adb.c
+index 2ccb51e..fe9b3f7 100644
+--- a/lib/dns/adb.c
++++ b/lib/dns/adb.c
+@@ -199,6 +199,7 @@ struct dns_adbfetch {
+ unsigned int magic;
+ dns_fetch_t *fetch;
+ dns_rdataset_t rdataset;
++ unsigned int depth;
+ };
+
+ /*%
+@@ -300,7 +301,7 @@ static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
+ static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
+ static void clean_target(dns_adb_t *, dns_name_t *);
+ static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t,
+- unsigned int);
++ isc_uint32_t, unsigned int);
+ static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
+ static isc_boolean_t check_expire_entry(dns_adb_t *, dns_adbentry_t **,
+ isc_stdtime_t);
+@@ -308,7 +309,7 @@ static void cancel_fetches_at_name(dns_adbname_t *);
+ static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
+ dns_rdatatype_t);
+ static isc_result_t fetch_name(dns_adbname_t *, isc_boolean_t,
+- dns_rdatatype_t);
++ unsigned int, dns_rdatatype_t);
+ static inline void check_exit(dns_adb_t *);
+ static void destroy(dns_adb_t *);
+ static isc_boolean_t shutdown_names(dns_adb_t *);
+@@ -984,7 +985,7 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
+ * Clean up the name's various lists. These two are destructive
+ * in that they will always empty the list.
+ */
+- clean_finds_at_name(name, ev, DNS_ADBFIND_ADDRESSMASK);
++ clean_finds_at_name(name, ev, 0, DNS_ADBFIND_ADDRESSMASK);
+ result4 = clean_namehooks(adb, &name->v4);
+ result6 = clean_namehooks(adb, &name->v6);
+ clean_target(adb, &name->target);
+@@ -1409,7 +1410,7 @@ event_free(isc_event_t *event) {
+ */
+ static void
+ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
+- unsigned int addrs)
++ isc_uint32_t qtotal, unsigned int addrs)
+ {
+ isc_event_t *ev;
+ isc_task_t *task;
+@@ -1469,6 +1470,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
+ ev->ev_sender = find;
+ find->result_v4 = find_err_map[name->fetch_err];
+ find->result_v6 = find_err_map[name->fetch6_err];
++ find->qtotal += qtotal;
+ ev->ev_type = evtype;
+ ev->ev_destroy = event_free;
+ ev->ev_destroy_arg = find;
+@@ -1827,6 +1829,7 @@ new_adbfind(dns_adb_t *adb) {
+ h->flags = 0;
+ h->result_v4 = ISC_R_UNEXPECTED;
+ h->result_v6 = ISC_R_UNEXPECTED;
++ h->qtotal = 0;
+ ISC_LINK_INIT(h, publink);
+ ISC_LINK_INIT(h, plink);
+ ISC_LIST_INIT(h->list);
+@@ -2799,6 +2802,19 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ isc_stdtime_t now, dns_name_t *target,
+ in_port_t port, dns_adbfind_t **findp)
+ {
++ return (dns_adb_createfind2(adb, task, action, arg, name,
++ qname, qtype, options, now,
++ target, port, 0, findp));
++}
++
++isc_result_t
++dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
++ void *arg, dns_name_t *name, dns_name_t *qname,
++ dns_rdatatype_t qtype, unsigned int options,
++ isc_stdtime_t now, dns_name_t *target,
++ in_port_t port, unsigned int depth,
++ dns_adbfind_t **findp)
++{
+ dns_adbfind_t *find;
+ dns_adbname_t *adbname;
+ int bucket;
+@@ -3029,7 +3045,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ * Start V4.
+ */
+ if (WANT_INET(wanted_fetches) &&
+- fetch_name(adbname, start_at_zone,
++ fetch_name(adbname, start_at_zone, depth,
+ dns_rdatatype_a) == ISC_R_SUCCESS) {
+ DP(DEF_LEVEL,
+ "dns_adb_createfind: started A fetch for name %p",
+@@ -3040,7 +3056,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ * Start V6.
+ */
+ if (WANT_INET6(wanted_fetches) &&
+- fetch_name(adbname, start_at_zone,
++ fetch_name(adbname, start_at_zone, depth,
+ dns_rdatatype_aaaa) == ISC_R_SUCCESS) {
+ DP(DEF_LEVEL,
+ "dns_adb_createfind: "
+@@ -3656,6 +3672,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ isc_result_t result;
+ unsigned int address_type;
+ isc_boolean_t want_check_exit = ISC_FALSE;
++ isc_uint32_t qtotal = 0;
+
+ UNUSED(task);
+
+@@ -3666,6 +3683,8 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ adb = name->adb;
+ INSIST(DNS_ADB_VALID(adb));
+
++ qtotal = dev->qtotal;
++
+ bucket = name->lock_bucket;
+ LOCK(&adb->namelocks[bucket]);
+
+@@ -3783,6 +3802,12 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ DP(DEF_LEVEL, "adb: fetch of '%s' %s failed: %s",
+ buf, address_type == DNS_ADBFIND_INET ? "A" : "AAAA",
+ dns_result_totext(dev->result));
++ /*
++ * Don't record a failure unless this is the initial
++ * fetch of a chain.
++ */
++ if (fetch->depth > 1)
++ goto out;
+ /* XXXMLG Don't pound on bad servers. */
+ if (address_type == DNS_ADBFIND_INET) {
+ name->expire_v4 = ISC_MIN(name->expire_v4, now + 300);
+@@ -3814,15 +3839,14 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ free_adbfetch(adb, &fetch);
+ isc_event_free(&ev);
+
+- clean_finds_at_name(name, ev_status, address_type);
++ clean_finds_at_name(name, ev_status, qtotal, address_type);
+
+ UNLOCK(&adb->namelocks[bucket]);
+ }
+
+ static isc_result_t
+-fetch_name(dns_adbname_t *adbname,
+- isc_boolean_t start_at_zone,
+- dns_rdatatype_t type)
++fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
++ unsigned int depth, dns_rdatatype_t type)
+ {
+ isc_result_t result;
+ dns_adbfetch_t *fetch = NULL;
+@@ -3867,12 +3891,14 @@ fetch_name(dns_adbname_t *adbname,
+ result = ISC_R_NOMEMORY;
+ goto cleanup;
+ }
+-
+- result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
+- type, name, nameservers, NULL,
+- options, adb->task, fetch_callback,
+- adbname, &fetch->rdataset, NULL,
+- &fetch->fetch);
++ fetch->depth = depth;
++
++ result = dns_resolver_createfetch3(adb->view->resolver, &adbname->name,
++ type, name, nameservers, NULL,
++ NULL, 0, options, depth, adb->task,
++ fetch_callback, adbname,
++ &fetch->rdataset, NULL,
++ &fetch->fetch);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+
+diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h
+index 35350ff..7501f01 100644
+--- a/lib/dns/include/dns/adb.h
++++ b/lib/dns/include/dns/adb.h
+@@ -118,6 +118,8 @@ struct dns_adbfind {
+ isc_result_t result_v6; /*%< RO: v6 result */
+ ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
+
++ isc_uint32_t qtotal;
++
+ /* Private */
+ isc_mutex_t lock; /* locks all below */
+ in_port_t port;
+@@ -334,6 +336,12 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ dns_rdatatype_t qtype, unsigned int options,
+ isc_stdtime_t now, dns_name_t *target,
+ in_port_t port, dns_adbfind_t **find);
++isc_result_t
++dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
++ void *arg, dns_name_t *name, dns_name_t *qname,
++ dns_rdatatype_t qtype, unsigned int options,
++ isc_stdtime_t now, dns_name_t *target, in_port_t port,
++ unsigned int depth, dns_adbfind_t **find);
+ /*%<
+ * Main interface for clients. The adb will look up the name given in
+ * "name" and will build up a list of found addresses, and perhaps start
+diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h
+index 4e20eb6..c256049 100644
+--- a/lib/dns/include/dns/resolver.h
++++ b/lib/dns/include/dns/resolver.h
+@@ -82,6 +82,7 @@ typedef struct dns_fetchevent {
+ isc_sockaddr_t * client;
+ dns_messageid_t id;
+ isc_result_t vresult;
++ isc_uint32_t qtotal;
+ } dns_fetchevent_t;
+
+ /*
+@@ -275,6 +276,18 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *rdataset,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp);
++isc_result_t
++dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
++ dns_rdatatype_t type,
++ dns_name_t *domain, dns_rdataset_t *nameservers,
++ dns_forwarders_t *forwarders,
++ isc_sockaddr_t *client, isc_uint16_t id,
++ unsigned int options, unsigned int depth,
++ isc_task_t *task,
++ isc_taskaction_t action, void *arg,
++ dns_rdataset_t *rdataset,
++ dns_rdataset_t *sigrdataset,
++ dns_fetch_t **fetchp);
+ /*%<
+ * Recurse to answer a question.
+ *
+@@ -576,6 +589,18 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
+ * \li resolver to be valid.
+ */
+
++void
++dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
++unsigned int
++dns_resolver_getmaxdepth(dns_resolver_t *resolver);
++/*%
++ * Get and set how many NS indirections will be followed when looking for
++ * nameserver addresses.
++ *
++ * Requires:
++ * \li resolver to be valid.
++ */
++
+ ISC_LANG_ENDDECLS
+
+ #endif /* DNS_RESOLVER_H */
+diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
+index e517dad..6a635b2 100644
+--- a/lib/dns/resolver.c
++++ b/lib/dns/resolver.c
+@@ -131,6 +131,16 @@
+ #define MAXIMUM_QUERY_TIMEOUT 30 /* The maximum time in seconds for the whole query to live. */
+ #endif
+
++/* The default maximum number of recursions to follow before giving up. */
++#ifndef DEFAULT_RECURSION_DEPTH
++#define DEFAULT_RECURSION_DEPTH 7
++#endif
++
++/* The default maximum number of iterative queries to allow before giving up. */
++#ifndef DEFAULT_MAX_QUERIES
++#define DEFAULT_MAX_QUERIES 50
++#endif
++
+ /*%
+ * Maximum EDNS0 input packet size.
+ */
+@@ -297,6 +307,7 @@ struct fetchctx {
+ isc_uint64_t duration;
+ isc_boolean_t logged;
+ unsigned int querysent;
++ unsigned int totalqueries;
+ unsigned int referrals;
+ unsigned int lamecount;
+ unsigned int neterr;
+@@ -307,6 +318,7 @@ struct fetchctx {
+ isc_boolean_t timeout;
+ dns_adbaddrinfo_t *addrinfo;
+ isc_sockaddr_t *client;
++ unsigned int depth;
+ };
+
+ #define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
+@@ -419,6 +431,7 @@ struct dns_resolver {
+ isc_timer_t * spillattimer;
+ isc_boolean_t zero_no_soa_ttl;
+ unsigned int query_timeout;
++ unsigned int maxdepth;
+
+ /* Locked by lock. */
+ unsigned int references;
+@@ -1097,6 +1110,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) {
+ event->result == DNS_R_NCACHENXRRSET);
+ }
+
++ event->qtotal = fctx->totalqueries;
+ isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
+ count++;
+ }
+@@ -1537,7 +1551,9 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
+ if (result != ISC_R_SUCCESS)
+ goto cleanup_dispatch;
+ }
++
+ fctx->querysent++;
++ fctx->totalqueries++;
+
+ ISC_LIST_APPEND(fctx->queries, query, link);
+ query->fctx->nqueries++;
+@@ -2194,9 +2210,10 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
+ */
+ INSIST(!SHUTTINGDOWN(fctx));
+ fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
+- if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES)
++ if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES) {
+ want_try = ISC_TRUE;
+- else {
++ fctx->totalqueries += find->qtotal;
++ } else {
+ fctx->findfail++;
+ if (fctx->pending == 0) {
+ /*
+@@ -2479,12 +2496,13 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
+ * See what we know about this address.
+ */
+ find = NULL;
+- result = dns_adb_createfind(fctx->adb,
+- res->buckets[fctx->bucketnum].task,
+- fctx_finddone, fctx, name,
+- &fctx->name, fctx->type,
+- options, now, NULL,
+- res->view->dstport, &find);
++ result = dns_adb_createfind2(fctx->adb,
++ res->buckets[fctx->bucketnum].task,
++ fctx_finddone, fctx, name,
++ &fctx->name, fctx->type,
++ options, now, NULL,
++ res->view->dstport,
++ fctx->depth + 1, &find);
+ if (result != ISC_R_SUCCESS) {
+ if (result == DNS_R_ALIAS) {
+ /*
+@@ -2592,6 +2610,11 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
+
+ res = fctx->res;
+
++ if (fctx->depth > res->maxdepth) {
++ FCTXTRACE("too much NS indirection");
++ return (DNS_R_SERVFAIL);
++ }
++
+ /*
+ * Forwarders.
+ */
+@@ -3030,6 +3053,9 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
+
+ REQUIRE(!ADDRWAIT(fctx));
+
++ if (fctx->totalqueries > DEFAULT_MAX_QUERIES)
++ fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
++
+ addrinfo = fctx_nextaddress(fctx);
+ if (addrinfo == NULL) {
+ /*
+@@ -3388,6 +3414,7 @@ fctx_start(isc_task_t *task, isc_event_t *event) {
+ * Normal fctx startup.
+ */
+ fctx->state = fetchstate_active;
++ fctx->totalqueries = 0;
+ /*
+ * Reset the control event for later use in shutting down
+ * the fctx.
+@@ -3457,6 +3484,7 @@ fctx_join(fetchctx_t *fctx, isc_task_t *task, isc_sockaddr_t *client,
+ event->fetch = fetch;
+ event->client = client;
+ event->id = id;
++ event->qtotal = 0;
+ dns_fixedname_init(&event->foundname);
+
+ /*
+@@ -3493,7 +3521,8 @@ log_ns_ttl(fetchctx_t *fctx, const char *where) {
+ static isc_result_t
+ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ dns_name_t *domain, dns_rdataset_t *nameservers,
+- unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp)
++ unsigned int options, unsigned int bucketnum, unsigned int depth,
++ fetchctx_t **fctxp)
+ {
+ fetchctx_t *fctx;
+ isc_result_t result;
+@@ -3545,6 +3574,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ fctx->state = fetchstate_init;
+ fctx->want_shutdown = ISC_FALSE;
+ fctx->cloned = ISC_FALSE;
++ fctx->depth = depth;
+ ISC_LIST_INIT(fctx->queries);
+ ISC_LIST_INIT(fctx->finds);
+ ISC_LIST_INIT(fctx->altfinds);
+@@ -3563,6 +3593,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ fctx->pending = 0;
+ fctx->restarts = 0;
+ fctx->querysent = 0;
++ fctx->totalqueries = 0;
+ fctx->referrals = 0;
+ TIME_NOW(&fctx->start);
+ fctx->timeouts = 0;
+@@ -7781,6 +7812,7 @@ dns_resolver_create(dns_view_t *view,
+ res->spillattimer = NULL;
+ res->zero_no_soa_ttl = ISC_FALSE;
+ res->query_timeout = DEFAULT_QUERY_TIMEOUT;
++ res->maxdepth = DEFAULT_RECURSION_DEPTH;
+ res->nbuckets = ntasks;
+ res->activebuckets = ntasks;
+ res->buckets = isc_mem_get(view->mctx,
+@@ -8219,9 +8251,9 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp)
+ {
+- return (dns_resolver_createfetch2(res, name, type, domain,
++ return (dns_resolver_createfetch3(res, name, type, domain,
+ nameservers, forwarders, NULL, 0,
+- options, task, action, arg,
++ options, 0, task, action, arg,
+ rdataset, sigrdataset, fetchp));
+ }
+
+@@ -8237,6 +8269,25 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp)
+ {
++ return (dns_resolver_createfetch3(res, name, type, domain,
++ nameservers, forwarders, client, id,
++ options, 0, task, action, arg,
++ rdataset, sigrdataset, fetchp));
++}
++
++isc_result_t
++dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
++ dns_rdatatype_t type,
++ dns_name_t *domain, dns_rdataset_t *nameservers,
++ dns_forwarders_t *forwarders,
++ isc_sockaddr_t *client, dns_messageid_t id,
++ unsigned int options, unsigned int depth,
++ isc_task_t *task,
++ isc_taskaction_t action, void *arg,
++ dns_rdataset_t *rdataset,
++ dns_rdataset_t *sigrdataset,
++ dns_fetch_t **fetchp)
++{
+ dns_fetch_t *fetch;
+ fetchctx_t *fctx = NULL;
+ isc_result_t result = ISC_R_SUCCESS;
+@@ -8325,11 +8376,12 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+
+ if (fctx == NULL) {
+ result = fctx_create(res, name, type, domain, nameservers,
+- options, bucketnum, &fctx);
++ options, bucketnum, depth, &fctx);
+ if (result != ISC_R_SUCCESS)
+ goto unlock;
+ new_fctx = ISC_TRUE;
+- }
++ } else if (fctx->depth > depth)
++ fctx->depth = depth;
+
+ result = fctx_join(fctx, task, client, id, action, arg,
+ rdataset, sigrdataset, fetch);
+@@ -9101,3 +9153,15 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds) {
+
+ resolver->query_timeout = seconds;
+ }
++
++void
++dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth) {
++ REQUIRE(VALID_RESOLVER(resolver));
++ resolver->maxdepth = maxdepth;
++}
++
++unsigned int
++dns_resolver_getmaxdepth(dns_resolver_t *resolver) {
++ REQUIRE(VALID_RESOLVER(resolver));
++ return (resolver->maxdepth);
++}
+diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
+index bfd4bab..5f8b037 100644
+--- a/lib/isccfg/namedconf.c
++++ b/lib/isccfg/namedconf.c
+@@ -1393,6 +1393,7 @@ view_clauses[] = {
+ { "max-cache-ttl", &cfg_type_uint32, 0 },
+ { "max-clients-per-query", &cfg_type_uint32, 0 },
+ { "max-ncache-ttl", &cfg_type_uint32, 0 },
++ { "max-recursion-depth", &cfg_type_uint32, 0 },
+ { "max-udp-size", &cfg_type_uint32, 0 },
+ { "min-roots", &cfg_type_uint32, CFG_CLAUSEFLAG_NOTIMP },
+ { "minimal-responses", &cfg_type_boolean, 0 },
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/bind/bind/conf.patch b/meta/recipes-connectivity/bind/bind/conf.patch
index 2785c6a22f..aad345f9fc 100644
--- a/meta/recipes-connectivity/bind/bind/conf.patch
+++ b/meta/recipes-connectivity/bind/bind/conf.patch
@@ -55,6 +55,22 @@ diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
+ 86400 ) ; Negative Cache TTL
+;
+@ IN NS localhost.
+diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255
+--- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,12 @@
++;
++; BIND reserve data file for broadcast zone
++;
++$TTL 604800
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 604800 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
+++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
@@ -261,7 +277,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+ modprobe capability >/dev/null 2>&1 || true
+ if [ ! -f /etc/bind/rndc.key ]; then
+ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
-+ chown 0640 /etc/bind/rndc.key
++ chmod 0640 /etc/bind/rndc.key
+ fi
+ if [ -f /var/run/named/named.pid ]; then
+ ps `cat /var/run/named/named.pid` > /dev/null && exit 1
diff --git a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
index c2e88bf127..db201270fa 100644
--- a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
+++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -3,5 +3,5 @@
if [ ! -s /etc/bind/rndc.key ]; then
echo -n "Generating /etc/bind/rndc.key:"
/usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
- chown 0640 /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
fi
diff --git a/meta/recipes-connectivity/bind/bind/named.service b/meta/recipes-connectivity/bind/bind/named.service
index 1792e414ab..cda56ef015 100644
--- a/meta/recipes-connectivity/bind/bind/named.service
+++ b/meta/recipes-connectivity/bind/bind/named.service
@@ -6,7 +6,7 @@ After=network.target
[Service]
Type=forking
-EnvironmentFile=-/etc/sysconfig/named
+EnvironmentFile=-/etc/default/bind9
PIDFile=/run/named/named.pid
ExecStartPre=@SBINDIR@/generate-rndc-key.sh
diff --git a/meta/recipes-connectivity/bind/bind_9.9.5.bb b/meta/recipes-connectivity/bind/bind_9.9.5.bb
index de10eb8029..eacb23ffb8 100644
--- a/meta/recipes-connectivity/bind/bind_9.9.5.bb
+++ b/meta/recipes-connectivity/bind/bind_9.9.5.bb
@@ -15,7 +15,10 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://dont-test-on-host.patch \
file://generate-rndc-key.sh \
file://named.service \
+ file://bind9 \
file://init.d-add-support-for-read-only-rootfs.patch \
+ file://bind9_9_5-CVE-2014-8500.patch \
+ file://bind-add-crosscripts-search-path-for-xml2-config.patch \
"
SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
@@ -27,10 +30,18 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
--disable-devpoll --disable-epoll --with-gost=no \
--with-gssapi=no --with-ecdsa=yes \
--sysconfdir=${sysconfdir}/bind \
- --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
+ --with-openssl=${STAGING_LIBDIR}/.. \
--enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
"
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd useradd pkgconfig
+
+PACKAGECONFIG ?= "libxml2"
+
+PACKAGECONFIG[libxml2] = "--with-libxml2=${STAGING_LIBDIR}/..,--with-libxml2=no,libxml2"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
+ --user-group bind"
INITSCRIPT_NAME = "bind"
INITSCRIPT_PARAMS = "defaults"
@@ -41,11 +52,18 @@ PARALLEL_MAKE = ""
RDEPENDS_${PN} = "python-core"
-PACKAGES_prepend = " ${PN}-utils "
+PACKAGE_BEFORE_PN += "${PN}-utils"
FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
FILES_${PN}-dev += "${bindir}/isc-config.h"
FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
+do_install_prepend() {
+ # clean host path in isc-config.sh before the hardlink created
+ # by "make install":
+ # bind9-config -> isc-config.sh
+ sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${S}/isc-config.sh
+}
+
do_install_append() {
rm "${D}${bindir}/nslookup"
rm "${D}${mandir}/man1/nslookup.1"
@@ -67,6 +85,9 @@ do_install_append() {
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
${D}${systemd_unitdir}/system/named.service
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
}
CONFFILES_${PN} = " \
diff --git a/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb b/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
index 5c1f4760a8..3950630a86 100644
--- a/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
+++ b/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
@@ -3,7 +3,9 @@ DESCRIPTION = "The hcidump tool reads raw HCI data coming from and going to a Bl
and displays the commands, events and data in a human-readable form."
SECTION = "console"
+# hcidump was integrated into bluez5
DEPENDS = "bluez4"
+RCONFLICTS_${PN} = "bluez5"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
file://src/hcidump.c;beginline=1;endline=23;md5=3bee3a162dff43a5be7470710b99fbcf"
diff --git a/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb b/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
index f2dc0da06c..c71d61253a 100644
--- a/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
+++ b/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
@@ -25,6 +25,7 @@ do_install_append() {
rm -rf ${D}${libdir}/alsa-lib
rm -rf ${D}${datadir}
rm -rf ${D}${includedir}
+ rm -rf ${D}${nonarch_base_libdir}
}
FILES_${PN} = "${libdir}/gstreamer-0.10/lib*.so"
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index c3dd946517..67aafbbd6f 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -7,11 +7,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
+PROVIDES += "bluez-hcidump"
+RPROVIDES_${PN} += "bluez-hcidump"
RCONFLICTS_${PN} = "bluez4"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} obex-profiles"
PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
+PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
SRC_URI = "\
${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
@@ -26,10 +29,19 @@ EXTRA_OECONF = "\
--disable-cups \
--enable-test \
--enable-datafiles \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--disable-systemd', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
--enable-library \
"
+# bluez5 builds a large number of useful utilities but does not
+# install them. Specify which ones we want put into ${PN}-noinst-tools.
+NOINST_TOOLS_READLINE ??= ""
+NOINST_TOOLS_EXPERIMENTAL ??= ""
+NOINST_TOOLS = " \
+ ${NOINST_TOOLS_READLINE} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
+"
+
do_install_append() {
install -d ${D}${sysconfdir}/bluetooth/
if [ -f ${S}/profiles/audio/audio.conf ]; then
@@ -43,10 +55,15 @@ do_install_append() {
fi
# at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
+
+ # Install desired tools that upstream leaves in build area
+ for f in ${NOINST_TOOLS} ; do
+ install -m 755 ${B}/$f ${D}/${bindir}
+ done
}
ALLOW_EMPTY_libasound-module-bluez = "1"
-PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex"
+PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
@@ -63,6 +80,16 @@ SYSTEMD_SERVICE_${PN}-obex = "obex.service"
FILES_${PN}-testtools = "${libdir}/bluez/test/*"
+def get_noinst_tools_paths (d, bb, tools):
+ s = list()
+ bindir = d.getVar("bindir", True)
+ for bdp in tools.split():
+ f = os.path.basename(bdp)
+ s.append("%s/%s" % (bindir, f))
+ return "\n".join(s)
+
+FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
+
FILES_${PN}-dbg += "\
${libdir}/${BPN}/bluetooth/.debug \
${libdir}/bluetooth/plugins/.debug \
diff --git a/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf b/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
index e21e72e3ec..26845bb73c 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
+++ b/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
@@ -11,6 +11,7 @@
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
+ <allow send_type="method_call"/>
</policy>
</busconfig>
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.21.bb b/meta/recipes-connectivity/bluez5/bluez5_5.21.bb
deleted file mode 100644
index 5b0102e3f1..0000000000
--- a/meta/recipes-connectivity/bluez5/bluez5_5.21.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require bluez5.inc
-SRC_URI[md5sum] = "d5a0d05520e013f2394bf1d0bac12889"
-SRC_URI[sha256sum] = "81eb073516f39ff1fa02fa40120e834f40fdb0b772f8f4153a9ab566cc0a1f4f"
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.27.bb b/meta/recipes-connectivity/bluez5/bluez5_5.27.bb
new file mode 100644
index 0000000000..9497ee51a3
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5_5.27.bb
@@ -0,0 +1,51 @@
+require bluez5.inc
+SRC_URI[md5sum] = "a8fc508690e497e88c2c0b373cd653a8"
+SRC_URI[sha256sum] = "fbf33cebc76f8c81f28f0d67c71a8a1ec4b04b087460ec7353f7e0c207a1f981"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+ attrib/gatttool \
+ tools/obex-client-tool \
+ tools/obex-server-tool \
+ tools/bluetooth-player \
+ tools/obexctl \
+"
+
+# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
+# support
+NOINST_TOOLS_EXPERIMENTAL ?= " \
+ emulator/btvirt \
+ emulator/b1ee \
+ emulator/hfp \
+ tools/3dsp \
+ tools/mgmt-tester \
+ tools/gap-tester \
+ tools/l2cap-tester \
+ tools/sco-tester \
+ tools/smp-tester \
+ tools/hci-tester \
+ tools/rfcomm-tester \
+ tools/bdaddr \
+ tools/avinfo \
+ tools/avtest \
+ tools/scotest \
+ tools/amptest \
+ tools/hwdb \
+ tools/hcieventmask \
+ tools/hcisecfilter \
+ tools/btmgmt \
+ tools/btinfo \
+ tools/btattach \
+ tools/btsnoop \
+ tools/btproxy \
+ tools/btiotest \
+ tools/cltest \
+ tools/seq2bseq \
+ tools/hex2hcd \
+ tools/ibeacon \
+ tools/btgatt-client \
+ tools/btgatt-server \
+ tools/gatt-service \
+ profiles/iap/iapd \
+"
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index af726401e2..2358d9df09 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -9,6 +9,8 @@ SRC_URI_append_qemuall = "file://wired.config \
"
PR = "r2"
+S = "${WORKDIR}"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "${localstatedir}/* ${libdir}/*"
diff --git a/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch b/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch
new file mode 100644
index 0000000000..f4049fa3e2
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch
@@ -0,0 +1,187 @@
+connman-gnome: fix dbus interface name
+
+This patch resolves following error:
+
+"connman-dbus.xml": "connman" is not a valid D-Bus interface name
+
+https://502552.bugs.gentoo.org/attachment.cgi?id=380652
+
+Upstream-Status: Backport
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ common/connman-client.c | 24 ++++++++++++------------
+ common/connman-client.h | 4 ++--
+ common/connman-dbus.c | 6 +++---
+ common/connman-dbus.xml | 2 +-
+ 4 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/common/connman-client.c b/common/connman-client.c
+index c55e25c..9d818b2 100644
+--- a/common/connman-client.c
++++ b/common/connman-client.c
+@@ -289,7 +289,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
+
+ g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
+ g_value_set_boxed(&value, ipv4);
+- ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
++ ret = net_connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
+
+ g_object_unref(proxy);
+
+@@ -317,7 +317,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ g_value_set_boolean(&value, powered);
+
+ error = NULL;
+- connman_set_property(proxy, "Powered", &value, &error);
++ net_connman_set_property(proxy, "Powered", &value, &error);
+ if( error )
+ fprintf (stderr, "error: %s\n", error->message);
+
+@@ -325,7 +325,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ }
+
+ void connman_client_scan(ConnmanClient *client, const gchar *device,
+- connman_scan_reply callback, gpointer user_data)
++ net_connman_scan_reply callback, gpointer user_data)
+ {
+ ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
+ DBusGProxy *proxy;
+@@ -339,7 +339,7 @@ void connman_client_scan(ConnmanClient *client, const gchar *device,
+ if (proxy == NULL)
+ return;
+
+- connman_scan_async(proxy, callback, user_data);
++ net_connman_scan_async(proxy, callback, user_data);
+
+ g_object_unref(proxy);
+ }
+@@ -353,7 +353,7 @@ gboolean connman_client_get_offline_status(ConnmanClient *client)
+
+ DBG("client %p", client);
+
+- ret = connman_get_properties(priv->manager, &hash, NULL);
++ ret = net_connman_get_properties(priv->manager, &hash, NULL);
+
+ if (ret == FALSE)
+ goto done;
+@@ -375,7 +375,7 @@ void connman_client_set_offlinemode(ConnmanClient *client, gboolean status)
+ g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_set_boolean(&value, status);
+
+- connman_set_property(priv->manager, "OfflineMode", &value, NULL);
++ net_connman_set_property(priv->manager, "OfflineMode", &value, NULL);
+ }
+
+ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
+@@ -398,7 +398,7 @@ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
+ return TRUE;
+
+ if (type == CONNMAN_TYPE_WIFI)
+- connman_disconnect(proxy, NULL);
++ net_connman_disconnect(proxy, NULL);
+
+ g_object_unref(proxy);
+
+@@ -422,13 +422,13 @@ void connman_client_connect(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_connect(proxy, NULL);
++ net_connman_connect(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+
+ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+- connman_connect_reply callback, gpointer userdata)
++ net_connman_connect_reply callback, gpointer userdata)
+ {
+ ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
+ DBusGProxy *proxy;
+@@ -446,7 +446,7 @@ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+ if (proxy == NULL)
+ goto done;
+
+- connman_connect_async(proxy, callback, userdata);
++ net_connman_connect_async(proxy, callback, userdata);
+
+ done:
+ return;
+@@ -476,7 +476,7 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_disconnect(proxy, NULL);
++ net_connman_disconnect(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+@@ -532,7 +532,7 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_remove(proxy, NULL);
++ net_connman_remove(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+diff --git a/common/connman-client.h b/common/connman-client.h
+index 9e2e6d5..98241de 100644
+--- a/common/connman-client.h
++++ b/common/connman-client.h
+@@ -70,13 +70,13 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
+ struct ipv4_config *ipv4_config);
+ void connman_client_scan(ConnmanClient *client, const gchar *device,
+- connman_scan_reply callback, gpointer user_data);
++ net_connman_scan_reply callback, gpointer user_data);
+
+ void connman_client_connect(ConnmanClient *client, const gchar *network);
+ void connman_client_disconnect(ConnmanClient *client, const gchar *network);
+ gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
+ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+- connman_connect_reply callback, gpointer userdata);
++ net_connman_connect_reply callback, gpointer userdata);
+ void connman_client_set_remember(ConnmanClient *client, const gchar *network,
+ gboolean remember);
+
+diff --git a/common/connman-dbus.c b/common/connman-dbus.c
+index b82b3e1..543eb43 100644
+--- a/common/connman-dbus.c
++++ b/common/connman-dbus.c
+@@ -655,15 +655,15 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
+
+ DBG("getting manager properties");
+
+- connman_get_properties_async(proxy, manager_properties, store);
++ net_connman_get_properties_async(proxy, manager_properties, store);
+
+ DBG("getting technologies");
+
+- connman_get_technologies_async(proxy, manager_technologies, store);
++ net_connman_get_technologies_async(proxy, manager_technologies, store);
+
+ DBG("getting services");
+
+- connman_get_services_async(proxy, manager_services, store);
++ net_connman_get_services_async(proxy, manager_services, store);
+
+ return proxy;
+ }
+diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
+index 56b9582..0199d52 100644
+--- a/common/connman-dbus.xml
++++ b/common/connman-dbus.xml
+@@ -1,7 +1,7 @@
+ <?xml version="1.0" encoding="UTF-8" ?>
+
+ <node name="/">
+- <interface name="connman">
++ <interface name="net.connman">
+ <method name="GetProperties">
+ <arg type="a{sv}" direction="out"/>
+ </method>
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
index 6688739766..f5575d2938 100644
--- a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
+++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
@@ -11,9 +11,10 @@ DEPENDS = "gtk+ dbus-glib intltool-native"
# 0.7 tag
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
SRC_URI = "git://github.com/connectivity/connman-gnome.git \
- file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
- file://null_check_for_ipv4_config.patch \
- file://images/* \
+ file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
+ file://null_check_for_ipv4_config.patch \
+ file://images/* \
+ file://connman-gnome-fix-dbus-interface-name.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index f121a81f1e..736b324704 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -27,10 +27,10 @@ EXTRA_OECONF += "\
--enable-test \
--disable-polkit \
--enable-client \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
"
PACKAGECONFIG ??= "wispr \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g','3g', '', d)} \
@@ -40,6 +40,7 @@ PACKAGECONFIG ??= "wispr \
# local.conf or distro config
# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp"
+PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant"
PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4"
PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono"
@@ -66,18 +67,18 @@ SYSTEMD_SERVICE_${PN} = "connman.service"
SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
-inherit autotools-brokensep pkgconfig systemd update-rc.d
+inherit autotools pkgconfig systemd update-rc.d
do_configure_append () {
- sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service
+ sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${B}/src/connman.service
}
# This allows *everyone* to access ConnMan over DBus, without any access
# control. Really the at_console flag should work, which would mean that
# both this and the xuser patch can be dropped.
do_compile_append() {
- sed -i -e s:deny:allow:g src/connman-dbus.conf
- sed -i -e s:deny:allow:g vpn/vpn-dbus.conf
+ sed -i -e s:deny:allow:g ${S}/src/connman-dbus.conf
+ sed -i -e s:deny:allow:g ${S}/vpn/vpn-dbus.conf
}
do_install_append() {
@@ -88,9 +89,9 @@ do_install_append() {
fi
install -d ${D}${bindir}
- install -m 0755 ${S}/tools/*-test ${D}${bindir}
- if [ -e ${S}/tools/wispr ]; then
- install -m 0755 ${S}/tools/wispr ${D}${bindir}
+ install -m 0755 ${B}/tools/*-test ${D}${bindir}
+ if [ -e ${B}/tools/wispr ]; then
+ install -m 0755 ${B}/tools/wispr ${D}${bindir}
fi
install -m 0755 ${B}/client/connmanctl ${D}${bindir}
diff --git a/meta/recipes-connectivity/connman/connman_1.24.bb b/meta/recipes-connectivity/connman/connman_1.26.bb
index 66a8c58681..7c0c4f7863 100644
--- a/meta/recipes-connectivity/connman/connman_1.24.bb
+++ b/meta/recipes-connectivity/connman/connman_1.26.bb
@@ -5,7 +5,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://add_xuser_dbus_permission.patch \
file://connman \
"
-SRC_URI[md5sum] = "dd6e1b4d9b9a28d127edb9f9b58bdec1"
-SRC_URI[sha256sum] = "551df7a5f0c6e4d69523dd2b3aa2c54525b323457d5135f64816215bad3dc24c"
+SRC_URI[md5sum] = "ba05b110b7c81e5fa14e8b402ef37a9e"
+SRC_URI[sha256sum] = "7184e4b6d954449ee00a30e188924b3e37a20ad2fd9a0b76a2bdd82c863dcf8a"
RRECOMMENDS_${PN} = "connman-conf"
+
+PR = "r1"
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index 512127cd4c..6ced77500a 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -13,12 +13,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1
DEPENDS = "openssl bind"
SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
- file://site.h \
- file://init-relay file://default-relay \
- file://init-server file://default-server \
- file://dhclient.conf file://dhcpd.conf"
+ file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
+ file://init-relay file://default-relay \
+ file://init-server file://default-server \
+ file://dhclient.conf file://dhcpd.conf \
+ file://dhcpd.service file://dhcrelay.service"
-inherit autotools
+inherit autotools systemd
+
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
+SYSTEMD_SERVICE_${PN}-server = "dhcpd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
+
+SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
+SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
TARGET_CFLAGS += "-D_GNU_SOURCE"
EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
@@ -28,10 +36,6 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
--with-libbind=${STAGING_LIBDIR}/ \
"
-do_compile_prepend () {
- cp -f ${WORKDIR}/site.h ${S}/includes
-}
-
do_install_append () {
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default
@@ -51,6 +55,13 @@ do_install_append () {
mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
fi
install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service ${D}${systemd_unitdir}/system/dhcrelay.service
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd.service
}
PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
diff --git a/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
new file mode 100644
index 0000000000..12d3c9bdbd
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -0,0 +1,26 @@
+define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
+
+Upstream-Status: inappropriate <oe specific>
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ includes/site.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/includes/site.h b/includes/site.h
+index d87b309..17bc40d 100644
+--- a/includes/site.h
++++ b/includes/site.h
+@@ -139,7 +139,8 @@
+ /* Define this if you want the dhcpd.conf file to go somewhere other than
+ the default location. By default, it goes in /etc/dhcpd.conf. */
+
+-/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
++#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
++#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
+
+ /* Network API definitions. You do not need to choose one of these - if
+ you don't choose, one will be chosen for you in your system's config
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
index e686afd2d2..14e75a37ea 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -4,47 +4,32 @@ Upstream-Status: Pending
RP 2013/03/21
-Index: dhcp-4.2.5/common/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/common/Makefile.am 2013-03-21 12:54:11.345063519 +0000
-+++ dhcp-4.2.5/common/Makefile.am 2013-03-21 12:54:11.805063510 +0000
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
-+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
- AM_CFLAGS = $(LDAP_CFLAGS)
-
- noinst_LIBRARIES = libdhcp.a
-Index: dhcp-4.2.5/dst/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/dst/Makefile.am 2013-03-21 12:54:11.345063519 +0000
-+++ dhcp-4.2.5/dst/Makefile.am 2013-03-21 12:54:11.805063510 +0000
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
-+AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
-
- lib_LIBRARIES = libdst.a
-
-Index: dhcp-4.2.5/omapip/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/omapip/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/omapip/Makefile.am 2013-03-21 12:54:11.809063510 +0000
-@@ -1,3 +1,5 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/includes
-+
- lib_LIBRARIES = libomapi.a
- noinst_PROGRAMS = svtest
+Rebase to 4.3.1
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/Makefile.am | 6 ++++--
+ common/Makefile.am | 2 +-
+ dhcpctl/Makefile.am | 2 ++
+ dst/Makefile.am | 2 +-
+ omapip/Makefile.am | 2 ++
+ relay/Makefile.am | 2 +-
+ server/Makefile.am | 2 +-
+ 7 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 8411960..1740f72 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -4,6 +4,8 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
-Index: dhcp-4.2.5/client/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/client/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/client/Makefile.am 2013-03-21 12:54:11.809063510 +0000
-@@ -1,3 +1,5 @@
+AM_CPPFLAGS = -I$(top_srcdir)/includes
+
dist_sysconf_DATA = dhclient.conf.example
sbin_PROGRAMS = dhclient
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
-@@ -11,8 +13,8 @@
+@@ -17,8 +19,8 @@ EXTRA_DIST = $(man_MANS)
dhclient.o: dhclient.c
$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
@@ -55,30 +40,60 @@ Index: dhcp-4.2.5/client/Makefile.am
$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhc6.c
-Index: dhcp-4.2.5/dhcpctl/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/dhcpctl/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/dhcpctl/Makefile.am 2013-03-21 12:54:11.809063510 +0000
+diff --git a/common/Makefile.am b/common/Makefile.am
+index eddef05..5ce045f 100644
+--- a/common/Makefile.am
++++ b/common/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
+ AM_CFLAGS = $(LDAP_CFLAGS)
+
+ noinst_LIBRARIES = libdhcp.a
+diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
+index 2987a53..cd72d75 100644
+--- a/dhcpctl/Makefile.am
++++ b/dhcpctl/Makefile.am
@@ -1,3 +1,5 @@
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
+
bin_PROGRAMS = omshell
lib_LIBRARIES = libdhcpctl.a
noinst_PROGRAMS = cltest
-Index: dhcp-4.2.5/relay/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/relay/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/relay/Makefile.am 2013-03-21 12:54:11.809063510 +0000
+diff --git a/dst/Makefile.am b/dst/Makefile.am
+index 8937fe8..a14798b 100644
+--- a/dst/Makefile.am
++++ b/dst/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
++AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
+
+ lib_LIBRARIES = libdst.a
+
+diff --git a/omapip/Makefile.am b/omapip/Makefile.am
+index 5074479..9c0fab3 100644
+--- a/omapip/Makefile.am
++++ b/omapip/Makefile.am
+@@ -1,3 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/includes
++
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+
+diff --git a/relay/Makefile.am b/relay/Makefile.am
+index ec72a31..f842071 100644
+--- a/relay/Makefile.am
++++ b/relay/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
sbin_PROGRAMS = dhcrelay
dhcrelay_SOURCES = dhcrelay.c
-Index: dhcp-4.2.5/server/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/server/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/server/Makefile.am 2013-03-21 12:55:01.509062081 +0000
+diff --git a/server/Makefile.am b/server/Makefile.am
+index a446f0b..d0b873a 100644
+--- a/server/Makefile.am
++++ b/server/Makefile.am
@@ -4,7 +4,7 @@
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
@@ -88,3 +103,6 @@ Index: dhcp-4.2.5/server/Makefile.am
dist_sysconf_DATA = dhcpd.conf.example
sbin_PROGRAMS = dhcpd
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
new file mode 100644
index 0000000000..61dd6a7186
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
@@ -0,0 +1,176 @@
+Found this patch here:
+https://lists.isc.org/pipermail/dhcp-users/2011-January/012910.html
+
+and made some adjustments/updates to make it work with this version.
+Wasn't able to find that why this patch was not accepted by ISC DHCP developers.
+
+Upstream-Status: Pending
+
+Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
+
+--- dhcp-4.2.5-P1/client/scripts/linux.orig 2013-09-04 12:22:55.000000000 +0500
++++ dhcp-4.2.5-P1/client/scripts/linux 2013-09-04 12:52:19.068761518 +0500
+@@ -103,17 +103,11 @@
+ if [ x$old_broadcast_address != x ]; then
+ old_broadcast_arg="broadcast $old_broadcast_address"
+ fi
+-if [ x$new_subnet_mask != x ]; then
+- new_subnet_arg="netmask $new_subnet_mask"
+-fi
+-if [ x$old_subnet_mask != x ]; then
+- old_subnet_arg="netmask $old_subnet_mask"
+-fi
+-if [ x$alias_subnet_mask != x ]; then
+- alias_subnet_arg="netmask $alias_subnet_mask"
++if [ -n "$new_subnet_mask" ]; then
++ new_mask="/$new_subnet_mask"
+ fi
+-if [ x$new_interface_mtu != x ]; then
+- mtu_arg="mtu $new_interface_mtu"
++if [ -n "$alias_subnet_mask" ]; then
++ alias_mask="/$alias_subnet_mask"
+ fi
+ if [ x$IF_METRIC != x ]; then
+ metric_arg="metric $IF_METRIC"
+@@ -127,9 +121,9 @@
+ if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+- ifconfig $interface:0- inet 0
++ ${ip} -4 addr flush dev ${interface} label ${interface}:0
+ fi
+- ifconfig $interface 0 up
++ ${ip} link set dev ${interface} up
+
+ # We need to give the kernel some time to get the interface up.
+ sleep 1
+@@ -156,25 +150,30 @@
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+- ifconfig $interface:0- inet 0
++ ${ip} -4 addr flush dev ${interface} label ${interface}:0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+ # IP address changed. Bringing down the interface will delete all routes,
+ # and clear the ARP cache.
+- ifconfig $interface inet 0 down
++ ${ip} -4 addr flush dev ${interface} label ${interface}
+
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+- ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg $mtu_arg
++ ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
++ dev ${interface} label ${interface}
++ if [ -n "$new_interface_mtu" ]; then
++ # set MTU
++ ${ip} link set dev ${interface} mtu ${new_interface_mtu}
++ fi
+ # Add a network route to the computed network address.
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+- route add -host $router dev $interface
++ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
+ fi
+- route add default gw $router $metric_arg dev $interface
++ ${ip} -4 route add default via ${router} dev ${interface} \
++ ${metric_arg} >/dev/null 2>&1
+ done
+ else
+ # we haven't changed the address, have we changed other options
+@@ -182,21 +181,23 @@
+ if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
+ # if we've changed routers delete the old and add the new.
+ for router in $old_routers; do
+- route del default gw $router
++ ${ip} -4 route delete default via ${router}
+ done
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+- route add -host $router dev $interface
+- fi
+- route add default gw $router $metric_arg dev $interface
++ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
++ fi
++ ${ip} -4 route add default via ${router} dev ${interface} \
++ ${metric_arg} >/dev/null 2>&1
+ done
+ fi
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+- ifconfig $interface:0- inet 0
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
++ ${ip} -4 addr flush dev ${interface} label ${interface}:0
++ ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
++ dev ${interface} label ${interface}:0
++ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+ fi
+ make_resolv_conf
+ exit_with_hooks 0
+@@ -206,42 +207,49 @@
+ || [ x$reason = xSTOP ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Turn off alias interface.
+- ifconfig $interface:0- inet 0
++ ${ip} -4 addr flush dev ${interface} label ${interface}:0
+ fi
+ if [ x$old_ip_address != x ]; then
+ # Shut down interface, which will delete routes and clear arp cache.
+- ifconfig $interface inet 0 down
++ ${ip} -4 addr flush dev ${interface} label ${interface}
+ fi
+ if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address $interface:0
++ ${ip} -4 addr add ${alias_ip_address}${alias_network_arg} \
++ dev ${interface} label ${interface}:0
++ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+ fi
+ exit_with_hooks 0
+ fi
+
+ if [ x$reason = xTIMEOUT ]; then
+ if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0- inet 0
++ ${ip} -4 addr flush dev ${interface} label ${interface}:0
++ fi
++ ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
++ dev ${interface} label ${interface}
++ if [ -n "$new_interface_mtu" ]; then
++ # set MTU
++ ip link set dev ${interface} mtu ${new_interface_mtu}
+ fi
+- ifconfig $interface inet $new_ip_address $new_subnet_arg \
+- $new_broadcast_arg $mtu_arg
+ set $new_routers
+ if ping -q -c 1 $1; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+- route add -host $alias_ip_address dev $interface:0
++ ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
++ dev ${interface} label ${interface}:0
++ ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+ fi
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+- route add -host $router dev $interface
++ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
+ fi
+- route add default gw $router $metric_arg dev $interface
++ ${ip} -4 route add default via ${router} dev ${interface} \
++ ${metric_arg} >/dev/null 2>&1
+ done
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+- ifconfig $interface inet 0 down
++ ${ip} -4 addr flush dev ${interface}
+ exit_with_hooks 1
+ fi
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/site.h b/meta/recipes-connectivity/dhcp/dhcp/site.h
deleted file mode 100644
index 2289554ef3..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/site.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * define config file location in ${S}/includes/site.h
- * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
- *
- * 7/22/2010 - qhe
- */
-
-/* Define this if you want DNS update functionality to be available. */
-
-#define NSUPDATE
-
-/* Define this if you aren't debugging and you want to save memory
- (potentially a _lot_ of memory) by allocating leases in chunks rather
- than one at a time. */
-
-#define COMPACT_LEASES
-
-
-/* local */
-#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
-#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb
index 6da28faf50..3f82a25fd2 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb
@@ -5,7 +5,8 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
file://link-with-lcrypto.patch \
file://fixsepbuild.patch \
file://dhclient-script-drop-resolv.conf.dhclient.patch \
+ file://replace-ifconfig-route.patch \
"
-SRC_URI[md5sum] = "1020d77e1a4c1f01b76279caff9beb80"
-SRC_URI[sha256sum] = "a7b6517d5cf32c5e49d2323a63de00efe5391df7cb0045dfa0ec8f6ee46ebe8a"
+SRC_URI[md5sum] = "b3a42ece3c7f2cd2e74a3e12ca881d20"
+SRC_URI[sha256sum] = "266cbca8a7a6bb8f9ccc5765da0d2b04099329314a54a4fc1022d510ad3e9af0"
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.service b/meta/recipes-connectivity/dhcp/files/dhcpd.service
new file mode 100644
index 0000000000..8648f1a253
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DHCP Server Daemon
+After=network.target
+After=time-sync.target
+
+[Service]
+EnvironmentFile=@SYSCONFDIR@/default/dhcp-server
+ExecStart=-@SBINDIR@/dhcpd -q $INTERFACES
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/dhcrelay.service b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
new file mode 100644
index 0000000000..a2d818917d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/dhcrelay -d --no-pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb
index 7cf9115b9c..d12b33fbd1 100644
--- a/meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb
+++ b/meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb
@@ -4,8 +4,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
file://configure-cross.patch \
file://0001-iproute2-de-bash-scripts.patch \
"
-SRC_URI[md5sum] = "5b1711c9d16071959052e369a2682d77"
-SRC_URI[sha256sum] = "5359ed1f31839d8542a057c0c4233131ab9c28d8c41fc9c8484579d9c0b99af4"
+SRC_URI[md5sum] = "b741a02c6dda5818d18011d572874493"
+SRC_URI[sha256sum] = "09e406636e7598e46d5d4f7b928bf5db57049d65dbeb9a496005957ee16f6000"
# CFLAGS are computed in Makefile and reference CCOPTS
#
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
new file mode 100644
index 0000000000..2cdd1ac08b
--- /dev/null
+++ b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
@@ -0,0 +1,75 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- irda-utils-0.9.18.orig/findchip/Makefile
++++ irda-utils-0.9.18/findchip/Makefile
+@@ -65,5 +65,5 @@ install: findchip
+
+ gfindchip: gfindchip.c
+ $(prn_cc)
+- $(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
+
+--- irda-utils-0.9.18.orig/irattach/Makefile
++++ irda-utils-0.9.18/irattach/Makefile
+@@ -49,13 +49,13 @@ all: $(TARGETS)
+
+ irattach: irattach.o util.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) irattach.o util.o -o $@
+
+
+
+ dongle_attach: dongle_attach.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) dongle_attach.o -o $@
+
+
+ install: $(TARGETS)
+--- irda-utils-0.9.18.orig/irdadump/Makefile
++++ irda-utils-0.9.18/irdadump/Makefile
+@@ -40,7 +40,7 @@ lib_irdadump.a: $(LIBIRDADUMP_OBJS)
+
+ irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
+
+
+ .c.o:
+--- irda-utils-0.9.18.orig/irdaping/Makefile
++++ irda-utils-0.9.18/irdaping/Makefile
+@@ -56,7 +56,7 @@ all: $(TARGETS)
+
+ irdaping: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
+
+
+ .c.o:
+--- irda-utils-0.9.18.orig/irnetd/Makefile
++++ irda-utils-0.9.18/irnetd/Makefile
+@@ -50,7 +50,7 @@ all: $(TARGETS)
+
+ irnetd: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
+
+
+ install: irnetd
+--- irda-utils-0.9.18.orig/psion/Makefile
++++ irda-utils-0.9.18/psion/Makefile
+@@ -25,4 +25,4 @@ install: $(PSION_TARGETS)
+ CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
+ irpsion5:
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
+\ No newline at end of file
++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(PSION_SRC) -o $@
+\ No newline at end of file
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
index 7403dc95da..bd60b9f1e6 100644
--- a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
+++ b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
@@ -12,21 +12,29 @@ LIC_FILES_CHKSUM = "file://irdadump/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f
file://irdadump/irdadump.c;beginline=1;endline=24;md5=d78b9dce3cd78c2220250c9c7a2be178"
SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
- file://init"
+ file://ldflags.patch \
+ file://init"
SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb"
SRC_URI[sha256sum] = "61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6"
-export SYS_INCLUDES="-I${STAGING_INCDIR}"
+inherit update-rc.d
-inherit autotools-brokensep update-rc.d
+EXTRA_OEMAKE = "\
+ 'CC=${CC}' \
+ 'LD=${LD}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+ 'SYS_INCLUDES=' \
+ 'V=1' \
+"
INITSCRIPT_NAME = "irattach"
INITSCRIPT_PARAMS = "defaults 20"
do_compile () {
- oe_runmake -e -C irattach
- oe_runmake -e -C irdaping
+ oe_runmake -C irattach
+ oe_runmake -C irdaping
}
do_install () {
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 5b8c700411..0b936ef092 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -26,13 +26,13 @@ DEBIANNAME_${PN} = "libnss-mdns"
RDEPENDS_${PN} = "avahi-daemon"
pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns4\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns4\5/' \
- -i $D/etc/nsswitch.conf
+ sed -e '/^hosts:/s/\s*\<mdns\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
}
pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns4\>//' \
+ sed -e '/^hosts:/s/\s*\<mdns\>//' \
-e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
index 8a9fa9eca1..a12eb16615 100644
--- a/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -7,17 +7,17 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
SECTION = "libs/network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
- file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
-DEPENDS = "flex-native bison-native libnl"
+ file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
+DEPENDS = "flex-native bison-native"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluetooth', '', d)}"
PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4"
PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb"
-PACKAGECONFIG[libnl1] = "--with-libnl,--without-libnl,libnl1,libnl1"
+PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
INC_PR = "r5"
-SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
+SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz"
BINCONFIG = "${bindir}/pcap-config"
@@ -25,6 +25,10 @@ inherit autotools binconfig-disabled
EXTRA_OECONF = "--with-pcap=linux"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libnl1] = "--with-libnl,--without-libnl,libnl1,libnl1"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+
CPPFLAGS_prepend = "-I${S} "
CFLAGS_prepend = "-I${S} "
CXXFLAGS_prepend = "-I${S} "
diff --git a/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch b/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch
deleted file mode 100644
index 2f5cd213bc..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Index: libpcap-1.0.0/pcap-linux.c
-===================================================================
---- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
-+++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
-@@ -1616,6 +1616,17 @@
- * so let's use "Linux-cooked" mode. Jean II */
- //handle->md.cooked = 1;
- break;
-+#ifndef ARPHRD_IEEE80215
-+#define ARPHRD_IEEE80215 805
-+#endif
-+#ifndef ARPHRD_IEEE80215_PHY
-+#define ARPHRD_IEEE80215_PHY 806
-+#endif
-+
-+ case ARPHRD_IEEE80215:
-+ case ARPHRD_IEEE80215_PHY:
-+ handle->linktype = DLT_IEEE802_15_4;
-+ break;
-
- /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
- * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
index 3ba3caa3bc..a2d5ef46d7 100644
--- a/meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
@@ -1,10 +1,8 @@
require libpcap.inc
-SRC_URI += "file://aclocal.patch \
- file://ieee80215-arphrd.patch \
- "
-SRC_URI[md5sum] = "7e7321fb3aff2f2bb05c8229f3795d4a"
-SRC_URI[sha256sum] = "9ae92159c1060f15e6a90f2c4ad227268b6aaa382c316fa49a31c496b9979e93"
+SRC_URI += "file://aclocal.patch"
+SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa"
+SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
#
# make install doesn't cover the shared lib
diff --git a/meta/recipes-connectivity/neard/neard.inc b/meta/recipes-connectivity/neard/neard.inc
index e714cadc2b..76640d8a1a 100644
--- a/meta/recipes-connectivity/neard/neard.inc
+++ b/meta/recipes-connectivity/neard/neard.inc
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
"
-inherit autotools-brokensep pkgconfig systemd update-rc.d
+inherit autotools pkgconfig systemd update-rc.d
EXTRA_OECONF += "--enable-tools"
@@ -35,7 +35,7 @@ do_install_append() {
# Install the tests for neard-tests
install -d ${D}${libdir}/neard
install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/
- install -m 0755 ${S}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
+ install -m 0755 ${B}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
}
PACKAGES =+ "${PN}-tests"
diff --git a/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch b/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
new file mode 100644
index 0000000000..466067693d
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
@@ -0,0 +1,33 @@
+From 43acc56d5506c7e318f717fb3634bc16e3438913 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 15 Jan 2015 18:12:07 -0800
+Subject: [PATCH] Makefile.am: fix parallel issue
+
+There might be no src dir if src/builtin.h runs earlier, create it to
+fix the race issue:
+
+src/genbuiltin nfctype1 nfctype2 nfctype3 nfctype4 p2p > src/builtin.h
+/bin/sh: src/builtin.h: No such file or directory
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 3241311..a43eaa2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -164,6 +164,7 @@ MAINTAINERCLEANFILES = Makefile.in \
+ src/plugin.$(OBJEXT): src/builtin.h
+
+ src/builtin.h: src/genbuiltin $(builtin_sources)
++ $(AM_V_at)$(MKDIR_P) src
+ $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
+
+ $(src_neard_OBJECTS) \
+--
+1.7.9.5
+
diff --git a/meta/recipes-connectivity/neard/neard/neard.service.in b/meta/recipes-connectivity/neard/neard/neard.service.in
index 90e5302662..a6f8a84180 100644
--- a/meta/recipes-connectivity/neard/neard/neard.service.in
+++ b/meta/recipes-connectivity/neard/neard/neard.service.in
@@ -1,13 +1,13 @@
[Unit]
-Description=NFC service
+Description=neard service
+Documentation=man:neard(8)
After=syslog.target
[Service]
Type=dbus
BusName=org.neard
-Restart=on-failure
ExecStart=@installpath@/neard -n
-StandardOutput=null
[Install]
+Alias=dbus-org.neard.service
WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/neard/neard/parallel-build.patch b/meta/recipes-connectivity/neard/neard/parallel-build.patch
index 1837ad010c..56247495e5 100644
--- a/meta/recipes-connectivity/neard/neard/parallel-build.patch
+++ b/meta/recipes-connectivity/neard/neard/parallel-build.patch
@@ -30,7 +30,7 @@ index c51351f..8e58ac1 100644
+$(se_seeld_OBJECTS) \
+$(unit_test_ndef_parse_OBJECTS) \
+$(unit_test_ndef_build_OBJECTS) \
-+$(unit_test_snep-read_OBJECTS) \
++$(unit_test_snep_read_OBJECTS) \
+$(tools_snep_send_OBJECTS): $(local_headers)
include/near/version.h: include/version.h
diff --git a/meta/recipes-connectivity/neard/neard_0.14.bb b/meta/recipes-connectivity/neard/neard_0.14.bb
index daf3a4b7d1..7a1096bf4e 100644
--- a/meta/recipes-connectivity/neard/neard_0.14.bb
+++ b/meta/recipes-connectivity/neard/neard_0.14.bb
@@ -4,7 +4,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
file://parallel-build.patch \
file://neard.in \
file://neard.service.in \
+ file://Makefile.am-fix-parallel-issue.patch \
"
SRC_URI[md5sum] = "692ba2653d60155255244c87396c486b"
SRC_URI[sha256sum] = "6ea724b443d39d679168fc7776a965d1f64727c3735391df2c01469ee7cd8cca"
+PR = "r1"
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch
deleted file mode 100644
index 2ce824cf9e..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 3b1457d219ceb1058d44bacc657581f13437ae40 Mon Sep 17 00:00:00 2001
-From: Steve Dickson <steved@redhat.com>
-Date: Tue, 17 Jun 2014 13:28:53 -0400
-Subject: [PATCH] statd: fixed the --with-statdpath= flag
-
-Create the given path set with --with-statdpath
-
-Signed-off-by: chendt.fnst@cn.fujitsu.com
-Reported-by: yaoxp@cn.fujitsu.com
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Upstream-Status: Backport
----
- Makefile.am | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index ae7cd16..5824adc 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -54,13 +54,13 @@ install-data-hook:
- touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab
- touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab
- touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab
-- mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak
-- touch $(DESTDIR)$(statedir)/state
-- chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state
-- -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state
-+ mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak
-+ touch $(DESTDIR)$(statdpath)/state
-+ chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state
-+ -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state
-
- uninstall-hook:
- rm $(DESTDIR)$(statedir)/xtab
- rm $(DESTDIR)$(statedir)/etab
- rm $(DESTDIR)$(statedir)/rmtab
-- rm $(DESTDIR)$(statedir)/state
-+ rm $(DESTDIR)$(statdpath)/state
---
-1.8.4.2
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
deleted file mode 100644
index c3442380e1..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: nfs-utils-1.2.6/support/nfs/svc_socket.c
-===================================================================
---- nfs-utils-1.2.6.orig/support/nfs/svc_socket.c 2012-05-14 07:40:52.000000000 -0700
-+++ nfs-utils-1.2.6/support/nfs/svc_socket.c 2012-10-28 02:42:50.179222457 -0700
-@@ -40,8 +40,9 @@
- char rpcdata[1024], servdata[1024];
- struct rpcent rpcbuf, *rpcp;
- struct servent servbuf, *servp = NULL;
-- int ret;
-+ int ret = 0;
-
-+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
- &rpcp);
- if (ret == 0 && rpcp != NULL) {
-@@ -60,6 +61,7 @@
- }
- }
- }
-+#endif /* __UCLIBC__ */
-
- if (ret == 0 && servp != NULL)
- return ntohs(servp->s_port);
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
index 65fdd1dd4f..992267d5a1 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
@@ -28,33 +28,7 @@ test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
#----------------------------------------------------------------------
# Startup and shutdown functions.
# Actual startup/shutdown is at the end of this file.
-#directories
-create_directories(){
- echo -n 'creating NFS state directory: '
- mkdir -p "$NFS_STATEDIR"
- ( cd "$NFS_STATEDIR"
- umask 077
- mkdir -p rpc_pipefs
- mkdir -p sm sm.bak statd
- chown rpcuser:rpcuser sm sm.bak statd
- test -w statd/state || {
- rm -f statd/state
- :>statd/state
- }
- umask 022
- for file in xtab etab smtab rmtab
- do
- test -w "$file" || {
- rm -f "$file"
- :>"$file"
- }
- done
- )
- chown rpcuser:rpcuser "$NFS_STATEDIR"
- echo done
-}
-#statd
start_statd(){
echo -n "starting statd: "
start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
@@ -74,7 +48,6 @@ stop_statd(){
#FIXME: need to create the /var/lib/nfs/... directories
case "$1" in
start)
- create_directories
start_statd;;
stop)
stop_statd;;
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
index c813d7f61e..d312349fe4 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
@@ -21,7 +21,6 @@ USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
file://0001-configure-Allow-to-explicitly-disable-nfsidmap.patch \
- file://nfs-utils-1.0.6-uclibc.patch \
file://nfs-utils-1.2.3-sm-notify-res_init.patch \
file://nfsserver \
file://nfscommon \
@@ -30,11 +29,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
file://nfs-mountd.service \
file://nfs-statd.service \
file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
- file://0001-statd-fixed-the-with-statdpath-flag.patch \
"
-SRC_URI[md5sum] = "6e93a7997ca3a1eac56bf219adab72a8"
-SRC_URI[sha256sum] = "ab8384d0e487ed6a18c5380d5df28015f7dd98680bf08f3247c97d9f7d99e56f"
+SRC_URI[md5sum] = "8de676b9ff34b8f9addc1d0800fabdf8"
+SRC_URI[sha256sum] = "ff79d70b7b58b2c8f9b798c58721127e82bb96022adc04a5c4cb251630e696b8"
PARALLEL_MAKE = ""
@@ -54,7 +52,7 @@ SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
SYSTEMD_AUTO_ENABLE = "disable"
# --enable-uuid is need for cross-compiling
-EXTRA_OECONF = "--with-statduser=nobody \
+EXTRA_OECONF = "--with-statduser=rpcuser \
--enable-mountconfig \
--enable-libmount-mount \
--disable-nfsv41 \
@@ -90,7 +88,6 @@ do_compile_prepend() {
do_install_append () {
install -d ${D}${sysconfdir}/init.d
- install -d ${D}${localstatedir}/lib/nfs/statd
install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
@@ -106,6 +103,10 @@ do_install_append () {
# kernel code as of 3.8 hard-codes this path as a default
install -d ${D}/var/lib/nfs/v4recovery
+ # chown the directories and files
+ chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
+ chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
+
# the following are built by CC_FOR_BUILD
rm -f ${D}${sbindir}/rpcdebug
rm -f ${D}${sbindir}/rpcgen
diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index 9f65f4f144..bf44fcae08 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -7,16 +7,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
inherit autotools pkgconfig update-rc.d systemd
-DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluez4', '', d)}"
+DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info"
INITSCRIPT_NAME = "ofono"
INITSCRIPT_PARAMS = "defaults 22"
-EXTRA_OECONF += "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
- --enable-test \
-"
+PACKAGECONFIG ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
+ "
+PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
+PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4"
+
+EXTRA_OECONF += "--enable-test"
+
SYSTEMD_SERVICE_${PN} = "ofono.service"
do_install_append() {
diff --git a/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch b/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
new file mode 100644
index 0000000000..5f8ca77101
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
@@ -0,0 +1,1270 @@
+Upstream-Status: Inappropriate [configuration]
+
+From 572fc23f6efd65a2ef9e6c957b2506108738672b Mon Sep 17 00:00:00 2001
+From: Cristian Iorga <cristian.iorga@intel.com>
+Date: Mon, 25 Aug 2014 16:59:39 +0300
+Subject: [PATCH] Revert "test: Convert to Python 3"
+
+This reverts commit c027ab9fbc1a8e8c9e76bcd123df1ad7696307c2.
+---
+ test/activate-context | 2 +-
+ test/answer-calls | 2 +-
+ test/backtrace | 2 +-
+ test/cancel-ussd | 2 +-
+ test/cdma-connman-disable | 2 +-
+ test/cdma-connman-enable | 2 +-
+ test/cdma-dial-number | 2 +-
+ test/cdma-hangup | 2 +-
+ test/cdma-list-call | 2 +-
+ test/cdma-set-credentials | 2 +-
+ test/change-pin | 2 +-
+ test/create-internet-context | 2 +-
+ test/create-mms-context | 2 +-
+ test/create-multiparty | 2 +-
+ test/deactivate-all | 2 +-
+ test/deactivate-context | 2 +-
+ test/dial-number | 2 +-
+ test/disable-call-forwarding | 2 +-
+ test/disable-gprs | 2 +-
+ test/disable-modem | 2 +-
+ test/display-icon | 2 +-
+ test/enable-cbs | 2 +-
+ test/enable-gprs | 2 +-
+ test/enable-modem | 2 +-
+ test/enter-pin | 2 +-
+ test/get-icon | 2 +-
+ test/get-operators | 2 +-
+ test/get-tech-preference | 2 +-
+ test/hangup-active | 2 +-
+ test/hangup-all | 2 +-
+ test/hangup-call | 2 +-
+ test/hangup-multiparty | 2 +-
+ test/hold-and-answer | 2 +-
+ test/initiate-ussd | 4 ++--
+ test/list-calls | 2 +-
+ test/list-contexts | 2 +-
+ test/list-messages | 2 +-
+ test/list-modems | 2 +-
+ test/list-operators | 2 +-
+ test/lock-pin | 2 +-
+ test/lockdown-modem | 2 +-
+ test/monitor-ofono | 4 ++--
+ test/offline-modem | 2 +-
+ test/online-modem | 2 +-
+ test/private-chat | 2 +-
+ test/process-context-settings | 2 +-
+ test/receive-sms | 2 +-
+ test/reject-calls | 2 +-
+ test/release-and-answer | 2 +-
+ test/release-and-swap | 2 +-
+ test/remove-contexts | 2 +-
+ test/reset-pin | 2 +-
+ test/scan-for-operators | 2 +-
+ test/send-sms | 2 +-
+ test/send-ussd | 4 ++--
+ test/send-vcal | 2 +-
+ test/send-vcard | 2 +-
+ test/set-call-forwarding | 2 +-
+ test/set-cbs-topics | 2 +-
+ test/set-context-property | 2 +-
+ test/set-fast-dormancy | 2 +-
+ test/set-gsm-band | 2 +-
+ test/set-mic-volume | 2 +-
+ test/set-mms-details | 2 +-
+ test/set-msisdn | 2 +-
+ test/set-roaming-allowed | 2 +-
+ test/set-speaker-volume | 2 +-
+ test/set-tech-preference | 2 +-
+ test/set-tty | 2 +-
+ test/set-umts-band | 2 +-
+ test/set-use-sms-reports | 2 +-
+ test/swap-calls | 2 +-
+ test/test-advice-of-charge | 2 +-
+ test/test-call-barring | 2 +-
+ test/test-call-forwarding | 2 +-
+ test/test-call-settings | 2 +-
+ test/test-cbs | 4 ++--
+ test/test-gnss | 4 ++--
+ test/test-message-waiting | 2 +-
+ test/test-modem | 2 +-
+ test/test-network-registration | 2 +-
+ test/test-phonebook | 2 +-
+ test/test-push-notification | 2 +-
+ test/test-smart-messaging | 2 +-
+ test/test-sms | 18 +++++++++---------
+ test/test-ss | 2 +-
+ test/test-ss-control-cb | 2 +-
+ test/test-ss-control-cf | 2 +-
+ test/test-ss-control-cs | 2 +-
+ test/test-stk-menu | 34 +++++++++++++++++-----------------
+ test/unlock-pin | 2 +-
+ 94 files changed, 124 insertions(+), 124 deletions(-)
+
+diff --git a/test/activate-context b/test/activate-context
+index e4fc702..4241396 100755
+--- a/test/activate-context
++++ b/test/activate-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/answer-calls b/test/answer-calls
+index daa794b..45ff08f 100755
+--- a/test/answer-calls
++++ b/test/answer-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/backtrace b/test/backtrace
+index 03c7632..c624709 100755
+--- a/test/backtrace
++++ b/test/backtrace
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import os
+ import re
+diff --git a/test/cancel-ussd b/test/cancel-ussd
+index e7559ba..1797f26 100755
+--- a/test/cancel-ussd
++++ b/test/cancel-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-connman-disable b/test/cdma-connman-disable
+index 3adc14d..0ddc0cd 100755
+--- a/test/cdma-connman-disable
++++ b/test/cdma-connman-disable
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/cdma-connman-enable b/test/cdma-connman-enable
+index ac16a2d..a3cca01 100755
+--- a/test/cdma-connman-enable
++++ b/test/cdma-connman-enable
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/cdma-dial-number b/test/cdma-dial-number
+index 683431e..9cdfb24 100755
+--- a/test/cdma-dial-number
++++ b/test/cdma-dial-number
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-hangup b/test/cdma-hangup
+index 41ffa60..493ece4 100755
+--- a/test/cdma-hangup
++++ b/test/cdma-hangup
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-list-call b/test/cdma-list-call
+index b132353..5d36a69 100755
+--- a/test/cdma-list-call
++++ b/test/cdma-list-call
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/cdma-set-credentials b/test/cdma-set-credentials
+index a60c86e..a286b0e 100755
+--- a/test/cdma-set-credentials
++++ b/test/cdma-set-credentials
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/change-pin b/test/change-pin
+index 301c6ce..000ce53 100755
+--- a/test/change-pin
++++ b/test/change-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/create-internet-context b/test/create-internet-context
+index 1089053..efd0998 100755
+--- a/test/create-internet-context
++++ b/test/create-internet-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/create-mms-context b/test/create-mms-context
+index 598336f..e5be08d 100755
+--- a/test/create-mms-context
++++ b/test/create-mms-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/create-multiparty b/test/create-multiparty
+index 1b76010..97047c3 100755
+--- a/test/create-multiparty
++++ b/test/create-multiparty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/deactivate-all b/test/deactivate-all
+index 5aa8587..427009e 100755
+--- a/test/deactivate-all
++++ b/test/deactivate-all
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/deactivate-context b/test/deactivate-context
+index 5c86a71..df47d2e 100755
+--- a/test/deactivate-context
++++ b/test/deactivate-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/dial-number b/test/dial-number
+index fe5adad..ee674d9 100755
+--- a/test/dial-number
++++ b/test/dial-number
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
+index 811e4fa..3609816 100755
+--- a/test/disable-call-forwarding
++++ b/test/disable-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ from gi.repository import GLib
+diff --git a/test/disable-gprs b/test/disable-gprs
+index 61ce216..c6c40a5 100755
+--- a/test/disable-gprs
++++ b/test/disable-gprs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/disable-modem b/test/disable-modem
+index 6fba857..ca8c8d8 100755
+--- a/test/disable-modem
++++ b/test/disable-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/display-icon b/test/display-icon
+index ac40818..753d14d 100755
+--- a/test/display-icon
++++ b/test/display-icon
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/enable-cbs b/test/enable-cbs
+index 4a8bf66..c08bf2b 100755
+--- a/test/enable-cbs
++++ b/test/enable-cbs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enable-gprs b/test/enable-gprs
+index 68d5ef0..8664891 100755
+--- a/test/enable-gprs
++++ b/test/enable-gprs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enable-modem b/test/enable-modem
+index fc5958a..dfaaaa8 100755
+--- a/test/enable-modem
++++ b/test/enable-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enter-pin b/test/enter-pin
+index 9556363..c6ee669 100755
+--- a/test/enter-pin
++++ b/test/enter-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-icon b/test/get-icon
+index 5569a33..fdaaee7 100755
+--- a/test/get-icon
++++ b/test/get-icon
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-operators b/test/get-operators
+index 0f35c80..62354c5 100755
+--- a/test/get-operators
++++ b/test/get-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-tech-preference b/test/get-tech-preference
+index 7ba6365..77d20d0 100755
+--- a/test/get-tech-preference
++++ b/test/get-tech-preference
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/hangup-active b/test/hangup-active
+index 82e0eb0..5af62ab 100755
+--- a/test/hangup-active
++++ b/test/hangup-active
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-all b/test/hangup-all
+index 3a0138d..32933db 100755
+--- a/test/hangup-all
++++ b/test/hangup-all
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-call b/test/hangup-call
+index 5a2de20..447020c 100755
+--- a/test/hangup-call
++++ b/test/hangup-call
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-multiparty b/test/hangup-multiparty
+index 24751c3..48fe342 100755
+--- a/test/hangup-multiparty
++++ b/test/hangup-multiparty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hold-and-answer b/test/hold-and-answer
+index da3be57..2c47e27 100755
+--- a/test/hold-and-answer
++++ b/test/hold-and-answer
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/initiate-ussd b/test/initiate-ussd
+index faf50d0..d7022f1 100755
+--- a/test/initiate-ussd
++++ b/test/initiate-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+@@ -45,7 +45,7 @@ if state == "idle":
+ print("State: %s" % (state))
+
+ while state == "user-response":
+- response = input("Enter response: ")
++ response = raw_input("Enter response: ")
+
+ result = ussd.Respond(response, timeout=100)
+
+diff --git a/test/list-calls b/test/list-calls
+index f3ee991..08668c6 100755
+--- a/test/list-calls
++++ b/test/list-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-contexts b/test/list-contexts
+index 78278ca..f0d4094 100755
+--- a/test/list-contexts
++++ b/test/list-contexts
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-messages b/test/list-messages
+index 9f5bce3..cfccbea 100755
+--- a/test/list-messages
++++ b/test/list-messages
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-modems b/test/list-modems
+index b9f510a..ed66124 100755
+--- a/test/list-modems
++++ b/test/list-modems
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-operators b/test/list-operators
+index 064c4e3..349bf41 100755
+--- a/test/list-operators
++++ b/test/list-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/lock-pin b/test/lock-pin
+index 96ea9c2..5579735 100755
+--- a/test/lock-pin
++++ b/test/lock-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/lockdown-modem b/test/lockdown-modem
+index 4e04205..781abb6 100755
+--- a/test/lockdown-modem
++++ b/test/lockdown-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/monitor-ofono b/test/monitor-ofono
+index 8830757..bd31617 100755
+--- a/test/monitor-ofono
++++ b/test/monitor-ofono
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+@@ -6,7 +6,7 @@ import dbus
+ import dbus.mainloop.glib
+
+ _dbus2py = {
+- dbus.String : str,
++ dbus.String : unicode,
+ dbus.UInt32 : int,
+ dbus.Int32 : int,
+ dbus.Int16 : int,
+diff --git a/test/offline-modem b/test/offline-modem
+index e8c043a..ea1f522 100755
+--- a/test/offline-modem
++++ b/test/offline-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/online-modem b/test/online-modem
+index 029c4a5..310ed7d 100755
+--- a/test/online-modem
++++ b/test/online-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/private-chat b/test/private-chat
+index e7e5406..ef2ef6c 100755
+--- a/test/private-chat
++++ b/test/private-chat
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/process-context-settings b/test/process-context-settings
+index 8a3ecfa..0f058b2 100755
+--- a/test/process-context-settings
++++ b/test/process-context-settings
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import os
+ import dbus
+diff --git a/test/receive-sms b/test/receive-sms
+index a0c6915..c23eb14 100755
+--- a/test/receive-sms
++++ b/test/receive-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/reject-calls b/test/reject-calls
+index 71b243e..9edf1ff 100755
+--- a/test/reject-calls
++++ b/test/reject-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/release-and-answer b/test/release-and-answer
+index dec8e17..25fd818 100755
+--- a/test/release-and-answer
++++ b/test/release-and-answer
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/release-and-swap b/test/release-and-swap
+index cb8c84e..7b3569f 100755
+--- a/test/release-and-swap
++++ b/test/release-and-swap
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/remove-contexts b/test/remove-contexts
+index b54184e..c5082cb 100755
+--- a/test/remove-contexts
++++ b/test/remove-contexts
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/reset-pin b/test/reset-pin
+index 3fbd126..b429254 100755
+--- a/test/reset-pin
++++ b/test/reset-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/scan-for-operators b/test/scan-for-operators
+index b4fc05e..749c710 100755
+--- a/test/scan-for-operators
++++ b/test/scan-for-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/send-sms b/test/send-sms
+index 98808aa..e06444d 100755
+--- a/test/send-sms
++++ b/test/send-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/send-ussd b/test/send-ussd
+index a20e098..e585883 100755
+--- a/test/send-ussd
++++ b/test/send-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+@@ -46,7 +46,7 @@ if state == "idle":
+ print("State: %s" % (state))
+
+ while state == "user-response":
+- response = input("Enter response: ")
++ response = raw_input("Enter response: ")
+
+ print(ussd.Respond(response, timeout=100))
+
+diff --git a/test/send-vcal b/test/send-vcal
+index 566daef..7f8272b 100755
+--- a/test/send-vcal
++++ b/test/send-vcal
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/send-vcard b/test/send-vcard
+index 4dedf51..250b36f 100755
+--- a/test/send-vcard
++++ b/test/send-vcard
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-call-forwarding b/test/set-call-forwarding
+index 49d1ce0..9fd358b 100755
+--- a/test/set-call-forwarding
++++ b/test/set-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ from gi.repository import GLib
+diff --git a/test/set-cbs-topics b/test/set-cbs-topics
+index db95e16..78d6d44 100755
+--- a/test/set-cbs-topics
++++ b/test/set-cbs-topics
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-context-property b/test/set-context-property
+index 5ff7a67..64a6fb8 100755
+--- a/test/set-context-property
++++ b/test/set-context-property
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-fast-dormancy b/test/set-fast-dormancy
+index ef77bcd..7bf7715 100755
+--- a/test/set-fast-dormancy
++++ b/test/set-fast-dormancy
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-gsm-band b/test/set-gsm-band
+index b37bcb5..3c17c10 100755
+--- a/test/set-gsm-band
++++ b/test/set-gsm-band
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-mic-volume b/test/set-mic-volume
+index cd6c73f..e0bff49 100755
+--- a/test/set-mic-volume
++++ b/test/set-mic-volume
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-mms-details b/test/set-mms-details
+index 6ee59fa..d2d0838 100755
+--- a/test/set-mms-details
++++ b/test/set-mms-details
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-msisdn b/test/set-msisdn
+index b5fe819..01f284d 100755
+--- a/test/set-msisdn
++++ b/test/set-msisdn
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-roaming-allowed b/test/set-roaming-allowed
+index 698c8b6..9e3e058 100755
+--- a/test/set-roaming-allowed
++++ b/test/set-roaming-allowed
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-speaker-volume b/test/set-speaker-volume
+index 6d4e301..7962f39 100755
+--- a/test/set-speaker-volume
++++ b/test/set-speaker-volume
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-tech-preference b/test/set-tech-preference
+index b549abc..2666cbd 100755
+--- a/test/set-tech-preference
++++ b/test/set-tech-preference
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-tty b/test/set-tty
+index eed1fba..53d6b99 100755
+--- a/test/set-tty
++++ b/test/set-tty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-umts-band b/test/set-umts-band
+index 0bae5c4..c1e6448 100755
+--- a/test/set-umts-band
++++ b/test/set-umts-band
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-use-sms-reports b/test/set-use-sms-reports
+index 288d4e1..a4efe4f 100755
+--- a/test/set-use-sms-reports
++++ b/test/set-use-sms-reports
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/swap-calls b/test/swap-calls
+index 018a8d3..eeb257b 100755
+--- a/test/swap-calls
++++ b/test/swap-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge
+index 6e87e61..0f1f57f 100755
+--- a/test/test-advice-of-charge
++++ b/test/test-advice-of-charge
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-call-barring b/test/test-call-barring
+index eedb69f..be4ab57 100755
+--- a/test/test-call-barring
++++ b/test/test-call-barring
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-call-forwarding b/test/test-call-forwarding
+index 5db84d7..01a7294 100755
+--- a/test/test-call-forwarding
++++ b/test/test-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-call-settings b/test/test-call-settings
+index 435594c..5d7ee49 100755
+--- a/test/test-call-settings
++++ b/test/test-call-settings
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-cbs b/test/test-cbs
+index a5cec06..13cdd80 100755
+--- a/test/test-cbs
++++ b/test/test-cbs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import dbus.mainloop.glib
+@@ -78,7 +78,7 @@ def set_topics(cbs):
+ invalidData = False;
+ index = 0
+
+- topics = input('Enter the topic ID(s) you want to register to: ')
++ topics = raw_input('Enter the topic ID(s) you want to register to: ')
+
+ while index < len(topics):
+ if topics[index] == ',' or topics[index] == '-':
+diff --git a/test/test-gnss b/test/test-gnss
+index 6ae64db..aa0b160 100755
+--- a/test/test-gnss
++++ b/test/test-gnss
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+@@ -40,7 +40,7 @@ def print_menu():
+ def stdin_handler(channel, condition, gnss, path):
+ in_key = os.read(channel.unix_get_fd(), 160).rstrip().decode('UTF-8')
+ if in_key == '0':
+- xml = input('type the element and press enter: ')
++ xml = raw_input('type the element and press enter: ')
+ try:
+ gnss.SendPositioningElement(dbus.String(xml))
+ print("ok")
+diff --git a/test/test-message-waiting b/test/test-message-waiting
+index 432862e..b93fbf3 100755
+--- a/test/test-message-waiting
++++ b/test/test-message-waiting
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-modem b/test/test-modem
+index aa38b1f..29dbf14 100755
+--- a/test/test-modem
++++ b/test/test-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-network-registration b/test/test-network-registration
+index 68b4347..c5ad586 100755
+--- a/test/test-network-registration
++++ b/test/test-network-registration
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-phonebook b/test/test-phonebook
+index 42646d3..116fd4f 100755
+--- a/test/test-phonebook
++++ b/test/test-phonebook
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/test-push-notification b/test/test-push-notification
+index d972ad3..ecc6afb 100755
+--- a/test/test-push-notification
++++ b/test/test-push-notification
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-smart-messaging b/test/test-smart-messaging
+index f22efd2..188ac1e 100755
+--- a/test/test-smart-messaging
++++ b/test/test-smart-messaging
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-sms b/test/test-sms
+index 30ac651..49935e1 100755
+--- a/test/test-sms
++++ b/test/test-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+ # -*- coding: utf-8 -*-
+
+ from gi.repository import GLib
+@@ -132,7 +132,7 @@ def stdin_handler(channel, condition, sms, value, number):
+ lock = "on"
+ if in_key == '0':
+ print_send_sms_menu()
+- sms_type = input('Select SMS type: ')
++ sms_type = raw_input('Select SMS type: ')
+
+ if sms_type == '1':
+ message_send(sms, number, value)
+@@ -150,49 +150,49 @@ def stdin_handler(channel, condition, sms, value, number):
+
+ elif in_key == '1':
+ message_delivery_report(sms, 1)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(1)" + value +
+ ": UseDeliveryReports[TRUE]"))
+
+ elif in_key == '2':
+ message_delivery_report(sms, 0)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(2) " + value +
+ ": UseDeliveryReports[FALSE]"))
+
+ elif in_key == '3':
+ message_service_center_address(sms, SCA)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(3) " + value +
+ ": ServiceCenterAddress"))
+
+ elif in_key == '4':
+ message_bearer(sms, "ps-only")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(4) " + value +
+ ": Bearer[ps-only]"))
+
+ elif in_key == '5':
+ message_bearer(sms, "cs-only")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(5) " + value +
+ ": Bearer[cs-only]"))
+
+ elif in_key == '6':
+ message_bearer(sms, "ps-preferred")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(6) " + value +
+ ": Bearer[ps-preferred]"))
+
+ elif in_key == '7':
+ message_bearer(sms, "cs-preferred")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms,number, ("(7) " + value +
+ ": Bearer[cs-preferred]"))
+diff --git a/test/test-ss b/test/test-ss
+index 4cd8732..2c80806 100755
+--- a/test/test-ss
++++ b/test/test-ss
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb
+index ddae6d3..86bac9b 100755
+--- a/test/test-ss-control-cb
++++ b/test/test-ss-control-cb
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf
+index 095eb5d..d30bf4f 100755
+--- a/test/test-ss-control-cf
++++ b/test/test-ss-control-cf
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-ss-control-cs b/test/test-ss-control-cs
+index 8180474..e0ed1d1 100755
+--- a/test/test-ss-control-cs
++++ b/test/test-ss-control-cs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-stk-menu b/test/test-stk-menu
+index 0cf8fa2..ac0a5bd 100755
+--- a/test/test-stk-menu
++++ b/test/test-stk-menu
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+@@ -58,7 +58,7 @@ class StkAgent(dbus.service.Object):
+ index += 1
+
+ print("\nDefault: %d" % (default))
+- select = input("Enter Selection (t, b):")
++ select = raw_input("Enter Selection (t, b):")
+
+ if select == 'b':
+ raise GoBack("User wishes to go back")
+@@ -75,7 +75,7 @@ class StkAgent(dbus.service.Object):
+ print("DisplayText (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+ print("Urgent: (%d)" % (urgent))
+- key = input("Press return to clear ('t' terminates, "
++ key = raw_input("Press return to clear ('t' terminates, "
+ "'b' goes back, 'n' busy, "
+ "'w' return and wait):")
+
+@@ -108,7 +108,7 @@ class StkAgent(dbus.service.Object):
+ print("Hide typing: (%s)" % (hide_typing))
+ print("Enter characters, min: %d, max: %d:" % (min_chars,
+ max_chars))
+- userin = input("")
++ userin = raw_input("")
+
+ return userin
+
+@@ -122,7 +122,7 @@ class StkAgent(dbus.service.Object):
+ print("Hide typing: (%s)" % (hide_typing))
+ print("Enter digits, min: %d, max: %d:" % (min_chars,
+ max_chars))
+- userin = input("'t' terminates, 'b' goes back:")
++ userin = raw_input("'t' terminates, 'b' goes back:")
+
+ if userin == 'b':
+ raise GoBack("User wishes to go back")
+@@ -136,7 +136,7 @@ class StkAgent(dbus.service.Object):
+ def RequestKey(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Key (t, b):")
++ key = raw_input("Enter Key (t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -150,7 +150,7 @@ class StkAgent(dbus.service.Object):
+ def RequestDigit(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Digit (t, b):")
++ key = raw_input("Enter Digit (t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -164,7 +164,7 @@ class StkAgent(dbus.service.Object):
+ def RequestQuickDigit(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Quick digit (0-9, *, #, t, b):")
++ key = raw_input("Quick digit (0-9, *, #, t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -178,7 +178,7 @@ class StkAgent(dbus.service.Object):
+ def RequestConfirmation(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, b, y, n):")
++ key = raw_input("Enter Confirmation (t, b, y, n):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -194,7 +194,7 @@ class StkAgent(dbus.service.Object):
+ def ConfirmCallSetup(self, info, icon):
+ print("Information: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, y, n):")
++ key = raw_input("Enter Confirmation (t, y, n):")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -209,7 +209,7 @@ class StkAgent(dbus.service.Object):
+ print("Information: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+ print("URL (%s)" % (url))
+- key = input("Enter Confirmation (y, n):")
++ key = raw_input("Enter Confirmation (y, n):")
+
+ if key == 'y':
+ return True
+@@ -232,7 +232,7 @@ class StkAgent(dbus.service.Object):
+ signal.alarm(5)
+
+ try:
+- key = input("Press return to end before end of"
++ key = raw_input("Press return to end before end of"
+ " single tone (t):")
+ signal.alarm(0)
+
+@@ -250,7 +250,7 @@ class StkAgent(dbus.service.Object):
+ print("LoopTone: %s" % (tone))
+ print("Text: %s" % (text))
+ print("Icon: %d" % (int(icon)))
+- key = input("Press return to end before timeout "
++ key = raw_input("Press return to end before timeout "
+ "('t' terminates, 'w' return and wait):")
+
+ if key == 'w':
+@@ -279,7 +279,7 @@ class StkAgent(dbus.service.Object):
+ def DisplayAction(self, text, icon):
+ print("Text: (%s)" % (text))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Press 't' to terminate the session ")
++ key = raw_input("Press 't' to terminate the session ")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -289,7 +289,7 @@ class StkAgent(dbus.service.Object):
+ def ConfirmOpenChannel(self, info, icon):
+ print("Open channel confirmation: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, y, n):")
++ key = raw_input("Enter Confirmation (t, y, n):")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -299,7 +299,7 @@ class StkAgent(dbus.service.Object):
+ return False
+
+ _dbus2py = {
+- dbus.String : str,
++ dbus.String : unicode,
+ dbus.UInt32 : int,
+ dbus.Int32 : int,
+ dbus.Int16 : int,
+@@ -396,7 +396,7 @@ if __name__ == '__main__':
+ except:
+ pass
+
+- select = int(input("Enter Selection: "))
++ select = int(raw_input("Enter Selection: "))
+ stk.SelectItem(select, path)
+ elif mode == 'agent':
+ path = "/test/agent"
+diff --git a/test/unlock-pin b/test/unlock-pin
+index 61f4765..10b6626 100755
+--- a/test/unlock-pin
++++ b/test/unlock-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/ofono/ofono_1.14.bb b/meta/recipes-connectivity/ofono/ofono_1.14.bb
deleted file mode 100644
index dea5d8808f..0000000000
--- a/meta/recipes-connectivity/ofono/ofono_1.14.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require ofono.inc
-
-PR = "r1"
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://ofono \
-"
-
-SRC_URI[md5sum] = "8bc398d86642408cc71d039f59c61538"
-SRC_URI[sha256sum] = "84d28d37cbc47129628a78bf3e17323af1636dceb2494511dd44caa829fb277f"
-
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-connectivity/ofono/ofono_1.15.bb b/meta/recipes-connectivity/ofono/ofono_1.15.bb
new file mode 100644
index 0000000000..bee2b4745c
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono_1.15.bb
@@ -0,0 +1,12 @@
+require ofono.inc
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://ofono \
+ file://Revert-test-Convert-to-Python-3.patch \
+"
+
+SRC_URI[md5sum] = "4d03de85239d8100dc7721bf0dad2bd2"
+SRC_URI[sha256sum] = "978807a05e8904eb4e57d6533ed71e75676a55fa3819a39fe2c878f45dbf7af6"
+
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-connectivity/openssh/openssh/init b/meta/recipes-connectivity/openssh/openssh/init
index 37c8e7b907..70d4a34659 100644
--- a/meta/recipes-connectivity/openssh/openssh/init
+++ b/meta/recipes-connectivity/openssh/openssh/init
@@ -1,6 +1,8 @@
#! /bin/sh
set -e
+PIDFILE=/var/run/sshd.pid
+
# source function library
. /etc/init.d/functions
@@ -70,12 +72,12 @@ case "$1" in
echo "Starting OpenBSD Secure Shell server: sshd"
check_keys
check_privsep_dir
- start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
echo "done."
;;
stop)
echo -n "Stopping OpenBSD Secure Shell server: sshd"
- start-stop-daemon -K -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd
echo "."
;;
@@ -84,7 +86,7 @@ case "$1" in
check_keys
check_config
echo -n "Reloading OpenBSD Secure Shell server's configuration"
- start-stop-daemon -K -s 1 -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd
echo "."
;;
@@ -92,11 +94,11 @@ case "$1" in
check_keys
check_config
echo -n "Restarting OpenBSD Secure Shell server: sshd"
- start-stop-daemon -K --oknodo -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd
check_for_no_start
check_privsep_dir
sleep 2
- start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
echo "."
;;
diff --git a/meta/recipes-connectivity/openssh/openssh/nostrip.patch b/meta/recipes-connectivity/openssh/openssh/nostrip.patch
deleted file mode 100644
index 33111f5494..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/nostrip.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Disable stripping binaries during make install.
-
-Upstream-Status: Inappropriate [configuration]
-
-Build system specific.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -ur openssh-5.6p1.orig/Makefile.in openssh-5.6p1/Makefile.in
---- openssh-5.6p1.orig/Makefile.in 2010-05-11 23:51:39.000000000 -0700
-+++ openssh-5.6p1/Makefile.in 2010-08-30 16:49:54.000000000 -0700
-@@ -29,7 +29,7 @@
- RAND_HELPER=$(libexecdir)/ssh-rand-helper
- PRIVSEP_PATH=@PRIVSEP_PATH@
- SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
--STRIP_OPT=@STRIP_OPT@
-+STRIP_OPT=
-
- PATHS= -DSSHDIR=\"$(sysconfdir)\" \
- -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch
deleted file mode 100644
index 30c11cf432..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-openssh-CVE-2011-4327
-
-A security flaw was found in the way ssh-keysign,
-a ssh helper program for host based authentication,
-attempted to retrieve enough entropy information on configurations that
-lacked a built-in entropy pool in OpenSSL (a ssh-rand-helper program would
-be executed to retrieve the entropy from the system environment).
-A local attacker could use this flaw to obtain unauthorized access to host keys
-via ptrace(2) process trace attached to the 'ssh-rand-helper' program.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2011-4327
-http://www.openssh.com/txt/portable-keysign-rand-helper.adv
-
-Upstream-Status: Pending
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
---- a/ssh-keysign.c
-+++ b/ssh-keysign.c
-@@ -170,6 +170,10 @@
- key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
- key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
- key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
-+ if (fcntl(key_fd[0], F_SETFD, FD_CLOEXEC) != 0 ||
-+ fcntl(key_fd[1], F_SETFD, FD_CLOEXEC) != 0 ||
-+ fcntl(key_fd[2], F_SETFD, FD_CLOEXEC) != 0)
-+ fatal("fcntl failed");
-
- original_real_uid = getuid(); /* XXX readconf.c needs this */
- if ((pw = getpwuid(original_real_uid)) == NULL)
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch
deleted file mode 100644
index 3deaf3f0e9..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Backport
-
-Fix for CVE-2014-2532
-
-Backported from openssh-6.6p1.tar.gz
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
---- a/session.c
-+++ b/session.c
-@@ -955,6 +955,11 @@
- u_int envsize;
- u_int i, namelen;
-
-+ if (strchr(name, '=') != NULL) {
-+ error("Invalid environment variable \"%.100s\"", name);
-+ return;
-+ }
-+
- /*
- * If we're passed an uninitialized list, allocate a single null
- * entry before continuing.
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch
deleted file mode 100644
index 674d186044..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-Upstream-Status: Backport
-
-This CVE could be removed if openssh is upgrade to 6.6 or higher.
-Below are some details.
-
-Attempt SSHFP lookup even if server presents a certificate
-
-Reference:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742513
-
-If an ssh server presents a certificate to the client, then the client
-does not check the DNS for SSHFP records. This means that a malicious
-server can essentially disable DNS-host-key-checking, which means the
-client will fall back to asking the user (who will just say "yes" to
-the fingerprint, sadly).
-
-This patch means that the ssh client will, if necessary, extract the
-server key from the proffered certificate, and attempt to verify it
-against the DNS. The patch was written by Mark Wooding
-<mdw@distorted.org.uk>. I modified it to add one debug2 call, reviewed
-it, and tested it.
-
-Signed-off-by: Matthew Vernon <matthew@debian.org>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
---- a/sshconnect.c
-+++ b/sshconnect.c
-@@ -1210,36 +1210,63 @@ fail:
- return -1;
- }
-
-+static int
-+check_host_key_sshfp(char *host, struct sockaddr *hostaddr, Key *host_key)
-+{
-+ int rc = -1;
-+ int flags = 0;
-+ Key *raw_key = NULL;
-+
-+ if (!options.verify_host_key_dns)
-+ goto done;
-+
-+ /* XXX certs are not yet supported for DNS; try looking the raw key
-+ * up in the DNS anyway.
-+ */
-+ if (key_is_cert(host_key)) {
-+ debug2("Extracting key from cert for SSHFP lookup");
-+ raw_key = key_from_private(host_key);
-+ if (key_drop_cert(raw_key))
-+ fatal("Couldn't drop certificate");
-+ host_key = raw_key;
-+ }
-+
-+ if (verify_host_key_dns(host, hostaddr, host_key, &flags))
-+ goto done;
-+
-+ if (flags & DNS_VERIFY_FOUND) {
-+
-+ if (options.verify_host_key_dns == 1 &&
-+ flags & DNS_VERIFY_MATCH &&
-+ flags & DNS_VERIFY_SECURE) {
-+ rc = 0;
-+ } else if (flags & DNS_VERIFY_MATCH) {
-+ matching_host_key_dns = 1;
-+ } else {
-+ warn_changed_key(host_key);
-+ error("Update the SSHFP RR in DNS with the new "
-+ "host key to get rid of this message.");
-+ }
-+ }
-+
-+done:
-+ if (raw_key)
-+ key_free(raw_key);
-+ return rc;
-+}
-+
- /* returns 0 if key verifies or -1 if key does NOT verify */
- int
- verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
- {
-- int flags = 0;
- char *fp;
-
- fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
- debug("Server host key: %s %s", key_type(host_key), fp);
- free(fp);
-
-- /* XXX certs are not yet supported for DNS */
-- if (!key_is_cert(host_key) && options.verify_host_key_dns &&
-- verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) {
-- if (flags & DNS_VERIFY_FOUND) {
--
-- if (options.verify_host_key_dns == 1 &&
-- flags & DNS_VERIFY_MATCH &&
-- flags & DNS_VERIFY_SECURE)
-- return 0;
--
-- if (flags & DNS_VERIFY_MATCH) {
-- matching_host_key_dns = 1;
-- } else {
-- warn_changed_key(host_key);
-- error("Update the SSHFP RR in DNS with the new "
-- "host key to get rid of this message.");
-- }
-- }
-- }
-+ if (check_host_key_sshfp(host, hostaddr, host_key) == 0)
-+ return 0;
-
- return check_host_key(host, hostaddr, options.port, host_key, RDRW,
- options.user_hostfiles, options.num_user_hostfiles,
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/openssh/openssh/ssh_config b/meta/recipes-connectivity/openssh/openssh/ssh_config
index 4a4a649ba8..9e919156d3 100644
--- a/meta/recipes-connectivity/openssh/openssh/ssh_config
+++ b/meta/recipes-connectivity/openssh/openssh/ssh_config
@@ -1,4 +1,4 @@
-# $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $
+# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
@@ -44,3 +44,5 @@ Host *
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
+# ProxyCommand ssh -q -W %h:%p gateway.example.com
+# RekeyLimit 1G 1h
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd@.service b/meta/recipes-connectivity/openssh/openssh/sshd@.service
index 4eda6592f5..bb2d68e96a 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd@.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshd@.service
@@ -8,3 +8,4 @@ ExecStart=-@SBINDIR@/sshd -i
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
StandardInput=socket
StandardError=syslog
+KillMode=process
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config b/meta/recipes-connectivity/openssh/openssh/sshd_config
index 4f9b626fbd..3553669aa0 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd_config
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_config
@@ -15,9 +15,7 @@
#ListenAddress 0.0.0.0
#ListenAddress ::
-# Disable legacy (protocol version 1) support in the server for new
-# installations. In future the default will change to require explicit
-# activation of protocol 1
+# The default requires explicit activation of protocol 1
Protocol 2
# HostKey for protocol version 1
@@ -25,11 +23,16 @@ Protocol 2
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+#HostKey /etc/ssh/ssh_host_ed25519_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
+# Ciphers and keying
+#RekeyLimit default none
+
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
@@ -45,7 +48,15 @@ Protocol 2
#RSAAuthentication yes
#PubkeyAuthentication yes
-#AuthorizedKeysFile .ssh/authorized_keys
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
@@ -74,8 +85,8 @@ Protocol 2
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
@@ -91,20 +102,22 @@ Protocol 2
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
+#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
-UsePrivilegeSeparation yes
+UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
Compression no
ClientAliveInterval 15
ClientAliveCountMax 4
#UseDNS yes
#PidFile /var/run/sshd.pid
-#MaxStartups 10
+#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
+#VersionAddendum none
# no default banner path
#Banner none
@@ -116,4 +129,5 @@ Subsystem sftp /usr/libexec/sftp-server
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
+# PermitTTY no
# ForceCommand cvs server
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index c21d70baf0..d65086fc8a 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -3,6 +3,7 @@ Description=OpenSSH Key Generation
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
[Service]
ExecStart=@BINDIR@/ssh-keygen -A
diff --git a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb b/meta/recipes-connectivity/openssh/openssh_6.7p1.bb
index 047a895aae..dcbc181aa9 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.7p1.bb
@@ -11,11 +11,9 @@ DEPENDS = "zlib openssl"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
- file://nostrip.patch \
file://sshd_config \
file://ssh_config \
file://init \
- file://openssh-CVE-2011-4327.patch \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://sshd.socket \
file://sshd@.service \
@@ -23,14 +21,12 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://volatiles.99_sshd \
file://add-test-support-for-busybox.patch \
file://run-ptest \
- file://openssh-CVE-2014-2532.patch \
- file://openssh-CVE-2014-2653.patch \
file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch"
PAM_SRC_URI = "file://sshd"
-SRC_URI[md5sum] = "3e9800e6bca1fbac0eea4d41baa7f239"
-SRC_URI[sha256sum] = "48c1f0664b4534875038004cc4f3555b8329c2a81c1df48db5c517800de203bb"
+SRC_URI[md5sum] = "3246aa79317b1d23cae783a3bf8275d6"
+SRC_URI[sha256sum] = "b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507"
inherit useradd update-rc.d update-alternatives systemd
@@ -43,14 +39,10 @@ INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
SYSTEMD_PACKAGES = "${PN}-sshd"
SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
-
inherit autotools-brokensep ptest
# LFS support:
CFLAGS += "-D__FILE_OFFSET_BITS=64"
-export LD = "${CC}"
# login path is hardcoded in sshd
EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
@@ -58,7 +50,9 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
--without-zlib-version-check \
--with-privsep-path=/var/run/sshd \
--sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth"
+ --with-xauth=/usr/bin/xauth \
+ --disable-strip \
+ "
# Since we do not depend on libbsd, we do not want configure to use it
# just because it finds libutil.h. But, specifying --disable-libutil
@@ -75,16 +69,14 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
EXTRA_OECONF_append_libc-uclibc=" --without-pam"
do_configure_prepend () {
+ export LD="${CC}"
+ install -m 0644 ${WORKDIR}/sshd_config ${B}/
+ install -m 0644 ${WORKDIR}/ssh_config ${B}/
if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
cp aclocal.m4 acinclude.m4
fi
}
-do_compile_append () {
- install -m 0644 ${WORKDIR}/sshd_config ${S}/
- install -m 0644 ${WORKDIR}/ssh_config ${S}/
-}
-
do_install_append () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
@@ -97,6 +89,7 @@ do_install_append () {
rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
install -d ${D}/${sysconfdir}/default/volatiles
install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+ install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
# Create config files for read-only rootfs
install -d ${D}${sysconfdir}/ssh
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index b839c00dde..31dfd8fea7 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -9,6 +9,7 @@ LICENSE = "openssl"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
DEPENDS = "perl-native-runtime"
+DEPENDS_append_class-target = " openssl-native"
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
"
@@ -60,17 +61,18 @@ do_configure () {
ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
os=${HOST_OS}
- if [ "x$os" = "xlinux-uclibc" ]; then
+ case $os in
+ linux-uclibc |\
+ linux-uclibceabi |\
+ linux-gnueabi |\
+ linux-uclibcspe |\
+ linux-gnuspe |\
+ linux-musl*)
os=linux
- elif [ "x$os" = "xlinux-uclibceabi" ]; then
- os=linux
- elif [ "x$os" = "xlinux-uclibcspe" ]; then
- os=linux
- elif [ "x$os" = "xlinux-gnuspe" ]; then
- os=linux
- elif [ "x$os" = "xlinux-gnueabi" ]; then
- os=linux
- fi
+ ;;
+ *)
+ ;;
+ esac
target="$os-${HOST_ARCH}"
case $target in
linux-arm)
@@ -137,6 +139,10 @@ do_configure () {
perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
}
+do_compile_prepend_class-target () {
+ sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile
+}
+
do_compile () {
oe_runmake
}
@@ -187,5 +193,12 @@ do_install_ptest () {
install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
}
-BBCLASSEXTEND = "native nativesdk"
+do_install_append_virtclass-native() {
+ create_wrapper ${D}${bindir}/openssl \
+ OPENSSL_CONF=${libdir}/ssl/openssl.cnf \
+ SSL_CERT_DIR=${libdir}/ssl/certs \
+ SSL_CERT_FILE=${libdir}/ssl/cert.pem \
+ OPENSSL_ENGINES=${libdir}/ssl/engines
+}
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch b/meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch
deleted file mode 100644
index 3c77dfcdf0..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2e251ba8feaa696f9408a19336d1fbab148df55e Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt@roeckx.be>
-Date: Sat, 7 Jun 2014 13:32:23 +0200
-Subject: [PATCH] Link heartbeat_test with the static version of the libraries
-
-It's using an internal API that that might not be available in the shared
-library.
-
-Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/125]
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- test/Makefile | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/test/Makefile b/test/Makefile
-index f1816ac..1dd7bb9 100644
---- a/test/Makefile
-+++ b/test/Makefile
-@@ -420,6 +420,13 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
- LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
- link_app.$${shlib_target}
-
-+BUILD_CMD_STATIC=shlib_target=; \
-+ LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO) $(LIBKRB5)"; \
-+ $(MAKE) -f $(TOP)/Makefile.shared -e \
-+ APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
-+ LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-+ link_app.$${shlib_target}
-+
- $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
- @target=$(RSATEST); $(BUILD_CMD)
-
-@@ -618,7 +625,7 @@ $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
- @target=$(V3NAMETEST); $(BUILD_CMD)
-
- $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
-- @target=$(HEARTBEATTEST); $(BUILD_CMD)
-+ @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
-
- #$(AESTEST).o: $(AESTEST).c
- # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
---
-1.9.3
-
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.1h.bb b/meta/recipes-connectivity/openssl/openssl_1.0.1j.bb
index ddaaba8836..2da18aead7 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.1h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.1j.bb
@@ -34,13 +34,12 @@ SRC_URI += "file://configure-targets.patch \
file://find.pl \
file://openssl-fix-des.pod-error.patch \
file://Makefiles-ptest.patch \
- file://heartbeat-test-private-api.patch \
file://ptest-deps.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "8d6d684a9430d5cc98a62a5d8fbda8cf"
-SRC_URI[sha256sum] = "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093"
+SRC_URI[md5sum] = "f7175c9cd3c39bb1907ac8bba9df8ed3"
+SRC_URI[sha256sum] = "1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3"
PACKAGES =+ " \
${PN}-engines \
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
index 7588341c8e..338af33a38 100644
--- a/meta/recipes-connectivity/portmap/portmap.inc
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -4,28 +4,14 @@ SECTION = "console/network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
-DEPENDS = "virtual/fakeroot-native"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
- ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \
- file://portmap.init \
- file://make.patch;apply=yes"
-S = "${WORKDIR}/portmap_5beta"
INITSCRIPT_NAME = "portmap"
-INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
-
-inherit update-rc.d
+INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ."
-sbindir = "/sbin"
+inherit update-rc.d systemd
-fakeroot do_install() {
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${base_sbindir}
- install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
- oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
-}
+SYSTEMD_SERVICE_${PN} = "portmap.service"
PACKAGES =+ "portmap-utils"
-FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
+FILES_portmap-utils = "${base_sbindir}/pmap_set ${base_sbindir}/pmap_dump"
FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
index 2fbf784b73..2fbf784b73 100644
--- a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
+++ b/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.service b/meta/recipes-connectivity/portmap/portmap/portmap.service
new file mode 100644
index 0000000000..7ef9d7b02e
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=The RPC portmapper
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@BASE_SBINDIR@/portmap
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
index 2f25058095..2f25058095 100644
--- a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
+++ b/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
index b0a9454c48..e727fe3cb9 100644
--- a/meta/recipes-connectivity/portmap/portmap_6.0.bb
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -5,7 +5,8 @@ PR = "r9"
SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
file://destdir-no-strip.patch \
file://tcpd-config.patch \
- file://portmap.init"
+ file://portmap.init \
+ file://portmap.service"
SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff"
SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de"
@@ -19,8 +20,12 @@ CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'"
-fakeroot do_install() {
+do_install() {
install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
oe_runmake install DESTDIR=${D}
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service
}
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
index 68b83d00f1..51a76b4299 100644
--- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -12,6 +12,8 @@ SRC_URI = "file://host-peer \
inherit allarch useradd
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/ppp/peers
install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 8bc3672600..92ca0c92c6 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -31,8 +31,8 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://ppp@.service \
"
-SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b"
-SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d"
+SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a"
+SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30"
inherit autotools-brokensep systemd
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf b/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf
new file mode 100644
index 0000000000..3790d774a7
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf
@@ -0,0 +1,4 @@
+d root root 0755 /var/run/resolvconf/interface none
+f root root 0644 /etc/resolvconf/run/resolv.conf none
+f root root 0644 /etc/resolvconf/run/enable-updates none
+l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.conf
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
new file mode 100644
index 0000000000..1aead07869
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
@@ -0,0 +1,20 @@
+
+busybox installs readlink into /usr/bin, so ensure /usr/bin
+is in the path.
+
+Upstream-Status: Submitted
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: resolvconf-1.76/etc/resolvconf/update.d/libc
+===================================================================
+--- resolvconf-1.76.orig/etc/resolvconf/update.d/libc
++++ resolvconf-1.76/etc/resolvconf/update.d/libc
+@@ -16,7 +16,7 @@
+ #
+
+ set -e
+-PATH=/sbin:/bin
++PATH=/sbin:/bin:/usr/bin
+
+ [ -x /lib/resolvconf/list-records ] || exit 1
+
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb
index 7310c837e9..20a2c19328 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb
@@ -11,10 +11,14 @@ AUTHOR = "Thomas Hood"
HOMEPAGE = "http://packages.debian.org/resolvconf"
RDEPENDS_${PN} = "bash"
-SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz"
+SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \
+ file://fix-path-for-busybox.patch \
+ file://99_resolvconf \
+ "
-SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56"
-SRC_URI[sha256sum] = "16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e"
+
+SRC_URI[md5sum] = "d78ce30ea068999cd3e0523300b27255"
+SRC_URI[sha256sum] = "c9f40f7405b37399ddbf29ca4205b4911ee35cb9ffd9be7671faa2385b1fa573"
inherit allarch
@@ -24,13 +28,13 @@ do_compile () {
do_install () {
install -d ${D}${sysconfdir}/default/volatiles
- echo "d root root 0755 ${localstatedir}/run/${BPN}/interface none" \
- > ${D}${sysconfdir}/default/volatiles/99_resolvconf
+ install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /run/${BPN}/interface - - - -" \
> ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
fi
+ install -d ${D}${base_libdir}/${BPN}
install -d ${D}${sysconfdir}/${BPN}
ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
install -d ${D}${sysconfdir} ${D}${base_sbindir}
@@ -38,6 +42,11 @@ do_install () {
cp -pPR etc/* ${D}${sysconfdir}/
chown -R root:root ${D}${sysconfdir}/
install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+ install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
+ install -d ${D}/${sysconfdir}/network/if-down.d
+ install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
install -m 0644 README ${D}${docdir}/${P}/
install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
}
@@ -51,3 +60,5 @@ pkg_postinst_${PN} () {
fi
fi
}
+
+FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch b/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch
new file mode 100644
index 0000000000..9152df533f
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch
@@ -0,0 +1,29 @@
+socat: fix compile erorr against 3.17+ kernel headers
+
+With the linux 3.17 kernel socat's configure detects the wrong include for errqueue.h
+which results in a compilation error.
+
+By backporting the gentoo patch from:
+
+ http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch
+
+Fixes the build issue
+
+Upstream-status: backport
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+--- a/configure.in
++++ b/configure.in
+@@ -80,7 +80,10 @@
+ AC_CHECK_HEADERS(termios.h linux/if_tun.h)
+ AC_CHECK_HEADERS(net/if_dl.h)
+ AC_CHECK_HEADERS(linux/types.h)
+-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
++AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [AC_INCLUDES_DEFAULT
++ #if HAVE_LINUX_TYPES_H
++ #include <linux/types.h>
++ #endif])
+ AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
+ AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
+ AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
index efa3b91c16..9e43e160e3 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
file://fix-cross-compiling-failed.patch \
+ file://socat-1.7.2.4-linux-3.17.patch \
"
SRC_URI[md5sum] = "69b8155dd442a6f24e28ef5407d868eb"
@@ -26,6 +27,7 @@ EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \
ac_cv_ispeed_offset=13 \
+ ac_cv_header_bsd_libutil_h=no \
"
PACKAGECONFIG ??= "tcp-wrappers"
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch b/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
deleted file mode 100644
index a7737fbf03..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix double reference to this file to work with recent autoconf+automake
-
-RP 1/2/10
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.3/src/Makefile.am
-===================================================================
---- libtelepathy-0.3.3.orig/src/Makefile.am 2010-02-01 13:13:50.869038984 +0000
-+++ libtelepathy-0.3.3/src/Makefile.am 2010-02-01 13:14:23.267789456 +0000
-@@ -27,7 +27,6 @@
- tp-chan-type-text-gen.h \
- tp-chan-type-tubes-gen.h \
- tp-conn-iface-aliasing-gen.h \
-- tp-conn-iface-avatars-gen.h \
- tp-conn-iface-capabilities-gen.h \
- tp-conn-iface-contact-info-gen.h \
- tp-conn-iface-forwarding-gen.h \
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch b/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
deleted file mode 100644
index 37679ab761..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.1/configure.ac
-===================================================================
---- libtelepathy-0.3.1.orig/configure.ac 2007-11-22 19:05:56.000000000 +0000
-+++ libtelepathy-0.3.1/configure.ac 2008-01-04 12:07:28.000000000 +0000
-@@ -51,7 +51,7 @@
- AC_MSG_ERROR([xsltproc (from the libxslt source package) is required])
- fi
-
--AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python])
-+AC_CHECK_PROGS([PYTHON], [python2.5 python2.4 python2.3 python])
- if test -z "$PYTHON"; then
- AC_MSG_ERROR([Python is required to compile this package])
- fi
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb b/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
deleted file mode 100644
index f13e7093c8..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Telepathy framework"
-DESCRIPTION = "Telepathy is a D-Bus framework for unifying real time \
-communication, including instant messaging, voice calls and video calls. It \
-abstracts differences between protocols to provide a unified interface for \
-applications."
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus dbus-glib telepathy-glib libxslt-native"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://src/tp-conn.c;beginline=1;endline=19;md5=4c58069f77d601cc59200bce5396c7cb"
-PR = "r5"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/libtelepathy/libtelepathy-${PV}.tar.gz \
- file://prefer_python_2.5.patch \
- file://doublefix.patch"
-
-SRC_URI[md5sum] = "490ca1a0c614d4466394b72d43bf7370"
-SRC_URI[sha256sum] = "e0d230be855125163579743418203c6f6be2f10f98c4f065735c1dc9ed115878"
-
-inherit autotools pkgconfig pythonnative
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb b/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb
deleted file mode 100644
index 6b8c20c381..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Telepathy Framework glib-base helper library"
-DESCRIPTION = "Telepathy Framework: GLib-based helper library for connection managers"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus python-native-runtime dbus-native dbus-glib libxslt-native"
-LICENSE = "LGPLv2.1+"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-glib/${BP}.tar.gz"
-SRC_URI[md5sum] = "93c429e37750b25dcf8de86bb514664f"
-SRC_URI[sha256sum] = "ae0002134991217f42e503c43dea7817853afc18863b913744d51ffa029818cf"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e413d83db6ee8f2c8e6055719096a48e"
-
-inherit autotools pkgconfig gettext
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch b/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch
deleted file mode 100644
index 2cd2c78c31..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---- a/extensions/Makefile.am
-+++ b/extensions/Makefile.am
-@@ -37,8 +37,8 @@ _gen/all.xml: all.xml $(wildcard $(srcdi
- --xinclude $(tools_dir)/identity.xsl \
- $< > $@
-
--extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
-+extensions.html _gen/svc-gtk-doc.h: _gen/all.xml $(tools_dir)/doc-generator.xsl
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
- $(tools_dir)/doc-generator.xsl \
- $< > $@
-
diff --git a/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb b/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
deleted file mode 100644
index ca09f6daf3..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Telepathy IRC connection manager"
-DESCRIPTION = "Telepathy implementation of the Internet Relay Chat protocols."
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus telepathy-glib openssl libxslt-native"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/idle.c;beginline=1;endline=19;md5=b06b1e2594423111a1a7910b0eefc7f9"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://fix-svc-gtk-doc.h-target.patch"
-SRC_URI[md5sum] = "92a2de5198284cbd3c430b0d1a971a86"
-SRC_URI[sha256sum] = "3013ad4b38d14ee630b8cc8ada5e95ccaa849b9a6fe15d2eaf6d0717d76f2fab"
-
-inherit autotools pkgconfig pythonnative
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch b/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
deleted file mode 100644
index ece1da6bc3..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 22 Sep 2013 23:21:01 -0400
-Subject: [PATCH] src/Makefile.am: fix race issue for _gen/gtypes.h and _gen/gtypes-body.h
-
-There might be an error when parallel build:
-
-[snip]
-Traceback (most recent call last):
- File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
- GTypesGenerator(dom, argv[1], argv[2])()
- File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
- file_set_contents(self.output + '.h', ''.join(self.header))
- File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
- os.rename(filename + '.tmp', filename)
-OSError: [Errno 2] No such file or directory
-[snip]
-
-This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
-write(remove/rename) _gen/gtypes.tmp at the same time, then there would
-be the error.
-
-There was a similar bug in telepathy-glib which was already fixed, we use the
-similar patch to fix it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/Makefile.am | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -288,7 +288,11 @@ _gen/interfaces-body.h: _gen/mcd.xml \
- $(tools_dir)/glib-interfaces-body-generator.xsl \
- $< > $@
-
--_gen/gtypes.h _gen/gtypes-body.h: _gen/mcd.xml \
-+# do nothing, output as a side-effect
-+_gen/gtypes.h: _gen/gtypes-body.h
-+ @:
-+
-+_gen/gtypes-body.h: _gen/mcd.xml \
- $(top_srcdir)/tools/glib-gtypes-generator.py
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
- $< _gen/gtypes mc
-@@ -309,7 +313,11 @@ _gen/%.xml: %.xml $(wildcard $(top_srcdir)/xml/*.xml) Makefile.am
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
- $< > $@
-
--_gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/cli-%.h: _gen/cli-%-body.h
-+ @:
-+
-+_gen/cli-%-body.h: _gen/%.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
- --group=`echo $* | tr x- x_` \
-@@ -317,7 +325,11 @@ _gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
- --tp-proxy-api=0.7.6 \
- $< Mc_Cli _gen/cli-$*
-
--_gen/svc-%.c _gen/svc-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/svc-%.h: _gen/svc-%.c
-+ @:
-+
-+_gen/svc-%.c: _gen/%.xml \
- $(tools_dir)/glib-ginterface-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
- --filename=_gen/svc-$* \
---
-1.7.10.4
-
diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb b/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
deleted file mode 100644
index 9ae68ddea9..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Central control for Telepathy IM connection managers"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/Mission_Control/"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
- file://src/request.h;beginline=1;endline=21;md5=f80534d9af1c33291b3b79609f196eb2"
-SECTION = "libs"
-DEPENDS = "libtelepathy dbus-glib gconf libxslt-native"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-mission-control/${BP}.tar.gz \
- file://tmc-Makefile-fix-race.patch \
- "
-SRC_URI[md5sum] = "421115a35b9e427807326877f86e7f43"
-SRC_URI[sha256sum] = "14ceb7d53535b43d44b8271ad11319d1d0fe6d193d154636b9e62b42799b9723"
-
-inherit autotools-brokensep pkgconfig pythonnative
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,upower"
-
-# to select connman or nm you need to use "connectivity" and "connman" or "nm", default is to disable both
-PACKAGECONFIG[connectivity] = ",--with-connectivity=no"
-PACKAGECONFIG[connman] = "--with-connectivity=connman,,connman"
-PACKAGECONFIG[nm] = "--with-connectivity=nm,,networkmanager"
-
-PACKAGES =+ " \
- libmissioncontrol \
- libmissioncontrol-config \
- libmissioncontrol-server \
- libmissioncontrol-dev \
- libmissioncontrol-config-dev \
- libmissioncontrol-server-dev \
- libmissioncontrol-dbg \
- libmissioncontrol-config-dbg \
- libmissioncontrol-server-dbg \
-"
-
-FILES_${PN} += "${datadir}/dbus* ${datadir}/glib-2.0/schemas"
-
-FILES_libmissioncontrol = "${libdir}/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config = "${libdir}/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server = "${libdir}/libmissioncontrol-server.so.*"
-
-FILES_libmissioncontrol-dev = "${libdir}/libmissioncontrol.* \
- ${includedir}/libmissioncontrol/ \
- ${libdir}/pkgconfig/libmissioncontrol.pc"
-FILES_libmissioncontrol-config-dev = "${libdir}/libmissioncontrol-config.*"
-FILES_libmissioncontrol-server-dev = "${libdir}/libmissioncontrol-server.*"
-
-FILES_libmissioncontrol-dbg = "${libdir}/.debug/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config-dbg = "${libdir}/.debug/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server-dbg = "${libdir}/.debug/libmissioncontrol-server.so.*"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch
deleted file mode 100644
index 248824606e..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add dependency of __init__.py
-
-Tasks must be done after exec of __init__, which creates the
-src/_generated directory that tasks are based on.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-Upstream-Status: Submitted
-(However it seems that this project is out of maintanence.)
-
-diff -ruN telepathy-python-0.15.19-orig/src/Makefile.am telepathy-python-0.15.19/src/Makefile.am
---- telepathy-python-0.15.19-orig/src/Makefile.am 2011-03-10 08:51:49.000000000 +0800
-+++ telepathy-python-0.15.19/src/Makefile.am 2011-03-10 08:54:45.000000000 +0800
-@@ -39,17 +39,17 @@
- XSLTPROC_OPTS = --nonet --novalid --xinclude
- tools_dir = $(top_srcdir)/tools
-
--_generated/interfaces.py: $(tools_dir)/python-interfaces-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/interfaces.py: _generated/__init__.py $(tools_dir)/python-interfaces-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-interfaces-generator.xsl \
- $(spec_dir)/all.xml
-
--_generated/constants.py: $(tools_dir)/python-constants-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/constants.py: _generated/__init__.py $(tools_dir)/python-constants-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-constants-generator.xsl \
- $(spec_dir)/all.xml
-
--_generated/errors.py: $(tools_dir)/python-errors-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/errors.py: _generated/__init__.py $(tools_dir)/python-errors-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-errors-generator.xsl \
- $(spec_dir)/all.xml
-@@ -58,7 +58,7 @@
- $(AM_V_GEN)$(mkdir_p) $(dir $@)
- @echo "# Placeholder for package" > $@
-
--_generated/%.py: $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
-+_generated/%.py: _generated/__init__.py $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/spec-to-python.xsl \
- $(spec_dir)/$*.xml
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch
deleted file mode 100644
index df95a4c138..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit f6c67662145de889055a86a6b3b12c70a45fc8d5
-Author: Dongxiao Xu <dongxiao.xu@intel.com>
-Date: Wed Sep 7 16:02:20 2011 +0800
-
- Avoid duplicated installation of errors.py
-
- newer version of autotools don't seem to like listing files to install
- twice. Remove one errors.py from the installation list.
-
- Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
- Upstream-Status: Inappropirate [upstream inactive]
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5c27dfe..7536e43 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -11,7 +11,7 @@ telepathy_PYTHON = \
-
- # telepathy._generated.* auto-generated modules
- spec_dir = $(top_srcdir)/spec
--spec_files := $(patsubst $(spec_dir)%.xml,_generated%.py,$(wildcard $(spec_dir)/*.xml))
-+spec_files := $(filter-out _generated/errors.py, $(patsubst $(spec_dir)%.xml,_generated%.py,$(wildcard $(spec_dir)/*.xml)))
-
- BUILT_SOURCES = \
- _generated/interfaces.py \
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch
deleted file mode 100644
index f613fdce4d..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has deprecated use of mkdir_p, and it recommends
-use of MKDIR_P instead. Changed the code to avoid these kind
-of warning-errors.
-
-| make[1]: _generated/: Command not found
-| make[1]: *** [_generated/__init__.py] Error 127
-| make[1]: Leaving directory `/srv/home/nitin/builds2/build0/tmp/work/i586-poky-linux/telepathy-python-0.15.19-r4/telepathy-python-0.15.19/src'
-| make: *** [all-recursive] Error 1
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/10
-Index: telepathy-python-0.15.19/src/Makefile.am
-===================================================================
---- telepathy-python-0.15.19.orig/src/Makefile.am
-+++ telepathy-python-0.15.19/src/Makefile.am
-@@ -55,7 +55,7 @@ _generated/errors.py: _generated/__init_
- $(spec_dir)/all.xml
-
- _generated/__init__.py:
-- $(AM_V_GEN)$(mkdir_p) $(dir $@)
-+ $(AM_V_GEN)$(MKDIR_P) $(dir $@)
- @echo "# Placeholder for package" > $@
-
- _generated/%.py: _generated/__init__.py $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb b/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb
deleted file mode 100644
index 17167022b9..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Telepathy IM framework - Python package"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/utils.py;beginline=1;endline=17;md5=9a07d1a9791a7429a14e7b25c6c86822"
-
-DEPENDS = "libxslt-native"
-RDEPENDS_${PN} += "python-dbus"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://parallel_make.patch \
- file://remove_duplicate_install.patch \
- file://telepathy-python_fix_for_automake_1.12.patch"
-
-PR = "r6"
-
-inherit autotools pythonnative
-
-SRC_URI[md5sum] = "f7ca25ab3c88874015b7e9728f7f3017"
-SRC_URI[sha256sum] = "244c0e1bf4bbd78ae298ea659fe10bf3a73738db550156767cc2477aedf72376"
-
-FILES_${PN} += "\
- ${libdir}/python*/site-packages/telepathy/*.py \
- ${libdir}/python*/site-packages/telepathy/*/*.py \
- "
-
-do_install_append () {
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyc
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyo
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyc
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyo
-}
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
index d9c6532b5a..6f0de3cab8 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
@@ -6,24 +6,28 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=ab87f20cd7e8c0d0a6539b34d3791d0e \
file://README;beginline=1;endline=56;md5=a07250b28e857455336bb59fc31cb845 \
file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=e8e021e30f3a6ab7c341b66b86626a5a"
-DEPENDS = "gnutls dbus libnl openssl libgcrypt"
+DEPENDS = "dbus libnl libgcrypt"
RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = ",,gnutls"
+PACKAGECONFIG[openssl] = ",,openssl"
+
inherit systemd
SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
SYSTEMD_AUTO_ENABLE = "disable"
SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
- file://defconfig-gnutls \
+ file://defconfig \
file://wpa-supplicant.sh \
file://wpa_supplicant.conf \
file://wpa_supplicant.conf-sane \
file://99_wpa_supplicant \
file://fix-libnl3-host-contamination.patch \
"
-SRC_URI[md5sum] = "238e8e888bbd558e1a57e3eb28d1dd07"
-SRC_URI[sha256sum] = "e0d8b8fd68a659636eaba246bb2caacbf53d22d53b2b6b90eb4b4fef0993c8ed"
+SRC_URI[md5sum] = "f2ed8fef72cf63d8d446a2d0a6da630a"
+SRC_URI[sha256sum] = "eaaa5bf3055270e521b2dff64f2d203ec8040f71958b8588269a82c00c9d7b6a"
S = "${WORKDIR}/wpa_supplicant-${PV}"
@@ -34,8 +38,22 @@ FILES_${PN} += "${datadir}/dbus-1/system-services/*"
CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
do_configure () {
- install -m 0755 ${WORKDIR}/defconfig-gnutls wpa_supplicant/.config
+ ${MAKE} -C wpa_supplicant clean
+ install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
+ echo "DRV_CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
+
+ if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
+ ssl=openssl
+ elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
+ ssl=gnutls
+ fi
+ if [ -n "$ssl" ]; then
+ sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config
+ fi
+
+ # For rebuild
+ rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d
}
export EXTRA_CFLAGS = "${CFLAGS}"
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig
index 92ef8231d5..f04e398fdb 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig
@@ -453,7 +453,7 @@ CONFIG_CTRL_IFACE_DBUS_NEW=y
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz
-CONFIG_TLS = gnutls
+CONFIG_TLS = %ssl%
CONFIG_CTRL_IFACE_DBUS=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
index eb8036f50c..e899c1655d 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
@@ -15,15 +15,15 @@ diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index 68ff910..1f38f57 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
-@@ -30,7 +30,7 @@ NEED_RFKILL=y
+@@ -35,7 +35,7 @@ NEED_RFKILL=y
ifdef CONFIG_LIBNL32
DRV_LIBS += -lnl-3
DRV_LIBS += -lnl-genl-3
- DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ DRV_CFLAGS += -DCONFIG_LIBNL20
- else
- ifdef CONFIG_LIBNL_TINY
- DRV_LIBS += -lnl-tiny
+ ifdef CONFIG_LIBNL3_ROUTE
+ DRV_LIBS += -lnl-route-3
+ DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk
index db8561a..c93e88d 100644
--- a/src/drivers/drivers.mk
@@ -34,9 +34,9 @@ index db8561a..c93e88d 100644
DRV_LIBS += -lnl-genl-3
- DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ DRV_CFLAGS += -DCONFIG_LIBNL20
- else
- ifdef CONFIG_LIBNL_TINY
- DRV_LIBS += -lnl-tiny
+ ifdef CONFIG_LIBNL3_ROUTE
+ DRV_LIBS += -lnl-route-3
+ DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
--
1.7.10.4
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb
index afd0654016..afd0654016 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 8eeaac3693..88ab8d877b 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -5,7 +5,7 @@ PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi" # needed for packages like cron
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
-if [ ! -e /etc/localtime ]; then
+if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
# for an explanation of how to set this to your local timezone.
export TZ
@@ -26,6 +26,10 @@ if [ -d /etc/profile.d ]; then
unset i
fi
+if [ -x /usr/bin/resize ];then
+ /usr/bin/resize >/dev/null
+fi
+
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
umask 022
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 6d76a2b0db..6157ff381a 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -32,7 +32,7 @@ INHIBIT_DEFAULT_DEPS = "1"
docdir_append = "/${P}"
dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
-dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
+dirs2775 = ""
dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
@@ -43,13 +43,15 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
${localstatedir}/volatile/log \
+ /home ${prefix}/src ${localstatedir}/local \
/media"
-dirs3755 = "/srv \
- ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
- ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \
- ${prefix}/local/share ${prefix}/local/src \
- ${prefix}/lib/locale"
-dirs4775 = "/var/mail"
+
+dirs755-lsb = "/srv \
+ ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
+ ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \
+ ${prefix}/local/share ${prefix}/local/src \
+ ${prefix}/lib/locale"
+dirs2775-lsb = "/var/mail"
volatiles = "log tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
@@ -72,7 +74,7 @@ do_install () {
install -m 1777 -d ${D}$d
done
for d in ${dirs2775}; do
- install -m 2755 -d ${D}$d
+ install -m 2775 -d ${D}$d
done
for d in ${volatiles}; do
ln -sf volatile/$d ${D}${localstatedir}/$d
@@ -100,6 +102,10 @@ do_install () {
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
+ if [ "/usr/bin" != "${bindir}" ]; then
+ sed -i "s,/usr/bin/resize,${bindir}/resize," ${D}${sysconfdir}/profile
+ fi
+
ln -sf /proc/mounts ${D}${sysconfdir}/mtab
}
@@ -129,12 +135,12 @@ do_install_basefilesissue () {
}
do_install_append_linuxstdbase() {
- for d in ${dirs3755}; do
+ for d in ${dirs755-lsb}; do
install -m 0755 -d ${D}$d
done
- for d in ${dirs4775}; do
- install -m 2755 -d ${D}$d
+ for d in ${dirs2775-lsb}; do
+ install -m 2775 -d ${D}$d
done
}
@@ -145,4 +151,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
PACKAGE_ARCH = "${MACHINE_ARCH}"
CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells"
+CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index ec8f2afb22..a8bd7c4e3f 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -4,7 +4,7 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
+SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \
file://add_shutdown.patch \
file://nobash.patch \
file://noshadow.patch \
@@ -75,11 +75,11 @@ python populate_packages_prepend() {
preinst = """#!/bin/sh
mkdir -p $D${sysconfdir}
if [ ! -e $D${sysconfdir}/passwd ]; then
-\tcat << EOF > $D${sysconfdir}/passwd
+\tcat << 'EOF' > $D${sysconfdir}/passwd
""" + passwd + """EOF
fi
if [ ! -e $D${sysconfdir}/group ]; then
-\tcat << EOF > $D${sysconfdir}/group
+\tcat << 'EOF' > $D${sysconfdir}/group
""" + group + """EOF
fi
"""
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index bd66e4f148..0769d92c50 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -23,7 +23,7 @@ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
-FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
+FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
@@ -268,6 +268,9 @@ do_install () {
install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then
install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
+ install -d ${D}${sysconfdir}/mdev
+ install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev
+ install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
fi
fi
diff --git a/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch b/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch
new file mode 100644
index 0000000000..4e76067b3c
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch
@@ -0,0 +1,41 @@
+Upstream-status: Backport
+http://git.busybox.net/busybox/commit/?id=4e314faa0aecb66717418e9a47a4451aec59262b
+
+CVE-2014-9645 fix.
+
+[YOCTO #7257]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+From 4e314faa0aecb66717418e9a47a4451aec59262b Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Thu, 20 Nov 2014 17:24:33 +0000
+Subject: modprobe,rmmod: reject module names with slashes
+
+function old new delta
+add_probe 86 113 +27
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+Index: busybox-1.22.1/modutils/modprobe.c
+===================================================================
+--- busybox-1.22.1.orig/modutils/modprobe.c
++++ busybox-1.22.1/modutils/modprobe.c
+@@ -238,6 +238,17 @@ static void add_probe(const char *name)
+ {
+ struct module_entry *m;
+
++ /*
++ * get_or_add_modentry() strips path from name and works
++ * on remaining basename.
++ * This would make "rmmod dir/name" and "modprobe dir/name"
++ * to work like "rmmod name" and "modprobe name",
++ * which is wrong, and can be abused via implicit modprobing:
++ * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
++ */
++ if (strchr(name, '/'))
++ bb_error_msg_and_die("malformed module name '%s'", name);
++
+ m = get_or_add_modentry(name);
+ if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
+ && (m->flags & MODULE_FLAG_LOADED)
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
new file mode 100644
index 0000000000..781f5af14a
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -0,0 +1,71 @@
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Sun, 3 Mar 2013 12:31:40 -0600
+Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
+
+Upstream-status: Submitted
+
+[ based on: https://lkml.org/lkml/2013/3/3/103 ]
+
+This patch syncs up with the way the menuconfig ncurses / curses
+is detected and the HOST_EXTRACFLAGS works in the Linux kernel
+and it allows the menuconfig to work with a sysroot version
+of the curses libraries.
+
+---
+
+In some cross build environments such as the Yocto Project build
+environment it provides an ncurses library that is compiled
+differently than the host's version. This causes display corruption
+problems when the host's curses includes are used instead of the
+includes from the provided compiler are overridden. There is a second
+case where there is no curses libraries at all on the host system and
+menuconfig will just fail entirely.
+
+The solution is simply to allow an override variable in
+check-lxdialog.sh for environments such as the Yocto Project. Adding
+a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
+compiling and linking against the right headers and libraries.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+cc: Michal Marek <mmarek@suse.cz>
+cc: linux-kbuild@vger.kernel.org
+---
+ scripts/kconfig/lxdialog/Makefile | 2 +-
+ scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -4,6 +4,10 @@
+ # What library to link
+ ldflags()
+ {
++ if [ x"$CROSS_CURSES_LIB" != x ]; then
++ echo "$CROSS_CURSES_LIB"
++ exit
++ fi
+ for ext in so a dylib ; do
+ for lib in ncursesw ncurses curses ; do
+ $cc -print-file-name=lib${lib}.${ext} | grep -q /
+@@ -19,6 +23,10 @@ ldflags()
+ # Where is ncurses.h?
+ ccflags()
+ {
++ if [ x"$CROSS_CURSES_INC" != x ]; then
++ echo "$CROSS_CURSES_INC"
++ exit
++ fi
+ if [ -f /usr/include/ncursesw/ncurses.h ]; then
+ echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
+ elif [ -f /usr/include/ncursesw/curses.h ]; then
+--- a/scripts/kconfig/lxdialog/Makefile
++++ b/scripts/kconfig/lxdialog/Makefile
+@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
+
+ # Use reursively expanded variables so we do not call gcc unless
+ # we really need to do so. (Do not call gcc as part of make mrproper)
+-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
++HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
+ HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
+
+ HOST_EXTRACFLAGS += -DLOCALE
diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig
index 47eca212db..8394067bed 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -159,7 +159,7 @@ CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
-# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set
+CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_UNCOMPRESS is not set
# CONFIG_UNLZMA is not set
@@ -377,7 +377,7 @@ CONFIG_FEATURE_VI_WIN_RESIZE=y
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
CONFIG_AWK=y
-# CONFIG_FEATURE_AWK_LIBM is not set
+CONFIG_FEATURE_AWK_LIBM=y
CONFIG_CMP=y
CONFIG_DIFF=y
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
@@ -781,7 +781,7 @@ CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
-# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
# CONFIG_INETD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
diff --git a/meta/recipes-core/busybox/busybox/recognize_connmand.patch b/meta/recipes-core/busybox/busybox/recognize_connmand.patch
new file mode 100644
index 0000000000..f42c74caad
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/recognize_connmand.patch
@@ -0,0 +1,21 @@
+This adds connmand to the list of know dhcp clients
+
+Upstream-Status: Inappropriate [OE-Core]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: busybox-1.22.1/networking/ifupdown.c
+===================================================================
+--- busybox-1.22.1.orig/networking/ifupdown.c
++++ busybox-1.22.1/networking/ifupdown.c
+@@ -521,6 +521,10 @@ struct dhcp_client_t {
+ };
+
+ static const struct dhcp_client_t ext_dhcp_clients[] = {
++ { "connmand",
++ "true",
++ "true",
++ },
+ { "dhcpcd",
+ "dhcpcd[[ -h %hostname%]][[ -i %vendor%]][[ -I %client%]][[ -l %leasetime%]] %iface%",
+ "dhcpcd -k %iface%",
diff --git a/meta/recipes-core/busybox/busybox_1.22.1.bb b/meta/recipes-core/busybox/busybox_1.22.1.bb
index 46641e19fa..a41879c23f 100644
--- a/meta/recipes-core/busybox/busybox_1.22.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.22.1.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://busybox-syslog.default \
file://mdev \
file://mdev.conf \
+ file://mdev-mount.sh \
file://umount.busybox \
file://defconfig \
file://busybox-syslog.service.in \
@@ -30,6 +31,9 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://inetd \
file://login-utilities.cfg \
file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
+ file://recognize_connmand.patch \
+ file://busybox-cross-menuconfig.patch \
+ file://CVE-2014-9645_busybox_reject_module_names_with_slashes.patch \
"
SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"
diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb
index f2cc119400..f91b552f78 100644
--- a/meta/recipes-core/busybox/busybox_git.bb
+++ b/meta/recipes-core/busybox/busybox_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "git://busybox.net/busybox.git \
file://busybox-syslog.default \
file://mdev \
file://mdev.conf \
+ file://mdev-mount.sh \
file://umount.busybox \
file://defconfig \
file://busybox-syslog.service.in \
diff --git a/meta/recipes-core/busybox/files/find-touchscreen.sh b/meta/recipes-core/busybox/files/find-touchscreen.sh
index 1582ea891c..52c5e7a096 100644
--- a/meta/recipes-core/busybox/files/find-touchscreen.sh
+++ b/meta/recipes-core/busybox/files/find-touchscreen.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
- ln -sf /dev/input/$MDEV /dev/input/touchscreen0
+if grep -q "input:.*-e0.*,3,.*a0,1,\|ads7846" /sys/class/$MDEV/device/modalias ; then
+ ln -sf /dev/$MDEV /dev/input/touchscreen0
fi
-if [ `egrep "ads7846" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
- ln -sf /dev/input/$MDEV /dev/input/touchscreen0
-fi
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev
index 4eba6190c7..96252477e0 100755
--- a/meta/recipes-core/busybox/files/mdev
+++ b/meta/recipes-core/busybox/files/mdev
@@ -2,6 +2,18 @@
mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
mkdir /dev/pts /dev/shm
+chmod 777 /dev/shm
mount -t devpts devpts /dev/pts
+touch /dev/mdev.seq
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
mdev -s
+
+#
+# We might have mounted something over /dev, see if /dev/initctl is there.
+#
+if test ! -p /dev/initctl
+then
+ rm -f /dev/initctl
+ mknod -m 600 /dev/initctl p
+fi
+
diff --git a/meta/recipes-core/busybox/files/mdev-mount.sh b/meta/recipes-core/busybox/files/mdev-mount.sh
new file mode 100644
index 0000000000..d5d66d66fb
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev-mount.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+MDEV_AUTOMOUNT=y
+MDEV_AUTOMOUNT_ROOT=/run/media
+[ -f /etc/default/mdev ] && . /etc/default/mdev
+if [ "${MDEV_AUTOMOUNT}" = "n" ] ; then
+ exit 0
+fi
+
+case "$ACTION" in
+ add|"")
+ ACTION="add"
+ # check if already mounted
+ if grep -q "^/dev/${MDEV} " /proc/mounts ; then
+ # Already mounted
+ exit 0
+ fi
+ DEVBASE=`expr substr $MDEV 1 3`
+ if [ "${DEVBASE}" == "mmc" ] ; then
+ DEVBASE=`expr substr $MDEV 1 7`
+ fi
+ # check for "please don't mount it" file
+ if [ -f "/dev/nomount.${DEVBASE}" ] ; then
+ # blocked
+ exit 0
+ fi
+ # check for full-disk partition
+ if [ "${DEVBASE}" == "${MDEV}" ] ; then
+ if [ -d /sys/block/${DEVBASE}/${DEVBASE}*1 ] ; then
+ # Partition detected, just quit
+ exit 0
+ fi
+ if [ ! -f /sys/block/${DEVBASE}/size ] ; then
+ # No size at all
+ exit 0
+ fi
+ if [ `cat /sys/block/${DEVBASE}/size` == 0 ] ; then
+ # empty device, bail out
+ exit 0
+ fi
+ fi
+ # first allow fstab to determine the mountpoint
+ if ! mount /dev/$MDEV > /dev/null 2>&1
+ then
+ MOUNTPOINT="${MDEV_AUTOMOUNT_ROOT}/$MDEV"
+ mkdir "$MOUNTPOINT"
+ mount -t auto /dev/$MDEV "$MOUNTPOINT"
+ fi
+ ;;
+ remove)
+ MOUNTPOINT=`grep "^/dev/$MDEV\s" /proc/mounts | cut -d' ' -f 2`
+ if [ ! -z "$MOUNTPOINT" ]
+ then
+ umount "$MOUNTPOINT"
+ rmdir "$MOUNTPOINT"
+ else
+ umount /dev/$MDEV
+ fi
+ ;;
+ *)
+ # Unexpected keyword
+ exit 1
+ ;;
+esac
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf
index e688911ff1..17e93da7c3 100644
--- a/meta/recipes-core/busybox/files/mdev.conf
+++ b/meta/recipes-core/busybox/files/mdev.conf
@@ -1,3 +1,5 @@
+$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"
+
console 0:0 0600
cpu_dma_latency 0:0 0660
fb0:0 44 0660
@@ -35,3 +37,6 @@ input/mice 0:0 0660
input/mouse.* 0:0 0660
tun[0-9]* 0:0 0660 =net/
+
+[hs]d[a-z][0-9]? 0:0 660 */etc/mdev/mdev-mount.sh
+mmcblk[0-9].* 0:0 660 */etc/mdev/mdev-mount.sh
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 78ac4242a8..757e487b97 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -5,7 +5,6 @@
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
-[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
# return 0 if root is mounted on a network filesystem
@@ -17,8 +16,11 @@ root_is_nfs() {
have_bin_ip=0
if [ -x /sbin/ip ]; then
have_bin_ip=1
+ BROADCAST="broadcast +"
fi
+[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+
case "$1" in
deconfig)
if [ -x /sbin/resolvconf ]; then
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
index 2944d3d06c..89c4d12e9c 100644
--- a/meta/recipes-core/busybox/files/syslog
+++ b/meta/recipes-core/busybox/files/syslog
@@ -28,7 +28,7 @@ if [ -f /etc/syslog-startup.conf ]; then
if [ -n "$ROTATEGENS" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS"
fi
- LOCAL=0
+ LOG_LOCAL=1
elif [ "$D" = "remote" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE"
LOG_REMOTE=1
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch b/meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch
index 4757f52aa0..4757f52aa0 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch b/meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch
index b7e82609bd..58b6a76130 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch
@@ -9,23 +9,23 @@ would appear when compiling.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- man/local.mk | 2 +-
+ man/local.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/local.mk b/man/local.mk
-index 7cef5e3..dc0865f 100644
+index ba8fbf7..3833458 100644
--- a/man/local.mk
+++ b/man/local.mk
-@@ -189,8 +189,8 @@ man/yes.1: src/yes
+@@ -101,8 +101,8 @@ man/dynamic-deps.mk: Makefile
&& $(run_help2man) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
-- --output=$$t/$$name.1 $$t/$$name \
+- --output=$$t/$$name.1 $$t/$$argv \
--info-page='coreutils \(aq'$$name' invocation\(aq' \
-+ --output=$$t/$$name.1 $$t/$$name \
++ --output=$$t/$$name.1 $$t/$$argv \
&& sed \
-e 's|$*\.td/||g' \
-e '/For complete documentation/d' \
--
-1.7.9.5
+1.9.1
diff --git a/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch
new file mode 100644
index 0000000000..9d1ae55d47
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch
@@ -0,0 +1,39 @@
+From a1d360509fa3a4aff57eedcd528cc0347a87531d Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 16 Sep 2014 01:59:08 -0700
+Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to
+ with_selinux
+
+Fixed when build with meta-selinux even when --without-selinux:
+runcon.c:49:28: fatal error: selinux/flask.h: No such file or directory
+ # include <selinux/flask.h>
+ ^
+compilation terminated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ m4/gnulib-comp.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
+index 472d3a0..5f09734 100644
+--- a/m4/gnulib-comp.m4
++++ b/m4/gnulib-comp.m4
+@@ -1730,11 +1730,11 @@ AC_DEFUN([gl_INIT],
+ AC_LIBOBJ([select])
+ fi
+ gl_SYS_SELECT_MODULE_INDICATOR([select])
+- AC_CHECK_HEADERS([selinux/flask.h])
+ AC_LIBOBJ([selinux-at])
+ gl_HEADERS_SELINUX_SELINUX_H
+ gl_HEADERS_SELINUX_CONTEXT_H
+ if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
++ AC_CHECK_HEADERS([selinux/flask.h])
+ AC_LIBOBJ([getfilecon])
+ fi
+ gl_SERVENT
+--
+1.7.9.5
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch
index 2ef8a548ac..2ef8a548ac 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch
diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb b/meta/recipes-core/coreutils/coreutils_8.23.bb
index d5373ae9d6..e9d6494708 100644
--- a/meta/recipes-core/coreutils/coreutils_8.22.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.23.bb
@@ -16,10 +16,11 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
file://remove-usr-local-lib-from-m4.patch \
file://dummy_help2man.patch \
file://fix-for-dummy-man-usage.patch \
+ file://fix-selinux-flask.patch \
"
-SRC_URI[md5sum] = "8fb0ae2267aa6e728958adc38f8163a2"
-SRC_URI[sha256sum] = "5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212"
+SRC_URI[md5sum] = "abed135279f87ad6762ce57ff6d89c41"
+SRC_URI[sha256sum] = "ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d"
EXTRA_OECONF_class-native = "--without-gmp"
EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
@@ -73,6 +74,11 @@ do_install_append() {
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
}
+do_install_append_class-native(){
+ # remove groups to fix conflict with shadow-native
+ rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+}
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
@@ -98,4 +104,4 @@ python __anonymous() {
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
}
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
deleted file mode 100644
index 40e3b12b5d..0000000000
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
---- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300
-+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200
-@@ -8,7 +8,7 @@
-
- AM_INIT_AUTOMAKE([1.9])
-
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- # Honor aclocal flags
- ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
index 6c60d9e408..abd013247c 100644
--- a/meta/recipes-core/dbus/dbus-glib.inc
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -13,7 +13,6 @@ DEPENDS_class-native = "glib-2.0-native dbus-native"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
file://no-examples.patch \
file://test-install-makefile.patch \
- file://obsolete_automake_macros.patch \
"
inherit autotools pkgconfig gettext
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb4967828..fbb4967828 100644
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
+++ b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
index 2e8e178bb7..027c82b27e 100644
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
+++ b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
@@ -3,26 +3,46 @@ Change Makefile.am to install regression tests for test package purpose.
Upstream-Status: Inappropriate [test not install is for purpose from upstream]
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/Makefile.am | 3 ++-
+ test/core/Makefile.am | 3 ++-
+ test/interfaces/Makefile.am | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/test/Makefile.am b/test/Makefile.am
-index 7ba11a8..249f0e7 100644
+index 379c8c3..6580927 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
-@@ -13,7 +13,8 @@ else
- TEST_BINARIES=
- endif
+@@ -48,7 +48,8 @@ TESTS = \
+ $(test_scripts) \
+ $(NULL)
--noinst_PROGRAMS= $(TEST_BINARIES)
+-noinst_PROGRAMS = \
+testdir = $(datadir)/@PACKAGE@/tests
-+test_PROGRAMS= $(TEST_BINARIES)
++test_PROGRAMS = \
+ $(test_programs) \
+ $(test_related_programs) \
+ $(NULL)
+diff --git a/test/core/Makefile.am b/test/core/Makefile.am
+index e4bceb4..54b077d 100644
+--- a/test/core/Makefile.am
++++ b/test/core/Makefile.am
+@@ -64,7 +64,8 @@ endif
- test_service_SOURCES= \
- test-service.c
+ ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
+ ## build even when not doing "make check"
+-noinst_PROGRAMS = \
++testdir = $(datadir)/@PACKAGE@/tests/core
++test_PROGRAMS = \
+ test-dbus-glib \
+ test-error-mapping \
+ test-service-glib \
diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
-index 3cb2c39..e6de67d 100644
+index a94d08d..707dcac 100644
--- a/test/interfaces/Makefile.am
+++ b/test/interfaces/Makefile.am
-@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
+@@ -57,7 +57,8 @@ if DBUS_BUILD_TESTS
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
@@ -32,17 +52,6 @@ index 3cb2c39..e6de67d 100644
test_service_SOURCES = \
test-interfaces.c \
-diff --git a/test/core/Makefile.am b/test/core/Makefile.am
-index ef6cb26..9786c3a 100644
---- a/test/core/Makefile.am
-+++ b/test/core/Makefile.am
-@@ -46,7 +46,8 @@ endif
-
- ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
- ## build even when not doing "make check"
--noinst_PROGRAMS = \
-+testdir = $(datadir)/@PACKAGE@/tests/core
-+test_PROGRAMS = \
- test-dbus-glib \
- test-service-glib \
- $(THREAD_APPS) \
+--
+1.9.1
+
diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
deleted file mode 100644
index c1bb06a1b4..0000000000
--- a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require dbus-glib.inc
-
-
-SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
-SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.102.bb b/meta/recipes-core/dbus/dbus-glib_0.102.bb
new file mode 100644
index 0000000000..d798ebfac0
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.102.bb
@@ -0,0 +1,5 @@
+require dbus-glib.inc
+
+
+SRC_URI[md5sum] = "f76b8558fd575d0106c3a556eaa49184"
+SRC_URI[sha256sum] = "6964ed585bb8149a14ab744b5ded5e77cf71ec5446e6dcc5fcf5eebcc52df29c"
diff --git a/meta/recipes-core/dbus/dbus-test_1.8.2.bb b/meta/recipes-core/dbus/dbus-test_1.8.10.bb
index e19d2e9d1e..fb796fb692 100644
--- a/meta/recipes-core/dbus/dbus-test_1.8.2.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.8.10.bb
@@ -18,8 +18,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
"
-SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068"
-SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08"
+SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038"
+SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e"
S="${WORKDIR}/dbus-${PV}"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index d38ba7e1d2..fb5d017856 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
DEPENDS = "expat virtual/libintl"
RDEPENDS_dbus_class-native = ""
RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
ALLOW_EMPTY_dbus-ptest = "1"
RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
diff --git a/meta/recipes-core/dbus/dbus_1.8.10.bb b/meta/recipes-core/dbus/dbus_1.8.10.bb
new file mode 100644
index 0000000000..250ea21ddc
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.8.10.bb
@@ -0,0 +1,4 @@
+include dbus.inc
+
+SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038"
+SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e"
diff --git a/meta/recipes-core/dbus/dbus_1.8.2.bb b/meta/recipes-core/dbus/dbus_1.8.2.bb
deleted file mode 100644
index 37ebed2bd6..0000000000
--- a/meta/recipes-core/dbus/dbus_1.8.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include dbus.inc
-
-SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068"
-SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08"
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 9fec09e919..e187d04339 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -5,7 +5,7 @@ SECTION = "console/network"
# some files are from other projects and have others license terms:
# public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY
LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4d290ce0ac102c828dfc9ce836784688"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3a1b9604afd1648b28b0c6f1709e9f4"
DEPENDS = "zlib"
RPROVIDES_${PN} = "ssh sshd"
@@ -27,6 +27,13 @@ PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
file://0006-dropbear-configuration-file.patch \
file://dropbear"
+PAM_PLUGINS = "libpam-runtime \
+ pam-plugin-deny \
+ pam-plugin-permit \
+ pam-plugin-unix \
+ "
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
+
inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "dropbear"
diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
index 71a4666b5c..dc9d5782e8 100644
--- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
+++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
@@ -13,7 +13,7 @@ index 7d06322..71a21c2 100644
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
#ifndef XAUTH_COMMAND
--#define XAUTH_COMMAND "/usr/bin/X11/xauth -q"
+-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "xauth -q"
#endif
diff --git a/meta/recipes-core/dropbear/dropbear_2014.63.bb b/meta/recipes-core/dropbear/dropbear_2014.63.bb
deleted file mode 100644
index bb7e6178bc..0000000000
--- a/meta/recipes-core/dropbear/dropbear_2014.63.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require dropbear.inc
-
-SRC_URI[md5sum] = "7066bb9a2da708f3ed06314fdc9c47fd"
-SRC_URI[sha256sum] = "595992de432ba586a0e7e191bbb1ad587727678bb3e345b018c395b8c55b57ae"
diff --git a/meta/recipes-core/dropbear/dropbear_2014.66.bb b/meta/recipes-core/dropbear/dropbear_2014.66.bb
new file mode 100644
index 0000000000..8931eb75b2
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear_2014.66.bb
@@ -0,0 +1,4 @@
+require dropbear.inc
+
+SRC_URI[md5sum] = "c21a01111aa5015db038c6efdb85717d"
+SRC_URI[sha256sum] = "ab3fe2670a517cc0bbe398ff5d15e9ca12cd14f2fc18930a8111ae2baa64ab76"
diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb
deleted file mode 100644
index 1c13eb824a..0000000000
--- a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Cross locale generation tool for eglibc"
-HOMEPAGE = "http://www.eglibc.org/home"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc"
-LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://${LIC_DIR}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://${LIC_DIR}/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${P}:"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25243.tar.bz2 \
- file://fix_for_centos_5.8.patch;patchdir=.. \
- "
-SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd"
-SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c"
-
-S = "${WORKDIR}/eglibc-${PV}/localedef"
-
-do_unpack_append() {
- bb.build.exec_func('do_move_ports', d)
-}
-
-do_move_ports() {
- if test -d ${WORKDIR}/eglibc-${PV}/ports ; then
- rm -rf ${WORKDIR}/libc/ports
- mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/
- fi
-}
-
-EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc"
-CFLAGS += "-DNOT_IN_libc=1"
-
-do_configure () {
- ${S}/configure ${EXTRA_OECONF}
-}
-
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch
deleted file mode 100644
index 4559a110fb..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch
+++ /dev/null
@@ -1,912 +0,0 @@
-Pulled from
-http://www.eglibc.org/archives/patches/msg01042.html
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-Hi,
-
-This patch adds 'make menuconfig' support to EGLIBC.
-
-
-EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files.
-
-There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile:
-
-- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config.
-
-- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
-
-- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
-
-
-Pre-Processing:
-
-
-The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'.
-
-Post-Processing (libc/options-config/config-postproc.pl):
-
-
-- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header.
-
-- "CONFIG_" prefix is changed back to "OPTION_".
-
-
-- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'.
-
-
-A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds.
-
-libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'.
-
-libc/EGLIBC.option-groups is updated to include new information on the menuconfig support.
-
-Thanks,
-
-attached is the updated patch to address above issues.
-
-Steve
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
-Index: libc/EGLIBC.cross-building
-===================================================================
---- libc.orig/EGLIBC.cross-building
-+++ libc/EGLIBC.cross-building
-@@ -243,9 +243,29 @@ full EGLIBC build:
- > $src/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
-+ > --with-kconfig=$obj/linux/scripts/kconfig \
- > --build=$build \
- > --host=$target \
- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+
-+Note the additional '--with-kconfig' option. This tells EGLIBC where to
-+find the host config tools used by the kernel 'make config' and 'make
-+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
-+*config' support, which will create 'option-groups.config' for you.
-+But first make sure those tools have been built by running some
-+dummy 'make *config' calls in the kernel directory:
-+
-+ $ cd $obj/linux
-+ $ PATH=$tools/bin:$PATH make config \
-+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
-+ $ PATH=$tools/bin:$PATH make menuconfig \
-+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
-+
-+Now we can configure and build the full EGLIBC:
-+
-+ $ cd $obj/eglibc
-+ $ PATH=$tools/bin:$PATH make defconfig
-+ $ PATH=$tools/bin:$PATH make menuconfig
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install install_root=$sysroot
-
-Index: libc/configure.ac
-===================================================================
---- libc.orig/configure.ac
-+++ libc/configure.ac
-@@ -127,6 +127,16 @@ AC_ARG_WITH([headers],
- [sysheaders=''])
- AC_SUBST(sysheaders)
-
-+AC_ARG_WITH([kconfig],
-+ AC_HELP_STRING([--with-kconfig=PATH],
-+ [location of kconfig tools to use (from Linux
-+ kernel builds) to re-use for configuring EGLIBC
-+ option groups]),
-+ [KCONFIG_TOOLS=$withval],
-+ [KCONFIG_TOOLS=''])
-+AC_SUBST(KCONFIG_TOOLS)
-+
-+
- AC_SUBST(use_default_link)
- AC_ARG_WITH([default-link],
- AC_HELP_STRING([--with-default-link],
-Index: libc/config.make.in
-===================================================================
---- libc.orig/config.make.in
-+++ libc/config.make.in
-@@ -45,6 +45,8 @@ sysincludes = @SYSINCLUDES@
- c++-sysincludes = @CXX_SYSINCLUDES@
- all-warnings = @all_warnings@
-
-+kconfig_tools = @KCONFIG_TOOLS@
-+
- have-z-combreloc = @libc_cv_z_combreloc@
- have-z-execstack = @libc_cv_z_execstack@
- have-Bgroup = @libc_cv_Bgroup@
-Index: libc/options-config/config-postproc.pl
-===================================================================
---- /dev/null
-+++ libc/options-config/config-postproc.pl
-@@ -0,0 +1,54 @@
-+#!/usr/bin/perl
-+
-+$usage = "usage: $0 <default config file> <config file>\n";
-+
-+die "$usage" unless @ARGV;
-+$defaults = shift @ARGV;
-+die "$usage" unless @ARGV;
-+die "Could not open $ARGV[0]" unless -T $ARGV[0];
-+
-+sub yank {
-+ @option = grep($_ ne $_[0], @option);
-+}
-+
-+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
-+
-+# get the full list of available options using the default config file
-+$i = 0;
-+while (<DEFAULTS>) {
-+ if (/^\s*OPTION_(\w+)\s*=/) {
-+ $option[$i++] = $1;
-+ }
-+}
-+
-+# now go through the config file, making the necessary changes
-+while (<>) {
-+ if (/Linux Kernel Configuration/) {
-+ # change title
-+ s/Linux Kernel/Option Groups/;
-+ print;
-+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
-+ # this is an explicit option set line, change CONFIG_ to OPTION_
-+ # before printing and remove this option from option list
-+ $opt = $1;
-+ yank($opt);
-+ s/CONFIG_/OPTION_/g;
-+ print;
-+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
-+ # this is a comment line, change CONFIG_ to OPTION_, remove this
-+ # option from option list, and convert to explicit OPTION_FOO=n
-+ $opt = $1;
-+ yank($opt);
-+ s/CONFIG_/OPTION_/g;
-+ print "OPTION_$opt=n\n";
-+ } else {
-+ print;
-+ }
-+}
-+
-+# any options left in @options, are options that were not mentioned in
-+# the config file, and implicitly that means the option must be set =n,
-+# so do that here.
-+foreach $opt (@option) {
-+ print "OPTION_$opt=n\n";
-+}
-Index: libc/options-config/config-preproc.pl
-===================================================================
---- /dev/null
-+++ libc/options-config/config-preproc.pl
-@@ -0,0 +1,8 @@
-+#!/usr/bin/perl
-+
-+if (@ARGV) {
-+ while (<>) {
-+ s/OPTION_/CONFIG_/g;
-+ print;
-+ }
-+}
-Index: libc/options-config/Makefile
-===================================================================
---- /dev/null
-+++ libc/options-config/Makefile
-@@ -0,0 +1,55 @@
-+# ===========================================================================
-+# EGLIBC option-groups configuration targets
-+# These targets are included from top-level makefile
-+
-+ifneq ($(kconfig_tools),)
-+ifneq (no,$(PERL))
-+
-+ocdir := options-config
-+
-+OconfigDefaults := option-groups.defaults
-+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
-+OconfigDef := option-groups.def
-+Oconfig := $(common-objpfx)option-groups.config
-+Oconfig_tmp := $(common-objpfx).tmp.config
-+
-+conf := $(kconfig_tools)/conf
-+mconf := $(kconfig_tools)/mconf
-+
-+preproc := $(PERL) $(ocdir)/config-preproc.pl
-+postproc := $(PERL) $(ocdir)/config-postproc.pl
-+
-+PHONY += defconfig config menuconfig
-+
-+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(OconfigDefaults_tmp)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
-+ $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+ rm $(OconfigDefaults_tmp)
-+
-+config: $(conf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+
-+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+
-+# Help text used by make help
-+help:
-+ @echo ' defconfig - New config with default from default config'
-+ @echo ' config - Update current config utilising a line-oriented program'
-+ @echo ' menuconfig - Update current config utilising a menu based program'
-+
-+endif
-+endif
-Index: libc/option-groups.def
-===================================================================
---- libc.orig/option-groups.def
-+++ libc/option-groups.def
-@@ -4,19 +4,19 @@
- #
- # An entry of the form:
- #
--# config OPTION_GROUP_NAME
-+# config GROUP_NAME
- # bool "one-line explanation of what this option group controls"
- # help
- # Multi-line help explaining the option group's meaning in
- # some detail, terminated by indentation level.
- #
--# defines an option group whose variable is OPTION_GROUP_NAME, with
-+# defines an option group whose variable is GROUP_NAME, with
- # meaningful values 'y' (enabled) and 'n' (disabled). The
- # documentation is formatted to be consumed by some sort of
- # interactive configuration interface, but EGLIBC doesn't have such an
- # interface yet.
- #
--# An option may have a 'depends' line, indicating which other options
-+# An option may have a 'depends on' line, indicating which other options
- # must also be enabled if this option is. At present, EGLIBC doesn't
- # check that these dependencies are satisfied.
- #
-@@ -41,9 +41,9 @@
- # although this simply reestablishes the value already set by
- # 'option-groups.defaults'.
-
--config OPTION_EGLIBC_ADVANCED_INET6
-+config EGLIBC_ADVANCED_INET6
- bool "IPv6 Advanced Sockets API support (RFC3542)"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes the functions specified by RFC 3542,
- "Advanced Sockets Application Program Interface (API) for
-@@ -71,7 +71,7 @@ config OPTION_EGLIBC_ADVANCED_INET6
- inet6_rth_segments
- inet6_rth_space
-
--config OPTION_EGLIBC_BACKTRACE
-+config EGLIBC_BACKTRACE
- bool "Functions for producing backtraces"
- help
- This option group includes functions for producing a list of
-@@ -85,7 +85,7 @@ config OPTION_EGLIBC_BACKTRACE
- backtrace_symbols
- backtrace_symbols_fd
-
--config OPTION_EGLIBC_BIG_MACROS
-+config EGLIBC_BIG_MACROS
- bool "Use extensive inline code"
- help
- This option group specifies whether certain pieces of code
-@@ -93,7 +93,7 @@ config OPTION_EGLIBC_BIG_MACROS
- group is not selected, function calls will be used instead,
- hence reducing the library footprint.
-
--config OPTION_EGLIBC_BSD
-+config EGLIBC_BSD
- bool "BSD-specific functions, and their compatibility stubs"
- help
- This option group includes functions specific to BSD kernels.
-@@ -109,10 +109,9 @@ config OPTION_EGLIBC_BSD
- revoke
- setlogin
-
--config OPTION_EGLIBC_CXX_TESTS
-+config EGLIBC_CXX_TESTS
- bool "Tests that link against the standard C++ library."
-- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-- depends OPTION_EGLIBC_LIBM
-+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
- help
- This option group does not include any C library functions;
- instead, it controls which EGLIBC tests an ordinary 'make
-@@ -121,23 +120,22 @@ config OPTION_EGLIBC_CXX_TESTS
- run.
-
- The standard C++ library depends on the math library 'libm' and
-- the wide character I/O functions included in EGLIBC. If those
-- option groups are disabled, this test must also be disabled.
-+ the wide character I/O functions included in EGLIBC. So those
-+ option groups must be enabled if this test is enabled.
-
--config OPTION_EGLIBC_CATGETS
-+config EGLIBC_CATGETS
- bool "Functions for accessing message catalogs"
-- depends OPTION_EGLIBC_LOCALE_CODE
-+ depends on EGLIBC_LOCALE_CODE
- help
- This option group includes functions for accessing message
- catalogs: catopen, catclose, and catgets.
-
-- This option group depends on the OPTION_EGLIBC_LOCALE_CODE
-- option group; if you disable that, you must also disable this.
-+ This option group depends on the EGLIBC_LOCALE_CODE
-+ option group.
-
--config OPTION_EGLIBC_CHARSETS
-+config EGLIBC_CHARSETS
- bool "iconv/gconv character set conversion libraries"
- help
--
- This option group includes support for character sets other
- than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
- various encodings. This affects both the character sets
-@@ -198,16 +196,16 @@ config OPTION_EGLIBC_CHARSETS
- WCHAR_T - EGLIBC's internal form (target-endian,
- 32-bit ISO 10646)
-
--config OPTION_EGLIBC_CRYPT
-+config EGLIBC_CRYPT
- bool "Encryption library"
- help
- This option group includes the `libcrypt' library which
- provides functions for one-way encryption. Supported
- encryption algorithms include MD5, SHA-256, SHA-512 and DES.
-
--config OPTION_EGLIBC_CRYPT_UFC
-+config EGLIBC_CRYPT_UFC
- bool "Ultra fast `crypt' implementation"
-- depends OPTION_EGLIBC_CRYPT
-+ depends on EGLIBC_CRYPT
- help
- This option group provides ultra fast DES-based implementation of
- the `crypt' function. When this option group is disabled,
-@@ -216,7 +214,7 @@ config OPTION_EGLIBC_CRYPT_UFC
- errno to ENOSYS if /salt/ passed does not correspond to either MD5,
- SHA-256 or SHA-512 algorithm.
-
--config OPTION_EGLIBC_DB_ALIASES
-+config EGLIBC_DB_ALIASES
- bool "Functions for accessing the mail aliases database"
- help
- This option group includues functions for looking up mail
-@@ -233,7 +231,7 @@ config OPTION_EGLIBC_DB_ALIASES
- When this option group is disabled, the NSS service libraries
- also lack support for querying their mail alias tables.
-
--config OPTION_EGLIBC_ENVZ
-+config EGLIBC_ENVZ
- bool "Functions for handling envz-style environment vectors."
- help
- This option group contains functions for creating and operating
-@@ -248,7 +246,7 @@ config OPTION_EGLIBC_ENVZ
- envz_entry envz_remove
- envz_get envz_strip
-
--config OPTION_EGLIBC_FCVT
-+config EGLIBC_FCVT
- bool "Functions for converting floating-point numbers to strings"
- help
- This option group includes functions for converting
-@@ -262,14 +260,14 @@ config OPTION_EGLIBC_FCVT
- fcvt_r qfcvt_r
- gcvt qgcvt
-
--config OPTION_EGLIBC_FMTMSG
-+config EGLIBC_FMTMSG
- bool "Functions for formatting messages"
- help
- This option group includes the following functions:
-
- addseverity fmtmsg
-
--config OPTION_EGLIBC_FSTAB
-+config EGLIBC_FSTAB
- bool "Access functions for 'fstab'"
- help
- This option group includes functions for reading the mount
-@@ -283,7 +281,7 @@ config OPTION_EGLIBC_FSTAB
- getfsent setfsent
- getfsfile
-
--config OPTION_EGLIBC_FTRAVERSE
-+config EGLIBC_FTRAVERSE
- bool "Functions for traversing file hierarchies"
- help
- This option group includes functions for traversing file
-@@ -297,9 +295,9 @@ config OPTION_EGLIBC_FTRAVERSE
- fts_set nftw64
- fts_close
-
--config OPTION_EGLIBC_GETLOGIN
-+config EGLIBC_GETLOGIN
- bool "The getlogin function"
-- depends OPTION_EGLIBC_UTMP
-+ depends on EGLIBC_UTMP
- help
- This function group includes the 'getlogin' and 'getlogin_r'
- functions, which return the user name associated by the login
-@@ -309,17 +307,17 @@ config OPTION_EGLIBC_GETLOGIN
- fall back on 'getlogin' to find the user's login name for tilde
- expansion when the 'HOME' environment variable is not set.
-
--config OPTION_EGLIBC_IDN
-+config EGLIBC_IDN
- bool "International domain names support"
- help
- This option group includes the `libcidn' library which
- provides support for international domain names.
-
--config OPTION_EGLIBC_INET
-+config EGLIBC_INET
- bool "Networking support"
- help
- This option group includes networking-specific functions and
-- data. With OPTION_EGLIBC_INET disabled, the EGLIBC
-+ data. With EGLIBC_INET disabled, the EGLIBC
- installation and API changes as follows:
-
- - The following libraries are not installed:
-@@ -439,14 +437,14 @@ config OPTION_EGLIBC_INET
- use Unix-domain sockets to communicate with the syslog daemon;
- syslog is valuable in non-networked contexts.
-
--config OPTION_EGLIBC_INET_ANL
-+config EGLIBC_INET_ANL
- bool "Asynchronous name lookup"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes the `libanl' library which
- provides support for asynchronous name lookup.
-
--config OPTION_EGLIBC_LIBM
-+config EGLIBC_LIBM
- bool "libm (math library)"
- help
- This option group includes the 'libm' library, containing
-@@ -464,7 +462,7 @@ config OPTION_EGLIBC_LIBM
- group, you will not be able to build 'libstdc++' against the
- resulting EGLIBC installation.
-
--config OPTION_EGLIBC_LOCALES
-+config EGLIBC_LOCALES
- bool "Locale definitions"
- help
- This option group includes all locale definitions other than
-@@ -472,17 +470,17 @@ config OPTION_EGLIBC_LOCALES
- only the "C" locale is supported.
-
-
--config OPTION_EGLIBC_LOCALE_CODE
-+config EGLIBC_LOCALE_CODE
- bool "Locale functions"
-- depends OPTION_POSIX_C_LANG_WIDE_CHAR
-+ depends on POSIX_C_LANG_WIDE_CHAR
- help
- This option group includes locale support functions, programs,
-- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled,
-+ and libraries. With EGLIBC_LOCALE_CODE disabled,
- EGLIBC supports only the 'C' locale (also known as 'POSIX'),
- and ignores the settings of the 'LANG' and 'LC_*' environment
- variables.
-
-- With OPTION_EGLIBC_LOCALE_CODE disabled, the following
-+ With EGLIBC_LOCALE_CODE disabled, the following
- functions are omitted from libc:
-
- duplocale localeconv nl_langinfo rpmatch strfmon_l
-@@ -491,46 +489,43 @@ config OPTION_EGLIBC_LOCALE_CODE
- Furthermore, only the LC_CTYPE and LC_TIME categories of the
- standard "C" locale are available.
-
-- The OPTION_EGLIBC_CATGETS option group depends on this option
-- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
-- disable OPTION_EGLIBC_CATGETS.
-+ The EGLIBC_CATGETS option group depends on this option group.
-+
-
--config OPTION_EGLIBC_MEMUSAGE
-+config EGLIBC_MEMUSAGE
- bool "Memory profiling library"
- help
- This option group includes the `libmemusage' library and
- the `memusage' and `memusagestat' utilities.
- These components provide memory profiling functions.
-
-- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-
- Libmemusage library buffers the profiling data in memory
- before writing it out to disk. By default, the library
- allocates 1.5M buffer, which can be substantial for some
-- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
-+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
- allows to change the default buffer size. It specifies
- the number of entries the buffer should have.
- On most architectures one buffer entry amounts to 48 bytes,
- so setting this option to the value of 512 will reduce the size of
- the memory buffer to 24K.
-
--config OPTION_EGLIBC_NIS
-+config EGLIBC_NIS
- bool "Support for NIS, NIS+, and the special 'compat' services."
-- depends OPTION_EGLIBC_INET
-- depends OPTION_EGLIBC_SUNRPC
-+ depends on EGLIBC_INET && EGLIBC_SUNRPC
- help
- This option group includes the NIS, NIS+, and 'compat' Name
- Service Switch service libraries. When it is disabled, those
- services libraries are not installed; you should remove any
- references to them from your 'nsswitch.conf' file.
-
-- This option group depends on the OPTION_EGLIBC_INET option
-+ This option group depends on the EGLIBC_INET option
- group; you must enable that to enable this option group.
-
--config OPTION_EGLIBC_NSSWITCH
-+config EGLIBC_NSSWITCH
- bool "Name service switch (nsswitch) support"
- help
--
- This option group includes support for the 'nsswitch' facility.
- With this option group enabled, all EGLIBC functions for
- accessing various system databases (passwords and groups;
-@@ -544,12 +539,12 @@ config OPTION_EGLIBC_NSSWITCH
- 'option-groups.config' file must set the following two
- variables:
-
-- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
-+ EGLIBC_NSSWITCH_FIXED_CONFIG
-
- Set this to the name of a file whose contents observe the
- same syntax as an ordinary '/etc/nsswitch.conf' file. The
- EGLIBC build process parses this file just as EGLIBC would
-- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and
-+ at run time if EGLIBC_NSSWITCH were enabled, and
- produces a C library that uses the nsswitch service
- libraries to search for database entries as this file
- specifies, instead of consulting '/etc/nsswitch.conf' at run
-@@ -567,7 +562,7 @@ config OPTION_EGLIBC_NSSWITCH
- you will probably want to delete references to databases not
- needed on your system.
-
-- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-
- The EGLIBC build process uses this file to decide which
- functions to make available from which service libraries.
-@@ -585,28 +580,28 @@ config OPTION_EGLIBC_NSSWITCH
- Be sure to mention each function in each service you wish to
- use. If you do not mention a service's function here, the
- EGLIBC database access functions will not find it, even if
-- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
-+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
- file.
-
-- In this arrangement, EGLIBC will not use the 'dlopen' and
-- 'dlsym' functions to find database access functions. Instead,
-- libc hard-codes references to the service libraries' database
-- access functions. You must explicitly link your program
-- against the name service libraries (those whose names start
-- with 'libnss_', in the sysroot's '/lib' directory) whose
-- functions you intend to use. This arrangement helps
-- system-wide static analysis tools decide which functions a
-- system actually uses.
--
-- Note that some nsswitch service libraries require other option
-- groups to be enabled; for example, the OPTION_EGLIBC_INET
-- option group must be enabled to use the 'libnss_dns.so.2'
-- service library, which uses the Domain Name System network
-- protocol to answer queries.
-+ In this arrangement, EGLIBC will not use the 'dlopen' and
-+ 'dlsym' functions to find database access functions. Instead,
-+ libc hard-codes references to the service libraries' database
-+ access functions. You must explicitly link your program
-+ against the name service libraries (those whose names start
-+ with 'libnss_', in the sysroot's '/lib' directory) whose
-+ functions you intend to use. This arrangement helps
-+ system-wide static analysis tools decide which functions a
-+ system actually uses.
-+
-+ Note that some nsswitch service libraries require other option
-+ groups to be enabled; for example, the EGLIBC_INET
-+ option group must be enabled to use the 'libnss_dns.so.2'
-+ service library, which uses the Domain Name System network
-+ protocol to answer queries.
-
--config OPTION_EGLIBC_RCMD
-+config EGLIBC_RCMD
- bool "Support for 'rcmd' and related library functions"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes functions for running commands on
- remote machines via the 'rsh' protocol, and doing authentication
-@@ -622,7 +617,7 @@ config OPTION_EGLIBC_RCMD
- rresvport ruserpass
- rresvport_af
-
--config OPTION_EGLIBC_RTLD_DEBUG
-+config EGLIBC_RTLD_DEBUG
- bool "Runtime linker debug print outs"
- help
- This option group enables debug output of the runtime linker
-@@ -633,7 +628,7 @@ config OPTION_EGLIBC_RTLD_DEBUG
- the `ldd' utility which may also be used by the prelinker.
- In particular, the `--unused' ldd option will not work correctly.
-
--config OPTION_EGLIBC_SPAWN
-+config EGLIBC_SPAWN
- bool "Support for POSIX posix_spawn functions"
- help
- This option group includes the POSIX functions for executing
-@@ -669,7 +664,7 @@ config OPTION_EGLIBC_SPAWN
- disabled, those programs will only operate on uncompressed
- charmap files.
-
--config OPTION_EGLIBC_STREAMS
-+config EGLIBC_STREAMS
- bool "Support for accessing STREAMS."
- help
- This option group includes functions for reading and writing
-@@ -685,14 +680,14 @@ config OPTION_EGLIBC_STREAMS
- isastream fdetach
- putmsg
-
--config OPTION_EGLIBC_SUNRPC
-+config EGLIBC_SUNRPC
- bool "Support for the Sun 'RPC' protocol."
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes support for the Sun RPC protocols,
- including the 'rpcgen' and 'rpcinfo' programs.
-
--config OPTION_EGLIBC_UTMP
-+config EGLIBC_UTMP
- bool "Older access functions for 'utmp' login records"
- help
- This option group includes the older 'utent' family of
-@@ -719,9 +714,9 @@ config OPTION_EGLIBC_UTMP
-
- libutil.so (and libutil.a)
-
--config OPTION_EGLIBC_UTMPX
-+config EGLIBC_UTMPX
- bool "POSIX access functions for 'utmp' login records"
-- depends OPTION_EGLIBC_UTMP
-+ depends on EGLIBC_UTMP
- help
- This option group includes the POSIX functions for reading and
- writing user login records in the 'utmp' file (usually
-@@ -742,21 +737,21 @@ config OPTION_EGLIBC_UTMPX
- updwtmpx
- utmpxname
-
--config OPTION_EGLIBC_WORDEXP
-+config EGLIBC_WORDEXP
- bool "Shell-style word expansion"
- help
- This option group includes the 'wordexp' function for
- performing word expansion in the manner of the shell, and the
- accompanying 'wordfree' function.
-
--config OPTION_POSIX_C_LANG_WIDE_CHAR
-+config POSIX_C_LANG_WIDE_CHAR
- bool "ISO C library wide character functions, excluding I/O"
- help
- This option group includes the functions defined by the ISO C
- standard for working with wide and multibyte characters in
- memory. Functions for reading and writing wide and multibyte
- characters from and to files call in the
-- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group.
-+ POSIX_WIDE_CHAR_DEVICE_IO option group.
-
- This option group includes the following functions:
-
-@@ -778,14 +773,14 @@ config OPTION_POSIX_C_LANG_WIDE_CHAR
- mbrlen wcscoll wcstol
- mbrtowc wcscpy wcstold
-
--config OPTION_POSIX_REGEXP
-+config POSIX_REGEXP
- bool "Regular expressions"
- help
- This option group includes the POSIX regular expression
- functions, and the associated non-POSIX extensions and
- compatibility functions.
-
-- With OPTION_POSIX_REGEXP disabled, the following functions are
-+ With POSIX_REGEXP disabled, the following functions are
- omitted from libc:
-
- re_comp re_max_failures regcomp
-@@ -799,9 +794,9 @@ config OPTION_POSIX_REGEXP
- <regexp.h> header file, 'compile', 'step', and 'advance', is
- omitted.
-
--config OPTION_POSIX_REGEXP_GLIBC
-+config POSIX_REGEXP_GLIBC
- bool "Regular expressions from GLIBC"
-- depends OPTION_POSIX_REGEXP
-+ depends on POSIX_REGEXP
- help
- This option group specifies which regular expression
- library to use. The choice is between regex
-@@ -810,9 +805,9 @@ config OPTION_POSIX_REGEXP_GLIBC
- optimized for speed; regex from libiberty is more than twice
- as small while still is enough for most practical purposes.
-
--config OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+config POSIX_WIDE_CHAR_DEVICE_IO
- bool "Input and output functions for wide characters"
-- depends OPTION_POSIX_C_LANG_WIDE_CHAR
-+ depends on POSIX_C_LANG_WIDE_CHAR
- help
- This option group includes functions for reading and writing
- wide characters to and from <stdio.h> streams.
-Index: libc/Makefile
-===================================================================
---- libc.orig/Makefile
-+++ libc/Makefile
-@@ -24,6 +24,7 @@ endif
-
- include Makeconfig
-
-+include options-config/Makefile
-
- # This is the default target; it makes everything except the tests.
- .PHONY: all
-Index: libc/configure
-===================================================================
---- libc.orig/configure
-+++ libc/configure
-@@ -621,6 +621,7 @@ KSH
- libc_cv_have_bash2
- BASH_SHELL
- libc_cv_gcc_static_libgcc
-+KCONFIG_TOOLS
- CXX_SYSINCLUDES
- SYSINCLUDES
- AUTOCONF
-@@ -734,6 +735,7 @@ with_fp
- with_binutils
- with_selinux
- with_headers
-+with_kconfig
- with_default_link
- enable_sanity_checks
- enable_shared
-@@ -1438,6 +1440,9 @@ Optional Packages:
- --with-selinux if building with SELinux support
- --with-headers=PATH location of system headers to use (for example
- /usr/src/linux/include) [default=compiler default]
-+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
-+ builds) to re-use for configuring EGLIBC option
-+ groups
- --with-default-link do not use explicit linker scripts
- --with-cpu=CPU select code for CPU variant
-
-@@ -3401,6 +3406,14 @@ fi
-
-
-
-+# Check whether --with-kconfig was given.
-+if test "${with_kconfig+set}" = set; then
-+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
-+else
-+ KCONFIG_TOOLS=''
-+fi
-+
-+
-
- # Check whether --with-default-link was given.
- if test "${with_default_link+set}" = set; then :
-Index: libc/EGLIBC.option-groups
-===================================================================
---- libc.orig/EGLIBC.option-groups
-+++ libc/EGLIBC.option-groups
-@@ -56,33 +56,9 @@ disable option groups one by one, until
-
- The Option Groups
-
--EGLIBC currently implements the following option groups, also
--documented in the file 'option-groups.def':
--
--OPTION_EGLIBC_CATGETS
-- This option group includes functions for accessing message
-- catalogs: catopen, catclose, and catgets.
--
--OPTION_EGLIBC_LOCALES
-- This option group includes all locale definitions other than
-- those for the "C" locale. If this option group is omitted, then
-- only the "C" locale is supported.
--
--OPTION_EGLIBC_LIBM
-- This option group includes the 'libm' library, containing
-- mathematical functions. If this option group is omitted, then
-- an EGLIBC installation does not include shared or unshared versions
-- of the math library.
--
-- Note that this does not remove all floating-point related
-- functionality from EGLIBC; for example, 'printf' and 'scanf'
-- can still print and read floating-point values with this option
-- group disabled.
--
-- Note that the ISO Standard C++ library 'libstdc++' depends on
-- EGLIBC's math library 'libm'. If you disable this option
-- group, you will not be able to build 'libstdc++' against the
-- resulting EGLIBC installation.
-+To see the current full list of implemented option groups, refer to the
-+file 'option-groups.def' at the top of the source tree, or run
-+'make menuconfig' from the top-level build directory.
-
- The POSIX.1-2001 specification includes a suggested partition of all
- the functions in the POSIX C API into option groups: math functions
-@@ -110,6 +86,18 @@ data, but include mathematical functions
- OPTION_EGLIBC_LOCALES = n
- OPTION_EGLIBC_LIBM = y
-
-+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
-+targets to make it easier to create 'option-groups.config', with all
-+dependencies between option groups automatically satisfied. Run
-+'make help' to see the list of supported make config targets. For
-+example, 'make menuconfig' will update the current config utilising a
-+menu based program.
-+
-+The option group names and their type (boolean, int, hex, string), help
-+description, and dependencies with other option groups, are described by
-+'option-groups.def' at the top of the source tree, analogous to the
-+'Kconfig' files in the Linux kernel.
-+
- In general, each option group variable controls whether a given set of
- object files in EGLIBC is compiled and included in the final
- libraries, or omitted from the build.
-@@ -132,22 +120,3 @@ under development.
-
- We have used the system to subset some portions of EGLIBC's
- functionality. It needs to be extended to cover more of the library.
--
--At the moment, EGLIBC performs no sanity checks on the contents of
--'option-groups.config'; if an option group's name is mistyped, the
--option group is silently included in the build. EGLIBC should check
--that all variables set in 'option-groups.config' are proper option
--group names, and that their values are appropriate.
--
--Some portions of EGLIBC depend on others; for example, the Sun Remote
--Procedure Call functions in 'sunrpc' depend on the networking
--functions in 'inet'. The sanity checking described above should check
--that the selection configuration satisfies dependencies within EGLIBC,
--and produce a legible error message if it does not. At the moment,
--inconsistent configurations produce link errors late in the build
--process.
--
--The Linux kernel's configuration system provides interactive
--interfaces for creating and modifying configuration files (which also
--perform the sanity checking and dependency tracking described above).
--EGLIBC should provide similar interfaces.
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch
deleted file mode 100644
index 7caba48112..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-pulled from
-
-http://www.eglibc.org/archives/patches/msg01043.html
-
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-
-This patch builds on the menuconfig patch for EGLIBC.
-
-
-There are a few options that have non-boolean types, that would benefit from the new 'make *config' support:
-
-EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int)
-EGLIBC_NSSWITCH_FIXED_CONFIG (string)
-EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string)
-
-
-The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file.
-
-In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n.
-
-Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header.
-
-attached is the updated patch to address above issues.
-
-Steve
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
-Index: libc/malloc/Makefile
-===================================================================
---- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800
-+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700
-@@ -48,10 +48,6 @@
- ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
- extra-libs = libmemusage
- extra-libs-others = $(extra-libs)
--
--ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
--CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
--endif
- endif
-
- libmemusage-routines = memusage
-Index: libc/option-groups.def
-===================================================================
---- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700
-+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700
-@@ -513,8 +513,11 @@
- the `memusage' and `memusagestat' utilities.
- These components provide memory profiling functions.
-
-- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
--
-+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+ int "Memory profiling library buffer size"
-+ depends on EGLIBC_MEMUSAGE
-+ default "32768"
-+ help
- Libmemusage library buffers the profiling data in memory
- before writing it out to disk. By default, the library
- allocates 1.5M buffer, which can be substantial for some
-@@ -553,8 +556,11 @@
- 'option-groups.config' file must set the following two
- variables:
-
-- EGLIBC_NSSWITCH_FIXED_CONFIG
--
-+config EGLIBC_NSSWITCH_FIXED_CONFIG
-+ string "Nsswitch fixed config filename"
-+ depends on !EGLIBC_NSSWITCH
-+ default ""
-+ help
- Set this to the name of a file whose contents observe the
- same syntax as an ordinary '/etc/nsswitch.conf' file. The
- EGLIBC build process parses this file just as EGLIBC would
-@@ -576,8 +582,11 @@
- you will probably want to delete references to databases not
- needed on your system.
-
-- EGLIBC_NSSWITCH_FIXED_FUNCTIONS
--
-+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+ string "Nsswitch fixed functions filename"
-+ depends on !EGLIBC_NSSWITCH
-+ default ""
-+ help
- The EGLIBC build process uses this file to decide which
- functions to make available from which service libraries.
- The file 'nss/fixed-nsswitch.functions' serves as a sample
-Index: libc/options-config/config-postproc.pl
-===================================================================
---- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700
-+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700
-@@ -8,7 +8,7 @@
- die "Could not open $ARGV[0]" unless -T $ARGV[0];
-
- sub yank {
-- @option = grep($_ ne $_[0], @option);
-+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
- }
-
- open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
-@@ -16,7 +16,7 @@
- # get the full list of available options using the default config file
- $i = 0;
- while (<DEFAULTS>) {
-- if (/^\s*OPTION_(\w+)\s*=/) {
-+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
- $option[$i++] = $1;
- }
- }
-@@ -35,8 +35,9 @@
- s/CONFIG_/OPTION_/g;
- print;
- } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
-- # this is a comment line, change CONFIG_ to OPTION_, remove this
-- # option from option list, and convert to explicit OPTION_FOO=n
-+ # this is a comment line for an unset boolean option, change CONFIG_
-+ # to OPTION_, remove this option from option list, and convert to
-+ # explicit OPTION_FOO=n
- $opt = $1;
- yank($opt);
- s/CONFIG_/OPTION_/g;
-@@ -46,9 +47,12 @@
- }
- }
-
--# any options left in @options, are options that were not mentioned in
-+# any boolean options left in @options, are options that were not mentioned in
- # the config file, and implicitly that means the option must be set =n,
- # so do that here.
- foreach $opt (@option) {
-- print "OPTION_$opt=n\n";
-+ if ($opt =~ /=\s*[yn]/) {
-+ $opt =~ s/=\s*[yn]/=n/;
-+ print "OPTION_$opt\n";
-+ }
- }
-Index: libc/scripts/option-groups.awk
-===================================================================
---- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800
-+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700
-@@ -46,9 +46,15 @@
- print "#define __" var " 1"
- else if (vars[var] == "n")
- print "/* #undef __" var " */"
-- # Ignore variables that don't have boolean values.
-- # Ideally, this would be driven by the types given in
-- # option-groups.def.
-+ else if (vars[var] ~ /^[0-9]+/ ||
-+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
-+ vars[var] ~ /^\"/)
-+ print "#define __" var " " vars[var]
-+ else
-+ print "/* #undef __" var " */"
-+ # Ignore variables that don't have boolean, int, hex, or
-+ # string values. Ideally, this would be driven by the types
-+ # given in option-groups.def.
- }
- }
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch
deleted file mode 100644
index d137f5b318..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-Pulled from
-
-http://www.eglibc.org/archives/patches/msg01035.html
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after.
-
-My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok.
-
-
-Thanks,
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
- EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++---------------------
- 1 file changed, 35 insertions(+), 24 deletions(-)
-
-Index: libc/EGLIBC.cross-building
-===================================================================
---- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700
-+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700
-@@ -47,31 +47,34 @@
- EGLIBC requires recent versions of the GNU binutils, GCC, and the
- Linux kernel. The web page <http://www.eglibc.org/prerequisites>
- documents the current requirements, and lists patches needed for
--certain target architectures. As of this writing, EGLIBC required
--binutils 2.17, GCC 4.1, and Linux 2.6.19.1.
-+certain target architectures. As of this writing, these build
-+instructions have been tested with binutils 2.22.51, GCC 4.6.2,
-+and Linux 3.1.
-
- First, let's set some variables, to simplify later commands. We'll
--build EGLIBC and GCC for a PowerPC target, known to the Linux kernel
--as 'powerpc', and we'll do the build on an Intel Linux box:
-+build EGLIBC and GCC for an ARM target, known to the Linux kernel
-+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
-
-- $ build=i686-pc-linux-gnu
-+ $ build=x86_64-pc-linux-gnu
- $ host=$build
-- $ target=powerpc-none-linux-gnu
-- $ linux_arch=powerpc
-+ $ target=arm-none-linux-gnueabi
-+ $ linux_arch=arm
-
- We're using the aforementioned versions of Binutils, GCC, and Linux:
-
-- $ binutilsv=binutils-2.17
-- $ gccv=gcc-4.1.1
-- $ linuxv=linux-2.6.20
-+ $ binutilsv=binutils-2.22.51
-+ $ gccv=gcc-4.6.2
-+ $ linuxv=linux-3.1
-
- We're carrying out the entire process under '~/cross-build', which
--contains unpacked source trees:
-+contains unpacked source trees for binutils, gcc, and linux kernel,
-+along with EGLIBC svn trunk (which can be checked-out with
-+'svn co http://www.eglibc.org/svn/trunk eglibc'):
-
-- $ top=$HOME/cross-build/ppc
-+ $ top=$HOME/cross-build/$target
- $ src=$HOME/cross-build/src
- $ ls $src
-- binutils-2.17 gcc-4.1.1 libc linux-2.6.20
-+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
-
- We're going to place our build directories in a subdirectory 'obj',
- we'll install the cross-development toolchain in 'tools', and we'll
-@@ -99,7 +102,7 @@
-
- The First GCC
-
--For our work, we need a cross-compiler targeting a PowerPC Linux
-+For our work, we need a cross-compiler targeting an ARM Linux
- system. However, that configuration includes the shared library
- 'libgcc_s.so', which is compiled against the EGLIBC headers (which we
- haven't installed yet) and linked against 'libc.so' (which we haven't
-@@ -125,7 +128,8 @@
- > --prefix=$tools \
- > --without-headers --with-newlib \
- > --disable-shared --disable-threads --disable-libssp \
-- > --disable-libgomp --disable-libmudflap \
-+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
-+ > --disable-decimal-float --disable-libffi \
- > --enable-languages=c
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install
-@@ -162,12 +166,13 @@
- > CXX=$tools/bin/$target-g++ \
- > AR=$tools/bin/$target-ar \
- > RANLIB=$tools/bin/$target-ranlib \
-- > $src/libc/configure \
-+ > $src/eglibc/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
- > --build=$build \
- > --host=$target \
-- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+ > --disable-profile --without-gd --without-cvs \
-+ > --enable-add-ons=nptl,libidn,../ports
-
- The option '--prefix=/usr' may look strange, but you should never
- configure EGLIBC with a prefix other than '/usr': in various places,
-@@ -181,6 +186,11 @@
- The '--with-headers' option tells EGLIBC where the Linux headers have
- been installed.
-
-+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
-+for the listed glibc add-ons. Most notably the ports add-on (located
-+just above the libc sources in the EGLIBC svn tree) is required to
-+support ARM targets.
-+
- We can now use the 'install-headers' makefile target to install the
- headers:
-
-@@ -223,6 +233,7 @@
- > --prefix=$tools \
- > --with-sysroot=$sysroot \
- > --disable-libssp --disable-libgomp --disable-libmudflap \
-+ > --disable-libffi --disable-libquadmath \
- > --enable-languages=c
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install
-@@ -240,13 +251,14 @@
- > CXX=$tools/bin/$target-g++ \
- > AR=$tools/bin/$target-ar \
- > RANLIB=$tools/bin/$target-ranlib \
-- > $src/libc/configure \
-+ > $src/eglibc/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
- > --with-kconfig=$obj/linux/scripts/kconfig \
- > --build=$build \
- > --host=$target \
-- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+ > --disable-profile --without-gd --without-cvs \
-+ > --enable-add-ons=nptl,libidn,../ports
-
- Note the additional '--with-kconfig' option. This tells EGLIBC where to
- find the host config tools used by the kernel 'make config' and 'make
-@@ -337,15 +349,15 @@
- ELF Header:
- ...
- Type: EXEC (Executable file)
-- Machine: PowerPC
-+ Machine: ARM
-
- ...
- Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
-- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1
-- [Requesting program interpreter: /lib/ld.so.1]
-- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000
-+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
-+ [Requesting program interpreter: /lib/ld-linux.so.3]
-+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
- ...
-
- Looking at the dynamic section of the installed 'libgcc_s.so', we see
-@@ -357,7 +369,6 @@
- Dynamic section at offset 0x1083c contains 24 entries:
- Tag Type Name/Value
- 0x00000001 (NEEDED) Shared library: [libc.so.6]
-- 0x00000001 (NEEDED) Shared library: [ld.so.1]
- 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
- ...
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch
deleted file mode 100644
index 7258c82418..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
-so we should use GLRO_dl_debug_mask
-
-Singed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: libc/elf/dl-open.c
-===================================================================
---- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700
-+++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800
-@@ -155,7 +155,7 @@
- ns->_ns_main_searchlist->r_list[new_nlist++] = map;
-
- /* We modify the global scope. Report this. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
- map->l_name, map->l_ns);
- }
-@@ -298,7 +298,7 @@
- LIBC_PROBE (map_complete, 3, args->nsid, r, new);
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_show_scope (new, 0);
-
- /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
-@@ -515,7 +515,7 @@
- }
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_show_scope (imap, from_scope);
- }
-
-Index: libc/ports/sysdeps/mips/dl-lookup.c
-===================================================================
---- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
-+++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
-@@ -111,7 +111,7 @@
- continue;
-
- /* Print some debugging info if wanted. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
- _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
- undef_name,
- map->l_name[0] ? map->l_name : rtld_progname,
-@@ -432,7 +432,7 @@
- hash table. */
- if (__builtin_expect (tab->size, 0))
- {
-- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
-+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
- __rtld_lock_unlock_recursive (tab->lock);
- goto success;
- }
-@@ -681,7 +681,7 @@
- }
-
- /* Display information if we are debugging. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("\
- \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
- map->l_name[0] ? map->l_name : rtld_progname,
-@@ -788,7 +788,7 @@
- {
- if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL
-- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
-+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
- {
- /* We could find no value for a strong reference. */
- const char *reference_name = undef_map ? undef_map->l_name : "";
-@@ -861,7 +861,7 @@
- if (__builtin_expect (current_value.m->l_used == 0, 0))
- current_value.m->l_used = 1;
-
-- if (__builtin_expect (GLRO(dl_debug_mask)
-+ if (__builtin_expect (GLRO_dl_debug_mask
- & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
- _dl_debug_bindings (undef_name, undef_map, ref,
- &current_value, version, type_class, protected);
-@@ -926,7 +926,7 @@
- {
- const char *reference_name = undef_map->l_name;
-
-- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
-+ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
- {
- _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
- (reference_name[0]
-@@ -942,7 +942,7 @@
- _dl_debug_printf_c ("\n");
- }
- #ifdef SHARED
-- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
- {
- int conflict = 0;
- struct sym_val val = { NULL, NULL };
-Index: libc/elf/rtld.c
-===================================================================
---- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700
-+++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800
-@@ -2118,7 +2118,7 @@
- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- {
- _dl_debug_printf ("\nInitial object scopes\n");
-
-Index: libc/elf/dl-lookup.c
-===================================================================
---- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
-+++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
-@@ -771,7 +771,7 @@
- {
- if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL
-- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
-+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
- {
- /* We could find no value for a strong reference. */
- const char *reference_name = undef_map ? undef_map->l_name : "";
-Index: libc/elf/get-dynamic-info.h
-===================================================================
---- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800
-+++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800
-@@ -157,7 +157,7 @@
- them. Therefore to avoid breaking existing applications the
- best we can do is add a warning during debugging with the
- intent of notifying the user of the problem. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
- && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
- _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
- l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch
deleted file mode 100644
index 4313aa5197..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM'
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function)
-make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1
-
-Upstream-Status: Pending
-
---- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig
-+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
-@@ -25,6 +25,7 @@
- #include <atomic.h>
- #include <sysdep.h>
- #include <kernel-features.h>
-+#include <tls.h>
-
- #define FUTEX_WAIT 0
- #define FUTEX_WAKE 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch
deleted file mode 100644
index bbf4605505..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: backport
-
-Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/09
-
-Index: libc/posix/xregex.c
-===================================================================
---- libc.orig/posix/xregex.c
-+++ libc/posix/xregex.c
-@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P
- _NL_CURRENT (LC_COLLATE,
- _NL_COLLATE_INDIRECTWC);
-
-- idx = findidx ((const wint_t**)&cp);
-+ idx = findidx ((const wint_t**)&cp, -1);
- if (idx == 0 || cp < (wint_t*) str + c1)
- /* This is no valid character. */
- FREE_STACK_RETURN (REG_ECOLLATE);
-@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P
- indirect = (const int32_t *)
- _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-
-- idx = findidx (&cp);
-+ idx = findidx (&cp, -1);
- if (idx == 0 || cp < str + c1)
- /* This is no valid character. */
- FREE_STACK_RETURN (REG_ECOLLATE);
-@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt
- }
- str_buf[i] = TRANSLATE(*(d+i));
- str_buf[i+1] = '\0'; /* sentinel */
-- idx2 = findidx ((const wint_t**)&cp);
-+ idx2 = findidx ((const wint_t**)&cp, -1);
- }
-
- /* Update d, however d will be incremented at
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch
deleted file mode 100644
index 2ca0bca248..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix error like
-
-/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen':
-/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal'
-collect2: error: ld returned 1 exit status
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: libc/libio/fileops.c
-===================================================================
---- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700
-+++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700
-@@ -428,7 +428,7 @@
- result->_mode = 1;
- #else
- /* Treat this as if we couldn't find the given character set. */
-- (void) INTUSE(_IO_file_close_it) (fp);
-+ (void) _IO_file_close_it (fp);
- __set_errno (EINVAL);
- return NULL;
- #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch b/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch
deleted file mode 100644
index ac1e2e82f9..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir
-
-Upstream-Status:Pending
-Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
-
-diff --git a/libc/sysdeps/gnu/configure b/libc/sysdeps/gnu/configure
-index e7f0e43..687beab 100644
---- a/libc/sysdeps/gnu/configure
-+++ b/libc/sysdeps/gnu/configure
-@@ -42,6 +42,6 @@ case "$prefix" in
- else
- libc_cv_localstatedir=$localstatedir
- fi
-- libc_cv_rootsbindir=/sbin
-+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
- ;;
- esac
-diff --git a/libc/sysdeps/gnu/configure.ac b/libc/sysdeps/gnu/configure.ac
-index ce251df..57c1e77 100644
---- a/libc/sysdeps/gnu/configure.ac
-+++ b/libc/sysdeps/gnu/configure.ac
-@@ -42,6 +42,6 @@ case "$prefix" in
- else
- libc_cv_localstatedir=$localstatedir
- fi
-- libc_cv_rootsbindir=/sbin
-+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
- ;;
- esac
---
-2.0.0
-
diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
deleted file mode 100644
index d18786ab93..0000000000
--- a/meta/recipes-core/eglibc/eglibc-common.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-SUMMARY = "Embedded GLIBC (GNU C Library)"
-DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is designed to work well on embedded systems. EGLIBC strives to be source and binary compatible with GLIBC. EGLIBC's goals include reduced footprint, configurable components, better support for cross-compilation and cross-testing."
-HOMEPAGE = "http://www.eglibc.org/home"
-SECTION = "libs"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
- file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.19.bb b/meta/recipes-core/eglibc/eglibc-initial_2.19.bb
deleted file mode 100644
index de45079603..0000000000
--- a/meta/recipes-core/eglibc/eglibc-initial_2.19.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require eglibc_${PV}.bb
-require eglibc-initial.inc
-
-DEPENDS += "kconfig-frontends-native"
-
-# main eglibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building eglibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.19.bb b/meta/recipes-core/eglibc/eglibc-locale_2.19.bb
deleted file mode 100644
index ce6c1d2320..0000000000
--- a/meta/recipes-core/eglibc/eglibc-locale_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-locale.inc
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace.inc b/meta/recipes-core/eglibc/eglibc-mtrace.inc
deleted file mode 100644
index d68783e439..0000000000
--- a/meta/recipes-core/eglibc/eglibc-mtrace.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-include eglibc-collateral.inc
-
-SUMMARY = "mtrace utility provided by eglibc"
-DESCRIPTION = "mtrace utility provided by eglibc"
-RDEPENDS_${PN} = "perl"
-RPROVIDES_${PN} = "libc-mtrace"
-
-SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
-
-do_install() {
- install -d -m 0755 ${D}${bindir}
- install -m 0755 ${SRC}/mtrace ${D}${bindir}/
-}
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb
deleted file mode 100644
index 6fa2be9cc9..0000000000
--- a/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-scripts.inc b/meta/recipes-core/eglibc/eglibc-scripts.inc
deleted file mode 100644
index 9ca6673404..0000000000
--- a/meta/recipes-core/eglibc/eglibc-scripts.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-include eglibc-collateral.inc
-
-SUMMARY = "utility scripts provided by eglibc"
-DESCRIPTION = "utility scripts provided by eglibc"
-RDEPENDS_${PN} = "bash eglibc-mtrace"
-
-SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
-
-bashscripts = "sotruss xtrace"
-
-do_install() {
- install -d -m 0755 ${D}${bindir}
- for i in ${bashscripts}; do
- install -m 0755 ${SRC}/$i ${D}${bindir}/
- done
-}
diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb
deleted file mode 100644
index 31133621d1..0000000000
--- a/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-scripts.inc
diff --git a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch
index f2c567d188..c8e2c94af0 100644
--- a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch
+++ b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch
@@ -21,16 +21,3 @@ Signed-off-by: Joe Slater <jslater@windriver.com>
# Which classes to export from the shared library.
MOOPPFLAGS += --dllexport=styled_ostream
---- a/gettext-tools/src/Makefile.am
-+++ b/gettext-tools/src/Makefile.am
-@@ -229,8 +229,8 @@ libgettextsrc_la_LDFLAGS += -Wl,--export
- endif
-
- # No need to install libgettextsrc.a, except on AIX.
--install-exec-local: install-libLTLIBRARIES install-exec-clean
--install-exec-clean:
-+install-exec-local: install-exec-clean
-+install-exec-clean: install-libLTLIBRARIES
- case "@host_os@" in \
- aix*) ;; \
- *) $(RM) $(DESTDIR)$(libdir)/libgettextsrc.a ;; \
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template
deleted file mode 100644
index 4a9ff7d231..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template
+++ /dev/null
@@ -1,53 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-# package. (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.) Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright. The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-# in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-# understood.
-# - Strings which make invalid assumptions about notation of date, time or
-# money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
-
-# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
-# context. Possible values are "yes" and "no". Set this to yes if the
-# package uses functions taking also a message context, like pgettext(), or
-# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
-USE_MSGCTXT = no
-
-# These options get passed to msgmerge.
-# Useful options are in particular:
-# --previous to keep previous msgids of translated messages,
-# --quiet to reduce the verbosity.
-MSGMERGE_OPTIONS =
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz
deleted file mode 100644
index e0335a3d1c..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch
deleted file mode 100644
index d453a74b51..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0bfade685783ccd193b2e1b94d0e4ef5ce449432 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 20 Nov 2013 17:52:50 +0800
-Subject: [PATCH] remove the test to convert euc-jp
-
-Remove the test "Test against HP-UX 11.11 bug:
-No converter from EUC-JP to UTF-8 is provided"
-since we don't support HP-UX and it causes
-guile-native compile failure if the euc-jp is not
-installed on the host
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- iconv.m4 | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/iconv.m4 b/iconv.m4
-index a503646..dbe7ca1 100644
---- a/iconv.m4
-+++ b/iconv.m4
-@@ -159,17 +159,6 @@ int main ()
- }
- }
- #endif
-- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
-- provided. */
-- if (/* Try standardized names. */
-- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-- /* Try IRIX, OSF/1 names. */
-- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-- /* Try AIX names. */
-- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-- /* Try HP-UX names. */
-- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-- result |= 16;
- return result;
- }]])],
- [am_cv_func_iconv_works=yes],
---
-1.8.3
-
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
index 3485c5a2cb..8d11d1d8e9 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
@@ -1,4 +1,4 @@
-dnl Copyright (C) 1997-2010 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
index fabdc76c9c..65184f65c7 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
@@ -8,8 +8,8 @@
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
-# Origin: gettext-0.18.3
-GETTEXT_MACRO_VERSION = 0.18
+# Origin: gettext-0.19
+GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
@@ -77,6 +77,16 @@ POTFILES = \
CATALOGS = @CATALOGS@
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
@@ -143,15 +153,25 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
- if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
- LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
- else \
- LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
- fi; \
- } | grep -v 'libtool:' >/dev/null; then \
- package_gnu='GNU '; \
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
else \
- package_gnu=''; \
+ package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
@@ -171,7 +191,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
- --package-name="$${package_gnu}@PACKAGE@" \
+ --package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
@@ -199,9 +219,10 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
@@ -362,7 +383,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
- $(MAKE) update-po
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
new file mode 100644
index 0000000000..b04ba55032
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
Binary files differ
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
index c38b914d6b..b625621fac 100755
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2013 Free Software Foundation, Inc.
+# Copyright 1996-2014 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -367,11 +367,7 @@ else
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
- freebsd2.2*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- freebsd2*)
+ freebsd2.[01]*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
@@ -548,13 +544,11 @@ case "$host_os" in
dgux*)
library_names_spec='$libname$shrext'
;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
freebsd* | dragonfly*)
- case "$host_os" in
- freebsd[123]*)
- library_names_spec='$libname$shrext$versuffix' ;;
- *)
- library_names_spec='$libname$shrext' ;;
- esac
+ library_names_spec='$libname$shrext'
;;
gnu*)
library_names_spec='$libname$shrext'
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin
index 2436c49e78..2436c49e78 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
index 2b43b97022..ca97315a85 100644
--- a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
@@ -8,14 +8,13 @@ SRC_URI = "file://aclocal.tgz \
file://Makefile.in.in \
file://remove-potcdate.sin \
file://COPYING \
- file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
LICENSE = "FSF-Unlimited"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0854da868a929923087141d9d7aba7d5"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b20675cd5158442f6007d022f46b35b"
inherit native
diff --git a/meta/recipes-core/gettext/gettext_0.18.3.2.bb b/meta/recipes-core/gettext/gettext_0.19.4.bb
index 65d4103a97..cebf6c78c6 100644
--- a/meta/recipes-core/gettext/gettext_0.18.3.2.bb
+++ b/meta/recipes-core/gettext/gettext_0.19.4.bb
@@ -18,8 +18,8 @@ PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--
LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-SRC_URI[md5sum] = "241aba309d07aa428252c74b40a818ef"
-SRC_URI[sha256sum] = "d1a4e452d60eb407ab0305976529a45c18124bd518d976971ac6dc7aa8b4c5d7"
+SRC_URI[md5sum] = "d3511af1e604a3478900d2c2b4a4a48e"
+SRC_URI[sha256sum] = "8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f"
inherit autotools texinfo
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch b/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch
new file mode 100644
index 0000000000..3d0c008bbe
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch
@@ -0,0 +1,39 @@
+From c53e94a520b573aa0dcf12903e9563fe8badc34c Mon Sep 17 00:00:00 2001
+From: Marius Avram <marius.avram@intel.com>
+Date: Wed, 27 Aug 2014 12:10:41 +0300
+Subject: [PATCH] Allow /run/media/sdX drive mount if username root
+
+In case that the username logged in the system is root
+the drives are directly mounted in /run/media/sdX and
+not /run/media/<username>/sdX as the function
+g_unix_mount_guess_should_display() expects.
+
+Without this change USB stick mounts are not accesible from
+graphical applications such as the File Manager (pcmanfm).
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Marius Avram <marius.avram@intel.com>
+---
+ gio/gunixmounts.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
+index 4999354..f6c1472 100644
+--- a/gio/gunixmounts.c
++++ b/gio/gunixmounts.c
+@@ -2136,6 +2136,11 @@ g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
+ mount_path[sizeof ("/run/media/") - 1 + user_name_len] == '/')
+ is_in_runtime_dir = TRUE;
+
++ /* Allow no username in path in /run/media if current user is root */
++ if (strcmp(user_name, "root") == 0 &&
++ strncmp (mount_path, "/run/media/", sizeof("run/media")) == 0)
++ is_in_runtime_dir = TRUE;
++
+ if (is_in_runtime_dir || g_str_has_prefix (mount_path, "/media/"))
+ {
+ char *path;
+--
+1.7.9.5
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb
index ff1fb87a38..69b3ef8e37 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb
@@ -13,9 +13,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://ptest-paths.patch \
file://uclibc.patch \
file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
+ file://allow-run-media-sdX-drive-mount-if-username-root.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
-SRC_URI[md5sum] = "05fb7cb17eacbc718e90366a1eae60d9"
-SRC_URI[sha256sum] = "0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5"
+SRC_URI[md5sum] = "89c4119e50e767d3532158605ee9121a"
+SRC_URI[sha256sum] = "8f3f0865280e45b8ce840e176ef83bcfd511148918cc8d39df2ee89b67dcf89a"
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 2eda8a1ddc..072f790111 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -1,5 +1,7 @@
SUMMARY = "A general-purpose utility library"
DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on."
+HOMEPAGE = "https://developer.gnome.org/glib/"
+
# pcre is under BSD;
# docs/reference/COPYING is with a 'public domai'-like license!
LICENSE = "LGPLv2+ & BSD & PD"
@@ -18,21 +20,23 @@ BBCLASSEXTEND = "native nativesdk"
DEPENDS = "glib-2.0-native virtual/libiconv libffi zlib"
DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', ' dbus', '', d)}"
DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-libffi nativesdk-zlib ${BPN}-native"
+DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib ${BPN}-native"
PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
LEAD_SONAME = "libglib-2.0.*"
FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
-inherit autotools gettext gtk-doc pkgconfig ptest
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome
S = "${WORKDIR}/glib-${PV}"
CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
-PTEST_CONF = "${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
-EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
+PRINTF = "--enable-included-printf=no"
+PRINTF_darwin = "--enable-included-printf=yes"
+PRINTF_mingw32 = "--enable-included-printf=yes"
+EXTRA_OECONF = "${PRINTF} ${CORECONF}"
EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
@@ -51,14 +55,14 @@ FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
${datadir}/bash-completion"
-FILES_${PN}-ptest += "${libexecdir}/installed-tests \
- ${datadir}/installed-tests/glib"
ARM_INSTRUCTION_SET = "arm"
USE_NLS = "yes"
do_install_append () {
- sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ if [ -f ${D}${bindir}/gtester-report ]; then
+ sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ fi
# Remove some unpackaged files
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
@@ -84,17 +88,17 @@ RDEPENDS_${PN}-ptest += "\
"
RDEPENDS_${PN}-ptest_append_libc-glibc = "\
- eglibc-gconv-utf-16 \
- eglibc-charmap-utf-8 \
- eglibc-gconv-cp1255 \
- eglibc-charmap-cp1255 \
- eglibc-gconv-utf-32 \
- eglibc-gconv-utf-7 \
- eglibc-gconv-euc-jp \
- eglibc-gconv-iso8859-1 \
- eglibc-gconv-iso8859-15 \
- eglibc-charmap-invariant \
- eglibc-localedata-translit-cjk-variants \
+ glibc-gconv-utf-16 \
+ glibc-charmap-utf-8 \
+ glibc-gconv-cp1255 \
+ glibc-charmap-cp1255 \
+ glibc-gconv-utf-32 \
+ glibc-gconv-utf-7 \
+ glibc-gconv-euc-jp \
+ glibc-gconv-iso8859-1 \
+ glibc-gconv-iso8859-15 \
+ glibc-charmap-invariant \
+ glibc-localedata-translit-cjk-variants \
"
INSANE_SKIP_${PN}-ptest += "libdir"
diff --git a/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb b/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
index a9c1a4129a..b9ba2d6217 100644
--- a/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
+++ b/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
@@ -24,7 +24,7 @@ PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
EXTRA_OECONF = "--without-gnome-proxy"
-inherit gnomebase
+inherit gnomebase gettext
FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/"
diff --git a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch b/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
index 7618c99534..186a480458 100644
--- a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch
+++ b/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
@@ -3,10 +3,10 @@ Upstream-Status: Inappropriate [other]
This is a hack to fix building the locale bits on an older
CentOs 5.X machine
-Index: eglibc-2_16/libc/locale/programs/config.h
+Index: git/locale/programs/config.h
===================================================================
---- eglibc-2_16.orig/libc/locale/programs/config.h
-+++ eglibc-2_16/libc/locale/programs/config.h
+--- git/locale/programs/config.h
++++ git.orig/locale/programs/config.h
@@ -19,6 +19,8 @@
#ifndef _LD_CONFIG_H
#define _LD_CONFIG_H 1
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
new file mode 100644
index 0000000000..8aaa225706
--- /dev/null
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+PV = "2.20"
+
+SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master;name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://fix_for_centos_5.8.patch \
+ ${EGLIBCPATCHES} \
+ "
+EGLIBCPATCHES = "\
+ file://timezone-re-written-tzselect-as-posix-sh.patch \
+ file://eglibc.patch \
+ file://option-groups.patch \
+ file://GLRO_dl_debug_mask.patch \
+ file://eglibc-header-bootstrap.patch \
+ file://eglibc-resolv-dynamic.patch \
+ file://eglibc-ppc8xx-cache-line-workaround.patch \
+ file://eglibc-sh4-fpscr_values.patch \
+ file://eglibc-use-option-groups.patch \
+ "
+
+SRCREV_glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
+SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
+
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc__localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-DNOT_IN_libc=1"
+
+do_configure () {
+ ${S}/localedef/configure ${EXTRA_OECONF}
+}
+
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/meta/recipes-core/eglibc/eglibc-collateral.inc b/meta/recipes-core/glibc/glibc-collateral.inc
index 8feca09f2e..85e06da816 100644
--- a/meta/recipes-core/eglibc/eglibc-collateral.inc
+++ b/meta/recipes-core/glibc/glibc-collateral.inc
@@ -1,6 +1,6 @@
INHIBIT_DEFAULT_DEPS = "1"
LICENSE = "GPLv2 & LGPLv2.1"
-HOMEPAGE = "http://www.eglibc.org/"
+HOMEPAGE = "http://www.gnu.org/software/libc/index.html"
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc
new file mode 100644
index 0000000000..bba1568baf
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-common.inc
@@ -0,0 +1,9 @@
+SUMMARY = "GLIBC (GNU C Library)"
+DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel."
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
+ file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
index 92402f8ff5..7db3deac1b 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -11,8 +11,8 @@ TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
do_configure () {
sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
chmod +x ${S}/configure
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ find ${S} -name "configure" | xargs touch
${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
--prefix=/usr \
--without-cvs --disable-sanity-checks \
@@ -26,28 +26,28 @@ do_compile () {
}
do_install () {
- oe_runmake cross-compiling=yes install_root=${D} \
- includedir='${includedir}' prefix='${prefix}' \
- install-bootstrap-headers=yes install-headers
+ oe_runmake cross-compiling=yes install_root=${D} \
+ includedir='${includedir}' prefix='${prefix}' \
+ install-bootstrap-headers=yes install-headers
- oe_runmake csu/subdir_lib
- mkdir -p ${D}${libdir}/
- install -m 644 csu/crt[1in].o ${D}${libdir}
+ oe_runmake csu/subdir_lib
+ mkdir -p ${D}${libdir}/
+ install -m 644 csu/crt[1in].o ${D}${libdir}
- # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
- # so do them by hand. We can tolerate an empty stubs.h for the moment.
- # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
- mkdir -p ${D}${includedir}/gnu/
- touch ${D}${includedir}/gnu/stubs.h
- cp ${S}/include/features.h ${D}${includedir}/features.h
+ # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
+ # so do them by hand. We can tolerate an empty stubs.h for the moment.
+ # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
+ mkdir -p ${D}${includedir}/gnu/
+ touch ${D}${includedir}/gnu/stubs.h
+ cp ${S}/include/features.h ${D}${includedir}/features.h
- if [ -e ${B}/bits/stdio_lim.h ]; then
- cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/
- fi
- # add links to linux-libc-headers: final eglibc build need this.
- for t in linux asm asm-generic; do
- ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
- done
+ if [ -e ${B}/bits/stdio_lim.h ]; then
+ cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/
+ fi
+ # add links to linux-libc-headers: final glibc build need this.
+ for t in linux asm asm-generic; do
+ ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
+ done
}
do_install_locale() {
@@ -58,8 +58,8 @@ do_siteconfig () {
:
}
-SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst"
-eglibcinitial_sstate_postinst() {
+SSTATEPOSTINSTFUNCS += "glibcinitial_sstate_postinst"
+glibcinitial_sstate_postinst() {
if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
then
# Recreate the symlinks to ensure they point to the correct location
diff --git a/meta/recipes-core/glibc/glibc-initial_2.20.bb b/meta/recipes-core/glibc/glibc-initial_2.20.bb
new file mode 100644
index 0000000000..8ab01dc79d
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-initial_2.20.bb
@@ -0,0 +1,11 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+
+DEPENDS += "kconfig-frontends-native"
+
+# main glibc recipes muck with TARGET_CPPFLAGS to point into
+# final target sysroot but we
+# are not there when building glibc-initial
+# so reset it here
+
+TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/eglibc/eglibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
index 6261ae3419..962d666885 100644
--- a/meta/recipes-core/eglibc/eglibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -5,7 +5,7 @@ def ld_append_if_tune_exists(d, infos, dict):
infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
-def eglibc_dl_info(d):
+def glibc_dl_info(d):
ld_info_all = {
"mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
@@ -52,5 +52,5 @@ def eglibc_dl_info(d):
infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
return infos
-EGLIBC_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}"
-RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"
+EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
+RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}"
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index 4da5abd778..df6d073436 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -1,12 +1,12 @@
-include eglibc-collateral.inc
+include glibc-collateral.inc
-SUMMARY = "Locale data from eglibc"
+SUMMARY = "Locale data from glibc"
-BPN = "eglibc"
-LOCALEBASEPN = "${MLPREFIX}eglibc"
+BPN = "glibc"
+LOCALEBASEPN = "${MLPREFIX}glibc"
-# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
-# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
+# glibc-collateral.inc inhibits all default deps, but do_package needs objcopy
+# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'glibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'glibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
# ERROR: Function failed: split_and_strip_files
BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
@@ -19,11 +19,11 @@ do_package[depends] += "${BINUTILSDEP}"
# default to disabled
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
-ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-eglibc-locale = "0"
+ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0"
#enable locale generation on these arches
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64"
+BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64"
# set "1" to use cross-localedef for locale generation
# set "0" for qemu emulation of native localedef for locale generation
@@ -34,40 +34,40 @@ PROVIDES = "virtual/libc-locale"
PACKAGES = "localedef ${PN}-dbg"
PACKAGES_DYNAMIC = "^locale-base-.* \
- ^eglibc-gconv-.* ^eglibc-charmap-.* ^eglibc-localedata-.* ^eglibc-binary-localedata-.* \
+ ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
- ^${MLPREFIX}eglibc-gconv$"
+ ^${MLPREFIX}glibc-gconv$"
-# Create a eglibc-binaries package
+# Create a glibc-binaries package
ALLOW_EMPTY_${BPN}-binaries = "1"
PACKAGES += "${BPN}-binaries"
-RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-binary") != -1])}"
+RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-binary") != -1])}"
-# Create a eglibc-charmaps package
+# Create a glibc-charmaps package
ALLOW_EMPTY_${BPN}-charmaps = "1"
PACKAGES += "${BPN}-charmaps"
-RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-charmap") != -1])}"
+RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-charmap") != -1])}"
-# Create a eglibc-gconvs package
+# Create a glibc-gconvs package
ALLOW_EMPTY_${BPN}-gconvs = "1"
PACKAGES += "${BPN}-gconvs"
-RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-gconv") != -1])}"
+RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-gconv") != -1])}"
-# Create a eglibc-localedatas package
+# Create a glibc-localedatas package
ALLOW_EMPTY_${BPN}-localedatas = "1"
PACKAGES += "${BPN}-localedatas"
-RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-localedata") != -1])}"
+RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-localedata") != -1])}"
-DESCRIPTION_localedef = "eglibc: compile locale definition files"
+DESCRIPTION_localedef = "glibc: compile locale definition files"
-# eglibc-gconv is dynamically added into PACKAGES, thus
-# FILES_eglibc-gconv will not be automatically extended in multilib.
-# Explicitly add ${MLPREFIX} for FILES_eglibc-gconv.
-FILES_${MLPREFIX}eglibc-gconv = "${libdir}/gconv/*"
+# glibc-gconv is dynamically added into PACKAGES, thus
+# FILES_glibc-gconv will not be automatically extended in multilib.
+# Explicitly add ${MLPREFIX} for FILES_glibc-gconv.
+FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
FILES_localedef = "${bindir}/localedef"
-LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
+LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}"
do_install () {
mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
diff --git a/meta/recipes-core/glibc/glibc-locale_2.20.bb b/meta/recipes-core/glibc/glibc-locale_2.20.bb
new file mode 100644
index 0000000000..f7702e0358
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-locale_2.20.bb
@@ -0,0 +1 @@
+require glibc-locale.inc
diff --git a/meta/recipes-core/glibc/glibc-mtrace.inc b/meta/recipes-core/glibc/glibc-mtrace.inc
new file mode 100644
index 0000000000..e12b079e06
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-mtrace.inc
@@ -0,0 +1,13 @@
+include glibc-collateral.inc
+
+SUMMARY = "mtrace utility provided by glibc"
+DESCRIPTION = "mtrace utility provided by glibc"
+RDEPENDS_${PN} = "perl"
+RPROVIDES_${PN} = "libc-mtrace"
+
+SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ install -m 0755 ${SRC}/mtrace ${D}${bindir}/
+}
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb b/meta/recipes-core/glibc/glibc-mtrace_2.20.bb
new file mode 100644
index 0000000000..0b69bad46a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-mtrace_2.20.bb
@@ -0,0 +1 @@
+require glibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/glibc/glibc-options.inc
index 259e752858..9fd27f32f9 100644
--- a/meta/recipes-core/eglibc/eglibc-options.inc
+++ b/meta/recipes-core/glibc/glibc-options.inc
@@ -1,4 +1,4 @@
-def eglibc_cfg(feature, tokens, cnf):
+def glibc_cfg(feature, tokens, cnf):
if type(tokens) == type(""):
tokens = [tokens]
if feature:
@@ -10,8 +10,8 @@ def eglibc_cfg(feature, tokens, cnf):
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG=\"${S}/nss/nsswitch.conf\""])
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS=\"${S}/nss/fixed-nsswitch.functions\""])
-# Map distro features to eglibc options settings
-def features_to_eglibc_settings(d):
+# Map distro features to glibc options settings
+def features_to_glibc_settings(d):
cnf = ([])
ipv4 = bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d)
@@ -52,7 +52,7 @@ def features_to_eglibc_settings(d):
libc_posix_regexp_glibc = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-regexp-glibc', True, False, d)
libc_posix_wchar_io = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-wchar-io', True, False, d)
- # arrange the dependencies among eglibc configuable options according to file option-groups.def from eglibc source code
+ # arrange the dependencies among glibc configuable options according to file option-groups.def from glibc source code
new_dep = True
while new_dep:
new_dep = False
@@ -121,42 +121,42 @@ def features_to_eglibc_settings(d):
new_dep = True
libc_posix_clang_wchar = True
- eglibc_cfg(ipv6, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
- eglibc_cfg(libc_backtrace, 'OPTION_EGLIBC_BACKTRACE', cnf)
- eglibc_cfg(libc_big_macros, 'OPTION_EGLIBC_BIG_MACROS', cnf)
- eglibc_cfg(libc_bsd, 'OPTION_EGLIBC_BSD', cnf)
- eglibc_cfg(libc_cxx_tests, 'OPTION_EGLIBC_CXX_TESTS', cnf)
- eglibc_cfg(libc_catgets, 'OPTION_EGLIBC_CATGETS', cnf)
- eglibc_cfg(libc_charsets, 'OPTION_EGLIBC_CHARSETS', cnf)
- eglibc_cfg(libc_crypt, 'OPTION_EGLIBC_CRYPT', cnf)
- eglibc_cfg(libc_crypt_ufc, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
- eglibc_cfg(libc_db_aliases, 'OPTION_EGLIBC_DB_ALIASES', cnf)
- eglibc_cfg(libc_envz, 'OPTION_EGLIBC_ENVZ', cnf)
- eglibc_cfg(libc_fcvt, 'OPTION_EGLIBC_FCVT', cnf)
- eglibc_cfg(libc_fmtmsg, 'OPTION_EGLIBC_FMTMSG', cnf)
- eglibc_cfg(libc_fstab, 'OPTION_EGLIBC_FSTAB', cnf)
- eglibc_cfg(libc_ftraverse, 'OPTION_EGLIBC_FTRAVERSE', cnf)
- eglibc_cfg(libc_getlogin, 'OPTION_EGLIBC_GETLOGIN', cnf)
- eglibc_cfg(libc_idn, 'OPTION_EGLIBC_IDN', cnf)
- eglibc_cfg(ipv4, 'OPTION_EGLIBC_INET', cnf)
- eglibc_cfg(libc_inet_anl, 'OPTION_EGLIBC_INET_ANL', cnf)
- eglibc_cfg(libc_libm, 'OPTION_EGLIBC_LIBM', cnf)
- eglibc_cfg(libc_locales, 'OPTION_EGLIBC_LOCALES', cnf)
- eglibc_cfg(libc_locale_code, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
- eglibc_cfg(libc_memusage, 'OPTION_EGLIBC_MEMUSAGE', cnf)
- eglibc_cfg(libc_nis, 'OPTION_EGLIBC_NIS', cnf)
- eglibc_cfg(libc_nsswitch, 'OPTION_EGLIBC_NSSWITCH', cnf)
- eglibc_cfg(libc_rcmd, 'OPTION_EGLIBC_RCMD', cnf)
- eglibc_cfg(libc_rtld_debug, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
- eglibc_cfg(libc_spawn, 'OPTION_EGLIBC_SPAWN', cnf)
- eglibc_cfg(libc_streams, 'OPTION_EGLIBC_STREAMS', cnf)
- eglibc_cfg(libc_sunrpc, 'OPTION_EGLIBC_SUNRPC', cnf)
- eglibc_cfg(libc_utmp, 'OPTION_EGLIBC_UTMP', cnf)
- eglibc_cfg(libc_utmpx, 'OPTION_EGLIBC_UTMPX', cnf)
- eglibc_cfg(libc_wordexp, 'OPTION_EGLIBC_WORDEXP', cnf)
- eglibc_cfg(libc_posix_clang_wchar, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
- eglibc_cfg(libc_posix_regexp, 'OPTION_POSIX_REGEXP', cnf)
- eglibc_cfg(libc_posix_regexp_glibc, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
- eglibc_cfg(libc_posix_wchar_io, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+ glibc_cfg(ipv6, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+ glibc_cfg(libc_backtrace, 'OPTION_EGLIBC_BACKTRACE', cnf)
+ glibc_cfg(libc_big_macros, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+ glibc_cfg(libc_bsd, 'OPTION_EGLIBC_BSD', cnf)
+ glibc_cfg(libc_cxx_tests, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+ glibc_cfg(libc_catgets, 'OPTION_EGLIBC_CATGETS', cnf)
+ glibc_cfg(libc_charsets, 'OPTION_EGLIBC_CHARSETS', cnf)
+ glibc_cfg(libc_crypt, 'OPTION_EGLIBC_CRYPT', cnf)
+ glibc_cfg(libc_crypt_ufc, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+ glibc_cfg(libc_db_aliases, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+ glibc_cfg(libc_envz, 'OPTION_EGLIBC_ENVZ', cnf)
+ glibc_cfg(libc_fcvt, 'OPTION_EGLIBC_FCVT', cnf)
+ glibc_cfg(libc_fmtmsg, 'OPTION_EGLIBC_FMTMSG', cnf)
+ glibc_cfg(libc_fstab, 'OPTION_EGLIBC_FSTAB', cnf)
+ glibc_cfg(libc_ftraverse, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+ glibc_cfg(libc_getlogin, 'OPTION_EGLIBC_GETLOGIN', cnf)
+ glibc_cfg(libc_idn, 'OPTION_EGLIBC_IDN', cnf)
+ glibc_cfg(ipv4, 'OPTION_EGLIBC_INET', cnf)
+ glibc_cfg(libc_inet_anl, 'OPTION_EGLIBC_INET_ANL', cnf)
+ glibc_cfg(libc_libm, 'OPTION_EGLIBC_LIBM', cnf)
+ glibc_cfg(libc_locales, 'OPTION_EGLIBC_LOCALES', cnf)
+ glibc_cfg(libc_locale_code, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+ glibc_cfg(libc_memusage, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+ glibc_cfg(libc_nis, 'OPTION_EGLIBC_NIS', cnf)
+ glibc_cfg(libc_nsswitch, 'OPTION_EGLIBC_NSSWITCH', cnf)
+ glibc_cfg(libc_rcmd, 'OPTION_EGLIBC_RCMD', cnf)
+ glibc_cfg(libc_rtld_debug, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+ glibc_cfg(libc_spawn, 'OPTION_EGLIBC_SPAWN', cnf)
+ glibc_cfg(libc_streams, 'OPTION_EGLIBC_STREAMS', cnf)
+ glibc_cfg(libc_sunrpc, 'OPTION_EGLIBC_SUNRPC', cnf)
+ glibc_cfg(libc_utmp, 'OPTION_EGLIBC_UTMP', cnf)
+ glibc_cfg(libc_utmpx, 'OPTION_EGLIBC_UTMPX', cnf)
+ glibc_cfg(libc_wordexp, 'OPTION_EGLIBC_WORDEXP', cnf)
+ glibc_cfg(libc_posix_clang_wchar, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+ glibc_cfg(libc_posix_regexp, 'OPTION_POSIX_REGEXP', cnf)
+ glibc_cfg(libc_posix_regexp_glibc, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+ glibc_cfg(libc_posix_wchar_io, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index d5d407f5e7..984362e3ce 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -1,6 +1,6 @@
#
# For now, we will skip building of a gcc package if it is a uclibc one
-# and our build is not a uclibc one, and we skip a eglibc one if our build
+# and our build is not a uclibc one, and we skip a glibc one if our build
# is a uclibc build.
#
# See the note in gcc/gcc_3.4.0.oe
@@ -17,28 +17,30 @@ python __anonymous () {
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ?= "1"
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
-
-# The ld.so in this eglibc supports the GNU_HASH
-RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
-RPROVIDES_${PN}-utils = "glibc-utils"
-RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace"
-RPROVIDES_${PN}-pic = "glibc-pic"
-RPROVIDES_${PN}-dev = "glibc-dev libc6-dev virtual-libc-dev"
-RPROVIDES_${PN}-staticdev = "glibc-staticdev"
-RPROVIDES_${PN}-doc = "glibc-doc"
-RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
-RPROVIDES_eglibc-thread-db = "glibc-thread-db"
-RPROVIDES_${PN}-pcprofile = "glibc-pcprofile"
-RPROVIDES_${PN}-dbg = "glibc-dbg"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
+
+# The ld.so in this glibc supports the GNU_HASH
+RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)"
+RPROVIDES_${PN}-utils = "eglibc-utils"
+RPROVIDES_${PN}-mtrace = "eglibc-mtrace libc-mtrace"
+RPROVIDES_${PN}-pic = "eglibc-pic"
+RPROVIDES_${PN}-dev = "eglibc-dev libc6-dev virtual-libc-dev"
+RPROVIDES_${PN}-staticdev = "eglibc-staticdev"
+RPROVIDES_${PN}-doc = "eglibc-doc"
+RPROVIDES_glibc-extra-nss = "eglibc-extra-nss"
+RPROVIDES_glibc-thread-db = "eglibc-thread-db"
+RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile"
+RPROVIDES_${PN}-dbg = "eglibc-dbg"
libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
+libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
+INSANE_SKIP_glibc_append_aarch64 = " libdir"
FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
FILES_ldd = "${bindir}/ldd"
FILES_libsegfault = "${base_libdir}/libSegFault*"
FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
FILES_libmemusage = "${base_libdir}/libmemusage.so"
-FILES_eglibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
+FILES_glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
FILES_sln = "${base_sbindir}/sln"
FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o"
FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
@@ -47,12 +49,13 @@ FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_no
FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
FILES_nscd = "${sbindir}/nscd*"
FILES_${PN}-mtrace = "${bindir}/mtrace"
+FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
-FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
+FILES_glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
RPROVIDES_${PN}-dev += "libc-dev"
RPROVIDES_${PN}-staticdev += "libc-staticdev"
@@ -60,13 +63,14 @@ SUMMARY_sln = "The static ln"
DESCRIPTION_sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional."
SUMMARY_nscd = "Name service cache daemon"
DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services."
-SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
-DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
+SUMMARY_glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
+DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services."
SUMMARY_ldd = "print shared library dependencies"
DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line."
-SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc"
-DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
+SUMMARY_${PN}-utils = "Miscellaneous utilities provided by glibc"
+DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, rpcgen, ..."
DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
+DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
inherit libc-common multilib_header
@@ -74,9 +78,9 @@ do_install_append () {
rm -f ${D}${sysconfdir}/localtime
rm -rf ${D}${localstatedir}
- # remove empty eglibc dir
- if [ -d ${D}${libdir}/eglibc -a ! -e ${D}${libdir}/eglibc/pt_chown ]; then
- rmdir ${D}${libdir}/eglibc
+ # remove empty glibc dir
+ if [ -d ${D}${libdir}/glibc -a ! -e ${D}${libdir}/glibc/pt_chown ]; then
+ rmdir ${D}${libdir}/glibc
fi
oe_multilib_header bits/syscall.h
@@ -90,18 +94,33 @@ do_install_append () {
fi
if [ "${USE_LDCONFIG}" != "1" ]; then
- # We won't ship this file (see FILES above) so let's not install it
+ # We won't ship these files (see FILES above) so let's not install them
rm -f ${D}${sysconfdir}/ld.so.conf
+ rm -f ${D}${base_sbindir}/ldconfig
# This directory will be empty now so remove it too.
- # But check whether it exists first, since it won't for eglibc-initial.
+ # But check whether it exists first, since it won't for glibc-initial.
if [ -d ${D}${sysconfdir} ]; then
rmdir ${D}${sysconfdir}
fi
fi
}
+do_install_append_aarch64 () {
+ if [ "${base_libdir}" != "/lib" ] ; then
+ # The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
+ install -d ${D}/lib
+ if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
+ ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64.so.1 \
+ ${D}/lib/ld-linux-aarch64.so.1
+ elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
+ ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+ ${D}/lib/ld-linux-aarch64_be.so.1
+ fi
+ fi
+}
+
do_install_locale () {
- dest=${D}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
+ dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
if [ "${base_libdir}" != "${libdir}" ]; then
cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
@@ -128,7 +147,7 @@ addtask do_install_locale after do_install before do_populate_sysroot do_package
bashscripts = "mtrace sotruss xtrace"
do_evacuate_scripts () {
- target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
mkdir -p $target
for i in ${bashscripts}; do
if [ -f ${D}${bindir}/$i ]; then
@@ -139,11 +158,11 @@ do_evacuate_scripts () {
addtask evacuate_scripts after do_install before do_populate_sysroot do_package
-PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
+PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
-eglibc_package_preprocess () {
- rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
- rm -rf ${PKGD}/${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+glibc_package_preprocess () {
+ rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
+ rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
for i in ${bashscripts}; do
rm -f ${PKGD}${bindir}/$i
done
diff --git a/meta/recipes-core/glibc/glibc-scripts.inc b/meta/recipes-core/glibc/glibc-scripts.inc
new file mode 100644
index 0000000000..3a06773d66
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-scripts.inc
@@ -0,0 +1,16 @@
+include glibc-collateral.inc
+
+SUMMARY = "utility scripts provided by glibc"
+DESCRIPTION = "utility scripts provided by glibc"
+RDEPENDS_${PN} = "bash glibc-mtrace"
+
+SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+
+bashscripts = "sotruss xtrace"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ for i in ${bashscripts}; do
+ install -m 0755 ${SRC}/$i ${D}${bindir}/
+ done
+}
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.20.bb b/meta/recipes-core/glibc/glibc-scripts_2.20.bb
new file mode 100644
index 0000000000..5a89bd8022
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-scripts_2.20.bb
@@ -0,0 +1 @@
+require glibc-scripts.inc
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc
index ab3ec1555f..ec16fe1fde 100644
--- a/meta/recipes-core/eglibc/eglibc-testing.inc
+++ b/meta/recipes-core/glibc/glibc-testing.inc
@@ -1,46 +1,46 @@
do_compile_append () {
# now generate script to drive testing
- echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testeglibc
- set >> ${B}/${HOST_PREFIX}testeglibc
+ echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testglibc
+ set >> ${B}/${HOST_PREFIX}testglibc
# prune out the unneeded vars
- sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
+ sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testglibc
+ sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testglibc
# point to real sysroot not the toolchain bootstrap sysroot
- sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc
+ sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testglibc
# use the final cross-gcc to test since some tests need libstdc++
- sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc
+ sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testglibc
# append execution part script
-cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
+cat >> ${B}/${HOST_PREFIX}testglibc << STOP
target="\$1"
if [ "x\$target" = "x" ]
then
@@ -59,7 +59,7 @@ then
echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
echo " to test as root user on target (usually its recommended to create a non"
echo " root user."
- echo " As a sanity check make sure that target can read/write to the eglibc build tree"
+ echo " As a sanity check make sure that target can read/write to the glibc build tree"
echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
exit 1
fi
@@ -75,5 +75,5 @@ make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
rm -rf ${B}/configparms
STOP
- chmod +x ${B}/${HOST_PREFIX}testeglibc
+ chmod +x ${B}/${HOST_PREFIX}testglibc
}
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/glibc/glibc.inc
index 68128e9755..8aa78dfb34 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -1,6 +1,6 @@
-require eglibc-common.inc
-require eglibc-ld.inc
-require eglibc-testing.inc
+require glibc-common.inc
+require glibc-ld.inc
+require glibc-testing.inc
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
@@ -8,12 +8,12 @@ PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
-# eglibc can't be built without optimization, if someone tries to compile an
+# glibc can't be built without optimization, if someone tries to compile an
# entire image as -O0, we override it with -O2 here and give a note about it.
def get_optimization(d):
selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
- bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
+ bb.note("glibc can't be built with -O0, -O2 will be used instead.")
return selected_optimization.replace("-O0", "-O2")
return selected_optimization
@@ -38,8 +38,13 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES += "virtual/libintl virtual/libiconv"
-inherit autotools texinfo
-require eglibc-options.inc
+inherit autotools texinfo distro_features_check
+require glibc-options.inc
+
+# The main purpose of setting this variable is to prevent users from accidently
+# overriding DISTRO_FEATRUES, causing obscure build failures because of lack
+# of libc functions.
+REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}"
LEAD_SONAME = "libc.so"
@@ -58,19 +63,19 @@ INHIBIT_DEFAULT_DEPS = "1"
ARM_INSTRUCTION_SET = "arm"
-# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
+# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
PARALLEL_MAKE = ""
-# eglibc make-syscalls.sh has a number of issues with /bin/dash and
+# glibc make-syscalls.sh has a number of issues with /bin/dash and
# it's output which make calls via the SHELL also has issues, so
# ensure make uses /bin/bash
EXTRA_OEMAKE += "SHELL=/bin/bash"
-OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+OE_FEATURES = "${@features_to_glibc_settings(d)}"
do_configure_prepend() {
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
echo '${OE_FEATURES}' > ${B}/option-groups.config
@@ -84,4 +89,4 @@ do_configure_append() {
sed -i 's/^OPTION_EGLIBC_NSSWITCH_FIXED_\(.*\)="\(.*\)"$/OPTION_EGLIBC_NSSWITCH_FIXED_\1=\2/' option-groups.config
}
-GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_ADDONS ?= "nptl,libidn"
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch
index b4489e9ae9..3922cb818f 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch
+++ b/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch
@@ -41,9 +41,11 @@ Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ndex 8d905e8..dcfa71e 100644
---- libc.orig/ports/sysdeps/arm/dl-machine.h
-+++ libc/ports/sysdeps/arm/dl-machine.h
-@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+Index: git/sysdeps/arm/dl-machine.h
+===================================================================
+--- git.orig/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.748070587 +0000
++++ git/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.740070587 +0000
+@@ -495,7 +495,7 @@
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@@ -52,5 +54,3 @@ ndex 8d905e8..dcfa71e 100644
break;
case R_ARM_TLS_TPOFF32:
---
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index a8463ea915..f341282ffb 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -17,11 +17,11 @@ Signed-off-by: Ting Liu <b28495@freescale.com>
manual/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/manual/Makefile b/manual/Makefile
-index 6fddff0..7af242e 100644
---- a/manual/Makefile
-+++ b/manual/Makefile
-@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+Index: git/manual/Makefile
+===================================================================
+--- git.orig/manual/Makefile 2014-08-29 10:35:18.728070587 -0700
++++ git/manual/Makefile 2014-08-29 10:35:18.720070587 -0700
+@@ -105,7 +105,8 @@
$(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(dir)/libm-test-ulps))
pwd=`pwd`; \
@@ -31,6 +31,3 @@ index 6fddff0..7af242e 100644
$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
touch $@
---
-1.7.9.7
-
diff --git a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch
new file mode 100644
index 0000000000..8cfdbeaa60
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch
@@ -0,0 +1,339 @@
+From a5357b7ce2a2982c5778435704bcdb55ce3667a0 Mon Sep 17 00:00:00 2001
+From: Jeff Law <law@redhat.com>
+Date: Mon, 15 Dec 2014 10:09:32 +0100
+Subject: [PATCH] CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]
+
+A larger number of format specifiers coudld cause a stack overflow,
+potentially allowing to bypass _FORTIFY_SOURCE format string
+protection.
+---
+ ChangeLog | 9 +++++++
+ NEWS | 13 +++++----
+ stdio-common/Makefile | 2 +-
+ stdio-common/bug23-2.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
+ stdio-common/bug23-3.c | 50 +++++++++++++++++++++++++++++++++++
+ stdio-common/bug23-4.c | 31 ++++++++++++++++++++++
+ stdio-common/vfprintf.c | 40 ++++++++++++++++++++++++++--
+ 7 files changed, 207 insertions(+), 8 deletions(-)
+ create mode 100644 stdio-common/bug23-2.c
+ create mode 100644 stdio-common/bug23-3.c
+ create mode 100644 stdio-common/bug23-4.c
+
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,12 @@
++2014-12-15 Jeff Law <law@redhat.com>
++
++ [BZ #16617]
++ * stdio-common/vfprintf.c (vfprintf): Allocate large specs array
++ on the heap. (CVE-2012-3406)
++ * stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file.
++ * stdio-common/bug23-4.c: New file. Test case by Joseph Myers.
++ * stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4.
++
+ 2014-11-19 Carlos O'Donell <carlos@redhat.com>
+ Florian Weimer <fweimer@redhat.com>
+ Joseph Myers <joseph@codesourcery.com>
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -13,24 +13,28 @@ Version 2.20
+ 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16194, 16198, 16275,
+ 16284, 16287, 16315, 16348, 16349, 16354, 16357, 16362, 16447, 16516,
+ 16532, 16539, 16545, 16561, 16562, 16564, 16574, 16599, 16600, 16609,
+- 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, 16642,
+- 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, 16695,
+- 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, 16740,
+- 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16796,
+- 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, 16854,
+- 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, 16915,
+- 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, 16965,
+- 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
+- 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
+- 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
+- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
+-
++ 16610, 16611, 16613, 16617, 16619, 16623, 16629, 16632, 16634, 16639,
++ 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689,
++ 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739,
++ 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791,
++ 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849,
++ 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912,
++ 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958,
++ 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022,
++ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
++ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
++ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
++ 17625.
++
+ * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
+ under certain input conditions resulting in the execution of a shell for
+ command substitution when the applicaiton did not request it. The
+ implementation now checks WRDE_NOCMD immediately before executing the
+ shell and returns the error WRDE_CMDSUB as expected.
+
++* CVE-2012-3406 printf-style functions could run into a stack overflow when
++ processing format strings with a large number of format specifiers.
++
+ * Reverted change of ABI data structures for s390 and s390x:
+ On s390 and s390x the size of struct ucontext and jmp_buf was increased in
+ 2.19. This change is reverted in 2.20. The introduced 2.19 symbol versions
+Index: git/stdio-common/bug23-2.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-2.c
+@@ -0,0 +1,70 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++static const char expected[] = "\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
++
++static int
++do_test (void)
++{
++ char *buf = malloc (strlen (expected) + 1);
++ snprintf (buf, strlen (expected) + 1,
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
++ "a", "b", "c", "d", 5);
++ return strcmp (buf, expected) != 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+Index: git/stdio-common/bug23-3.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-3.c
+@@ -0,0 +1,50 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++int
++do_test (void)
++{
++ size_t instances = 16384;
++#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ const char *item = "\na\nabbcd55";
++#define X3 X0 X0 X0 X0 X0 X0 X0 X0
++#define X6 X3 X3 X3 X3 X3 X3 X3 X3
++#define X9 X6 X6 X6 X6 X6 X6 X6 X6
++#define X12 X9 X9 X9 X9 X9 X9 X9 X9
++#define X14 X12 X12 X12 X12
++#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%"
++#define TRAILER2 TRAILER TRAILER
++ size_t length = instances * strlen (item) + strlen (TRAILER) + 1;
++
++ char *buf = malloc (length + 1);
++ snprintf (buf, length + 1,
++ X14 TRAILER2 "\n",
++ "a", "b", "c", "d", 5);
++
++ const char *p = buf;
++ size_t i;
++ for (i = 0; i < instances; ++i)
++ {
++ const char *expected;
++ for (expected = item; *expected; ++expected)
++ {
++ if (*p != *expected)
++ {
++ printf ("mismatch at offset %zu (%zu): expected %d, got %d\n",
++ (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF);
++ return 1;
++ }
++ ++p;
++ }
++ }
++ if (strcmp (p, TRAILER "\n") != 0)
++ {
++ printf ("mismatch at trailer: [%s]\n", p);
++ return 1;
++ }
++ free (buf);
++ return 0;
++}
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+Index: git/stdio-common/bug23-4.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-4.c
+@@ -0,0 +1,31 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/resource.h>
++
++#define LIMIT 1000000
++
++int
++main (void)
++{
++ struct rlimit lim;
++ getrlimit (RLIMIT_STACK, &lim);
++ lim.rlim_cur = 1048576;
++ setrlimit (RLIMIT_STACK, &lim);
++ char *fmtstr = malloc (4 * LIMIT + 1);
++ if (fmtstr == NULL)
++ abort ();
++ char *output = malloc (LIMIT + 1);
++ if (output == NULL)
++ abort ();
++ for (size_t i = 0; i < LIMIT; i++)
++ memcpy (fmtstr + 4 * i, "%1$d", 4);
++ fmtstr[4 * LIMIT] = '\0';
++ int ret = snprintf (output, LIMIT + 1, fmtstr, 0);
++ if (ret != LIMIT)
++ abort ();
++ for (size_t i = 0; i < LIMIT; i++)
++ if (output[i] != '0')
++ abort ();
++ return 0;
++}
+Index: git/stdio-common/vfprintf.c
+===================================================================
+--- git.orig/stdio-common/vfprintf.c
++++ git/stdio-common/vfprintf.c
+@@ -276,6 +276,12 @@ vfprintf (FILE *s, const CHAR_T *format,
+ /* For the argument descriptions, which may be allocated on the heap. */
+ void *args_malloced = NULL;
+
++ /* For positional argument handling. */
++ struct printf_spec *specs;
++
++ /* Track if we malloced the SPECS array and thus must free it. */
++ bool specs_malloced = false;
++
+ /* This table maps a character into a number representing a
+ class. In each step there is a destination label for each
+ class. */
+@@ -1699,8 +1705,8 @@ do_positional:
+ size_t nspecs = 0;
+ /* A more or less arbitrary start value. */
+ size_t nspecs_size = 32 * sizeof (struct printf_spec);
+- struct printf_spec *specs = alloca (nspecs_size);
+
++ specs = alloca (nspecs_size);
+ /* The number of arguments the format string requests. This will
+ determine the size of the array needed to store the argument
+ attributes. */
+@@ -1743,11 +1749,39 @@ do_positional:
+ if (nspecs * sizeof (*specs) >= nspecs_size)
+ {
+ /* Extend the array of format specifiers. */
++ if (nspecs_size * 2 < nspecs_size)
++ {
++ __set_errno (ENOMEM);
++ done = -1;
++ goto all_done;
++ }
+ struct printf_spec *old = specs;
+- specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++ if (__libc_use_alloca (2 * nspecs_size))
++ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++ else
++ {
++ nspecs_size *= 2;
++ specs = malloc (nspecs_size);
++ if (specs == NULL)
++ {
++ __set_errno (ENOMEM);
++ specs = old;
++ done = -1;
++ goto all_done;
++ }
++ }
+
+ /* Copy the old array's elements to the new space. */
+ memmove (specs, old, nspecs * sizeof (*specs));
++
++ /* If we had previously malloc'd space for SPECS, then
++ release it after the copy is complete. */
++ if (specs_malloced)
++ free (old);
++
++ /* Now set SPECS_MALLOCED if needed. */
++ if (!__libc_use_alloca (nspecs_size))
++ specs_malloced = true;
+ }
+
+ /* Parse the format specifier. */
+@@ -2068,6 +2102,8 @@ do_positional:
+ }
+
+ all_done:
++ if (specs_malloced)
++ free (specs);
+ if (__glibc_unlikely (args_malloced != NULL))
+ free (args_malloced);
+ if (__glibc_unlikely (workstart != NULL))
+Index: git/stdio-common/Makefile
+===================================================================
+--- git.orig/stdio-common/Makefile
++++ git/stdio-common/Makefile
+@@ -66,7 +66,7 @@ tests := tstscanf test_rdwr test-popen t
+ tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
+ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
+ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \
+- tst-printf-round bug26
++ tst-printf-round bug23-2 bug23-3 bug23-4
+
+ tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch
new file mode 100644
index 0000000000..d95d182dc4
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch
@@ -0,0 +1,215 @@
+From a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c Mon Sep 17 00:00:00 2001
+From: Carlos O'Donell <carlos@redhat.com>
+Date: Wed, 19 Nov 2014 11:44:12 -0500
+Subject: [PATCH] CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.
+
+The function wordexp() fails to properly handle the WRDE_NOCMD
+flag when processing arithmetic inputs in the form of "$((... ``))"
+where "..." can be anything valid. The backticks in the arithmetic
+epxression are evaluated by in a shell even if WRDE_NOCMD forbade
+command substitution. This allows an attacker to attempt to pass
+dangerous commands via constructs of the above form, and bypass
+the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
+in exec_comm(), the only place that can execute a shell. All other
+checks for WRDE_NOCMD are superfluous and removed.
+
+We expand the testsuite and add 3 new regression tests of roughly
+the same form but with a couple of nested levels.
+
+On top of the 3 new tests we add fork validation to the WRDE_NOCMD
+testing. If any forks are detected during the execution of a wordexp()
+call with WRDE_NOCMD, the test is marked as failed. This is slightly
+heuristic since vfork might be used in the future, but it provides a
+higher level of assurance that no shells were executed as part of
+command substitution with WRDE_NOCMD in effect. In addition it doesn't
+require libpthread or libdl, instead we use the public implementation
+namespace function __register_atfork (already part of the public ABI
+for libpthread).
+
+Tested on x86_64 with no regressions.
+---
+ ChangeLog | 22 ++++++++++++++++++++++
+ NEWS | 8 +++++++-
+ posix/wordexp-test.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ posix/wordexp.c | 16 ++++------------
+ 4 files changed, 77 insertions(+), 13 deletions(-)
+
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,24 @@
++2014-11-19 Carlos O'Donell <carlos@redhat.com>
++ Florian Weimer <fweimer@redhat.com>
++ Joseph Myers <joseph@codesourcery.com>
++ Adam Conrad <adconrad@0c3.net>
++ Andreas Schwab <schwab@suse.de>
++ Brooks <bmoses@google.com>
++
++ [BZ #17625]
++ * wordexp-test.c (__dso_handle): Add prototype.
++ (__register_atfork): Likewise.
++ (__app_register_atfork): New function.
++ (registered_forks): New global.
++ (register_fork): New function.
++ (test_case): Add 3 new tests for WRDE_CMDSUB.
++ (main): Call __app_register_atfork.
++ (testit): If WRDE_NOCMD set registered_forks to zero, run test, and if
++ fork count is non-zero fail the test.
++ * posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag
++ is set.
++ (parse_dollars): Remove check for WRDE_NOCMD.
++
+ 2014-09-07 Allan McRae <allan@archlinux.org
+
+ * version.h (RELEASE): Set to "stable".
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -23,7 +23,13 @@ Version 2.20
+ 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
+ 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
+ 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
+- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354.
++ 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
++
++* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
++ under certain input conditions resulting in the execution of a shell for
++ command substitution when the applicaiton did not request it. The
++ implementation now checks WRDE_NOCMD immediately before executing the
++ shell and returns the error WRDE_CMDSUB as expected.
+
+ * Reverted change of ABI data structures for s390 and s390x:
+ On s390 and s390x the size of struct ucontext and jmp_buf was increased in
+Index: git/posix/wordexp-test.c
+===================================================================
+--- git.orig/posix/wordexp-test.c
++++ git/posix/wordexp-test.c
+@@ -27,6 +27,25 @@
+
+ #define IFS " \n\t"
+
++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
++
++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
++{
++ return __register_atfork (prepare, parent, child,
++ &__dso_handle == NULL ? NULL : __dso_handle);
++}
++
++/* Number of forks seen. */
++static int registered_forks;
++
++/* For each fork increment the fork count. */
++static void
++register_fork (void)
++{
++ registered_forks++;
++}
++
+ struct test_case_struct
+ {
+ int retval;
+@@ -206,6 +225,12 @@ struct test_case_struct
+ { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
+ { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
+ { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
++ /* Test for CVE-2014-7817. We test 3 combinations of command
++ substitution inside an arithmetic expression to make sure that
++ no commands are executed and error is returned. */
++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
+
+ { -1, NULL, NULL, 0, 0, { NULL, }, IFS },
+ };
+@@ -258,6 +283,15 @@ main (int argc, char *argv[])
+ return -1;
+ }
+
++ /* If we are not allowed to do command substitution, we install
++ fork handlers to verify that no forks happened. No forks should
++ happen at all if command substitution is disabled. */
++ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
++ {
++ printf ("Failed to register fork handler.\n");
++ return -1;
++ }
++
+ for (test = 0; test_case[test].retval != -1; test++)
+ if (testit (&test_case[test]))
+ ++fail;
+@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
+
+ printf ("Test %d (%s): ", ++tests, tc->words);
+
++ if (tc->flags & WRDE_NOCMD)
++ registered_forks = 0;
++
+ if (tc->flags & WRDE_APPEND)
+ {
+ /* initial wordexp() call, to be appended to */
+@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
+ }
+ retval = wordexp (tc->words, &we, tc->flags);
+
++ if ((tc->flags & WRDE_NOCMD)
++ && (registered_forks > 0))
++ {
++ printf ("FAILED fork called for WRDE_NOCMD\n");
++ return 1;
++ }
++
+ if (tc->flags & WRDE_DOOFFS)
+ start_offs = sav_we.we_offs;
+
+Index: git/posix/wordexp.c
+===================================================================
+--- git.orig/posix/wordexp.c
++++ git/posix/wordexp.c
+@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size
+ pid_t pid;
+ int noexec = 0;
+
++ /* Do nothing if command substitution should not succeed. */
++ if (flags & WRDE_NOCMD)
++ return WRDE_CMDSUB;
++
+ /* Don't fork() unless necessary */
+ if (!comm || !*comm)
+ return 0;
+@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word
+ }
+ }
+
+- if (flags & WRDE_NOCMD)
+- return WRDE_CMDSUB;
+-
+ (*offset) += 2;
+ return parse_comm (word, word_length, max_length, words, offset, flags,
+ quoted? NULL : pwordexp, ifs, ifs_white);
+@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_
+ break;
+
+ case '`':
+- if (flags & WRDE_NOCMD)
+- return WRDE_CMDSUB;
+-
+ ++(*offset);
+ error = parse_backtick (word, word_length, max_length, words,
+ offset, flags, NULL, NULL, NULL);
+@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *p
+ break;
+
+ case '`':
+- if (flags & WRDE_NOCMD)
+- {
+- error = WRDE_CMDSUB;
+- goto do_error;
+- }
+-
+ ++words_offset;
+ error = parse_backtick (&word, &word_length, &max_length, words,
+ &words_offset, flags, pwordexp, ifs,
diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch
new file mode 100644
index 0000000000..ba1da67b76
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch
@@ -0,0 +1,65 @@
+CVE-2014-9402 endless loop in getaddr_r
+
+
+https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=11e3417af6e354f1942c68a271ae51e892b2814d
+
+Upstream-Status: Backport
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+From 11e3417af6e354f1942c68a271ae51e892b2814d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 15 Dec 2014 17:41:13 +0100
+Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630]
+
+---
+ ChangeLog | 6 ++++++
+ NEWS | 7 +++++--
+ resolv/nss_dns/dns-network.c | 4 ++--
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -24,7 +24,10 @@ Version 2.20
+ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
+ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
+ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
+- 17625.
++ 17625, 17630.
++
++* The nss_dns implementation of getnetbyname could run into an infinite loop
++ if the DNS response contained a PTR record of an unexpected format.
+
+ * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
+ under certain input conditions resulting in the execution of a shell for
+Index: git/resolv/nss_dns/dns-network.c
+===================================================================
+--- git.orig/resolv/nss_dns/dns-network.c
++++ git/resolv/nss_dns/dns-network.c
+@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int
+
+ case BYNAME:
+ {
+- char **ap = result->n_aliases++;
+- while (*ap != NULL)
++ char **ap;
++ for (ap = result->n_aliases; *ap != NULL; ++ap)
+ {
+ /* Check each alias name for being of the forms:
+ 4.3.2.1.in-addr.arpa = net 1.2.3.4
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,9 @@
++2014-12-16 Florian Weimer <fweimer@redhat.com>
++
++ [BZ #17630]
++ * resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias
++ names.
++
+ 2014-12-15 Jeff Law <law@redhat.com>
+
+ [BZ #16617]
diff --git a/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch b/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch
new file mode 100644
index 0000000000..e858bfaeda
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch
@@ -0,0 +1,529 @@
+Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
+so we should use GLRO_dl_debug_mask
+
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/elf/dl-open.c
+===================================================================
+--- git.orig/elf/dl-open.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/dl-open.c 2014-08-27 05:05:25.656070587 +0000
+@@ -147,7 +147,7 @@
+ ns->_ns_main_searchlist->r_list[new_nlist++] = map;
+
+ /* We modify the global scope. Report this. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
+ map->l_name, map->l_ns);
+ }
+@@ -243,7 +243,7 @@
+ if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
+ {
+ /* Let the user know about the opencount. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
+ new->l_name, new->l_ns, new->l_direct_opencount);
+
+@@ -294,7 +294,7 @@
+ LIBC_PROBE (map_complete, 3, args->nsid, r, new);
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_show_scope (new, 0);
+
+ /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
+@@ -511,7 +511,7 @@
+ }
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_show_scope (imap, from_scope);
+ }
+
+@@ -584,7 +584,7 @@
+ #endif
+
+ /* Let the user know about the opencount. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
+ new->l_name, new->l_ns, new->l_direct_opencount);
+ }
+Index: git/elf/rtld.c
+===================================================================
+--- git.orig/elf/rtld.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/rtld.c 2014-08-27 05:12:33.812070587 +0000
+@@ -321,7 +321,7 @@
+ }
+ #endif
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
+ {
+ #ifndef HP_TIMING_NONAVAIL
+ print_statistics (&rtld_total_time);
+@@ -1699,7 +1699,7 @@
+ after relocation. */
+ struct link_map *l;
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ {
+ struct r_scope_elem *scope = &main_map->l_searchlist;
+
+@@ -1729,7 +1729,7 @@
+ _dl_printf ("\n");
+ }
+ }
+- else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
++ else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
+ {
+ /* Look through the dependencies of the main executable
+ and determine which of them is not actually
+@@ -1837,7 +1837,7 @@
+ }
+ }
+
+- if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ && rtld_multiple_ref)
+ {
+ /* Mark the link map as not yet relocated again. */
+@@ -1970,7 +1970,7 @@
+ if (r_list == r_listend && liblist == liblistend)
+ prelinked = true;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("\nprelink checking: %s\n",
+ prelinked ? "ok" : "failed");
+ }
+@@ -1988,7 +1988,7 @@
+ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ {
+ _dl_debug_printf ("\nInitial object scopes\n");
+
+@@ -2262,7 +2262,7 @@
+ if (debopts[cnt].len == len
+ && memcmp (dl_debug, debopts[cnt].name, len) == 0)
+ {
+- GLRO(dl_debug_mask) |= debopts[cnt].mask;
++ GLRO_dl_debug_mask |= debopts[cnt].mask;
+ any_debug = 1;
+ break;
+ }
+@@ -2283,7 +2283,7 @@
+ ++dl_debug;
+ }
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
++ if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
+ {
+ /* In order to get an accurate picture of whether a particular
+ DT_NEEDED entry is actually used we have to process both
+@@ -2291,7 +2291,7 @@
+ GLRO(dl_lazy) = 0;
+ }
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
++ if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
+ {
+ size_t cnt;
+
+@@ -2490,7 +2490,7 @@
+ {
+ mode = trace;
+ GLRO(dl_verbose) = 1;
+- GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
++ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
+ GLRO(dl_trace_prelink) = &envline[17];
+ }
+ break;
+@@ -2537,7 +2537,7 @@
+ if (__access ("/etc/suid-debug", F_OK) != 0)
+ {
+ unsetenv ("MALLOC_CHECK_");
+- GLRO(dl_debug_mask) = 0;
++ GLRO_dl_debug_mask = 0;
+ }
+
+ if (mode != normal)
+Index: git/elf/dl-lookup.c
+===================================================================
+--- git.orig/elf/dl-lookup.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/dl-lookup.c 2014-08-27 05:13:07.644070587 +0000
+@@ -300,7 +300,7 @@
+ hash table. */
+ if (__glibc_unlikely (tab->size))
+ {
+- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
++ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
+ goto success;
+ }
+ #endif
+@@ -375,7 +375,7 @@
+ continue;
+
+ /* Print some debugging info if wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
+ _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
+ undef_name, DSO_FILENAME (map->l_name),
+ map->l_ns);
+@@ -698,7 +698,7 @@
+ }
+
+ /* Display information if we are debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\
+ \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
+ DSO_FILENAME (map->l_name),
+@@ -802,7 +802,7 @@
+ {
+ if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
+ && skip_map == NULL
+- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
+ {
+ /* We could find no value for a strong reference. */
+ const char *reference_name = undef_map ? undef_map->l_name : "";
+@@ -873,7 +873,7 @@
+ if (__glibc_unlikely (current_value.m->l_used == 0))
+ current_value.m->l_used = 1;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask)
++ if (__glibc_unlikely (GLRO_dl_debug_mask
+ & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
+ _dl_debug_bindings (undef_name, undef_map, ref,
+ &current_value, version, type_class, protected);
+@@ -938,7 +938,7 @@
+ {
+ const char *reference_name = undef_map->l_name;
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
++ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
+ {
+ _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
+ DSO_FILENAME (reference_name),
+@@ -952,7 +952,7 @@
+ _dl_debug_printf_c ("\n");
+ }
+ #ifdef SHARED
+- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ {
+ int conflict = 0;
+ struct sym_val val = { NULL, NULL };
+Index: git/elf/get-dynamic-info.h
+===================================================================
+--- git.orig/elf/get-dynamic-info.h 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/get-dynamic-info.h 2014-08-27 05:03:59.728070587 +0000
+@@ -157,7 +157,7 @@
+ them. Therefore to avoid breaking existing applications the
+ best we can do is add a warning during debugging with the
+ intent of notifying the user of the problem. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
+ && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
+ _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
+ l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
+Index: git/csu/libc-start.c
+===================================================================
+--- git.orig/csu/libc-start.c 2014-08-27 04:59:01.412070587 +0000
++++ git/csu/libc-start.c 2014-08-27 05:09:28.936070587 +0000
+@@ -238,7 +238,7 @@
+
+ /* Call the initializer of the program, if any. */
+ #ifdef SHARED
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
+ #endif
+ if (init)
+@@ -261,7 +261,7 @@
+ #endif
+
+ #ifdef SHARED
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
+ #endif
+
+Index: git/elf/dl-cache.c
+===================================================================
+--- git.orig/elf/dl-cache.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-cache.c 2014-08-27 05:10:14.384070587 +0000
+@@ -187,7 +187,7 @@
+ const char *best;
+
+ /* Print a message if the loading of libs is traced. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
+
+ if (cache == NULL)
+@@ -285,7 +285,7 @@
+ }
+
+ /* Print our result if wanted. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)
+ && best != NULL)
+ _dl_debug_printf (" trying file=%s\n", best);
+
+Index: git/elf/dl-close.c
+===================================================================
+--- git.orig/elf/dl-close.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-close.c 2014-08-27 05:10:26.456070587 +0000
+@@ -125,7 +125,7 @@
+ dl_close_state = rerun;
+
+ /* There are still references to this object. Do nothing more. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n",
+ map->l_name, map->l_direct_opencount);
+
+@@ -257,7 +257,7 @@
+ if (imap->l_init_called)
+ {
+ /* When debugging print a message first. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS,
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS,
+ 0))
+ _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
+ imap->l_name, nsid);
+@@ -664,7 +664,7 @@
+ free (imap->l_reldeps);
+
+ /* Print debugging message. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n",
+ imap->l_name, imap->l_ns);
+
+Index: git/elf/dl-conflict.c
+===================================================================
+--- git.orig/elf/dl-conflict.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-conflict.c 2014-08-27 05:10:37.652070587 +0000
+@@ -32,7 +32,7 @@
+ ElfW(Rela) *conflictend)
+ {
+ #if ! ELF_MACHINE_NO_RELA
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
+ _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
+
+ {
+Index: git/elf/dl-deps.c
+===================================================================
+--- git.orig/elf/dl-deps.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-deps.c 2014-08-27 05:10:48.260070587 +0000
+@@ -127,7 +127,7 @@
+ else \
+ { \
+ /* This is for DT_AUXILIARY. */ \
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) \
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \
+ _dl_debug_printf (N_("\
+ cannot load auxiliary `%s' because of empty dynamic string token " \
+ "substitution\n"), __str); \
+@@ -303,7 +303,7 @@
+ args.name = name;
+
+ /* Say that we are about to load an auxiliary library. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS,
+ 0))
+ _dl_debug_printf ("load auxiliary object=%s"
+ " requested by file=%s\n",
+@@ -520,7 +520,7 @@
+ runp->map->l_reserved = 0;
+ }
+
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_PRELINK, 0) != 0
+ && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
+ {
+ /* If we are to compute conflicts, we have to build local scope
+Index: git/elf/dl-error.c
+===================================================================
+--- git.orig/elf/dl-error.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-error.c 2014-08-27 05:11:06.752070587 +0000
+@@ -139,7 +139,7 @@
+ _dl_signal_cerror (int errcode, const char *objname, const char *occation,
+ const char *errstring)
+ {
+- if (__builtin_expect (GLRO(dl_debug_mask)
++ if (__builtin_expect (GLRO_dl_debug_mask
+ & ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
+ _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation,
+ errstring, receiver ? "continued" : "fatal");
+Index: git/elf/dl-fini.c
+===================================================================
+--- git.orig/elf/dl-fini.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-fini.c 2014-08-27 05:11:17.544070587 +0000
+@@ -234,7 +234,7 @@
+ || l->l_info[DT_FINI] != NULL)
+ {
+ /* When debugging print a message first. */
+- if (__builtin_expect (GLRO(dl_debug_mask)
++ if (__builtin_expect (GLRO_dl_debug_mask
+ & DL_DEBUG_IMPCALLS, 0))
+ _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
+ DSO_FILENAME (l->l_name),
+@@ -286,7 +286,7 @@
+ goto again;
+ }
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
+ _dl_debug_printf ("\nruntime linker statistics:\n"
+ " final number of relocations: %lu\n"
+ "final number of relocations from cache: %lu\n",
+Index: git/elf/dl-init.c
+===================================================================
+--- git.orig/elf/dl-init.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-init.c 2014-08-27 05:11:28.372070587 +0000
+@@ -52,7 +52,7 @@
+ return;
+
+ /* Print a debug message if wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ _dl_debug_printf ("\ncalling init: %s\n\n",
+ DSO_FILENAME (l->l_name));
+
+@@ -102,7 +102,7 @@
+ ElfW(Addr) *addrs;
+ unsigned int cnt;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ _dl_debug_printf ("\ncalling preinit: %s\n\n",
+ DSO_FILENAME (main_map->l_name));
+
+Index: git/elf/dl-load.c
+===================================================================
+--- git.orig/elf/dl-load.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-load.c 2014-08-27 05:11:41.156070587 +0000
+@@ -957,7 +957,7 @@
+ }
+
+ /* Print debugging message. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("file=%s [%lu]; generating link map\n", name, nsid);
+
+ /* This is the ELF header. We read it in `open_verify'. */
+@@ -1361,7 +1361,7 @@
+
+ l->l_entry += l->l_addr;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\
+ dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\
+ entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n",
+@@ -1787,7 +1787,7 @@
+
+ /* If we are debugging the search for libraries print the path
+ now if it hasn't happened now. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)
+ && current_what != this_dir->what)
+ {
+ current_what = this_dir->what;
+@@ -1808,7 +1808,7 @@
+ - buf);
+
+ /* Print name we try if this is wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf (" trying file=%s\n", buf);
+
+ fd = open_verify (buf, fbp, loader, whatcode, mode,
+@@ -1953,7 +1953,7 @@
+ }
+
+ /* Display information if we are debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)
+ && loader != NULL)
+ _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
+ ? "\nfile=%s [%lu]; needed by %s [%lu]\n"
+@@ -1995,7 +1995,7 @@
+
+ size_t namelen = strlen (name) + 1;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid);
+
+ fd = -1;
+@@ -2122,7 +2122,7 @@
+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
+
+ /* Add another newline when we are tracing the library loading. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("\n");
+ }
+ else
+@@ -2155,7 +2155,7 @@
+ if (__glibc_unlikely (fd == -1))
+ {
+ if (trace_mode
+- && __glibc_likely ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) == 0))
++ && __glibc_likely ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) == 0))
+ {
+ /* We haven't found an appropriate library. But since we
+ are only interested in the list of libraries this isn't
+Index: git/elf/dl-object.c
+===================================================================
+--- git.orig/elf/dl-object.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-object.c 2014-08-27 05:11:51.756070587 +0000
+@@ -98,7 +98,7 @@
+ new->l_type = type;
+ /* If we set the bit now since we know it is never used we avoid
+ dirtying the cache line later. */
+- if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
++ if ((GLRO_dl_debug_mask & DL_DEBUG_UNUSED) == 0)
+ new->l_used = 1;
+ new->l_loader = loader;
+ #if NO_TLS_OFFSET != 0
+Index: git/elf/dl-reloc.c
+===================================================================
+--- git.orig/elf/dl-reloc.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-reloc.c 2014-08-27 05:12:07.056070587 +0000
+@@ -183,7 +183,7 @@
+ && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
+ lazy = 0;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
+ _dl_debug_printf ("\nrelocation processing: %s%s\n",
+ DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
+
+Index: git/elf/dl-version.c
+===================================================================
+--- git.orig/elf/dl-version.c 2014-08-27 04:59:01.608070587 +0000
++++ git/elf/dl-version.c 2014-08-27 05:12:19.568070587 +0000
+@@ -82,7 +82,7 @@
+ int result = 0;
+
+ /* Display information about what we are doing while debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_VERSIONS))
+ _dl_debug_printf ("\
+ checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
+ string, DSO_FILENAME (map->l_name),
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch b/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch
index cf5803585c..ffbaba14a2 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch
+++ b/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch
@@ -2,11 +2,11 @@ import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
Upstream-Status: Pending
-Index: libc/bits/stdio-lock.h
+Index: git/bits/stdio-lock.h
===================================================================
---- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700
-+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700
-@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _
+--- git.orig/bits/stdio-lock.h 2014-08-29 10:33:57.960070587 -0700
++++ git/bits/stdio-lock.h 2014-08-29 10:33:57.952070587 -0700
+@@ -49,6 +49,8 @@
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
_IO_flockfile (_fp)
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch b/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch
index f5023c08d4..4559de7bc1 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch
+++ b/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch
@@ -6,11 +6,11 @@ Upstream-Status: Inapproriate [older kernel/perf specific]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: libc/posix/sys/wait.h
+Index: git/posix/sys/wait.h
===================================================================
---- libc.orig/posix/sys/wait.h
-+++ libc/posix/sys/wait.h
-@@ -28,6 +28,7 @@
+--- git.orig/posix/sys/wait.h 2014-08-29 10:35:10.432070587 -0700
++++ git/posix/sys/wait.h 2014-08-29 10:35:10.424070587 -0700
+@@ -27,6 +27,7 @@
__BEGIN_DECLS
#include <signal.h>
diff --git a/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
new file mode 100644
index 0000000000..e1aa13926a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
@@ -0,0 +1,85 @@
+Taken from EGLIBC, r1484 + r1525
+
+ 2007-02-20 Jim Blandy <jimb@codesourcery.com>
+
+ * Makefile (install-headers): Preserve old behavior: depend on
+ $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
+ is set; otherwise, place gnu/stubs.h on the 'install-others' list.
+
+ 2007-02-16 Jim Blandy <jimb@codesourcery.com>
+
+ * Makefile: Amend make install-headers to install everything
+ necessary for building a cross-compiler. Install gnu/stubs.h as
+ part of 'install-headers', not 'install-others'.
+ If install-bootstrap-headers is 'yes', install a dummy copy of
+ gnu/stubs.h, instead of computing the real thing.
+ * include/stubs-bootstrap.h: New file.
+
+Upstream-Status: Pending
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-08-27 18:35:18.908070587 +0000
++++ git/Makefile 2014-08-27 18:35:19.340070587 +0000
+@@ -69,9 +69,18 @@
+ vpath %.h $(subdir-dirs)
+
+ # What to install.
+-install-others = $(inst_includedir)/gnu/stubs.h
+ install-bin-script =
+
++# If we're bootstrapping, install a dummy gnu/stubs.h along with the
++# other headers, so 'make install-headers' produces a useable include
++# tree. Otherwise, install gnu/stubs.h later, after the rest of the
++# build is done.
++ifeq ($(install-bootstrap-headers),yes)
++install-headers: $(inst_includedir)/gnu/stubs.h
++else
++install-others = $(inst_includedir)/gnu/stubs.h
++endif
++
+ ifeq (yes,$(build-shared))
+ headers += gnu/lib-names.h
+ endif
+@@ -151,6 +160,16 @@
+
+ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
+
++# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o
++# files in EGLIBC. For bootstrapping a GCC/EGLIBC pair, an empty
++# gnu/stubs.h is good enough.
++ifeq ($(install-bootstrap-headers),yes)
++$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force)
++ $(make-target-directory)
++ $(INSTALL_DATA) $< $@
++
++installed-stubs =
++else
+ ifndef abi-variants
+ installed-stubs = $(inst_includedir)/gnu/stubs.h
+ else
+@@ -177,6 +196,7 @@
+
+ install-others-nosubdir: $(installed-stubs)
+ endif
++endif
+
+
+ # Since stubs.h is never needed when building the library, we simplify the
+Index: git/include/stubs-bootstrap.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/include/stubs-bootstrap.h 2014-08-27 18:35:19.340070587 +0000
+@@ -0,0 +1,12 @@
++/* Placeholder stubs.h file for bootstrapping.
++
++ When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC
++ headers be installed, but we can't fully build EGLIBC without that
++ GCC. So we run the command:
++
++ make install-headers install-bootstrap-headers=yes
++
++ to install the headers GCC needs, but avoid building certain
++ difficult headers. The <gnu/stubs.h> header depends, via the
++ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
++ an empty stubs.h like this will do fine for GCC. */
diff --git a/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch b/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch
new file mode 100644
index 0000000000..9a31255b09
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch
@@ -0,0 +1,109 @@
+2008-02-07 Joseph Myers <joseph@codesourcery.com>
+
+ * Makerules (install-extras, install-map): New variables.
+ (installed-libcs): Add libc_pic.a.
+ (install-lib): Include _pic.a files for versioned shared
+ libraries.
+ (install-map-nosubdir, install-extras-nosubdir): Add rules for
+ installing extra files.
+ (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
+ install-extras-nosubdir.
+
+
+2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * Makerules (install-lib): Don't install libpthread_pic.a.
+ (install-map): Don't install libpthread_pic.map.
+
+Upstream-Status: Pending
+
+Index: git/Makerules
+===================================================================
+--- git.orig/Makerules 2014-08-27 18:49:22.552070587 +0000
++++ git/Makerules 2014-08-27 18:49:27.308070587 +0000
+@@ -612,6 +631,9 @@
+ $(common-objpfx)libc.so: $(common-objpfx)libc.map
+ endif
+ common-generated += libc.so libc_pic.os
++ifndef subdir
++install-extras := soinit.o sofini.o
++endif
+ ifdef libc.so-version
+ $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
+ $(make-link)
+@@ -834,6 +856,7 @@
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+@@ -862,6 +885,22 @@
+ install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
+ install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
+
++# Install the _pic.a files for versioned libraries, and corresponding
++# .map files.
++# libpthread_pic.a breaks mklibs, so don't install it and its map.
++install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a)
++install-lib := $(filter-out libpthread_pic.a,$(install-lib))
++# Despite having a soname libhurduser and libmachuser do not use symbol
++# versioning, so don't install the corresponding .map files.
++ifeq ($(build-shared),yes)
++install-map := $(patsubst %.so,%.map,\
++ $(foreach L,$(install-lib.so-versioned),$(notdir $L)))
++install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map))
++ifndef subdir
++install-map := $(install-map) libc.map
++endif
++endif
++
+ # For versioned libraries, we install three files:
+ # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
+ # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
+@@ -1103,9 +1142,22 @@
+ endif # headers-nonh
+ endif # headers
+
++ifdef install-map
++$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \
++ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force)
++ $(do-install)
++endif
++
++ifdef install-extras
++$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
++ $(inst_libdir)/libc_pic/%.o: $(elfobjdir)/%.os $(+force)
++ $(do-install)
++endif
++
+ .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
+ install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
+- install-data-nosubdir install-headers-nosubdir
++ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \
++ install-extras-nosubdir
+ install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
+ install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
+ install-rootsbin-nosubdir: \
+@@ -1118,6 +1170,10 @@
+ install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
+ install-others-nosubdir: $(install-others)
+ install-others-programs-nosubdir: $(install-others-programs)
++install-map-nosubdir: $(addprefix $(inst_libdir)/,\
++ $(patsubst lib%.map,lib%_pic.map,$(install-map)))
++install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\
++ $(install-extras))
+
+ # We need all the `-nosubdir' targets so that `install' in the parent
+ # doesn't depend on several things which each iterate over the subdirs.
+@@ -1127,7 +1183,8 @@
+
+ .PHONY: install install-no-libc.a-nosubdir
+ install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
+- install-lib-nosubdir install-others-nosubdir
++ install-lib-nosubdir install-others-nosubdir \
++ install-map-nosubdir install-extras-nosubdir
+ ifeq ($(build-programs),yes)
+ install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
+ install-rootsbin-nosubdir install-sbin-nosubdir \
diff --git a/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch b/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch
new file mode 100644
index 0000000000..bb83d6d36e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch
@@ -0,0 +1,68 @@
+2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
+ Mark Shinwell <shinwell@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/libc-start.c
+ (__libc_start_main): Detect 8xx parts and clear
+ __cache_line_size if detected.
+ * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+ (DL_PLATFORM_AUXV): Likewise.
+
+Upstream-Status: Pending
+
+Index: git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:23.996070587 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:27.332070587 +0000
+@@ -24,9 +24,21 @@
+ /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
+ verify that the static extern __cache_line_size is defined by checking
+ for not NULL. If it is defined then assign the cache block size
+- value to __cache_line_size. */
++ value to __cache_line_size. This is used by memset to
++ optimize setting to zero. We have to detect 8xx processors, which
++ have buggy dcbz implementations that cannot report page faults
++ correctly. That requires reading SPR, which is a privileged
++ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr
++ reads from the PVR register. */
+ #define DL_PLATFORM_AUXV \
+ case AT_DCACHEBSIZE: \
++ if (__LINUX_KERNEL_VERSION >= 0x020218) \
++ { \
++ unsigned pvr = 0; \
++ asm ("mfspr %0, 287" : "=r" (pvr)); \
++ if ((pvr & 0xffff0000) == 0x00500000) \
++ break; \
++ } \
+ __cache_line_size = av->a_un.a_val; \
+ break;
+
+Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:23.996070587 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:27.332070587 +0000
+@@ -68,11 +68,24 @@
+ rtld_fini = NULL;
+ }
+
+- /* Initialize the __cache_line_size variable from the aux vector. */
++ /* Initialize the __cache_line_size variable from the aux vector.
++ This is used by memset to optimize setting to zero. We have to
++ detect 8xx processors, which have buggy dcbz implementations that
++ cannot report page faults correctly. That requires reading SPR,
++ which is a privileged operation. Fortunately 2.2.18 and later
++ emulates PowerPC mfspr reads from the PVR register. */
+ for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
+ switch (av->a_type)
+ {
+ case AT_DCACHEBSIZE:
++ if (__LINUX_KERNEL_VERSION >= 0x020218)
++ {
++ unsigned pvr = 0;
++
++ asm ("mfspr %0, 287" : "=r" (pvr) :);
++ if ((pvr & 0xffff0000) == 0x00500000)
++ break;
++ }
+ __cache_line_size = av->a_un.a_val;
+ break;
+ }
diff --git a/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch b/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch
new file mode 100644
index 0000000000..a73bcebe34
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch
@@ -0,0 +1,54 @@
+cherry-picked from http://www.eglibc.org/archives/patches/msg00772.html
+
+It hasnt yet been merged into glibc
+
+Signed-off-by: Khem Raj
+
+Upstream-Status: Pending
+
+Index: git/resolv/res_libc.c
+===================================================================
+--- git.orig/resolv/res_libc.c 2014-08-27 18:35:15.492070587 +0000
++++ git/resolv/res_libc.c 2014-08-27 18:35:19.204070587 +0000
+@@ -22,12 +22,13 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <bits/libc-lock.h>
+-
++#include <sys/stat.h>
+
+ /* The following bit is copied from res_data.c (where it is #ifdef'ed
+ out) since res_init() should go into libc.so but the rest of that
+ file should not. */
+
++__libc_lock_define_initialized (static, lock);
+ extern unsigned long long int __res_initstamp attribute_hidden;
+ /* We have atomic increment operations on 64-bit platforms. */
+ #if __WORDSIZE == 64
+@@ -35,7 +36,6 @@
+ # define atomicincunlock(lock) (void) 0
+ # define atomicinc(var) catomic_increment (&(var))
+ #else
+-__libc_lock_define_initialized (static, lock);
+ # define atomicinclock(lock) __libc_lock_lock (lock)
+ # define atomicincunlock(lock) __libc_lock_unlock (lock)
+ # define atomicinc(var) ++var
+@@ -94,7 +94,18 @@
+ int
+ __res_maybe_init (res_state resp, int preinit)
+ {
++ static time_t last_mtime;
++ struct stat statbuf;
++ int ret;
++
+ if (resp->options & RES_INIT) {
++ ret = stat (_PATH_RESCONF, &statbuf);
++ __libc_lock_lock (lock);
++ if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
++ last_mtime = statbuf.st_mtime;
++ atomicinc (__res_initstamp);
++ }
++ __libc_lock_unlock (lock);
+ if (__res_initstamp != resp->_u._ext.initstamp) {
+ if (resp->nscount > 0)
+ __res_iclose (resp, true);
diff --git a/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch b/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch
new file mode 100644
index 0000000000..bfb813eb7c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch
@@ -0,0 +1,42 @@
+2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ Andrew Stubbs <ams@codesourcery.com>
+
+ Resolve SH's __fpscr_values to symbol in libc.so.
+
+ * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
+ * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
+ * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
+
+Upstream-Status: Pending
+
+Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:24.036070587 +0000
++++ git/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:27.332070587 +0000
+@@ -30,3 +30,14 @@
+
+ #define __syscall_error __syscall_error_1
+ #include <sysdeps/unix/sh/sysdep.S>
++
++ .data
++ .align 3
++ .globl ___fpscr_values
++ .type ___fpscr_values, @object
++ .size ___fpscr_values, 8
++___fpscr_values:
++ .long 0
++ .long 0x80000
++weak_alias (___fpscr_values, __fpscr_values)
++
+Index: git/sysdeps/unix/sysv/linux/sh/Versions
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:24.028070587 +0000
++++ git/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:27.332070587 +0000
+@@ -2,6 +2,7 @@
+ GLIBC_2.2 {
+ # functions used in other libraries
+ __xstat64; __fxstat64; __lxstat64;
++ __fpscr_values;
+
+ # a*
+ alphasort64;
diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch
new file mode 100644
index 0000000000..f61d459e5c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch
@@ -0,0 +1,16543 @@
+Forward port eglibc options groups support
+
+Upstream-Status: Pending
+
+Index: git/argp/argp-fmtstream.c
+===================================================================
+--- git.orig/argp/argp-fmtstream.c 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-fmtstream.c 2014-08-29 20:01:15.188070587 -0700
+@@ -42,6 +42,7 @@
+ #ifdef _LIBC
+ # include <wchar.h>
+ # include <libio/libioP.h>
++# include <gnu/option-groups.h>
+ # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
+ #endif
+
+@@ -100,7 +101,11 @@
+ __argp_fmtstream_update (fs);
+ if (fs->p > fs->buf)
+ {
++#ifdef _LIBC
+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
++#else
++ fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
++#endif
+ }
+ free (fs->buf);
+ free (fs);
+@@ -145,9 +150,17 @@
+ size_t i;
+ for (i = 0; i < pad; i++)
+ {
++#ifdef _LIBC
+ if (_IO_fwide (fs->stream, 0) > 0)
+- putwc_unlocked (L' ', fs->stream);
++ {
++#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L' ', fs->stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked (' ', fs->stream);
+ }
+ }
+@@ -308,9 +321,17 @@
+ *nl++ = ' ';
+ else
+ for (i = 0; i < fs->wmargin; ++i)
++#ifdef _LIBC
+ if (_IO_fwide (fs->stream, 0) > 0)
+- putwc_unlocked (L' ', fs->stream);
++ {
++#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L' ', fs->stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked (' ', fs->stream);
+
+ /* Copy the tail of the original buffer into the current buffer
+Index: git/argp/argp-help.c
+===================================================================
+--- git.orig/argp/argp-help.c 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-help.c 2014-08-29 20:01:15.188070587 -0700
+@@ -51,6 +51,7 @@
+ #ifdef _LIBC
+ # include <../libio/libioP.h>
+ # include <wchar.h>
++# include <gnu/option-groups.h>
+ #endif
+
+ #ifndef _
+@@ -1702,7 +1703,7 @@
+ }
+
+ char *
+-__argp_short_program_name (void)
++(__argp_short_program_name) (void)
+ {
+ # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ return program_invocation_short_name;
+@@ -1873,9 +1874,17 @@
+ #endif
+ }
+
++#ifdef _LIBC
+ if (_IO_fwide (stream, 0) > 0)
+- putwc_unlocked (L'\n', stream);
++ {
++#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L'\n', stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked ('\n', stream);
+
+ #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+Index: git/argp/argp-namefrob.h
+===================================================================
+--- git.orig/argp/argp-namefrob.h 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-namefrob.h 2014-08-29 20:01:15.192070587 -0700
+@@ -76,10 +76,12 @@
+ #undef __argp_fmtstream_wmargin
+ #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
++#if 0
+ #include "mempcpy.h"
+ #include "strcase.h"
+ #include "strchrnul.h"
+ #include "strndup.h"
++#endif
+
+ /* normal libc functions we call */
+ #undef __flockfile
+Index: git/argp/Makefile
+===================================================================
+--- git.orig/argp/Makefile 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for argp.
+ #
++include ../option-groups.mak
++
+ subdir := argp
+
+ include ../Makeconfig
+Index: git/catgets/Makefile
+===================================================================
+--- git.orig/catgets/Makefile 2014-08-29 20:00:43.008070587 -0700
++++ git/catgets/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -22,20 +22,23 @@
+
+ include ../Makeconfig
+
++include ../option-groups.mak
++
+ headers = nl_types.h
+-routines = catgets open_catalog
+-others = gencat
+-install-bin = gencat
+-extra-objs = $(gencat-modules:=.o)
++routines-$(OPTION_EGLIBC_CATGETS) := catgets open_catalog
++others-$(OPTION_EGLIBC_CATGETS) := gencat
++install-bin-$(OPTION_EGLIBC_CATGETS) := gencat
++extra-objs-$(OPTION_EGLIBC_CATGETS) := $(gencat-modules:=.o)
+
+-tests = tst-catgets
+-test-srcs = test-gencat
++tests-$(OPTION_EGLIBC_CATGETS) := tst-catgets
++test-srcs-$(OPTION_EGLIBC_CATGETS) := test-gencat
+
++ifeq (y,$(OPTION_EGLIBC_CATGETS))
+ ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
+ $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
+ endif
+-
++endif
+ gencat-modules = xmalloc
+
+ # To find xmalloc.c
+Index: git/crypt/crypt-entry.c
+===================================================================
+--- git.orig/crypt/crypt-entry.c 2014-08-29 20:00:43.028070587 -0700
++++ git/crypt/crypt-entry.c 2014-08-29 20:01:15.192070587 -0700
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #endif
+ #include <string.h>
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <fips-private.h>
+
+@@ -76,9 +77,11 @@
+ const char *salt;
+ struct crypt_data * __restrict data;
+ {
++#if __OPTION_EGLIBC_CRYPT_UFC
+ ufc_long res[4];
+ char ktab[9];
+ ufc_long xx = 25; /* to cope with GCC long long compiler bugs */
++#endif /*__OPTION_EGLIBC_CRYPT_UFC*/
+
+ #ifdef _LIBC
+ /* Try to find out whether we have to use MD5 encryption replacement. */
+@@ -105,6 +108,7 @@
+ sizeof (struct crypt_data));
+ #endif
+
++#if __OPTION_EGLIBC_CRYPT_UFC
+ /*
+ * Hack DES tables according to salt
+ */
+@@ -144,6 +148,10 @@
+ */
+ _ufc_output_conversion_r (res[0], res[1], salt, data);
+ return data->crypt_3_buf;
++#else /* __OPTION_EGLIBC_CRYPT_UFC */
++ __set_errno (ENOSYS);
++ return NULL;
++#endif /* __OPTION_EGLIBC_CRYPT_UFC */
+ }
+ weak_alias (__crypt_r, crypt_r)
+
+@@ -168,7 +176,12 @@
+ return __sha512_crypt (key, salt);
+ #endif
+
++#if __OPTION_EGLIBC_CRYPT_UFC
+ return __crypt_r (key, salt, &_ufc_foobar);
++#else /* __OPTION_EGLIBC_CRYPT_UFC */
++ __set_errno (ENOSYS);
++ return NULL;
++#endif /* __OPTION_EGLIBC_CRYPT_UFC */
+ }
+
+
+Index: git/crypt/Makefile
+===================================================================
+--- git.orig/crypt/Makefile 2014-08-29 20:00:43.024070587 -0700
++++ git/crypt/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,21 +18,25 @@
+ #
+ # Sub-makefile for crypt() portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := crypt
+
+ include ../Makeconfig
+
+ headers := crypt.h
+
+-extra-libs := libcrypt
+-extra-libs-others := $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_CRYPT) := libcrypt
++extra-libs-others-y := $(extra-libs-y)
+
+-libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
+- crypt_util
++libcrypt-routines :=crypt-entry md5-crypt sha256-crypt sha512-crypt crypt_common
++libcrypt-routines-$(OPTION_EGLIBC_CRYPT_UFC) := crypt crypt_util
++libcrypt-routines += $(libcrypt-routines-y)
+
+-tests := cert md5c-test sha256c-test sha512c-test badsalttest
++tests-$(OPTION_EGLIBC_CRYPT) := md5c-test sha256c-test sha512c-test badsalttest
++tests-$(OPTION_EGLIBC_CRYPT_UFC) += cert
+
+-ifeq ($(crypt-in-libc),yes)
++ifeq ($(crypt-in-libc)$(OPTION_EGLIBC_CRYPT),yesy)
+ routines += $(libcrypt-routines)
+ endif
+
+@@ -44,7 +48,7 @@
+ else
+ libcrypt-routines += md5 sha256 sha512
+
+-tests += md5test sha256test sha512test
++tests-$(OPTION_EGLIBC_CRYPT) += md5test sha256test sha512test
+
+ # The test md5test-giant uses up to 400 MB of RSS and runs on a fast
+ # machine over a minute.
+@@ -64,8 +68,10 @@
+ $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
+ endif
+
++ifeq ($(OPTION_EGLIBC_CRYPT),y)
+ ifeq (yes,$(build-shared))
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
+ else
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
+ endif
++endif # eglibc: OPTION_EGLIBC_CRYPT
+Index: git/csu/Makefile
+===================================================================
+--- git.orig/csu/Makefile 2014-08-29 20:00:43.032070587 -0700
++++ git/csu/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -22,6 +22,8 @@
+ # crtn.o, special "initializer" and "finalizer" files used in the link
+ # to make the .init and .fini sections work right.
+
++include ../option-groups.mak
++
+ subdir := csu
+
+ include ../Makeconfig
+Index: git/debug/Makefile
+===================================================================
+--- git.orig/debug/Makefile 2014-08-29 20:00:43.036070587 -0700
++++ git/debug/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for debug portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := debug
+
+ include ../Makeconfig
+@@ -27,7 +29,7 @@
+ # Note that ptsname_r_chk and getlogin_r are not here, but in
+ # login/Makefile instead. If that subdir is omitted from the
+ # build, its _FORTIFY_SOURCE support will be too.
+-routines = backtrace backtracesyms backtracesymsfd noophooks \
++routines = noophooks \
+ memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
+ strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
+ sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
+@@ -36,20 +38,27 @@
+ read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
+ readlink_chk readlinkat_chk getwd_chk getcwd_chk \
+ realpath_chk fread_chk fread_u_chk \
+- wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
+- wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
+- wcpncpy_chk \
+- swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
+- vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
+ confstr_chk getgroups_chk ttyname_r_chk \
+- gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
+- wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
+- wcstombs_chk asprintf_chk vasprintf_chk dprintf_chk \
++ gethostname_chk getdomainname_chk \
++ asprintf_chk vasprintf_chk dprintf_chk \
+ vdprintf_chk obprintf_chk \
+ longjmp_chk ____longjmp_chk \
+ fdelt_chk poll_chk ppoll_chk \
+ stack_chk_fail fortify_fail \
+ $(static-only-routines)
++routines-$(OPTION_EGLIBC_BACKTRACE) += backtrace backtracesyms backtracesymsfd
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += wprintf_chk fwprintf_chk \
++ vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
++ wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
++ wcpncpy_chk \
++ swprintf_chk vswprintf_chk \
++ wcrtomb_chk mbsnrtowcs_chk \
++ wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
++ wcstombs_chk
++
+ static-only-routines := warning-nop stack_chk_fail_local
+
+ CFLAGS-backtrace.c = -fno-omit-frame-pointer
+@@ -129,11 +138,15 @@
+ LDFLAGS-tst-backtrace5 = -rdynamic
+ LDFLAGS-tst-backtrace6 = -rdynamic
+
+-tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
+- tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
+- tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
+- tst-longjmp_chk2 tst-backtrace2 tst-backtrace3 tst-backtrace4 \
+- tst-backtrace5 tst-backtrace6
++tests = tst-longjmp_chk test-strcpy_chk test-stpcpy_chk tst-longjmp_chk2
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-chk1 tst-chk2 tst-chk3 tst-lfschk1 tst-lfschk2 tst-lfschk3
++tests-$(OPTION_EGLIBC_BACKTRACE) \
++ += backtrace-tst tst-backtrace2 tst-backtrace3 tst-backtrace4 \
++ tst-backtrace5 tst-backtrace6
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_EGLIBC_CXX_TESTS))
++tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6
++endif
+
+ tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc)
+ tests += $(tests-ifunc)
+Index: git/debug/segfault.c
+===================================================================
+--- git.orig/debug/segfault.c 2014-08-29 20:00:46.280070587 -0700
++++ git/debug/segfault.c 2014-08-29 20:01:15.192070587 -0700
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <_itoa.h>
+ #include <ldsodefs.h>
++#include <gnu/option-groups.h>
+
+ /* This file defines macros to access the content of the sigcontext element
+ passed up by the signal handler. */
+@@ -91,6 +92,7 @@
+ REGISTER_DUMP;
+ #endif
+
++#if __OPTION_EGLIBC_BACKTRACE
+ WRITE_STRING ("\nBacktrace:\n");
+
+ /* Get the backtrace. */
+@@ -113,6 +115,7 @@
+
+ /* Now generate nicely formatted output. */
+ __backtrace_symbols_fd (arr + i, cnt - i, fd);
++#endif
+
+ #ifdef HAVE_PROC_SELF
+ /* Now the link map. */
+Index: git/debug/tst-chk1.c
+===================================================================
+--- git.orig/debug/tst-chk1.c 2014-08-29 20:00:46.288070587 -0700
++++ git/debug/tst-chk1.c 2014-08-29 20:01:15.192070587 -0700
+@@ -31,6 +31,7 @@
+ #include <sys/select.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <gnu/option-groups.h>
+
+
+ #define obstack_chunk_alloc malloc
+@@ -307,6 +308,7 @@
+ snprintf (buf + 8, l0 + 3, "%d", num2);
+ CHK_FAIL_END
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ CHK_FAIL_START
+ swprintf (wbuf + 8, 3, L"%d", num1);
+ CHK_FAIL_END
+@@ -314,6 +316,7 @@
+ CHK_FAIL_START
+ swprintf (wbuf + 8, l0 + 3, L"%d", num1);
+ CHK_FAIL_END
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+ # endif
+
+ memcpy (buf, str1 + 2, l0 + 9);
+@@ -381,6 +384,7 @@
+ CHK_FAIL_END
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+
+ /* These ops can be done without runtime checking of object size. */
+ wmemcpy (wbuf, L"abcdefghij", 10);
+@@ -605,6 +609,7 @@
+ CHK_FAIL_END
+ #endif
+
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ /* Now checks for %n protection. */
+
+@@ -1192,6 +1197,7 @@
+ # endif
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (setlocale (LC_ALL, "de_DE.UTF-8") != NULL)
+ {
+ assert (MB_CUR_MAX <= 10);
+@@ -1348,6 +1354,7 @@
+ puts ("cannot set locale");
+ ret = 1;
+ }
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ int fd = posix_openpt (O_RDWR);
+ if (fd != -1)
+Index: git/dlfcn/Makefile
+===================================================================
+--- git.orig/dlfcn/Makefile 2014-08-29 20:00:46.312070587 -0700
++++ git/dlfcn/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -15,6 +15,8 @@
+ # License along with the GNU C Library; if not, see
+ # <http://www.gnu.org/licenses/>.
+
++include ../option-groups.mak
++
+ subdir := dlfcn
+
+ include ../Makeconfig
+@@ -36,7 +38,9 @@
+ ifeq (yes,$(build-shared))
+ tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
+ bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
+- bug-atexit3 tstatexit bug-dl-leaf
++ tstatexit bug-dl-leaf
++
++tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3
+ endif
+ modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
+ defaultmod2 errmsg1mod modatexit modcxaatexit \
+Index: git/elf/dl-support.c
+===================================================================
+--- git.orig/elf/dl-support.c 2014-08-29 20:00:46.384070587 -0700
++++ git/elf/dl-support.c 2014-08-29 20:01:15.192070587 -0700
+@@ -19,6 +19,7 @@
+ /* This file defines some things that for the dynamic linker are defined in
+ rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */
+
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+@@ -42,7 +43,9 @@
+ const char *_dl_platform;
+ size_t _dl_platformlen;
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ int _dl_debug_mask;
++#endif
+ int _dl_lazy;
+ ElfW(Addr) _dl_use_load_bias = -2;
+ int _dl_dynamic_weak;
+Index: git/elf/rtld.c
+===================================================================
+--- git.orig/elf/rtld.c 2014-08-29 20:01:14.708070587 -0700
++++ git/elf/rtld.c 2014-08-29 20:01:15.196070587 -0700
+@@ -16,6 +16,7 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <dlfcn.h>
+ #include <fcntl.h>
+@@ -2200,6 +2201,7 @@
+ objname, errstring);
+ }
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* Nonzero if any of the debugging options is enabled. */
+ static int any_debug attribute_relro;
+
+@@ -2309,6 +2311,7 @@
+ _exit (0);
+ }
+ }
++#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
+
+ static void
+ process_dl_audit (char *str)
+@@ -2376,12 +2379,14 @@
+ break;
+
+ case 5:
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* Debugging of the dynamic linker? */
+ if (memcmp (envline, "DEBUG", 5) == 0)
+ {
+ process_dl_debug (&envline[6]);
+ break;
+ }
++#endif
+ if (memcmp (envline, "AUDIT", 5) == 0)
+ process_dl_audit (&envline[6]);
+ break;
+@@ -2490,7 +2495,9 @@
+ {
+ mode = trace;
+ GLRO(dl_verbose) = 1;
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
++#endif
+ GLRO(dl_trace_prelink) = &envline[17];
+ }
+ break;
+@@ -2537,12 +2544,15 @@
+ if (__access ("/etc/suid-debug", F_OK) != 0)
+ {
+ unsetenv ("MALLOC_CHECK_");
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ GLRO_dl_debug_mask = 0;
++#endif
+ }
+
+ if (mode != normal)
+ _exit (5);
+ }
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* If we have to run the dynamic linker in debugging mode and the
+ LD_DEBUG_OUTPUT environment variable is given, we write the debug
+ messages to this file. */
+@@ -2567,6 +2577,7 @@
+ /* We use standard output if opening the file failed. */
+ GLRO(dl_debug_fd) = STDOUT_FILENO;
+ }
++#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
+ }
+
+
+Index: git/extra-lib.mk
+===================================================================
+--- git.orig/extra-lib.mk 2014-08-29 20:00:46.544070587 -0700
++++ git/extra-lib.mk 2014-08-29 20:01:15.196070587 -0700
+@@ -25,7 +25,9 @@
+ extra-objs := $(extra-objs)
+
+ # The modules that go in $(lib).
+-all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
++all-$(lib)-routines := $($(lib)-routines) \
++ $($(lib)-routines-y) \
++ $($(lib)-sysdep_routines)
+
+ # Add each flavor of library to the lists of things to build and install.
+ install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
+@@ -101,7 +103,7 @@
+ endif
+
+ # This will define `libof-ROUTINE := LIB' for each of the routines.
+-cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
++cpp-srcs-left := $(all-$(lib)-routines)
+ ifneq (,$(cpp-srcs-left))
+ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+ endif
+Index: git/grp/Makefile
+===================================================================
+--- git.orig/grp/Makefile 2014-08-29 20:00:46.556070587 -0700
++++ git/grp/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for grp portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := grp
+
+ include ../Makeconfig
+@@ -29,6 +31,9 @@
+ getgrent_r getgrgid_r getgrnam_r fgetgrent_r
+
+ tests := testgrp
++ifneq (y,$(OPTION_EGLIBC_NSSWITCH))
++LDLIBS-testgrp += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
++endif
+
+ ifeq (yes,$(build-shared))
+ test-srcs := tst_fgetgrent
+Index: git/hesiod/Makefile
+===================================================================
+--- git.orig/hesiod/Makefile 2014-08-29 20:00:46.580070587 -0700
++++ git/hesiod/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,12 +18,14 @@
+ #
+ # Sub-makefile for hesiod portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := hesiod
+
+ include ../Makeconfig
+
+-extra-libs := libnss_hesiod
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_INET) += libnss_hesiod
++extra-libs-others-y += $(extra-libs-y)
+
+ subdir-dirs = nss_hesiod
+ vpath %.c nss_hesiod
+Index: git/iconv/gconv_db.c
+===================================================================
+--- git.orig/iconv/gconv_db.c 2014-08-29 20:00:46.604070587 -0700
++++ git/iconv/gconv_db.c 2014-08-29 20:01:15.196070587 -0700
+@@ -25,6 +25,7 @@
+ #include <sys/param.h>
+ #include <bits/libc-lock.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+
+ #include <dlfcn.h>
+ #include <gconv_int.h>
+@@ -828,9 +829,11 @@
+ /* Free all resources if necessary. */
+ libc_freeres_fn (free_mem)
+ {
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* First free locale memory. This needs to be done before freeing derivations,
+ as ctype cleanup functions dereference steps arrays which we free below. */
+ _nl_locale_subfreeres ();
++#endif
+
+ /* finddomain.c has similar problem. */
+ extern void _nl_finddomain_subfreeres (void) attribute_hidden;
+Index: git/iconv/gconv_trans.c
+===================================================================
+--- git.orig/iconv/gconv_trans.c 2014-08-29 20:00:46.612070587 -0700
++++ git/iconv/gconv_trans.c 2014-08-29 20:01:15.196070587 -0700
+@@ -23,6 +23,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <gnu/option-groups.h>
+
+ #include <bits/libc-lock.h>
+ #include "gconv_int.h"
+@@ -59,6 +60,7 @@
+ PTR_DEMANGLE (fct);
+ #endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* If there is no transliteration information in the locale don't do
+ anything and return the error. */
+ size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE);
+@@ -194,6 +196,7 @@
+ sorted. */
+ break;
+ }
++#endif
+
+ /* One last chance: use the default replacement. */
+ if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0)
+Index: git/iconv/iconv_prog.c
+===================================================================
+--- git.orig/iconv/iconv_prog.c 2014-08-29 20:00:46.612070587 -0700
++++ git/iconv/iconv_prog.c 2014-08-29 20:01:15.196070587 -0700
+@@ -35,6 +35,7 @@
+ #ifdef _POSIX_MAPPED_FILES
+ # include <sys/mman.h>
+ #endif
++#include <gnu/option-groups.h>
+ #include <charmap.h>
+ #include <gconv_int.h>
+ #include "iconv_prog.h"
+@@ -221,10 +222,17 @@
+ bool to_wrong =
+ (iconv_open (to_code, "UTF-8") == (iconv_t) -1
+ && errno == EINVAL);
++#if __OPTION_EGLIBC_LOCALE_CODE
+ const char *from_pretty =
+ (from_code[0] ? from_code : nl_langinfo (CODESET));
+ const char *to_pretty =
+ (orig_to_code[0] ? orig_to_code : nl_langinfo (CODESET));
++#else
++ const char *from_pretty =
++ (from_code[0] ? from_code : "ANSI_X3.4-1968");
++ const char *to_pretty =
++ (orig_to_code[0] ? orig_to_code : "ANSI_X3.4-1968");
++#endif
+
+ if (from_wrong)
+ {
+Index: git/iconv/Makefile
+===================================================================
+--- git.orig/iconv/Makefile 2014-08-29 20:00:46.600070587 -0700
++++ git/iconv/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for iconv.
+ #
++include ../option-groups.mak
++
+ subdir := iconv
+
+ include ../Makeconfig
+@@ -57,6 +59,9 @@
+ CPPFLAGS-strtab = -DNOT_IN_libc
+ CPPFLAGS-charmap = -DNOT_IN_libc
+ CPPFLAGS-charmap-dir = -DNOT_IN_libc
++ifneq (y,$(OPTION_EGLIBC_SPAWN))
++CPPFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
++endif
+
+ ifeq ($(run-built-tests),yes)
+ xtests-special += $(objpfx)test-iconvconfig.out
+Index: git/iconvdata/Makefile
+===================================================================
+--- git.orig/iconvdata/Makefile 2014-08-29 20:00:46.628070587 -0700
++++ git/iconvdata/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,12 +18,15 @@
+ #
+ # Makefile for iconv data and code.
+ #
++include ../option-groups.mak
++
+ subdir := iconvdata
+
+ include ../Makeconfig
+
+ # Names of all the shared objects which implement the transformations.
+-modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
++modules-$(OPTION_EGLIBC_CHARSETS) \
++ := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
+ ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \
+ ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \
+ T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \
+@@ -63,11 +66,13 @@
+ MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \
+ CP770 CP771 CP772 CP773 CP774
+
+-modules.so := $(addsuffix .so, $(modules))
++modules.so := $(addsuffix .so, $(modules-y))
+
+ ifeq (yes,$(build-shared))
+ tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
+- tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9
++ tst-iconv6 bug-iconv5 bug-iconv8 bug-iconv9
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += bug-iconv6 tst-iconv7
++
+ ifeq ($(have-thread-library),yes)
+ tests += bug-iconv3
+ endif
+@@ -130,13 +135,13 @@
+ # Rule to generate the shared objects.
+ charmaps = ../localedata/charmaps
+ -include $(objpfx)iconv-rules
+-extra-modules-left := $(modules)
++extra-modules-left := $(modules-y)
+ include extra-module.mk
+
+
+ extra-objs += $(modules.so)
+-install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
+- $(inst_gconvdir)/gconv-modules
++install-others-y += $(addprefix $(inst_gconvdir)/, $(modules.so))
++install-others-$(OPTION_EGLIBC_CHARSETS) += $(inst_gconvdir)/gconv-modules
+
+ # We can build the conversion tables for numerous charsets automatically.
+
+@@ -204,7 +209,7 @@
+ ifndef avoid-generated
+ $(objpfx)iconv-rules: Makefile
+ $(make-target-directory)
+- { echo $(filter-out lib%, $(modules)); \
++ { echo $(filter-out lib%, $(modules-y)); \
+ echo 8bit $(gen-8bit-modules); \
+ echo 8bit-gap $(gen-8bit-gap-modules); } | \
+ LC_ALL=C \
+@@ -247,7 +252,7 @@
+ $(do-install-program)
+ $(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
+ $(do-install)
+-ifeq (no,$(cross-compiling))
++# eglibc: ifeq (no,$(cross-compiling))
+ # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
+ # if this libc has more gconv modules than the previously installed one.
+ if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
+@@ -256,9 +261,9 @@
+ $(common-objpfx)iconv/iconvconfig \
+ $(addprefix --prefix=,$(install_root)); \
+ fi
+-else
+- @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
+-endif
++# eglibc: else
++# eglibc: @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
++# eglibc: endif
+
+ endif # build-shared = yes
+
+Index: git/include/netdb.h
+===================================================================
+--- git.orig/include/netdb.h 2014-08-29 20:00:47.152070587 -0700
++++ git/include/netdb.h 2014-08-29 20:01:15.196070587 -0700
+@@ -232,6 +232,10 @@
+ (const char *name, int af, struct hostent *host, \
+ char *buffer, size_t buflen, int *errnop, \
+ int *h_errnop); \
++extern enum nss_status _nss_ ## service ## _gethostbyname3_r \
++ (const char *name, int af, struct hostent *result, \
++ char *buffer, size_t buflen, int *errnop, \
++ int *h_errnop, int32_t *ttlp, char **canonp); \
+ extern enum nss_status _nss_ ## service ## _gethostbyname_r \
+ (const char *name, struct hostent *host, char *buffer, \
+ size_t buflen, int *errnop, int *h_errnop); \
+Index: git/inet/Makefile
+===================================================================
+--- git.orig/inet/Makefile 2014-08-29 20:00:47.176070587 -0700
++++ git/inet/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for inet portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := inet
+
+ include ../Makeconfig
+@@ -27,7 +29,8 @@
+ netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
+ aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h
+
+-routines := htonl htons \
++routines-$(OPTION_EGLIBC_INET) \
++ += htonl htons \
+ inet_lnaof inet_mkadr \
+ inet_netof inet_ntoa inet_net herrno herrno-loc \
+ gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
+@@ -41,18 +44,23 @@
+ getrpcent_r getrpcbyname_r getrpcbynumber_r \
+ ether_aton ether_aton_r ether_hton ether_line \
+ ether_ntoa ether_ntoa_r ether_ntoh \
+- rcmd rexec ruserpass \
+ getnetgrent_r getnetgrent \
+- getaliasent_r getaliasent getaliasname getaliasname_r \
+- in6_addr getnameinfo if_index ifaddrs inet6_option \
++ in6_addr getnameinfo if_index ifaddrs \
+ getipv4sourcefilter setipv4sourcefilter \
+- getsourcefilter setsourcefilter inet6_opt inet6_rth
++ getsourcefilter setsourcefilter
++routines-$(OPTION_EGLIBC_RCMD) \
++ += rcmd rexec ruserpass
++routines-$(OPTION_EGLIBC_DB_ALIASES) \
++ += getaliasent_r getaliasent getaliasname getaliasname_r
++routines-$(OPTION_EGLIBC_ADVANCED_INET6) \
++ += inet6_option inet6_opt inet6_rth
+
+-aux := check_pf check_native ifreq
++aux-$(OPTION_EGLIBC_INET) += check_pf check_native ifreq
+
+ tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
+- tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
++ tst-gethnm test-ifaddrs bug-if1 tst-ether_line \
+ tst-getni1 tst-getni2 tst-inet6_rth tst-checks
++tests-$(OPTION_EGLIBC_ADVANCED_INET6) += test-inet6_opt
+
+ include ../Rules
+
+Index: git/intl/dcigettext.c
+===================================================================
+--- git.orig/intl/dcigettext.c 2014-08-29 20:00:47.224070587 -0700
++++ git/intl/dcigettext.c 2014-08-29 20:01:15.200070587 -0700
+@@ -77,6 +77,10 @@
+ #endif
+ #include "hash-string.h"
+
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ /* Thread safetyness. */
+ #ifdef _LIBC
+ # include <bits/libc-lock.h>
+@@ -449,9 +453,11 @@
+ #endif
+
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
+ __libc_rwlock_rdlock (__libc_setlocale_lock);
+ #endif
++#endif
+
+ __libc_rwlock_rdlock (_nl_state_lock);
+
+@@ -470,7 +476,11 @@
+ search.category = category;
+ # ifdef HAVE_PER_THREAD_LOCALE
+ # ifdef _LIBC
++# if __OPTION_EGLIBC_LOCALE_CODE
+ localename = strdupa (__current_locale_name (category));
++# else
++ localename = "C";
++# endif
+ # endif
+ search.localename = localename;
+ # endif
+@@ -494,7 +504,9 @@
+ retval = (char *) (*foundp)->translation;
+
+ # ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ # endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+@@ -611,7 +623,9 @@
+ {
+ no_translation:
+ FREE_BLOCKS (block_list);
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ __set_errno (saved_errno);
+ return (plural == 0
+@@ -730,7 +744,9 @@
+ if (plural)
+ retval = plural_lookup (domain, n, retval, retlen);
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+@@ -1361,7 +1377,11 @@
+ `LC_xxx', and `LANG'. On some systems this can be done by the
+ `setlocale' function itself. */
+ #ifdef _LIBC
++# if __OPTION_EGLIBC_LOCALE_CODE
+ retval = __current_locale_name (category);
++# else
++ retval = "C";
++# endif
+ #else
+ retval = _nl_locale_name (category, categoryname);
+ #endif
+Index: git/intl/Makefile
+===================================================================
+--- git.orig/intl/Makefile 2014-08-29 20:00:47.220070587 -0700
++++ git/intl/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -16,6 +16,7 @@
+ # <http://www.gnu.org/licenses/>.
+
+ # Makefile for intl subdirectory: message handling code from GNU gettext.
++include ../option-groups.mak
+
+ subdir = intl
+
+@@ -48,7 +49,7 @@
+ $(objpfx)plural.o: plural.c
+
+ ifeq ($(run-built-tests),yes)
+-ifeq (yes,$(build-shared))
++ifeq (yyyes,$(OPTION_EGLIBC_LOCALES)$(OPTION_EGLIBC_LOCALE_CODE)$(build-shared))
+ ifneq ($(strip $(MSGFMT)),:)
+ tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.out \
+ $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \
+Index: git/io/Makefile
+===================================================================
+--- git.orig/io/Makefile 2014-08-29 20:00:47.244070587 -0700
++++ git/io/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for I/O portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := io
+
+ include ../Makeconfig
+@@ -36,7 +38,7 @@
+ fxstatat fxstatat64 \
+ statfs fstatfs statfs64 fstatfs64 \
+ statvfs fstatvfs statvfs64 fstatvfs64 \
+- umask chmod fchmod lchmod fchmodat \
++ umask chmod fchmod fchmodat \
+ mkdir mkdirat \
+ open open_2 open64 open64_2 openat openat_2 openat64 openat64_2 \
+ read write lseek lseek64 access euidaccess faccessat \
+@@ -49,11 +51,13 @@
+ ttyname ttyname_r isatty \
+ link linkat symlink symlinkat readlink readlinkat \
+ unlink unlinkat rmdir \
+- ftw ftw64 fts poll ppoll \
++ poll ppoll \
+ posix_fadvise posix_fadvise64 \
+ posix_fallocate posix_fallocate64 \
+ sendfile sendfile64 \
+ utimensat futimens
++routines-$(OPTION_EGLIBC_BSD) += lchmod
++routines-$(OPTION_EGLIBC_FTRAVERSE) += ftw ftw64 fts
+
+ aux := have_o_cloexec
+
+@@ -64,18 +68,22 @@
+ fstatat fstatat64 mknod mknodat
+
+ others := pwd
+-test-srcs := ftwtest
++test-srcs-$(OPTION_EGLIBC_FTRAVERSE) := ftwtest
+ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
+- tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
++ tst-fcntl tst-statvfs \
+ tst-openat tst-unlinkat tst-fstatat tst-futimesat \
+ tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
+ tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
+- tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
++ tst-mknodat tst-mkfifoat tst-ttyname_r \
+ tst-posix_fallocate
++tests-$(OPTION_EGLIBC_FTRAVERSE) += bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 \
++ bug-ftw5
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_EGLIBC_FTRAVERSE))
+ tests-special += $(objpfx)ftwtest.out
+ endif
++endif
+
+ include ../Rules
+
+Index: git/libidn/Makefile
+===================================================================
+--- git.orig/libidn/Makefile 2014-08-29 20:00:47.316070587 -0700
++++ git/libidn/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -16,6 +16,7 @@
+ # <http://www.gnu.org/licenses/>.
+
+ # Makefile for libidn subdirectory of GNU C Library.
++include ../option-groups.mak
+
+ subdir := libidn
+
+@@ -23,8 +24,8 @@
+
+ routines = idn-stub
+
+-extra-libs = libcidn
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_IDN) = libcidn
++extra-libs-others-y = $(extra-libs-y)
+
+ libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \
+ iconvme
+Index: git/libidn/toutf8.c
+===================================================================
+--- git.orig/libidn/toutf8.c 2014-08-29 20:00:47.332070587 -0700
++++ git/libidn/toutf8.c 2014-08-29 20:01:15.200070587 -0700
+@@ -33,6 +33,11 @@
+ /* Get strlen. */
+ #include <string.h>
+
++/* Get __OPTION_EGLIBC_LOCALE_CODE. */
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ /* Get iconv_string. */
+ #include "iconvme.h"
+
+@@ -47,7 +52,11 @@
+ #endif
+
+ #ifdef _LIBC
+-# define stringprep_locale_charset() nl_langinfo (CODESET)
++# if __OPTION_EGLIBC_LOCALE_CODE
++# define stringprep_locale_charset() nl_langinfo (CODESET)
++# else
++# define stringprep_locale_charset() "ANSI_X3.4-1968"
++# endif
+ #else
+ /**
+ * stringprep_locale_charset - return charset used in current locale
+Index: git/libio/fileops.c
+===================================================================
+--- git.orig/libio/fileops.c 2014-08-29 20:00:47.352070587 -0700
++++ git/libio/fileops.c 2014-08-29 20:01:15.200070587 -0700
+@@ -38,6 +38,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <gnu/option-groups.h>
+ #include <stdlib.h>
+ #if _LIBC
+ # include "../wcsmbs/wcsmbsload.h"
+@@ -174,7 +175,7 @@
+
+ /* Free buffer. */
+ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+- if (fp->_mode > 0)
++ if (_IO_is_wide (fp))
+ {
+ if (_IO_have_wbackup (fp))
+ _IO_free_wbackup_area (fp);
+@@ -359,6 +360,7 @@
+ cs = strstr (last_recognized + 1, ",ccs=");
+ if (cs != NULL)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ /* Yep. Load the appropriate conversions and set the orientation
+ to wide. */
+ struct gconv_fcts fcts;
+@@ -423,6 +425,12 @@
+
+ /* Set the mode now. */
+ result->_mode = 1;
++#else
++ /* Treat this as if we couldn't find the given character set. */
++ (void) _IO_file_close_it (fp);
++ __set_errno (EINVAL);
++ return NULL;
++#endif
+ }
+ }
+
+Index: git/libio/__fpurge.c
+===================================================================
+--- git.orig/libio/__fpurge.c 2014-08-29 20:00:47.336070587 -0700
++++ git/libio/__fpurge.c 2014-08-29 20:01:15.200070587 -0700
+@@ -21,7 +21,7 @@
+ void
+ __fpurge (FILE *fp)
+ {
+- if (fp->_mode > 0)
++ if (_IO_is_wide (fp))
+ {
+ /* Wide-char stream. */
+ if (_IO_in_backup (fp))
+Index: git/libio/iofwide.c
+===================================================================
+--- git.orig/libio/iofwide.c 2014-08-29 20:00:47.360070587 -0700
++++ git/libio/iofwide.c 2014-08-29 20:01:15.200070587 -0700
+@@ -26,6 +26,7 @@
+
+ #include <libioP.h>
+ #ifdef _LIBC
++# include <gnu/option-groups.h>
+ # include <dlfcn.h>
+ # include <wchar.h>
+ #endif
+@@ -43,6 +44,8 @@
+ #endif
+
+
++#if ! defined _LIBC || __OPTION_POSIX_C_LANG_WIDE_CHAR
++
+ /* Prototypes of libio's codecvt functions. */
+ static enum __codecvt_result do_out (struct _IO_codecvt *codecvt,
+ __mbstate_t *statep,
+@@ -513,3 +516,26 @@
+ return MB_CUR_MAX;
+ #endif
+ }
++
++#else
++/* OPTION_POSIX_C_LANG_WIDE_CHAR is disabled. */
++
++#undef _IO_fwide
++int
++_IO_fwide (fp, mode)
++ _IO_FILE *fp;
++ int mode;
++{
++ /* Die helpfully if the user tries to create a wide stream; I
++ disbelieve that most users check the return value from
++ 'fwide (fp, 1)'. */
++ assert (mode <= 0);
++
++ /* We can only make streams byte-oriented, which is trivial. */
++ if (mode < 0)
++ fp->_mode = -1;
++
++ return fp->_mode;
++}
++
++#endif
+Index: git/libio/ioseekoff.c
+===================================================================
+--- git.orig/libio/ioseekoff.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/ioseekoff.c 2014-08-29 20:01:15.200070587 -0700
+@@ -60,7 +60,7 @@
+ else
+ abort ();
+ }
+- if (_IO_fwide (fp, 0) < 0)
++ if (! _IO_is_wide (fp))
+ _IO_free_backup_area (fp);
+ else
+ _IO_free_wbackup_area (fp);
+Index: git/libio/ioseekpos.c
+===================================================================
+--- git.orig/libio/ioseekpos.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/ioseekpos.c 2014-08-29 20:01:15.200070587 -0700
+@@ -35,7 +35,7 @@
+ /* If we have a backup buffer, get rid of it, since the __seekoff
+ callback may not know to do the right thing about it.
+ This may be over-kill, but it'll do for now. TODO */
+- if (_IO_fwide (fp, 0) <= 0)
++ if (! _IO_is_wide (fp))
+ {
+ if (_IO_have_backup (fp))
+ _IO_free_backup_area (fp);
+Index: git/libio/iosetbuffer.c
+===================================================================
+--- git.orig/libio/iosetbuffer.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/iosetbuffer.c 2014-08-29 20:01:15.204070587 -0700
+@@ -24,6 +24,8 @@
+ This exception applies to code released by its copyright holders
+ in files containing the exception. */
+
++#include <gnu/option-groups.h>
++
+ #include "libioP.h"
+
+ void
+@@ -38,9 +40,11 @@
+ if (!buf)
+ size = 0;
+ (void) _IO_SETBUF (fp, buf, size);
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (_IO_vtable_offset (fp) == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
+ /* We also have to set the buffer using the wide char function. */
+ (void) _IO_WSETBUF (fp, buf, size);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+ _IO_release_lock (fp);
+ }
+ libc_hidden_def (_IO_setbuffer)
+Index: git/libio/libioP.h
+===================================================================
+--- git.orig/libio/libioP.h 2014-08-29 20:00:47.372070587 -0700
++++ git/libio/libioP.h 2014-08-29 20:01:15.204070587 -0700
+@@ -42,6 +42,10 @@
+ /*# include <comthread.h>*/
+ #endif
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #include <math_ldbl_opt.h>
+
+ #include "iolibio.h"
+@@ -508,8 +512,20 @@
+
+
+ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
++
++/* _IO_is_wide (fp) is roughly equivalent to '_IO_fwide (fp, 0) > 0',
++ except that when OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, it
++ expands to a constant, allowing the compiler to realize that it can
++ eliminate code that references wide stream handling functions.
++ This, in turn, allows us to omit them. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define _IO_is_wide(_f) ((_f)->_mode > 0)
++#else
++# define _IO_is_wide(_f) (0)
++#endif
++
+ # define _IO_do_flush(_f) \
+- ((_f)->_mode <= 0 \
++ (! _IO_is_wide (_f) \
+ ? _IO_do_write(_f, (_f)->_IO_write_base, \
+ (_f)->_IO_write_ptr-(_f)->_IO_write_base) \
+ : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \
+Index: git/libio/Makefile
+===================================================================
+--- git.orig/libio/Makefile 2014-08-29 20:00:47.332070587 -0700
++++ git/libio/Makefile 2014-08-29 20:01:15.204070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Specific makefile for libio.
+ #
++include ../option-groups.mak
++
+ subdir := libio
+
+ include ../Makeconfig
+@@ -27,16 +29,13 @@
+
+ routines := \
+ filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
+- iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
++ iofopncook iofputs iofread iofsetpos ioftell \
+ iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
+ ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
+ iovsprintf iovsscanf \
+ iofgetpos64 iofopen64 iofsetpos64 \
+- fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
+- iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \
+- putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \
+- wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \
+- wstrops wfileops iofwide fwide wmemstream \
++ putchar putchar_u \
++ iofwide \
+ \
+ clearerr feof ferror fileno fputc freopen fseek getc getchar \
+ memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
+@@ -47,25 +46,48 @@
+ __fpurge __fpending __fsetlocking \
+ \
+ libc_fatal fmemopen
+-
+-tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
+- tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
+- tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
+- tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
+- tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
+- tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
+- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
+- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
+- tst-memstream1 tst-memstream2 \
+- tst-wmemstream1 tst-wmemstream2 \
+- bug-memstream1 bug-wmemstream1 \
+- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
+- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \
+- tst-ftell-append
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ wfiledoalloc \
++ iowpadn \
++ swprintf \
++ vswprintf iovswscanf swscanf wgenops \
++ wstrops wfileops wmemstream
++routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ wdummyfileops
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \
++ fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
++ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \
++ putwchar putwchar_u fwprintf vwprintf \
++ wprintf wscanf fwscanf vwscanf \
++ fwide
++
++tests = test-fmemopen tst-ext tst-ext2 \
++ tst-mmap-setvbuf tst-atime tst-eof \
++ tst-freopen bug-ungetc bug-fseek \
++ tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
++ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \
++ bug-ungetc2 bug-ungetc3 bug-ungetc4 \
++ tst-memstream1 tst-memstream2 \
++ bug-memstream1 tst-popen1 tst-fwrite-error \
++ tst-ftell-active-handler tst-ftell-append
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-swscanf tst-fgetws tst-setvbuf1 \
++ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \
++ tst-widetext
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += bug-rewind bug-rewind2 bug-ungetwc1 \
++ bug-wfflush bug-wmemstream1 tst-fopenloc2 \
++ tst_getwc \
++ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \
++ tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += tst_swprintf tst_swscanf \
++ tst-sscanf \
++ tst-wmemstream1 tst-wmemstream2
+ ifeq (yes,$(build-shared))
+ # Add test-fopenloc only if shared library is enabled since it depends on
+ # shared localedata objects.
+-tests += tst-fopenloc
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-fopenloc
+ endif
+ test-srcs = test-freopen
+
+@@ -164,13 +186,17 @@
+ oldiofsetpos64
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests-special += $(objpfx)test-freopen.out
++endif
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ ifeq (yes,$(build-shared))
+ # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
+ # library is enabled since they depend on tst-fopenloc.out.
+ tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out
+ endif
+ endif
++endif
+
+ include ../Rules
+
+Index: git/libio/wdummyfileops.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/libio/wdummyfileops.c 2014-08-29 20:01:15.204070587 -0700
+@@ -0,0 +1,161 @@
++/* Copyright (C) 2007 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA.
++
++ As a special exception, if you link the code in this file with
++ files compiled with a GNU compiler to produce an executable,
++ that does not cause the resulting executable to be covered by
++ the GNU Lesser General Public License. This exception does not
++ however invalidate any other reasons why the executable file
++ might be covered by the GNU Lesser General Public License.
++ This exception applies to code released by its copyright holders
++ in files containing the exception. */
++
++#include <assert.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <libioP.h>
++
++static void __THROW __attribute__ ((__noreturn__))
++_IO_wfile_wide_char_support_disabled (void)
++{
++ static const char errstr[]
++ = ("The application tried to use wide character I/O, but libc.so"
++ " was compiled\n"
++ "with the OPTION_POSIX_C_LANG_WIDE_CHAR option group disabled.\n");
++ __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
++ abort ();
++}
++
++static void
++_IO_wfile_disabled_void_int (_IO_FILE *fp, int x)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_int_int (_IO_FILE *fp, int x)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_int_none (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_size_t
++_IO_wfile_disabled_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_size_t
++_IO_wfile_disabled_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seekoff (_IO_FILE *fp, _IO_off64_t off, int dir, int mode)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seekpos (_IO_FILE *fp, _IO_off64_t pos, int flags)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_FILE *
++_IO_wfile_disabled_setbuf (_IO_FILE *fp, char *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_ssize_t
++_IO_wfile_disabled_read (_IO_FILE *fp, void *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_ssize_t
++_IO_wfile_disabled_write (_IO_FILE *fp, const void *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seek (_IO_FILE *fp, _IO_off64_t offset, int mode)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_close (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_stat (_IO_FILE *fp, void *buf)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_showmanyc (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static void
++_IO_wfile_disabled_imbue (_IO_FILE *fp, void *locale)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static const struct _IO_jump_t _IO_wfile_jumps_disabled =
++{
++ JUMP_INIT_DUMMY,
++ JUMP_INIT(finish, _IO_wfile_disabled_void_int),
++ JUMP_INIT(overflow, _IO_wfile_disabled_int_int),
++ JUMP_INIT(underflow, _IO_wfile_disabled_int_none),
++ JUMP_INIT(uflow, _IO_wfile_disabled_int_none),
++ JUMP_INIT(pbackfail, _IO_wfile_disabled_int_int),
++ JUMP_INIT(xsputn, _IO_wfile_disabled_xsputn),
++ JUMP_INIT(xsgetn, _IO_wfile_disabled_xsgetn),
++ JUMP_INIT(seekoff, _IO_wfile_disabled_seekoff),
++ JUMP_INIT(seekpos, _IO_wfile_disabled_seekpos),
++ JUMP_INIT(setbuf, _IO_wfile_disabled_setbuf),
++ JUMP_INIT(sync, _IO_wfile_disabled_int_none),
++ JUMP_INIT(doallocate, _IO_wfile_disabled_int_none),
++ JUMP_INIT(read, _IO_wfile_disabled_read),
++ JUMP_INIT(write, _IO_wfile_disabled_write),
++ JUMP_INIT(seek, _IO_wfile_disabled_seek),
++ JUMP_INIT(close, _IO_wfile_disabled_close),
++ JUMP_INIT(stat, _IO_wfile_disabled_stat),
++ JUMP_INIT(showmanyc, _IO_wfile_disabled_showmanyc),
++ JUMP_INIT(imbue, _IO_wfile_disabled_imbue)
++};
++
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps)
++libc_hidden_data_def (_IO_wfile_jumps)
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_mmap)
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap)
+Index: git/locale/catnames.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/locale/catnames.c 2014-08-29 20:01:15.204070587 -0700
+@@ -0,0 +1,48 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "localeinfo.h"
++
++/* Define an array of category names (also the environment variable names). */
++const union catnamestr_t _nl_category_names attribute_hidden =
++ {
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ category_name,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ }
++ };
++
++const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ };
++
++/* An array of their lengths, for convenience. */
++const uint8_t _nl_category_name_sizes[] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = sizeof (category_name) - 1,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ [LC_ALL] = sizeof ("LC_ALL") - 1
++ };
+Index: git/locale/C-ctype.c
+===================================================================
+--- git.orig/locale/C-ctype.c 2014-08-29 20:00:47.396070587 -0700
++++ git/locale/C-ctype.c 2014-08-29 20:01:15.204070587 -0700
+@@ -19,8 +19,11 @@
+ #include "localeinfo.h"
+ #include <endian.h>
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ #include "C-translit.h"
++#endif
+
+ /* This table's entries are taken from POSIX.2 Table 2-6
+ ``LC_CTYPE Category Definition in the POSIX Locale''.
+@@ -647,6 +650,7 @@
+ { .word = L'7' },
+ { .word = L'8' },
+ { .word = L'9' },
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
+ { .word = NTRANSLIT },
+ /* _NL_CTYPE_TRANSLIT_FROM_IDX */
+@@ -657,6 +661,22 @@
+ { .wstr = translit_to_idx },
+ /* _NL_CTYPE_TRANSLIT_TO_TBL */
+ { .wstr = (uint32_t *) translit_to_tbl },
++#else
++ /* If the locale code isn't enabled, we don't have the
++ transliteration code in iconv/gconv_trans.c anyway, so there's
++ no need for the transliteration tables here. We'll fall back
++ on the default missing replacement, '?'. */
++ /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
++ { .word = 0 },
++ /* _NL_CTYPE_TRANSLIT_FROM_IDX */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_FROM_TBL */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_TO_IDX */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_TO_TBL */
++ { .wstr = NULL },
++#endif
+ /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */
+ { .word = 1 },
+ /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */
+Index: git/locale/dummy-setlocale.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/locale/dummy-setlocale.c 2014-08-29 20:01:15.204070587 -0700
+@@ -0,0 +1,33 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <string.h>
++#include <locale.h>
++
++char *
++setlocale (int category, const char *locale)
++{
++ if (! locale
++ || locale[0] == '\0'
++ || strcmp (locale, "C") == 0
++ || strcmp (locale, "POSIX") == 0)
++ return (char *) "C";
++ else
++ return NULL;
++}
++libc_hidden_def (setlocale)
+Index: git/locale/localeinfo.h
+===================================================================
+--- git.orig/locale/localeinfo.h 2014-08-29 20:00:47.404070587 -0700
++++ git/locale/localeinfo.h 2014-08-29 20:01:15.204070587 -0700
+@@ -224,7 +224,7 @@
+ unused. We can manage this playing some tricks with weak references.
+ But with thread-local locale settings, it becomes quite ungainly unless
+ we can use __thread variables. So only in that case do we attempt this. */
+-#ifndef SHARED
++#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
+ # include <tls.h>
+ # define NL_CURRENT_INDIRECT 1
+ #endif
+Index: git/locale/Makefile
+===================================================================
+--- git.orig/locale/Makefile 2014-08-29 20:00:47.400070587 -0700
++++ git/locale/Makefile 2014-08-29 20:01:15.204070587 -0700
+@@ -18,27 +18,43 @@
+ #
+ # Makefile for locales.
+ #
++include ../option-groups.mak
++
+ subdir := locale
+
+ include ../Makeconfig
+
+ headers = locale.h bits/locale.h langinfo.h xlocale.h
+-routines = setlocale findlocale loadlocale loadarchive \
+- localeconv nl_langinfo nl_langinfo_l mb_cur_max \
+- newlocale duplocale freelocale uselocale
+-tests = tst-C-locale tst-locname tst-duplocale
++# catnames is needed by OPTION_EGLIBC_LOCALE_CODE and by the 'intl' code.
++# If we put the latter in an option group, too, we can omit catnames
++# when both option groups are disabled. libstdc++-v3 needs mb_cur_max.
++routines-y := catnames mb_cur_max
++routines-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += setlocale findlocale loadlocale loadarchive \
++ localeconv nl_langinfo nl_langinfo_l \
++ newlocale duplocale freelocale uselocale
++ifneq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++routines-y += dummy-setlocale
++endif
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-C-locale tst-locname tst-duplocale
+ categories = ctype messages monetary numeric time paper name \
+ address telephone measurement identification collate
+-aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
+- xlocale localename global-locale coll-lookup
+-others = localedef locale
++# C-messages belongs in an intl option group.
++aux-y := C-ctype C-time \
++ SYS_libc C_name xlocale global-locale coll-lookup
++aux-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += $(filter-out $(aux-y), \
++ $(categories:%=lc-%) $(categories:%=C-%)) \
++ localename
++others-$(OPTION_EGLIBC_LOCALE_CODE) = localedef locale
+ #others-static = localedef locale
+-install-bin = localedef locale
+-extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
++install-bin = $(others-y)
++extra-objs-$(OPTION_EGLIBC_LOCALE_CODE) \
++ = $(localedef-modules:=.o) $(localedef-aux:=.o) \
+ $(locale-modules:=.o) $(lib-modules:=.o)
+
+-extra-libs = libBrokenLocale
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_LOCALE_CODE) = libBrokenLocale
++extra-libs-others = $(extra-libs-y)
+
+ libBrokenLocale-routines = broken_cur_max
+
+@@ -94,6 +110,9 @@
+ CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
+ CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
+ CFLAGS-charmap-dir.c = -Wno-write-strings
++ifneq (y,$(OPTION_EGLIBC_SPAWN))
++CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
++endif
+
+ # This makes sure -DNOT_IN_libc et al are passed for all these modules.
+ cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
+Index: git/locale/programs/charmap-dir.c
+===================================================================
+--- git.orig/locale/programs/charmap-dir.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/charmap-dir.c 2014-08-29 20:01:15.204070587 -0700
+@@ -19,7 +19,9 @@
+ #include <error.h>
+ #include <fcntl.h>
+ #include <libintl.h>
++#ifndef NO_UNCOMPRESS
+ #include <spawn.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -156,6 +158,7 @@
+ return closedir (dir);
+ }
+
++#ifndef NO_UNCOMPRESS
+ /* Creates a subprocess decompressing the given pathname, and returns
+ a stream reading its output (the decompressed data). */
+ static
+@@ -204,6 +207,7 @@
+ }
+ return NULL;
+ }
++#endif
+
+ /* Opens a charmap for reading, given its name (not an alias name). */
+ FILE *
+@@ -226,6 +230,7 @@
+ if (stream != NULL)
+ return stream;
+
++#ifndef NO_UNCOMPRESS
+ memcpy (p, ".gz", 4);
+ stream = fopen_uncompressed (pathname, "gzip");
+ if (stream != NULL)
+@@ -235,6 +240,7 @@
+ stream = fopen_uncompressed (pathname, "bzip2");
+ if (stream != NULL)
+ return stream;
++#endif
+
+ return NULL;
+ }
+@@ -263,8 +269,8 @@
+ char *alias = NULL;
+ char junk[BUFSIZ];
+
+- if (fscanf (stream, " <code_set_name> %ms", &alias) == 1
+- || fscanf (stream, "%% alias %ms", &alias) == 1)
++ if (fscanf (stream, " <code_set_name> %as", &alias) == 1
++ || fscanf (stream, "%% alias %as", &alias) == 1)
+ {
+ aliases = (char **) xrealloc (aliases,
+ (naliases + 2) * sizeof (char *));
+Index: git/locale/programs/ld-collate.c
+===================================================================
+--- git.orig/locale/programs/ld-collate.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/ld-collate.c 2014-08-29 20:01:15.208070587 -0700
+@@ -350,7 +350,7 @@
+ }
+ if (wcs != NULL)
+ {
+- size_t nwcs = wcslen ((wchar_t *) wcs);
++ size_t nwcs = wcslen_uint32 (wcs);
+ uint32_t zero = 0;
+ /* Handle <U0000> as a single character. */
+ if (nwcs == 0)
+@@ -1776,8 +1776,7 @@
+
+ if ((*eptr)->nwcs == runp->nwcs)
+ {
+- int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
+- (wchar_t *) runp->wcs, runp->nwcs);
++ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
+
+ if (c == 0)
+ {
+@@ -2010,9 +2009,9 @@
+ one consecutive entry. */
+ if (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1))
+ {
+@@ -2036,9 +2035,9 @@
+ runp = runp->wcnext;
+ while (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+
+Index: git/locale/programs/ld-ctype.c
+===================================================================
+--- git.orig/locale/programs/ld-ctype.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/ld-ctype.c 2014-08-29 20:01:15.208070587 -0700
+@@ -957,7 +957,7 @@
+ allocate_arrays (ctype, charmap, ctype->repertoire);
+
+ default_missing_len = (ctype->default_missing
+- ? wcslen ((wchar_t *) ctype->default_missing)
++ ? wcslen_uint32 (ctype->default_missing)
+ : 0);
+
+ init_locale_data (&file, nelems);
+@@ -1968,7 +1968,7 @@
+ ignore = 1;
+ else
+ /* This value is usable. */
+- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
++ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
+
+ first = 0;
+ }
+@@ -2516,8 +2516,8 @@
+ }
+
+ handle_tok_digit:
+- class_bit = _ISwdigit;
+- class256_bit = _ISdigit;
++ class_bit = BITw (tok_digit);
++ class256_bit = BIT (tok_digit);
+ handle_digits = 1;
+ goto read_charclass;
+
+@@ -4001,8 +4001,7 @@
+
+ while (idx < number)
+ {
+- int res = wcscmp ((const wchar_t *) sorted[idx]->from,
+- (const wchar_t *) runp->from);
++ int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
+ if (res == 0)
+ {
+ replace = 1;
+@@ -4039,11 +4038,11 @@
+ for (cnt = 0; cnt < number; ++cnt)
+ {
+ struct translit_to_t *srunp;
+- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
++ from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- to_len += wcslen ((const wchar_t *) srunp->str) + 1;
++ to_len += wcslen_uint32 (srunp->str) + 1;
+ srunp = srunp->next;
+ }
+ /* Plus one for the extra NUL character marking the end of
+@@ -4067,18 +4066,18 @@
+ ctype->translit_from_idx[cnt] = from_len;
+ ctype->translit_to_idx[cnt] = to_len;
+
+- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
+- (const wchar_t *) sorted[cnt]->from, len);
++ len = wcslen_uint32 (sorted[cnt]->from) + 1;
++ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
++ sorted[cnt]->from, len);
+ from_len += len;
+
+ ctype->translit_to_idx[cnt] = to_len;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- len = wcslen ((const wchar_t *) srunp->str) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
+- (const wchar_t *) srunp->str, len);
++ len = wcslen_uint32 (srunp->str) + 1;
++ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
++ srunp->str, len);
+ to_len += len;
+ srunp = srunp->next;
+ }
+Index: git/locale/programs/ld-messages.c
+===================================================================
+--- git.orig/locale/programs/ld-messages.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/ld-messages.c 2014-08-29 20:01:15.208070587 -0700
+@@ -25,6 +25,7 @@
+ #include <string.h>
+ #include <stdint.h>
+ #include <sys/uio.h>
++#include <gnu/option-groups.h>
+
+ #include <assert.h>
+
+@@ -124,6 +125,7 @@
+ }
+ else
+ {
++#if __OPTION_POSIX_REGEXP
+ int result;
+ regex_t re;
+
+@@ -140,6 +142,7 @@
+ }
+ else if (result != 0)
+ regfree (&re);
++#endif
+ }
+
+ if (messages->noexpr == NULL)
+@@ -158,6 +161,7 @@
+ }
+ else
+ {
++#if __OPTION_POSIX_REGEXP
+ int result;
+ regex_t re;
+
+@@ -174,6 +178,7 @@
+ }
+ else if (result != 0)
+ regfree (&re);
++#endif
+ }
+ }
+
+Index: git/locale/programs/ld-time.c
+===================================================================
+--- git.orig/locale/programs/ld-time.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/ld-time.c 2014-08-29 20:01:15.208070587 -0700
+@@ -215,8 +215,10 @@
+ }
+ else
+ {
++ static const uint32_t wt_fmt_ampm[]
++ = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
+ time->t_fmt_ampm = "%I:%M:%S %p";
+- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
++ time->wt_fmt_ampm = wt_fmt_ampm;
+ }
+ }
+
+@@ -226,7 +228,7 @@
+ const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
+ 31, 31, 30, 31 ,30, 31 };
+ size_t idx;
+- wchar_t *wstr;
++ uint32_t *wstr;
+
+ time->era_entries =
+ (struct era_data *) xmalloc (time->num_era
+@@ -464,18 +466,18 @@
+ }
+
+ /* Now generate the wide character name and format. */
+- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
++ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
+ if (wstr != NULL)
+ {
+- time->era_entries[idx].wname = (uint32_t *) wstr + 1;
+- wstr = wcschr (wstr + 1, L':'); /* end name */
++ time->era_entries[idx].wname = wstr + 1;
++ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
+ if (wstr != NULL)
+ {
+ *wstr = L'\0';
+- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
++ time->era_entries[idx].wformat = wstr + 1;
+ }
+ else
+ time->era_entries[idx].wname =
+@@ -530,7 +532,16 @@
+ if (time->date_fmt == NULL)
+ time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
+ if (time->wdate_fmt == NULL)
+- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
++ {
++ static const uint32_t wdate_fmt[] =
++ { '%','a',' ',
++ '%','b',' ',
++ '%','e',' ',
++ '%','H',':','%','M',':','%','S',' ',
++ '%','Z',' ',
++ '%','Y',0 };
++ time->wdate_fmt = wdate_fmt;
++ }
+ }
+
+
+Index: git/locale/programs/linereader.c
+===================================================================
+--- git.orig/locale/programs/linereader.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/linereader.c 2014-08-29 20:01:15.208070587 -0700
+@@ -595,7 +595,7 @@
+ {
+ int return_widestr = lr->return_widestr;
+ char *buf;
+- wchar_t *buf2 = NULL;
++ uint32_t *buf2 = NULL;
+ size_t bufact;
+ size_t bufmax = 56;
+
+Index: git/locale/programs/localedef.c
+===================================================================
+--- git.orig/locale/programs/localedef.c 2014-08-29 20:00:47.416070587 -0700
++++ git/locale/programs/localedef.c 2014-08-29 20:01:15.208070587 -0700
+@@ -114,6 +114,7 @@
+ #define OPT_LIST_ARCHIVE 309
+ #define OPT_LITTLE_ENDIAN 400
+ #define OPT_BIG_ENDIAN 401
++#define OPT_UINT32_ALIGN 402
+
+ /* Definitions of arguments for argp functions. */
+ static const struct argp_option options[] =
+@@ -150,6 +151,8 @@
+ N_("Generate little-endian output") },
+ { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
+ N_("Generate big-endian output") },
++ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
++ N_("Set the target's uint32_t alignment in bytes (default 4)") },
+ { NULL, 0, NULL, 0, NULL }
+ };
+
+@@ -239,12 +242,14 @@
+ ctype locale. (P1003.2 4.35.5.2) */
+ setlocale (LC_CTYPE, "POSIX");
+
++#ifndef NO_SYSCONF
+ /* Look whether the system really allows locale definitions. POSIX
+ defines error code 3 for this situation so I think it must be
+ a fatal error (see P1003.2 4.35.8). */
+ if (sysconf (_SC_2_LOCALEDEF) < 0)
+ WITH_CUR_LOCALE (error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'")));
++#endif
+
+ /* Process charmap file. */
+ charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
+@@ -338,6 +343,9 @@
+ case OPT_BIG_ENDIAN:
+ set_big_endian (true);
+ break;
++ case OPT_UINT32_ALIGN:
++ uint32_align_mask = strtol (arg, NULL, 0) - 1;
++ break;
+ case 'c':
+ force_output = 1;
+ break;
+Index: git/locale/programs/locfile.c
+===================================================================
+--- git.orig/locale/programs/locfile.c 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/programs/locfile.c 2014-08-29 20:01:15.208070587 -0700
+@@ -544,6 +544,9 @@
+ machine running localedef. */
+ bool swap_endianness_p;
+
++/* The target's value of __align__(uint32_t) - 1. */
++unsigned int uint32_align_mask = 3;
++
+ /* When called outside a start_locale_structure/end_locale_structure
+ or start_locale_prelude/end_locale_prelude block, record that the
+ next byte in FILE's obstack will be the first byte of a new element.
+@@ -621,7 +624,7 @@
+ void
+ add_locale_wstring (struct locale_file *file, const uint32_t *string)
+ {
+- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
++ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
+ }
+
+ /* Record that FILE's next element is the 32-bit integer VALUE. */
+Index: git/locale/programs/locfile.h
+===================================================================
+--- git.orig/locale/programs/locfile.h 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/programs/locfile.h 2014-08-29 20:01:15.208070587 -0700
+@@ -71,6 +71,8 @@
+
+ extern bool swap_endianness_p;
+
++extern unsigned int uint32_align_mask;
++
+ /* Change the output to be big-endian if BIG_ENDIAN is true and
+ little-endian otherwise. */
+ static inline void
+@@ -275,4 +277,49 @@
+ const struct charmap_t *charmap,
+ const char *output_path);
+
++static inline size_t
++wcslen_uint32 (const uint32_t *str)
++{
++ size_t len = 0;
++ while (str[len] != 0)
++ len++;
++ return len;
++}
++
++static inline int
++wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ while (n-- != 0)
++ {
++ int diff = *s1++ - *s2++;
++ if (diff != 0)
++ return diff;
++ }
++ return 0;
++}
++
++static inline int
++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
++{
++ while (*s1 != 0 && *s1 == *s2)
++ s1++, s2++;
++ return *s1 - *s2;
++}
++
++static inline uint32_t *
++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ return memcpy (s1, s2, n * sizeof (uint32_t));
++}
++
++static inline uint32_t *
++wcschr_uint32 (const uint32_t *s, uint32_t ch)
++{
++ do
++ if (*s == ch)
++ return (uint32_t *) s;
++ while (*s++ != 0);
++ return 0;
++}
++
+ #endif /* locfile.h */
+Index: git/locale/setlocale.c
+===================================================================
+--- git.orig/locale/setlocale.c 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/setlocale.c 2014-08-29 20:01:15.208070587 -0700
+@@ -64,36 +64,6 @@
+ #endif
+
+
+-/* Define an array of category names (also the environment variable names). */
+-const union catnamestr_t _nl_category_names attribute_hidden =
+- {
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- category_name,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- }
+- };
+-
+-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- };
+-
+-/* An array of their lengths, for convenience. */
+-const uint8_t _nl_category_name_sizes[] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = sizeof (category_name) - 1,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- [LC_ALL] = sizeof ("LC_ALL") - 1
+- };
+-
+-
+ #ifdef NL_CURRENT_INDIRECT
+ # define WEAK_POSTLOAD(postload) weak_extern (postload)
+ #else
+Index: git/locale/xlocale.c
+===================================================================
+--- git.orig/locale/xlocale.c 2014-08-29 20:00:47.436070587 -0700
++++ git/locale/xlocale.c 2014-08-29 20:01:15.208070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <locale.h>
++#include <gnu/option-groups.h>
+ #include "localeinfo.h"
+
+ #define DEFINE_CATEGORY(category, category_name, items, a) \
+@@ -25,6 +26,19 @@
+ #include "categories.def"
+ #undef DEFINE_CATEGORY
+
++/* If the locale support code isn't enabled, don't generate strong
++ reference to the C locale_data structures here; let the Makefile
++ decide which ones to include. (In the static linking case, the
++ strong reference to the 'class', 'toupper', and 'tolower' tables
++ will cause C-ctype.o to be brought in, as it should be, even when
++ the reference to _nl_C_LC_CTYPE will be weak.) */
++#if ! __OPTION_EGLIBC_LOCALE_CODE
++# define DEFINE_CATEGORY(category, category_name, items, a) \
++ weak_extern (_nl_C_##category)
++# include "categories.def"
++# undef DEFINE_CATEGORY
++#endif
++
+ /* Defined in locale/C-ctype.c. */
+ extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
+ extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
+@@ -52,3 +66,26 @@
+ .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128,
+ .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128
+ };
++
++
++#if ! __OPTION_EGLIBC_LOCALE_CODE
++/* When locale code is enabled, these are each defined in the
++ appropriate lc-CATEGORY.c file, so that static links (when __thread
++ is supported) bring in only those lc-CATEGORY.o files for
++ categories the program actually uses; look for NL_CURRENT_INDIRECT
++ in localeinfo.h.
++
++ When locale code is disabled, the _nl_C_CATEGORY objects are the
++ only possible referents. At the moment, there isn't a way to get
++ __OPTION_EGLIBC_LOCALE_CODE defined in every compilation unit that
++ #includes localeinfo.h, so we can't just turn off
++ NL_CURRENT_INDIRECT. So we'll define the _nl_current_CATEGORY
++ pointers here. */
++#if defined (NL_CURRENT_INDIRECT)
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ __thread struct __locale_data * const *_nl_current_##category \
++ attribute_hidden = &_nl_C_locobj.__locales[category];
++#include "categories.def"
++#undef DEFINE_CATEGORY
++#endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+Index: git/localedata/Makefile
+===================================================================
+--- git.orig/localedata/Makefile 2014-08-29 20:00:47.444070587 -0700
++++ git/localedata/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -21,12 +21,22 @@
+
+ include ../Makeconfig
+
+-# List with all available character set descriptions.
+-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
++include ../option-groups.mak
+
+ # List with all available character set descriptions.
+-locales := $(wildcard locales/*)
++all-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
++
++all-locales := $(wildcard locales/*)
+
++# If the EGLIBC_LOCALES option group is not enabled, trim the
++# list of charmap and locale source files.
++ifeq ($(OPTION_EGLIBC_LOCALES),y)
++charmaps := $(all-charmaps)
++locales := $(all-locales)
++else
++charmaps :=
++locales := locales/POSIX
++endif
+
+ subdir-dirs = tests-mbwc
+ vpath %.c tests-mbwc
+@@ -71,14 +81,20 @@
+ tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \
+ tst_wctype tst_wcwidth
+
+-tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
++# Since these tests build their own locale files, they're not
++# dependent on the OPTION_EGLIBC_LOCALES option group. But they do
++# need the locale functions to be present.
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
+ tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
+ tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
+ tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-setlocale3 \
+ tst-wctype
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ tests-static = bug-setlocale1-static
+ tests += $(tests-static)
+-ifeq (yes,$(build-shared))
++endif
++ifeq (yesy,$(build-shared)$(OPTION_EGLIBC_LOCALE_CODE))
+ ifneq (no,$(PERL))
+ tests-special += $(objpfx)mtrace-tst-leaks.out
+ endif
+@@ -92,12 +108,14 @@
+
+ tests: $(objdir)/iconvdata/gconv-modules
+
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \
+ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \
+ $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \
+ $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \
+ $(objpfx)tst-numeric.out
+ tests-static += tst-langinfo-static
++endif
+
+ ifeq ($(run-built-tests),yes)
+ # We have to generate locales
+@@ -213,6 +231,11 @@
+
+ include SUPPORTED
+
++# Only install locale data if OPTION_EGLIBC_LOCALES is selected.
++ifneq ($(OPTION_EGLIBC_LOCALES),y)
++SUPPORTED-LOCALES :=
++endif
++
+ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
+
+ # Sometimes the whole collection of locale files should be installed.
+Index: git/login/Makefile
+===================================================================
+--- git.orig/login/Makefile 2014-08-29 20:00:47.736070587 -0700
++++ git/login/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -18,6 +18,7 @@
+ #
+ # Sub-makefile for login portion of the library.
+ #
++include ../option-groups.mak
+
+ subdir := login
+
+@@ -25,14 +26,16 @@
+
+ headers := utmp.h bits/utmp.h lastlog.h pty.h
+
+-routines := getlogin getlogin_r setlogin getlogin_r_chk \
+- getutent getutent_r getutid getutline getutid_r getutline_r \
+- utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
+- ptsname_r_chk
++routines := getpt grantpt unlockpt ptsname ptsname_r_chk
++routines-$(OPTION_EGLIBC_UTMP) \
++ += getutent getutent_r getutid getutline getutid_r getutline_r \
++ utmp_file utmpname updwtmp
++routines-$(OPTION_EGLIBC_GETLOGIN) += getlogin getlogin_r getlogin_r_chk
++routines-$(OPTION_EGLIBC_BSD) += setlogin
+
+ CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
+
+-others = utmpdump
++others-$(OPTION_EGLIBC_UTMP) += utmpdump
+
+ ifeq (yes,$(build-pt-chown))
+ others += pt_chown
+@@ -46,8 +49,8 @@
+ tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname
+
+ # Build the -lutil library with these extra functions.
+-extra-libs := libutil
+-extra-libs-others := $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_UTMP) := libutil
++extra-libs-others := $(extra-libs-y)
+
+ libutil-routines:= login login_tty logout logwtmp openpty forkpty
+
+Index: git/Makeconfig
+===================================================================
+--- git.orig/Makeconfig 2014-08-29 20:00:42.956070587 -0700
++++ git/Makeconfig 2014-08-29 20:01:15.212070587 -0700
+@@ -582,7 +582,7 @@
+ # and run on the build system, causes that program with those
+ # arguments to be run on the host for which the library is built.
+ ifndef test-wrapper
+-test-wrapper =
++test-wrapper = $(cross-test-wrapper)
+ endif
+ # Likewise, but the name of the program is preceded by
+ # <variable>=<value> assignments for environment variables.
+@@ -1057,6 +1057,24 @@
+ libm = $(common-objpfx)math/libm.a
+ endif
+
++# Generate a header file that #defines preprocessor symbols indicating
++# which option groups are enabled. Note that the option-groups.config file
++# may not exist at all.
++before-compile += $(common-objpfx)gnu/option-groups.h
++common-generated += gnu/option-groups.h gnu/option-groups.stmp
++headers += gnu/option-groups.h
++$(common-objpfx)gnu/option-groups.h: $(common-objpfx)gnu/option-groups.stmp; @:
++$(common-objpfx)gnu/option-groups.stmp: \
++ $(..)scripts/option-groups.awk \
++ $(..)option-groups.defaults \
++ $(wildcard $(common-objpfx)option-groups.config)
++ $(make-target-directory)
++ @rm -f ${@:stmp=T} $@
++ LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
++ $(move-if-change) ${@:stmp=T} ${@:stmp=h}
++ touch $@
++
++
+ # These are the subdirectories containing the library source. The order
+ # is more or less arbitrary. The sorting step will take care of the
+ # dependencies.
+Index: git/Makerules
+===================================================================
+--- git.orig/Makerules 2014-08-29 20:00:42.960070587 -0700
++++ git/Makerules 2014-08-29 20:01:15.212070587 -0700
+@@ -379,6 +379,25 @@
+ endef
+ endif
+
++# Include targets in the selected option groups.
++aux += $(aux-y)
++extra-libs += $(extra-libs-y)
++extra-libs-others += $(extra-libs-others-y)
++extra-objs += $(extra-objs-y)
++install-bin += $(install-bin-y)
++install-others += $(install-others-y)
++install-sbin += $(install-sbin-y)
++modules += $(modules-y)
++others += $(others-y)
++others-pie += $(others-pie-y)
++routines += $(routines-y)
++static-only-routines += $(static-only-routines-y)
++sysdep_routines += $(sysdep_routines-y)
++test-srcs += $(test-srcs-y)
++tests += $(tests-y)
++xtests += $(xtests-y)
++
++
+ # Modify the list of routines we build for different targets
+
+ ifeq (yes,$(build-shared))
+Index: git/malloc/Makefile
+===================================================================
+--- git.orig/malloc/Makefile 2014-08-29 20:00:47.760070587 -0700
++++ git/malloc/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for malloc routines
+ #
++include ../option-groups.mak
++
+ subdir := malloc
+
+ include ../Makeconfig
+@@ -36,9 +38,15 @@
+ non-lib.a := libmcheck.a
+
+ # Additional library.
++ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
+ extra-libs = libmemusage
+ extra-libs-others = $(extra-libs)
+
++ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
++endif
++endif
++
+ libmemusage-routines = memusage
+ libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+@@ -67,7 +75,7 @@
+ # Unless we get a test for the availability of libgd which also works
+ # for cross-compiling we disable the memusagestat generation in this
+ # situation.
+-ifneq ($(cross-compiling),yes)
++ifeq ($(cross-compiling)$(OPTION_EGLIBC_MEMUSAGE),noy)
+ # If the gd library is available we build the `memusagestat' program.
+ ifneq ($(LIBGD),no)
+ others: $(objpfx)memusage
+Index: git/malloc/memusage.c
+===================================================================
+--- git.orig/malloc/memusage.c 2014-08-29 20:00:47.768070587 -0700
++++ git/malloc/memusage.c 2014-08-29 20:01:15.212070587 -0700
+@@ -33,6 +33,7 @@
+ #include <stdint.h>
+ #include <sys/mman.h>
+ #include <sys/time.h>
++#include <gnu/option-groups.h>
+
+ #include <memusage.h>
+
+@@ -93,7 +94,11 @@
+ #define peak_stack peak_use[1]
+ #define peak_total peak_use[2]
+
+-#define DEFAULT_BUFFER_SIZE 32768
++#ifndef __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++# define DEFAULT_BUFFER_SIZE 32768
++#else
++# define DEFAULT_BUFFER_SIZE __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++#endif
+ static size_t buffer_size;
+
+ static int fd = -1;
+Index: git/malloc/memusage.sh
+===================================================================
+--- git.orig/malloc/memusage.sh 2014-08-29 20:00:47.768070587 -0700
++++ git/malloc/memusage.sh 2014-08-29 20:01:15.212070587 -0700
+@@ -35,7 +35,7 @@
+
+ # Print help message
+ do_help() {
+- echo $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
++ printf $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
+ Profile memory usage of PROGRAM.
+
+ -n,--progname=NAME Name of the program file to profile
+Index: git/math/Makefile
+===================================================================
+--- git.orig/math/Makefile 2014-08-29 20:00:47.836070587 -0700
++++ git/math/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -21,6 +21,8 @@
+
+ include ../Makeconfig
+
++include ../option-groups.mak
++
+ # Installed header files.
+ headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
+ bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
+@@ -33,8 +35,8 @@
+
+ # Build the -lm library.
+
+-extra-libs := libm
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_LIBM) := libm
++extra-libs-others-$(OPTION_EGLIBC_LIBM) = $(extra-libs-$(OPTION_EGLIBC_LIBM))
+
+ libm-support = k_standard s_lib_version s_matherr s_signgam \
+ fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \
+Index: git/misc/err.c
+===================================================================
+--- git.orig/misc/err.c 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/err.c 2014-08-29 20:01:15.212070587 -0700
+@@ -22,6 +22,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <gnu/option-groups.h>
+
+ #include <wchar.h>
+ #define flockfile(s) _IO_flockfile (s)
+@@ -37,6 +38,7 @@
+ va_end (ap); \
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ static void
+ convert_and_print (const char *format, __gnuc_va_list ap)
+ {
+@@ -81,6 +83,7 @@
+
+ __vfwprintf (stderr, wformat, ap);
+ }
++#endif
+
+ void
+ vwarnx (const char *format, __gnuc_va_list ap)
+@@ -88,9 +91,13 @@
+ flockfile (stderr);
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ __fwprintf (stderr, L"%s: ", __progname);
+ convert_and_print (format, ap);
+ putwc_unlocked (L'\n', stderr);
++#else
++ abort ();
++#endif
+ }
+ else
+ {
+@@ -111,6 +118,7 @@
+ flockfile (stderr);
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ __fwprintf (stderr, L"%s: ", __progname);
+ if (format)
+ {
+@@ -119,6 +127,9 @@
+ }
+ __set_errno (error);
+ __fwprintf (stderr, L"%m\n");
++#else
++ abort ();
++#endif
+ }
+ else
+ {
+Index: git/misc/error.c
+===================================================================
+--- git.orig/misc/error.c 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/error.c 2014-08-29 20:01:15.212070587 -0700
+@@ -35,6 +35,7 @@
+ #endif
+
+ #ifdef _LIBC
++# include <gnu/option-groups.h>
+ # include <libintl.h>
+ # include <stdbool.h>
+ # include <stdint.h>
+@@ -205,6 +206,7 @@
+ #if _LIBC
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ size_t len = strlen (message) + 1;
+ wchar_t *wmessage = NULL;
+ mbstate_t st;
+@@ -265,6 +267,9 @@
+
+ if (use_malloc)
+ free (wmessage);
++#else
++ abort ();
++#endif
+ }
+ else
+ #endif
+Index: git/misc/Makefile
+===================================================================
+--- git.orig/misc/Makefile 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -19,6 +19,10 @@
+ # Sub-makefile for misc portion of the library.
+ #
+
++# Some system-dependent implementations of these functions use option
++# groups (see sysdeps/unix/sysv/linux/Makefile, for example).
++include ../option-groups.mak
++
+ subdir := misc
+
+ include ../Makeconfig
+@@ -46,40 +50,47 @@
+ select pselect \
+ acct chroot fsync sync fdatasync syncfs reboot \
+ gethostid sethostid \
+- revoke vhangup \
++ vhangup \
+ swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
+ mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
+ ualarm usleep \
+ gtty stty \
+ ptrace \
+- fstab mntent mntent_r \
++ mntent mntent_r \
+ utimes lutimes futimes futimesat \
+ truncate ftruncate truncate64 ftruncate64 \
+- chflags fchflags \
+ insremque getttyent getusershell getpass ttyslot \
+ syslog syscall daemon \
+ mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
+ mlock munlock mlockall munlockall \
+- efgcvt efgcvt_r qefgcvt qefgcvt_r \
+ hsearch hsearch_r tsearch lsearch \
+ err error ustat \
+- getsysstats dirname regexp \
++ getsysstats dirname \
+ getloadavg getclktck \
+ fgetxattr flistxattr fremovexattr fsetxattr getxattr \
+ listxattr lgetxattr llistxattr lremovexattr lsetxattr \
+ removexattr setxattr getauxval ifunc-impl-list
+
++routines-$(OPTION_POSIX_REGEXP) += regexp
++routines-$(OPTION_EGLIBC_FSTAB) += fstab
++routines-$(OPTION_EGLIBC_BSD) += chflags fchflags revoke
++routines-$(OPTION_EGLIBC_FCVT) += efgcvt efgcvt_r qefgcvt qefgcvt_r
++
+ generated += tst-error1.mtrace tst-error1-mem.out
+
+ aux := init-misc
+ install-lib := libg.a
+ gpl2lgpl := error.c error.h
+
+-tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
+- tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
++tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \
++ tst-pselect tst-insremque tst-mntent2 bug-hsearch1
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1
++tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests-special += $(objpfx)tst-error1-mem.out
+ endif
++endif
+
+ CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
+ CFLAGS-tsearch.c = $(uses-callbacks)
+Index: git/misc/sys/xattr.h
+===================================================================
+--- git.orig/misc/sys/xattr.h 2014-08-29 20:00:52.644070587 -0700
++++ git/misc/sys/xattr.h 2014-08-29 20:01:15.216070587 -0700
+@@ -26,7 +26,6 @@
+
+ /* The following constants should be used for the fifth parameter of
+ `*setxattr'. */
+-#ifndef __USE_KERNEL_XATTR_DEFS
+ enum
+ {
+ XATTR_CREATE = 1, /* set value, fail if attr already exists. */
+@@ -34,7 +33,6 @@
+ XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */
+ #define XATTR_REPLACE XATTR_REPLACE
+ };
+-#endif
+
+ /* Set the attribute NAME of the file pointed to by PATH to VALUE (which
+ is SIZE bytes long). Return 0 on success, -1 for errors. */
+Index: git/misc/tst-efgcvt.c
+===================================================================
+--- git.orig/misc/tst-efgcvt.c 2014-08-29 20:00:52.652070587 -0700
++++ git/misc/tst-efgcvt.c 2014-08-29 20:01:15.216070587 -0700
+@@ -59,7 +59,7 @@
+ { 123.01, -4, 3, "" },
+ { 126.71, -4, 3, "" },
+ { 0.0, 4, 1, "0000" },
+-#if DBL_MANT_DIG == 53
++#if DBL_MANT_DIG == 53 && !(defined __powerpc__ && defined __NO_FPRS__ && !defined _SOFT_FLOAT && !defined _SOFT_DOUBLE)
+ { 0x1p-1074, 3, -323, "494" },
+ { -0x1p-1074, 3, -323, "494" },
+ #endif
+Index: git/nis/Makefile
+===================================================================
+--- git.orig/nis/Makefile 2014-08-29 20:00:52.660070587 -0700
++++ git/nis/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for NIS/NIS+ part.
+ #
++include ../option-groups.mak
++
+ subdir := nis
+
+ include ../Makeconfig
+@@ -30,19 +32,26 @@
+
+ # These are the databases available for the nis (and perhaps later nisplus)
+ # service. This must be a superset of the services in nss.
+-databases = proto service hosts network grp pwd rpc ethers \
+- spwd netgrp alias publickey
++databases-y := proto service hosts network grp pwd rpc ethers \
++ spwd netgrp publickey
++databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
+
+ # Specify rules for the nss_* modules.
+-services := nis nisplus compat
++# The 'compat' module includes nis support, and the 'nss' directory
++# includes a bare-bones "files" library, so we'll include 'compat' in
++# OPTION_EGLIBC_NIS.
++services-y :=
++services-$(OPTION_EGLIBC_NIS) += nis nisplus compat
++
++extra-libs-$(OPTION_EGLIBC_NIS) += libnsl
++extra-libs-y += $(services-y:%=libnss_%)
+
+-extra-libs = libnsl $(services:%=libnss_%)
+ # These libraries will be built in the `others' pass rather than
+ # the `lib' pass, because they depend on libc.so being built already.
+-extra-libs-others = $(extra-libs)
++extra-libs-others-y += $(extra-libs-y)
+
+ # The sources are found in the appropriate subdir.
+-subdir-dirs = $(services:%=nss_%)
++subdir-dirs = $(services-y:%=nss_%)
+ vpath %.c $(subdir-dirs)
+
+ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
+@@ -60,11 +69,11 @@
+ libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
+ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+-libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
++libnss_nis-routines := $(addprefix nis-,$(databases-y)) nis-initgroups \
+ nss-nis
+ libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+-libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
++libnss_nisplus-routines := $(addprefix nisplus-,$(databases-y)) nisplus-parser \
+ nss-nisplus nisplus-initgroups
+ libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+@@ -80,12 +89,12 @@
+ # Target-specific variable setting to link objects using deprecated
+ # RPC interfaces with the version of libc.so that makes them available
+ # for new links:
+-$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
++$(services-y:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
+ libc-for-link = $(libnsl-libc)
+
+
+ ifeq ($(build-shared),yes)
+-$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
++$(others-y:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
+ else
+-$(others:%=$(objpfx)%): $(objpfx)libnsl.a
++$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a
+ endif
+Index: git/nptl/Makefile
+===================================================================
+--- git.orig/nptl/Makefile 2014-08-29 20:00:52.704070587 -0700
++++ git/nptl/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for NPTL portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := nptl
+
+ include ../Makeconfig
+@@ -116,7 +118,7 @@
+ pt-raise pt-system \
+ flockfile ftrylockfile funlockfile \
+ sigaction \
+- herrno res pt-allocrtsig \
++ pt-allocrtsig \
+ pthread_kill_other_threads \
+ pthread_getaffinity pthread_setaffinity \
+ pthread_attr_getaffinity pthread_attr_setaffinity \
+@@ -136,6 +138,8 @@
+ # pthread_setgid pthread_setegid pthread_setregid \
+ # pthread_setresgid
+
++libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res
++
+ libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
+ libpthread-static-only-routines = pthread_atfork
+
+@@ -210,7 +214,7 @@
+ tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
+ tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
+ tst-mutexpi9 \
+- tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
++ tst-spin1 tst-spin2 tst-spin3 \
+ tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
+ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
+ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
+@@ -244,14 +248,14 @@
+ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
+ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
+ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
+- tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
++ tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel25 \
+ tst-cancel-self tst-cancel-self-cancelstate \
+ tst-cancel-self-canceltype tst-cancel-self-testcancel \
+ tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
+ tst-flock1 tst-flock2 \
+ tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
+ tst-signal6 tst-signal7 \
+- tst-exec1 tst-exec2 tst-exec3 tst-exec4 \
++ tst-exec2 tst-exec3 tst-exec4 \
+ tst-exit1 tst-exit2 tst-exit3 \
+ tst-stdio1 tst-stdio2 \
+ tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \
+@@ -259,13 +263,12 @@
+ tst-unload \
+ tst-dlsym1 \
+ tst-sysconf \
+- tst-locale1 tst-locale2 \
++ tst-locale2 \
+ tst-umask1 \
+ tst-popen1 \
+ tst-clock1 \
+ tst-context1 \
+ tst-sched1 \
+- tst-backtrace1 \
+ tst-abstime \
+ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
+ tst-getpid1 tst-getpid2 tst-getpid3 \
+@@ -275,6 +278,17 @@
+ tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
+ test-srcs = tst-oddstacklimit
+
++# This test uses the posix_spawn functions.
++tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1
++
++# This test uses the 'backtrace' functions.
++tests-$(OPTION_EGLIBC_BACKTRACE) += tst-backtrace1
++
++# This test is written in C++.
++tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24
++
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1
++
+ # Files which must not be linked with libpthread.
+ tests-nolibpthread = tst-unload
+
+Index: git/nptl/pthread_create.c
+===================================================================
+--- git.orig/nptl/pthread_create.c 2014-08-29 20:00:52.764070587 -0700
++++ git/nptl/pthread_create.c 2014-08-29 20:01:15.216070587 -0700
+@@ -31,6 +31,7 @@
+ #include <kernel-features.h>
+ #include <exit-thread.h>
+
++#include <gnu/option-groups.h>
+ #include <shlib-compat.h>
+
+ #include <stap-probe.h>
+@@ -240,8 +241,10 @@
+ THREAD_SETMEM (pd, cpuclock_offset, now);
+ #endif
+
++#if __OPTION_EGLIBC_INET
+ /* Initialize resolver state pointer. */
+ __resp = &pd->res;
++#endif
+
+ /* Initialize pointers to locale data. */
+ __ctype_init ();
+@@ -322,8 +325,10 @@
+ /* Run the destructor for the thread-local data. */
+ __nptl_deallocate_tsd ();
+
++#if __OPTION_EGLIBC_INET
+ /* Clean up any state libc stored in thread-local variables. */
+ __libc_thread_freeres ();
++#endif
+
+ /* If this is the last thread we terminate the process now. We
+ do not notify the debugger, it might just irritate it if there
+Index: git/nscd/Makefile
+===================================================================
+--- git.orig/nscd/Makefile 2014-08-29 20:00:52.948070587 -0700
++++ git/nscd/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,14 +18,17 @@
+ #
+ # Sub-makefile for nscd portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := nscd
+
+ include ../Makeconfig
+
+ ifneq ($(use-nscd),no)
+-routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
++routines-$(OPTION_EGLIBC_INET) += \
++ nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
+ nscd_initgroups nscd_getserv_r nscd_netgroup
+-aux := nscd_helper
++aux-$(OPTION_EGLIBC_INET) += nscd_helper
+ endif
+
+ # To find xmalloc.c
+@@ -37,14 +40,18 @@
+ dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
+ xmalloc xstrdup aicache initgrcache gai res_hconf \
+ netgroupcache
+-
++ifneq (y,$(OPTION_EGLIBC_NIS))
++# If we haven't build libnsl.so, then we'll need to include our
++# own copy of nis_hash.
++nscd-modules += nis_hash
++endif
+ ifeq ($(build-nscd)$(have-thread-library),yesyes)
+
+-others += nscd
+-others-pie += nscd
+-install-sbin := nscd
++others-$(OPTION_EGLIBC_INET) += nscd
++others-pie-$(OPTION_EGLIBC_INET) += nscd
++install-sbin-$(OPTION_EGLIBC_INET) += nscd
+
+-extra-objs = $(nscd-modules:=.o)
++extra-objs-$(OPTION_EGLIBC_INET) += $(nscd-modules:=.o)
+
+ endif
+
+@@ -101,7 +108,15 @@
+ $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
+
+ ifeq ($(build-shared),yes)
+-$(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
++$(objpfx)nscd: $(shared-thread-library)
++else
++$(objpfx)nscd: $(static-thread-library)
++endif
++
++ifeq (y,$(OPTION_EGLIBC_NIS))
++ifeq ($(build-shared),yes)
++$(objpfx)nscd: $(common-objpfx)nis/libnsl.so
+ else
+-$(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
++$(objpfx)nscd: $(common-objpfx)nis/libnsl.a
++endif
+ endif
+Index: git/nscd/nis_hash.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nscd/nis_hash.c 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,3 @@
++/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so;
++ we need our own copy. */
++#include "../nis/nis_hash.c"
+Index: git/nss/fixed-nsswitch.conf
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/fixed-nsswitch.conf 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,22 @@
++# /etc/nsswitch.conf
++#
++# Example configuration for fixed name service.
++# See the description of OPTION_EGLIBC_NSSWITCH in option-groups.def
++# for details.
++#
++
++aliases: files
++
++passwd: files
++group: files
++shadow: files
++
++hosts: files dns
++networks: files dns
++
++protocols: files
++services: files
++ethers: files
++rpc: files
++
++netgroup: files
+Index: git/nss/fixed-nsswitch.functions
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/fixed-nsswitch.functions 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,121 @@
++/* List of functions defined for fixed NSS in GNU C Library.
++ Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* When OPTION_EGLIBC_NSSWITCH is disabled (see option-groups.def),
++ EGLIBC does not use the 'dlopen' and 'dlsym' functions to look for
++ database query functions in the individual name service libraries.
++ Instead, it uses a set of functions chosen at compile time, as
++ directed by the OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS file. This
++ file is a sample of what you might use there.
++
++ This file is C source code; it should only contain invocations of
++ the following macros:
++
++ - DEFINE_ENT (DATABASE, SERVICE, X)
++
++ Declare the 'setXent', 'getXent_r', and 'endXent' functions that
++ query DATABASE using the service library 'libnss_SERVICE.so.2'.
++ DATABASE should be the full name of the database as it appears in
++ 'nsswitch.conf', like 'passwd' or 'aliases'.
++
++ (The non-reentrant 'getXent' functions are implemented in terms
++ of the reentrant 'getXent_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ - DEFINE_GETBY (DATABASE, SERVICE, X, KEY)
++
++ Declare the 'getXbyKEY_r' functions that query DATABASE using
++ SERVICE. DATABASE and SERVICE are as described above.
++
++ (The non-reentrant 'getXbyKEY' functions are implemented in terms
++ of the reentrant 'getXbyKEY_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ Use the special key 'name3' for the service library function that
++ implements the 'getaddrinfo' function.
++
++ - DEFINE_GET (DATABASE, SERVICE, QUERY)
++
++ Declare the 'getQUERY_r' functions that query DATABASE using
++ SERVICE. This is used for functions like 'getpwnam'.
++
++ (The non-reentrant 'getQUERY' functions are implemented in terms
++ of the reentrant 'getQUERY_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ This sample file only includes functions that consult the files in
++ '/etc', and the Domain Name System (DNS). */
++
++/* aliases */
++DEFINE_ENT (aliases, files, alias)
++DEFINE_GETBY (aliases, files, alias, name)
++
++/* ethers */
++DEFINE_ENT (ethers, files, ether)
++
++/* group */
++DEFINE_ENT (group, files, gr)
++DEFINE_GET (group, files, grgid)
++DEFINE_GET (group, files, grnam)
++
++/* hosts */
++DEFINE_ENT (hosts, files, host)
++DEFINE_GETBY (hosts, files, host, addr)
++DEFINE_GETBY (hosts, files, host, name)
++DEFINE_GETBY (hosts, files, host, name2)
++DEFINE_GET (hosts, files, hostton)
++DEFINE_GET (hosts, files, ntohost)
++DEFINE_GETBY (hosts, dns, host, addr)
++DEFINE_GETBY (hosts, dns, host, name)
++DEFINE_GETBY (hosts, dns, host, name2)
++DEFINE_GETBY (hosts, dns, host, name3)
++
++/* netgroup */
++DEFINE_ENT (netgroup, files, netgr)
++
++/* networks */
++DEFINE_ENT (networks, files, net)
++DEFINE_GETBY (networks, files, net, name)
++DEFINE_GETBY (networks, files, net, addr)
++DEFINE_GETBY (networks, dns, net, name)
++DEFINE_GETBY (networks, dns, net, addr)
++
++/* protocols */
++DEFINE_ENT (protocols, files, proto)
++DEFINE_GETBY (protocols, files, proto, name)
++DEFINE_GETBY (protocols, files, proto, number)
++
++/* passwd */
++DEFINE_ENT (passwd, files, pw)
++DEFINE_GET (passwd, files, pwnam)
++DEFINE_GET (passwd, files, pwuid)
++
++/* rpc */
++DEFINE_ENT (rpc, files, rpc)
++DEFINE_GETBY (rpc, files, rpc, name)
++DEFINE_GETBY (rpc, files, rpc, number)
++
++/* services */
++DEFINE_ENT (services, files, serv)
++DEFINE_GETBY (services, files, serv, name)
++DEFINE_GETBY (services, files, serv, port)
++
++/* shadow */
++DEFINE_ENT (shadow, files, sp)
++DEFINE_GET (shadow, files, spnam)
+Index: git/nss/gen-fixed-nsswitch.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/gen-fixed-nsswitch.c 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,803 @@
++/* gen-fixed-nsswitch.c --- generate fixed name service data structures
++ Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#define _GNU_SOURCE
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <string.h>
++#include <stdarg.h>
++#include <assert.h>
++#include <ctype.h>
++
++#include "gnu/lib-names.h"
++#include "nss.h"
++
++/* Provide a fallback definition to allow this file to be compiled outside
++ libc. */
++#ifndef internal_function
++# define internal_function
++#endif
++
++
++/* Simple utilities. */
++
++void __attribute__ ((noreturn))
++error (const char *message)
++{
++ fprintf (stderr, "%s\n", message);
++ exit (1);
++}
++
++
++void *
++check_alloc (void *p)
++{
++ if (p)
++ return p;
++ else
++ error ("out of memory");
++}
++
++void *
++xmalloc (size_t size)
++{
++ return check_alloc (malloc (size));
++}
++
++
++/* Format ARGS according to FORMAT, and return the result as a
++ malloc'ed string. */
++char *
++saprintf (const char *format, ...)
++{
++ va_list args;
++ size_t len;
++ char *buf;
++
++ va_start (args, format);
++ len = vsnprintf (NULL, 0, format, args);
++ va_end (args);
++
++ buf = xmalloc (len + 1);
++ va_start (args, format);
++ assert (len == vsnprintf (buf, len + 1, format, args));
++ va_end (args);
++
++ return buf;
++}
++
++
++
++/* Data structures representing the configuration file in memory. */
++
++/* These are copied from nsswitch.h.
++
++ We could simply #include that file, but this program runs on the
++ build machine and links against the build machine's libraries,
++ whereas that header is meant for use by target code; it uses
++ 'libc_hidden_proto', 'internal_function', and related hair. Since
++ we've copied the parsing code, we might as well copy the data
++ structure definitions as well. */
++
++/* Actions performed after lookup finished. */
++typedef enum
++{
++ NSS_ACTION_CONTINUE,
++ NSS_ACTION_RETURN
++} lookup_actions;
++
++
++typedef struct service_library
++{
++ /* Name of service (`files', `dns', `nis', ...). */
++ const char *name;
++ /* Pointer to the loaded shared library. */
++ void *lib_handle;
++ /* And the link to the next entry. */
++ struct service_library *next;
++} service_library;
++
++
++/* For mapping a function name to a function pointer. It is known in
++ nsswitch.c:nss_lookup_function that a string pointer for the lookup key
++ is the first member. */
++typedef struct
++{
++ const char *fct_name;
++ void *fct_ptr;
++} known_function;
++
++
++typedef struct service_user
++{
++ /* And the link to the next entry. */
++ struct service_user *next;
++ /* Action according to result. */
++ lookup_actions actions[5];
++ /* Link to the underlying library object. */
++ service_library *library;
++ /* Collection of known functions.
++
++ With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
++ 'tsearch'-style tree.
++
++ With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
++ pointers to known_function structures, NULL-terminated. */
++ union
++ {
++ void *tree;
++ const known_function **array;
++ } known;
++ /* Name of the service (`files', `dns', `nis', ...). */
++ const char *name;
++} service_user;
++
++/* To access the action based on the status value use this macro. */
++#define nss_next_action(ni, status) ((ni)->actions[2 + status])
++
++
++typedef struct name_database_entry
++{
++ /* And the link to the next entry. */
++ struct name_database_entry *next;
++ /* List of service to be used. */
++ service_user *service;
++ /* Name of the database. */
++ const char *name;
++} name_database_entry;
++
++
++typedef struct name_database
++{
++ /* List of all known databases. */
++ name_database_entry *entry;
++ /* List of libraries with service implementation. */
++ service_library *library;
++} name_database;
++
++
++
++/* Gathering the contents of the FIXED_FUNCTIONS file. */
++
++/* It should be possible to generate this list automatically by
++ looking at the services and databases used in the nsswitch.conf
++ file, and having a hard-coded set of queries supported on each
++ database. */
++
++/* We #include the FIXED_FUNCTIONS file several times to build an
++ array of function structures holding its data. */
++enum function_kind {
++ fk_end = 0, /* Last entry. */
++ fk_setent, /* Like setpwent. */
++ fk_getent, /* Like getpwent. */
++ fk_endent, /* Like endpwent. */
++ fk_getby, /* Like gethostbyname. */
++ fk_get /* Like getpwnam. */
++};
++
++
++struct function {
++ /* What kind of function this is. */
++ enum function_kind kind;
++
++ /* The database and service of the function being hardwired in. */
++ char *database, *service;
++
++ /* The kind of entry being queried, for 'fk_setent', 'fk_getent',
++ 'fk_endent', and 'fk_getby' functions. */
++ char *entry;
++
++ /* The key, for 'fk_getby' entries. */
++ char *key;
++
++ /* The value and key, for 'fk_get' entries. */
++ char *value_and_key;
++};
++
++
++const struct function functions[] =
++ {
++
++#define DEFINE_ENT(database, service, entry) \
++ { fk_setent, #database, #service, #entry }, \
++ { fk_getent, #database, #service, #entry }, \
++ { fk_endent, #database, #service, #entry },
++#define DEFINE_GETBY(database, service, entry, key) \
++ { fk_getby, #database, #service, #entry, #key },
++#define DEFINE_GET(database, service, value_and_key) \
++ { fk_get, #database, #service, NULL, NULL, #value_and_key },
++
++#include FIXED_FUNCTIONS
++
++#undef DEFINE_ENT
++#undef DEFINE_GETBY
++#undef DEFINE_GET
++
++ { fk_end }
++ };
++
++
++/* Parsing the config file. Functions copied from nsswitch.c. */
++
++#define __strchrnul strchrnul
++#define __getline getline
++#define __strncasecmp strncasecmp
++
++/* Prototypes for the local functions. */
++static name_database *nss_parse_file (const char *fname) internal_function;
++static name_database_entry *nss_getline (char *line) internal_function;
++static service_user *nss_parse_service_list (const char *line)
++ internal_function;
++
++static name_database *
++internal_function
++nss_parse_file (const char *fname)
++{
++ FILE *fp;
++ name_database *result;
++ name_database_entry *last;
++ char *line;
++ size_t len;
++
++ /* Open the configuration file. */
++ fp = fopen (fname, "rc");
++ if (fp == NULL)
++ return NULL;
++
++ // /* No threads use this stream. */
++ // __fsetlocking (fp, FSETLOCKING_BYCALLER);
++
++ result = (name_database *) xmalloc (sizeof (name_database));
++
++ result->entry = NULL;
++ result->library = NULL;
++ last = NULL;
++ line = NULL;
++ len = 0;
++ do
++ {
++ name_database_entry *this;
++ ssize_t n;
++
++ n = __getline (&line, &len, fp);
++ if (n < 0)
++ break;
++ if (line[n - 1] == '\n')
++ line[n - 1] = '\0';
++
++ /* Because the file format does not know any form of quoting we
++ can search forward for the next '#' character and if found
++ make it terminating the line. */
++ *__strchrnul (line, '#') = '\0';
++
++ /* If the line is blank it is ignored. */
++ if (line[0] == '\0')
++ continue;
++
++ /* Each line completely specifies the actions for a database. */
++ this = nss_getline (line);
++ if (this != NULL)
++ {
++ if (last != NULL)
++ last->next = this;
++ else
++ result->entry = this;
++
++ last = this;
++ }
++ }
++ while (!feof_unlocked (fp));
++
++ /* Free the buffer. */
++ free (line);
++ /* Close configuration file. */
++ fclose (fp);
++
++ return result;
++}
++
++
++/* Read the source names:
++ `( <source> ( "[" "!"? (<status> "=" <action> )+ "]" )? )*'
++ */
++static service_user *
++internal_function
++nss_parse_service_list (const char *line)
++{
++ service_user *result = NULL, **nextp = &result;
++
++ while (1)
++ {
++ service_user *new_service;
++ const char *name;
++
++ while (isspace (line[0]))
++ ++line;
++ if (line[0] == '\0')
++ /* No source specified. */
++ return result;
++
++ /* Read <source> identifier. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '[')
++ ++line;
++ if (name == line)
++ return result;
++
++
++ new_service = (service_user *) xmalloc (sizeof (*new_service));
++ new_service->name = (char *) xmalloc (line - name + 1);
++
++ *((char *) __mempcpy ((char *) new_service->name, name, line - name))
++ = '\0';
++
++ /* Set default actions. */
++ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_UNAVAIL] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_NOTFOUND] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
++ new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
++ new_service->library = NULL;
++ new_service->known.tree = NULL;
++ new_service->next = NULL;
++
++ while (isspace (line[0]))
++ ++line;
++
++ if (line[0] == '[')
++ {
++ /* Read criterions. */
++ do
++ ++line;
++ while (line[0] != '\0' && isspace (line[0]));
++
++ do
++ {
++ int not;
++ enum nss_status status;
++ lookup_actions action;
++
++ /* Grok ! before name to mean all statii but that one. */
++ not = line[0] == '!';
++ if (not)
++ ++line;
++
++ /* Read status name. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
++ && line[0] != ']')
++ ++line;
++
++ /* Compare with known statii. */
++ if (line - name == 7)
++ {
++ if (__strncasecmp (name, "SUCCESS", 7) == 0)
++ status = NSS_STATUS_SUCCESS;
++ else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
++ status = NSS_STATUS_UNAVAIL;
++ else
++ return result;
++ }
++ else if (line - name == 8)
++ {
++ if (__strncasecmp (name, "NOTFOUND", 8) == 0)
++ status = NSS_STATUS_NOTFOUND;
++ else if (__strncasecmp (name, "TRYAGAIN", 8) == 0)
++ status = NSS_STATUS_TRYAGAIN;
++ else
++ return result;
++ }
++ else
++ return result;
++
++ while (isspace (line[0]))
++ ++line;
++ if (line[0] != '=')
++ return result;
++ do
++ ++line;
++ while (isspace (line[0]));
++
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
++ && line[0] != ']')
++ ++line;
++
++ if (line - name == 6 && __strncasecmp (name, "RETURN", 6) == 0)
++ action = NSS_ACTION_RETURN;
++ else if (line - name == 8
++ && __strncasecmp (name, "CONTINUE", 8) == 0)
++ action = NSS_ACTION_CONTINUE;
++ else
++ return result;
++
++ if (not)
++ {
++ /* Save the current action setting for this status,
++ set them all to the given action, and reset this one. */
++ const lookup_actions save = new_service->actions[2 + status];
++ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = action;
++ new_service->actions[2 + NSS_STATUS_UNAVAIL] = action;
++ new_service->actions[2 + NSS_STATUS_NOTFOUND] = action;
++ new_service->actions[2 + NSS_STATUS_SUCCESS] = action;
++ new_service->actions[2 + status] = save;
++ }
++ else
++ new_service->actions[2 + status] = action;
++
++ /* Skip white spaces. */
++ while (isspace (line[0]))
++ ++line;
++ }
++ while (line[0] != ']');
++
++ /* Skip the ']'. */
++ ++line;
++ }
++
++ *nextp = new_service;
++ nextp = &new_service->next;
++ }
++}
++
++static name_database_entry *
++internal_function
++nss_getline (char *line)
++{
++ const char *name;
++ name_database_entry *result;
++ size_t len;
++
++ /* Ignore leading white spaces. ATTENTION: this is different from
++ what is implemented in Solaris. The Solaris man page says a line
++ beginning with a white space character is ignored. We regard
++ this as just another misfeature in Solaris. */
++ while (isspace (line[0]))
++ ++line;
++
++ /* Recognize `<database> ":"'. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != ':')
++ ++line;
++ if (line[0] == '\0' || name == line)
++ /* Syntax error. */
++ return NULL;
++ *line++ = '\0';
++
++ len = strlen (name) + 1;
++
++ result = (name_database_entry *) xmalloc (sizeof (*result));
++ result->name = (char *) xmalloc (len);
++
++ /* Save the database name. */
++ memcpy ((char *) result->name, name, len);
++
++ /* Parse the list of services. */
++ result->service = nss_parse_service_list (line);
++
++ result->next = NULL;
++ return result;
++}
++
++
++
++/* Generating code for statically initialized nsswitch structures. */
++
++
++/* Return the service-neutral suffix of the name of the service
++ library function referred to by the function F. The result is
++ allocated with malloc. */
++char *
++known_function_suffix (const struct function *f)
++{
++ switch (f->kind)
++ {
++ case fk_setent:
++ return saprintf ("set%sent", f->entry);
++
++ case fk_getent:
++ return saprintf ("get%sent_r", f->entry);
++
++ case fk_endent:
++ return saprintf ("end%sent", f->entry);
++
++ case fk_getby:
++ return saprintf ("get%sby%s_r", f->entry, f->key);
++
++ case fk_get:
++ return saprintf ("get%s_r", f->value_and_key);
++
++ default:
++ abort ();
++ }
++}
++
++
++/* Return the name of the service library function referred to by the
++ function F. The result is allocated with malloc. */
++char *
++known_function_name (const struct function *f)
++{
++ return saprintf ("_nss_%s_%s", f->service, known_function_suffix (f));
++}
++
++
++/* Write initialized known_function structures to OUT for
++ all the functions we'll use. */
++void
++generate_known_functions (FILE *out)
++{
++ int i;
++
++ /* First, generate weak references to the functions. The service
++ libraries depend on libc, and if these references weren't weak,
++ we'd be making libc depend circularly on the service
++ libraries. */
++ for (i = 0; functions[i].kind; i++)
++ {
++ char *name = known_function_name (&functions[i]);
++ fprintf (out, "typeof (%s) %s __attribute__ ((weak));\n",
++ name, name);
++ }
++ fputs ("\n", out);
++
++ /* Then, a table mapping names to functions. */
++ fputs ("static const known_function fixed_known_functions[] = {\n",
++ out);
++ for (i = 0; functions[i].kind; i++)
++ {
++ const struct function *f = &functions[i];
++ char *suffix = known_function_suffix (f);
++
++ fprintf (out, " /* %2d */ { \"%s\", _nss_%s_%s },\n",
++ i, suffix, f->service, suffix);
++ }
++ fputs ("};\n", out);
++ fputs ("\n", out);
++}
++
++
++/* Print code to OUT for an initialized array of pointers to the
++ 'known_function' structures needed for USER, which is for
++ DATABASE. Return its name, allocated with malloc. */
++char *
++generate_known_function_list (FILE *out,
++ const name_database_entry *database,
++ const service_user *user)
++{
++ char *list_name = saprintf ("fixed_%s_%s_known_funcs",
++ database->name, user->name);
++ fprintf (out, "static const known_function *%s[] = {\n",
++ list_name);
++ int i;
++ for (i = 0; functions[i].kind; i++)
++ if (strcmp (functions[i].database, database->name) == 0
++ && strcmp (functions[i].service, user->name) == 0)
++ fprintf (out, " &fixed_known_functions[%d], /* %s */\n",
++ i, known_function_name (&functions[i]));
++ fputs (" NULL\n", out);
++ fputs ("};\n", out);
++ fputs ("\n", out);
++
++ return list_name;
++}
++
++
++/* Return the name of the status value STATUS, as a statically
++ allocated string. */
++const char *
++lookup_status_name (enum nss_status status)
++{
++ switch (status)
++ {
++ case NSS_STATUS_TRYAGAIN: return "NSS_STATUS_TRYAGAIN";
++ case NSS_STATUS_UNAVAIL: return "NSS_STATUS_UNAVAIL";
++ case NSS_STATUS_NOTFOUND: return "NSS_STATUS_NOTFOUND";
++ case NSS_STATUS_SUCCESS: return "NSS_STATUS_SUCCESS";
++ case NSS_STATUS_RETURN: return "NSS_STATUS_RETURN";
++ default: abort ();
++ };
++}
++
++
++/* Return the name of ACTION as a statically allocated string. */
++const char *
++lookup_action_name (lookup_actions action)
++{
++ switch (action)
++ {
++ case NSS_ACTION_CONTINUE: return "NSS_ACTION_CONTINUE";
++ case NSS_ACTION_RETURN: return "NSS_ACTION_RETURN";
++ default: abort ();
++ }
++}
++
++
++/* Print code to OUT for the list of service_user structures starting
++ with USER, which are all for DATABASE. Return the name of the
++ first structure in that list, or zero if USER is NULL. */
++char *
++generate_service_user_list (FILE *out,
++ name_database_entry *database,
++ service_user *user)
++{
++ if (user)
++ {
++ /* Generate the tail of the list. */
++ char *next_name = generate_service_user_list (out, database, user->next);
++ /* Generate our known function list. */
++ char *known_function_list_name =
++ generate_known_function_list (out, database, user);
++
++ char *name = saprintf ("fixed_%s_%s_user", database->name, user->name);
++
++ fprintf (out, "static const service_user %s = {\n", name);
++ if (next_name)
++ fprintf (out, " (service_user *) &%s,\n", next_name);
++ else
++ fprintf (out, " NULL, /* no next entry */\n");
++ fputs (" {\n", out);
++ int i;
++ for (i = 0; i < sizeof (user->actions) / sizeof (user->actions[0]); i++)
++ fprintf (out, " %s, /* %s */\n",
++ lookup_action_name (user->actions[i]),
++ lookup_status_name (i - 2));
++ fputs (" },\n", out);
++ fprintf (out, " NULL, /* we never need the service library */\n");
++ fprintf (out, " { .array = %s },\n", known_function_list_name);
++ fprintf (out, " \"%s\"\n", user->name);
++ fputs ("};\n", out);
++ fputs ("\n", out);
++
++ return name;
++ }
++ else
++ return NULL;
++}
++
++
++/* Print code to OUT for the list of name_database_entry structures
++ starting with DATABASE. Return the name of the first structure
++ in that list, or zero if DATABASE is NULL. */
++char *
++generate_name_database_entries (FILE *out, name_database_entry *database)
++{
++ if (database)
++ {
++ char *next_name = generate_name_database_entries (out, database->next);
++ char *service_user_name
++ = generate_service_user_list (out, database, database->service);
++ char *name = saprintf ("fixed_%s_name_database", database->name);
++
++ fprintf (out, "static const name_database_entry %s = {\n", name);
++
++ if (next_name)
++ fprintf (out, " (name_database_entry *) &%s,\n", next_name);
++ else
++ fprintf (out, " NULL,\n");
++
++ if (service_user_name)
++ fprintf (out, " (service_user *) &%s,\n", service_user_name);
++ else
++ fprintf (out, " NULL,\n");
++
++ fprintf (out, " \"%s\"\n", database->name);
++ fprintf (out, "};\n");
++ fputs ("\n", out);
++
++ return name;
++ }
++ else
++ return NULL;
++}
++
++
++void
++generate_name_database (FILE *out, name_database *service_table)
++{
++ /* Produce a linked list of the known name_database_entry
++ structures. */
++ char *entries = generate_name_database_entries (out, service_table->entry);
++
++ /* Now produce the main structure that points to them all. */
++ fprintf (out, "static const name_database fixed_name_database = {\n");
++ if (entries)
++ fprintf (out, " (name_database_entry *) &%s,\n", entries);
++ else
++ fprintf (out, " NULL,\n");
++ fputs (" NULL /* we don't need the libraries */\n"
++ "};\n",
++ out);
++}
++
++
++
++/* Generating the list of service libraries we generate references to. */
++
++/* String with revision number of the shared object files. */
++static const char *const nss_shlib_revision = LIBNSS_FILES_SO + 15;
++
++void
++generate_service_lib_list (FILE *out, name_database *service_table)
++{
++ int i, j;
++ int printed_any = 0;
++
++ for (i = 0; functions[i].kind; i++)
++ {
++ /* Mention each service library only once. */
++ for (j = 0; j < i; j++)
++ if (strcmp (functions[i].service, functions[j].service) == 0)
++ break;
++
++ if (j >= i)
++ {
++ if (printed_any)
++ putc (' ', out);
++ fprintf (out, "-lnss_%s",
++ functions[i].service,
++ nss_shlib_revision);
++ printed_any = 1;
++ }
++ }
++}
++
++
++/* Main. */
++
++int
++main (int argc, char **argv)
++{
++ if (argc != 4)
++ {
++ fprintf (stderr, "usage: gen-fixed-nsswitch HEADER SERVLIBS CONFIG\n");
++ exit (1);
++ }
++
++ name_database *service_table = nss_parse_file (argv[3]);
++
++ FILE *header = fopen (argv[1], "w");
++ if (! header)
++ {
++ fprintf (stderr,
++ "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
++ argv[1], strerror (errno));
++ exit (1);
++ }
++ fputs ("/* Generated by nss/gen-fixed-nsswitch.c. */\n", header);
++ fputs ("\n", header);
++ generate_known_functions (header);
++ generate_name_database (header, service_table);
++ fclose (header);
++
++ FILE *service_lib_list = fopen (argv[2], "w");
++ if (! service_lib_list)
++ {
++ fprintf (stderr,
++ "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
++ argv[2], strerror (errno));
++ exit (1);
++ }
++ generate_service_lib_list (service_lib_list, service_table);
++ fclose (service_lib_list);
++
++ return 0;
++}
+Index: git/nss/getent.c
+===================================================================
+--- git.orig/nss/getent.c 2014-08-29 20:00:52.976070587 -0700
++++ git/nss/getent.c 2014-08-29 20:01:15.216070587 -0700
+@@ -39,6 +39,7 @@
+ #include <netinet/ether.h>
+ #include <netinet/in.h>
+ #include <sys/socket.h>
++#include <gnu/option-groups.h>
+
+ /* Get libc version number. */
+ #include <version.h>
+@@ -91,6 +92,7 @@
+ fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk");
+ }
+
++#if __OPTION_EGLIBC_DB_ALIASES
+ /* This is for aliases */
+ static void
+ print_aliases (struct aliasent *alias)
+@@ -135,7 +137,9 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_DB_ALIASES */
+
++#if __OPTION_EGLIBC_INET
+ /* This is for ethers */
+ static int
+ ethers_keys (int number, char *key[])
+@@ -179,6 +183,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* This is for group */
+ static void
+@@ -301,6 +306,7 @@
+ return result;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* This is for hosts */
+ static void
+ print_hosts (struct hostent *host)
+@@ -598,6 +604,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Now is all for passwd */
+ static void
+@@ -650,6 +657,7 @@
+ return result;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* This is for protocols */
+ static void
+ print_protocols (struct protoent *proto)
+@@ -805,6 +813,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* This is for shadow */
+ static void
+@@ -871,21 +880,34 @@
+ } databases[] =
+ {
+ #define D(name) { #name, name ## _keys },
+-D(ahosts)
+-D(ahostsv4)
+-D(ahostsv6)
+-D(aliases)
+-D(ethers)
++
++#if __OPTION_EGLIBC_INET
++#define DN(name) D(name)
++#else
++#define DN(name)
++#endif
++
++#if __OPTION_EGLIBC_DB_ALIASES
++#define DA(name) D(name)
++#else
++#define DA(name)
++#endif
++
++DN(ahosts)
++DN(ahostsv4)
++DN(ahostsv6)
++DA(aliases)
++DN(ethers)
+ D(group)
+ D(gshadow)
+-D(hosts)
++DN(hosts)
+-D(initgroups)
++DN(initgroups)
+-D(netgroup)
+-D(networks)
++DN(netgroup)
++DN(networks)
+ D(passwd)
+-D(protocols)
+-D(rpc)
+-D(services)
++DN(protocols)
++DN(rpc)
++DN(services)
+ D(shadow)
+ #undef D
+ { NULL, NULL }
+Index: git/nss/getnssent_r.c
+===================================================================
+--- git.orig/nss/getnssent_r.c 2014-08-29 20:00:52.976070587 -0700
++++ git/nss/getnssent_r.c 2014-08-29 20:01:15.220070587 -0700
+@@ -16,6 +16,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <errno.h>
++#include <gnu/option-groups.h>
+ #include <netdb.h>
+ #include "nsswitch.h"
+
+@@ -59,11 +60,13 @@
+ } fct;
+ int no_more;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ __set_h_errno (NETDB_INTERNAL);
+ return;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Cycle through the services and run their `setXXent' functions until
+ we find an available service. */
+@@ -101,11 +104,13 @@
+ } fct;
+ int no_more;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ __set_h_errno (NETDB_INTERNAL);
+ return;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Cycle through all the services and run their endXXent functions. */
+ no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1);
+@@ -141,12 +146,14 @@
+ int no_more;
+ enum nss_status status;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ *h_errnop = NETDB_INTERNAL;
+ *result = NULL;
+ return errno;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Initialize status to return if no more functions are found. */
+ status = NSS_STATUS_NOTFOUND;
+@@ -161,7 +168,7 @@
+ int is_last_nip = *nip == *last_nip;
+
+ status = DL_CALL_FCT (fct.f,
+- (resbuf, buffer, buflen, &errno, &h_errno));
++ (resbuf, buffer, buflen, &errno, h_errnop));
+
+ /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
+ provided buffer is too small. In this case we should give
+Index: git/nss/Makefile
+===================================================================
+--- git.orig/nss/Makefile 2014-08-29 20:00:52.972070587 -0700
++++ git/nss/Makefile 2014-08-29 20:01:15.220070587 -0700
+@@ -18,29 +18,36 @@
+ #
+ # Makefile for name service switch.
+ #
++include ../option-groups.mak
++
+ subdir := nss
+
+ include ../Makeconfig
+
+ headers := nss.h
+
+-# This is the trivial part which goes into libc itself.
+-routines = nsswitch getnssent getnssent_r digits_dots \
+- $(addsuffix -lookup,$(databases))
+-
+ # These are the databases that go through nss dispatch.
+ # Caution: if you add a database here, you must add its real name
+ # in databases.def, too.
+-databases = proto service hosts network grp pwd rpc ethers \
+- spwd netgrp key alias sgrp
++databases-y = grp pwd spwd sgrp
++databases-$(OPTION_EGLIBC_INET) \
++ += proto service hosts network rpc ethers \
++ netgrp key
++databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
++
++# This is the trivial part which goes into libc itself.
++routines-y += nsswitch getnssent getnssent_r \
++ $(addsuffix -lookup,$(databases-y))
++routines-$(OPTION_EGLIBC_INET) += digits_dots
+
+ others := getent makedb
+ install-bin := getent makedb
+ makedb-modules = xmalloc hash-string
+ extra-objs += $(makedb-modules:=.o)
+
+-tests = test-netdb tst-nss-test1 test-digits-dots
+-xtests = bug-erange
++tests = tst-nss-test1
++tests-$(OPTION_EGLIBC_INET) += test-netdb test-digits-dots
++xtests-$(OPTION_EGLIBC_INET) += bug-erange
+
+ # Specify rules for the nss_* modules. We have some services.
+ services := files db
+@@ -55,7 +62,7 @@
+ vpath %.c $(subdir-dirs) ../locale/programs ../intl
+
+
+-libnss_files-routines := $(addprefix files-,$(databases)) \
++libnss_files-routines := $(addprefix files-,$(databases-y)) \
+ files-initgroups files-have_o_cloexec files-init
+
+ libnss_db-dbs := $(addprefix db-,\
+@@ -78,6 +85,45 @@
+ tests += $(tests-static)
+ endif
+
++ifneq ($(OPTION_EGLIBC_NSSWITCH),y)
++
++ifndef OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
++$(error OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset)
++endif
++
++ifndef OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
++$(error OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS variable left unset)
++endif
++
++ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)))
++$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed config file)
++$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG))
++endif
++
++ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)))
++$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed functions file)
++$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS))
++endif
++
++before-compile := $(objpfx)fixed-nsswitch.h
++generated := fixed-nsswitch.h
++$(objpfx)fixed-nsswitch.h $(objfpx)fixed-nsswitch-libs: \
++ $(objpfx)gen-fixed-nsswitch \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
++ $< $(objpfx)fixed-nsswitch.h \
++ $(objpfx)fixed-nsswitch-libs \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
++
++$(objpfx)gen-fixed-nsswitch: gen-fixed-nsswitch.c \
++ $(common-objpfx)option-groups.config \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)
++ $(native-compile)
++gen-fixed-nsswitch-CFLAGS = \
++ -g3 -O -Wall \
++ -I $(objpfx) \
++ -DFIXED_FUNCTIONS='"$(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)"'
++endif
++
+ include ../Rules
+
+ ifeq (yes,$(have-selinux))
+Index: git/nss/nsswitch.c
+===================================================================
+--- git.orig/nss/nsswitch.c 2014-08-29 20:00:53.004070587 -0700
++++ git/nss/nsswitch.c 2014-08-29 20:01:15.220070587 -0700
+@@ -26,6 +26,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ #include <aliases.h>
+ #include <grp.h>
+@@ -41,6 +42,15 @@
+ #include "../nscd/nscd_proto.h"
+ #include <sysdep.h>
+
++/* When OPTION_EGLIBC_NSSWITCH is disabled, we use fixed tables of
++ databases and services, generated at library build time. Thus:
++ - We can't reconfigure individual databases, so we don't need a
++ name-to-database map.
++ - We never add databases or service libraries, or look up functions
++ at runtime, so there's no need for a lock to protect our tables.
++ See ../option-groups.def for the details. */
++#if __OPTION_EGLIBC_NSSWITCH
++
+ /* Prototypes for the local functions. */
+ static name_database *nss_parse_file (const char *fname) internal_function;
+ static name_database_entry *nss_getline (char *line) internal_function;
+@@ -79,6 +89,9 @@
+
+ __libc_lock_define_initialized (static, lock)
+
++#define lock_nsswitch __libc_lock_lock (lock)
++#define unlock_nsswitch __libc_lock_unlock (lock)
++
+ #if !defined DO_STATIC_NSS || defined SHARED
+ /* String with revision number of the shared object files. */
+ static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15;
+@@ -93,6 +106,20 @@
+ __libc_freeres. */
+ static name_database_entry *defconfig_entries;
+
++#else /* __OPTION_EGLIBC_NSSWITCH */
++
++/* Bring in the statically initialized service table we generated at
++ build time. */
++#include "fixed-nsswitch.h"
++
++const static name_database *service_table = &fixed_name_database;
++
++/* Nothing ever changes, so there's no need to lock anything. */
++#define lock_nsswitch (0)
++#define unlock_nsswitch (0)
++
++#endif /* __OPTION_EGLIBC_NSSWITCH */
++
+
+ #ifdef USE_NSCD
+ /* Nonzero if this is the nscd process. */
+@@ -109,20 +136,22 @@
+ const char *defconfig, service_user **ni)
+ {
+ /* Prevent multiple threads to change the service table. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Reconsider database variable in case some other thread called
+ `__nss_configure_lookup' while we waited for the lock. */
+ if (*ni != NULL)
+ {
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+ return 0;
+ }
+
++#if __OPTION_EGLIBC_NSSWITCH
+ /* Are we initialized yet? */
+ if (service_table == NULL)
+ /* Read config file. */
+ service_table = nss_parse_file (_PATH_NSSWITCH_CONF);
++#endif
+
+ /* Test whether configuration data is available. */
+ if (service_table != NULL)
+@@ -144,6 +173,7 @@
+ *ni = entry->service;
+ }
+
++#if __OPTION_EGLIBC_NSSWITCH
+ /* No configuration data is available, either because nsswitch.conf
+ doesn't exist or because it doesn't have a line for this database.
+
+@@ -166,13 +196,23 @@
+ {
+ entry->next = defconfig_entries;
+ entry->service = *ni;
+- entry->name[0] = '\0';
++ entry->name = "";
+ defconfig_entries = entry;
+ }
+ }
+ }
++#else
++ /* Without the dynamic behavior, we can't process defconfig. The
++ databases the user specified at library build time are all you
++ get. */
++ if (*ni == NULL)
++ {
++ unlock_nsswitch;
++ return -1;
++ }
++#endif
+
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return *ni != NULL ? 0 : -1;
+ }
+@@ -252,6 +292,7 @@
+ libc_hidden_def (__nss_next2)
+
+
++#if __OPTION_EGLIBC_NSSWITCH
+ int
+ attribute_compat_text_section
+ __nss_next (service_user **ni, const char *fct_name, void **fctp, int status,
+@@ -300,13 +341,13 @@
+ }
+
+ /* Prevent multiple threads to change the service table. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Install new rules. */
+ *databases[cnt].dbp = new_db;
+ __nss_database_custom[cnt] = true;
+
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return 0;
+ }
+@@ -402,7 +443,7 @@
+ void **found, *result;
+
+ /* We now modify global data. Protect it. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Search the tree of functions previously requested. Data in the
+ tree are `known_function' structures, whose first member is a
+@@ -413,7 +454,7 @@
+ enough to a pointer to our structure to use as a lookup key that
+ will be passed to `known_compare' (above). */
+
+- found = __tsearch (&fct_name, &ni->known, &known_compare);
++ found = __tsearch (&fct_name, &ni->known.tree, &known_compare);
+ if (found == NULL)
+ /* This means out-of-memory. */
+ result = NULL;
+@@ -440,7 +481,7 @@
+ #endif
+ /* Oops. We can't instantiate this node properly.
+ Remove it from the tree. */
+- __tdelete (&fct_name, &ni->known, &known_compare);
++ __tdelete (&fct_name, &ni->known.tree, &known_compare);
+ free (known);
+ result = NULL;
+ }
+@@ -520,13 +561,43 @@
+ }
+
+ /* Remove the lock. */
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return result;
+ }
+ libc_hidden_def (__nss_lookup_function)
+
+
++#else /* below if ! __OPTION_EGLIBC_NSSWITCH */
++
++
++int
++__nss_configure_lookup (const char *dbname, const char *service_line)
++{
++ /* We can't dynamically configure lookup without
++ OPTION_EGLIBC_NSSWITCH. */
++ __set_errno (EINVAL);
++ return -1;
++}
++
++
++void *
++__nss_lookup_function (service_user *ni, const char *fct_name)
++{
++ int i;
++ const known_function **known = ni->known.array;
++
++ for (i = 0; known[i]; i++)
++ if (strcmp (fct_name, known[i]->fct_name) == 0)
++ return known[i]->fct_ptr;
++
++ return NULL;
++}
++libc_hidden_def (__nss_lookup_function)
++#endif
++
++
++#if __OPTION_EGLIBC_NSSWITCH
+ static name_database *
+ internal_function
+ nss_parse_file (const char *fname)
+@@ -632,8 +703,10 @@
+ + (line - name + 1));
+ if (new_service == NULL)
+ return result;
++ new_service->name = (char *) (new_service + 1);
+
+- *((char *) __mempcpy (new_service->name, name, line - name)) = '\0';
++ *((char *) __mempcpy ((char *) new_service->name, name, line - name))
++ = '\0';
+
+ /* Set default actions. */
+ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
+@@ -642,7 +715,7 @@
+ new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
+ new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
+ new_service->library = NULL;
+- new_service->known = NULL;
++ new_service->known.tree = NULL;
+ new_service->next = NULL;
+
+ while (isspace (line[0]))
+@@ -778,9 +851,10 @@
+ result = (name_database_entry *) malloc (sizeof (name_database_entry) + len);
+ if (result == NULL)
+ return NULL;
++ result->name = (char *) (result + 1);
+
+ /* Save the database name. */
+- memcpy (result->name, name, len);
++ memcpy ((char *) result->name, name, len);
+
+ /* Parse the list of services. */
+ result->service = nss_parse_service_list (line);
+@@ -816,6 +890,7 @@
+ return *currentp;
+ }
+ #endif
++#endif /* __OPTION_EGLIBC_NSSWITCH */
+
+
+ #if defined SHARED && defined USE_NSCD
+@@ -834,6 +909,7 @@
+ }
+
+
++#if __OPTION_EGLIBC_INET
+ /* Called by nscd and nscd alone. */
+ void
+ __nss_disable_nscd (void (*cb) (size_t, struct traced_file *))
+@@ -857,8 +933,10 @@
+ __nss_not_use_nscd_services = -1;
+ __nss_not_use_nscd_netgroup = -1;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+ #endif
+
++#if __OPTION_EGLIBC_NSSWITCH
+ static void
+ free_database_entries (name_database_entry *entry)
+ {
+@@ -871,8 +949,8 @@
+ {
+ service_user *olds = service;
+
+- if (service->known != NULL)
+- __tdestroy (service->known, free);
++ if (service->known.tree != NULL)
++ __tdestroy (service->known.tree, free);
+
+ service = service->next;
+ free (olds);
+@@ -926,3 +1004,4 @@
+
+ free (top);
+ }
++#endif /* __OPTION_EGLIBC_NSSWITCH */
+Index: git/nss/nsswitch.h
+===================================================================
+--- git.orig/nss/nsswitch.h 2014-08-29 20:00:53.012070587 -0700
++++ git/nss/nsswitch.h 2014-08-29 20:01:15.220070587 -0700
+@@ -65,10 +65,20 @@
+ lookup_actions actions[5];
+ /* Link to the underlying library object. */
+ service_library *library;
+- /* Collection of known functions. */
+- void *known;
++ /* Collection of known functions.
++
++ With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
++ 'tsearch'-style tree.
++
++ With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
++ pointers to known_function structures, NULL-terminated. */
++ union
++ {
++ void *tree;
++ const known_function **array;
++ } known;
+ /* Name of the service (`files', `dns', `nis', ...). */
+- char name[0];
++ const char *name;
+ } service_user;
+
+ /* To access the action based on the status value use this macro. */
+@@ -82,7 +92,7 @@
+ /* List of service to be used. */
+ service_user *service;
+ /* Name of the database. */
+- char name[0];
++ const char *name;
+ } name_database_entry;
+
+
+Index: git/posix/bug-regex1.c
+===================================================================
+--- git.orig/posix/bug-regex1.c 2014-08-29 20:00:53.184070587 -0700
++++ git/posix/bug-regex1.c 2014-08-29 20:01:15.220070587 -0700
+@@ -4,6 +4,7 @@
+ #include <string.h>
+ #include <regex.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ int
+ main (void)
+@@ -17,7 +18,9 @@
+ memset (&regex, '\0', sizeof (regex));
+
+ setlocale (LC_ALL, "de_DE.ISO-8859-1");
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ fwide (stdout, -1);
++#endif
+
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG);
+
+Index: git/posix/bug-regex6.c
+===================================================================
+--- git.orig/posix/bug-regex6.c 2014-08-29 20:00:53.204070587 -0700
++++ git/posix/bug-regex6.c 2014-08-29 20:01:15.220070587 -0700
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <regex.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -30,7 +31,12 @@
+ regex_t re;
+ regmatch_t mat[10];
+ int i, j, ret = 0;
+- const char *locales[] = { "C", "de_DE.UTF-8" };
++ const char *locales[] = {
++ "C",
++#if __OPTION_EGLIBC_LOCALE_CODE
++ "de_DE.UTF-8"
++#endif
++ };
+ const char *string = "http://www.regex.com/pattern/matching.html#intro";
+ regmatch_t expect[10] = {
+ { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 },
+Index: git/posix/fnmatch.c
+===================================================================
+--- git.orig/posix/fnmatch.c 2014-08-29 20:00:53.208070587 -0700
++++ git/posix/fnmatch.c 2014-08-29 20:01:15.220070587 -0700
+@@ -30,6 +30,10 @@
+ #include <ctype.h>
+ #include <string.h>
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined STDC_HEADERS || defined _LIBC
+ # include <stdlib.h>
+ #endif
+@@ -131,7 +135,7 @@
+ # define ISWCTYPE(WC, WT) iswctype (WC, WT)
+ # endif
+
+-# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
++# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS && _LIBC && __OPTION_EGLIBC_LOCALE_CODE)
+ /* In this case we are implementing the multibyte character handling. */
+ # define HANDLE_MULTIBYTE 1
+ # endif
+Index: git/posix/fnmatch_loop.c
+===================================================================
+--- git.orig/posix/fnmatch_loop.c 2014-08-29 20:00:53.220070587 -0700
++++ git/posix/fnmatch_loop.c 2014-08-29 20:01:15.220070587 -0700
+@@ -15,6 +15,8 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
++
+ #include <stdint.h>
+
+ struct STRUCT
+@@ -54,10 +56,15 @@
+ const char *collseq = (const char *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ # else
++# if __OPTION_EGLIBC_LOCALE_CODE
+ const UCHAR *collseq = (const UCHAR *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+-# endif
+-#endif
++# define COLLSEQ_BYTE_LOOKUP(ix) (collseq[(ix)])
++# else
++# define COLLSEQ_BYTE_LOOKUP(ix) (ix)
++# endif /* __OPTION_EGLIBC_LOCALE_CODE */
++# endif /* WIDE_CHAR_VERSION */
++#endif /* _LIBC */
+
+ while ((c = *p++) != L('\0'))
+ {
+@@ -277,7 +284,7 @@
+ /* Leave room for the null. */
+ CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
+ size_t c1 = 0;
+-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
++#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
+ wctype_t wt;
+ #endif
+ const CHAR *startp = p;
+@@ -307,7 +314,7 @@
+ }
+ str[c1] = L('\0');
+
+-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
++#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
+ wt = IS_CHAR_CLASS (str);
+ if (wt == 0)
+ /* Invalid character class name. */
+@@ -681,8 +688,10 @@
+ else
+ lcollseq = __collseq_table_lookup (collseq, cold);
+ # else
+- fcollseq = collseq[fn];
+- lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
++ fcollseq = COLLSEQ_BYTE_LOOKUP (fn);
++ lcollseq = (is_seqval
++ ? cold
++ : COLLSEQ_BYTE_LOOKUP ((UCHAR) cold));
+ # endif
+
+ is_seqval = 0;
+@@ -858,7 +867,7 @@
+ goto matched;
+ }
+ # else
+- hcollseq = collseq[cend];
++ hcollseq = COLLSEQ_BYTE_LOOKUP (cend);
+ # endif
+ }
+
+Index: git/posix/glob.c
+===================================================================
+--- git.orig/posix/glob.c 2014-08-29 20:00:53.232070587 -0700
++++ git/posix/glob.c 2014-08-29 20:01:15.220070587 -0700
+@@ -25,6 +25,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stddef.h>
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
+
+ /* Outcomment the following line for production quality code. */
+ /* #define NDEBUG 1 */
+@@ -607,6 +610,7 @@
+ if (home_dir == NULL || home_dir[0] == '\0')
+ home_dir = "c:/users/default"; /* poor default */
+ # else
++# if ! _LIBC || __OPTION_EGLIBC_GETLOGIN
+ if (home_dir == NULL || home_dir[0] == '\0')
+ {
+ int success;
+@@ -623,19 +627,19 @@
+ if (success)
+ {
+ struct passwd *p;
+-# if defined HAVE_GETPWNAM_R || defined _LIBC
++# if defined HAVE_GETPWNAM_R || defined _LIBC
+ long int pwbuflen = GETPW_R_SIZE_MAX ();
+ char *pwtmpbuf;
+ struct passwd pwbuf;
+ int malloc_pwtmpbuf = 0;
+ int save = errno;
+
+-# ifndef _LIBC
++# ifndef _LIBC
+ if (pwbuflen == -1)
+ /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
+ Try a moderate value. */
+ pwbuflen = 1024;
+-# endif
++# endif
+ if (__libc_use_alloca (alloca_used + pwbuflen))
+ pwtmpbuf = alloca_account (pwbuflen, alloca_used);
+ else
+@@ -682,9 +686,9 @@
+ }
+ __set_errno (save);
+ }
+-# else
++# else
+ p = getpwnam (name);
+-# endif
++# endif
+ if (p != NULL)
+ {
+ if (!malloc_pwtmpbuf)
+@@ -713,6 +717,7 @@
+ }
+ }
+ }
++# endif /* ! _LIBC || __OPTION_EGLIBC_GETLOGIN */
+ if (home_dir == NULL || home_dir[0] == '\0')
+ {
+ if (flags & GLOB_TILDE_CHECK)
+Index: git/posix/Makefile
+===================================================================
+--- git.orig/posix/Makefile 2014-08-29 20:00:53.160070587 -0700
++++ git/posix/Makefile 2014-08-29 20:01:15.220070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for POSIX portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := posix
+
+ include ../Makeconfig
+@@ -43,13 +45,24 @@
+ getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
+ getresuid getresgid setresuid setresgid \
+ pathconf sysconf fpathconf \
+- glob glob64 fnmatch regex \
++ glob glob64 fnmatch \
+ confstr \
+ getopt getopt1 getopt_init \
+ sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
+ sched_primin sched_rr_gi sched_getaffinity sched_setaffinity \
+- getaddrinfo gai_strerror wordexp \
+ pread pwrite pread64 pwrite64 \
++ posix_madvise \
++ get_child_max sched_cpucount sched_cpualloc sched_cpufree
++
++routines-$(OPTION_EGLIBC_INET) += getaddrinfo gai_strerror
++
++ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
++routines-$(OPTION_POSIX_REGEXP) += regex
++else
++routines-$(OPTION_POSIX_REGEXP) += xregex
++endif
++
++routines-$(OPTION_EGLIBC_SPAWN) += \
+ spawn_faction_init spawn_faction_destroy spawn_faction_addclose \
+ spawn_faction_addopen spawn_faction_adddup2 \
+ spawnattr_init spawnattr_destroy \
+@@ -57,41 +70,53 @@
+ spawnattr_getflags spawnattr_setflags \
+ spawnattr_getpgroup spawnattr_setpgroup spawn spawnp spawni \
+ spawnattr_getsigmask spawnattr_getschedpolicy spawnattr_getschedparam \
+- spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam \
+- posix_madvise \
+- get_child_max sched_cpucount sched_cpualloc sched_cpufree
++ spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam
++routines-$(OPTION_EGLIBC_WORDEXP) += wordexp
+
+ aux := init-posix environ
+-tests := tstgetopt testfnm runtests runptests \
++tests := tstgetopt testfnm runtests \
+ tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
+- tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \
+- tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
+- tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \
+- tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \
+- bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
+- bug-regex13 bug-regex14 bug-regex15 bug-regex16 \
+- bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
+- bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
+- bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
+- bug-regex29 bug-regex30 bug-regex31 bug-regex32 \
+- bug-regex33 tst-nice tst-nanosleep tst-regex2 \
+- transbug tst-rxspencer tst-pcre tst-boost \
+- bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
+- tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
++ tst-getlogin tst-mmap tst-truncate \
++ tst-truncate64 tst-fork tst-dir \
++ tst-chmod bug-regex2 bug-regex3 bug-regex4 \
++ tst-gnuglob bug-regex6 bug-regex7 \
++ bug-regex8 bug-regex9 bug-regex10 bug-regex12 \
++ bug-regex14 bug-regex15 \
++ bug-regex21 bug-regex24 \
++ bug-regex27 bug-regex28 bug-regex29 bug-regex30 \
++ bug-regex31 \
++ tst-nice tst-nanosleep \
++ transbug \
++ tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
++ bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
+ tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \
+ tst-execv1 tst-execv2 tst-execl1 tst-execl2 \
+ tst-execve1 tst-execve2 tst-execle1 tst-execle2 \
+- tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \
+- tst-rfc3484-3 \
+- tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \
++ tst-execvp3 tst-execvp4 \
++ tst-fnmatch2 tst-cpucount tst-cpuset \
+ bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
+ bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \
+ tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \
+ tst-fnmatch3 bug-regex36
+-xtests := bug-ga2
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \
++ bug-regex23 bug-regex25 bug-regex32 bug-regex33
++tests-$(OPTION_EGLIBC_INET) \
++ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \
++ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3
++tests-$(OPTION_POSIX_REGEXP_GLIBC) \
++ += runptests bug-regex11 bug-regex13 bug-regex16 \
++ tst-regex2 tst-rxspencer tst-pcre tst-boost
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC))
++tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
++ bug-regex22 bug-regex26
++endif
++xtests-$(OPTION_EGLIBC_INET) += bug-ga2
+ ifeq (yes,$(build-shared))
+ test-srcs := globtest
+-tests += wordexp-test tst-exec tst-spawn
++tests += tst-exec
++tests-$(OPTION_EGLIBC_SPAWN) += tst-spawn
++tests-$(OPTION_EGLIBC_WORDEXP) += wordexp-test
+ endif
+ tests-static = tst-exec-static tst-spawn-static
+ tests += $(tests-static)
+@@ -117,7 +142,10 @@
+
+ ifeq ($(run-built-tests),yes)
+ ifeq (yes,$(build-shared))
+-tests-special += $(objpfx)globtest.out $(objpfx)wordexp-tst.out
++tests-special += $(objpfx)globtest.out
++ifeq (y,$(OPTION_EGLIBC_WORDEXP))
++tests-special += $(objpfx)wordexp-tst.out
++endif
+ endif
+ endif
+
+@@ -125,12 +153,16 @@
+ # XXX Please note that for now we ignore the result of this test.
+ tests-special += $(objpfx)annexc.out
+ ifeq ($(run-built-tests),yes)
+-tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \
++tests-special += $(objpfx)bug-regex2-mem.out \
+ $(objpfx)bug-regex21-mem.out $(objpfx)bug-regex31-mem.out \
+- $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \
+- $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \
++ $(objpfx)tst-getconf.out \
+ $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \
+ $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out
++ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
++tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \
++ $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out
++endif
++
+ xtests-special += $(objpfx)bug-ga2-mem.out
+ endif
+
+@@ -143,6 +175,8 @@
+ $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
+ '$(test-program-prefix)' '$(test-wrapper-env)'; \
+ $(evaluate-test)
++LDLIBS-globtest += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
++
+ $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
+ $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
+ '$(run-program-env)' '$(test-program-prefix-after-env)'; \
+@@ -205,7 +239,10 @@
+ tst-chmod-ARGS = $(objdir)
+ tst-vfork3-ARGS = --test-dir=$(objpfx)
+
+-tst-rxspencer-ARGS = --utf8 rxspencer/tests
++tst-rxspencer-ARGS = rxspencer/tests
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++tst-rxspencer-ARGS += --utf8
++endif
+ tst-rxspencer-no-utf8-ARGS = rxspencer/tests
+ tst-pcre-ARGS = PCRE.tests
+ tst-boost-ARGS = BOOST.tests
+Index: git/posix/regcomp.c
+===================================================================
+--- git.orig/posix/regcomp.c 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regcomp.c 2014-08-29 20:01:15.224070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
+ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
+ size_t length, reg_syntax_t syntax);
+@@ -305,7 +306,7 @@
+ {
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ int node_cnt;
+- int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
++ int icase = (dfa_mb_cur_max (dfa) == 1 && (bufp->syntax & RE_ICASE));
+ for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
+ {
+ int node = init_state->nodes.elems[node_cnt];
+@@ -315,9 +316,9 @@
+ {
+ re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
+ #ifdef RE_ENABLE_I18N
+- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
++ if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ {
+- unsigned char *buf = alloca (dfa->mb_cur_max), *p;
++ unsigned char *buf = alloca (dfa_mb_cur_max (dfa)), *p;
+ wchar_t wc;
+ mbstate_t state;
+
+@@ -348,7 +349,11 @@
+ re_set_fastmap (fastmap, icase, ch);
+ }
+ }
+-#ifdef RE_ENABLE_I18N
++
++ /* When OPTION_EGLIBC_LOCALE_CODE is disabled, the current
++ locale is always C, which has no rules and no multi-byte
++ characters. */
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ else if (type == COMPLEX_BRACKET)
+ {
+ re_charset_t *cset = dfa->nodes[node].opr.mbcset;
+@@ -376,7 +381,7 @@
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+- if (dfa->mb_cur_max > 1
++ if (dfa_mb_cur_max (dfa) > 1
+ && (cset->nchar_classes || cset->non_match || cset->nranges
+ # ifdef _LIBC
+ || cset->nequiv_classes
+@@ -404,7 +409,7 @@
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
++ if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+@@ -413,7 +418,7 @@
+ }
+ }
+ }
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ else if (type == OP_PERIOD
+ #ifdef RE_ENABLE_I18N
+ || type == OP_UTF8_PERIOD
+@@ -856,11 +861,15 @@
+
+ dfa->mb_cur_max = MB_CUR_MAX;
+ #ifdef _LIBC
+- if (dfa->mb_cur_max == 6
++ if (dfa_mb_cur_max (dfa) == 6
+ && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
+ dfa->is_utf8 = 1;
++# if __OPTION_EGLIBC_LOCALE_CODE
+ dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
+ != 0);
++# else
++ dfa->map_notascii = 0;
++# endif
+ #else
+ # ifdef HAVE_LANGINFO_CODESET
+ codeset_name = nl_langinfo (CODESET);
+@@ -886,7 +895,7 @@
+ #endif
+
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ if (dfa->is_utf8)
+ dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
+@@ -1784,7 +1793,7 @@
+ token->word_char = 0;
+ #ifdef RE_ENABLE_I18N
+ token->mb_partial = 0;
+- if (input->mb_cur_max > 1 &&
++ if (string_mb_cur_max (input) > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+@@ -1805,7 +1814,7 @@
+ token->opr.c = c2;
+ token->type = CHARACTER;
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc = re_string_wchar_at (input,
+ re_string_cur_idx (input) + 1);
+@@ -1919,7 +1928,7 @@
+
+ token->type = CHARACTER;
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+@@ -2019,7 +2028,7 @@
+ token->opr.c = c;
+
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1 &&
++ if (string_mb_cur_max (input) > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+@@ -2242,7 +2251,7 @@
+ return NULL;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ while (!re_string_eoi (regexp)
+ && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
+@@ -2380,7 +2389,7 @@
+ *err = REG_ESPACE;
+ return NULL;
+ }
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ dfa->has_mb_node = 1;
+ break;
+ case OP_WORD:
+@@ -2686,7 +2695,7 @@
+ However, for !_LIBC we have no collation elements: if the
+ character set is single byte, the single byte character set
+ that we build below suffices. parse_bracket_exp passes
+- no MBCSET if dfa->mb_cur_max == 1. */
++ no MBCSET if dfa_mb_cur_max (dfa) == 1. */
+ if (mbcset)
+ {
+ /* Check the space of the arrays. */
+@@ -2782,7 +2791,13 @@
+ reg_syntax_t syntax, reg_errcode_t *err)
+ {
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ const unsigned char *collseqmb;
++# define COLLSEQMB_LOOKUP(ix) (collseqmb[(ix)])
++#else
++# define COLLSEQMB_LOOKUP(ix) (ix)
++#endif
++
+ const char *collseqwc;
+ uint32_t nrules;
+ int32_t table_size;
+@@ -2830,18 +2845,20 @@
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+- return collseqmb[br_elem->opr.ch];
++ return COLLSEQMB_LOOKUP (br_elem->opr.ch);
+ else
+ {
+ wint_t wc = __btowc (br_elem->opr.ch);
+ return __collseq_table_lookup (collseqwc, wc);
+ }
+ }
++#if __OPTION_EGLIBC_LOCALE_CODE
+ else if (br_elem->type == MB_CHAR)
+ {
+ if (nrules != 0)
+ return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
+ }
++#endif
+ else if (br_elem->type == COLL_SYM)
+ {
+ size_t sym_name_len = strlen ((char *) br_elem->opr.name);
+@@ -2872,11 +2889,11 @@
+ {
+ /* No valid character. Match it as a single byte
+ character. */
+- return collseqmb[br_elem->opr.name[0]];
++ return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
+ }
+ }
+ else if (sym_name_len == 1)
+- return collseqmb[br_elem->opr.name[0]];
++ return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
+ }
+ return UINT_MAX;
+ }
+@@ -2916,7 +2933,7 @@
+ However, if we have no collation elements, and the character set
+ is single byte, the single byte character set that we
+ build below suffices. */
+- if (nrules > 0 || dfa->mb_cur_max > 1)
++ if (nrules > 0 || dfa_mb_cur_max (dfa) > 1)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+@@ -2953,7 +2970,7 @@
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+- ch_collseq = collseqmb[ch];
++ ch_collseq = COLLSEQMB_LOOKUP (ch);
+ else
+ ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
+ if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
+@@ -3031,7 +3048,10 @@
+ re_bitset_ptr_t sbcset;
+ #ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+- int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
++ int coll_sym_alloc = 0, range_alloc = 0;
++#if __OPTION_EGLIBC_LOCALE_CODE
++ int mbchar_alloc = 0;
++#endif
+ int equiv_class_alloc = 0, char_class_alloc = 0;
+ #endif /* not RE_ENABLE_I18N */
+ int non_match = 0;
+@@ -3039,9 +3059,15 @@
+ int token_len;
+ int first_round = 1;
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ collseqmb = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++#else
++ /* This is true when OPTION_EGLIBC_LOCALE_CODE is disabled, but the
++ compiler can't figure that out. */
++ nrules = 0;
++#endif
+ if (nrules)
+ {
+ /*
+@@ -3169,7 +3195,7 @@
+ #else
+ # ifdef RE_ENABLE_I18N
+ *err = build_range_exp (sbcset,
+- dfa->mb_cur_max > 1 ? mbcset : NULL,
++ dfa_mb_cur_max (dfa) > 1 ? mbcset : NULL,
+ &range_alloc, &start_elem, &end_elem);
+ # else
+ *err = build_range_exp (sbcset, &start_elem, &end_elem);
+@@ -3185,7 +3211,7 @@
+ case SB_CHAR:
+ bitset_set (sbcset, start_elem.opr.ch);
+ break;
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ case MB_CHAR:
+ /* Check whether the array has enough space. */
+ if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+@@ -3203,7 +3229,7 @@
+ }
+ mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
+ break;
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ case EQUIV_CLASS:
+ *err = build_equiv_class (sbcset,
+ #ifdef RE_ENABLE_I18N
+@@ -3253,11 +3279,11 @@
+
+ #ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+
+ if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
+- || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
++ || mbcset->nranges || (dfa_mb_cur_max (dfa) > 1 && (mbcset->nchar_classes
+ || mbcset->non_match)))
+ {
+ bin_tree_t *mbc_tree;
+@@ -3326,7 +3352,7 @@
+ re_token_t *token, int token_len, re_dfa_t *dfa,
+ reg_syntax_t syntax, int accept_hyphen)
+ {
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ int cur_char_size;
+ cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
+ if (cur_char_size > 1)
+@@ -3336,7 +3362,7 @@
+ re_string_skip_bytes (regexp, cur_char_size);
+ return REG_NOERROR;
+ }
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
+ || token->type == OP_OPEN_EQUIV_CLASS)
+@@ -3416,7 +3442,9 @@
+ build_equiv_class (bitset_t sbcset, const unsigned char *name)
+ #endif /* not RE_ENABLE_I18N */
+ {
+-#ifdef _LIBC
++ /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C locale
++ is supported; it has no collation rules. */
++#if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+@@ -3488,7 +3516,7 @@
+ mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
+ }
+ else
+-#endif /* _LIBC */
++#endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ {
+ if (BE (strlen ((const char *) name) != 1, 0))
+ return REG_ECOLLATE;
+@@ -3522,7 +3550,7 @@
+ && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
+ name = "alpha";
+
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ /* Check the space of the arrays. */
+ if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ {
+@@ -3538,7 +3566,7 @@
+ *char_class_alloc = new_char_class_alloc;
+ }
+ mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+
+ #define BUILD_CHARCLASS_LOOP(ctype_func) \
+ do { \
+@@ -3649,7 +3677,7 @@
+
+ #ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+ #endif
+
+@@ -3661,7 +3689,7 @@
+ goto build_word_op_espace;
+
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ bin_tree_t *mbc_tree;
+ /* Build a tree for complex bracket. */
+Index: git/posix/regexec.c
+===================================================================
+--- git.orig/posix/regexec.c 2014-08-29 20:00:53.268070587 -0700
++++ git/posix/regexec.c 2014-08-29 20:01:15.224070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
+ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
+ int n) internal_function;
+@@ -186,11 +187,11 @@
+ static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
+ const re_string_t *input, int idx)
+ internal_function;
+-# ifdef _LIBC
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ static unsigned int find_collation_sequence_value (const unsigned char *mbs,
+ size_t name_len)
+ internal_function;
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ #endif /* RE_ENABLE_I18N */
+ static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
+ const re_dfastate_t *state,
+@@ -255,25 +256,9 @@
+ return err != REG_NOERROR;
+ }
+
+-#ifdef _LIBC
+-# include <shlib-compat.h>
+-versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+-
+-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+-__typeof__ (__regexec) __compat_regexec;
+-
+-int
+-attribute_compat_text_section
+-__compat_regexec (const regex_t *__restrict preg,
+- const char *__restrict string, size_t nmatch,
+- regmatch_t pmatch[], int eflags)
+-{
+- return regexec (preg, string, nmatch, pmatch,
+- eflags & (REG_NOTBOL | REG_NOTEOL));
+-}
+-compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+-# endif
+-#endif
++/* EGLIBC: The code that used to be here was move to a separate file
++ so that it can be shared with xregex.c. */
++#include "regexec-compat.c"
+
+ /* Entry points for GNU code. */
+
+@@ -728,7 +713,7 @@
+ incr = (range < 0) ? -1 : 1;
+ left_lim = (range < 0) ? start + range : start;
+ right_lim = (range < 0) ? start : start + range;
+- sb = dfa->mb_cur_max == 1;
++ sb = dfa_mb_cur_max (dfa) == 1;
+ match_kind =
+ (fastmap
+ ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
+@@ -3448,7 +3433,7 @@
+ if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+
+- if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
++ if (dest_states[i] != dest_states_word[i] && dfa_mb_cur_max (dfa) > 1)
+ need_word_trtable = 1;
+
+ dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
+@@ -3590,7 +3575,7 @@
+ else if (type == OP_PERIOD)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_merge (accepts, dfa->sb_char);
+ else
+ #endif
+@@ -3641,7 +3626,7 @@
+ continue;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+ else
+@@ -3660,7 +3645,7 @@
+ continue;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
+ else
+@@ -3832,12 +3817,6 @@
+ if (node->type == COMPLEX_BRACKET)
+ {
+ const re_charset_t *cset = node->opr.mbcset;
+-# ifdef _LIBC
+- const unsigned char *pin
+- = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
+- int j;
+- uint32_t nrules;
+-# endif /* _LIBC */
+ int match_len = 0;
+ wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
+ ? re_string_wchar_at (input, str_idx) : 0);
+@@ -3849,6 +3828,7 @@
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* match with character_class? */
+ for (i = 0; i < cset->nchar_classes; ++i)
+ {
+@@ -3859,8 +3839,16 @@
+ goto check_node_accept_bytes_match;
+ }
+ }
++#endif
++
++ /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C
++ locale is supported; it has no collation rules. */
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
++ const unsigned char *pin
++ = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
++ int j;
++ uint32_t nrules;
+
+-# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+@@ -3953,8 +3941,12 @@
+ }
+ }
+ else
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ {
++ /* In the _LIBC version, if OPTION_EGLIBC_LOCALE_CODE is
++ disabled, there can be no multibyte range endpoints, and
++ cset->nranges is always zero. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* match with range expression? */
+ #if __GNUC__ >= 2
+ wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
+@@ -3973,6 +3965,7 @@
+ goto check_node_accept_bytes_match;
+ }
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+ }
+ check_node_accept_bytes_match:
+ if (!cset->non_match)
+@@ -3988,7 +3981,7 @@
+ return 0;
+ }
+
+-# ifdef _LIBC
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ static unsigned int
+ internal_function
+ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
+@@ -4046,7 +4039,7 @@
+ return UINT_MAX;
+ }
+ }
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ #endif /* RE_ENABLE_I18N */
+
+ /* Check whether the node accepts the byte which is IDX-th
+@@ -4137,7 +4130,7 @@
+ if (pstr->icase)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+@@ -4150,7 +4143,7 @@
+ else
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ build_wcs_buffer (pstr);
+ else
+ #endif /* RE_ENABLE_I18N */
+Index: git/posix/regexec-compat.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/posix/regexec-compat.c 2014-08-29 20:01:15.224070587 -0700
+@@ -0,0 +1,39 @@
++/* Extended regular expression matching and search library.
++ Copyright (C) 2008 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifdef _LIBC
++# include <shlib-compat.h>
++versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
++
++# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
++__typeof__ (__regexec) __compat_regexec;
++
++int
++attribute_compat_text_section
++__compat_regexec (const regex_t *__restrict preg,
++ const char *__restrict string, size_t nmatch,
++ regmatch_t pmatch[], int eflags)
++{
++ return regexec (preg, string, nmatch, pmatch,
++ eflags & (REG_NOTBOL | REG_NOTEOL));
++}
++compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
++# endif
++#endif
+Index: git/posix/regex.h
+===================================================================
+--- git.orig/posix/regex.h 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex.h 2014-08-29 20:01:15.224070587 -0700
+@@ -21,6 +21,7 @@
+ #define _REGEX_H 1
+
+ #include <sys/types.h>
++#include <gnu/option-groups.h>
+
+ /* Allow the use in C++ code. */
+ #ifdef __cplusplus
+@@ -156,6 +157,8 @@
+ treated as 'a\{1'. */
+ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
++/* EGLIBC: Old regex implementation does not support these. */
++# if __OPTION_POSIX_REGEXP_GLIBC
+ /* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+@@ -172,6 +175,7 @@
+ /* If this bit is set, then no_sub will be set to 1 during
+ re_compile_pattern. */
+ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
++# endif /* __OPTION_POSIX_REGEXP_GLIBC */
+ #endif
+
+ /* This global variable defines the particular regexp syntax to use (for
+@@ -231,8 +235,13 @@
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
++#if __OPTION_POSIX_REGEXP_GLIBC
+ #define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
++#else
++#define RE_SYNTAX_POSIX_BASIC \
++ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
++#endif
+
+ /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+@@ -298,9 +307,11 @@
+ /* Like REG_NOTBOL, except for the end-of-line. */
+ #define REG_NOTEOL (1 << 1)
+
++#if __OPTION_POSIX_REGEXP_GLIBC
+ /* Use PMATCH[0] to delimit the start and end of the search in the
+ buffer. */
+ #define REG_STARTEND (1 << 2)
++#endif
+
+
+ /* If any error codes are removed, changed, or added, update the
+Index: git/posix/regex_internal.c
+===================================================================
+--- git.orig/posix/regex_internal.c 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex_internal.c 2014-08-29 20:01:15.224070587 -0700
+@@ -43,8 +43,8 @@
+ int init_buf_len;
+
+ /* Ensure at least one character fits into the buffers. */
+- if (init_len < dfa->mb_cur_max)
+- init_len = dfa->mb_cur_max;
++ if (init_len < dfa_mb_cur_max (dfa))
++ init_len = dfa_mb_cur_max (dfa);
+ init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+@@ -55,7 +55,7 @@
+ pstr->word_char = dfa->word_char;
+ pstr->word_ops_used = dfa->word_ops_used;
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+- pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
++ pstr->valid_len = (pstr->mbs_allocated || dfa_mb_cur_max (dfa) > 1) ? 0 : len;
+ pstr->valid_raw_len = pstr->valid_len;
+ return REG_NOERROR;
+ }
+@@ -82,7 +82,7 @@
+ if (icase)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ while (1)
+ {
+@@ -91,7 +91,7 @@
+ return ret;
+ if (pstr->valid_raw_len >= len)
+ break;
+- if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
++ if (pstr->bufs_len > pstr->valid_len + dfa_mb_cur_max (dfa))
+ break;
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+@@ -105,7 +105,7 @@
+ else
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ build_wcs_buffer (pstr);
+ else
+ #endif /* RE_ENABLE_I18N */
+@@ -130,7 +130,7 @@
+ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ wint_t *new_wcs;
+
+@@ -177,7 +177,7 @@
+ pstr->trans = trans;
+ pstr->icase = icase ? 1 : 0;
+ pstr->mbs_allocated = (trans != NULL || icase);
+- pstr->mb_cur_max = dfa->mb_cur_max;
++ pstr->mb_cur_max = dfa_mb_cur_max (dfa);
+ pstr->is_utf8 = dfa->is_utf8;
+ pstr->map_notascii = dfa->map_notascii;
+ pstr->stop = pstr->len;
+@@ -203,7 +203,7 @@
+ {
+ #ifdef _LIBC
+ unsigned char buf[MB_LEN_MAX];
+- assert (MB_LEN_MAX >= pstr->mb_cur_max);
++ assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
+ #else
+ unsigned char buf[64];
+ #endif
+@@ -226,7 +226,7 @@
+ {
+ int i, ch;
+
+- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
++ for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
+ buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
+@@ -275,7 +275,7 @@
+ size_t mbclen;
+ #ifdef _LIBC
+ char buf[MB_LEN_MAX];
+- assert (MB_LEN_MAX >= pstr->mb_cur_max);
++ assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
+ #else
+ char buf[64];
+ #endif
+@@ -369,7 +369,7 @@
+ {
+ int i, ch;
+
+- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
++ for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
+ buf[i] = pstr->trans[ch];
+@@ -567,8 +567,9 @@
+ }
+
+ /* This function re-construct the buffers.
+- Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
+- convert to upper case in case of REG_ICASE, apply translation. */
++ Concretely, convert to wide character in case of
++ string_mb_cur_max (pstr) > 1, convert to upper case in case of
++ REG_ICASE, apply translation. */
+
+ static reg_errcode_t
+ internal_function __attribute_warn_unused_result__
+@@ -579,7 +580,7 @@
+ {
+ /* Reset buffer. */
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+ #endif /* RE_ENABLE_I18N */
+ pstr->len = pstr->raw_len;
+@@ -670,7 +671,7 @@
+ pstr->tip_context = re_string_context_at (pstr, offset - 1,
+ eflags);
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+ #endif /* RE_ENABLE_I18N */
+@@ -699,7 +700,7 @@
+ #endif
+ pstr->valid_len = 0;
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ int wcs_idx;
+ wint_t wc = WEOF;
+@@ -711,7 +712,7 @@
+ /* Special case UTF-8. Multi-byte chars start with any
+ byte other than 0x80 - 0xbf. */
+ raw = pstr->raw_mbs + pstr->raw_mbs_idx;
+- end = raw + (offset - pstr->mb_cur_max);
++ end = raw + (offset - string_mb_cur_max (pstr));
+ if (end < pstr->raw_mbs)
+ end = pstr->raw_mbs;
+ p = raw + offset - 1;
+@@ -803,7 +804,7 @@
+
+ /* Then build the buffers. */
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ if (pstr->icase)
+ {
+@@ -841,7 +842,7 @@
+ return re_string_peek_byte (pstr, idx);
+
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1
++ if (string_mb_cur_max (pstr) > 1
+ && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
+ return re_string_peek_byte (pstr, idx);
+ #endif
+@@ -930,7 +931,7 @@
+ return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
+ : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc;
+ int wc_idx = idx;
+@@ -1444,7 +1445,7 @@
+ dfa->nodes[dfa->nodes_len].constraint = 0;
+ #ifdef RE_ENABLE_I18N
+ dfa->nodes[dfa->nodes_len].accept_mb =
+- (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
++ (type == OP_PERIOD && dfa_mb_cur_max (dfa) > 1) || type == COMPLEX_BRACKET;
+ #endif
+ dfa->nexts[dfa->nodes_len] = -1;
+ re_node_set_init_empty (dfa->edests + dfa->nodes_len);
+Index: git/posix/regex_internal.h
+===================================================================
+--- git.orig/posix/regex_internal.h 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex_internal.h 2014-08-29 20:01:15.224070587 -0700
+@@ -26,6 +26,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
+ # include <langinfo.h>
+ #endif
+@@ -370,6 +374,13 @@
+ };
+ typedef struct re_string_t re_string_t;
+
++/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
++ help the compiler make use of that fact. */
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define string_mb_cur_max(str) ((str)->mb_cur_max + 0)
++#else
++# define string_mb_cur_max(str) (1)
++#endif
+
+ struct re_dfa_t;
+ typedef struct re_dfa_t re_dfa_t;
+@@ -655,6 +666,14 @@
+ __libc_lock_define (, lock)
+ };
+
++/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
++ help the compiler make use of that fact. */
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define dfa_mb_cur_max(dfa) ((dfa)->mb_cur_max + 0)
++#else
++# define dfa_mb_cur_max(dfa) (1)
++#endif
++
+ #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
+ #define re_node_set_remove(set,id) \
+ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
+@@ -715,7 +734,7 @@
+ re_string_char_size_at (const re_string_t *pstr, int idx)
+ {
+ int byte_idx;
+- if (pstr->mb_cur_max == 1)
++ if (string_mb_cur_max (pstr) == 1)
+ return 1;
+ for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
+ if (pstr->wcs[idx + byte_idx] != WEOF)
+@@ -727,7 +746,7 @@
+ internal_function __attribute__ ((pure, unused))
+ re_string_wchar_at (const re_string_t *pstr, int idx)
+ {
+- if (pstr->mb_cur_max == 1)
++ if (string_mb_cur_max (pstr) == 1)
+ return (wint_t) pstr->mbs[idx];
+ return (wint_t) pstr->wcs[idx];
+ }
+Index: git/posix/xregex.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/posix/xregex.c 2014-08-29 20:01:15.228070587 -0700
+@@ -0,0 +1,8212 @@
++/* Extended regular expression matching and search library,
++ version 0.12.
++ (Implements POSIX draft P1003.2/D11.2, except for some of the
++ internationalization features.)
++
++ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++ 2002, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301 USA. */
++
++/* AIX requires this to be the first thing in the file. */
++#if defined _AIX && !defined __GNUC__ && !defined REGEX_MALLOC
++ #pragma alloca
++#endif
++
++#undef _GNU_SOURCE
++#define _GNU_SOURCE
++
++#ifndef INSIDE_RECURSION
++# ifdef HAVE_CONFIG_H
++# include <config.h>
++# endif
++#endif
++
++/*#include <ansidecl.h>*/
++
++#ifndef INSIDE_RECURSION
++
++# if defined STDC_HEADERS && !defined emacs
++# include <stddef.h>
++# else
++/* We need this for `regex.h', and perhaps for the Emacs include files. */
++# include <sys/types.h>
++# endif
++
++# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
++
++/* For platform which support the ISO C amendement 1 functionality we
++ support user defined character classes. */
++# if WIDE_CHAR_SUPPORT
++/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
++# include <wchar.h>
++# include <wctype.h>
++# endif
++
++# ifdef _LIBC
++/* We have to keep the namespace clean. */
++# define regfree(preg) __regfree (preg)
++# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
++# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
++# define regerror(errcode, preg, errbuf, errbuf_size) \
++ __regerror(errcode, preg, errbuf, errbuf_size)
++# define re_set_registers(bu, re, nu, st, en) \
++ __re_set_registers (bu, re, nu, st, en)
++# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
++ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
++# define re_match(bufp, string, size, pos, regs) \
++ __re_match (bufp, string, size, pos, regs)
++# define re_search(bufp, string, size, startpos, range, regs) \
++ __re_search (bufp, string, size, startpos, range, regs)
++# define re_compile_pattern(pattern, length, bufp) \
++ __re_compile_pattern (pattern, length, bufp)
++# define re_set_syntax(syntax) __re_set_syntax (syntax)
++# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
++ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
++# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
++
++# define btowc __btowc
++
++/* We are also using some library internals. */
++# include <locale/localeinfo.h>
++# include <locale/elem-hash.h>
++# include <langinfo.h>
++# include <locale/coll-lookup.h>
++# endif
++
++/* This is for other GNU distributions with internationalized messages. */
++# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
++# include <libintl.h>
++# ifdef _LIBC
++# undef gettext
++# define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
++# endif
++# else
++# define gettext(msgid) (msgid)
++# endif
++
++# ifndef gettext_noop
++/* This define is so xgettext can find the internationalizable
++ strings. */
++# define gettext_noop(String) String
++# endif
++
++/* The `emacs' switch turns on certain matching commands
++ that make sense only in Emacs. */
++# ifdef emacs
++
++# include "lisp.h"
++# include "buffer.h"
++# include "syntax.h"
++
++# else /* not emacs */
++
++/* If we are not linking with Emacs proper,
++ we can't use the relocating allocator
++ even if config.h says that we can. */
++# undef REL_ALLOC
++
++# if defined STDC_HEADERS || defined _LIBC
++# include <stdlib.h>
++# else
++char *malloc ();
++char *realloc ();
++# endif
++
++/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
++ If nothing else has been done, use the method below. */
++# ifdef INHIBIT_STRING_HEADER
++# if !(defined HAVE_BZERO && defined HAVE_BCOPY)
++# if !defined bzero && !defined bcopy
++# undef INHIBIT_STRING_HEADER
++# endif
++# endif
++# endif
++
++/* This is the normal way of making sure we have a bcopy and a bzero.
++ This is used in most programs--a few other programs avoid this
++ by defining INHIBIT_STRING_HEADER. */
++# ifndef INHIBIT_STRING_HEADER
++# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
++# include <string.h>
++# ifndef bzero
++# ifndef _LIBC
++# define bzero(s, n) (memset (s, '\0', n), (s))
++# else
++# define bzero(s, n) __bzero (s, n)
++# endif
++# endif
++# else
++# include <strings.h>
++# ifndef memcmp
++# define memcmp(s1, s2, n) bcmp (s1, s2, n)
++# endif
++# ifndef memcpy
++# define memcpy(d, s, n) (bcopy (s, d, n), (d))
++# endif
++# endif
++# endif
++
++/* Define the syntax stuff for \<, \>, etc. */
++
++/* This must be nonzero for the wordchar and notwordchar pattern
++ commands in re_match_2. */
++# ifndef Sword
++# define Sword 1
++# endif
++
++# ifdef SWITCH_ENUM_BUG
++# define SWITCH_ENUM_CAST(x) ((int)(x))
++# else
++# define SWITCH_ENUM_CAST(x) (x)
++# endif
++
++# endif /* not emacs */
++
++# if defined _LIBC || HAVE_LIMITS_H
++# include <limits.h>
++# endif
++
++# ifndef MB_LEN_MAX
++# define MB_LEN_MAX 1
++# endif
++
++/* Get the interface, including the syntax bits. */
++# include "regex.h"
++
++/* isalpha etc. are used for the character classes. */
++# include <ctype.h>
++
++/* Jim Meyering writes:
++
++ "... Some ctype macros are valid only for character codes that
++ isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
++ using /bin/cc or gcc but without giving an ansi option). So, all
++ ctype uses should be through macros like ISPRINT... If
++ STDC_HEADERS is defined, then autoconf has verified that the ctype
++ macros don't need to be guarded with references to isascii. ...
++ Defining isascii to 1 should let any compiler worth its salt
++ eliminate the && through constant folding."
++ Solaris defines some of these symbols so we must undefine them first. */
++
++# undef ISASCII
++# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
++# define ISASCII(c) 1
++# else
++# define ISASCII(c) isascii(c)
++# endif
++
++# ifdef isblank
++# define ISBLANK(c) (ISASCII (c) && isblank (c))
++# else
++# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
++# endif
++# ifdef isgraph
++# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
++# else
++# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
++# endif
++
++# undef ISPRINT
++# define ISPRINT(c) (ISASCII (c) && isprint (c))
++# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
++# define ISALNUM(c) (ISASCII (c) && isalnum (c))
++# define ISALPHA(c) (ISASCII (c) && isalpha (c))
++# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
++# define ISLOWER(c) (ISASCII (c) && islower (c))
++# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
++# define ISSPACE(c) (ISASCII (c) && isspace (c))
++# define ISUPPER(c) (ISASCII (c) && isupper (c))
++# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
++
++# ifdef _tolower
++# define TOLOWER(c) _tolower(c)
++# else
++# define TOLOWER(c) tolower(c)
++# endif
++
++# ifndef NULL
++# define NULL (void *)0
++# endif
++
++/* We remove any previous definition of `SIGN_EXTEND_CHAR',
++ since ours (we hope) works properly with all combinations of
++ machines, compilers, `char' and `unsigned char' argument types.
++ (Per Bothner suggested the basic approach.) */
++# undef SIGN_EXTEND_CHAR
++# if __STDC__
++# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
++# else /* not __STDC__ */
++/* As in Harbison and Steele. */
++# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
++# endif
++
++# ifndef emacs
++/* How many characters in the character set. */
++# define CHAR_SET_SIZE 256
++
++# ifdef SYNTAX_TABLE
++
++extern char *re_syntax_table;
++
++# else /* not SYNTAX_TABLE */
++
++static char re_syntax_table[CHAR_SET_SIZE];
++
++static void init_syntax_once (void);
++
++static void
++init_syntax_once (void)
++{
++ register int c;
++ static int done = 0;
++
++ if (done)
++ return;
++ bzero (re_syntax_table, sizeof re_syntax_table);
++
++ for (c = 0; c < CHAR_SET_SIZE; ++c)
++ if (ISALNUM (c))
++ re_syntax_table[c] = Sword;
++
++ re_syntax_table['_'] = Sword;
++
++ done = 1;
++}
++
++# endif /* not SYNTAX_TABLE */
++
++# define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
++
++# endif /* emacs */
++
++/* Integer type for pointers. */
++# if !defined _LIBC && !defined HAVE_UINTPTR_T
++typedef unsigned long int uintptr_t;
++# endif
++
++/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
++ use `alloca' instead of `malloc'. This is because using malloc in
++ re_search* or re_match* could cause memory leaks when C-g is used in
++ Emacs; also, malloc is slower and causes storage fragmentation. On
++ the other hand, malloc is more portable, and easier to debug.
++
++ Because we sometimes use alloca, some routines have to be macros,
++ not functions -- `alloca'-allocated space disappears at the end of the
++ function it is called in. */
++
++# ifdef REGEX_MALLOC
++
++# define REGEX_ALLOCATE malloc
++# define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
++# define REGEX_FREE free
++
++# else /* not REGEX_MALLOC */
++
++/* Emacs already defines alloca, sometimes. */
++# ifndef alloca
++
++/* Make alloca work the best possible way. */
++# ifdef __GNUC__
++# define alloca __builtin_alloca
++# else /* not __GNUC__ */
++# if HAVE_ALLOCA_H
++# include <alloca.h>
++# endif /* HAVE_ALLOCA_H */
++# endif /* not __GNUC__ */
++
++# endif /* not alloca */
++
++# define REGEX_ALLOCATE alloca
++
++/* Assumes a `char *destination' variable. */
++# define REGEX_REALLOCATE(source, osize, nsize) \
++ (destination = (char *) alloca (nsize), \
++ memcpy (destination, source, osize))
++
++/* No need to do anything to free, after alloca. */
++# define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
++
++# endif /* not REGEX_MALLOC */
++
++/* Define how to allocate the failure stack. */
++
++# if defined REL_ALLOC && defined REGEX_MALLOC
++
++# define REGEX_ALLOCATE_STACK(size) \
++ r_alloc (&failure_stack_ptr, (size))
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
++ r_re_alloc (&failure_stack_ptr, (nsize))
++# define REGEX_FREE_STACK(ptr) \
++ r_alloc_free (&failure_stack_ptr)
++
++# else /* not using relocating allocator */
++
++# ifdef REGEX_MALLOC
++
++# define REGEX_ALLOCATE_STACK malloc
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
++# define REGEX_FREE_STACK free
++
++# else /* not REGEX_MALLOC */
++
++# define REGEX_ALLOCATE_STACK alloca
++
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
++ REGEX_REALLOCATE (source, osize, nsize)
++/* No need to explicitly free anything. */
++# define REGEX_FREE_STACK(arg)
++
++# endif /* not REGEX_MALLOC */
++# endif /* not using relocating allocator */
++
++
++/* True if `size1' is non-NULL and PTR is pointing anywhere inside
++ `string1' or just past its end. This works if PTR is NULL, which is
++ a good thing. */
++# define FIRST_STRING_P(ptr) \
++ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
++
++/* (Re)Allocate N items of type T using malloc, or fail. */
++# define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
++# define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
++# define RETALLOC_IF(addr, n, t) \
++ if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
++# define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
++
++# define BYTEWIDTH 8 /* In bits. */
++
++# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
++
++# undef MAX
++# undef MIN
++# define MAX(a, b) ((a) > (b) ? (a) : (b))
++# define MIN(a, b) ((a) < (b) ? (a) : (b))
++
++typedef char boolean;
++# define false 0
++# define true 1
++
++static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
++ reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp);
++
++static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int pos,
++ struct re_registers *regs,
++ int stop);
++static int byte_re_search_2 (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop);
++static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
++
++#ifdef MBS_SUPPORT
++static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
++ reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp);
++
++
++static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *cstring1, int csize1,
++ const char *cstring2, int csize2,
++ int pos,
++ struct re_registers *regs,
++ int stop,
++ wchar_t *string1, int size1,
++ wchar_t *string2, int size2,
++ int *mbs_offset1, int *mbs_offset2);
++static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop);
++static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
++#endif
++
++/* These are the command codes that appear in compiled regular
++ expressions. Some opcodes are followed by argument bytes. A
++ command code can specify any interpretation whatsoever for its
++ arguments. Zero bytes may appear in the compiled regular expression. */
++
++typedef enum
++{
++ no_op = 0,
++
++ /* Succeed right away--no more backtracking. */
++ succeed,
++
++ /* Followed by one byte giving n, then by n literal bytes. */
++ exactn,
++
++# ifdef MBS_SUPPORT
++ /* Same as exactn, but contains binary data. */
++ exactn_bin,
++# endif
++
++ /* Matches any (more or less) character. */
++ anychar,
++
++ /* Matches any one char belonging to specified set. First
++ following byte is number of bitmap bytes. Then come bytes
++ for a bitmap saying which chars are in. Bits in each byte
++ are ordered low-bit-first. A character is in the set if its
++ bit is 1. A character too large to have a bit in the map is
++ automatically not in the set. */
++ /* ifdef MBS_SUPPORT, following element is length of character
++ classes, length of collating symbols, length of equivalence
++ classes, length of character ranges, and length of characters.
++ Next, character class element, collating symbols elements,
++ equivalence class elements, range elements, and character
++ elements follow.
++ See regex_compile function. */
++ charset,
++
++ /* Same parameters as charset, but match any character that is
++ not one of those specified. */
++ charset_not,
++
++ /* Start remembering the text that is matched, for storing in a
++ register. Followed by one byte with the register number, in
++ the range 0 to one less than the pattern buffer's re_nsub
++ field. Then followed by one byte with the number of groups
++ inner to this one. (This last has to be part of the
++ start_memory only because we need it in the on_failure_jump
++ of re_match_2.) */
++ start_memory,
++
++ /* Stop remembering the text that is matched and store it in a
++ memory register. Followed by one byte with the register
++ number, in the range 0 to one less than `re_nsub' in the
++ pattern buffer, and one byte with the number of inner groups,
++ just like `start_memory'. (We need the number of inner
++ groups here because we don't have any easy way of finding the
++ corresponding start_memory when we're at a stop_memory.) */
++ stop_memory,
++
++ /* Match a duplicate of something remembered. Followed by one
++ byte containing the register number. */
++ duplicate,
++
++ /* Fail unless at beginning of line. */
++ begline,
++
++ /* Fail unless at end of line. */
++ endline,
++
++ /* Succeeds if at beginning of buffer (if emacs) or at beginning
++ of string to be matched (if not). */
++ begbuf,
++
++ /* Analogously, for end of buffer/string. */
++ endbuf,
++
++ /* Followed by two byte relative address to which to jump. */
++ jump,
++
++ /* Same as jump, but marks the end of an alternative. */
++ jump_past_alt,
++
++ /* Followed by two-byte relative address of place to resume at
++ in case of failure. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ on_failure_jump,
++
++ /* Like on_failure_jump, but pushes a placeholder instead of the
++ current string position when executed. */
++ on_failure_keep_string_jump,
++
++ /* Throw away latest failure point and then jump to following
++ two-byte relative address. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ pop_failure_jump,
++
++ /* Change to pop_failure_jump if know won't have to backtrack to
++ match; otherwise change to jump. This is used to jump
++ back to the beginning of a repeat. If what follows this jump
++ clearly won't match what the repeat does, such that we can be
++ sure that there is no use backtracking out of repetitions
++ already matched, then we change it to a pop_failure_jump.
++ Followed by two-byte address. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ maybe_pop_jump,
++
++ /* Jump to following two-byte address, and push a dummy failure
++ point. This failure point will be thrown away if an attempt
++ is made to use it for a failure. A `+' construct makes this
++ before the first repeat. Also used as an intermediary kind
++ of jump when compiling an alternative. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ dummy_failure_jump,
++
++ /* Push a dummy failure point and continue. Used at the end of
++ alternatives. */
++ push_dummy_failure,
++
++ /* Followed by two-byte relative address and two-byte number n.
++ After matching N times, jump to the address upon failure. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ succeed_n,
++
++ /* Followed by two-byte relative address, and two-byte number n.
++ Jump to the address N times, then fail. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ jump_n,
++
++ /* Set the following two-byte relative address to the
++ subsequent two-byte number. The address *includes* the two
++ bytes of number. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ set_number_at,
++
++ wordchar, /* Matches any word-constituent character. */
++ notwordchar, /* Matches any char that is not a word-constituent. */
++
++ wordbeg, /* Succeeds if at word beginning. */
++ wordend, /* Succeeds if at word end. */
++
++ wordbound, /* Succeeds if at a word boundary. */
++ notwordbound /* Succeeds if not at a word boundary. */
++
++# ifdef emacs
++ ,before_dot, /* Succeeds if before point. */
++ at_dot, /* Succeeds if at point. */
++ after_dot, /* Succeeds if after point. */
++
++ /* Matches any character whose syntax is specified. Followed by
++ a byte which contains a syntax code, e.g., Sword. */
++ syntaxspec,
++
++ /* Matches any character whose syntax is not that specified. */
++ notsyntaxspec
++# endif /* emacs */
++} re_opcode_t;
++#endif /* not INSIDE_RECURSION */
++
++
++#ifdef BYTE
++# define CHAR_T char
++# define UCHAR_T unsigned char
++# define COMPILED_BUFFER_VAR bufp->buffer
++# define OFFSET_ADDRESS_SIZE 2
++# define PREFIX(name) byte_##name
++# define ARG_PREFIX(name) name
++# define PUT_CHAR(c) putchar (c)
++#else
++# ifdef WCHAR
++# define CHAR_T wchar_t
++# define UCHAR_T wchar_t
++# define COMPILED_BUFFER_VAR wc_buffer
++# define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
++# define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
++# define PREFIX(name) wcs_##name
++# define ARG_PREFIX(name) c##name
++/* Should we use wide stream?? */
++# define PUT_CHAR(c) printf ("%C", c);
++# define TRUE 1
++# define FALSE 0
++# else
++# ifdef MBS_SUPPORT
++# define WCHAR
++# define INSIDE_RECURSION
++# include "xregex.c"
++# undef INSIDE_RECURSION
++# endif
++# define BYTE
++# define INSIDE_RECURSION
++# include "xregex.c"
++# undef INSIDE_RECURSION
++# endif
++#endif
++
++#ifdef INSIDE_RECURSION
++/* Common operations on the compiled pattern. */
++
++/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# ifdef WCHAR
++# define STORE_NUMBER(destination, number) \
++ do { \
++ *(destination) = (UCHAR_T)(number); \
++ } while (0)
++# else /* BYTE */
++# define STORE_NUMBER(destination, number) \
++ do { \
++ (destination)[0] = (number) & 0377; \
++ (destination)[1] = (number) >> 8; \
++ } while (0)
++# endif /* WCHAR */
++
++/* Same as STORE_NUMBER, except increment DESTINATION to
++ the byte after where the number is stored. Therefore, DESTINATION
++ must be an lvalue. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# define STORE_NUMBER_AND_INCR(destination, number) \
++ do { \
++ STORE_NUMBER (destination, number); \
++ (destination) += OFFSET_ADDRESS_SIZE; \
++ } while (0)
++
++/* Put into DESTINATION a number stored in two contiguous bytes starting
++ at SOURCE. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# ifdef WCHAR
++# define EXTRACT_NUMBER(destination, source) \
++ do { \
++ (destination) = *(source); \
++ } while (0)
++# else /* BYTE */
++# define EXTRACT_NUMBER(destination, source) \
++ do { \
++ (destination) = *(source) & 0377; \
++ (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
++ } while (0)
++# endif
++
++# ifdef DEBUG
++static void PREFIX(extract_number) (int *dest, UCHAR_T *source);
++static void
++PREFIX(extract_number) (int *dest, UCHAR_T *source)
++{
++# ifdef WCHAR
++ *dest = *source;
++# else /* BYTE */
++ int temp = SIGN_EXTEND_CHAR (*(source + 1));
++ *dest = *source & 0377;
++ *dest += temp << 8;
++# endif
++}
++
++# ifndef EXTRACT_MACROS /* To debug the macros. */
++# undef EXTRACT_NUMBER
++# define EXTRACT_NUMBER(dest, src) PREFIX(extract_number) (&dest, src)
++# endif /* not EXTRACT_MACROS */
++
++# endif /* DEBUG */
++
++/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
++ SOURCE must be an lvalue. */
++
++# define EXTRACT_NUMBER_AND_INCR(destination, source) \
++ do { \
++ EXTRACT_NUMBER (destination, source); \
++ (source) += OFFSET_ADDRESS_SIZE; \
++ } while (0)
++
++# ifdef DEBUG
++static void PREFIX(extract_number_and_incr) (int *destination,
++ UCHAR_T **source);
++static void
++PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
++{
++ PREFIX(extract_number) (destination, *source);
++ *source += OFFSET_ADDRESS_SIZE;
++}
++
++# ifndef EXTRACT_MACROS
++# undef EXTRACT_NUMBER_AND_INCR
++# define EXTRACT_NUMBER_AND_INCR(dest, src) \
++ PREFIX(extract_number_and_incr) (&dest, &src)
++# endif /* not EXTRACT_MACROS */
++
++# endif /* DEBUG */
++
++
++
++/* If DEBUG is defined, Regex prints many voluminous messages about what
++ it is doing (if the variable `debug' is nonzero). If linked with the
++ main program in `iregex.c', you can enter patterns and strings
++ interactively. And if linked with the main program in `main.c' and
++ the other test files, you can run the already-written tests. */
++
++# ifdef DEBUG
++
++# ifndef DEFINED_ONCE
++
++/* We use standard I/O for debugging. */
++# include <stdio.h>
++
++/* It is useful to test things that ``must'' be true when debugging. */
++# include <assert.h>
++
++static int debug;
++
++# define DEBUG_STATEMENT(e) e
++# define DEBUG_PRINT1(x) if (debug) printf (x)
++# define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
++# define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
++# define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
++# endif /* not DEFINED_ONCE */
++
++# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
++ if (debug) PREFIX(print_partial_compiled_pattern) (s, e)
++# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
++ if (debug) PREFIX(print_double_string) (w, s1, sz1, s2, sz2)
++
++
++/* Print the fastmap in human-readable form. */
++
++# ifndef DEFINED_ONCE
++void
++print_fastmap (char *fastmap)
++{
++ unsigned was_a_range = 0;
++ unsigned i = 0;
++
++ while (i < (1 << BYTEWIDTH))
++ {
++ if (fastmap[i++])
++ {
++ was_a_range = 0;
++ putchar (i - 1);
++ while (i < (1 << BYTEWIDTH) && fastmap[i])
++ {
++ was_a_range = 1;
++ i++;
++ }
++ if (was_a_range)
++ {
++ printf ("-");
++ putchar (i - 1);
++ }
++ }
++ }
++ putchar ('\n');
++}
++# endif /* not DEFINED_ONCE */
++
++
++/* Print a compiled pattern string in human-readable form, starting at
++ the START pointer into it and ending just before the pointer END. */
++
++void
++PREFIX(print_partial_compiled_pattern) (UCHAR_T *start, UCHAR_T *end)
++{
++ int mcnt, mcnt2;
++ UCHAR_T *p1;
++ UCHAR_T *p = start;
++ UCHAR_T *pend = end;
++
++ if (start == NULL)
++ {
++ printf ("(null)\n");
++ return;
++ }
++
++ /* Loop over pattern commands. */
++ while (p < pend)
++ {
++# ifdef _LIBC
++ printf ("%td:\t", p - start);
++# else
++ printf ("%ld:\t", (long int) (p - start));
++# endif
++
++ switch ((re_opcode_t) *p++)
++ {
++ case no_op:
++ printf ("/no_op");
++ break;
++
++ case exactn:
++ mcnt = *p++;
++ printf ("/exactn/%d", mcnt);
++ do
++ {
++ putchar ('/');
++ PUT_CHAR (*p++);
++ }
++ while (--mcnt);
++ break;
++
++# ifdef MBS_SUPPORT
++ case exactn_bin:
++ mcnt = *p++;
++ printf ("/exactn_bin/%d", mcnt);
++ do
++ {
++ printf("/%lx", (long int) *p++);
++ }
++ while (--mcnt);
++ break;
++# endif /* MBS_SUPPORT */
++
++ case start_memory:
++ mcnt = *p++;
++ printf ("/start_memory/%d/%ld", mcnt, (long int) *p++);
++ break;
++
++ case stop_memory:
++ mcnt = *p++;
++ printf ("/stop_memory/%d/%ld", mcnt, (long int) *p++);
++ break;
++
++ case duplicate:
++ printf ("/duplicate/%ld", (long int) *p++);
++ break;
++
++ case anychar:
++ printf ("/anychar");
++ break;
++
++ case charset:
++ case charset_not:
++ {
++# ifdef WCHAR
++ int i, length;
++ wchar_t *workp = p;
++ printf ("/charset [%s",
++ (re_opcode_t) *(workp - 1) == charset_not ? "^" : "");
++ p += 5;
++ length = *workp++; /* the length of char_classes */
++ for (i=0 ; i<length ; i++)
++ printf("[:%lx:]", (long int) *p++);
++ length = *workp++; /* the length of collating_symbol */
++ for (i=0 ; i<length ;)
++ {
++ printf("[.");
++ while(*p != 0)
++ PUT_CHAR((i++,*p++));
++ i++,p++;
++ printf(".]");
++ }
++ length = *workp++; /* the length of equivalence_class */
++ for (i=0 ; i<length ;)
++ {
++ printf("[=");
++ while(*p != 0)
++ PUT_CHAR((i++,*p++));
++ i++,p++;
++ printf("=]");
++ }
++ length = *workp++; /* the length of char_range */
++ for (i=0 ; i<length ; i++)
++ {
++ wchar_t range_start = *p++;
++ wchar_t range_end = *p++;
++ printf("%C-%C", range_start, range_end);
++ }
++ length = *workp++; /* the length of char */
++ for (i=0 ; i<length ; i++)
++ printf("%C", *p++);
++ putchar (']');
++# else
++ register int c, last = -100;
++ register int in_range = 0;
++
++ printf ("/charset [%s",
++ (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
++
++ assert (p + *p < pend);
++
++ for (c = 0; c < 256; c++)
++ if (c / 8 < *p
++ && (p[1 + (c/8)] & (1 << (c % 8))))
++ {
++ /* Are we starting a range? */
++ if (last + 1 == c && ! in_range)
++ {
++ putchar ('-');
++ in_range = 1;
++ }
++ /* Have we broken a range? */
++ else if (last + 1 != c && in_range)
++ {
++ putchar (last);
++ in_range = 0;
++ }
++
++ if (! in_range)
++ putchar (c);
++
++ last = c;
++ }
++
++ if (in_range)
++ putchar (last);
++
++ putchar (']');
++
++ p += 1 + *p;
++# endif /* WCHAR */
++ }
++ break;
++
++ case begline:
++ printf ("/begline");
++ break;
++
++ case endline:
++ printf ("/endline");
++ break;
++
++ case on_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/on_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case on_failure_keep_string_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/on_failure_keep_string_jump to %td", p + mcnt - start);
++# else
++ printf ("/on_failure_keep_string_jump to %ld",
++ (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case dummy_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/dummy_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case push_dummy_failure:
++ printf ("/push_dummy_failure");
++ break;
++
++ case maybe_pop_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/maybe_pop_jump to %td", p + mcnt - start);
++# else
++ printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case pop_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/pop_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case jump_past_alt:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/jump_past_alt to %td", p + mcnt - start);
++# else
++ printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/jump to %td", p + mcnt - start);
++# else
++ printf ("/jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case succeed_n:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++# ifdef _LIBC
++ printf ("/succeed_n to %td, %d times", p1 - start, mcnt2);
++# else
++ printf ("/succeed_n to %ld, %d times",
++ (long int) (p1 - start), mcnt2);
++# endif
++ break;
++
++ case jump_n:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++ printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
++ break;
++
++ case set_number_at:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++# ifdef _LIBC
++ printf ("/set_number_at location %td to %d", p1 - start, mcnt2);
++# else
++ printf ("/set_number_at location %ld to %d",
++ (long int) (p1 - start), mcnt2);
++# endif
++ break;
++
++ case wordbound:
++ printf ("/wordbound");
++ break;
++
++ case notwordbound:
++ printf ("/notwordbound");
++ break;
++
++ case wordbeg:
++ printf ("/wordbeg");
++ break;
++
++ case wordend:
++ printf ("/wordend");
++ break;
++
++# ifdef emacs
++ case before_dot:
++ printf ("/before_dot");
++ break;
++
++ case at_dot:
++ printf ("/at_dot");
++ break;
++
++ case after_dot:
++ printf ("/after_dot");
++ break;
++
++ case syntaxspec:
++ printf ("/syntaxspec");
++ mcnt = *p++;
++ printf ("/%d", mcnt);
++ break;
++
++ case notsyntaxspec:
++ printf ("/notsyntaxspec");
++ mcnt = *p++;
++ printf ("/%d", mcnt);
++ break;
++# endif /* emacs */
++
++ case wordchar:
++ printf ("/wordchar");
++ break;
++
++ case notwordchar:
++ printf ("/notwordchar");
++ break;
++
++ case begbuf:
++ printf ("/begbuf");
++ break;
++
++ case endbuf:
++ printf ("/endbuf");
++ break;
++
++ default:
++ printf ("?%ld", (long int) *(p-1));
++ }
++
++ putchar ('\n');
++ }
++
++# ifdef _LIBC
++ printf ("%td:\tend of pattern.\n", p - start);
++# else
++ printf ("%ld:\tend of pattern.\n", (long int) (p - start));
++# endif
++}
++
++
++void
++PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp)
++{
++ UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
++
++ PREFIX(print_partial_compiled_pattern) (buffer, buffer
++ + bufp->used / sizeof(UCHAR_T));
++ printf ("%ld bytes used/%ld bytes allocated.\n",
++ bufp->used, bufp->allocated);
++
++ if (bufp->fastmap_accurate && bufp->fastmap)
++ {
++ printf ("fastmap: ");
++ print_fastmap (bufp->fastmap);
++ }
++
++# ifdef _LIBC
++ printf ("re_nsub: %Zd\t", bufp->re_nsub);
++# else
++ printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
++# endif
++ printf ("regs_alloc: %d\t", bufp->regs_allocated);
++ printf ("can_be_null: %d\t", bufp->can_be_null);
++ printf ("newline_anchor: %d\n", bufp->newline_anchor);
++ printf ("no_sub: %d\t", bufp->no_sub);
++ printf ("not_bol: %d\t", bufp->not_bol);
++ printf ("not_eol: %d\t", bufp->not_eol);
++ printf ("syntax: %lx\n", bufp->syntax);
++ /* Perhaps we should print the translate table? */
++}
++
++
++void
++PREFIX(print_double_string) (const CHAR_T *where, const CHAR_T *string1,
++ int size1, const CHAR_T *string2, int size2)
++{
++ int this_char;
++
++ if (where == NULL)
++ printf ("(null)");
++ else
++ {
++ int cnt;
++
++ if (FIRST_STRING_P (where))
++ {
++ for (this_char = where - string1; this_char < size1; this_char++)
++ PUT_CHAR (string1[this_char]);
++
++ where = string2;
++ }
++
++ cnt = 0;
++ for (this_char = where - string2; this_char < size2; this_char++)
++ {
++ PUT_CHAR (string2[this_char]);
++ if (++cnt > 100)
++ {
++ fputs ("...", stdout);
++ break;
++ }
++ }
++ }
++}
++
++# ifndef DEFINED_ONCE
++void
++printchar (int c)
++{
++ putc (c, stderr);
++}
++# endif
++
++# else /* not DEBUG */
++
++# ifndef DEFINED_ONCE
++# undef assert
++# define assert(e)
++
++# define DEBUG_STATEMENT(e)
++# define DEBUG_PRINT1(x)
++# define DEBUG_PRINT2(x1, x2)
++# define DEBUG_PRINT3(x1, x2, x3)
++# define DEBUG_PRINT4(x1, x2, x3, x4)
++# endif /* not DEFINED_ONCE */
++# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
++# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
++
++# endif /* not DEBUG */
++
++
++
++# ifdef WCHAR
++/* This convert a multibyte string to a wide character string.
++ And write their correspondances to offset_buffer(see below)
++ and write whether each wchar_t is binary data to is_binary.
++ This assume invalid multibyte sequences as binary data.
++ We assume offset_buffer and is_binary is already allocated
++ enough space. */
++
++static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
++ size_t len, int *offset_buffer,
++ char *is_binary);
++static size_t
++convert_mbs_to_wcs (CHAR_T *dest, const unsigned char*src, size_t len,
++ int *offset_buffer, char *is_binary)
++ /* It hold correspondances between src(char string) and
++ dest(wchar_t string) for optimization.
++ e.g. src = "xxxyzz"
++ dest = {'X', 'Y', 'Z'}
++ (each "xxx", "y" and "zz" represent one multibyte character
++ corresponding to 'X', 'Y' and 'Z'.)
++ offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
++ = {0, 3, 4, 6}
++ */
++{
++ wchar_t *pdest = dest;
++ const unsigned char *psrc = src;
++ size_t wc_count = 0;
++
++ mbstate_t mbs;
++ int i, consumed;
++ size_t mb_remain = len;
++ size_t mb_count = 0;
++
++ /* Initialize the conversion state. */
++ memset (&mbs, 0, sizeof (mbstate_t));
++
++ offset_buffer[0] = 0;
++ for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
++ psrc += consumed)
++ {
++#ifdef _LIBC
++ consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
++#else
++ consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
++#endif
++
++ if (consumed <= 0)
++ /* failed to convert. maybe src contains binary data.
++ So we consume 1 byte manualy. */
++ {
++ *pdest = *psrc;
++ consumed = 1;
++ is_binary[wc_count] = TRUE;
++ }
++ else
++ is_binary[wc_count] = FALSE;
++ /* In sjis encoding, we use yen sign as escape character in
++ place of reverse solidus. So we convert 0x5c(yen sign in
++ sjis) to not 0xa5(yen sign in UCS2) but 0x5c(reverse
++ solidus in UCS2). */
++ if (consumed == 1 && (int) *psrc == 0x5c && (int) *pdest == 0xa5)
++ *pdest = (wchar_t) *psrc;
++
++ offset_buffer[wc_count + 1] = mb_count += consumed;
++ }
++
++ /* Fill remain of the buffer with sentinel. */
++ for (i = wc_count + 1 ; i <= len ; i++)
++ offset_buffer[i] = mb_count + 1;
++
++ return wc_count;
++}
++
++# endif /* WCHAR */
++
++#else /* not INSIDE_RECURSION */
++
++/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
++ also be assigned to arbitrarily: each pattern buffer stores its own
++ syntax, so it can be changed between regex compilations. */
++/* This has no initializer because initialized variables in Emacs
++ become read-only after dumping. */
++reg_syntax_t re_syntax_options;
++
++
++/* Specify the precise syntax of regexps for compilation. This provides
++ for compatibility for various utilities which historically have
++ different, incompatible syntaxes.
++
++ The argument SYNTAX is a bit mask comprised of the various bits
++ defined in regex.h. We return the old syntax. */
++
++reg_syntax_t
++re_set_syntax (reg_syntax_t syntax)
++{
++ reg_syntax_t ret = re_syntax_options;
++
++ re_syntax_options = syntax;
++# ifdef DEBUG
++ if (syntax & RE_DEBUG)
++ debug = 1;
++ else if (debug) /* was on but now is not */
++ debug = 0;
++# endif /* DEBUG */
++ return ret;
++}
++# ifdef _LIBC
++weak_alias (__re_set_syntax, re_set_syntax)
++# endif
++
++/* This table gives an error message for each of the error codes listed
++ in regex.h. Obviously the order here has to be same as there.
++ POSIX doesn't require that we do anything for REG_NOERROR,
++ but why not be nice? */
++
++static const char *re_error_msgid[] =
++ {
++ gettext_noop ("Success"), /* REG_NOERROR */
++ gettext_noop ("No match"), /* REG_NOMATCH */
++ gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
++ gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
++ gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
++ gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
++ gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
++ gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
++ gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
++ gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
++ gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
++ gettext_noop ("Invalid range end"), /* REG_ERANGE */
++ gettext_noop ("Memory exhausted"), /* REG_ESPACE */
++ gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
++ gettext_noop ("Premature end of regular expression"), /* REG_EEND */
++ gettext_noop ("Regular expression too big"), /* REG_ESIZE */
++ gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
++ };
++
++#endif /* INSIDE_RECURSION */
++
++#ifndef DEFINED_ONCE
++/* Avoiding alloca during matching, to placate r_alloc. */
++
++/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
++ searching and matching functions should not call alloca. On some
++ systems, alloca is implemented in terms of malloc, and if we're
++ using the relocating allocator routines, then malloc could cause a
++ relocation, which might (if the strings being searched are in the
++ ralloc heap) shift the data out from underneath the regexp
++ routines.
++
++ Here's another reason to avoid allocation: Emacs
++ processes input from X in a signal handler; processing X input may
++ call malloc; if input arrives while a matching routine is calling
++ malloc, then we're scrod. But Emacs can't just block input while
++ calling matching routines; then we don't notice interrupts when
++ they come in. So, Emacs blocks input around all regexp calls
++ except the matching calls, which it leaves unprotected, in the
++ faith that they will not malloc. */
++
++/* Normally, this is fine. */
++# define MATCH_MAY_ALLOCATE
++
++/* When using GNU C, we are not REALLY using the C alloca, no matter
++ what config.h may say. So don't take precautions for it. */
++# ifdef __GNUC__
++# undef C_ALLOCA
++# endif
++
++/* The match routines may not allocate if (1) they would do it with malloc
++ and (2) it's not safe for them to use malloc.
++ Note that if REL_ALLOC is defined, matching would not use malloc for the
++ failure stack, but we would still use it for the register vectors;
++ so REL_ALLOC should not affect this. */
++# if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
++# undef MATCH_MAY_ALLOCATE
++# endif
++#endif /* not DEFINED_ONCE */
++
++#ifdef INSIDE_RECURSION
++/* Failure stack declarations and macros; both re_compile_fastmap and
++ re_match_2 use a failure stack. These have to be macros because of
++ REGEX_ALLOCATE_STACK. */
++
++
++/* Number of failure points for which to initially allocate space
++ when matching. If this number is exceeded, we allocate more
++ space, so it is not a hard limit. */
++# ifndef INIT_FAILURE_ALLOC
++# define INIT_FAILURE_ALLOC 5
++# endif
++
++/* Roughly the maximum number of failure points on the stack. Would be
++ exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
++ This is a variable only so users of regex can assign to it; we never
++ change it ourselves. */
++
++
++# ifndef DEFINED_ONCE
++
++# ifdef INT_IS_16BIT
++# define RE_M_F_TYPE long int
++# else
++# define RE_M_F_TYPE int
++# endif /* INT_IS_16BIT */
++
++# ifdef MATCH_MAY_ALLOCATE
++/* 4400 was enough to cause a crash on Alpha OSF/1,
++ whose default stack limit is 2mb. */
++# define RE_M_F_DEFAULT 4000
++# else
++# define RE_M_F_DEFAULT 2000
++# endif /* MATCH_MAY_ALLOCATE */
++
++# include <shlib-compat.h>
++
++# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
++link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
++RE_M_F_TYPE re_max_failures = RE_M_F_DEFAULT;
++# else
++RE_M_F_TYPE re_max_failures attribute_hidden = RE_M_F_DEFAULT;
++# endif /* SHLIB_COMPAT */
++
++# undef RE_M_F_TYPE
++# undef RE_M_F_DEFAULT
++
++# endif /* DEFINED_ONCE */
++
++# ifdef INT_IS_16BIT
++
++union PREFIX(fail_stack_elt)
++{
++ UCHAR_T *pointer;
++ long int integer;
++};
++
++typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
++
++typedef struct
++{
++ PREFIX(fail_stack_elt_t) *stack;
++ unsigned long int size;
++ unsigned long int avail; /* Offset of next open position. */
++} PREFIX(fail_stack_type);
++
++# else /* not INT_IS_16BIT */
++
++union PREFIX(fail_stack_elt)
++{
++ UCHAR_T *pointer;
++ int integer;
++};
++
++typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
++
++typedef struct
++{
++ PREFIX(fail_stack_elt_t) *stack;
++ unsigned size;
++ unsigned avail; /* Offset of next open position. */
++} PREFIX(fail_stack_type);
++
++# endif /* INT_IS_16BIT */
++
++# ifndef DEFINED_ONCE
++# define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
++# define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
++# define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
++# endif
++
++
++/* Define macros to initialize and free the failure stack.
++ Do `return -2' if the alloc fails. */
++
++# ifdef MATCH_MAY_ALLOCATE
++# define INIT_FAIL_STACK() \
++ do { \
++ fail_stack.stack = (PREFIX(fail_stack_elt_t) *) \
++ REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (PREFIX(fail_stack_elt_t))); \
++ \
++ if (fail_stack.stack == NULL) \
++ return -2; \
++ \
++ fail_stack.size = INIT_FAILURE_ALLOC; \
++ fail_stack.avail = 0; \
++ } while (0)
++
++# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
++# else
++# define INIT_FAIL_STACK() \
++ do { \
++ fail_stack.avail = 0; \
++ } while (0)
++
++# define RESET_FAIL_STACK()
++# endif
++
++
++/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
++
++ Return 1 if succeeds, and 0 if either ran out of memory
++ allocating space for it or it was already too large.
++
++ REGEX_REALLOCATE_STACK requires `destination' be declared. */
++
++# define DOUBLE_FAIL_STACK(fail_stack) \
++ ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
++ ? 0 \
++ : ((fail_stack).stack = (PREFIX(fail_stack_elt_t) *) \
++ REGEX_REALLOCATE_STACK ((fail_stack).stack, \
++ (fail_stack).size * sizeof (PREFIX(fail_stack_elt_t)), \
++ ((fail_stack).size << 1) * sizeof (PREFIX(fail_stack_elt_t))),\
++ \
++ (fail_stack).stack == NULL \
++ ? 0 \
++ : ((fail_stack).size <<= 1, \
++ 1)))
++
++
++/* Push pointer POINTER on FAIL_STACK.
++ Return 1 if was able to do so and 0 if ran out of memory allocating
++ space to do so. */
++# define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
++ ((FAIL_STACK_FULL () \
++ && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
++ ? 0 \
++ : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
++ 1))
++
++/* Push a pointer value onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_POINTER(item) \
++ fail_stack.stack[fail_stack.avail++].pointer = (UCHAR_T *) (item)
++
++/* This pushes an integer-valued item onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_INT(item) \
++ fail_stack.stack[fail_stack.avail++].integer = (item)
++
++/* Push a fail_stack_elt_t value onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_ELT(item) \
++ fail_stack.stack[fail_stack.avail++] = (item)
++
++/* These three POP... operations complement the three PUSH... operations.
++ All assume that `fail_stack' is nonempty. */
++# define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
++# define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
++# define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
++
++/* Used to omit pushing failure point id's when we're not debugging. */
++# ifdef DEBUG
++# define DEBUG_PUSH PUSH_FAILURE_INT
++# define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
++# else
++# define DEBUG_PUSH(item)
++# define DEBUG_POP(item_addr)
++# endif
++
++
++/* Push the information about the state we will need
++ if we ever fail back to it.
++
++ Requires variables fail_stack, regstart, regend, reg_info, and
++ num_regs_pushed be declared. DOUBLE_FAIL_STACK requires `destination'
++ be declared.
++
++ Does `return FAILURE_CODE' if runs out of memory. */
++
++# define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
++ do { \
++ char *destination; \
++ /* Must be int, so when we don't save any registers, the arithmetic \
++ of 0 + -1 isn't done as unsigned. */ \
++ /* Can't be int, since there is not a shred of a guarantee that int \
++ is wide enough to hold a value of something to which pointer can \
++ be assigned */ \
++ active_reg_t this_reg; \
++ \
++ DEBUG_STATEMENT (failure_id++); \
++ DEBUG_STATEMENT (nfailure_points_pushed++); \
++ DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
++ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
++ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
++ \
++ DEBUG_PRINT2 (" slots needed: %ld\n", NUM_FAILURE_ITEMS); \
++ DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
++ \
++ /* Ensure we have enough space allocated for what we will push. */ \
++ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
++ { \
++ if (!DOUBLE_FAIL_STACK (fail_stack)) \
++ return failure_code; \
++ \
++ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
++ (fail_stack).size); \
++ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
++ } \
++ \
++ /* Push the info, starting with the registers. */ \
++ DEBUG_PRINT1 ("\n"); \
++ \
++ if (1) \
++ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
++ this_reg++) \
++ { \
++ DEBUG_PRINT2 (" Pushing reg: %lu\n", this_reg); \
++ DEBUG_STATEMENT (num_regs_pushed++); \
++ \
++ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
++ PUSH_FAILURE_POINTER (regstart[this_reg]); \
++ \
++ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
++ PUSH_FAILURE_POINTER (regend[this_reg]); \
++ \
++ DEBUG_PRINT2 (" info: %p\n ", \
++ reg_info[this_reg].word.pointer); \
++ DEBUG_PRINT2 (" match_null=%d", \
++ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" matched_something=%d", \
++ MATCHED_SOMETHING (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" ever_matched=%d", \
++ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
++ DEBUG_PRINT1 ("\n"); \
++ PUSH_FAILURE_ELT (reg_info[this_reg].word); \
++ } \
++ \
++ DEBUG_PRINT2 (" Pushing low active reg: %ld\n", lowest_active_reg);\
++ PUSH_FAILURE_INT (lowest_active_reg); \
++ \
++ DEBUG_PRINT2 (" Pushing high active reg: %ld\n", highest_active_reg);\
++ PUSH_FAILURE_INT (highest_active_reg); \
++ \
++ DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
++ PUSH_FAILURE_POINTER (pattern_place); \
++ \
++ DEBUG_PRINT2 (" Pushing string %p: `", string_place); \
++ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
++ size2); \
++ DEBUG_PRINT1 ("'\n"); \
++ PUSH_FAILURE_POINTER (string_place); \
++ \
++ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
++ DEBUG_PUSH (failure_id); \
++ } while (0)
++
++# ifndef DEFINED_ONCE
++/* This is the number of items that are pushed and popped on the stack
++ for each register. */
++# define NUM_REG_ITEMS 3
++
++/* Individual items aside from the registers. */
++# ifdef DEBUG
++# define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
++# else
++# define NUM_NONREG_ITEMS 4
++# endif
++
++/* We push at most this many items on the stack. */
++/* We used to use (num_regs - 1), which is the number of registers
++ this regexp will save; but that was changed to 5
++ to avoid stack overflow for a regexp with lots of parens. */
++# define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
++
++/* We actually push this many items. */
++# define NUM_FAILURE_ITEMS \
++ (((0 \
++ ? 0 : highest_active_reg - lowest_active_reg + 1) \
++ * NUM_REG_ITEMS) \
++ + NUM_NONREG_ITEMS)
++
++/* How many items can still be added to the stack without overflowing it. */
++# define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
++# endif /* not DEFINED_ONCE */
++
++
++/* Pops what PUSH_FAIL_STACK pushes.
++
++ We restore into the parameters, all of which should be lvalues:
++ STR -- the saved data position.
++ PAT -- the saved pattern position.
++ LOW_REG, HIGH_REG -- the highest and lowest active registers.
++ REGSTART, REGEND -- arrays of string positions.
++ REG_INFO -- array of information about each subexpression.
++
++ Also assumes the variables `fail_stack' and (if debugging), `bufp',
++ `pend', `string1', `size1', `string2', and `size2'. */
++# define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
++{ \
++ DEBUG_STATEMENT (unsigned failure_id;) \
++ active_reg_t this_reg; \
++ const UCHAR_T *string_temp; \
++ \
++ assert (!FAIL_STACK_EMPTY ()); \
++ \
++ /* Remove failure points and point to how many regs pushed. */ \
++ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
++ DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
++ DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
++ \
++ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
++ \
++ DEBUG_POP (&failure_id); \
++ DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
++ \
++ /* If the saved string location is NULL, it came from an \
++ on_failure_keep_string_jump opcode, and we want to throw away the \
++ saved NULL, thus retaining our current position in the string. */ \
++ string_temp = POP_FAILURE_POINTER (); \
++ if (string_temp != NULL) \
++ str = (const CHAR_T *) string_temp; \
++ \
++ DEBUG_PRINT2 (" Popping string %p: `", str); \
++ DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
++ DEBUG_PRINT1 ("'\n"); \
++ \
++ pat = (UCHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
++ \
++ /* Restore register info. */ \
++ high_reg = (active_reg_t) POP_FAILURE_INT (); \
++ DEBUG_PRINT2 (" Popping high active reg: %ld\n", high_reg); \
++ \
++ low_reg = (active_reg_t) POP_FAILURE_INT (); \
++ DEBUG_PRINT2 (" Popping low active reg: %ld\n", low_reg); \
++ \
++ if (1) \
++ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
++ { \
++ DEBUG_PRINT2 (" Popping reg: %ld\n", this_reg); \
++ \
++ reg_info[this_reg].word = POP_FAILURE_ELT (); \
++ DEBUG_PRINT2 (" info: %p\n", \
++ reg_info[this_reg].word.pointer); \
++ \
++ regend[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
++ \
++ regstart[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
++ } \
++ else \
++ { \
++ for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
++ { \
++ reg_info[this_reg].word.integer = 0; \
++ regend[this_reg] = 0; \
++ regstart[this_reg] = 0; \
++ } \
++ highest_active_reg = high_reg; \
++ } \
++ \
++ set_regs_matched_done = 0; \
++ DEBUG_STATEMENT (nfailure_points_popped++); \
++} /* POP_FAILURE_POINT */
++
++/* Structure for per-register (a.k.a. per-group) information.
++ Other register information, such as the
++ starting and ending positions (which are addresses), and the list of
++ inner groups (which is a bits list) are maintained in separate
++ variables.
++
++ We are making a (strictly speaking) nonportable assumption here: that
++ the compiler will pack our bit fields into something that fits into
++ the type of `word', i.e., is something that fits into one item on the
++ failure stack. */
++
++
++/* Declarations and macros for re_match_2. */
++
++typedef union
++{
++ PREFIX(fail_stack_elt_t) word;
++ struct
++ {
++ /* This field is one if this group can match the empty string,
++ zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
++# define MATCH_NULL_UNSET_VALUE 3
++ unsigned match_null_string_p : 2;
++ unsigned is_active : 1;
++ unsigned matched_something : 1;
++ unsigned ever_matched_something : 1;
++ } bits;
++} PREFIX(register_info_type);
++
++# ifndef DEFINED_ONCE
++# define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
++# define IS_ACTIVE(R) ((R).bits.is_active)
++# define MATCHED_SOMETHING(R) ((R).bits.matched_something)
++# define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
++
++
++/* Call this when have matched a real character; it sets `matched' flags
++ for the subexpressions which we are currently inside. Also records
++ that those subexprs have matched. */
++# define SET_REGS_MATCHED() \
++ do \
++ { \
++ if (!set_regs_matched_done) \
++ { \
++ active_reg_t r; \
++ set_regs_matched_done = 1; \
++ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
++ { \
++ MATCHED_SOMETHING (reg_info[r]) \
++ = EVER_MATCHED_SOMETHING (reg_info[r]) \
++ = 1; \
++ } \
++ } \
++ } \
++ while (0)
++# endif /* not DEFINED_ONCE */
++
++/* Registers are set to a sentinel when they haven't yet matched. */
++static CHAR_T PREFIX(reg_unset_dummy);
++# define REG_UNSET_VALUE (&PREFIX(reg_unset_dummy))
++# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
++
++/* Subroutine declarations and macros for regex_compile. */
++static void PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg);
++static void PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc,
++ int arg1, int arg2);
++static void PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc,
++ int arg, UCHAR_T *end);
++static void PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc,
++ int arg1, int arg2, UCHAR_T *end);
++static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
++ const CHAR_T *p,
++ reg_syntax_t syntax);
++static boolean PREFIX(at_endline_loc_p) (const CHAR_T *p,
++ const CHAR_T *pend,
++ reg_syntax_t syntax);
++# ifdef WCHAR
++static reg_errcode_t wcs_compile_range (CHAR_T range_start,
++ const CHAR_T **p_ptr,
++ const CHAR_T *pend,
++ char *translate,
++ reg_syntax_t syntax,
++ UCHAR_T *b,
++ CHAR_T *char_set);
++static void insert_space (int num, CHAR_T *loc, CHAR_T *end);
++# else /* BYTE */
++static reg_errcode_t byte_compile_range (unsigned int range_start,
++ const char **p_ptr,
++ const char *pend,
++ RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax,
++ unsigned char *b);
++# endif /* WCHAR */
++
++/* Fetch the next character in the uncompiled pattern---translating it
++ if necessary. Also cast from a signed character in the constant
++ string passed to us by the user to an unsigned char that we can use
++ as an array index (in, e.g., `translate'). */
++/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
++ because it is impossible to allocate 4GB array for some encodings
++ which have 4 byte character_set like UCS4. */
++# ifndef PATFETCH
++# ifdef WCHAR
++# define PATFETCH(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (UCHAR_T) *p++; \
++ if (translate && (c <= 0xff)) c = (UCHAR_T) translate[c]; \
++ } while (0)
++# else /* BYTE */
++# define PATFETCH(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (unsigned char) *p++; \
++ if (translate) c = (unsigned char) translate[c]; \
++ } while (0)
++# endif /* WCHAR */
++# endif
++
++/* Fetch the next character in the uncompiled pattern, with no
++ translation. */
++# define PATFETCH_RAW(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (UCHAR_T) *p++; \
++ } while (0)
++
++/* Go backwards one character in the pattern. */
++# define PATUNFETCH p--
++
++
++/* If `translate' is non-null, return translate[D], else just D. We
++ cast the subscript to translate because some data is declared as
++ `char *', to avoid warnings when a string constant is passed. But
++ when we use a character as a subscript we must make it unsigned. */
++/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
++ because it is impossible to allocate 4GB array for some encodings
++ which have 4 byte character_set like UCS4. */
++
++# ifndef TRANSLATE
++# ifdef WCHAR
++# define TRANSLATE(d) \
++ ((translate && ((UCHAR_T) (d)) <= 0xff) \
++ ? (char) translate[(unsigned char) (d)] : (d))
++# else /* BYTE */
++# define TRANSLATE(d) \
++ (translate ? (char) translate[(unsigned char) (d)] : (char) (d))
++# endif /* WCHAR */
++# endif
++
++
++/* Macros for outputting the compiled pattern into `buffer'. */
++
++/* If the buffer isn't allocated when it comes in, use this. */
++# define INIT_BUF_SIZE (32 * sizeof(UCHAR_T))
++
++/* Make sure we have at least N more bytes of space in buffer. */
++# ifdef WCHAR
++# define GET_BUFFER_SPACE(n) \
++ while (((unsigned long)b - (unsigned long)COMPILED_BUFFER_VAR \
++ + (n)*sizeof(CHAR_T)) > bufp->allocated) \
++ EXTEND_BUFFER ()
++# else /* BYTE */
++# define GET_BUFFER_SPACE(n) \
++ while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
++ EXTEND_BUFFER ()
++# endif /* WCHAR */
++
++/* Make sure we have one more byte of buffer space and then add C to it. */
++# define BUF_PUSH(c) \
++ do { \
++ GET_BUFFER_SPACE (1); \
++ *b++ = (UCHAR_T) (c); \
++ } while (0)
++
++
++/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
++# define BUF_PUSH_2(c1, c2) \
++ do { \
++ GET_BUFFER_SPACE (2); \
++ *b++ = (UCHAR_T) (c1); \
++ *b++ = (UCHAR_T) (c2); \
++ } while (0)
++
++
++/* As with BUF_PUSH_2, except for three bytes. */
++# define BUF_PUSH_3(c1, c2, c3) \
++ do { \
++ GET_BUFFER_SPACE (3); \
++ *b++ = (UCHAR_T) (c1); \
++ *b++ = (UCHAR_T) (c2); \
++ *b++ = (UCHAR_T) (c3); \
++ } while (0)
++
++/* Store a jump with opcode OP at LOC to location TO. We store a
++ relative address offset by the three bytes the jump itself occupies. */
++# define STORE_JUMP(op, loc, to) \
++ PREFIX(store_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)))
++
++/* Likewise, for a two-argument jump. */
++# define STORE_JUMP2(op, loc, to, arg) \
++ PREFIX(store_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), arg)
++
++/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
++# define INSERT_JUMP(op, loc, to) \
++ PREFIX(insert_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), b)
++
++/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
++# define INSERT_JUMP2(op, loc, to, arg) \
++ PREFIX(insert_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)),\
++ arg, b)
++
++/* This is not an arbitrary limit: the arguments which represent offsets
++ into the pattern are two bytes long. So if 2^16 bytes turns out to
++ be too small, many things would have to change. */
++/* Any other compiler which, like MSC, has allocation limit below 2^16
++ bytes will have to use approach similar to what was done below for
++ MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
++ reallocating to 0 bytes. Such thing is not going to work too well.
++ You have been warned!! */
++# ifndef DEFINED_ONCE
++# if defined _MSC_VER && !defined WIN32
++/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
++ The REALLOC define eliminates a flurry of conversion warnings,
++ but is not required. */
++# define MAX_BUF_SIZE 65500L
++# define REALLOC(p,s) realloc ((p), (size_t) (s))
++# else
++# define MAX_BUF_SIZE (1L << 16)
++# define REALLOC(p,s) realloc ((p), (s))
++# endif
++
++/* Extend the buffer by twice its current size via realloc and
++ reset the pointers that pointed into the old block to point to the
++ correct places in the new one. If extending the buffer results in it
++ being larger than MAX_BUF_SIZE, then flag memory exhausted. */
++# if __BOUNDED_POINTERS__
++# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
++# define MOVE_BUFFER_POINTER(P) \
++ (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
++# define ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ else \
++ { \
++ SET_HIGH_BOUND (b); \
++ SET_HIGH_BOUND (begalt); \
++ if (fixup_alt_jump) \
++ SET_HIGH_BOUND (fixup_alt_jump); \
++ if (laststart) \
++ SET_HIGH_BOUND (laststart); \
++ if (pending_exact) \
++ SET_HIGH_BOUND (pending_exact); \
++ }
++# else
++# define MOVE_BUFFER_POINTER(P) (P) += incr
++# define ELSE_EXTEND_BUFFER_HIGH_BOUND
++# endif
++# endif /* not DEFINED_ONCE */
++
++# ifdef WCHAR
++# define EXTEND_BUFFER() \
++ do { \
++ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
++ int wchar_count; \
++ if (bufp->allocated + sizeof(UCHAR_T) > MAX_BUF_SIZE) \
++ return REG_ESIZE; \
++ bufp->allocated <<= 1; \
++ if (bufp->allocated > MAX_BUF_SIZE) \
++ bufp->allocated = MAX_BUF_SIZE; \
++ /* How many characters the new buffer can have? */ \
++ wchar_count = bufp->allocated / sizeof(UCHAR_T); \
++ if (wchar_count == 0) wchar_count = 1; \
++ /* Truncate the buffer to CHAR_T align. */ \
++ bufp->allocated = wchar_count * sizeof(UCHAR_T); \
++ RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T); \
++ bufp->buffer = (char*)COMPILED_BUFFER_VAR; \
++ if (COMPILED_BUFFER_VAR == NULL) \
++ return REG_ESPACE; \
++ /* If the buffer moved, move all the pointers into it. */ \
++ if (old_buffer != COMPILED_BUFFER_VAR) \
++ { \
++ int incr = COMPILED_BUFFER_VAR - old_buffer; \
++ MOVE_BUFFER_POINTER (b); \
++ MOVE_BUFFER_POINTER (begalt); \
++ if (fixup_alt_jump) \
++ MOVE_BUFFER_POINTER (fixup_alt_jump); \
++ if (laststart) \
++ MOVE_BUFFER_POINTER (laststart); \
++ if (pending_exact) \
++ MOVE_BUFFER_POINTER (pending_exact); \
++ } \
++ ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ } while (0)
++# else /* BYTE */
++# define EXTEND_BUFFER() \
++ do { \
++ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
++ if (bufp->allocated == MAX_BUF_SIZE) \
++ return REG_ESIZE; \
++ bufp->allocated <<= 1; \
++ if (bufp->allocated > MAX_BUF_SIZE) \
++ bufp->allocated = MAX_BUF_SIZE; \
++ bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, \
++ bufp->allocated); \
++ if (COMPILED_BUFFER_VAR == NULL) \
++ return REG_ESPACE; \
++ /* If the buffer moved, move all the pointers into it. */ \
++ if (old_buffer != COMPILED_BUFFER_VAR) \
++ { \
++ int incr = COMPILED_BUFFER_VAR - old_buffer; \
++ MOVE_BUFFER_POINTER (b); \
++ MOVE_BUFFER_POINTER (begalt); \
++ if (fixup_alt_jump) \
++ MOVE_BUFFER_POINTER (fixup_alt_jump); \
++ if (laststart) \
++ MOVE_BUFFER_POINTER (laststart); \
++ if (pending_exact) \
++ MOVE_BUFFER_POINTER (pending_exact); \
++ } \
++ ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ } while (0)
++# endif /* WCHAR */
++
++# ifndef DEFINED_ONCE
++/* Since we have one byte reserved for the register number argument to
++ {start,stop}_memory, the maximum number of groups we can report
++ things about is what fits in that byte. */
++# define MAX_REGNUM 255
++
++/* But patterns can have more than `MAX_REGNUM' registers. We just
++ ignore the excess. */
++typedef unsigned regnum_t;
++
++
++/* Macros for the compile stack. */
++
++/* Since offsets can go either forwards or backwards, this type needs to
++ be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
++/* int may be not enough when sizeof(int) == 2. */
++typedef long pattern_offset_t;
++
++typedef struct
++{
++ pattern_offset_t begalt_offset;
++ pattern_offset_t fixup_alt_jump;
++ pattern_offset_t inner_group_offset;
++ pattern_offset_t laststart_offset;
++ regnum_t regnum;
++} compile_stack_elt_t;
++
++
++typedef struct
++{
++ compile_stack_elt_t *stack;
++ unsigned size;
++ unsigned avail; /* Offset of next open position. */
++} compile_stack_type;
++
++
++# define INIT_COMPILE_STACK_SIZE 32
++
++# define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
++# define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
++
++/* The next available element. */
++# define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
++
++# endif /* not DEFINED_ONCE */
++
++/* Set the bit for character C in a list. */
++# ifndef DEFINED_ONCE
++# define SET_LIST_BIT(c) \
++ (b[((unsigned char) (c)) / BYTEWIDTH] \
++ |= 1 << (((unsigned char) c) % BYTEWIDTH))
++# endif /* DEFINED_ONCE */
++
++/* Get the next unsigned number in the uncompiled pattern. */
++# define GET_UNSIGNED_NUMBER(num) \
++ { \
++ while (p != pend) \
++ { \
++ PATFETCH (c); \
++ if (c < '0' || c > '9') \
++ break; \
++ if (num <= RE_DUP_MAX) \
++ { \
++ if (num < 0) \
++ num = 0; \
++ num = num * 10 + c - '0'; \
++ } \
++ } \
++ }
++
++# ifndef DEFINED_ONCE
++# if WIDE_CHAR_SUPPORT
++/* The GNU C library provides support for user-defined character classes
++ and the functions from ISO C amendement 1. */
++# ifdef CHARCLASS_NAME_MAX
++# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
++# else
++/* This shouldn't happen but some implementation might still have this
++ problem. Use a reasonable default value. */
++# define CHAR_CLASS_MAX_LENGTH 256
++# endif
++
++# ifdef _LIBC
++# define IS_CHAR_CLASS(string) __wctype (string)
++# else
++# define IS_CHAR_CLASS(string) wctype (string)
++# endif
++# else
++# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
++
++# define IS_CHAR_CLASS(string) \
++ (STREQ (string, "alpha") || STREQ (string, "upper") \
++ || STREQ (string, "lower") || STREQ (string, "digit") \
++ || STREQ (string, "alnum") || STREQ (string, "xdigit") \
++ || STREQ (string, "space") || STREQ (string, "print") \
++ || STREQ (string, "punct") || STREQ (string, "graph") \
++ || STREQ (string, "cntrl") || STREQ (string, "blank"))
++# endif
++# endif /* DEFINED_ONCE */
++
++# ifndef MATCH_MAY_ALLOCATE
++
++/* If we cannot allocate large objects within re_match_2_internal,
++ we make the fail stack and register vectors global.
++ The fail stack, we grow to the maximum size when a regexp
++ is compiled.
++ The register vectors, we adjust in size each time we
++ compile a regexp, according to the number of registers it needs. */
++
++static PREFIX(fail_stack_type) fail_stack;
++
++/* Size with which the following vectors are currently allocated.
++ That is so we can make them bigger as needed,
++ but never make them smaller. */
++# ifdef DEFINED_ONCE
++static int regs_allocated_size;
++
++static const char ** regstart, ** regend;
++static const char ** old_regstart, ** old_regend;
++static const char **best_regstart, **best_regend;
++static const char **reg_dummy;
++# endif /* DEFINED_ONCE */
++
++static PREFIX(register_info_type) *PREFIX(reg_info);
++static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
++
++/* Make the register vectors big enough for NUM_REGS registers,
++ but don't make them smaller. */
++
++static void
++PREFIX(regex_grow_registers) (int num_regs)
++{
++ if (num_regs > regs_allocated_size)
++ {
++ RETALLOC_IF (regstart, num_regs, const char *);
++ RETALLOC_IF (regend, num_regs, const char *);
++ RETALLOC_IF (old_regstart, num_regs, const char *);
++ RETALLOC_IF (old_regend, num_regs, const char *);
++ RETALLOC_IF (best_regstart, num_regs, const char *);
++ RETALLOC_IF (best_regend, num_regs, const char *);
++ RETALLOC_IF (PREFIX(reg_info), num_regs, PREFIX(register_info_type));
++ RETALLOC_IF (reg_dummy, num_regs, const char *);
++ RETALLOC_IF (PREFIX(reg_info_dummy), num_regs, PREFIX(register_info_type));
++
++ regs_allocated_size = num_regs;
++ }
++}
++
++# endif /* not MATCH_MAY_ALLOCATE */
++
++# ifndef DEFINED_ONCE
++static boolean group_in_compile_stack (compile_stack_type compile_stack,
++ regnum_t regnum);
++# endif /* not DEFINED_ONCE */
++
++/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
++ Returns one of error codes defined in `regex.h', or zero for success.
++
++ Assumes the `allocated' (and perhaps `buffer') and `translate'
++ fields are set in BUFP on entry.
++
++ If it succeeds, results are put in BUFP (if it returns an error, the
++ contents of BUFP are undefined):
++ `buffer' is the compiled pattern;
++ `syntax' is set to SYNTAX;
++ `used' is set to the length of the compiled pattern;
++ `fastmap_accurate' is zero;
++ `re_nsub' is the number of subexpressions in PATTERN;
++ `not_bol' and `not_eol' are zero;
++
++ The `fastmap' and `newline_anchor' fields are neither
++ examined nor set. */
++
++/* Return, freeing storage we allocated. */
++# ifdef WCHAR
++# define FREE_STACK_RETURN(value) \
++ return (free(pattern), free(mbs_offset), free(is_binary), free (compile_stack.stack), value)
++# else
++# define FREE_STACK_RETURN(value) \
++ return (free (compile_stack.stack), value)
++# endif /* WCHAR */
++
++static reg_errcode_t
++PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
++ size_t ARG_PREFIX(size), reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp)
++{
++ /* We fetch characters from PATTERN here. Even though PATTERN is
++ `char *' (i.e., signed), we declare these variables as unsigned, so
++ they can be reliably used as array indices. */
++ register UCHAR_T c, c1;
++
++#ifdef WCHAR
++ /* A temporary space to keep wchar_t pattern and compiled pattern. */
++ CHAR_T *pattern, *COMPILED_BUFFER_VAR;
++ size_t size;
++ /* offset buffer for optimization. See convert_mbs_to_wc. */
++ int *mbs_offset = NULL;
++ /* It hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++ /* A flag whether exactn is handling binary data or not. */
++ char is_exactn_bin = FALSE;
++#endif /* WCHAR */
++
++ /* A random temporary spot in PATTERN. */
++ const CHAR_T *p1;
++
++ /* Points to the end of the buffer, where we should append. */
++ register UCHAR_T *b;
++
++ /* Keeps track of unclosed groups. */
++ compile_stack_type compile_stack;
++
++ /* Points to the current (ending) position in the pattern. */
++#ifdef WCHAR
++ const CHAR_T *p;
++ const CHAR_T *pend;
++#else /* BYTE */
++ const CHAR_T *p = pattern;
++ const CHAR_T *pend = pattern + size;
++#endif /* WCHAR */
++
++ /* How to translate the characters in the pattern. */
++ RE_TRANSLATE_TYPE translate = bufp->translate;
++
++ /* Address of the count-byte of the most recently inserted `exactn'
++ command. This makes it possible to tell if a new exact-match
++ character can be added to that command or if the character requires
++ a new `exactn' command. */
++ UCHAR_T *pending_exact = 0;
++
++ /* Address of start of the most recently finished expression.
++ This tells, e.g., postfix * where to find the start of its
++ operand. Reset at the beginning of groups and alternatives. */
++ UCHAR_T *laststart = 0;
++
++ /* Address of beginning of regexp, or inside of last group. */
++ UCHAR_T *begalt;
++
++ /* Address of the place where a forward jump should go to the end of
++ the containing expression. Each alternative of an `or' -- except the
++ last -- ends with a forward jump of this sort. */
++ UCHAR_T *fixup_alt_jump = 0;
++
++ /* Counts open-groups as they are encountered. Remembered for the
++ matching close-group on the compile stack, so the same register
++ number is put in the stop_memory as the start_memory. */
++ regnum_t regnum = 0;
++
++#ifdef WCHAR
++ /* Initialize the wchar_t PATTERN and offset_buffer. */
++ p = pend = pattern = TALLOC(csize + 1, CHAR_T);
++ mbs_offset = TALLOC(csize + 1, int);
++ is_binary = TALLOC(csize + 1, char);
++ if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
++ {
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++ return REG_ESPACE;
++ }
++ pattern[csize] = L'\0'; /* sentinel */
++ size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
++ pend = p + size;
++ if (size < 0)
++ {
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++ return REG_BADPAT;
++ }
++#endif
++
++#ifdef DEBUG
++ DEBUG_PRINT1 ("\nCompiling pattern: ");
++ if (debug)
++ {
++ unsigned debug_count;
++
++ for (debug_count = 0; debug_count < size; debug_count++)
++ PUT_CHAR (pattern[debug_count]);
++ putchar ('\n');
++ }
++#endif /* DEBUG */
++
++ /* Initialize the compile stack. */
++ compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
++ if (compile_stack.stack == NULL)
++ {
++#ifdef WCHAR
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++#endif
++ return REG_ESPACE;
++ }
++
++ compile_stack.size = INIT_COMPILE_STACK_SIZE;
++ compile_stack.avail = 0;
++
++ /* Initialize the pattern buffer. */
++ bufp->syntax = syntax;
++ bufp->fastmap_accurate = 0;
++ bufp->not_bol = bufp->not_eol = 0;
++
++ /* Set `used' to zero, so that if we return an error, the pattern
++ printer (for debugging) will think there's no pattern. We reset it
++ at the end. */
++ bufp->used = 0;
++
++ /* Always count groups, whether or not bufp->no_sub is set. */
++ bufp->re_nsub = 0;
++
++#if !defined emacs && !defined SYNTAX_TABLE
++ /* Initialize the syntax table. */
++ init_syntax_once ();
++#endif
++
++ if (bufp->allocated == 0)
++ {
++ if (bufp->buffer)
++ { /* If zero allocated, but buffer is non-null, try to realloc
++ enough space. This loses if buffer's address is bogus, but
++ that is the user's responsibility. */
++#ifdef WCHAR
++ /* Free bufp->buffer and allocate an array for wchar_t pattern
++ buffer. */
++ free(bufp->buffer);
++ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE/sizeof(UCHAR_T),
++ UCHAR_T);
++#else
++ RETALLOC (COMPILED_BUFFER_VAR, INIT_BUF_SIZE, UCHAR_T);
++#endif /* WCHAR */
++ }
++ else
++ { /* Caller did not allocate a buffer. Do it for them. */
++ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE / sizeof(UCHAR_T),
++ UCHAR_T);
++ }
++
++ if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE);
++#ifdef WCHAR
++ bufp->buffer = (char*)COMPILED_BUFFER_VAR;
++#endif /* WCHAR */
++ bufp->allocated = INIT_BUF_SIZE;
++ }
++#ifdef WCHAR
++ else
++ COMPILED_BUFFER_VAR = (UCHAR_T*) bufp->buffer;
++#endif
++
++ begalt = b = COMPILED_BUFFER_VAR;
++
++ /* Loop through the uncompiled pattern until we're at the end. */
++ while (p != pend)
++ {
++ PATFETCH (c);
++
++ switch (c)
++ {
++ case '^':
++ {
++ if ( /* If at start of pattern, it's an operator. */
++ p == pattern + 1
++ /* If context independent, it's an operator. */
++ || syntax & RE_CONTEXT_INDEP_ANCHORS
++ /* Otherwise, depends on what's come before. */
++ || PREFIX(at_begline_loc_p) (pattern, p, syntax))
++ BUF_PUSH (begline);
++ else
++ goto normal_char;
++ }
++ break;
++
++
++ case '$':
++ {
++ if ( /* If at end of pattern, it's an operator. */
++ p == pend
++ /* If context independent, it's an operator. */
++ || syntax & RE_CONTEXT_INDEP_ANCHORS
++ /* Otherwise, depends on what's next. */
++ || PREFIX(at_endline_loc_p) (p, pend, syntax))
++ BUF_PUSH (endline);
++ else
++ goto normal_char;
++ }
++ break;
++
++
++ case '+':
++ case '?':
++ if ((syntax & RE_BK_PLUS_QM)
++ || (syntax & RE_LIMITED_OPS))
++ goto normal_char;
++ handle_plus:
++ case '*':
++ /* If there is no previous pattern... */
++ if (!laststart)
++ {
++ if (syntax & RE_CONTEXT_INVALID_OPS)
++ FREE_STACK_RETURN (REG_BADRPT);
++ else if (!(syntax & RE_CONTEXT_INDEP_OPS))
++ goto normal_char;
++ }
++
++ {
++ /* Are we optimizing this jump? */
++ boolean keep_string_p = false;
++
++ /* 1 means zero (many) matches is allowed. */
++ char zero_times_ok = 0, many_times_ok = 0;
++
++ /* If there is a sequence of repetition chars, collapse it
++ down to just one (the right one). We can't combine
++ interval operators with these because of, e.g., `a{2}*',
++ which should only match an even number of `a's. */
++
++ for (;;)
++ {
++ zero_times_ok |= c != '+';
++ many_times_ok |= c != '?';
++
++ if (p == pend)
++ break;
++
++ PATFETCH (c);
++
++ if (c == '*'
++ || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
++ ;
++
++ else if (syntax & RE_BK_PLUS_QM && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ if (!(c1 == '+' || c1 == '?'))
++ {
++ PATUNFETCH;
++ PATUNFETCH;
++ break;
++ }
++
++ c = c1;
++ }
++ else
++ {
++ PATUNFETCH;
++ break;
++ }
++
++ /* If we get here, we found another repeat character. */
++ }
++
++ /* Star, etc. applied to an empty pattern is equivalent
++ to an empty pattern. */
++ if (!laststart)
++ break;
++
++ /* Now we know whether or not zero matches is allowed
++ and also whether or not two or more matches is allowed. */
++ if (many_times_ok)
++ { /* More than one repetition is allowed, so put in at the
++ end a backward relative jump from `b' to before the next
++ jump we're going to put in below (which jumps from
++ laststart to after this jump).
++
++ But if we are at the `*' in the exact sequence `.*\n',
++ insert an unconditional jump backwards to the .,
++ instead of the beginning of the loop. This way we only
++ push a failure point once, instead of every time
++ through the loop. */
++ assert (p - 1 > pattern);
++
++ /* Allocate the space for the jump. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++
++ /* We know we are not at the first character of the pattern,
++ because laststart was nonzero. And we've already
++ incremented `p', by the way, to be the character after
++ the `*'. Do we have to do something analogous here
++ for null bytes, because of RE_DOT_NOT_NULL? */
++ if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
++ && zero_times_ok
++ && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
++ && !(syntax & RE_DOT_NEWLINE))
++ { /* We have .*\n. */
++ STORE_JUMP (jump, b, laststart);
++ keep_string_p = true;
++ }
++ else
++ /* Anything else. */
++ STORE_JUMP (maybe_pop_jump, b, laststart -
++ (1 + OFFSET_ADDRESS_SIZE));
++
++ /* We've added more stuff to the buffer. */
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++
++ /* On failure, jump from laststart to b + 3, which will be the
++ end of the buffer after this jump is inserted. */
++ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE' instead of
++ 'b + 3'. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
++ : on_failure_jump,
++ laststart, b + 1 + OFFSET_ADDRESS_SIZE);
++ pending_exact = 0;
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ if (!zero_times_ok)
++ {
++ /* At least one repetition is required, so insert a
++ `dummy_failure_jump' before the initial
++ `on_failure_jump' instruction of the loop. This
++ effects a skip over that instruction the first time
++ we hit that loop. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (dummy_failure_jump, laststart, laststart +
++ 2 + 2 * OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++ }
++ break;
++
++
++ case '.':
++ laststart = b;
++ BUF_PUSH (anychar);
++ break;
++
++
++ case '[':
++ {
++ boolean had_char_class = false;
++#ifdef WCHAR
++ CHAR_T range_start = 0xffffffff;
++#else
++ unsigned int range_start = 0xffffffff;
++#endif
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++#ifdef WCHAR
++ /* We assume a charset(_not) structure as a wchar_t array.
++ charset[0] = (re_opcode_t) charset(_not)
++ charset[1] = l (= length of char_classes)
++ charset[2] = m (= length of collating_symbols)
++ charset[3] = n (= length of equivalence_classes)
++ charset[4] = o (= length of char_ranges)
++ charset[5] = p (= length of chars)
++
++ charset[6] = char_class (wctype_t)
++ charset[6+CHAR_CLASS_SIZE] = char_class (wctype_t)
++ ...
++ charset[l+5] = char_class (wctype_t)
++
++ charset[l+6] = collating_symbol (wchar_t)
++ ...
++ charset[l+m+5] = collating_symbol (wchar_t)
++ ifdef _LIBC we use the index if
++ _NL_COLLATE_SYMB_EXTRAMB instead of
++ wchar_t string.
++
++ charset[l+m+6] = equivalence_classes (wchar_t)
++ ...
++ charset[l+m+n+5] = equivalence_classes (wchar_t)
++ ifdef _LIBC we use the index in
++ _NL_COLLATE_WEIGHT instead of
++ wchar_t string.
++
++ charset[l+m+n+6] = range_start
++ charset[l+m+n+7] = range_end
++ ...
++ charset[l+m+n+2o+4] = range_start
++ charset[l+m+n+2o+5] = range_end
++ ifdef _LIBC we use the value looked up
++ in _NL_COLLATE_COLLSEQ instead of
++ wchar_t character.
++
++ charset[l+m+n+2o+6] = char
++ ...
++ charset[l+m+n+2o+p+5] = char
++
++ */
++
++ /* We need at least 6 spaces: the opcode, the length of
++ char_classes, the length of collating_symbols, the length of
++ equivalence_classes, the length of char_ranges, the length of
++ chars. */
++ GET_BUFFER_SPACE (6);
++
++ /* Save b as laststart. And We use laststart as the pointer
++ to the first element of the charset here.
++ In other words, laststart[i] indicates charset[i]. */
++ laststart = b;
++
++ /* We test `*p == '^' twice, instead of using an if
++ statement, so we only need one BUF_PUSH. */
++ BUF_PUSH (*p == '^' ? charset_not : charset);
++ if (*p == '^')
++ p++;
++
++ /* Push the length of char_classes, the length of
++ collating_symbols, the length of equivalence_classes, the
++ length of char_ranges and the length of chars. */
++ BUF_PUSH_3 (0, 0, 0);
++ BUF_PUSH_2 (0, 0);
++
++ /* Remember the first position in the bracket expression. */
++ p1 = p;
++
++ /* charset_not matches newline according to a syntax bit. */
++ if ((re_opcode_t) b[-6] == charset_not
++ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
++ {
++ BUF_PUSH('\n');
++ laststart[5]++; /* Update the length of characters */
++ }
++
++ /* Read in characters and ranges, setting map bits. */
++ for (;;)
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ PATFETCH (c);
++
++ /* \ might escape characters inside [...] and [^...]. */
++ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ BUF_PUSH(c1);
++ laststart[5]++; /* Update the length of chars */
++ range_start = c1;
++ continue;
++ }
++
++ /* Could be the end of the bracket expression. If it's
++ not (i.e., when the bracket expression is `[]' so
++ far), the ']' character bit gets set way below. */
++ if (c == ']' && p != p1 + 1)
++ break;
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character class. */
++ if (had_char_class && c == '-' && *p != ']')
++ FREE_STACK_RETURN (REG_ERANGE);
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character: if this is a hyphen not at the
++ beginning or the end of a list, then it's the range
++ operator. */
++ if (c == '-'
++ && !(p - 2 >= pattern && p[-2] == '[')
++ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
++ && *p != ']')
++ {
++ reg_errcode_t ret;
++ /* Allocate the space for range_start and range_end. */
++ GET_BUFFER_SPACE (2);
++ /* Update the pointer to indicate end of buffer. */
++ b += 2;
++ ret = wcs_compile_range (range_start, &p, pend, translate,
++ syntax, b, laststart);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++ else if (p[0] == '-' && p[1] != ']')
++ { /* This handles ranges made up of characters only. */
++ reg_errcode_t ret;
++
++ /* Move past the `-'. */
++ PATFETCH (c1);
++ /* Allocate the space for range_start and range_end. */
++ GET_BUFFER_SPACE (2);
++ /* Update the pointer to indicate end of buffer. */
++ b += 2;
++ ret = wcs_compile_range (c, &p, pend, translate, syntax, b,
++ laststart);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ /* See if we're at the beginning of a possible character
++ class. */
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
++ { /* Leave room for the null. */
++ char str[CHAR_CLASS_MAX_LENGTH + 1];
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[:'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == ':' && *p == ']') || p == pend)
++ break;
++ if (c1 < CHAR_CLASS_MAX_LENGTH)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ /* If isn't a word bracketed by `[:' and `:]':
++ undo the ending character, the letters, and leave
++ the leading `:' and `[' (but store them as character). */
++ if (c == ':' && *p == ']')
++ {
++ wctype_t wt;
++ uintptr_t alignedp;
++
++ /* Query the character class as wctype_t. */
++ wt = IS_CHAR_CLASS (str);
++ if (wt == 0)
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ /* Allocate the space for character class. */
++ GET_BUFFER_SPACE(CHAR_CLASS_SIZE);
++ /* Update the pointer to indicate end of buffer. */
++ b += CHAR_CLASS_SIZE;
++ /* Move data which follow character classes
++ not to violate the data. */
++ insert_space(CHAR_CLASS_SIZE,
++ laststart + 6 + laststart[1],
++ b - 1);
++ alignedp = ((uintptr_t)(laststart + 6 + laststart[1])
++ + __alignof__(wctype_t) - 1)
++ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
++ /* Store the character class. */
++ *((wctype_t*)alignedp) = wt;
++ /* Update length of char_classes */
++ laststart[1] += CHAR_CLASS_SIZE;
++
++ had_char_class = true;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ BUF_PUSH ('[');
++ BUF_PUSH (':');
++ laststart[5] += 2; /* Update the length of characters */
++ range_start = ':';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && (*p == '='
++ || *p == '.'))
++ {
++ CHAR_T str[128]; /* Should be large enough. */
++ CHAR_T delim = *p; /* '=' or '.' */
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[=' or '[[.'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == delim && *p == ']') || p == pend)
++ break;
++ if (c1 < sizeof (str) - 1)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == delim && *p == ']' && str[0] != '\0')
++ {
++ unsigned int i, offset;
++ /* If we have no collation data we use the default
++ collation in which each character is in a class
++ by itself. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++
++ /* If not defined _LIBC, we push the name and
++ `\0' for the sake of matching performance. */
++ int datasize = c1 + 1;
++
++# ifdef _LIBC
++ int32_t idx = 0;
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++ }
++# ifdef _LIBC
++ else
++ {
++ const int32_t *table;
++ const int32_t *weights;
++ const int32_t *extra;
++ const int32_t *indirect;
++ wint_t *cp;
++
++ /* This #include defines a local function! */
++# include <locale/weightwc.h>
++
++ if(delim == '=')
++ {
++ /* We push the index for equivalence class. */
++ cp = (wint_t*)str;
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_TABLEWC);
++ weights = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_WEIGHTWC);
++ extra = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_EXTRAWC);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_INDIRECTWC);
++
++ idx = findidx ((const wint_t**)&cp, c1);
++ if (idx == 0 || cp < (wint_t*) str + c1)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ str[0] = (wchar_t)idx;
++ }
++ else /* delim == '.' */
++ {
++ /* We push collation sequence value
++ for collating symbol. */
++ int32_t table_size;
++ const int32_t *symb_table;
++ const unsigned char *extra;
++ int32_t idx;
++ int32_t elem;
++ int32_t second;
++ int32_t hash;
++ char char_str[c1];
++
++ /* We have to convert the name to a single-byte
++ string. This is possible since the names
++ consist of ASCII characters and the internal
++ representation is UCS4. */
++ for (i = 0; i < c1; ++i)
++ char_str[i] = str[i];
++
++ table_size =
++ _NL_CURRENT_WORD (LC_COLLATE,
++ _NL_COLLATE_SYMB_HASH_SIZEMB);
++ symb_table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_TABLEMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_EXTRAMB);
++
++ /* Locate the character in the hashing table. */
++ hash = elem_hash (char_str, c1);
++
++ idx = 0;
++ elem = hash % table_size;
++ second = hash % (table_size - 2);
++ while (symb_table[2 * elem] != 0)
++ {
++ /* First compare the hashing value. */
++ if (symb_table[2 * elem] == hash
++ && c1 == extra[symb_table[2 * elem + 1]]
++ && memcmp (char_str,
++ &extra[symb_table[2 * elem + 1]
++ + 1], c1) == 0)
++ {
++ /* Yep, this is the entry. */
++ idx = symb_table[2 * elem + 1];
++ idx += 1 + extra[idx];
++ break;
++ }
++
++ /* Next entry. */
++ elem += second;
++ }
++
++ if (symb_table[2 * elem] != 0)
++ {
++ /* Compute the index of the byte sequence
++ in the table. */
++ idx += 1 + extra[idx];
++ /* Adjust for the alignment. */
++ idx = (idx + 3) & ~3;
++
++ str[0] = (wchar_t) idx + 4;
++ }
++ else if (symb_table[2 * elem] == 0 && c1 == 1)
++ {
++ /* No valid character. Match it as a
++ single byte character. */
++ had_char_class = false;
++ BUF_PUSH(str[0]);
++ /* Update the length of characters */
++ laststart[5]++;
++ range_start = str[0];
++
++ /* Throw away the ] at the end of the
++ collating symbol. */
++ PATFETCH (c);
++ /* exit from the switch block. */
++ continue;
++ }
++ else
++ FREE_STACK_RETURN (REG_ECOLLATE);
++ }
++ datasize = 1;
++ }
++# endif
++ /* Throw away the ] at the end of the equivalence
++ class (or collating symbol). */
++ PATFETCH (c);
++
++ /* Allocate the space for the equivalence class
++ (or collating symbol) (and '\0' if needed). */
++ GET_BUFFER_SPACE(datasize);
++ /* Update the pointer to indicate end of buffer. */
++ b += datasize;
++
++ if (delim == '=')
++ { /* equivalence class */
++ /* Calculate the offset of char_ranges,
++ which is next to equivalence_classes. */
++ offset = laststart[1] + laststart[2]
++ + laststart[3] +6;
++ /* Insert space. */
++ insert_space(datasize, laststart + offset, b - 1);
++
++ /* Write the equivalence_class and \0. */
++ for (i = 0 ; i < datasize ; i++)
++ laststart[offset + i] = str[i];
++
++ /* Update the length of equivalence_classes. */
++ laststart[3] += datasize;
++ had_char_class = true;
++ }
++ else /* delim == '.' */
++ { /* collating symbol */
++ /* Calculate the offset of the equivalence_classes,
++ which is next to collating_symbols. */
++ offset = laststart[1] + laststart[2] + 6;
++ /* Insert space and write the collationg_symbol
++ and \0. */
++ insert_space(datasize, laststart + offset, b-1);
++ for (i = 0 ; i < datasize ; i++)
++ laststart[offset + i] = str[i];
++
++ /* In re_match_2_internal if range_start < -1, we
++ assume -range_start is the offset of the
++ collating symbol which is specified as
++ the character of the range start. So we assign
++ -(laststart[1] + laststart[2] + 6) to
++ range_start. */
++ range_start = -(laststart[1] + laststart[2] + 6);
++ /* Update the length of collating_symbol. */
++ laststart[2] += datasize;
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ BUF_PUSH ('[');
++ BUF_PUSH (delim);
++ laststart[5] += 2; /* Update the length of characters */
++ range_start = delim;
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ had_char_class = false;
++ BUF_PUSH(c);
++ laststart[5]++; /* Update the length of characters */
++ range_start = c;
++ }
++ }
++
++#else /* BYTE */
++ /* Ensure that we have enough space to push a charset: the
++ opcode, the length count, and the bitset; 34 bytes in all. */
++ GET_BUFFER_SPACE (34);
++
++ laststart = b;
++
++ /* We test `*p == '^' twice, instead of using an if
++ statement, so we only need one BUF_PUSH. */
++ BUF_PUSH (*p == '^' ? charset_not : charset);
++ if (*p == '^')
++ p++;
++
++ /* Remember the first position in the bracket expression. */
++ p1 = p;
++
++ /* Push the number of bytes in the bitmap. */
++ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
++
++ /* Clear the whole map. */
++ bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
++
++ /* charset_not matches newline according to a syntax bit. */
++ if ((re_opcode_t) b[-2] == charset_not
++ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
++ SET_LIST_BIT ('\n');
++
++ /* Read in characters and ranges, setting map bits. */
++ for (;;)
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ PATFETCH (c);
++
++ /* \ might escape characters inside [...] and [^...]. */
++ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ SET_LIST_BIT (c1);
++ range_start = c1;
++ continue;
++ }
++
++ /* Could be the end of the bracket expression. If it's
++ not (i.e., when the bracket expression is `[]' so
++ far), the ']' character bit gets set way below. */
++ if (c == ']' && p != p1 + 1)
++ break;
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character class. */
++ if (had_char_class && c == '-' && *p != ']')
++ FREE_STACK_RETURN (REG_ERANGE);
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character: if this is a hyphen not at the
++ beginning or the end of a list, then it's the range
++ operator. */
++ if (c == '-'
++ && !(p - 2 >= pattern && p[-2] == '[')
++ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
++ && *p != ']')
++ {
++ reg_errcode_t ret
++ = byte_compile_range (range_start, &p, pend, translate,
++ syntax, b);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ else if (p[0] == '-' && p[1] != ']')
++ { /* This handles ranges made up of characters only. */
++ reg_errcode_t ret;
++
++ /* Move past the `-'. */
++ PATFETCH (c1);
++
++ ret = byte_compile_range (c, &p, pend, translate, syntax, b);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ /* See if we're at the beginning of a possible character
++ class. */
++
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
++ { /* Leave room for the null. */
++ char str[CHAR_CLASS_MAX_LENGTH + 1];
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[:'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == ':' && *p == ']') || p == pend)
++ break;
++ if (((int) c1) < CHAR_CLASS_MAX_LENGTH)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ /* If isn't a word bracketed by `[:' and `:]':
++ undo the ending character, the letters, and leave
++ the leading `:' and `[' (but set bits for them). */
++ if (c == ':' && *p == ']')
++ {
++# if WIDE_CHAR_SUPPORT
++ boolean is_lower = STREQ (str, "lower");
++ boolean is_upper = STREQ (str, "upper");
++ wctype_t wt;
++ int ch;
++
++ wt = IS_CHAR_CLASS (str);
++ if (wt == 0)
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
++ {
++# ifdef _LIBC
++ if (__iswctype (__btowc (ch), wt))
++ SET_LIST_BIT (ch);
++# else
++ if (iswctype (btowc (ch), wt))
++ SET_LIST_BIT (ch);
++# endif
++
++ if (translate && (is_upper || is_lower)
++ && (ISUPPER (ch) || ISLOWER (ch)))
++ SET_LIST_BIT (ch);
++ }
++
++ had_char_class = true;
++# else
++ int ch;
++ boolean is_alnum = STREQ (str, "alnum");
++ boolean is_alpha = STREQ (str, "alpha");
++ boolean is_blank = STREQ (str, "blank");
++ boolean is_cntrl = STREQ (str, "cntrl");
++ boolean is_digit = STREQ (str, "digit");
++ boolean is_graph = STREQ (str, "graph");
++ boolean is_lower = STREQ (str, "lower");
++ boolean is_print = STREQ (str, "print");
++ boolean is_punct = STREQ (str, "punct");
++ boolean is_space = STREQ (str, "space");
++ boolean is_upper = STREQ (str, "upper");
++ boolean is_xdigit = STREQ (str, "xdigit");
++
++ if (!IS_CHAR_CLASS (str))
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
++ {
++ /* This was split into 3 if's to
++ avoid an arbitrary limit in some compiler. */
++ if ( (is_alnum && ISALNUM (ch))
++ || (is_alpha && ISALPHA (ch))
++ || (is_blank && ISBLANK (ch))
++ || (is_cntrl && ISCNTRL (ch)))
++ SET_LIST_BIT (ch);
++ if ( (is_digit && ISDIGIT (ch))
++ || (is_graph && ISGRAPH (ch))
++ || (is_lower && ISLOWER (ch))
++ || (is_print && ISPRINT (ch)))
++ SET_LIST_BIT (ch);
++ if ( (is_punct && ISPUNCT (ch))
++ || (is_space && ISSPACE (ch))
++ || (is_upper && ISUPPER (ch))
++ || (is_xdigit && ISXDIGIT (ch)))
++ SET_LIST_BIT (ch);
++ if ( translate && (is_upper || is_lower)
++ && (ISUPPER (ch) || ISLOWER (ch)))
++ SET_LIST_BIT (ch);
++ }
++ had_char_class = true;
++# endif /* libc || wctype.h */
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT (':');
++ range_start = ':';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '=')
++ {
++ unsigned char str[MB_LEN_MAX + 1];
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[='. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == '=' && *p == ']') || p == pend)
++ break;
++ if (c1 < MB_LEN_MAX)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == '=' && *p == ']' && str[0] != '\0')
++ {
++ /* If we have no collation data we use the default
++ collation in which each character is in a class
++ by itself. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++# ifdef _LIBC
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Set the bit for the character. */
++ SET_LIST_BIT (str[0]);
++ }
++# ifdef _LIBC
++ else
++ {
++ /* Try to match the byte sequence in `str' against
++ those known to the collate implementation.
++ First find out whether the bytes in `str' are
++ actually from exactly one character. */
++ const int32_t *table;
++ const unsigned char *weights;
++ const unsigned char *extra;
++ const int32_t *indirect;
++ int32_t idx;
++ const unsigned char *cp = str;
++ int ch;
++
++ /* This #include defines a local function! */
++# include <locale/weight.h>
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
++ weights = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
++
++ idx = findidx (&cp, c1);
++ if (idx == 0 || cp < str + c1)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Now we have to go throught the whole table
++ and find all characters which have the same
++ first level weight.
++
++ XXX Note that this is not entirely correct.
++ we would have to match multibyte sequences
++ but this is not possible with the current
++ implementation. */
++ for (ch = 1; ch < 256; ++ch)
++ /* XXX This test would have to be changed if we
++ would allow matching multibyte sequences. */
++ if (table[ch] > 0)
++ {
++ int32_t idx2 = table[ch];
++ size_t len = weights[idx2];
++
++ /* Test whether the lenghts match. */
++ if (weights[idx] == len)
++ {
++ /* They do. New compare the bytes of
++ the weight. */
++ size_t cnt = 0;
++
++ while (cnt < len
++ && (weights[idx + 1 + cnt]
++ == weights[idx2 + 1 + cnt]))
++ ++cnt;
++
++ if (cnt == len)
++ /* They match. Mark the character as
++ acceptable. */
++ SET_LIST_BIT (ch);
++ }
++ }
++ }
++# endif
++ had_char_class = true;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT ('=');
++ range_start = '=';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '.')
++ {
++ unsigned char str[128]; /* Should be large enough. */
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[.'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == '.' && *p == ']') || p == pend)
++ break;
++ if (c1 < sizeof (str))
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == '.' && *p == ']' && str[0] != '\0')
++ {
++ /* If we have no collation data we use the default
++ collation in which each character is the name
++ for its own class which contains only the one
++ character. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++# ifdef _LIBC
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Set the bit for the character. */
++ SET_LIST_BIT (str[0]);
++ range_start = ((const unsigned char *) str)[0];
++ }
++# ifdef _LIBC
++ else
++ {
++ /* Try to match the byte sequence in `str' against
++ those known to the collate implementation.
++ First find out whether the bytes in `str' are
++ actually from exactly one character. */
++ int32_t table_size;
++ const int32_t *symb_table;
++ const unsigned char *extra;
++ int32_t idx;
++ int32_t elem;
++ int32_t second;
++ int32_t hash;
++
++ table_size =
++ _NL_CURRENT_WORD (LC_COLLATE,
++ _NL_COLLATE_SYMB_HASH_SIZEMB);
++ symb_table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_TABLEMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_EXTRAMB);
++
++ /* Locate the character in the hashing table. */
++ hash = elem_hash ((const char *) str, c1);
++
++ idx = 0;
++ elem = hash % table_size;
++ second = hash % (table_size - 2);
++ while (symb_table[2 * elem] != 0)
++ {
++ /* First compare the hashing value. */
++ if (symb_table[2 * elem] == hash
++ && c1 == extra[symb_table[2 * elem + 1]]
++ && memcmp (str,
++ &extra[symb_table[2 * elem + 1]
++ + 1],
++ c1) == 0)
++ {
++ /* Yep, this is the entry. */
++ idx = symb_table[2 * elem + 1];
++ idx += 1 + extra[idx];
++ break;
++ }
++
++ /* Next entry. */
++ elem += second;
++ }
++
++ if (symb_table[2 * elem] == 0)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Now add the multibyte character(s) we found
++ to the accept list.
++
++ XXX Note that this is not entirely correct.
++ we would have to match multibyte sequences
++ but this is not possible with the current
++ implementation. Also, we have to match
++ collating symbols, which expand to more than
++ one file, as a whole and not allow the
++ individual bytes. */
++ c1 = extra[idx++];
++ if (c1 == 1)
++ range_start = extra[idx];
++ while (c1-- > 0)
++ {
++ SET_LIST_BIT (extra[idx]);
++ ++idx;
++ }
++ }
++# endif
++ had_char_class = false;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT ('.');
++ range_start = '.';
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ had_char_class = false;
++ SET_LIST_BIT (c);
++ range_start = c;
++ }
++ }
++
++ /* Discard any (non)matching list bytes that are all 0 at the
++ end of the map. Decrease the map-length byte too. */
++ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
++ b[-1]--;
++ b += b[-1];
++#endif /* WCHAR */
++ }
++ break;
++
++
++ case '(':
++ if (syntax & RE_NO_BK_PARENS)
++ goto handle_open;
++ else
++ goto normal_char;
++
++
++ case ')':
++ if (syntax & RE_NO_BK_PARENS)
++ goto handle_close;
++ else
++ goto normal_char;
++
++
++ case '\n':
++ if (syntax & RE_NEWLINE_ALT)
++ goto handle_alt;
++ else
++ goto normal_char;
++
++
++ case '|':
++ if (syntax & RE_NO_BK_VBAR)
++ goto handle_alt;
++ else
++ goto normal_char;
++
++
++ case '{':
++ if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
++ goto handle_interval;
++ else
++ goto normal_char;
++
++
++ case '\\':
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ /* Do not translate the character after the \, so that we can
++ distinguish, e.g., \B from \b, even if we normally would
++ translate, e.g., B to b. */
++ PATFETCH_RAW (c);
++
++ switch (c)
++ {
++ case '(':
++ if (syntax & RE_NO_BK_PARENS)
++ goto normal_backslash;
++
++ handle_open:
++ bufp->re_nsub++;
++ regnum++;
++
++ if (COMPILE_STACK_FULL)
++ {
++ RETALLOC (compile_stack.stack, compile_stack.size << 1,
++ compile_stack_elt_t);
++ if (compile_stack.stack == NULL) return REG_ESPACE;
++
++ compile_stack.size <<= 1;
++ }
++
++ /* These are the values to restore when we hit end of this
++ group. They are all relative offsets, so that if the
++ whole pattern moves because of realloc, they will still
++ be valid. */
++ COMPILE_STACK_TOP.begalt_offset = begalt - COMPILED_BUFFER_VAR;
++ COMPILE_STACK_TOP.fixup_alt_jump
++ = fixup_alt_jump ? fixup_alt_jump - COMPILED_BUFFER_VAR + 1 : 0;
++ COMPILE_STACK_TOP.laststart_offset = b - COMPILED_BUFFER_VAR;
++ COMPILE_STACK_TOP.regnum = regnum;
++
++ /* We will eventually replace the 0 with the number of
++ groups inner to this one. But do not push a
++ start_memory for groups beyond the last one we can
++ represent in the compiled pattern. */
++ if (regnum <= MAX_REGNUM)
++ {
++ COMPILE_STACK_TOP.inner_group_offset = b
++ - COMPILED_BUFFER_VAR + 2;
++ BUF_PUSH_3 (start_memory, regnum, 0);
++ }
++
++ compile_stack.avail++;
++
++ fixup_alt_jump = 0;
++ laststart = 0;
++ begalt = b;
++ /* If we've reached MAX_REGNUM groups, then this open
++ won't actually generate any code, so we'll have to
++ clear pending_exact explicitly. */
++ pending_exact = 0;
++ break;
++
++
++ case ')':
++ if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
++
++ if (COMPILE_STACK_EMPTY)
++ {
++ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
++ goto normal_backslash;
++ else
++ FREE_STACK_RETURN (REG_ERPAREN);
++ }
++
++ handle_close:
++ if (fixup_alt_jump)
++ { /* Push a dummy failure point at the end of the
++ alternative for a possible future
++ `pop_failure_jump' to pop. See comments at
++ `push_dummy_failure' in `re_match_2'. */
++ BUF_PUSH (push_dummy_failure);
++
++ /* We allocated space for this jump when we assigned
++ to `fixup_alt_jump', in the `handle_alt' case below. */
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
++ }
++
++ /* See similar code for backslashed left paren above. */
++ if (COMPILE_STACK_EMPTY)
++ {
++ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
++ goto normal_char;
++ else
++ FREE_STACK_RETURN (REG_ERPAREN);
++ }
++
++ /* Since we just checked for an empty stack above, this
++ ``can't happen''. */
++ assert (compile_stack.avail != 0);
++ {
++ /* We don't just want to restore into `regnum', because
++ later groups should continue to be numbered higher,
++ as in `(ab)c(de)' -- the second group is #2. */
++ regnum_t this_group_regnum;
++
++ compile_stack.avail--;
++ begalt = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.begalt_offset;
++ fixup_alt_jump
++ = COMPILE_STACK_TOP.fixup_alt_jump
++ ? COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.fixup_alt_jump - 1
++ : 0;
++ laststart = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.laststart_offset;
++ this_group_regnum = COMPILE_STACK_TOP.regnum;
++ /* If we've reached MAX_REGNUM groups, then this open
++ won't actually generate any code, so we'll have to
++ clear pending_exact explicitly. */
++ pending_exact = 0;
++
++ /* We're at the end of the group, so now we know how many
++ groups were inside this one. */
++ if (this_group_regnum <= MAX_REGNUM)
++ {
++ UCHAR_T *inner_group_loc
++ = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.inner_group_offset;
++
++ *inner_group_loc = regnum - this_group_regnum;
++ BUF_PUSH_3 (stop_memory, this_group_regnum,
++ regnum - this_group_regnum);
++ }
++ }
++ break;
++
++
++ case '|': /* `\|'. */
++ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
++ goto normal_backslash;
++ handle_alt:
++ if (syntax & RE_LIMITED_OPS)
++ goto normal_char;
++
++ /* Insert before the previous alternative a jump which
++ jumps to this alternative if the former fails. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (on_failure_jump, begalt,
++ b + 2 + 2 * OFFSET_ADDRESS_SIZE);
++ pending_exact = 0;
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ /* The alternative before this one has a jump after it
++ which gets executed if it gets matched. Adjust that
++ jump so it will jump to this alternative's analogous
++ jump (put in below, which in turn will jump to the next
++ (if any) alternative's such jump, etc.). The last such
++ jump jumps to the correct final destination. A picture:
++ _____ _____
++ | | | |
++ | v | v
++ a | b | c
++
++ If we are at `b', then fixup_alt_jump right now points to a
++ three-byte space after `a'. We'll put in the jump, set
++ fixup_alt_jump to right after `b', and leave behind three
++ bytes which we'll fill in when we get to after `c'. */
++
++ if (fixup_alt_jump)
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
++
++ /* Mark and leave space for a jump after this alternative,
++ to be filled in later either by next alternative or
++ when know we're at the end of a series of alternatives. */
++ fixup_alt_jump = b;
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ laststart = 0;
++ begalt = b;
++ break;
++
++
++ case '{':
++ /* If \{ is a literal. */
++ if (!(syntax & RE_INTERVALS)
++ /* If we're at `\{' and it's not the open-interval
++ operator. */
++ || (syntax & RE_NO_BK_BRACES))
++ goto normal_backslash;
++
++ handle_interval:
++ {
++ /* If got here, then the syntax allows intervals. */
++
++ /* At least (most) this many matches must be made. */
++ int lower_bound = -1, upper_bound = -1;
++
++ /* Place in the uncompiled pattern (i.e., just after
++ the '{') to go back to if the interval is invalid. */
++ const CHAR_T *beg_interval = p;
++
++ if (p == pend)
++ goto invalid_interval;
++
++ GET_UNSIGNED_NUMBER (lower_bound);
++
++ if (c == ',')
++ {
++ GET_UNSIGNED_NUMBER (upper_bound);
++ if (upper_bound < 0)
++ upper_bound = RE_DUP_MAX;
++ }
++ else
++ /* Interval such as `{1}' => match exactly once. */
++ upper_bound = lower_bound;
++
++ if (! (0 <= lower_bound && lower_bound <= upper_bound))
++ goto invalid_interval;
++
++ if (!(syntax & RE_NO_BK_BRACES))
++ {
++ if (c != '\\' || p == pend)
++ goto invalid_interval;
++ PATFETCH (c);
++ }
++
++ if (c != '}')
++ goto invalid_interval;
++
++ /* If it's invalid to have no preceding re. */
++ if (!laststart)
++ {
++ if (syntax & RE_CONTEXT_INVALID_OPS
++ && !(syntax & RE_INVALID_INTERVAL_ORD))
++ FREE_STACK_RETURN (REG_BADRPT);
++ else if (syntax & RE_CONTEXT_INDEP_OPS)
++ laststart = b;
++ else
++ goto unfetch_interval;
++ }
++
++ /* We just parsed a valid interval. */
++
++ if (RE_DUP_MAX < upper_bound)
++ FREE_STACK_RETURN (REG_BADBR);
++
++ /* If the upper bound is zero, don't want to succeed at
++ all; jump from `laststart' to `b + 3', which will be
++ the end of the buffer after we insert the jump. */
++ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE'
++ instead of 'b + 3'. */
++ if (upper_bound == 0)
++ {
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (jump, laststart, b + 1
++ + OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++
++ /* Otherwise, we have a nontrivial interval. When
++ we're all done, the pattern will look like:
++ set_number_at <jump count> <upper bound>
++ set_number_at <succeed_n count> <lower bound>
++ succeed_n <after jump addr> <succeed_n count>
++ <body of loop>
++ jump_n <succeed_n addr> <jump count>
++ (The upper bound and `jump_n' are omitted if
++ `upper_bound' is 1, though.) */
++ else
++ { /* If the upper bound is > 1, we need to insert
++ more at the end of the loop. */
++ unsigned nbytes = 2 + 4 * OFFSET_ADDRESS_SIZE +
++ (upper_bound > 1) * (2 + 4 * OFFSET_ADDRESS_SIZE);
++
++ GET_BUFFER_SPACE (nbytes);
++
++ /* Initialize lower bound of the `succeed_n', even
++ though it will be set during matching by its
++ attendant `set_number_at' (inserted next),
++ because `re_compile_fastmap' needs to know.
++ Jump to the `jump_n' we might insert below. */
++ INSERT_JUMP2 (succeed_n, laststart,
++ b + 1 + 2 * OFFSET_ADDRESS_SIZE
++ + (upper_bound > 1) * (1 + 2 * OFFSET_ADDRESS_SIZE)
++ , lower_bound);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ /* Code to initialize the lower bound. Insert
++ before the `succeed_n'. The `5' is the last two
++ bytes of this `set_number_at', plus 3 bytes of
++ the following `succeed_n'. */
++ /* ifdef WCHAR, The '1+2*OFFSET_ADDRESS_SIZE'
++ is the 'set_number_at', plus '1+OFFSET_ADDRESS_SIZE'
++ of the following `succeed_n'. */
++ PREFIX(insert_op2) (set_number_at, laststart, 1
++ + 2 * OFFSET_ADDRESS_SIZE, lower_bound, b);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ if (upper_bound > 1)
++ { /* More than one repetition is allowed, so
++ append a backward jump to the `succeed_n'
++ that starts this interval.
++
++ When we've reached this during matching,
++ we'll have matched the interval once, so
++ jump back only `upper_bound - 1' times. */
++ STORE_JUMP2 (jump_n, b, laststart
++ + 2 * OFFSET_ADDRESS_SIZE + 1,
++ upper_bound - 1);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ /* The location we want to set is the second
++ parameter of the `jump_n'; that is `b-2' as
++ an absolute address. `laststart' will be
++ the `set_number_at' we're about to insert;
++ `laststart+3' the number to set, the source
++ for the relative address. But we are
++ inserting into the middle of the pattern --
++ so everything is getting moved up by 5.
++ Conclusion: (b - 2) - (laststart + 3) + 5,
++ i.e., b - laststart.
++
++ We insert this at the beginning of the loop
++ so that if we fail during matching, we'll
++ reinitialize the bounds. */
++ PREFIX(insert_op2) (set_number_at, laststart,
++ b - laststart,
++ upper_bound - 1, b);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++ }
++ }
++ pending_exact = 0;
++ break;
++
++ invalid_interval:
++ if (!(syntax & RE_INVALID_INTERVAL_ORD))
++ FREE_STACK_RETURN (p == pend ? REG_EBRACE : REG_BADBR);
++ unfetch_interval:
++ /* Match the characters as literals. */
++ p = beg_interval;
++ c = '{';
++ if (syntax & RE_NO_BK_BRACES)
++ goto normal_char;
++ else
++ goto normal_backslash;
++ }
++
++#ifdef emacs
++ /* There is no way to specify the before_dot and after_dot
++ operators. rms says this is ok. --karl */
++ case '=':
++ BUF_PUSH (at_dot);
++ break;
++
++ case 's':
++ laststart = b;
++ PATFETCH (c);
++ BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
++ break;
++
++ case 'S':
++ laststart = b;
++ PATFETCH (c);
++ BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
++ break;
++#endif /* emacs */
++
++
++ case 'w':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ laststart = b;
++ BUF_PUSH (wordchar);
++ break;
++
++
++ case 'W':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ laststart = b;
++ BUF_PUSH (notwordchar);
++ break;
++
++
++ case '<':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordbeg);
++ break;
++
++ case '>':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordend);
++ break;
++
++ case 'b':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordbound);
++ break;
++
++ case 'B':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (notwordbound);
++ break;
++
++ case '`':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (begbuf);
++ break;
++
++ case '\'':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (endbuf);
++ break;
++
++ case '1': case '2': case '3': case '4': case '5':
++ case '6': case '7': case '8': case '9':
++ if (syntax & RE_NO_BK_REFS)
++ goto normal_char;
++
++ c1 = c - '0';
++
++ if (c1 > regnum)
++ FREE_STACK_RETURN (REG_ESUBREG);
++
++ /* Can't back reference to a subexpression if inside of it. */
++ if (group_in_compile_stack (compile_stack, (regnum_t) c1))
++ goto normal_char;
++
++ laststart = b;
++ BUF_PUSH_2 (duplicate, c1);
++ break;
++
++
++ case '+':
++ case '?':
++ if (syntax & RE_BK_PLUS_QM)
++ goto handle_plus;
++ else
++ goto normal_backslash;
++
++ default:
++ normal_backslash:
++ /* You might think it would be useful for \ to mean
++ not to translate; but if we don't translate it
++ it will never match anything. */
++ c = TRANSLATE (c);
++ goto normal_char;
++ }
++ break;
++
++
++ default:
++ /* Expects the character in `c'. */
++ normal_char:
++ /* If no exactn currently being built. */
++ if (!pending_exact
++#ifdef WCHAR
++ /* If last exactn handle binary(or character) and
++ new exactn handle character(or binary). */
++ || is_exactn_bin != is_binary[p - 1 - pattern]
++#endif /* WCHAR */
++
++ /* If last exactn not at current position. */
++ || pending_exact + *pending_exact + 1 != b
++
++ /* We have only one byte following the exactn for the count. */
++ || *pending_exact == (1 << BYTEWIDTH) - 1
++
++ /* If followed by a repetition operator. */
++ || *p == '*' || *p == '^'
++ || ((syntax & RE_BK_PLUS_QM)
++ ? *p == '\\' && (p[1] == '+' || p[1] == '?')
++ : (*p == '+' || *p == '?'))
++ || ((syntax & RE_INTERVALS)
++ && ((syntax & RE_NO_BK_BRACES)
++ ? *p == '{'
++ : (p[0] == '\\' && p[1] == '{'))))
++ {
++ /* Start building a new exactn. */
++
++ laststart = b;
++
++#ifdef WCHAR
++ /* Is this exactn binary data or character? */
++ is_exactn_bin = is_binary[p - 1 - pattern];
++ if (is_exactn_bin)
++ BUF_PUSH_2 (exactn_bin, 0);
++ else
++ BUF_PUSH_2 (exactn, 0);
++#else
++ BUF_PUSH_2 (exactn, 0);
++#endif /* WCHAR */
++ pending_exact = b - 1;
++ }
++
++ BUF_PUSH (c);
++ (*pending_exact)++;
++ break;
++ } /* switch (c) */
++ } /* while p != pend */
++
++
++ /* Through the pattern now. */
++
++ if (fixup_alt_jump)
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
++
++ if (!COMPILE_STACK_EMPTY)
++ FREE_STACK_RETURN (REG_EPAREN);
++
++ /* If we don't want backtracking, force success
++ the first time we reach the end of the compiled pattern. */
++ if (syntax & RE_NO_POSIX_BACKTRACKING)
++ BUF_PUSH (succeed);
++
++#ifdef WCHAR
++ free (pattern);
++ free (mbs_offset);
++ free (is_binary);
++#endif
++ free (compile_stack.stack);
++
++ /* We have succeeded; set the length of the buffer. */
++#ifdef WCHAR
++ bufp->used = (uintptr_t) b - (uintptr_t) COMPILED_BUFFER_VAR;
++#else
++ bufp->used = b - bufp->buffer;
++#endif
++
++#ifdef DEBUG
++ if (debug)
++ {
++ DEBUG_PRINT1 ("\nCompiled pattern: \n");
++ PREFIX(print_compiled_pattern) (bufp);
++ }
++#endif /* DEBUG */
++
++#ifndef MATCH_MAY_ALLOCATE
++ /* Initialize the failure stack to the largest possible stack. This
++ isn't necessary unless we're trying to avoid calling alloca in
++ the search and match routines. */
++ {
++ int num_regs = bufp->re_nsub + 1;
++
++ /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
++ is strictly greater than re_max_failures, the largest possible stack
++ is 2 * re_max_failures failure points. */
++ if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
++ {
++ fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
++
++# ifdef emacs
++ if (! fail_stack.stack)
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) xmalloc (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t)));
++ else
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) xrealloc (fail_stack.stack,
++ (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t))));
++# else /* not emacs */
++ if (! fail_stack.stack)
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) malloc (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t)));
++ else
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) realloc (fail_stack.stack,
++ (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t))));
++# endif /* not emacs */
++ }
++
++ PREFIX(regex_grow_registers) (num_regs);
++ }
++#endif /* not MATCH_MAY_ALLOCATE */
++
++ return REG_NOERROR;
++} /* regex_compile */
++
++/* Subroutines for `regex_compile'. */
++
++/* Store OP at LOC followed by two-byte integer parameter ARG. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg)
++{
++ *loc = (UCHAR_T) op;
++ STORE_NUMBER (loc + 1, arg);
++}
++
++
++/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc, int arg1, int arg2)
++{
++ *loc = (UCHAR_T) op;
++ STORE_NUMBER (loc + 1, arg1);
++ STORE_NUMBER (loc + 1 + OFFSET_ADDRESS_SIZE, arg2);
++}
++
++
++/* Copy the bytes from LOC to END to open up three bytes of space at LOC
++ for OP followed by two-byte integer parameter ARG. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc, int arg, UCHAR_T *end)
++{
++ register UCHAR_T *pfrom = end;
++ register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
++
++ while (pfrom != loc)
++ *--pto = *--pfrom;
++
++ PREFIX(store_op1) (op, loc, arg);
++}
++
++
++/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc, int arg1,
++ int arg2, UCHAR_T *end)
++{
++ register UCHAR_T *pfrom = end;
++ register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ while (pfrom != loc)
++ *--pto = *--pfrom;
++
++ PREFIX(store_op2) (op, loc, arg1, arg2);
++}
++
++
++/* P points to just after a ^ in PATTERN. Return true if that ^ comes
++ after an alternative or a begin-subexpression. We assume there is at
++ least one character before the ^. */
++
++static boolean
++PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
++ reg_syntax_t syntax)
++{
++ const CHAR_T *prev = p - 2;
++ boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
++
++ return
++ /* After a subexpression? */
++ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
++ /* After an alternative? */
++ || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
++}
++
++
++/* The dual of at_begline_loc_p. This one is for $. We assume there is
++ at least one character after the $, i.e., `P < PEND'. */
++
++static boolean
++PREFIX(at_endline_loc_p) (const CHAR_T *p, const CHAR_T *pend,
++ reg_syntax_t syntax)
++{
++ const CHAR_T *next = p;
++ boolean next_backslash = *next == '\\';
++ const CHAR_T *next_next = p + 1 < pend ? p + 1 : 0;
++
++ return
++ /* Before a subexpression? */
++ (syntax & RE_NO_BK_PARENS ? *next == ')'
++ : next_backslash && next_next && *next_next == ')')
++ /* Before an alternative? */
++ || (syntax & RE_NO_BK_VBAR ? *next == '|'
++ : next_backslash && next_next && *next_next == '|');
++}
++
++#else /* not INSIDE_RECURSION */
++
++/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
++ false if it's not. */
++
++static boolean
++group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
++{
++ int this_element;
++
++ for (this_element = compile_stack.avail - 1;
++ this_element >= 0;
++ this_element--)
++ if (compile_stack.stack[this_element].regnum == regnum)
++ return true;
++
++ return false;
++}
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef WCHAR
++/* This insert space, which size is "num", into the pattern at "loc".
++ "end" must point the end of the allocated buffer. */
++static void
++insert_space (int num, CHAR_T *loc, CHAR_T *end)
++{
++ register CHAR_T *pto = end;
++ register CHAR_T *pfrom = end - num;
++
++ while (pfrom >= loc)
++ *pto-- = *pfrom--;
++}
++#endif /* WCHAR */
++
++#ifdef WCHAR
++static reg_errcode_t
++wcs_compile_range (CHAR_T range_start_char, const CHAR_T **p_ptr,
++ const CHAR_T *pend, RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax, CHAR_T *b, CHAR_T *char_set)
++{
++ const CHAR_T *p = *p_ptr;
++ CHAR_T range_start, range_end;
++ reg_errcode_t ret;
++# ifdef _LIBC
++ uint32_t nrules;
++ uint32_t start_val, end_val;
++# endif
++ if (p == pend)
++ return REG_ERANGE;
++
++# ifdef _LIBC
++ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++ if (nrules != 0)
++ {
++ const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE,
++ _NL_COLLATE_COLLSEQWC);
++ const unsigned char *extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
++
++ if (range_start_char < -1)
++ {
++ /* range_start is a collating symbol. */
++ int32_t *wextra;
++ /* Retreive the index and get collation sequence value. */
++ wextra = (int32_t*)(extra + char_set[-range_start_char]);
++ start_val = wextra[1 + *wextra];
++ }
++ else
++ start_val = collseq_table_lookup(collseq, TRANSLATE(range_start_char));
++
++ end_val = collseq_table_lookup (collseq, TRANSLATE (p[0]));
++
++ /* Report an error if the range is empty and the syntax prohibits
++ this. */
++ ret = ((syntax & RE_NO_EMPTY_RANGES)
++ && (start_val > end_val))? REG_ERANGE : REG_NOERROR;
++
++ /* Insert space to the end of the char_ranges. */
++ insert_space(2, b - char_set[5] - 2, b - 1);
++ *(b - char_set[5] - 2) = (wchar_t)start_val;
++ *(b - char_set[5] - 1) = (wchar_t)end_val;
++ char_set[4]++; /* ranges_index */
++ }
++ else
++# endif
++ {
++ range_start = (range_start_char >= 0)? TRANSLATE (range_start_char):
++ range_start_char;
++ range_end = TRANSLATE (p[0]);
++ /* Report an error if the range is empty and the syntax prohibits
++ this. */
++ ret = ((syntax & RE_NO_EMPTY_RANGES)
++ && (range_start > range_end))? REG_ERANGE : REG_NOERROR;
++
++ /* Insert space to the end of the char_ranges. */
++ insert_space(2, b - char_set[5] - 2, b - 1);
++ *(b - char_set[5] - 2) = range_start;
++ *(b - char_set[5] - 1) = range_end;
++ char_set[4]++; /* ranges_index */
++ }
++ /* Have to increment the pointer into the pattern string, so the
++ caller isn't still at the ending character. */
++ (*p_ptr)++;
++
++ return ret;
++}
++#else /* BYTE */
++/* Read the ending character of a range (in a bracket expression) from the
++ uncompiled pattern *P_PTR (which ends at PEND). We assume the
++ starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
++ Then we set the translation of all bits between the starting and
++ ending characters (inclusive) in the compiled pattern B.
++
++ Return an error code.
++
++ We use these short variable names so we can use the same macros as
++ `regex_compile' itself. */
++
++static reg_errcode_t
++byte_compile_range (unsigned int range_start_char, const char **p_ptr,
++ const char *pend, RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax, unsigned char *b)
++{
++ unsigned this_char;
++ const char *p = *p_ptr;
++ reg_errcode_t ret;
++# if _LIBC
++ const unsigned char *collseq;
++ unsigned int start_colseq;
++ unsigned int end_colseq;
++# else
++ unsigned end_char;
++# endif
++
++ if (p == pend)
++ return REG_ERANGE;
++
++ /* Have to increment the pointer into the pattern string, so the
++ caller isn't still at the ending character. */
++ (*p_ptr)++;
++
++ /* Report an error if the range is empty and the syntax prohibits this. */
++ ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
++
++# if _LIBC
++ collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_COLLSEQMB);
++
++ start_colseq = collseq[(unsigned char) TRANSLATE (range_start_char)];
++ end_colseq = collseq[(unsigned char) TRANSLATE (p[0])];
++ for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
++ {
++ unsigned int this_colseq = collseq[(unsigned char) TRANSLATE (this_char)];
++
++ if (start_colseq <= this_colseq && this_colseq <= end_colseq)
++ {
++ SET_LIST_BIT (TRANSLATE (this_char));
++ ret = REG_NOERROR;
++ }
++ }
++# else
++ /* Here we see why `this_char' has to be larger than an `unsigned
++ char' -- we would otherwise go into an infinite loop, since all
++ characters <= 0xff. */
++ range_start_char = TRANSLATE (range_start_char);
++ /* TRANSLATE(p[0]) is casted to char (not unsigned char) in TRANSLATE,
++ and some compilers cast it to int implicitly, so following for_loop
++ may fall to (almost) infinite loop.
++ e.g. If translate[p[0]] = 0xff, end_char may equals to 0xffffffff.
++ To avoid this, we cast p[0] to unsigned int and truncate it. */
++ end_char = ((unsigned)TRANSLATE(p[0]) & ((1 << BYTEWIDTH) - 1));
++
++ for (this_char = range_start_char; this_char <= end_char; ++this_char)
++ {
++ SET_LIST_BIT (TRANSLATE (this_char));
++ ret = REG_NOERROR;
++ }
++# endif
++
++ return ret;
++}
++#endif /* WCHAR */
++
++/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
++ BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
++ characters can start a string that matches the pattern. This fastmap
++ is used by re_search to skip quickly over impossible starting points.
++
++ The caller must supply the address of a (1 << BYTEWIDTH)-byte data
++ area as BUFP->fastmap.
++
++ We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
++ the pattern buffer.
++
++ Returns 0 if we succeed, -2 if an internal error. */
++
++#ifdef WCHAR
++/* local function for re_compile_fastmap.
++ truncate wchar_t character to char. */
++static unsigned char truncate_wchar (CHAR_T c);
++
++static unsigned char
++truncate_wchar (CHAR_T c)
++{
++ unsigned char buf[MB_CUR_MAX];
++ mbstate_t state;
++ int retval;
++ memset (&state, '\0', sizeof (state));
++# ifdef _LIBC
++ retval = __wcrtomb (buf, c, &state);
++# else
++ retval = wcrtomb (buf, c, &state);
++# endif
++ return retval > 0 ? buf[0] : (unsigned char) c;
++}
++#endif /* WCHAR */
++
++static int
++PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp)
++{
++ int j, k;
++#ifdef MATCH_MAY_ALLOCATE
++ PREFIX(fail_stack_type) fail_stack;
++#endif
++#ifndef REGEX_MALLOC
++ char *destination;
++#endif
++
++ register char *fastmap = bufp->fastmap;
++
++#ifdef WCHAR
++ /* We need to cast pattern to (wchar_t*), because we casted this compiled
++ pattern to (char*) in regex_compile. */
++ UCHAR_T *pattern = (UCHAR_T*)bufp->buffer;
++ register UCHAR_T *pend = (UCHAR_T*) (bufp->buffer + bufp->used);
++#else /* BYTE */
++ UCHAR_T *pattern = bufp->buffer;
++ register UCHAR_T *pend = pattern + bufp->used;
++#endif /* WCHAR */
++ UCHAR_T *p = pattern;
++
++#ifdef REL_ALLOC
++ /* This holds the pointer to the failure stack, when
++ it is allocated relocatably. */
++ fail_stack_elt_t *failure_stack_ptr;
++#endif
++
++ /* Assume that each path through the pattern can be null until
++ proven otherwise. We set this false at the bottom of switch
++ statement, to which we get only if a particular path doesn't
++ match the empty string. */
++ boolean path_can_be_null = true;
++
++ /* We aren't doing a `succeed_n' to begin with. */
++ boolean succeed_n_p = false;
++
++ assert (fastmap != NULL && p != NULL);
++
++ INIT_FAIL_STACK ();
++ bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
++ bufp->fastmap_accurate = 1; /* It will be when we're done. */
++ bufp->can_be_null = 0;
++
++ while (1)
++ {
++ if (p == pend || *p == (UCHAR_T) succeed)
++ {
++ /* We have reached the (effective) end of pattern. */
++ if (!FAIL_STACK_EMPTY ())
++ {
++ bufp->can_be_null |= path_can_be_null;
++
++ /* Reset for next path. */
++ path_can_be_null = true;
++
++ p = fail_stack.stack[--fail_stack.avail].pointer;
++
++ continue;
++ }
++ else
++ break;
++ }
++
++ /* We should never be about to go beyond the end of the pattern. */
++ assert (p < pend);
++
++ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
++ {
++
++ /* I guess the idea here is to simply not bother with a fastmap
++ if a backreference is used, since it's too hard to figure out
++ the fastmap for the corresponding group. Setting
++ `can_be_null' stops `re_search_2' from using the fastmap, so
++ that is all we do. */
++ case duplicate:
++ bufp->can_be_null = 1;
++ goto done;
++
++
++ /* Following are the cases which match a character. These end
++ with `break'. */
++
++#ifdef WCHAR
++ case exactn:
++ fastmap[truncate_wchar(p[1])] = 1;
++ break;
++#else /* BYTE */
++ case exactn:
++ fastmap[p[1]] = 1;
++ break;
++#endif /* WCHAR */
++#ifdef MBS_SUPPORT
++ case exactn_bin:
++ fastmap[p[1]] = 1;
++ break;
++#endif
++
++#ifdef WCHAR
++ /* It is hard to distinguish fastmap from (multi byte) characters
++ which depends on current locale. */
++ case charset:
++ case charset_not:
++ case wordchar:
++ case notwordchar:
++ bufp->can_be_null = 1;
++ goto done;
++#else /* BYTE */
++ case charset:
++ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
++ if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
++ fastmap[j] = 1;
++ break;
++
++
++ case charset_not:
++ /* Chars beyond end of map must be allowed. */
++ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
++ fastmap[j] = 1;
++
++ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
++ if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
++ fastmap[j] = 1;
++ break;
++
++
++ case wordchar:
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) == Sword)
++ fastmap[j] = 1;
++ break;
++
++
++ case notwordchar:
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) != Sword)
++ fastmap[j] = 1;
++ break;
++#endif /* WCHAR */
++
++ case anychar:
++ {
++ int fastmap_newline = fastmap['\n'];
++
++ /* `.' matches anything ... */
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ fastmap[j] = 1;
++
++ /* ... except perhaps newline. */
++ if (!(bufp->syntax & RE_DOT_NEWLINE))
++ fastmap['\n'] = fastmap_newline;
++
++ /* Return if we have already set `can_be_null'; if we have,
++ then the fastmap is irrelevant. Something's wrong here. */
++ else if (bufp->can_be_null)
++ goto done;
++
++ /* Otherwise, have to check alternative paths. */
++ break;
++ }
++
++#ifdef emacs
++ case syntaxspec:
++ k = *p++;
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) == (enum syntaxcode) k)
++ fastmap[j] = 1;
++ break;
++
++
++ case notsyntaxspec:
++ k = *p++;
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) != (enum syntaxcode) k)
++ fastmap[j] = 1;
++ break;
++
++
++ /* All cases after this match the empty string. These end with
++ `continue'. */
++
++
++ case before_dot:
++ case at_dot:
++ case after_dot:
++ continue;
++#endif /* emacs */
++
++
++ case no_op:
++ case begline:
++ case endline:
++ case begbuf:
++ case endbuf:
++ case wordbound:
++ case notwordbound:
++ case wordbeg:
++ case wordend:
++ case push_dummy_failure:
++ continue;
++
++
++ case jump_n:
++ case pop_failure_jump:
++ case maybe_pop_jump:
++ case jump:
++ case jump_past_alt:
++ case dummy_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (j, p);
++ p += j;
++ if (j > 0)
++ continue;
++
++ /* Jump backward implies we just went through the body of a
++ loop and matched nothing. Opcode jumped to should be
++ `on_failure_jump' or `succeed_n'. Just treat it like an
++ ordinary jump. For a * loop, it has pushed its failure
++ point already; if so, discard that as redundant. */
++ if ((re_opcode_t) *p != on_failure_jump
++ && (re_opcode_t) *p != succeed_n)
++ continue;
++
++ p++;
++ EXTRACT_NUMBER_AND_INCR (j, p);
++ p += j;
++
++ /* If what's on the stack is where we are now, pop it. */
++ if (!FAIL_STACK_EMPTY ()
++ && fail_stack.stack[fail_stack.avail - 1].pointer == p)
++ fail_stack.avail--;
++
++ continue;
++
++
++ case on_failure_jump:
++ case on_failure_keep_string_jump:
++ handle_on_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (j, p);
++
++ /* For some patterns, e.g., `(a?)?', `p+j' here points to the
++ end of the pattern. We don't want to push such a point,
++ since when we restore it above, entering the switch will
++ increment `p' past the end of the pattern. We don't need
++ to push such a point since we obviously won't find any more
++ fastmap entries beyond `pend'. Such a pattern can match
++ the null string, though. */
++ if (p + j < pend)
++ {
++ if (!PUSH_PATTERN_OP (p + j, fail_stack))
++ {
++ RESET_FAIL_STACK ();
++ return -2;
++ }
++ }
++ else
++ bufp->can_be_null = 1;
++
++ if (succeed_n_p)
++ {
++ EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
++ succeed_n_p = false;
++ }
++
++ continue;
++
++
++ case succeed_n:
++ /* Get to the number of times to succeed. */
++ p += OFFSET_ADDRESS_SIZE;
++
++ /* Increment p past the n for when k != 0. */
++ EXTRACT_NUMBER_AND_INCR (k, p);
++ if (k == 0)
++ {
++ p -= 2 * OFFSET_ADDRESS_SIZE;
++ succeed_n_p = true; /* Spaghetti code alert. */
++ goto handle_on_failure_jump;
++ }
++ continue;
++
++
++ case set_number_at:
++ p += 2 * OFFSET_ADDRESS_SIZE;
++ continue;
++
++
++ case start_memory:
++ case stop_memory:
++ p += 2;
++ continue;
++
++
++ default:
++ abort (); /* We have listed all the cases. */
++ } /* switch *p++ */
++
++ /* Getting here means we have found the possible starting
++ characters for one path of the pattern -- and that the empty
++ string does not match. We need not follow this path further.
++ Instead, look at the next alternative (remembered on the
++ stack), or quit if no more. The test at the top of the loop
++ does these things. */
++ path_can_be_null = false;
++ p = pend;
++ } /* while p */
++
++ /* Set `can_be_null' for the last path (also the first path, if the
++ pattern is empty). */
++ bufp->can_be_null |= path_can_be_null;
++
++ done:
++ RESET_FAIL_STACK ();
++ return 0;
++}
++
++#else /* not INSIDE_RECURSION */
++
++int
++re_compile_fastmap (struct re_pattern_buffer *bufp)
++{
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ return wcs_re_compile_fastmap(bufp);
++ else
++# endif
++ return byte_re_compile_fastmap(bufp);
++} /* re_compile_fastmap */
++#ifdef _LIBC
++weak_alias (__re_compile_fastmap, re_compile_fastmap)
++#endif
++
++
++/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
++ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
++ this memory for recording register information. STARTS and ENDS
++ must be allocated using the malloc library routine, and must each
++ be at least NUM_REGS * sizeof (regoff_t) bytes long.
++
++ If NUM_REGS == 0, then subsequent matches should allocate their own
++ register data.
++
++ Unless this function is called, the first search or match using
++ PATTERN_BUFFER will allocate its own register data, without
++ freeing the old data. */
++
++void
++re_set_registers (struct re_pattern_buffer *bufp,
++ struct re_registers *regs, unsigned num_regs,
++ regoff_t *starts, regoff_t *ends)
++{
++ if (num_regs)
++ {
++ bufp->regs_allocated = REGS_REALLOCATE;
++ regs->num_regs = num_regs;
++ regs->start = starts;
++ regs->end = ends;
++ }
++ else
++ {
++ bufp->regs_allocated = REGS_UNALLOCATED;
++ regs->num_regs = 0;
++ regs->start = regs->end = (regoff_t *) 0;
++ }
++}
++#ifdef _LIBC
++weak_alias (__re_set_registers, re_set_registers)
++#endif
++
++/* Searching routines. */
++
++/* Like re_search_2, below, but only one string is specified, and
++ doesn't let you say where to stop matching. */
++
++int
++re_search (struct re_pattern_buffer *bufp, const char *string, int size,
++ int startpos, int range, struct re_registers *regs)
++{
++ return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
++ regs, size);
++}
++#ifdef _LIBC
++weak_alias (__re_search, re_search)
++#endif
++
++
++/* Using the compiled pattern in BUFP->buffer, first tries to match the
++ virtual concatenation of STRING1 and STRING2, starting first at index
++ STARTPOS, then at STARTPOS + 1, and so on.
++
++ STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
++
++ RANGE is how far to scan while trying to match. RANGE = 0 means try
++ only at STARTPOS; in general, the last start tried is STARTPOS +
++ RANGE.
++
++ In REGS, return the indices of the virtual concatenation of STRING1
++ and STRING2 that matched the entire BUFP->buffer and its contained
++ subexpressions.
++
++ Do not consider matching one past the index STOP in the virtual
++ concatenation of STRING1 and STRING2.
++
++ We return either the position in the strings at which the match was
++ found, -1 if no match, or -2 if error (such as failure
++ stack overflow). */
++
++int
++re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
++ const char *string2, int size2, int startpos, int range,
++ struct re_registers *regs, int stop)
++{
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ return wcs_re_search_2 (bufp, string1, size1, string2, size2, startpos,
++ range, regs, stop);
++ else
++# endif
++ return byte_re_search_2 (bufp, string1, size1, string2, size2, startpos,
++ range, regs, stop);
++} /* re_search_2 */
++#ifdef _LIBC
++weak_alias (__re_search_2, re_search_2)
++#endif
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef MATCH_MAY_ALLOCATE
++# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
++#else
++# define FREE_VAR(var) if (var) free (var); var = NULL
++#endif
++
++#ifdef WCHAR
++# define MAX_ALLOCA_SIZE 2000
++
++# define FREE_WCS_BUFFERS() \
++ do { \
++ if (size1 > MAX_ALLOCA_SIZE) \
++ { \
++ free (wcs_string1); \
++ free (mbs_offset1); \
++ } \
++ else \
++ { \
++ FREE_VAR (wcs_string1); \
++ FREE_VAR (mbs_offset1); \
++ } \
++ if (size2 > MAX_ALLOCA_SIZE) \
++ { \
++ free (wcs_string2); \
++ free (mbs_offset2); \
++ } \
++ else \
++ { \
++ FREE_VAR (wcs_string2); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++
++#endif
++
++
++static int
++PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
++ int size1, const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop)
++{
++ int val;
++ register char *fastmap = bufp->fastmap;
++ register RE_TRANSLATE_TYPE translate = bufp->translate;
++ int total_size = size1 + size2;
++ int endpos = startpos + range;
++#ifdef WCHAR
++ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
++ wchar_t *wcs_string1 = NULL, *wcs_string2 = NULL;
++ /* We need the size of wchar_t buffers correspond to csize1, csize2. */
++ int wcs_size1 = 0, wcs_size2 = 0;
++ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
++ int *mbs_offset1 = NULL, *mbs_offset2 = NULL;
++ /* They hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++#endif /* WCHAR */
++
++ /* Check for out-of-range STARTPOS. */
++ if (startpos < 0 || startpos > total_size)
++ return -1;
++
++ /* Fix up RANGE if it might eventually take us outside
++ the virtual concatenation of STRING1 and STRING2.
++ Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
++ if (endpos < 0)
++ range = 0 - startpos;
++ else if (endpos > total_size)
++ range = total_size - startpos;
++
++ /* If the search isn't to be a backwards one, don't waste time in a
++ search for a pattern that must be anchored. */
++ if (bufp->used > 0 && range > 0
++ && ((re_opcode_t) bufp->buffer[0] == begbuf
++ /* `begline' is like `begbuf' if it cannot match at newlines. */
++ || ((re_opcode_t) bufp->buffer[0] == begline
++ && !bufp->newline_anchor)))
++ {
++ if (startpos > 0)
++ return -1;
++ else
++ range = 1;
++ }
++
++#ifdef emacs
++ /* In a forward search for something that starts with \=.
++ don't keep searching past point. */
++ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
++ {
++ range = PT - startpos;
++ if (range <= 0)
++ return -1;
++ }
++#endif /* emacs */
++
++ /* Update the fastmap now if not correct already. */
++ if (fastmap && !bufp->fastmap_accurate)
++ if (re_compile_fastmap (bufp) == -2)
++ return -2;
++
++#ifdef WCHAR
++ /* Allocate wchar_t array for wcs_string1 and wcs_string2 and
++ fill them with converted string. */
++ if (size1 != 0)
++ {
++ if (size1 > MAX_ALLOCA_SIZE)
++ {
++ wcs_string1 = TALLOC (size1 + 1, CHAR_T);
++ mbs_offset1 = TALLOC (size1 + 1, int);
++ is_binary = TALLOC (size1 + 1, char);
++ }
++ else
++ {
++ wcs_string1 = REGEX_TALLOC (size1 + 1, CHAR_T);
++ mbs_offset1 = REGEX_TALLOC (size1 + 1, int);
++ is_binary = REGEX_TALLOC (size1 + 1, char);
++ }
++ if (!wcs_string1 || !mbs_offset1 || !is_binary)
++ {
++ if (size1 > MAX_ALLOCA_SIZE)
++ {
++ free (wcs_string1);
++ free (mbs_offset1);
++ free (is_binary);
++ }
++ else
++ {
++ FREE_VAR (wcs_string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (is_binary);
++ }
++ return -2;
++ }
++ wcs_size1 = convert_mbs_to_wcs(wcs_string1, string1, size1,
++ mbs_offset1, is_binary);
++ wcs_string1[wcs_size1] = L'\0'; /* for a sentinel */
++ if (size1 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ }
++ if (size2 != 0)
++ {
++ if (size2 > MAX_ALLOCA_SIZE)
++ {
++ wcs_string2 = TALLOC (size2 + 1, CHAR_T);
++ mbs_offset2 = TALLOC (size2 + 1, int);
++ is_binary = TALLOC (size2 + 1, char);
++ }
++ else
++ {
++ wcs_string2 = REGEX_TALLOC (size2 + 1, CHAR_T);
++ mbs_offset2 = REGEX_TALLOC (size2 + 1, int);
++ is_binary = REGEX_TALLOC (size2 + 1, char);
++ }
++ if (!wcs_string2 || !mbs_offset2 || !is_binary)
++ {
++ FREE_WCS_BUFFERS ();
++ if (size2 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ wcs_size2 = convert_mbs_to_wcs(wcs_string2, string2, size2,
++ mbs_offset2, is_binary);
++ wcs_string2[wcs_size2] = L'\0'; /* for a sentinel */
++ if (size2 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ }
++#endif /* WCHAR */
++
++
++ /* Loop through the string, looking for a place to start matching. */
++ for (;;)
++ {
++ /* If a fastmap is supplied, skip quickly over characters that
++ cannot be the start of a match. If the pattern can match the
++ null string, however, we don't need to skip characters; we want
++ the first null string. */
++ if (fastmap && startpos < total_size && !bufp->can_be_null)
++ {
++ if (range > 0) /* Searching forwards. */
++ {
++ register const char *d;
++ register int lim = 0;
++ int irange = range;
++
++ if (startpos < size1 && startpos + range >= size1)
++ lim = range - (size1 - startpos);
++
++ d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
++
++ /* Written out as an if-else to avoid testing `translate'
++ inside the loop. */
++ if (translate)
++ while (range > lim
++ && !fastmap[(unsigned char)
++ translate[(unsigned char) *d++]])
++ range--;
++ else
++ while (range > lim && !fastmap[(unsigned char) *d++])
++ range--;
++
++ startpos += irange - range;
++ }
++ else /* Searching backwards. */
++ {
++ register CHAR_T c = (size1 == 0 || startpos >= size1
++ ? string2[startpos - size1]
++ : string1[startpos]);
++
++ if (!fastmap[(unsigned char) TRANSLATE (c)])
++ goto advance;
++ }
++ }
++
++ /* If can't match the null string, and that's all we have left, fail. */
++ if (range >= 0 && startpos == total_size && fastmap
++ && !bufp->can_be_null)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -1;
++ }
++
++#ifdef WCHAR
++ val = wcs_re_match_2_internal (bufp, string1, size1, string2,
++ size2, startpos, regs, stop,
++ wcs_string1, wcs_size1,
++ wcs_string2, wcs_size2,
++ mbs_offset1, mbs_offset2);
++#else /* BYTE */
++ val = byte_re_match_2_internal (bufp, string1, size1, string2,
++ size2, startpos, regs, stop);
++#endif /* BYTE */
++
++#ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++#endif
++
++ if (val >= 0)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return startpos;
++ }
++
++ if (val == -2)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -2;
++ }
++
++ advance:
++ if (!range)
++ break;
++ else if (range > 0)
++ {
++ range--;
++ startpos++;
++ }
++ else
++ {
++ range++;
++ startpos--;
++ }
++ }
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -1;
++}
++
++#ifdef WCHAR
++/* This converts PTR, a pointer into one of the search wchar_t strings
++ `string1' and `string2' into an multibyte string offset from the
++ beginning of that string. We use mbs_offset to optimize.
++ See convert_mbs_to_wcs. */
++# define POINTER_TO_OFFSET(ptr) \
++ (FIRST_STRING_P (ptr) \
++ ? ((regoff_t)(mbs_offset1 != NULL? mbs_offset1[(ptr)-string1] : 0)) \
++ : ((regoff_t)((mbs_offset2 != NULL? mbs_offset2[(ptr)-string2] : 0) \
++ + csize1)))
++#else /* BYTE */
++/* This converts PTR, a pointer into one of the search strings `string1'
++ and `string2' into an offset from the beginning of that string. */
++# define POINTER_TO_OFFSET(ptr) \
++ (FIRST_STRING_P (ptr) \
++ ? ((regoff_t) ((ptr) - string1)) \
++ : ((regoff_t) ((ptr) - string2 + size1)))
++#endif /* WCHAR */
++
++/* Macros for dealing with the split strings in re_match_2. */
++
++#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
++
++/* Call before fetching a character with *d. This switches over to
++ string2 if necessary. */
++#define PREFETCH() \
++ while (d == dend) \
++ { \
++ /* End of string2 => fail. */ \
++ if (dend == end_match_2) \
++ goto fail; \
++ /* End of string1 => advance to string2. */ \
++ d = string2; \
++ dend = end_match_2; \
++ }
++
++/* Test if at very beginning or at very end of the virtual concatenation
++ of `string1' and `string2'. If only one string, it's `string2'. */
++#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
++#define AT_STRINGS_END(d) ((d) == end2)
++
++
++/* Test if D points to a character which is word-constituent. We have
++ two special cases to check for: if past the end of string1, look at
++ the first character in string2; and if before the beginning of
++ string2, look at the last character in string1. */
++#ifdef WCHAR
++/* Use internationalized API instead of SYNTAX. */
++# define WORDCHAR_P(d) \
++ (iswalnum ((wint_t)((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0 \
++ || ((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) == L'_')
++#else /* BYTE */
++# define WORDCHAR_P(d) \
++ (SYNTAX ((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
++ == Sword)
++#endif /* WCHAR */
++
++/* Disabled due to a compiler bug -- see comment at case wordbound */
++#if 0
++/* Test if the character before D and the one at D differ with respect
++ to being word-constituent. */
++#define AT_WORD_BOUNDARY(d) \
++ (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
++ || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
++#endif
++
++/* Free everything we malloc. */
++#ifdef MATCH_MAY_ALLOCATE
++# ifdef WCHAR
++# define FREE_VARIABLES() \
++ do { \
++ REGEX_FREE_STACK (fail_stack.stack); \
++ FREE_VAR (regstart); \
++ FREE_VAR (regend); \
++ FREE_VAR (old_regstart); \
++ FREE_VAR (old_regend); \
++ FREE_VAR (best_regstart); \
++ FREE_VAR (best_regend); \
++ FREE_VAR (reg_info); \
++ FREE_VAR (reg_dummy); \
++ FREE_VAR (reg_info_dummy); \
++ if (!cant_free_wcs_buf) \
++ { \
++ FREE_VAR (string1); \
++ FREE_VAR (string2); \
++ FREE_VAR (mbs_offset1); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++# else /* BYTE */
++# define FREE_VARIABLES() \
++ do { \
++ REGEX_FREE_STACK (fail_stack.stack); \
++ FREE_VAR (regstart); \
++ FREE_VAR (regend); \
++ FREE_VAR (old_regstart); \
++ FREE_VAR (old_regend); \
++ FREE_VAR (best_regstart); \
++ FREE_VAR (best_regend); \
++ FREE_VAR (reg_info); \
++ FREE_VAR (reg_dummy); \
++ FREE_VAR (reg_info_dummy); \
++ } while (0)
++# endif /* WCHAR */
++#else
++# ifdef WCHAR
++# define FREE_VARIABLES() \
++ do { \
++ if (!cant_free_wcs_buf) \
++ { \
++ FREE_VAR (string1); \
++ FREE_VAR (string2); \
++ FREE_VAR (mbs_offset1); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++# else /* BYTE */
++# define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
++# endif /* WCHAR */
++#endif /* not MATCH_MAY_ALLOCATE */
++
++/* These values must meet several constraints. They must not be valid
++ register values; since we have a limit of 255 registers (because
++ we use only one byte in the pattern for the register number), we can
++ use numbers larger than 255. They must differ by 1, because of
++ NUM_FAILURE_ITEMS above. And the value for the lowest register must
++ be larger than the value for the highest register, so we do not try
++ to actually save any registers when none are active. */
++#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
++#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
++
++#else /* not INSIDE_RECURSION */
++/* Matching routines. */
++
++#ifndef emacs /* Emacs never uses this. */
++/* re_match is like re_match_2 except it takes only a single string. */
++
++int
++re_match (struct re_pattern_buffer *bufp, const char *string,
++ int size, int pos, struct re_registers *regs)
++{
++ int result;
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ result = wcs_re_match_2_internal (bufp, NULL, 0, string, size,
++ pos, regs, size,
++ NULL, 0, NULL, 0, NULL, NULL);
++ else
++# endif
++ result = byte_re_match_2_internal (bufp, NULL, 0, string, size,
++ pos, regs, size);
++# ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++# endif
++ return result;
++}
++# ifdef _LIBC
++weak_alias (__re_match, re_match)
++# endif
++#endif /* not emacs */
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++static boolean PREFIX(group_match_null_string_p) (UCHAR_T **p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static boolean PREFIX(alt_match_null_string_p) (UCHAR_T *p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static boolean PREFIX(common_op_match_null_string_p) (UCHAR_T **p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
++ register int len,
++ RE_TRANSLATE_TYPE translate);
++#else /* not INSIDE_RECURSION */
++
++/* re_match_2 matches the compiled pattern in BUFP against the
++ the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
++ and SIZE2, respectively). We start matching at POS, and stop
++ matching at STOP.
++
++ If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
++ store offsets for the substring each group matched in REGS. See the
++ documentation for exactly how many groups we fill.
++
++ We return -1 if no match, -2 if an internal error (such as the
++ failure stack overflowing). Otherwise, we return the length of the
++ matched substring. */
++
++int
++re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
++ const char *string2, int size2, int pos,
++ struct re_registers *regs, int stop)
++{
++ int result;
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ result = wcs_re_match_2_internal (bufp, string1, size1, string2, size2,
++ pos, regs, stop,
++ NULL, 0, NULL, 0, NULL, NULL);
++ else
++# endif
++ result = byte_re_match_2_internal (bufp, string1, size1, string2, size2,
++ pos, regs, stop);
++
++#ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++#endif
++ return result;
++}
++#ifdef _LIBC
++weak_alias (__re_match_2, re_match_2)
++#endif
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef WCHAR
++static int count_mbs_length (int *, int);
++
++/* This check the substring (from 0, to length) of the multibyte string,
++ to which offset_buffer correspond. And count how many wchar_t_characters
++ the substring occupy. We use offset_buffer to optimization.
++ See convert_mbs_to_wcs. */
++
++static int
++count_mbs_length(int *offset_buffer, int length)
++{
++ int upper, lower;
++
++ /* Check whether the size is valid. */
++ if (length < 0)
++ return -1;
++
++ if (offset_buffer == NULL)
++ return 0;
++
++ /* If there are no multibyte character, offset_buffer[i] == i.
++ Optmize for this case. */
++ if (offset_buffer[length] == length)
++ return length;
++
++ /* Set up upper with length. (because for all i, offset_buffer[i] >= i) */
++ upper = length;
++ lower = 0;
++
++ while (true)
++ {
++ int middle = (lower + upper) / 2;
++ if (middle == lower || middle == upper)
++ break;
++ if (offset_buffer[middle] > length)
++ upper = middle;
++ else if (offset_buffer[middle] < length)
++ lower = middle;
++ else
++ return middle;
++ }
++
++ return -1;
++}
++#endif /* WCHAR */
++
++/* This is a separate function so that we can force an alloca cleanup
++ afterwards. */
++#ifdef WCHAR
++static int
++wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *cstring1, int csize1,
++ const char *cstring2, int csize2,
++ int pos,
++ struct re_registers *regs,
++ int stop,
++ /* string1 == string2 == NULL means string1/2, size1/2 and
++ mbs_offset1/2 need seting up in this function. */
++ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
++ wchar_t *string1, int size1,
++ wchar_t *string2, int size2,
++ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
++ int *mbs_offset1, int *mbs_offset2)
++#else /* BYTE */
++static int
++byte_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int pos,
++ struct re_registers *regs, int stop)
++#endif /* BYTE */
++{
++ /* General temporaries. */
++ int mcnt;
++ UCHAR_T *p1;
++#ifdef WCHAR
++ /* They hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++ /* If true, we can't free string1/2, mbs_offset1/2. */
++ int cant_free_wcs_buf = 1;
++#endif /* WCHAR */
++
++ /* Just past the end of the corresponding string. */
++ const CHAR_T *end1, *end2;
++
++ /* Pointers into string1 and string2, just past the last characters in
++ each to consider matching. */
++ const CHAR_T *end_match_1, *end_match_2;
++
++ /* Where we are in the data, and the end of the current string. */
++ const CHAR_T *d, *dend;
++
++ /* Where we are in the pattern, and the end of the pattern. */
++#ifdef WCHAR
++ UCHAR_T *pattern, *p;
++ register UCHAR_T *pend;
++#else /* BYTE */
++ UCHAR_T *p = bufp->buffer;
++ register UCHAR_T *pend = p + bufp->used;
++#endif /* WCHAR */
++
++ /* Mark the opcode just after a start_memory, so we can test for an
++ empty subpattern when we get to the stop_memory. */
++ UCHAR_T *just_past_start_mem = 0;
++
++ /* We use this to map every character in the string. */
++ RE_TRANSLATE_TYPE translate = bufp->translate;
++
++ /* Failure point stack. Each place that can handle a failure further
++ down the line pushes a failure point on this stack. It consists of
++ restart, regend, and reg_info for all registers corresponding to
++ the subexpressions we're currently inside, plus the number of such
++ registers, and, finally, two char *'s. The first char * is where
++ to resume scanning the pattern; the second one is where to resume
++ scanning the strings. If the latter is zero, the failure point is
++ a ``dummy''; if a failure happens and the failure point is a dummy,
++ it gets discarded and the next next one is tried. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
++ PREFIX(fail_stack_type) fail_stack;
++#endif
++#ifdef DEBUG
++ static unsigned failure_id;
++ unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
++#endif
++
++#ifdef REL_ALLOC
++ /* This holds the pointer to the failure stack, when
++ it is allocated relocatably. */
++ fail_stack_elt_t *failure_stack_ptr;
++#endif
++
++ /* We fill all the registers internally, independent of what we
++ return, for use in backreferences. The number here includes
++ an element for register zero. */
++ size_t num_regs = bufp->re_nsub + 1;
++
++ /* The currently active registers. */
++ active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++
++ /* Information on the contents of registers. These are pointers into
++ the input strings; they record just what was matched (on this
++ attempt) by a subexpression part of the pattern, that is, the
++ regnum-th regstart pointer points to where in the pattern we began
++ matching and the regnum-th regend points to right after where we
++ stopped matching the regnum-th subexpression. (The zeroth register
++ keeps track of what the whole pattern matches.) */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **regstart, **regend;
++#endif
++
++ /* If a group that's operated upon by a repetition operator fails to
++ match anything, then the register for its start will need to be
++ restored because it will have been set to wherever in the string we
++ are when we last see its open-group operator. Similarly for a
++ register's end. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **old_regstart, **old_regend;
++#endif
++
++ /* The is_active field of reg_info helps us keep track of which (possibly
++ nested) subexpressions we are currently in. The matched_something
++ field of reg_info[reg_num] helps us tell whether or not we have
++ matched any of the pattern so far this time through the reg_num-th
++ subexpression. These two fields get reset each time through any
++ loop their register is in. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
++ PREFIX(register_info_type) *reg_info;
++#endif
++
++ /* The following record the register info as found in the above
++ variables when we find a match better than any we've seen before.
++ This happens as we backtrack through the failure points, which in
++ turn happens only if we have not yet matched the entire string. */
++ unsigned best_regs_set = false;
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **best_regstart, **best_regend;
++#endif
++
++ /* Logically, this is `best_regend[0]'. But we don't want to have to
++ allocate space for that if we're not allocating space for anything
++ else (see below). Also, we never need info about register 0 for
++ any of the other register vectors, and it seems rather a kludge to
++ treat `best_regend' differently than the rest. So we keep track of
++ the end of the best match so far in a separate variable. We
++ initialize this to NULL so that when we backtrack the first time
++ and need to test it, it's not garbage. */
++ const CHAR_T *match_end = NULL;
++
++ /* This helps SET_REGS_MATCHED avoid doing redundant work. */
++ int set_regs_matched_done = 0;
++
++ /* Used when we pop values we don't care about. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **reg_dummy;
++ PREFIX(register_info_type) *reg_info_dummy;
++#endif
++
++#ifdef DEBUG
++ /* Counts the total number of registers pushed. */
++ unsigned num_regs_pushed = 0;
++#endif
++
++ DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
++
++ INIT_FAIL_STACK ();
++
++#ifdef MATCH_MAY_ALLOCATE
++ /* Do not bother to initialize all the register variables if there are
++ no groups in the pattern, as it takes a fair amount of time. If
++ there are groups, we include space for register 0 (the whole
++ pattern), even though we never use it, since it simplifies the
++ array indexing. We should fix this. */
++ if (bufp->re_nsub)
++ {
++ regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ old_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ old_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ best_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ best_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ reg_info = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
++ reg_dummy = REGEX_TALLOC (num_regs, const CHAR_T *);
++ reg_info_dummy = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
++
++ if (!(regstart && regend && old_regstart && old_regend && reg_info
++ && best_regstart && best_regend && reg_dummy && reg_info_dummy))
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ }
++ else
++ {
++ /* We must initialize all our variables to NULL, so that
++ `FREE_VARIABLES' doesn't try to free them. */
++ regstart = regend = old_regstart = old_regend = best_regstart
++ = best_regend = reg_dummy = NULL;
++ reg_info = reg_info_dummy = (PREFIX(register_info_type) *) NULL;
++ }
++#endif /* MATCH_MAY_ALLOCATE */
++
++ /* The starting position is bogus. */
++#ifdef WCHAR
++ if (pos < 0 || pos > csize1 + csize2)
++#else /* BYTE */
++ if (pos < 0 || pos > size1 + size2)
++#endif
++ {
++ FREE_VARIABLES ();
++ return -1;
++ }
++
++#ifdef WCHAR
++ /* Allocate wchar_t array for string1 and string2 and
++ fill them with converted string. */
++ if (string1 == NULL && string2 == NULL)
++ {
++ /* We need seting up buffers here. */
++
++ /* We must free wcs buffers in this function. */
++ cant_free_wcs_buf = 0;
++
++ if (csize1 != 0)
++ {
++ string1 = REGEX_TALLOC (csize1 + 1, CHAR_T);
++ mbs_offset1 = REGEX_TALLOC (csize1 + 1, int);
++ is_binary = REGEX_TALLOC (csize1 + 1, char);
++ if (!string1 || !mbs_offset1 || !is_binary)
++ {
++ FREE_VAR (string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ }
++ if (csize2 != 0)
++ {
++ string2 = REGEX_TALLOC (csize2 + 1, CHAR_T);
++ mbs_offset2 = REGEX_TALLOC (csize2 + 1, int);
++ is_binary = REGEX_TALLOC (csize2 + 1, char);
++ if (!string2 || !mbs_offset2 || !is_binary)
++ {
++ FREE_VAR (string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (string2);
++ FREE_VAR (mbs_offset2);
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ size2 = convert_mbs_to_wcs(string2, cstring2, csize2,
++ mbs_offset2, is_binary);
++ string2[size2] = L'\0'; /* for a sentinel */
++ FREE_VAR (is_binary);
++ }
++ }
++
++ /* We need to cast pattern to (wchar_t*), because we casted this compiled
++ pattern to (char*) in regex_compile. */
++ p = pattern = (CHAR_T*)bufp->buffer;
++ pend = (CHAR_T*)(bufp->buffer + bufp->used);
++
++#endif /* WCHAR */
++
++ /* Initialize subexpression text positions to -1 to mark ones that no
++ start_memory/stop_memory has been seen for. Also initialize the
++ register information struct. */
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ regstart[mcnt] = regend[mcnt]
++ = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
++
++ REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
++ IS_ACTIVE (reg_info[mcnt]) = 0;
++ MATCHED_SOMETHING (reg_info[mcnt]) = 0;
++ EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
++ }
++
++ /* We move `string1' into `string2' if the latter's empty -- but not if
++ `string1' is null. */
++ if (size2 == 0 && string1 != NULL)
++ {
++ string2 = string1;
++ size2 = size1;
++ string1 = 0;
++ size1 = 0;
++#ifdef WCHAR
++ mbs_offset2 = mbs_offset1;
++ csize2 = csize1;
++ mbs_offset1 = NULL;
++ csize1 = 0;
++#endif
++ }
++ end1 = string1 + size1;
++ end2 = string2 + size2;
++
++ /* Compute where to stop matching, within the two strings. */
++#ifdef WCHAR
++ if (stop <= csize1)
++ {
++ mcnt = count_mbs_length(mbs_offset1, stop);
++ end_match_1 = string1 + mcnt;
++ end_match_2 = string2;
++ }
++ else
++ {
++ if (stop > csize1 + csize2)
++ stop = csize1 + csize2;
++ end_match_1 = end1;
++ mcnt = count_mbs_length(mbs_offset2, stop-csize1);
++ end_match_2 = string2 + mcnt;
++ }
++ if (mcnt < 0)
++ { /* count_mbs_length return error. */
++ FREE_VARIABLES ();
++ return -1;
++ }
++#else
++ if (stop <= size1)
++ {
++ end_match_1 = string1 + stop;
++ end_match_2 = string2;
++ }
++ else
++ {
++ end_match_1 = end1;
++ end_match_2 = string2 + stop - size1;
++ }
++#endif /* WCHAR */
++
++ /* `p' scans through the pattern as `d' scans through the data.
++ `dend' is the end of the input string that `d' points within. `d'
++ is advanced into the following input string whenever necessary, but
++ this happens before fetching; therefore, at the beginning of the
++ loop, `d' can be pointing at the end of a string, but it cannot
++ equal `string2'. */
++#ifdef WCHAR
++ if (size1 > 0 && pos <= csize1)
++ {
++ mcnt = count_mbs_length(mbs_offset1, pos);
++ d = string1 + mcnt;
++ dend = end_match_1;
++ }
++ else
++ {
++ mcnt = count_mbs_length(mbs_offset2, pos-csize1);
++ d = string2 + mcnt;
++ dend = end_match_2;
++ }
++
++ if (mcnt < 0)
++ { /* count_mbs_length return error. */
++ FREE_VARIABLES ();
++ return -1;
++ }
++#else
++ if (size1 > 0 && pos <= size1)
++ {
++ d = string1 + pos;
++ dend = end_match_1;
++ }
++ else
++ {
++ d = string2 + pos - size1;
++ dend = end_match_2;
++ }
++#endif /* WCHAR */
++
++ DEBUG_PRINT1 ("The compiled pattern is:\n");
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
++ DEBUG_PRINT1 ("The string to match is: `");
++ DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
++ DEBUG_PRINT1 ("'\n");
++
++ /* This loops over pattern commands. It exits by returning from the
++ function if the match is complete, or it drops through if the match
++ fails at this starting point in the input data. */
++ for (;;)
++ {
++#ifdef _LIBC
++ DEBUG_PRINT2 ("\n%p: ", p);
++#else
++ DEBUG_PRINT2 ("\n0x%x: ", p);
++#endif
++
++ if (p == pend)
++ { /* End of pattern means we might have succeeded. */
++ DEBUG_PRINT1 ("end of pattern ... ");
++
++ /* If we haven't matched the entire string, and we want the
++ longest match, try backtracking. */
++ if (d != end_match_2)
++ {
++ /* 1 if this match ends in the same string (string1 or string2)
++ as the best previous match. */
++ boolean same_str_p = (FIRST_STRING_P (match_end)
++ == MATCHING_IN_FIRST_STRING);
++ /* 1 if this match is the best seen so far. */
++ boolean best_match_p;
++
++ /* AIX compiler got confused when this was combined
++ with the previous declaration. */
++ if (same_str_p)
++ best_match_p = d > match_end;
++ else
++ best_match_p = !MATCHING_IN_FIRST_STRING;
++
++ DEBUG_PRINT1 ("backtracking.\n");
++
++ if (!FAIL_STACK_EMPTY ())
++ { /* More failure points to try. */
++
++ /* If exceeds best match so far, save it. */
++ if (!best_regs_set || best_match_p)
++ {
++ best_regs_set = true;
++ match_end = d;
++
++ DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
++
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ best_regstart[mcnt] = regstart[mcnt];
++ best_regend[mcnt] = regend[mcnt];
++ }
++ }
++ goto fail;
++ }
++
++ /* If no failure points, don't restore garbage. And if
++ last match is real best match, don't restore second
++ best one. */
++ else if (best_regs_set && !best_match_p)
++ {
++ restore_best_regs:
++ /* Restore best match. It may happen that `dend ==
++ end_match_1' while the restored d is in string2.
++ For example, the pattern `x.*y.*z' against the
++ strings `x-' and `y-z-', if the two strings are
++ not consecutive in memory. */
++ DEBUG_PRINT1 ("Restoring best registers.\n");
++
++ d = match_end;
++ dend = ((d >= string1 && d <= end1)
++ ? end_match_1 : end_match_2);
++
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ regstart[mcnt] = best_regstart[mcnt];
++ regend[mcnt] = best_regend[mcnt];
++ }
++ }
++ } /* d != end_match_2 */
++
++ succeed_label:
++ DEBUG_PRINT1 ("Accepting match.\n");
++ /* If caller wants register contents data back, do it. */
++ if (regs && !bufp->no_sub)
++ {
++ /* Have the register data arrays been allocated? */
++ if (bufp->regs_allocated == REGS_UNALLOCATED)
++ { /* No. So allocate them with malloc. We need one
++ extra element beyond `num_regs' for the `-1' marker
++ GNU code uses. */
++ regs->num_regs = MAX (RE_NREGS, num_regs + 1);
++ regs->start = TALLOC (regs->num_regs, regoff_t);
++ regs->end = TALLOC (regs->num_regs, regoff_t);
++ if (regs->start == NULL || regs->end == NULL)
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ bufp->regs_allocated = REGS_REALLOCATE;
++ }
++ else if (bufp->regs_allocated == REGS_REALLOCATE)
++ { /* Yes. If we need more elements than were already
++ allocated, reallocate them. If we need fewer, just
++ leave it alone. */
++ if (regs->num_regs < num_regs + 1)
++ {
++ regs->num_regs = num_regs + 1;
++ RETALLOC (regs->start, regs->num_regs, regoff_t);
++ RETALLOC (regs->end, regs->num_regs, regoff_t);
++ if (regs->start == NULL || regs->end == NULL)
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ }
++ }
++ else
++ {
++ /* These braces fend off a "empty body in an else-statement"
++ warning under GCC when assert expands to nothing. */
++ assert (bufp->regs_allocated == REGS_FIXED);
++ }
++
++ /* Convert the pointer data in `regstart' and `regend' to
++ indices. Register zero has to be set differently,
++ since we haven't kept track of any info for it. */
++ if (regs->num_regs > 0)
++ {
++ regs->start[0] = pos;
++#ifdef WCHAR
++ if (MATCHING_IN_FIRST_STRING)
++ regs->end[0] = mbs_offset1 != NULL ?
++ mbs_offset1[d-string1] : 0;
++ else
++ regs->end[0] = csize1 + (mbs_offset2 != NULL ?
++ mbs_offset2[d-string2] : 0);
++#else
++ regs->end[0] = (MATCHING_IN_FIRST_STRING
++ ? ((regoff_t) (d - string1))
++ : ((regoff_t) (d - string2 + size1)));
++#endif /* WCHAR */
++ }
++
++ /* Go through the first `min (num_regs, regs->num_regs)'
++ registers, since that is all we initialized. */
++ for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
++ mcnt++)
++ {
++ if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
++ regs->start[mcnt] = regs->end[mcnt] = -1;
++ else
++ {
++ regs->start[mcnt]
++ = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
++ regs->end[mcnt]
++ = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
++ }
++ }
++
++ /* If the regs structure we return has more elements than
++ were in the pattern, set the extra elements to -1. If
++ we (re)allocated the registers, this is the case,
++ because we always allocate enough to have at least one
++ -1 at the end. */
++ for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
++ regs->start[mcnt] = regs->end[mcnt] = -1;
++ } /* regs && !bufp->no_sub */
++
++ DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
++ nfailure_points_pushed, nfailure_points_popped,
++ nfailure_points_pushed - nfailure_points_popped);
++ DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
++
++#ifdef WCHAR
++ if (MATCHING_IN_FIRST_STRING)
++ mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
++ else
++ mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
++ csize1;
++ mcnt -= pos;
++#else
++ mcnt = d - pos - (MATCHING_IN_FIRST_STRING
++ ? string1
++ : string2 - size1);
++#endif /* WCHAR */
++
++ DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
++
++ FREE_VARIABLES ();
++ return mcnt;
++ }
++
++ /* Otherwise match next pattern command. */
++ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
++ {
++ /* Ignore these. Used to ignore the n of succeed_n's which
++ currently have n == 0. */
++ case no_op:
++ DEBUG_PRINT1 ("EXECUTING no_op.\n");
++ break;
++
++ case succeed:
++ DEBUG_PRINT1 ("EXECUTING succeed.\n");
++ goto succeed_label;
++
++ /* Match the next n pattern characters exactly. The following
++ byte in the pattern defines n, and the n bytes after that
++ are the characters to match. */
++ case exactn:
++#ifdef MBS_SUPPORT
++ case exactn_bin:
++#endif
++ mcnt = *p++;
++ DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
++
++ /* This is written out as an if-else so we don't waste time
++ testing `translate' inside the loop. */
++ if (translate)
++ {
++ do
++ {
++ PREFETCH ();
++#ifdef WCHAR
++ if (*d <= 0xff)
++ {
++ if ((UCHAR_T) translate[(unsigned char) *d++]
++ != (UCHAR_T) *p++)
++ goto fail;
++ }
++ else
++ {
++ if (*d++ != (CHAR_T) *p++)
++ goto fail;
++ }
++#else
++ if ((UCHAR_T) translate[(unsigned char) *d++]
++ != (UCHAR_T) *p++)
++ goto fail;
++#endif /* WCHAR */
++ }
++ while (--mcnt);
++ }
++ else
++ {
++ do
++ {
++ PREFETCH ();
++ if (*d++ != (CHAR_T) *p++) goto fail;
++ }
++ while (--mcnt);
++ }
++ SET_REGS_MATCHED ();
++ break;
++
++
++ /* Match any character except possibly a newline or a null. */
++ case anychar:
++ DEBUG_PRINT1 ("EXECUTING anychar.\n");
++
++ PREFETCH ();
++
++ if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
++ || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
++ goto fail;
++
++ SET_REGS_MATCHED ();
++ DEBUG_PRINT2 (" Matched `%ld'.\n", (long int) *d);
++ d++;
++ break;
++
++
++ case charset:
++ case charset_not:
++ {
++ register UCHAR_T c;
++#ifdef WCHAR
++ unsigned int i, char_class_length, coll_symbol_length,
++ equiv_class_length, ranges_length, chars_length, length;
++ CHAR_T *workp, *workp2, *charset_top;
++#define WORK_BUFFER_SIZE 128
++ CHAR_T str_buf[WORK_BUFFER_SIZE];
++# ifdef _LIBC
++ uint32_t nrules;
++# endif /* _LIBC */
++#endif /* WCHAR */
++ boolean negate = (re_opcode_t) *(p - 1) == charset_not;
++
++ DEBUG_PRINT2 ("EXECUTING charset%s.\n", negate ? "_not" : "");
++ PREFETCH ();
++ c = TRANSLATE (*d); /* The character to match. */
++#ifdef WCHAR
++# ifdef _LIBC
++ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif /* _LIBC */
++ charset_top = p - 1;
++ char_class_length = *p++;
++ coll_symbol_length = *p++;
++ equiv_class_length = *p++;
++ ranges_length = *p++;
++ chars_length = *p++;
++ /* p points charset[6], so the address of the next instruction
++ (charset[l+m+n+2o+k+p']) equals p[l+m+n+2*o+p'],
++ where l=length of char_classes, m=length of collating_symbol,
++ n=equivalence_class, o=length of char_range,
++ p'=length of character. */
++ workp = p;
++ /* Update p to indicate the next instruction. */
++ p += char_class_length + coll_symbol_length+ equiv_class_length +
++ 2*ranges_length + chars_length;
++
++ /* match with char_class? */
++ for (i = 0; i < char_class_length ; i += CHAR_CLASS_SIZE)
++ {
++ wctype_t wctype;
++ uintptr_t alignedp = ((uintptr_t)workp
++ + __alignof__(wctype_t) - 1)
++ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
++ wctype = *((wctype_t*)alignedp);
++ workp += CHAR_CLASS_SIZE;
++# ifdef _LIBC
++ if (__iswctype((wint_t)c, wctype))
++ goto char_set_matched;
++# else
++ if (iswctype((wint_t)c, wctype))
++ goto char_set_matched;
++# endif
++ }
++
++ /* match with collating_symbol? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ const unsigned char *extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
++
++ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;
++ workp++)
++ {
++ int32_t *wextra;
++ wextra = (int32_t*)(extra + *workp++);
++ for (i = 0; i < *wextra; ++i)
++ if (TRANSLATE(d[i]) != wextra[1 + i])
++ break;
++
++ if (i == *wextra)
++ {
++ /* Update d, however d will be incremented at
++ char_set_matched:, we decrement d here. */
++ d += i - 1;
++ goto char_set_matched;
++ }
++ }
++ }
++ else /* (nrules == 0) */
++# endif
++ /* If we can't look up collation data, we use wcscoll
++ instead. */
++ {
++ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++# ifdef _LIBC
++ length = __wcslen (workp);
++# else
++ length = wcslen (workp);
++# endif
++
++ /* If wcscoll(the collating symbol, whole string) > 0,
++ any substring of the string never match with the
++ collating symbol. */
++# ifdef _LIBC
++ if (__wcscoll (workp, d) > 0)
++# else
++ if (wcscoll (workp, d) > 0)
++# endif
++ {
++ workp += length + 1;
++ continue;
++ }
++
++ /* First, we compare the collating symbol with
++ the first character of the string.
++ If it don't match, we add the next character to
++ the compare buffer in turn. */
++ for (i = 0 ; i < WORK_BUFFER_SIZE-1 ; i++, d++)
++ {
++ int match;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++
++ /* add next character to the compare buffer. */
++ str_buf[i] = TRANSLATE(*d);
++ str_buf[i+1] = '\0';
++
++# ifdef _LIBC
++ match = __wcscoll (workp, str_buf);
++# else
++ match = wcscoll (workp, str_buf);
++# endif
++ if (match == 0)
++ goto char_set_matched;
++
++ if (match < 0)
++ /* (str_buf > workp) indicate (str_buf + X > workp),
++ because for all X (str_buf + X > str_buf).
++ So we don't need continue this loop. */
++ break;
++
++ /* Otherwise(str_buf < workp),
++ (str_buf+next_character) may equals (workp).
++ So we continue this loop. */
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ workp += length + 1;
++ }
++ }
++ /* match with equivalence_class? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++ /* Try to match the equivalence class against
++ those known to the collate implementation. */
++ const int32_t *table;
++ const int32_t *weights;
++ const int32_t *extra;
++ const int32_t *indirect;
++ int32_t idx, idx2;
++ wint_t *cp;
++ size_t len;
++
++ /* This #include defines a local function! */
++# include <locale/weightwc.h>
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
++ weights = (const wint_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
++ extra = (const wint_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
++
++ /* Write 1 collating element to str_buf, and
++ get its index. */
++ idx2 = 0;
++
++ for (i = 0 ; idx2 == 0 && i < WORK_BUFFER_SIZE - 1; i++)
++ {
++ cp = (wint_t*)str_buf;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++ str_buf[i] = TRANSLATE(*(d+i));
++ str_buf[i+1] = '\0'; /* sentinel */
++ idx2 = findidx ((const wint_t**)&cp, i);
++ }
++
++ /* Update d, however d will be incremented at
++ char_set_matched:, we decrement d here. */
++ d = backup_d + ((wchar_t*)cp - (wchar_t*)str_buf - 1);
++ if (d >= dend)
++ {
++ if (dend == end_match_2)
++ d = dend;
++ else
++ {
++ d = string2;
++ dend = end_match_2;
++ }
++ }
++
++ len = weights[idx2];
++
++ for (workp2 = workp + equiv_class_length ; workp < workp2 ;
++ workp++)
++ {
++ idx = (int32_t)*workp;
++ /* We already checked idx != 0 in regex_compile. */
++
++ if (idx2 != 0 && len == weights[idx])
++ {
++ int cnt = 0;
++ while (cnt < len && (weights[idx + 1 + cnt]
++ == weights[idx2 + 1 + cnt]))
++ ++cnt;
++
++ if (cnt == len)
++ goto char_set_matched;
++ }
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ }
++ else /* (nrules == 0) */
++# endif
++ /* If we can't look up collation data, we use wcscoll
++ instead. */
++ {
++ for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++# ifdef _LIBC
++ length = __wcslen (workp);
++# else
++ length = wcslen (workp);
++# endif
++
++ /* If wcscoll(the collating symbol, whole string) > 0,
++ any substring of the string never match with the
++ collating symbol. */
++# ifdef _LIBC
++ if (__wcscoll (workp, d) > 0)
++# else
++ if (wcscoll (workp, d) > 0)
++# endif
++ {
++ workp += length + 1;
++ break;
++ }
++
++ /* First, we compare the equivalence class with
++ the first character of the string.
++ If it don't match, we add the next character to
++ the compare buffer in turn. */
++ for (i = 0 ; i < WORK_BUFFER_SIZE - 1 ; i++, d++)
++ {
++ int match;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++
++ /* add next character to the compare buffer. */
++ str_buf[i] = TRANSLATE(*d);
++ str_buf[i+1] = '\0';
++
++# ifdef _LIBC
++ match = __wcscoll (workp, str_buf);
++# else
++ match = wcscoll (workp, str_buf);
++# endif
++
++ if (match == 0)
++ goto char_set_matched;
++
++ if (match < 0)
++ /* (str_buf > workp) indicate (str_buf + X > workp),
++ because for all X (str_buf + X > str_buf).
++ So we don't need continue this loop. */
++ break;
++
++ /* Otherwise(str_buf < workp),
++ (str_buf+next_character) may equals (workp).
++ So we continue this loop. */
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ workp += length + 1;
++ }
++ }
++
++ /* match with char_range? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ uint32_t collseqval;
++ const char *collseq = (const char *)
++ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
++
++ collseqval = collseq_table_lookup (collseq, c);
++
++ for (; workp < p - chars_length ;)
++ {
++ uint32_t start_val, end_val;
++
++ /* We already compute the collation sequence value
++ of the characters (or collating symbols). */
++ start_val = (uint32_t) *workp++; /* range_start */
++ end_val = (uint32_t) *workp++; /* range_end */
++
++ if (start_val <= collseqval && collseqval <= end_val)
++ goto char_set_matched;
++ }
++ }
++ else
++# endif
++ {
++ /* We set range_start_char at str_buf[0], range_end_char
++ at str_buf[4], and compared char at str_buf[2]. */
++ str_buf[1] = 0;
++ str_buf[2] = c;
++ str_buf[3] = 0;
++ str_buf[5] = 0;
++ for (; workp < p - chars_length ;)
++ {
++ wchar_t *range_start_char, *range_end_char;
++
++ /* match if (range_start_char <= c <= range_end_char). */
++
++ /* If range_start(or end) < 0, we assume -range_start(end)
++ is the offset of the collating symbol which is specified
++ as the character of the range start(end). */
++
++ /* range_start */
++ if (*workp < 0)
++ range_start_char = charset_top - (*workp++);
++ else
++ {
++ str_buf[0] = *workp++;
++ range_start_char = str_buf;
++ }
++
++ /* range_end */
++ if (*workp < 0)
++ range_end_char = charset_top - (*workp++);
++ else
++ {
++ str_buf[4] = *workp++;
++ range_end_char = str_buf + 4;
++ }
++
++# ifdef _LIBC
++ if (__wcscoll (range_start_char, str_buf+2) <= 0
++ && __wcscoll (str_buf+2, range_end_char) <= 0)
++# else
++ if (wcscoll (range_start_char, str_buf+2) <= 0
++ && wcscoll (str_buf+2, range_end_char) <= 0)
++# endif
++ goto char_set_matched;
++ }
++ }
++
++ /* match with char? */
++ for (; workp < p ; workp++)
++ if (c == *workp)
++ goto char_set_matched;
++
++ negate = !negate;
++
++ char_set_matched:
++ if (negate) goto fail;
++#else
++ /* Cast to `unsigned' instead of `unsigned char' in case the
++ bit list is a full 32 bytes long. */
++ if (c < (unsigned) (*p * BYTEWIDTH)
++ && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
++ negate = !negate;
++
++ p += 1 + *p;
++
++ if (!negate) goto fail;
++#undef WORK_BUFFER_SIZE
++#endif /* WCHAR */
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++ }
++
++
++ /* The beginning of a group is represented by start_memory.
++ The arguments are the register number in the next byte, and the
++ number of groups inner to this one in the next. The text
++ matched within the group is recorded (in the internal
++ registers data structure) under the register number. */
++ case start_memory:
++ DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
++ (long int) *p, (long int) p[1]);
++
++ /* Find out if this group can match the empty string. */
++ p1 = p; /* To send to group_match_null_string_p. */
++
++ if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
++ REG_MATCH_NULL_STRING_P (reg_info[*p])
++ = PREFIX(group_match_null_string_p) (&p1, pend, reg_info);
++
++ /* Save the position in the string where we were the last time
++ we were at this open-group operator in case the group is
++ operated upon by a repetition operator, e.g., with `(a*)*b'
++ against `ab'; then we want to ignore where we are now in
++ the string in case this attempt to match fails. */
++ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
++ ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
++ : regstart[*p];
++ DEBUG_PRINT2 (" old_regstart: %d\n",
++ POINTER_TO_OFFSET (old_regstart[*p]));
++
++ regstart[*p] = d;
++ DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
++
++ IS_ACTIVE (reg_info[*p]) = 1;
++ MATCHED_SOMETHING (reg_info[*p]) = 0;
++
++ /* Clear this whenever we change the register activity status. */
++ set_regs_matched_done = 0;
++
++ /* This is the new highest active register. */
++ highest_active_reg = *p;
++
++ /* If nothing was active before, this is the new lowest active
++ register. */
++ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
++ lowest_active_reg = *p;
++
++ /* Move past the register number and inner group count. */
++ p += 2;
++ just_past_start_mem = p;
++
++ break;
++
++
++ /* The stop_memory opcode represents the end of a group. Its
++ arguments are the same as start_memory's: the register
++ number, and the number of inner groups. */
++ case stop_memory:
++ DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
++ (long int) *p, (long int) p[1]);
++
++ /* We need to save the string position the last time we were at
++ this close-group operator in case the group is operated
++ upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
++ against `aba'; then we want to ignore where we are now in
++ the string in case this attempt to match fails. */
++ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
++ ? REG_UNSET (regend[*p]) ? d : regend[*p]
++ : regend[*p];
++ DEBUG_PRINT2 (" old_regend: %d\n",
++ POINTER_TO_OFFSET (old_regend[*p]));
++
++ regend[*p] = d;
++ DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
++
++ /* This register isn't active anymore. */
++ IS_ACTIVE (reg_info[*p]) = 0;
++
++ /* Clear this whenever we change the register activity status. */
++ set_regs_matched_done = 0;
++
++ /* If this was the only register active, nothing is active
++ anymore. */
++ if (lowest_active_reg == highest_active_reg)
++ {
++ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++ }
++ else
++ { /* We must scan for the new highest active register, since
++ it isn't necessarily one less than now: consider
++ (a(b)c(d(e)f)g). When group 3 ends, after the f), the
++ new highest active register is 1. */
++ UCHAR_T r = *p - 1;
++ while (r > 0 && !IS_ACTIVE (reg_info[r]))
++ r--;
++
++ /* If we end up at register zero, that means that we saved
++ the registers as the result of an `on_failure_jump', not
++ a `start_memory', and we jumped to past the innermost
++ `stop_memory'. For example, in ((.)*) we save
++ registers 1 and 2 as a result of the *, but when we pop
++ back to the second ), we are at the stop_memory 1.
++ Thus, nothing is active. */
++ if (r == 0)
++ {
++ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++ }
++ else
++ highest_active_reg = r;
++ }
++
++ /* If just failed to match something this time around with a
++ group that's operated on by a repetition operator, try to
++ force exit from the ``loop'', and restore the register
++ information for this group that we had before trying this
++ last match. */
++ if ((!MATCHED_SOMETHING (reg_info[*p])
++ || just_past_start_mem == p - 1)
++ && (p + 2) < pend)
++ {
++ boolean is_a_jump_n = false;
++
++ p1 = p + 2;
++ mcnt = 0;
++ switch ((re_opcode_t) *p1++)
++ {
++ case jump_n:
++ is_a_jump_n = true;
++ case pop_failure_jump:
++ case maybe_pop_jump:
++ case jump:
++ case dummy_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if (is_a_jump_n)
++ p1 += OFFSET_ADDRESS_SIZE;
++ break;
++
++ default:
++ /* do nothing */ ;
++ }
++ p1 += mcnt;
++
++ /* If the next operation is a jump backwards in the pattern
++ to an on_failure_jump right before the start_memory
++ corresponding to this stop_memory, exit from the loop
++ by forcing a failure after pushing on the stack the
++ on_failure_jump's jump in the pattern, and d. */
++ if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
++ && (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == start_memory
++ && p1[2+OFFSET_ADDRESS_SIZE] == *p)
++ {
++ /* If this group ever matched anything, then restore
++ what its registers were before trying this last
++ failed match, e.g., with `(a*)*b' against `ab' for
++ regstart[1], and, e.g., with `((a*)*(b*)*)*'
++ against `aba' for regend[3].
++
++ Also restore the registers for inner groups for,
++ e.g., `((a*)(b*))*' against `aba' (register 3 would
++ otherwise get trashed). */
++
++ if (EVER_MATCHED_SOMETHING (reg_info[*p]))
++ {
++ unsigned r;
++
++ EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
++
++ /* Restore this and inner groups' (if any) registers. */
++ for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
++ r++)
++ {
++ regstart[r] = old_regstart[r];
++
++ /* xx why this test? */
++ if (old_regend[r] >= regstart[r])
++ regend[r] = old_regend[r];
++ }
++ }
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
++
++ goto fail;
++ }
++ }
++
++ /* Move past the register number and the inner group count. */
++ p += 2;
++ break;
++
++
++ /* \<digit> has been turned into a `duplicate' command which is
++ followed by the numeric value of <digit> as the register number. */
++ case duplicate:
++ {
++ register const CHAR_T *d2, *dend2;
++ int regno = *p++; /* Get which register to match against. */
++ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
++
++ /* Can't back reference a group which we've never matched. */
++ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
++ goto fail;
++
++ /* Where in input to try to start matching. */
++ d2 = regstart[regno];
++
++ /* Where to stop matching; if both the place to start and
++ the place to stop matching are in the same string, then
++ set to the place to stop, otherwise, for now have to use
++ the end of the first string. */
++
++ dend2 = ((FIRST_STRING_P (regstart[regno])
++ == FIRST_STRING_P (regend[regno]))
++ ? regend[regno] : end_match_1);
++ for (;;)
++ {
++ /* If necessary, advance to next segment in register
++ contents. */
++ while (d2 == dend2)
++ {
++ if (dend2 == end_match_2) break;
++ if (dend2 == regend[regno]) break;
++
++ /* End of string1 => advance to string2. */
++ d2 = string2;
++ dend2 = regend[regno];
++ }
++ /* At end of register contents => success */
++ if (d2 == dend2) break;
++
++ /* If necessary, advance to next segment in data. */
++ PREFETCH ();
++
++ /* How many characters left in this segment to match. */
++ mcnt = dend - d;
++
++ /* Want how many consecutive characters we can match in
++ one shot, so, if necessary, adjust the count. */
++ if (mcnt > dend2 - d2)
++ mcnt = dend2 - d2;
++
++ /* Compare that many; failure if mismatch, else move
++ past them. */
++ if (translate
++ ? PREFIX(bcmp_translate) (d, d2, mcnt, translate)
++ : memcmp (d, d2, mcnt*sizeof(UCHAR_T)))
++ goto fail;
++ d += mcnt, d2 += mcnt;
++
++ /* Do this because we've match some characters. */
++ SET_REGS_MATCHED ();
++ }
++ }
++ break;
++
++
++ /* begline matches the empty string at the beginning of the string
++ (unless `not_bol' is set in `bufp'), and, if
++ `newline_anchor' is set, after newlines. */
++ case begline:
++ DEBUG_PRINT1 ("EXECUTING begline.\n");
++
++ if (AT_STRINGS_BEG (d))
++ {
++ if (!bufp->not_bol) break;
++ }
++ else if (d[-1] == '\n' && bufp->newline_anchor)
++ {
++ break;
++ }
++ /* In all other cases, we fail. */
++ goto fail;
++
++
++ /* endline is the dual of begline. */
++ case endline:
++ DEBUG_PRINT1 ("EXECUTING endline.\n");
++
++ if (AT_STRINGS_END (d))
++ {
++ if (!bufp->not_eol) break;
++ }
++
++ /* We have to ``prefetch'' the next character. */
++ else if ((d == end1 ? *string2 : *d) == '\n'
++ && bufp->newline_anchor)
++ {
++ break;
++ }
++ goto fail;
++
++
++ /* Match at the very beginning of the data. */
++ case begbuf:
++ DEBUG_PRINT1 ("EXECUTING begbuf.\n");
++ if (AT_STRINGS_BEG (d))
++ break;
++ goto fail;
++
++
++ /* Match at the very end of the data. */
++ case endbuf:
++ DEBUG_PRINT1 ("EXECUTING endbuf.\n");
++ if (AT_STRINGS_END (d))
++ break;
++ goto fail;
++
++
++ /* on_failure_keep_string_jump is used to optimize `.*\n'. It
++ pushes NULL as the value for the string on the stack. Then
++ `pop_failure_point' will keep the current value for the
++ string, instead of restoring it. To see why, consider
++ matching `foo\nbar' against `.*\n'. The .* matches the foo;
++ then the . fails against the \n. But the next thing we want
++ to do is match the \n against the \n; if we restored the
++ string value, we would be back at the foo.
++
++ Because this is used only in specific cases, we don't need to
++ check all the things that `on_failure_jump' does, to make
++ sure the right things get saved on the stack. Hence we don't
++ share its code. The only reason to push anything on the
++ stack at all is that otherwise we would have to change
++ `anychar's code to do something besides goto fail in this
++ case; that seems worse than this. */
++ case on_failure_keep_string_jump:
++ DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
++#else
++ DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
++#endif
++
++ PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
++ break;
++
++
++ /* Uses of on_failure_jump:
++
++ Each alternative starts with an on_failure_jump that points
++ to the beginning of the next alternative. Each alternative
++ except the last ends with a jump that in effect jumps past
++ the rest of the alternatives. (They really jump to the
++ ending jump of the following alternative, because tensioning
++ these jumps is a hassle.)
++
++ Repeats start with an on_failure_jump that points past both
++ the repetition text and either the following jump or
++ pop_failure_jump back to this on_failure_jump. */
++ case on_failure_jump:
++ on_failure:
++ DEBUG_PRINT1 ("EXECUTING on_failure_jump");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
++#else
++ DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
++#endif
++
++ /* If this on_failure_jump comes right before a group (i.e.,
++ the original * applied to a group), save the information
++ for that group and all inner ones, so that if we fail back
++ to this point, the group's information will be correct.
++ For example, in \(a*\)*\1, we need the preceding group,
++ and in \(zz\(a*\)b*\)\2, we need the inner group. */
++
++ /* We can't use `p' to check ahead because we push
++ a failure point to `p + mcnt' after we do this. */
++ p1 = p;
++
++ /* We need to skip no_op's before we look for the
++ start_memory in case this on_failure_jump is happening as
++ the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
++ against aba. */
++ while (p1 < pend && (re_opcode_t) *p1 == no_op)
++ p1++;
++
++ if (p1 < pend && (re_opcode_t) *p1 == start_memory)
++ {
++ /* We have a new highest active register now. This will
++ get reset at the start_memory we are about to get to,
++ but we will have saved all the registers relevant to
++ this repetition op, as described above. */
++ highest_active_reg = *(p1 + 1) + *(p1 + 2);
++ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
++ lowest_active_reg = *(p1 + 1);
++ }
++
++ DEBUG_PRINT1 (":\n");
++ PUSH_FAILURE_POINT (p + mcnt, d, -2);
++ break;
++
++
++ /* A smart repeat ends with `maybe_pop_jump'.
++ We change it to either `pop_failure_jump' or `jump'. */
++ case maybe_pop_jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++ DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
++ {
++ register UCHAR_T *p2 = p;
++
++ /* Compare the beginning of the repeat with what in the
++ pattern follows its end. If we can establish that there
++ is nothing that they would both match, i.e., that we
++ would have to backtrack because of (as in, e.g., `a*a')
++ then we can change to pop_failure_jump, because we'll
++ never have to backtrack.
++
++ This is not true in the case of alternatives: in
++ `(a|ab)*' we do need to backtrack to the `ab' alternative
++ (e.g., if the string was `ab'). But instead of trying to
++ detect that here, the alternative has put on a dummy
++ failure point which is what we will end up popping. */
++
++ /* Skip over open/close-group commands.
++ If what follows this loop is a ...+ construct,
++ look at what begins its body, since we will have to
++ match at least one of that. */
++ while (1)
++ {
++ if (p2 + 2 < pend
++ && ((re_opcode_t) *p2 == stop_memory
++ || (re_opcode_t) *p2 == start_memory))
++ p2 += 3;
++ else if (p2 + 2 + 2 * OFFSET_ADDRESS_SIZE < pend
++ && (re_opcode_t) *p2 == dummy_failure_jump)
++ p2 += 2 + 2 * OFFSET_ADDRESS_SIZE;
++ else
++ break;
++ }
++
++ p1 = p + mcnt;
++ /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
++ to the `maybe_finalize_jump' of this case. Examine what
++ follows. */
++
++ /* If we're at the end of the pattern, we can change. */
++ if (p2 == pend)
++ {
++ /* Consider what happens when matching ":\(.*\)"
++ against ":/". I don't really understand this code
++ yet. */
++ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
++ pop_failure_jump;
++ DEBUG_PRINT1
++ (" End of pattern: change to `pop_failure_jump'.\n");
++ }
++
++ else if ((re_opcode_t) *p2 == exactn
++#ifdef MBS_SUPPORT
++ || (re_opcode_t) *p2 == exactn_bin
++#endif
++ || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
++ {
++ register UCHAR_T c
++ = *p2 == (UCHAR_T) endline ? '\n' : p2[2];
++
++ if (((re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn
++#ifdef MBS_SUPPORT
++ || (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn_bin
++#endif
++ ) && p1[3+OFFSET_ADDRESS_SIZE] != c)
++ {
++ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
++ pop_failure_jump;
++#ifdef WCHAR
++ DEBUG_PRINT3 (" %C != %C => pop_failure_jump.\n",
++ (wint_t) c,
++ (wint_t) p1[3+OFFSET_ADDRESS_SIZE]);
++#else
++ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
++ (char) c,
++ (char) p1[3+OFFSET_ADDRESS_SIZE]);
++#endif
++ }
++
++#ifndef WCHAR
++ else if ((re_opcode_t) p1[3] == charset
++ || (re_opcode_t) p1[3] == charset_not)
++ {
++ int negate = (re_opcode_t) p1[3] == charset_not;
++
++ if (c < (unsigned) (p1[4] * BYTEWIDTH)
++ && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
++ negate = !negate;
++
++ /* `negate' is equal to 1 if c would match, which means
++ that we can't change to pop_failure_jump. */
++ if (!negate)
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++#endif /* not WCHAR */
++ }
++#ifndef WCHAR
++ else if ((re_opcode_t) *p2 == charset)
++ {
++ /* We win if the first character of the loop is not part
++ of the charset. */
++ if ((re_opcode_t) p1[3] == exactn
++ && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
++ && (p2[2 + p1[5] / BYTEWIDTH]
++ & (1 << (p1[5] % BYTEWIDTH)))))
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++
++ else if ((re_opcode_t) p1[3] == charset_not)
++ {
++ int idx;
++ /* We win if the charset_not inside the loop
++ lists every character listed in the charset after. */
++ for (idx = 0; idx < (int) p2[1]; idx++)
++ if (! (p2[2 + idx] == 0
++ || (idx < (int) p1[4]
++ && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
++ break;
++
++ if (idx == p2[1])
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++ else if ((re_opcode_t) p1[3] == charset)
++ {
++ int idx;
++ /* We win if the charset inside the loop
++ has no overlap with the one after the loop. */
++ for (idx = 0;
++ idx < (int) p2[1] && idx < (int) p1[4];
++ idx++)
++ if ((p2[2 + idx] & p1[5 + idx]) != 0)
++ break;
++
++ if (idx == p2[1] || idx == p1[4])
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++ }
++#endif /* not WCHAR */
++ }
++ p -= OFFSET_ADDRESS_SIZE; /* Point at relative address again. */
++ if ((re_opcode_t) p[-1] != pop_failure_jump)
++ {
++ p[-1] = (UCHAR_T) jump;
++ DEBUG_PRINT1 (" Match => jump.\n");
++ goto unconditional_jump;
++ }
++ /* Note fall through. */
++
++
++ /* The end of a simple repeat has a pop_failure_jump back to
++ its matching on_failure_jump, where the latter will push a
++ failure point. The pop_failure_jump takes off failure
++ points put on by this pop_failure_jump's matching
++ on_failure_jump; we got through the pattern to here from the
++ matching on_failure_jump, so didn't fail. */
++ case pop_failure_jump:
++ {
++ /* We need to pass separate storage for the lowest and
++ highest registers, even though we don't care about the
++ actual values. Otherwise, we will restore only one
++ register from the stack, since lowest will == highest in
++ `pop_failure_point'. */
++ active_reg_t dummy_low_reg, dummy_high_reg;
++ UCHAR_T *pdummy = NULL;
++ const CHAR_T *sdummy = NULL;
++
++ DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
++ POP_FAILURE_POINT (sdummy, pdummy,
++ dummy_low_reg, dummy_high_reg,
++ reg_dummy, reg_dummy, reg_info_dummy);
++ }
++ /* Note fall through. */
++
++ unconditional_jump:
++#ifdef _LIBC
++ DEBUG_PRINT2 ("\n%p: ", p);
++#else
++ DEBUG_PRINT2 ("\n0x%x: ", p);
++#endif
++ /* Note fall through. */
++
++ /* Unconditionally jump (without popping any failure points). */
++ case jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
++ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
++ p += mcnt; /* Do the jump. */
++#ifdef _LIBC
++ DEBUG_PRINT2 ("(to %p).\n", p);
++#else
++ DEBUG_PRINT2 ("(to 0x%x).\n", p);
++#endif
++ break;
++
++
++ /* We need this opcode so we can detect where alternatives end
++ in `group_match_null_string_p' et al. */
++ case jump_past_alt:
++ DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
++ goto unconditional_jump;
++
++
++ /* Normally, the on_failure_jump pushes a failure point, which
++ then gets popped at pop_failure_jump. We will end up at
++ pop_failure_jump, also, and with a pattern of, say, `a+', we
++ are skipping over the on_failure_jump, so we have to push
++ something meaningless for pop_failure_jump to pop. */
++ case dummy_failure_jump:
++ DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
++ /* It doesn't matter what we push for the string here. What
++ the code at `fail' tests is the value for the pattern. */
++ PUSH_FAILURE_POINT (NULL, NULL, -2);
++ goto unconditional_jump;
++
++
++ /* At the end of an alternative, we need to push a dummy failure
++ point in case we are followed by a `pop_failure_jump', because
++ we don't want the failure point for the alternative to be
++ popped. For example, matching `(a|ab)*' against `aab'
++ requires that we match the `ab' alternative. */
++ case push_dummy_failure:
++ DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
++ /* See comments just above at `dummy_failure_jump' about the
++ two zeroes. */
++ PUSH_FAILURE_POINT (NULL, NULL, -2);
++ break;
++
++ /* Have to succeed matching what follows at least n times.
++ After that, handle like `on_failure_jump'. */
++ case succeed_n:
++ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
++ DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
++
++ assert (mcnt >= 0);
++ /* Originally, this is how many times we HAVE to succeed. */
++ if (mcnt > 0)
++ {
++ mcnt--;
++ p += OFFSET_ADDRESS_SIZE;
++ STORE_NUMBER_AND_INCR (p, mcnt);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p - OFFSET_ADDRESS_SIZE
++ , mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - OFFSET_ADDRESS_SIZE
++ , mcnt);
++#endif
++ }
++ else if (mcnt == 0)
++ {
++#ifdef _LIBC
++ DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n",
++ p + OFFSET_ADDRESS_SIZE);
++#else
++ DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n",
++ p + OFFSET_ADDRESS_SIZE);
++#endif /* _LIBC */
++
++#ifdef WCHAR
++ p[1] = (UCHAR_T) no_op;
++#else
++ p[2] = (UCHAR_T) no_op;
++ p[3] = (UCHAR_T) no_op;
++#endif /* WCHAR */
++ goto on_failure;
++ }
++ break;
++
++ case jump_n:
++ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
++ DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
++
++ /* Originally, this is how many times we CAN jump. */
++ if (mcnt)
++ {
++ mcnt--;
++ STORE_NUMBER (p + OFFSET_ADDRESS_SIZE, mcnt);
++
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p + OFFSET_ADDRESS_SIZE,
++ mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + OFFSET_ADDRESS_SIZE,
++ mcnt);
++#endif /* _LIBC */
++ goto unconditional_jump;
++ }
++ /* If don't have to jump any more, skip over the rest of command. */
++ else
++ p += 2 * OFFSET_ADDRESS_SIZE;
++ break;
++
++ case set_number_at:
++ {
++ DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++ p1 = p + mcnt;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
++#endif
++ STORE_NUMBER (p1, mcnt);
++ break;
++ }
++
++#if 0
++ /* The DEC Alpha C compiler 3.x generates incorrect code for the
++ test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
++ AT_WORD_BOUNDARY, so this code is disabled. Expanding the
++ macro and introducing temporary variables works around the bug. */
++
++ case wordbound:
++ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
++ if (AT_WORD_BOUNDARY (d))
++ break;
++ goto fail;
++
++ case notwordbound:
++ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
++ if (AT_WORD_BOUNDARY (d))
++ goto fail;
++ break;
++#else
++ case wordbound:
++ {
++ boolean prevchar, thischar;
++
++ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
++ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
++ break;
++
++ prevchar = WORDCHAR_P (d - 1);
++ thischar = WORDCHAR_P (d);
++ if (prevchar != thischar)
++ break;
++ goto fail;
++ }
++
++ case notwordbound:
++ {
++ boolean prevchar, thischar;
++
++ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
++ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
++ goto fail;
++
++ prevchar = WORDCHAR_P (d - 1);
++ thischar = WORDCHAR_P (d);
++ if (prevchar != thischar)
++ goto fail;
++ break;
++ }
++#endif
++
++ case wordbeg:
++ DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
++ if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
++ && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
++ break;
++ goto fail;
++
++ case wordend:
++ DEBUG_PRINT1 ("EXECUTING wordend.\n");
++ if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
++ && (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
++ break;
++ goto fail;
++
++#ifdef emacs
++ case before_dot:
++ DEBUG_PRINT1 ("EXECUTING before_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) >= point)
++ goto fail;
++ break;
++
++ case at_dot:
++ DEBUG_PRINT1 ("EXECUTING at_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) != point)
++ goto fail;
++ break;
++
++ case after_dot:
++ DEBUG_PRINT1 ("EXECUTING after_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) <= point)
++ goto fail;
++ break;
++
++ case syntaxspec:
++ DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
++ mcnt = *p++;
++ goto matchsyntax;
++
++ case wordchar:
++ DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
++ mcnt = (int) Sword;
++ matchsyntax:
++ PREFETCH ();
++ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
++ d++;
++ if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
++ goto fail;
++ SET_REGS_MATCHED ();
++ break;
++
++ case notsyntaxspec:
++ DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
++ mcnt = *p++;
++ goto matchnotsyntax;
++
++ case notwordchar:
++ DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
++ mcnt = (int) Sword;
++ matchnotsyntax:
++ PREFETCH ();
++ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
++ d++;
++ if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
++ goto fail;
++ SET_REGS_MATCHED ();
++ break;
++
++#else /* not emacs */
++ case wordchar:
++ DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
++ PREFETCH ();
++ if (!WORDCHAR_P (d))
++ goto fail;
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++
++ case notwordchar:
++ DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
++ PREFETCH ();
++ if (WORDCHAR_P (d))
++ goto fail;
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++#endif /* not emacs */
++
++ default:
++ abort ();
++ }
++ continue; /* Successfully executed one pattern command; keep going. */
++
++
++ /* We goto here if a matching operation fails. */
++ fail:
++ if (!FAIL_STACK_EMPTY ())
++ { /* A restart point is known. Restore to that state. */
++ DEBUG_PRINT1 ("\nFAIL:\n");
++ POP_FAILURE_POINT (d, p,
++ lowest_active_reg, highest_active_reg,
++ regstart, regend, reg_info);
++
++ /* If this failure point is a dummy, try the next one. */
++ if (!p)
++ goto fail;
++
++ /* If we failed to the end of the pattern, don't examine *p. */
++ assert (p <= pend);
++ if (p < pend)
++ {
++ boolean is_a_jump_n = false;
++
++ /* If failed to a backwards jump that's part of a repetition
++ loop, need to pop this failure point and use the next one. */
++ switch ((re_opcode_t) *p)
++ {
++ case jump_n:
++ is_a_jump_n = true;
++ case maybe_pop_jump:
++ case pop_failure_jump:
++ case jump:
++ p1 = p + 1;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++
++ if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
++ || (!is_a_jump_n
++ && (re_opcode_t) *p1 == on_failure_jump))
++ goto fail;
++ break;
++ default:
++ /* do nothing */ ;
++ }
++ }
++
++ if (d >= string1 && d <= end1)
++ dend = end_match_1;
++ }
++ else
++ break; /* Matching at this starting point really fails. */
++ } /* for (;;) */
++
++ if (best_regs_set)
++ goto restore_best_regs;
++
++ FREE_VARIABLES ();
++
++ return -1; /* Failure to match. */
++} /* re_match_2 */
++
++/* Subroutine definitions for re_match_2. */
++
++
++/* We are passed P pointing to a register number after a start_memory.
++
++ Return true if the pattern up to the corresponding stop_memory can
++ match the empty string, and false otherwise.
++
++ If we find the matching stop_memory, sets P to point to one past its number.
++ Otherwise, sets P to an undefined byte less than or equal to END.
++
++ We don't handle duplicates properly (yet). */
++
++static boolean
++PREFIX(group_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ /* Point to after the args to the start_memory. */
++ UCHAR_T *p1 = *p + 2;
++
++ while (p1 < end)
++ {
++ /* Skip over opcodes that can match nothing, and return true or
++ false, as appropriate, when we get to one that can't, or to the
++ matching stop_memory. */
++
++ switch ((re_opcode_t) *p1)
++ {
++ /* Could be either a loop or a series of alternatives. */
++ case on_failure_jump:
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++
++ /* If the next operation is not a jump backwards in the
++ pattern. */
++
++ if (mcnt >= 0)
++ {
++ /* Go through the on_failure_jumps of the alternatives,
++ seeing if any of the alternatives cannot match nothing.
++ The last alternative starts with only a jump,
++ whereas the rest start with on_failure_jump and end
++ with a jump, e.g., here is the pattern for `a|b|c':
++
++ /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
++ /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
++ /exactn/1/c
++
++ So, we have to first go through the first (n-1)
++ alternatives and then deal with the last one separately. */
++
++
++ /* Deal with the first (n-1) alternatives, which start
++ with an on_failure_jump (see above) that jumps to right
++ past a jump_past_alt. */
++
++ while ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] ==
++ jump_past_alt)
++ {
++ /* `mcnt' holds how many bytes long the alternative
++ is, including the ending `jump_past_alt' and
++ its number. */
++
++ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt -
++ (1 + OFFSET_ADDRESS_SIZE),
++ reg_info))
++ return false;
++
++ /* Move to right after this alternative, including the
++ jump_past_alt. */
++ p1 += mcnt;
++
++ /* Break if it's the beginning of an n-th alternative
++ that doesn't begin with an on_failure_jump. */
++ if ((re_opcode_t) *p1 != on_failure_jump)
++ break;
++
++ /* Still have to check that it's not an n-th
++ alternative that starts with an on_failure_jump. */
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] !=
++ jump_past_alt)
++ {
++ /* Get to the beginning of the n-th alternative. */
++ p1 -= 1 + OFFSET_ADDRESS_SIZE;
++ break;
++ }
++ }
++
++ /* Deal with the last alternative: go back and get number
++ of the `jump_past_alt' just before it. `mcnt' contains
++ the length of the alternative. */
++ EXTRACT_NUMBER (mcnt, p1 - OFFSET_ADDRESS_SIZE);
++
++ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt, reg_info))
++ return false;
++
++ p1 += mcnt; /* Get past the n-th alternative. */
++ } /* if mcnt > 0 */
++ break;
++
++
++ case stop_memory:
++ assert (p1[1] == **p);
++ *p = p1 + 2;
++ return true;
++
++
++ default:
++ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
++ return false;
++ }
++ } /* while p1 < end */
++
++ return false;
++} /* group_match_null_string_p */
++
++
++/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
++ It expects P to be the first byte of a single alternative and END one
++ byte past the last. The alternative can contain groups. */
++
++static boolean
++PREFIX(alt_match_null_string_p) (UCHAR_T *p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ UCHAR_T *p1 = p;
++
++ while (p1 < end)
++ {
++ /* Skip over opcodes that can match nothing, and break when we get
++ to one that can't. */
++
++ switch ((re_opcode_t) *p1)
++ {
++ /* It's a loop. */
++ case on_failure_jump:
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++ break;
++
++ default:
++ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
++ return false;
++ }
++ } /* while p1 < end */
++
++ return true;
++} /* alt_match_null_string_p */
++
++
++/* Deals with the ops common to group_match_null_string_p and
++ alt_match_null_string_p.
++
++ Sets P to one after the op and its arguments, if any. */
++
++static boolean
++PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ boolean ret;
++ int reg_no;
++ UCHAR_T *p1 = *p;
++
++ switch ((re_opcode_t) *p1++)
++ {
++ case no_op:
++ case begline:
++ case endline:
++ case begbuf:
++ case endbuf:
++ case wordbeg:
++ case wordend:
++ case wordbound:
++ case notwordbound:
++#ifdef emacs
++ case before_dot:
++ case at_dot:
++ case after_dot:
++#endif
++ break;
++
++ case start_memory:
++ reg_no = *p1;
++ assert (reg_no > 0 && reg_no <= MAX_REGNUM);
++ ret = PREFIX(group_match_null_string_p) (&p1, end, reg_info);
++
++ /* Have to set this here in case we're checking a group which
++ contains a group and a back reference to it. */
++
++ if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
++ REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
++
++ if (!ret)
++ return false;
++ break;
++
++ /* If this is an optimized succeed_n for zero times, make the jump. */
++ case jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if (mcnt >= 0)
++ p1 += mcnt;
++ else
++ return false;
++ break;
++
++ case succeed_n:
++ /* Get to the number of times to succeed. */
++ p1 += OFFSET_ADDRESS_SIZE;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++
++ if (mcnt == 0)
++ {
++ p1 -= 2 * OFFSET_ADDRESS_SIZE;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++ }
++ else
++ return false;
++ break;
++
++ case duplicate:
++ if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
++ return false;
++ break;
++
++ case set_number_at:
++ p1 += 2 * OFFSET_ADDRESS_SIZE;
++
++ default:
++ /* All other opcodes mean we cannot match the empty string. */
++ return false;
++ }
++
++ *p = p1;
++ return true;
++} /* common_op_match_null_string_p */
++
++
++/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
++ bytes; nonzero otherwise. */
++
++static int
++PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
++ RE_TRANSLATE_TYPE translate)
++{
++ register const UCHAR_T *p1 = (const UCHAR_T *) s1;
++ register const UCHAR_T *p2 = (const UCHAR_T *) s2;
++ while (len)
++ {
++#ifdef WCHAR
++ if (((*p1<=0xff)?translate[*p1++]:*p1++)
++ != ((*p2<=0xff)?translate[*p2++]:*p2++))
++ return 1;
++#else /* BYTE */
++ if (translate[*p1++] != translate[*p2++]) return 1;
++#endif /* WCHAR */
++ len--;
++ }
++ return 0;
++}
++
++
++#else /* not INSIDE_RECURSION */
++
++/* Entry points for GNU code. */
++
++/* re_compile_pattern is the GNU regular expression compiler: it
++ compiles PATTERN (of length SIZE) and puts the result in BUFP.
++ Returns 0 if the pattern was valid, otherwise an error string.
++
++ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
++ are set in BUFP on entry.
++
++ We call regex_compile to do the actual compilation. */
++
++const char *
++re_compile_pattern (const char *pattern, size_t length,
++ struct re_pattern_buffer *bufp)
++{
++ reg_errcode_t ret;
++
++ /* GNU code is written to assume at least RE_NREGS registers will be set
++ (and at least one extra will be -1). */
++ bufp->regs_allocated = REGS_UNALLOCATED;
++
++ /* And GNU code determines whether or not to get register information
++ by passing null for the REGS argument to re_match, etc., not by
++ setting no_sub. */
++ bufp->no_sub = 0;
++
++ /* Match anchors at newline. */
++ bufp->newline_anchor = 1;
++
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
++ else
++# endif
++ ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);
++
++ if (!ret)
++ return NULL;
++ return gettext (re_error_msgid[(int) ret]);
++}
++#ifdef _LIBC
++weak_alias (__re_compile_pattern, re_compile_pattern)
++#endif
++
++/* Entry points compatible with 4.2 BSD regex library. We don't define
++ them unless specifically requested. */
++
++#if defined _REGEX_RE_COMP || defined _LIBC
++
++/* BSD has one and only one pattern buffer. */
++static struct re_pattern_buffer re_comp_buf;
++
++char *
++#ifdef _LIBC
++/* Make these definitions weak in libc, so POSIX programs can redefine
++ these names if they don't use our functions, and still use
++ regcomp/regexec below without link errors. */
++weak_function
++#endif
++re_comp (const char *s)
++{
++ reg_errcode_t ret;
++
++ if (!s)
++ {
++ if (!re_comp_buf.buffer)
++ return (char *) gettext ("No previous regular expression");
++ return 0;
++ }
++
++ if (!re_comp_buf.buffer)
++ {
++ re_comp_buf.buffer = (unsigned char *) malloc (200);
++ if (re_comp_buf.buffer == NULL)
++ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
++ re_comp_buf.allocated = 200;
++
++ re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
++ if (re_comp_buf.fastmap == NULL)
++ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
++ }
++
++ /* Since `re_exec' always passes NULL for the `regs' argument, we
++ don't need to initialize the pattern buffer fields which affect it. */
++
++ /* Match anchors at newlines. */
++ re_comp_buf.newline_anchor = 1;
++
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
++ else
++# endif
++ ret = byte_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
++
++ if (!ret)
++ return NULL;
++
++ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
++ return (char *) gettext (re_error_msgid[(int) ret]);
++}
++
++
++int
++#ifdef _LIBC
++weak_function
++#endif
++re_exec (const char *s)
++{
++ const int len = strlen (s);
++ return
++ 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
++}
++
++#endif /* _REGEX_RE_COMP */
++
++/* POSIX.2 functions. Don't define these for Emacs. */
++
++#ifndef emacs
++
++/* regcomp takes a regular expression as a string and compiles it.
++
++ PREG is a regex_t *. We do not expect any fields to be initialized,
++ since POSIX says we shouldn't. Thus, we set
++
++ `buffer' to the compiled pattern;
++ `used' to the length of the compiled pattern;
++ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
++ REG_EXTENDED bit in CFLAGS is set; otherwise, to
++ RE_SYNTAX_POSIX_BASIC;
++ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
++ `fastmap' to an allocated space for the fastmap;
++ `fastmap_accurate' to zero;
++ `re_nsub' to the number of subexpressions in PATTERN.
++
++ PATTERN is the address of the pattern string.
++
++ CFLAGS is a series of bits which affect compilation.
++
++ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
++ use POSIX basic syntax.
++
++ If REG_NEWLINE is set, then . and [^...] don't match newline.
++ Also, regexec will try a match beginning after every newline.
++
++ If REG_ICASE is set, then we considers upper- and lowercase
++ versions of letters to be equivalent when matching.
++
++ If REG_NOSUB is set, then when PREG is passed to regexec, that
++ routine will report only success or failure, and nothing about the
++ registers.
++
++ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
++ the return codes and their meanings.) */
++
++int
++regcomp (regex_t *preg, const char *pattern, int cflags)
++{
++ reg_errcode_t ret;
++ reg_syntax_t syntax
++ = (cflags & REG_EXTENDED) ?
++ RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
++
++ /* regex_compile will allocate the space for the compiled pattern. */
++ preg->buffer = 0;
++ preg->allocated = 0;
++ preg->used = 0;
++
++ /* Try to allocate space for the fastmap. */
++ preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
++
++ if (cflags & REG_ICASE)
++ {
++ int i;
++
++ preg->translate
++ = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
++ * sizeof (*(RE_TRANSLATE_TYPE)0));
++ if (preg->translate == NULL)
++ return (int) REG_ESPACE;
++
++ /* Map uppercase characters to corresponding lowercase ones. */
++ for (i = 0; i < CHAR_SET_SIZE; i++)
++ preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
++ }
++ else
++ preg->translate = NULL;
++
++ /* If REG_NEWLINE is set, newlines are treated differently. */
++ if (cflags & REG_NEWLINE)
++ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
++ syntax &= ~RE_DOT_NEWLINE;
++ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
++ /* It also changes the matching behavior. */
++ preg->newline_anchor = 1;
++ }
++ else
++ preg->newline_anchor = 0;
++
++ preg->no_sub = !!(cflags & REG_NOSUB);
++
++ /* POSIX says a null character in the pattern terminates it, so we
++ can use strlen here in compiling the pattern. */
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
++ else
++# endif
++ ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
++
++ /* POSIX doesn't distinguish between an unmatched open-group and an
++ unmatched close-group: both are REG_EPAREN. */
++ if (ret == REG_ERPAREN) ret = REG_EPAREN;
++
++ if (ret == REG_NOERROR && preg->fastmap)
++ {
++ /* Compute the fastmap now, since regexec cannot modify the pattern
++ buffer. */
++ if (re_compile_fastmap (preg) == -2)
++ {
++ /* Some error occurred while computing the fastmap, just forget
++ about it. */
++ free (preg->fastmap);
++ preg->fastmap = NULL;
++ }
++ }
++
++ return (int) ret;
++}
++#ifdef _LIBC
++weak_alias (__regcomp, regcomp)
++#endif
++
++
++/* regexec searches for a given pattern, specified by PREG, in the
++ string STRING.
++
++ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
++ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
++ least NMATCH elements, and we set them to the offsets of the
++ corresponding matched substrings.
++
++ EFLAGS specifies `execution flags' which affect matching: if
++ REG_NOTBOL is set, then ^ does not match at the beginning of the
++ string; if REG_NOTEOL is set, then $ does not match at the end.
++
++ We return 0 if we find a match and REG_NOMATCH if not. */
++
++int
++regexec (const regex_t *preg, const char *string, size_t nmatch,
++ regmatch_t pmatch[], int eflags)
++{
++ int ret;
++ struct re_registers regs;
++ regex_t private_preg;
++ int len = strlen (string);
++ boolean want_reg_info = !preg->no_sub && nmatch > 0;
++
++ private_preg = *preg;
++
++ private_preg.not_bol = !!(eflags & REG_NOTBOL);
++ private_preg.not_eol = !!(eflags & REG_NOTEOL);
++
++ /* The user has told us exactly how many registers to return
++ information about, via `nmatch'. We have to pass that on to the
++ matching routines. */
++ private_preg.regs_allocated = REGS_FIXED;
++
++ if (want_reg_info)
++ {
++ regs.num_regs = nmatch;
++ regs.start = TALLOC (nmatch * 2, regoff_t);
++ if (regs.start == NULL)
++ return (int) REG_NOMATCH;
++ regs.end = regs.start + nmatch;
++ }
++
++ /* Perform the searching operation. */
++ ret = re_search (&private_preg, string, len,
++ /* start: */ 0, /* range: */ len,
++ want_reg_info ? &regs : (struct re_registers *) 0);
++
++ /* Copy the register information to the POSIX structure. */
++ if (want_reg_info)
++ {
++ if (ret >= 0)
++ {
++ unsigned r;
++
++ for (r = 0; r < nmatch; r++)
++ {
++ pmatch[r].rm_so = regs.start[r];
++ pmatch[r].rm_eo = regs.end[r];
++ }
++ }
++
++ /* If we needed the temporary register info, free the space now. */
++ free (regs.start);
++ }
++
++ /* We want zero return to mean success, unlike `re_search'. */
++ return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
++}
++#ifdef _LIBC
++/* EGLIBC: This is handled in regexec-compat.c. */
++/*weak_alias (__regexec, regexec)*/
++#include "regexec-compat.c"
++#endif
++
++
++/* Returns a message corresponding to an error code, ERRCODE, returned
++ from either regcomp or regexec. We don't use PREG here. */
++
++size_t
++regerror (int errcode, const regex_t *preg __attribute__ ((unused)),
++ char *errbuf, size_t errbuf_size)
++{
++ const char *msg;
++ size_t msg_size;
++
++ if (errcode < 0
++ || errcode >= (int) (sizeof (re_error_msgid)
++ / sizeof (re_error_msgid[0])))
++ /* Only error codes returned by the rest of the code should be passed
++ to this routine. If we are given anything else, or if other regex
++ code generates an invalid error code, then the program has a bug.
++ Dump core so we can fix it. */
++ abort ();
++
++ msg = gettext (re_error_msgid[errcode]);
++
++ msg_size = strlen (msg) + 1; /* Includes the null. */
++
++ if (errbuf_size != 0)
++ {
++ if (msg_size > errbuf_size)
++ {
++#if defined HAVE_MEMPCPY || defined _LIBC
++ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
++#else
++ memcpy (errbuf, msg, errbuf_size - 1);
++ errbuf[errbuf_size - 1] = 0;
++#endif
++ }
++ else
++ memcpy (errbuf, msg, msg_size);
++ }
++
++ return msg_size;
++}
++#ifdef _LIBC
++weak_alias (__regerror, regerror)
++#endif
++
++
++/* Free dynamically allocated space used by PREG. */
++
++void
++regfree (regex_t *preg)
++{
++ if (preg->buffer != NULL)
++ free (preg->buffer);
++ preg->buffer = NULL;
++
++ preg->allocated = 0;
++ preg->used = 0;
++
++ if (preg->fastmap != NULL)
++ free (preg->fastmap);
++ preg->fastmap = NULL;
++ preg->fastmap_accurate = 0;
++
++ if (preg->translate != NULL)
++ free (preg->translate);
++ preg->translate = NULL;
++}
++#ifdef _LIBC
++weak_alias (__regfree, regfree)
++#endif
++
++#endif /* not emacs */
++
++#endif /* not INSIDE_RECURSION */
++
++
++#undef STORE_NUMBER
++#undef STORE_NUMBER_AND_INCR
++#undef EXTRACT_NUMBER
++#undef EXTRACT_NUMBER_AND_INCR
++
++#undef DEBUG_PRINT_COMPILED_PATTERN
++#undef DEBUG_PRINT_DOUBLE_STRING
++
++#undef INIT_FAIL_STACK
++#undef RESET_FAIL_STACK
++#undef DOUBLE_FAIL_STACK
++#undef PUSH_PATTERN_OP
++#undef PUSH_FAILURE_POINTER
++#undef PUSH_FAILURE_INT
++#undef PUSH_FAILURE_ELT
++#undef POP_FAILURE_POINTER
++#undef POP_FAILURE_INT
++#undef POP_FAILURE_ELT
++#undef DEBUG_PUSH
++#undef DEBUG_POP
++#undef PUSH_FAILURE_POINT
++#undef POP_FAILURE_POINT
++
++#undef REG_UNSET_VALUE
++#undef REG_UNSET
++
++#undef PATFETCH
++#undef PATFETCH_RAW
++#undef PATUNFETCH
++#undef TRANSLATE
++
++#undef INIT_BUF_SIZE
++#undef GET_BUFFER_SPACE
++#undef BUF_PUSH
++#undef BUF_PUSH_2
++#undef BUF_PUSH_3
++#undef STORE_JUMP
++#undef STORE_JUMP2
++#undef INSERT_JUMP
++#undef INSERT_JUMP2
++#undef EXTEND_BUFFER
++#undef GET_UNSIGNED_NUMBER
++#undef FREE_STACK_RETURN
++
++# undef POINTER_TO_OFFSET
++# undef MATCHING_IN_FRST_STRING
++# undef PREFETCH
++# undef AT_STRINGS_BEG
++# undef AT_STRINGS_END
++# undef WORDCHAR_P
++# undef FREE_VAR
++# undef FREE_VARIABLES
++# undef NO_HIGHEST_ACTIVE_REG
++# undef NO_LOWEST_ACTIVE_REG
++
++# undef CHAR_T
++# undef UCHAR_T
++# undef COMPILED_BUFFER_VAR
++# undef OFFSET_ADDRESS_SIZE
++# undef CHAR_CLASS_SIZE
++# undef PREFIX
++# undef ARG_PREFIX
++# undef PUT_CHAR
++# undef BYTE
++# undef WCHAR
++
++# define DEFINED_ONCE
+Index: git/pwd/Makefile
+===================================================================
+--- git.orig/pwd/Makefile 2014-08-29 20:00:53.316070587 -0700
++++ git/pwd/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for pwd portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := pwd
+
+ include ../Makeconfig
+Index: git/resolv/Makefile
+===================================================================
+--- git.orig/resolv/Makefile 2014-08-29 20:00:53.320070587 -0700
++++ git/resolv/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for resolv portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := resolv
+
+ include ../Makeconfig
+@@ -27,20 +29,21 @@
+ arpa/nameser.h arpa/nameser_compat.h \
+ sys/bitypes.h
+
+-routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
+- res_hconf res_libc res-state
++routines-$(OPTION_EGLIBC_INET) \
++ += herror inet_addr inet_ntop inet_pton nsap_addr res_init \
++ res_hconf res_libc res-state
+
+-tests = tst-aton tst-leaks tst-inet_ntop
+-xtests = tst-leaks2
++tests-$(OPTION_EGLIBC_INET) += tst-aton tst-leaks tst-inet_ntop
++xtests-$(OPTION_EGLIBC_INET) += tst-leaks2
+
+ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
+
+-extra-libs := libresolv libnss_dns
++extra-libs-$(OPTION_EGLIBC_INET) += libresolv libnss_dns
+ ifeq ($(have-thread-library),yes)
+-extra-libs += libanl
+-routines += gai_sigqueue
++extra-libs-$(OPTION_EGLIBC_INET_ANL) += libanl
++routines-$(OPTION_EGLIBC_INET) += gai_sigqueue
+ endif
+-extra-libs-others = $(extra-libs)
++extra-libs-others-y += $(extra-libs-y)
+ libresolv-routines := gethnamaddr res_comp res_debug \
+ res_data res_mkquery res_query res_send \
+ inet_net_ntop inet_net_pton inet_neta base64 \
+@@ -60,7 +63,7 @@
+ static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
+ endif
+
+-ifeq (yesyes,$(build-shared)$(have-thread-library))
++ifeq (yesyesy,$(build-shared)$(have-thread-library)$(OPTION_EGLIBC_INET_ANL))
+ tests: $(objpfx)ga_test
+ endif
+
+Index: git/stdio-common/fxprintf.c
+===================================================================
+--- git.orig/stdio-common/fxprintf.c 2014-08-29 20:00:53.544070587 -0700
++++ git/stdio-common/fxprintf.c 2014-08-29 20:01:15.232070587 -0700
+@@ -23,6 +23,7 @@
+ #include <wchar.h>
+ #include <string.h>
+ #include <libioP.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -37,6 +38,7 @@
+ int res;
+ if (_IO_fwide (fp, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ size_t len = strlen (fmt) + 1;
+ wchar_t wfmt[len];
+ for (size_t i = 0; i < len; ++i)
+@@ -45,6 +47,9 @@
+ wfmt[i] = fmt[i];
+ }
+ res = __vfwprintf (fp, wfmt, ap);
++#else
++ abort();
++#endif
+ }
+ else
+ res = _IO_vfprintf (fp, fmt, ap);
+Index: git/stdio-common/_i18n_number.h
+===================================================================
+--- git.orig/stdio-common/_i18n_number.h 2014-08-29 20:00:53.500070587 -0700
++++ git/stdio-common/_i18n_number.h 2014-08-29 20:01:15.232070587 -0700
+@@ -19,10 +19,13 @@
+ #include <stdbool.h>
+ #include <wchar.h>
+ #include <wctype.h>
++#include <gnu/option-groups.h>
+
+ #include "../locale/outdigits.h"
+ #include "../locale/outdigitswc.h"
+
++#if __OPTION_EGLIBC_LOCALE_CODE
++
+ static CHAR_T *
+ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
+ {
+@@ -115,3 +118,13 @@
+
+ return w;
+ }
++
++#else
++
++static CHAR_T *
++_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
++{
++ return w;
++}
++
++#endif
+Index: git/stdio-common/Makefile
+===================================================================
+--- git.orig/stdio-common/Makefile 2014-08-29 20:00:53.500070587 -0700
++++ git/stdio-common/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Specific makefile for stdio-common.
+ #
++include ../option-groups.mak
++
+ subdir := stdio-common
+
+ include ../Makeconfig
+@@ -30,7 +32,7 @@
+ vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \
+ reg-modifier reg-type \
+ printf_size fprintf printf snprintf sprintf asprintf dprintf \
+- vfwprintf vfscanf vfwscanf \
++ vfscanf \
+ fscanf scanf sscanf \
+ perror psignal \
+ tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname \
+@@ -41,23 +43,37 @@
+ isoc99_vsscanf \
+ psiginfo
+
+-aux := errlist siglist printf-parsemb printf-parsewc fxprintf
++# Ideally, _itowa and itowa-digits would be in this option group as
++# well, but it is used unconditionally by printf_fp and printf_fphex,
++# and it didn't seem straightforward to disentangle it.
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ vfwprintf vfwscanf
++
++aux := errlist siglist printf-parsemb fxprintf
++aux-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += printf-parsewc
+
+ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
+ temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
+ xbug errnobug \
+ bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 bug13 \
+- tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \
++ tfformat tiformat tllformat tstdiomisc tst-printfsz \
+ scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
+- scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
+- tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
+- tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \
++ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \
++ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \
++ tst-fseek tst-fmemopen tst-gets \
++ tst-sprintf tst-rndseek tst-fdopen tst-fphex \
+ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
+- tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
+- bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
+- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
+- bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \
+- bug25 tst-printf-round bug26
++ tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
++ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
++ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \
++ tst-printf-round bug26
++
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += bug18a tst-swscanf tst-wc-printf
+
+ test-srcs = tst-unbputc tst-printf
+
+Index: git/stdio-common/printf_fp.c
+===================================================================
+--- git.orig/stdio-common/printf_fp.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_fp.c 2014-08-29 20:01:15.232070587 -0700
+@@ -39,6 +39,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+ #include <stdbool.h>
+ #include <rounding-mode.h>
+
+@@ -148,6 +149,10 @@
+ wchar_t thousands_sep, int ngroups)
+ internal_function;
+
++/* Ideally, when OPTION_EGLIBC_LOCALE_CODE is disabled, this should do
++ all its work in ordinary characters, rather than doing it in wide
++ characters and then converting at the end. But that is a challenge
++ for another day. */
+
+ int
+ ___printf_fp (FILE *fp,
+@@ -206,7 +211,14 @@
+ mp_limb_t cy;
+
+ /* Nonzero if this is output on a wide character stream. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+
+ /* Buffer in which we produce the output. */
+ wchar_t *wbuffer = NULL;
+@@ -258,6 +270,7 @@
+
+
+ /* Figure out the decimal point character. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->extra == 0)
+ {
+ decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
+@@ -277,7 +290,13 @@
+ /* The decimal point character must not be zero. */
+ assert (*decimal != '\0');
+ assert (decimalwc != L'\0');
++#else
++ /* Hard-code values from 'C' locale. */
++ decimal = ".";
++ decimalwc = L'.';
++#endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->group)
+ {
+ if (info->extra == 0)
+@@ -321,6 +340,9 @@
+ }
+ else
+ grouping = NULL;
++#else
++ grouping = NULL;
++#endif
+
+ /* Fetch the argument value. */
+ #ifndef __NO_LONG_DOUBLE_MATH
+Index: git/stdio-common/printf_fphex.c
+===================================================================
+--- git.orig/stdio-common/printf_fphex.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_fphex.c 2014-08-29 20:01:15.232070587 -0700
+@@ -28,6 +28,7 @@
+ #include <_itoa.h>
+ #include <_itowa.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+ #include <stdbool.h>
+ #include <rounding-mode.h>
+
+@@ -139,10 +140,18 @@
+ int done = 0;
+
+ /* Nonzero if this is output on a wide character stream. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+
+
+ /* Figure out the decimal point character. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->extra == 0)
+ {
+ decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
+@@ -156,6 +165,10 @@
+ }
+ /* The decimal point character must never be zero. */
+ assert (*decimal != '\0' && decimalwc != L'\0');
++#else
++ decimal = ".";
++ decimalwc = L'.';
++#endif
+
+
+ /* Fetch the argument value. */
+Index: git/stdio-common/printf_size.c
+===================================================================
+--- git.orig/stdio-common/printf_size.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_size.c 2014-08-29 20:01:15.232070587 -0700
+@@ -23,6 +23,7 @@
+ #include <math.h>
+ #include <printf.h>
+ #include <libioP.h>
++#include <gnu/option-groups.h>
+
+
+ /* This defines make it possible to use the same code for GNU C library and
+@@ -116,7 +117,14 @@
+
+ struct printf_info fp_info;
+ int done = 0;
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+ int res;
+
+ /* Fetch the argument value. */
+Index: git/stdio-common/scanf14.c
+===================================================================
+--- git.orig/stdio-common/scanf14.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/scanf14.c 2014-08-29 20:01:15.232070587 -0700
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ #define FAIL() \
+ do { \
+@@ -36,6 +37,7 @@
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (sscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2)
+ FAIL ();
+ else
+@@ -45,6 +47,7 @@
+ memset (lsp, 'x', sizeof L"3.25");
+ free (lsp);
+ }
++#endif
+ if (sscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2)
+ FAIL ();
+ else
+Index: git/stdio-common/tstdiomisc.c
+===================================================================
+--- git.orig/stdio-common/tstdiomisc.c 2014-08-29 20:00:53.584070587 -0700
++++ git/stdio-common/tstdiomisc.c 2014-08-29 20:01:15.232070587 -0700
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ static int
+ t1 (void)
+@@ -125,6 +126,7 @@
+ printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
+ buf);
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G",
+ qnanval, qnanval, qnanval, qnanval,
+ qnanval, qnanval, qnanval, qnanval);
+@@ -162,6 +164,7 @@
+ result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
+ printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
+ wbuf);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ lqnanval = NAN;
+
+@@ -206,6 +209,7 @@
+ printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
+ buf);
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]),
+ L"%La %LA %Le %LE %Lf %LF %Lg %LG",
+ lqnanval, lqnanval, lqnanval, lqnanval,
+@@ -250,6 +254,7 @@
+ result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
+ printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
+ wbuf);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ return result;
+ }
+Index: git/stdio-common/tst-popen.c
+===================================================================
+--- git.orig/stdio-common/tst-popen.c 2014-08-29 20:00:53.576070587 -0700
++++ git/stdio-common/tst-popen.c 2014-08-29 20:01:15.232070587 -0700
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ static int
+ do_test (void)
+@@ -34,12 +35,14 @@
+ return 1;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ /* POSIX says that pipe streams are byte-oriented. */
+ if (fwide (f, 0) >= 0)
+ {
+ puts ("popen did not return byte-oriented stream");
+ result = 1;
+ }
++#endif
+
+ if (getline (&line, &len, f) != 5)
+ {
+Index: git/stdio-common/tst-sprintf.c
+===================================================================
+--- git.orig/stdio-common/tst-sprintf.c 2014-08-29 20:00:53.580070587 -0700
++++ git/stdio-common/tst-sprintf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <locale.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -10,12 +11,14 @@
+ char buf[100];
+ int result = 0;
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (sprintf (buf, "%.0ls", L"foo") != 0
+ || strlen (buf) != 0)
+ {
+ puts ("sprintf (buf, \"%.0ls\", L\"foo\") produced some output");
+ result = 1;
+ }
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ #define SIZE (1024*70000)
+ #define STR(x) #x
+Index: git/stdio-common/vfprintf.c
+===================================================================
+--- git.orig/stdio-common/vfprintf.c 2014-08-29 20:00:53.588070587 -0700
++++ git/stdio-common/vfprintf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -29,6 +29,7 @@
+ #include <_itoa.h>
+ #include <locale/localeinfo.h>
+ #include <stdio.h>
++#include <gnu/option-groups.h>
+
+ /* This code is shared between the standard stdio implementation found
+ in GNU C library and the libio implementation originally found in
+@@ -138,6 +139,18 @@
+ # define EOF WEOF
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define MULTIBYTE_SUPPORT (1)
++#else
++# define MULTIBYTE_SUPPORT (0)
++#endif
++
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define LOCALE_SUPPORT (1)
++#else
++# define LOCALE_SUPPORT (0)
++#endif
++
+ #include "_i18n_number.h"
+
+ /* Include the shared code for parsing the format string. */
+@@ -1123,8 +1136,11 @@
+ # define process_string_arg(fspec) \
+ LABEL (form_character): \
+ /* Character. */ \
+- if (is_long) \
+- goto LABEL (form_wcharacter); \
++ if (is_long) \
++ { \
++ assert (MULTIBYTE_SUPPORT); \
++ goto LABEL (form_wcharacter); \
++ } \
+ --width; /* Account for the character itself. */ \
+ if (!left) \
+ PAD (' '); \
+@@ -1137,6 +1153,7 @@
+ break; \
+ \
+ LABEL (form_wcharacter): \
++ assert (MULTIBYTE_SUPPORT); \
+ { \
+ /* Wide character. */ \
+ char buf[MB_CUR_MAX]; \
+@@ -1203,6 +1220,7 @@
+ } \
+ else \
+ { \
++ assert (MULTIBYTE_SUPPORT); \
+ const wchar_t *s2 = (const wchar_t *) string; \
+ mbstate_t mbstate; \
+ \
+@@ -1403,7 +1421,9 @@
+ LABEL (flag_quote):
+ group = 1;
+
+- if (grouping == (const char *) -1)
++ if (! LOCALE_SUPPORT)
++ grouping = NULL;
++ else if (grouping == (const char *) -1)
+ {
+ #ifdef COMPILE_WPRINTF
+ thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
+@@ -1702,7 +1722,9 @@
+ free (workstart);
+ workstart = NULL;
+
+- if (grouping == (const char *) -1)
++ if (! LOCALE_SUPPORT)
++ grouping = NULL;
++ else if (grouping == (const char *) -1)
+ {
+ #ifdef COMPILE_WPRINTF
+ thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
+Index: git/stdio-common/vfscanf.c
+===================================================================
+--- git.orig/stdio-common/vfscanf.c 2014-08-29 20:00:53.588070587 -0700
++++ git/stdio-common/vfscanf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -29,6 +29,7 @@
+ #include <wctype.h>
+ #include <bits/libc-lock.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+
+ #ifdef __GNUC__
+ # define HAVE_LONGLONG
+@@ -133,6 +134,12 @@
+ # define WINT_T int
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define MULTIBYTE_SUPPORT (1)
++#else
++# define MULTIBYTE_SUPPORT (0)
++#endif
++
+ #define encode_error() do { \
+ errval = 4; \
+ __set_errno (EILSEQ); \
+@@ -316,24 +323,35 @@
+ ARGCHECK (s, format);
+
+ {
+-#ifndef COMPILE_WSCANF
++#if __OPTION_EGLIBC_LOCALE_CODE && !defined (COMPILE_WSCANF)
+ struct __locale_data *const curnumeric = loc->__locales[LC_NUMERIC];
+ #endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Figure out the decimal point character. */
+-#ifdef COMPILE_WSCANF
++# ifdef COMPILE_WSCANF
+ decimal = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_DECIMAL_POINT_WC);
+-#else
++# else
+ decimal = curnumeric->values[_NL_ITEM_INDEX (DECIMAL_POINT)].string;
+-#endif
++# endif
+ /* Figure out the thousands separator character. */
+-#ifdef COMPILE_WSCANF
++# ifdef COMPILE_WSCANF
+ thousands = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_THOUSANDS_SEP_WC);
+-#else
++# else
+ thousands = curnumeric->values[_NL_ITEM_INDEX (THOUSANDS_SEP)].string;
+ if (*thousands == '\0')
+ thousands = NULL;
+-#endif
++# endif
++#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
++ /* Hard-code values from the C locale. */
++# ifdef COMPILE_WSCANF
++ decimal = L'.';
++ thousands = L'\0';
++# else
++ decimal = ".";
++ thousands = NULL;
++# endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+ }
+
+ /* Lock the stream. */
+@@ -385,6 +403,8 @@
+ #ifndef COMPILE_WSCANF
+ if (!isascii ((unsigned char) *f))
+ {
++ assert (MULTIBYTE_SUPPORT);
++
+ /* Non-ASCII, may be a multibyte. */
+ int len = __mbrlen (f, strlen (f), &state);
+ if (len > 0)
+@@ -830,6 +850,8 @@
+ }
+ /* FALLTHROUGH */
+ case L_('C'):
++ assert (MULTIBYTE_SUPPORT);
++
+ if (width == -1)
+ width = 1;
+
+@@ -1172,6 +1194,8 @@
+ /* FALLTHROUGH */
+
+ case L_('S'):
++ assert (MULTIBYTE_SUPPORT);
++
+ {
+ #ifndef COMPILE_WSCANF
+ mbstate_t cstate;
+@@ -1419,10 +1443,17 @@
+ const char *mbdigits[10];
+ const char *mbdigits_extended[10];
+ #endif
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* "to_inpunct" is a map from ASCII digits to their
+ equivalent in locale. This is defined for locales
+ which use an extra digits set. */
+ wctrans_t map = __wctrans ("to_inpunct");
++#else
++ /* This will always be the case when
++ OPTION_EGLIBC_LOCALE_CODE is disabled, but the
++ compiler can't figure that out. */
++ wctrans_t map = NULL;
++#endif
+ int n;
+
+ from_level = 0;
+@@ -2088,6 +2119,7 @@
+ --width;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ wctrans_t map;
+ if (__builtin_expect ((flags & I18N) != 0, 0)
+ /* Hexadecimal floats make no sense, fixing localized
+@@ -2304,6 +2336,7 @@
+ ;
+ #endif
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+
+ /* Have we read any character? If we try to read a number
+ in hexadecimal notation and we have read only the `0x'
+@@ -2343,7 +2376,10 @@
+
+ case L_('['): /* Character class. */
+ if (flags & LONG)
+- STRING_ARG (wstr, wchar_t, 100);
++ {
++ assert (MULTIBYTE_SUPPORT);
++ STRING_ARG (wstr, wchar_t, 100);
++ }
+ else
+ STRING_ARG (str, char, 100);
+
+@@ -2417,6 +2453,7 @@
+ if (flags & LONG)
+ {
+ size_t now = read_in;
++ assert (MULTIBYTE_SUPPORT);
+ #ifdef COMPILE_WSCANF
+ if (__glibc_unlikely (inchar () == WEOF))
+ input_error ();
+Index: git/stdlib/Makefile
+===================================================================
+--- git.orig/stdlib/Makefile 2014-08-29 20:00:53.588070587 -0700
++++ git/stdlib/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for stdlib routines
+ #
++include ../option-groups.mak
++
+ subdir := stdlib
+
+ include ../Makeconfig
+@@ -30,7 +32,7 @@
+ alloca.h fmtmsg.h \
+ bits/stdlib-bsearch.h
+
+-routines := \
++routines-y := \
+ atof atoi atol atoll \
+ abort \
+ bsearch qsort msort \
+@@ -39,7 +41,6 @@
+ quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \
+ abs labs llabs \
+ div ldiv lldiv \
+- mblen mbstowcs mbtowc wcstombs wctomb \
+ random random_r rand rand_r \
+ drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
+ srand48 seed48 lcong48 \
+@@ -52,9 +53,18 @@
+ strtof_l strtod_l strtold_l \
+ system canonicalize \
+ a64l l64a \
+- rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
+- strtoimax strtoumax wcstoimax wcstoumax \
++ getsubopt xpg_basename \
++ strtoimax strtoumax \
+ getcontext setcontext makecontext swapcontext
++routines-$(OPTION_EGLIBC_LOCALE_CODE) += \
++ strfmon strfmon_l
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ mblen mbstowcs mbtowc wcstombs wctomb \
++ wcstoimax wcstoumax
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP))
++routines-y += rpmatch
++endif
++routines-$(OPTION_EGLIBC_FMTMSG) += fmtmsg
+ aux = grouping groupingwc tens_in_limb
+
+ # These routines will be omitted from the libc shared object.
+@@ -62,20 +72,22 @@
+ # linked against when the shared library will be used.
+ static-only-routines = atexit at_quick_exit
+
+-test-srcs := tst-fmtmsg
+-tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
++test-srcs-$(OPTION_EGLIBC_FMTMSG) := tst-fmtmsg
++tests := tst-strtol tst-strtod testrand testsort testdiv \
+ test-canon test-canon2 tst-strtoll tst-environ \
+ tst-xpg-basename tst-random tst-random2 tst-bsearch \
+ tst-limits tst-rand48 bug-strtod tst-setcontext \
+- test-a64l tst-qsort tst-system testmb2 bug-strtod2 \
+- tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
+- tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \
+- tst-makecontext2 tst-strtod6 tst-unsetenv1 \
+- tst-makecontext3 bug-getcontext bug-fmtmsg1 \
++ test-a64l tst-qsort tst-system bug-strtod2 \
++ tst-atof1 tst-atof2 tst-strtod2 tst-rand48-2 \
++ tst-makecontext tst-qsort2 tst-makecontext2 tst-strtod6 \
++ tst-unsetenv1 tst-makecontext3 bug-getcontext bug-fmtmsg1 \
+ tst-secure-getenv tst-strtod-overflow tst-strtod-round \
+ tst-tininess tst-strtod-underflow tst-tls-atexit
+ tests-static := tst-secure-getenv
+-
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strtod3 tst-strtod4 tst-strtod5 testmb2
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += testmb
+ modules-names = tst-tls-atexit-lib
+
+ ifeq ($(build-shared),yes)
+@@ -115,8 +127,10 @@
+ tests-special += $(objpfx)isomac.out
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_EGLIBC_FMTMSG))
+ tests-special += $(objpfx)tst-fmtmsg.out
+ endif
++endif
+
+ include ../Rules
+
+Index: git/stdlib/strtod_l.c
+===================================================================
+--- git.orig/stdlib/strtod_l.c 2014-08-29 20:00:53.648070587 -0700
++++ git/stdlib/strtod_l.c 2014-08-29 20:01:15.236070587 -0700
+@@ -17,6 +17,7 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
+ #include <xlocale.h>
+
+ extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
+@@ -548,6 +549,7 @@
+ /* Used in several places. */
+ int cnt;
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ struct __locale_data *current = loc->__locales[LC_NUMERIC];
+
+ if (__glibc_unlikely (group))
+@@ -586,6 +588,17 @@
+ decimal_len = strlen (decimal);
+ assert (decimal_len > 0);
+ #endif
++#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
++ /* Hard-code values from the 'C' locale. */
++ grouping = NULL;
++#ifdef USE_WIDE_CHAR
++ decimal = L'.';
++# define decimal_len 1
++#else
++ decimal = ".";
++ decimal_len = 1;
++#endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+
+ /* Prepare number representation. */
+ exponent = 0;
+Index: git/stdlib/tst-strtod.c
+===================================================================
+--- git.orig/stdlib/tst-strtod.c 2014-08-29 20:00:53.700070587 -0700
++++ git/stdlib/tst-strtod.c 2014-08-29 20:01:15.236070587 -0700
+@@ -23,6 +23,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <math.h>
++#include <gnu/option-groups.h>
+
+ struct ltest
+ {
+@@ -176,7 +177,9 @@
+
+ status |= long_dbl ();
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ status |= locale_test ();
++#endif
+
+ return status ? EXIT_FAILURE : EXIT_SUCCESS;
+ }
+@@ -219,6 +222,7 @@
+ return 0;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Perform a few tests in a locale with thousands separators. */
+ static int
+ locale_test (void)
+@@ -276,3 +280,4 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+Index: git/streams/Makefile
+===================================================================
+--- git.orig/streams/Makefile 2014-08-29 20:00:53.712070587 -0700
++++ git/streams/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,11 +18,14 @@
+ #
+ # Makefile for streams.
+ #
++include ../option-groups.mak
++
+ subdir := streams
+
+ include ../Makeconfig
+
+ headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+-routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
++routines-$(OPTION_EGLIBC_STREAMS) \
++ += isastream getmsg getpmsg putmsg putpmsg fattach fdetach
+
+ include ../Rules
+Index: git/string/Makefile
+===================================================================
+--- git.orig/string/Makefile 2014-08-29 20:00:53.716070587 -0700
++++ git/string/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for string portion of library.
+ #
++include ../option-groups.mak
++
+ subdir := string
+
+ include ../Makeconfig
+@@ -39,10 +41,12 @@
+ $(addprefix argz-,append count create ctsep next \
+ delete extract insert stringify \
+ addsep replace) \
+- envz basename \
++ basename \
+ strcoll_l strxfrm_l string-inlines memrchr \
+ xpg-strerror strerror_l
+
++routines-$(OPTION_EGLIBC_ENVZ) += envz
++
+ strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
+ stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
+ strlen strncmp strncpy strpbrk strrchr strspn memmem \
+@@ -51,10 +55,12 @@
+ tests := tester inl-tester noinl-tester testcopy test-ffs \
+ tst-strlen stratcliff tst-svc tst-inlcall \
+ bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
+- tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
++ tst-strtok tst-strfry \
+ bug-strtok1 $(addprefix test-,$(strop-tests)) \
+- bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
+- tst-strtok_r
++ tst-strxfrm2 tst-endian tst-svc2 tst-strtok_r
++tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strxfrm bug-strcoll1
+
+ xtests = tst-strcoll-overflow
+
+Index: git/string/strcoll_l.c
+===================================================================
+--- git.orig/string/strcoll_l.c 2014-08-29 20:00:53.744070587 -0700
++++ git/string/strcoll_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -25,6 +25,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+ #ifndef STRING_TYPE
+ # define STRING_TYPE char
+@@ -472,7 +473,11 @@
+ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ {
+ struct __locale_data *current = l->__locales[LC_COLLATE];
++#if __OPTION_EGLIBC_LOCALE_CODE
+ uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
++#else
++ const uint_fast32_t nrules = 0;
++#endif
+ /* We don't assign the following values right away since it might be
+ unnecessary in case there are no rules. */
+ const unsigned char *rulesets;
+Index: git/string/strerror_l.c
+===================================================================
+--- git.orig/string/strerror_l.c 2014-08-29 20:00:53.744070587 -0700
++++ git/string/strerror_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -21,6 +21,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+
+ static __thread char *last_value;
+@@ -29,10 +30,14 @@
+ static const char *
+ translate (const char *str, locale_t loc)
+ {
++#if __OPTION_EGLIBC_LOCALE_CODE
+ locale_t oldloc = __uselocale (loc);
+ const char *res = _(str);
+ __uselocale (oldloc);
+ return res;
++#else
++ return str;
++#endif
+ }
+
+
+Index: git/string/strxfrm_l.c
+===================================================================
+--- git.orig/string/strxfrm_l.c 2014-08-29 20:00:53.748070587 -0700
++++ git/string/strxfrm_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -24,6 +24,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+ #ifndef STRING_TYPE
+ # define STRING_TYPE char
+@@ -85,7 +86,11 @@
+ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
+ {
+ struct __locale_data *current = l->__locales[LC_COLLATE];
++#if __OPTION_EGLIBC_LOCALE_CODE
+ uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
++#else
++ const uint_fast32_t nrules = 0;
++#endif
+ /* We don't assign the following values right away since it might be
+ unnecessary in case there are no rules. */
+ const unsigned char *rulesets;
+Index: git/string/test-strcmp.c
+===================================================================
+--- git.orig/string/test-strcmp.c 2014-08-29 20:00:53.752070587 -0700
++++ git/string/test-strcmp.c 2014-08-29 20:01:15.240070587 -0700
+@@ -329,34 +329,6 @@
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1 + i1, s2 + i2, exp_result);
+ }
+-
+- /* Test cases where there are multiple zero bytes after the first. */
+-
+- for (size_t i = 0; i < 16 + 1; i++)
+- {
+- s1[i] = 0x00;
+- s2[i] = 0x00;
+- }
+-
+- for (size_t i = 0; i < 16; i++)
+- {
+- int exp_result;
+-
+- for (int val = 0x01; val < 0x100; val++)
+- {
+- for (size_t j = 0; j < i; j++)
+- {
+- s1[j] = val;
+- s2[j] = val;
+- }
+-
+- s2[i] = val;
+-
+- exp_result = SIMPLE_STRCMP (s1, s2);
+- FOR_EACH_IMPL (impl, 0)
+- check_result (impl, s1, s2, exp_result);
+- }
+- }
+ }
+
+
+Index: git/string/tst-strxfrm2.c
+===================================================================
+--- git.orig/string/tst-strxfrm2.c 2014-08-29 20:00:53.756070587 -0700
++++ git/string/tst-strxfrm2.c 2014-08-29 20:01:15.240070587 -0700
+@@ -1,6 +1,7 @@
+ #include <locale.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ static int
+ do_test (void)
+@@ -38,6 +39,7 @@
+ res = 1;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("setlocale failed");
+@@ -75,6 +77,7 @@
+ res = 1;
+ }
+ }
++#endif
+
+ return res;
+ }
+Index: git/string/tst-strxfrm.c
+===================================================================
+--- git.orig/string/tst-strxfrm.c 2014-08-29 20:00:53.756070587 -0700
++++ git/string/tst-strxfrm.c 2014-08-29 20:01:15.240070587 -0700
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+
+ char const string[] = "";
+@@ -64,8 +65,10 @@
+ int result = 0;
+
+ result |= test ("C");
++#if __OPTION_EGLIBC_LOCALE_CODE
+ result |= test ("en_US.ISO-8859-1");
+ result |= test ("de_DE.UTF-8");
++#endif
+
+ return result;
+ }
+Index: git/sunrpc/Makefile
+===================================================================
+--- git.orig/sunrpc/Makefile 2014-08-29 20:00:53.760070587 -0700
++++ git/sunrpc/Makefile 2014-08-29 20:01:15.240070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for sunrpc portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := sunrpc
+
+ include ../Makeconfig
+@@ -55,7 +57,6 @@
+ headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+ headers = rpc/netdb.h
+-install-others = $(inst_sysconfdir)/rpc
+ generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
+ generated-dirs += rpcsvc
+@@ -65,18 +66,28 @@
+ endif
+
+ ifeq ($(build-shared),yes)
+-need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
++need-export-routines-$(OPTION_EGLIBC_SUNRPC) += \
++ auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
+ clnt_udp get_myaddr key_call netname pm_getport \
+- rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \
++ rpc_thread svc svc_tcp svc_udp xdr_array xdr \
+ xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \
+ svc_run
+
+-routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
++need-export-routines-y += xcrypt
++
++need-export-routines := $(need-export-routines-y)
++
++routines-$(OPTION_EGLIBC_SUNRPC) \
++ += auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
+ rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \
+ pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \
+ svc_simple xdr_float xdr_rec publickey authdes_prot \
+- des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
+- clnt_unix svc_unix create_xid $(need-export-routines)
++ key_prot openchild rtime svcauth_des \
++ clnt_unix svc_unix create_xid
++
++# xdecrypt is also used by nss/nss_files/files-key.c.
++routines-y += des_crypt des_impl des_soft $(need-export-routines)
++
+ ifneq ($(link-obsolete-rpc),yes)
+ # We only add the RPC for compatibility to libc.so.
+ shared-only-routines = $(routines)
+@@ -85,25 +96,28 @@
+
+ # We do not build rpcinfo anymore. It is not needed for a bootstrap
+ # and not wanted on complete systems.
+-# others := rpcinfo
+-# install-sbin := rpcinfo
+-install-bin := rpcgen
++# others-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
++# install-sbin-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
++install-bin-$(OPTION_EGLIBC_SUNRPC) += rpcgen
+ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
+ rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \
+ rpc_tblout.o rpc_sample.o
+-extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
+-others += rpcgen
++extra-objs-$(OPTION_EGLIBC_SUNRPC) = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
++others-$(OPTION_EGLIBC_SUNRPC) += rpcgen
++
++install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc
+
+-tests = tst-xdrmem tst-xdrmem2
+-xtests := tst-getmyaddr
++tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2
++xtests-$(OPTION_EGLIBC_SUNRPC) := tst-getmyaddr
+
+ ifeq ($(have-thread-library),yes)
+-xtests += thrsvc
++xtests-$(OPTION_EGLIBC_SUNRPC) += thrsvc
+ endif
+
+ headers += $(rpcsvc:%.x=rpcsvc/%.h)
+-extra-libs := librpcsvc
+-extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
++extra-libs-$(OPTION_EGLIBC_SUNRPC) += librpcsvc
++# Make it in `others' pass, not `lib' pass.
++extra-libs-others-y += $(extra-libs-y)
+ librpcsvc-routines = $(rpcsvc:%.x=x%)
+ librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
+ omit-deps = $(librpcsvc-routines)
+Index: git/sysdeps/generic/ldsodefs.h
+===================================================================
+--- git.orig/sysdeps/generic/ldsodefs.h 2014-08-29 20:00:53.904070587 -0700
++++ git/sysdeps/generic/ldsodefs.h 2014-08-29 20:01:15.240070587 -0700
+@@ -425,6 +425,12 @@
+ # undef __rtld_global_attribute__
+ #endif
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
++# define GLRO_dl_debug_mask GLRO(dl_debug_mask)
++#else
++# define GLRO_dl_debug_mask 0
++#endif
++
+ #ifndef SHARED
+ # define GLRO(name) _##name
+ #else
+@@ -437,8 +443,10 @@
+ {
+ #endif
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* If nonzero the appropriate debug information is printed. */
+ EXTERN int _dl_debug_mask;
++#endif
+ #define DL_DEBUG_LIBS (1 << 0)
+ #define DL_DEBUG_IMPCALLS (1 << 1)
+ #define DL_DEBUG_BINDINGS (1 << 2)
+Index: git/sysdeps/gnu/Makefile
+===================================================================
+--- git.orig/sysdeps/gnu/Makefile 2014-08-29 20:00:53.924070587 -0700
++++ git/sysdeps/gnu/Makefile 2014-08-29 20:01:15.240070587 -0700
+@@ -57,7 +57,8 @@
+ endif
+
+ ifeq ($(subdir),login)
+-sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
++sysdep_routines-$(OPTION_EGLIBC_UTMPX) \
++ += setutxent getutxent endutxent getutxid getutxline \
+ pututxline utmpxname updwtmpx getutmpx getutmp
+
+ sysdep_headers += utmpx.h bits/utmpx.h
+Index: git/sysdeps/ieee754/ldbl-opt/Makefile
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:00:54.452070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -11,19 +11,18 @@
+ routines += math_ldbl_opt nldbl-compat
+
+ extra-libs += libnldbl
+-libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
++libnldbl-calls = asprintf dprintf fprintf fscanf iovfscanf \
+ obstack_printf obstack_vprintf printf scanf snprintf \
+- sprintf sscanf swprintf swscanf vasprintf vdprintf vfprintf \
+- vfscanf vfwprintf vfwscanf vprintf vscanf vsnprintf \
+- vsprintf vsscanf vswprintf vswscanf vwprintf vwscanf \
+- wprintf wscanf printf_fp printf_size \
+- fprintf_chk fwprintf_chk printf_chk snprintf_chk sprintf_chk \
+- swprintf_chk vfprintf_chk vfwprintf_chk vprintf_chk \
+- vsnprintf_chk vsprintf_chk vswprintf_chk vwprintf_chk \
+- wprintf_chk asprintf_chk vasprintf_chk dprintf_chk \
++ sprintf sscanf vasprintf vdprintf vfprintf \
++ vfscanf vprintf vscanf vsnprintf \
++ vsprintf vsscanf \
++ printf_fp printf_size \
++ fprintf_chk printf_chk snprintf_chk sprintf_chk \
++ vfprintf_chk vprintf_chk \
++ vsnprintf_chk vsprintf_chk \
++ asprintf_chk vasprintf_chk dprintf_chk \
+ vdprintf_chk obstack_printf_chk obstack_vprintf_chk \
+ syslog syslog_chk vsyslog vsyslog_chk \
+- strfmon strfmon_l \
+ strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
+ qecvt qfcvt qgcvt qecvt_r qfcvt_r \
+ isinf isnan finite signbit scalb log2 lgamma_r ceil \
+@@ -38,9 +37,15 @@
+ casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
+ cabs carg cimag creal clog10 \
+ isoc99_scanf isoc99_fscanf isoc99_sscanf \
+- isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
++ isoc99_vscanf isoc99_vfscanf isoc99_vsscanf
++libnldbl-calls-$(OPTION_EGLIBC_LOCALE_CODE) += strfmon strfmon_l
++libnldbl-calls-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += fwprintf fwscanf \
++ swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
++ vwprintf vwscanf wprintf wscanf fwprintf_chk swprintf_chk \
++ vfwprintf_chk vswprintf_chk vwprintf_chk wprintf_chk \
+ isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
+ isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf
++libnldbl-calls += $(libnldbl-calls-y)
+ libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
+ libnldbl-inhibit-o = $(object-suffixes)
+ libnldbl-static-only-routines = $(libnldbl-routines)
+Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:00:54.468070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:01:15.244070587 -0700
+@@ -26,6 +26,7 @@
+ #include <locale/localeinfo.h>
+ #include <sys/syslog.h>
+ #include <bits/libc-lock.h>
++#include <gnu/option-groups.h>
+
+ #include "nldbl-compat.h"
+
+@@ -33,20 +34,14 @@
+ libc_hidden_proto (__nldbl_vsscanf)
+ libc_hidden_proto (__nldbl_vsprintf)
+ libc_hidden_proto (__nldbl_vfscanf)
+-libc_hidden_proto (__nldbl_vfwscanf)
+ libc_hidden_proto (__nldbl_vdprintf)
+-libc_hidden_proto (__nldbl_vswscanf)
+-libc_hidden_proto (__nldbl_vfwprintf)
+-libc_hidden_proto (__nldbl_vswprintf)
+ libc_hidden_proto (__nldbl_vsnprintf)
+ libc_hidden_proto (__nldbl_vasprintf)
+ libc_hidden_proto (__nldbl_obstack_vprintf)
+-libc_hidden_proto (__nldbl___vfwprintf_chk)
+ libc_hidden_proto (__nldbl___vsnprintf_chk)
+ libc_hidden_proto (__nldbl___vfprintf_chk)
+ libc_hidden_proto (__nldbl___vsyslog_chk)
+ libc_hidden_proto (__nldbl___vsprintf_chk)
+-libc_hidden_proto (__nldbl___vswprintf_chk)
+ libc_hidden_proto (__nldbl___vasprintf_chk)
+ libc_hidden_proto (__nldbl___vdprintf_chk)
+ libc_hidden_proto (__nldbl___obstack_vprintf_chk)
+@@ -54,8 +49,17 @@
+ libc_hidden_proto (__nldbl___vstrfmon_l)
+ libc_hidden_proto (__nldbl___isoc99_vsscanf)
+ libc_hidden_proto (__nldbl___isoc99_vfscanf)
++
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++libc_hidden_proto (__nldbl_vfwscanf)
++libc_hidden_proto (__nldbl_vswscanf)
++libc_hidden_proto (__nldbl_vfwprintf)
++libc_hidden_proto (__nldbl_vswprintf)
++libc_hidden_proto (__nldbl___vfwprintf_chk)
++libc_hidden_proto (__nldbl___vswprintf_chk)
+ libc_hidden_proto (__nldbl___isoc99_vswscanf)
+ libc_hidden_proto (__nldbl___isoc99_vfwscanf)
++#endif
+
+ static void
+ __nldbl_cleanup (void *arg)
+@@ -117,6 +121,7 @@
+ }
+ weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
+@@ -130,6 +135,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -226,6 +232,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
+@@ -239,6 +246,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section weak_function
+@@ -264,6 +272,7 @@
+ }
+ libc_hidden_def (__nldbl_vdprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -275,6 +284,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl_vfwprintf)
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -297,6 +307,7 @@
+ libc_hidden_def (__nldbl_vsnprintf)
+ weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
+@@ -330,6 +341,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -419,6 +431,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -491,6 +504,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -506,6 +520,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
+@@ -519,6 +534,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -563,6 +579,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
+@@ -577,6 +594,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -590,6 +608,7 @@
+ }
+ libc_hidden_def (__nldbl___vfprintf_chk)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
+@@ -601,6 +620,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl___vfwprintf_chk)
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -635,6 +655,7 @@
+ }
+ libc_hidden_def (__nldbl___vsprintf_chk)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
+@@ -668,6 +689,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -775,6 +797,7 @@
+ return ___printf_fp (fp, &info_no_ldbl, args);
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ ssize_t
+ attribute_compat_text_section
+ __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
+@@ -829,6 +852,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl___vstrfmon_l)
++#endif
+
+ void
+ attribute_compat_text_section
+@@ -941,6 +965,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -1014,6 +1039,7 @@
+
+ return done;
+ }
++#endif
+
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+ compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
+@@ -1057,6 +1083,7 @@
+ compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
+ #endif
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
++# if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
+@@ -1069,6 +1096,7 @@
+ compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2);
++# endif
+ #endif
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
+ compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3);
+Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:00:54.468070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:01:15.244070587 -0700
+@@ -30,6 +30,7 @@
+ #include <math.h>
+ #include <monetary.h>
+ #include <sys/syslog.h>
++#include <gnu/option-groups.h>
+
+
+ /* Declare the __nldbl_NAME function the wrappers call that's in libc.so. */
+@@ -37,19 +38,15 @@
+
+ NLDBL_DECL (_IO_vfscanf);
+ NLDBL_DECL (vfscanf);
+-NLDBL_DECL (vfwscanf);
+ NLDBL_DECL (obstack_vprintf);
+ NLDBL_DECL (vasprintf);
+ NLDBL_DECL (dprintf);
+ NLDBL_DECL (vdprintf);
+ NLDBL_DECL (fprintf);
+ NLDBL_DECL (vfprintf);
+-NLDBL_DECL (vfwprintf);
+ NLDBL_DECL (vsnprintf);
+ NLDBL_DECL (vsprintf);
+ NLDBL_DECL (vsscanf);
+-NLDBL_DECL (vswprintf);
+-NLDBL_DECL (vswscanf);
+ NLDBL_DECL (__asprintf);
+ NLDBL_DECL (asprintf);
+ NLDBL_DECL (__printf_fp);
+@@ -66,12 +63,18 @@
+ NLDBL_DECL (__isoc99_vscanf);
+ NLDBL_DECL (__isoc99_vfscanf);
+ NLDBL_DECL (__isoc99_vsscanf);
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++NLDBL_DECL (vfwscanf);
++NLDBL_DECL (vfwprintf);
++NLDBL_DECL (vswprintf);
++NLDBL_DECL (vswscanf);
+ NLDBL_DECL (__isoc99_wscanf);
+ NLDBL_DECL (__isoc99_fwscanf);
+ NLDBL_DECL (__isoc99_swscanf);
+ NLDBL_DECL (__isoc99_vwscanf);
+ NLDBL_DECL (__isoc99_vfwscanf);
+ NLDBL_DECL (__isoc99_vswscanf);
++#endif
+
+ /* This one does not exist in the normal interface, only
+ __nldbl___vstrfmon really exists. */
+@@ -82,22 +85,23 @@
+ since we don't compile with _FORTIFY_SOURCE. */
+ extern int __nldbl___vfprintf_chk (FILE *__restrict, int,
+ const char *__restrict, _G_va_list);
+-extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
+- const wchar_t *__restrict, __gnuc_va_list);
+ extern int __nldbl___vsprintf_chk (char *__restrict, int, size_t,
+ const char *__restrict, _G_va_list) __THROW;
+ extern int __nldbl___vsnprintf_chk (char *__restrict, size_t, int, size_t,
+ const char *__restrict, _G_va_list)
+ __THROW;
+-extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
+- const wchar_t *__restrict, __gnuc_va_list)
+- __THROW;
+ extern int __nldbl___vasprintf_chk (char **, int, const char *, _G_va_list)
+ __THROW;
+ extern int __nldbl___vdprintf_chk (int, int, const char *, _G_va_list);
+ extern int __nldbl___obstack_vprintf_chk (struct obstack *, int, const char *,
+ _G_va_list) __THROW;
+ extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
+-
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
++ const wchar_t *__restrict, __gnuc_va_list);
++extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
++ const wchar_t *__restrict, __gnuc_va_list)
++ __THROW;
++#endif
+
+ #endif /* __NLDBL_COMPAT_H */
+Index: git/sysdeps/unix/sysv/linux/gethostid.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:00:58.840070587 -0700
++++ git/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:01:15.244070587 -0700
+@@ -21,6 +21,7 @@
+ #include <unistd.h>
+ #include <netdb.h>
+ #include <not-cancel.h>
++#include <gnu/option-groups.h>
+
+ #define HOSTIDFILE "/etc/hostid"
+
+@@ -89,6 +90,7 @@
+ return id;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* Getting from the file was not successful. An intelligent guess for
+ a unique number of a host is its IP address. Return this. */
+ if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
+@@ -115,5 +117,9 @@
+ /* For the return value to be not exactly the IP address we do some
+ bit fiddling. */
+ return (int32_t) (in.s_addr << 16 | in.s_addr >> 16);
++#else
++ /* Return an arbitrary value. */
++ return 0;
++#endif
+ }
+ #endif
+Index: git/sysdeps/unix/sysv/linux/libc_fatal.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:00:58.980070587 -0700
++++ git/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:01:15.244070587 -0700
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #include <sys/mman.h>
+ #include <sys/uio.h>
++#include <gnu/option-groups.h>
+
+ static bool
+ writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
+@@ -40,6 +41,7 @@
+ static void
+ backtrace_and_maps (int do_abort, bool written, int fd)
+ {
++#if __OPTION_EGLIBC_BACKTRACE
+ if (do_abort > 1 && written)
+ {
+ void *addrs[64];
+@@ -62,6 +64,7 @@
+ close_not_cancel_no_status (fd2);
+ }
+ }
++#endif /* __OPTION_EGLIBC_BACKTRACE */
+ }
+ #define BEFORE_ABORT backtrace_and_maps
+
+Index: git/time/Makefile
+===================================================================
+--- git.orig/time/Makefile 2014-08-29 20:00:59.504070587 -0700
++++ git/time/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for time routines
+ #
++include ../option-groups.mak
++
+ subdir := time
+
+ include ../Makeconfig
+@@ -30,14 +32,20 @@
+ tzfile getitimer setitimer \
+ stime dysize timegm ftime \
+ getdate strptime strptime_l \
+- strftime wcsftime strftime_l wcsftime_l \
++ strftime strftime_l \
+ timespec_get
+-aux := era alt_digit lc-time-cleanup
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcsftime wcsftime_l
++aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup
+
+-tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
+- tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
++tests := test_time clocktest tst-posixtz \
++ tst-getdate tst-mktime tst-mktime2 tst-strftime \
+ tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
+ tst-strptime3 bug-getdate1 tst-strptime-whitespace
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strptime tst-ftime_l
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += tst_wcsftime
+
+ include ../Rules
+
+Index: git/time/strftime_l.c
+===================================================================
+--- git.orig/time/strftime_l.c 2014-08-29 20:00:59.528070587 -0700
++++ git/time/strftime_l.c 2014-08-29 20:01:15.244070587 -0700
+@@ -35,6 +35,10 @@
+ # include "../locale/localeinfo.h"
+ #endif
+
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined emacs && !defined HAVE_BCOPY
+ # define HAVE_MEMCPY 1
+ #endif
+@@ -882,7 +886,7 @@
+ case L_('C'):
+ if (modifier == L_('E'))
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+@@ -955,7 +959,7 @@
+
+ if (modifier == L_('O') && 0 <= number_value)
+ {
+-#ifdef _NL_CURRENT
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
+ /* Get the locale specific alternate representation of
+ the number NUMBER_VALUE. If none exist NULL is returned. */
+ const CHAR_T *cp = nl_get_alt_digit (number_value
+@@ -1260,7 +1264,7 @@
+ case L_('Y'):
+ if (modifier == 'E')
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+@@ -1285,7 +1289,7 @@
+ case L_('y'):
+ if (modifier == L_('E'))
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+Index: git/time/strptime_l.c
+===================================================================
+--- git.orig/time/strptime_l.c 2014-08-29 20:00:59.528070587 -0700
++++ git/time/strptime_l.c 2014-08-29 20:01:15.244070587 -0700
+@@ -29,6 +29,7 @@
+
+ #ifdef _LIBC
+ # define HAVE_LOCALTIME_R 0
++# include <gnu/option-groups.h>
+ # include "../locale/localeinfo.h"
+ #endif
+
+@@ -84,7 +85,7 @@
+ if (val < from || val > to) \
+ return NULL; \
+ } while (0)
+-#ifdef _NL_CURRENT
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
+ # define get_alt_number(from, to, n) \
+ ({ \
+ __label__ do_normal; \
+@@ -820,6 +821,7 @@
+ s.want_xday = 1;
+ break;
+ case 'C':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ if (s.era_cnt >= 0)
+@@ -856,10 +858,12 @@
+
+ s.decided = raw;
+ }
++#endif
+ /* The C locale has no era information, so use the
+ normal representation. */
+ goto match_century;
+ case 'y':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ get_number(0, 9999, 4);
+@@ -918,9 +922,10 @@
+
+ s.decided = raw;
+ }
+-
++#endif
+ goto match_year_in_century;
+ case 'Y':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ num_eras = _NL_CURRENT_WORD (LC_TIME,
+@@ -948,6 +953,7 @@
+
+ s.decided = raw;
+ }
++#endif
+ get_number (0, 9999, 4);
+ tm->tm_year = val - 1900;
+ s.want_century = 0;
+@@ -1118,6 +1124,7 @@
+ tm->tm_year = (s.century - 19) * 100;
+ }
+
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.era_cnt != -1)
+ {
+ era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG);
+@@ -1132,6 +1139,7 @@
+ tm->tm_year = era->start_date[0];
+ }
+ else
++#endif
+ if (s.want_era)
+ {
+ /* No era found but we have seen an E modifier. Rectify some
+Index: git/timezone/Makefile
+===================================================================
+--- git.orig/timezone/Makefile 2014-08-29 20:01:14.044070587 -0700
++++ git/timezone/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -115,7 +115,7 @@
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+ sed -e 's|/bin/bash|/bin/sh|' \
+- -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
++ -e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
+ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+ -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
+Index: git/wcsmbs/Makefile
+===================================================================
+--- git.orig/wcsmbs/Makefile 2014-08-29 20:00:59.548070587 -0700
++++ git/wcsmbs/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -18,15 +18,21 @@
+ #
+ # Sub-makefile for wcsmbs portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := wcsmbs
+
+ include ../Makeconfig
+
+ headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
+
+-routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
++# These functions are used by printf_fp.c, even in the plain case; see
++# comments there for OPTION_EGLIBC_LOCALE_CODE.
++routines := wmemcpy wmemset
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
+ wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
+- wmemcmp wmemcpy wmemmove wmemset wcpcpy wcpncpy wmempcpy \
++ wmemcmp wmemmove wcpcpy wcpncpy wmempcpy \
+ btowc wctob mbsinit \
+ mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \
+ mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \
+@@ -38,14 +44,19 @@
+ wcscoll_l wcsxfrm_l \
+ wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
+ wcsmbsload mbsrtowcs_l \
+- isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
+ isoc99_swscanf isoc99_vswscanf \
+ mbrtoc16 c16rtomb
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf
+
+ strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
+-tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
+- tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
+- tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
++tests := tst-wchar-h
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \
++ tst-wcpncpy tst-mbsrtowcs \
++ wcsatcliff $(addprefix test-,$(strop-tests))
+ tests-ifunc := $(strop-tests:%=test-%-ifunc)
+ tests += $(tests-ifunc)
+
+Index: git/wcsmbs/wcsmbsload.c
+===================================================================
+--- git.orig/wcsmbs/wcsmbsload.c 2014-08-29 20:00:59.580070587 -0700
++++ git/wcsmbs/wcsmbsload.c 2014-08-29 20:01:15.248070587 -0700
+@@ -21,6 +21,7 @@
+ #include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ #include <locale/localeinfo.h>
+ #include <wcsmbsload.h>
+@@ -143,6 +144,7 @@
+ })
+
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Some of the functions here must not be used while setlocale is called. */
+ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
+
+@@ -211,6 +213,17 @@
+
+ __libc_rwlock_unlock (__libc_setlocale_lock);
+ }
++#else
++void
++internal_function
++__wcsmbs_load_conv (struct __locale_data *new_category)
++{
++ /* When OPTION_EGLIBC_LOCALE_CODE is disabled, we should never reach
++ this point: there is no way to change locales, so every locale
++ passed to get_gconv_fcts should be _nl_C_LC_CTYPE. */
++ abort ();
++}
++#endif
+
+
+ /* Clone the current conversion function set. */
+Index: git/wctype/Makefile
+===================================================================
+--- git.orig/wctype/Makefile 2014-08-29 20:00:59.584070587 -0700
++++ git/wctype/Makefile 2014-08-29 20:01:15.248070587 -0700
+@@ -18,14 +18,20 @@
+ #
+ # Sub-makefile for wctype portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := wctype
+
+ include ../Makeconfig
+
+ headers := wctype.h
+-routines := wcfuncs wctype iswctype wctrans towctrans \
+- wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l
++routines := wctrans towctrans towctrans_l
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcfuncs wctype iswctype \
++ wcfuncs_l wctype_l iswctype_l wctrans_l
+
+-tests := test_wctype test_wcfuncs bug-wctypeh
++tests :=
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += test_wctype test_wcfuncs bug-wctypeh
+
+ include ../Rules
+Index: git/sysdeps/nptl/Makefile
+===================================================================
+--- git.orig/sysdeps/nptl/Makefile 2014-08-29 20:00:58.036070587 -0700
++++ git/sysdeps/nptl/Makefile 2014-08-29 20:01:15.248070587 -0700
+@@ -18,6 +18,9 @@
+
+ ifeq ($(subdir),nptl)
+ libpthread-sysdep_routines += errno-loc
++ifeq ($(OPTION_EGLIBC_BIG_MACROS),n)
++sysdep_routines += small-macros-fns
++endif
+ endif
+
+ ifeq ($(subdir),rt)
+Index: git/sysdeps/nptl/bits/libc-lock.h
+===================================================================
+--- git.orig/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:00:58.036070587 -0700
++++ git/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:01:15.248070587 -0700
+@@ -24,6 +24,14 @@
+ #include <stddef.h>
+
+
++#ifdef _LIBC
++# include <lowlevellock.h>
++# include <tls.h>
++# include <pthread-functions.h>
++# include <errno.h> /* For EBUSY. */
++# include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */
++#endif
++
+ /* Mutex type. */
+ #if defined _LIBC || defined _IO_MTSAFE_IO
+ # if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC
+@@ -87,6 +95,14 @@
+
+ /* Lock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_lock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_lock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_lock_recursive(NAME) \
+ do { \
+ void *self = THREAD_SELF; \
+@@ -97,6 +113,10 @@
+ } \
+ ++(NAME).cnt; \
+ } while (0)
++# else
++# define __libc_lock_lock_recursive(NAME) \
++ __libc_lock_lock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_lock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0)
+@@ -104,6 +124,14 @@
+
+ /* Try to lock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern int __libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_trylock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_trylock_recursive(NAME) \
+ ({ \
+ int result = 0; \
+@@ -122,6 +150,10 @@
+ ++(NAME).cnt; \
+ result; \
+ })
++# else
++# define __libc_lock_trylock_recursive(NAME) \
++ __libc_lock_trylock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_trylock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
+@@ -129,6 +161,14 @@
+
+ /* Unlock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_unlock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ /* We do no error checking here. */
+ # define __libc_lock_unlock_recursive(NAME) \
+ do { \
+@@ -138,6 +178,10 @@
+ lll_unlock ((NAME).lock, LLL_PRIVATE); \
+ } \
+ } while (0)
++# else
++# define __libc_lock_unlock_recursive(NAME) \
++ __libc_lock_unlock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_unlock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0)
+Index: git/sysdeps/nptl/bits/libc-lockP.h
+===================================================================
+--- git.orig/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:00:58.044070587 -0700
++++ git/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:01:15.248070587 -0700
+@@ -33,6 +33,8 @@
+ #include <lowlevellock.h>
+ #include <tls.h>
+ #include <pthread-functions.h>
++#include <errno.h> /* For EBUSY. */
++#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */
+
+ /* Mutex type. */
+ #if defined NOT_IN_libc && !defined IS_IN_libpthread
+@@ -159,10 +161,22 @@
+
+ /* Lock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
+-# ifndef __libc_lock_lock
+-# define __libc_lock_lock(NAME) \
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_lock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_lock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
++# ifndef __libc_lock_lock
++# define __libc_lock_lock(NAME) \
+ ({ lll_lock (NAME, LLL_PRIVATE); 0; })
+-# endif
++# endif
++# else
++# define __libc_lock_lock(NAME) \
++ __libc_lock_lock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # undef __libc_lock_lock
+ # define __libc_lock_lock(NAME) \
+@@ -175,10 +189,22 @@
+
+ /* Try to lock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
+-# ifndef __libc_lock_trylock
+-# define __libc_lock_trylock(NAME) \
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern int __libc_lock_trylock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_trylock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
++# ifndef __libc_lock_trylock
++# define __libc_lock_trylock(NAME) \
+ lll_trylock (NAME)
+-# endif
++# endif
++# else
++# define __libc_lock_trylock(NAME) \
++ __libc_lock_trylock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # undef __libc_lock_trylock
+ # define __libc_lock_trylock(NAME) \
+@@ -194,8 +220,20 @@
+
+ /* Unlock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_unlock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_unlock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_unlock(NAME) \
+ lll_unlock (NAME, LLL_PRIVATE)
++# else
++# define __libc_lock_unlock(NAME) \
++ __libc_lock_unlock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_unlock(NAME) \
+ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0)
+Index: git/sysdeps/nptl/small-macros-fns.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/nptl/small-macros-fns.c 2014-08-29 20:01:15.248070587 -0700
+@@ -0,0 +1,72 @@
++/* EGLIBC: function wrappers for big macros.
++ Copyright (C) 2009 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#include <gnu/option-groups.h>
++
++/* Handle macros from ./bits/libc-lock.h. */
++#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++
++/* Get the macros for function bodies through a back door. */
++# undef __OPTION_EGLIBC_BIG_MACROS
++# define __OPTION_EGLIBC_BIG_MACROS 2
++# include <bits/libc-lock.h>
++
++void
++__libc_lock_lock_fn (__libc_lock_t *name)
++{
++ __libc_lock_lock (*name);
++}
++libc_hidden_def (__libc_lock_lock_fn);
++
++void
++__libc_lock_lock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ __libc_lock_lock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_lock_recursive_fn);
++
++int
++__libc_lock_trylock_fn (__libc_lock_t *name)
++{
++ return __libc_lock_trylock (*name);
++}
++libc_hidden_def (__libc_lock_trylock_fn);
++
++int
++__libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ return __libc_lock_trylock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_trylock_recursive_fn);
++
++void
++__libc_lock_unlock_fn (__libc_lock_t *name)
++{
++ __libc_lock_unlock (*name);
++}
++libc_hidden_def (__libc_lock_unlock_fn);
++
++void
++__libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ __libc_lock_unlock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_unlock_recursive_fn);
++
++#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/
+Index: git/crypt/crypt_common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/crypt/crypt_common.c 2014-08-29 20:01:15.248070587 -0700
+@@ -0,0 +1,42 @@
++/*
++ * crypt: crypt(3) implementation
++ *
++ * Copyright (C) 1991-2014 Free Software Foundation, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; see the file COPYING.LIB. If not,
++ * see <http://www.gnu.org/licenses/>.
++ *
++ * General Support routines
++ *
++ */
++
++#include "crypt-private.h"
++
++/* Table with characters for base64 transformation. */
++static const char b64t[64] =
++"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
++
++void
++__b64_from_24bit (char **cp, int *buflen,
++ unsigned int b2, unsigned int b1, unsigned int b0,
++ int n)
++{
++ unsigned int w = (b2 << 16) | (b1 << 8) | b0;
++ while (n-- > 0 && (*buflen) > 0)
++ {
++ *(*cp)++ = b64t[w & 0x3f];
++ --(*buflen);
++ w >>= 6;
++ }
++}
+Index: git/crypt/crypt_util.c
+===================================================================
+--- git.orig/crypt/crypt_util.c 2014-08-29 20:00:43.028070587 -0700
++++ git/crypt/crypt_util.c 2014-08-29 20:01:15.248070587 -0700
+@@ -242,10 +242,6 @@
+ */
+ static ufc_long efp[16][64][2];
+
+-/* Table with characters for base64 transformation. */
+-static const char b64t[64] =
+-"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+-
+ /*
+ * For use by the old, non-reentrant routines
+ * (crypt/encrypt/setkey)
+@@ -949,17 +945,3 @@
+ {
+ __setkey_r(__key, &_ufc_foobar);
+ }
+-
+-void
+-__b64_from_24bit (char **cp, int *buflen,
+- unsigned int b2, unsigned int b1, unsigned int b0,
+- int n)
+-{
+- unsigned int w = (b2 << 16) | (b1 << 8) | b0;
+- while (n-- > 0 && (*buflen) > 0)
+- {
+- *(*cp)++ = b64t[w & 0x3f];
+- --(*buflen);
+- w >>= 6;
+- }
+-}
+Index: git/sysdeps/arm/Makefile
+===================================================================
+--- git.orig/sysdeps/arm/Makefile 2014-08-29 20:29:37.000000000 -0700
++++ git/sysdeps/arm/Makefile 2014-08-29 20:31:09.904070587 -0700
+@@ -37,10 +37,13 @@
+ # get offset to rtld_global._dl_hwcap
+ gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
+ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
+-aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
++aeabi_routines = aeabi_assert aeabi_errno_addr \
+ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+ aeabi_memmove aeabi_memset \
+ aeabi_read_tp libc-aeabi_read_tp
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++aeabi_routines += aeabi_localeconv
++endif
+
+ sysdep_routines += $(aeabi_constants) $(aeabi_routines)
+ static-only-routines += $(aeabi_constants) aeabi_read_tp
diff --git a/meta/recipes-core/glibc/glibc/eglibc.patch b/meta/recipes-core/glibc/glibc/eglibc.patch
new file mode 100644
index 0000000000..fdfabc3a06
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc.patch
@@ -0,0 +1,602 @@
+Instruction documents from eglibc
+
+Upstream-Status: Pending
+
+Index: git/EGLIBC.cross-building
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.cross-building 2014-08-27 07:27:25.580070587 +0000
+@@ -0,0 +1,383 @@
++ -*- mode: text -*-
++
++ Cross-Compiling EGLIBC
++ Jim Blandy <jimb@codesourcery.com>
++
++
++Introduction
++
++Most GNU tools have a simple build procedure: you run their
++'configure' script, and then you run 'make'. Unfortunately, the
++process of cross-compiling the GNU C library is quite a bit more
++involved:
++
++1) Build a cross-compiler, with certain facilities disabled.
++
++2) Configure the C library using the compiler you built in step 1).
++ Build a few of the C run-time object files, but not the rest of the
++ library. Install the library's header files and the run-time
++ object files, and create a dummy libc.so.
++
++3) Build a second cross-compiler, using the header files and object
++ files you installed in step 2.
++
++4) Configure, build, and install a fresh C library, using the compiler
++ built in step 3.
++
++5) Build a third cross-compiler, based on the C library built in step 4.
++
++The reason for this complexity is that, although GCC and the GNU C
++library are distributed separately, they are not actually independent
++of each other: GCC requires the C library's headers and some object
++files to compile its own libraries, while the C library depends on
++GCC's libraries. EGLIBC includes features and bug fixes to the stock
++GNU C library that simplify this process, but the fundamental
++interdependency stands.
++
++In this document, we explain how to cross-compile an EGLIBC/GCC pair
++from source. Our intended audience is developers who are already
++familiar with the GNU toolchain and comfortable working with
++cross-development tools. While we do present a worked example to
++accompany the explanation, for clarity's sake we do not cover many of
++the options available to cross-toolchain users.
++
++
++Preparation
++
++EGLIBC requires recent versions of the GNU binutils, GCC, and the
++Linux kernel. The web page <http://www.eglibc.org/prerequisites>
++documents the current requirements, and lists patches needed for
++certain target architectures. As of this writing, these build
++instructions have been tested with binutils 2.22.51, GCC 4.6.2,
++and Linux 3.1.
++
++First, let's set some variables, to simplify later commands. We'll
++build EGLIBC and GCC for an ARM target, known to the Linux kernel
++as 'arm', and we'll do the build on an Intel x86_64 Linux box:
++
++ $ build=x86_64-pc-linux-gnu
++ $ host=$build
++ $ target=arm-none-linux-gnueabi
++ $ linux_arch=arm
++
++We're using the aforementioned versions of Binutils, GCC, and Linux:
++
++ $ binutilsv=binutils-2.22.51
++ $ gccv=gcc-4.6.2
++ $ linuxv=linux-3.1
++
++We're carrying out the entire process under '~/cross-build', which
++contains unpacked source trees for binutils, gcc, and linux kernel,
++along with EGLIBC svn trunk (which can be checked-out with
++'svn co http://www.eglibc.org/svn/trunk eglibc'):
++
++ $ top=$HOME/cross-build/$target
++ $ src=$HOME/cross-build/src
++ $ ls $src
++ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
++
++We're going to place our build directories in a subdirectory 'obj',
++we'll install the cross-development toolchain in 'tools', and we'll
++place our sysroot (containing files to be installed on the target
++system) in 'sysroot':
++
++ $ obj=$top/obj
++ $ tools=$top/tools
++ $ sysroot=$top/sysroot
++
++
++Binutils
++
++Configuring and building binutils for the target is straightforward:
++
++ $ mkdir -p $obj/binutils
++ $ cd $obj/binutils
++ $ $src/$binutilsv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot
++ $ make
++ $ make install
++
++
++The First GCC
++
++For our work, we need a cross-compiler targeting an ARM Linux
++system. However, that configuration includes the shared library
++'libgcc_s.so', which is compiled against the EGLIBC headers (which we
++haven't installed yet) and linked against 'libc.so' (which we haven't
++built yet).
++
++Fortunately, there are configuration options for GCC which tell it not
++to build 'libgcc_s.so'. The '--without-headers' option is supposed to
++take care of this, but its implementation is incomplete, so you must
++also configure with the '--with-newlib' option. While '--with-newlib'
++appears to mean "Use the Newlib C library", its effect is to tell the
++GCC build machinery, "Don't assume there is a C library available."
++
++We also need to disable some of the libraries that would normally be
++built along with GCC, and specify that only the compiler for the C
++language is needed.
++
++So, we create a build directory, configure, make, and install.
++
++ $ mkdir -p $obj/gcc1
++ $ cd $obj/gcc1
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --without-headers --with-newlib \
++ > --disable-shared --disable-threads --disable-libssp \
++ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
++ > --disable-decimal-float --disable-libffi \
++ > --enable-languages=c
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++
++Linux Kernel Headers
++
++To configure EGLIBC, we also need Linux kernel headers in place.
++Fortunately, the Linux makefiles have a target that installs them for
++us. Since the process does modify the source tree a bit, we make a
++copy first:
++
++ $ cp -r $src/$linuxv $obj/linux
++ $ cd $obj/linux
++
++Now we're ready to install the headers into the sysroot:
++
++ $ PATH=$tools/bin:$PATH \
++ > make headers_install \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++ > INSTALL_HDR_PATH=$sysroot/usr
++
++
++EGLIBC Headers and Preliminary Objects
++
++Using the cross-compiler we've just built, we can now configure EGLIBC
++well enough to install the headers and build the object files that the
++full cross-compiler will need:
++
++ $ mkdir -p $obj/eglibc-headers
++ $ cd $obj/eglibc-headers
++ $ BUILD_CC=gcc \
++ > CC=$tools/bin/$target-gcc \
++ > CXX=$tools/bin/$target-g++ \
++ > AR=$tools/bin/$target-ar \
++ > RANLIB=$tools/bin/$target-ranlib \
++ > $src/eglibc/libc/configure \
++ > --prefix=/usr \
++ > --with-headers=$sysroot/usr/include \
++ > --build=$build \
++ > --host=$target \
++ > --disable-profile --without-gd --without-cvs \
++ > --enable-add-ons=nptl,libidn,../ports
++
++The option '--prefix=/usr' may look strange, but you should never
++configure EGLIBC with a prefix other than '/usr': in various places,
++EGLIBC's build system checks whether the prefix is '/usr', and does
++special handling only if that is the case. Unless you use this
++prefix, you will get a sysroot that does not use the standard Linux
++directory layouts and cannot be used as a basis for the root
++filesystem on your target system compatibly with normal GLIBC
++installations.
++
++The '--with-headers' option tells EGLIBC where the Linux headers have
++been installed.
++
++The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
++for the listed glibc add-ons. Most notably the ports add-on (located
++just above the libc sources in the EGLIBC svn tree) is required to
++support ARM targets.
++
++We can now use the 'install-headers' makefile target to install the
++headers:
++
++ $ make install-headers install_root=$sysroot \
++ > install-bootstrap-headers=yes
++
++The 'install_root' variable indicates where the files should actually
++be installed; its value is treated as the parent of the '--prefix'
++directory we passed to the configure script, so the headers will go in
++'$sysroot/usr/include'. The 'install-bootstrap-headers' variable
++requests special handling for certain tricky header files.
++
++Next, there are a few object files needed to link shared libraries,
++which we build and install by hand:
++
++ $ mkdir -p $sysroot/usr/lib
++ $ make csu/subdir_lib
++ $ cp csu/crt1.o csu/crti.o csu/crtn.o $sysroot/usr/lib
++
++Finally, 'libgcc_s.so' requires a 'libc.so' to link against. However,
++since we will never actually execute its code, it doesn't matter what
++it contains. So, treating '/dev/null' as a C source file, we produce
++a dummy 'libc.so' in one step:
++
++ $ $tools/bin/$target-gcc -nostdlib -nostartfiles -shared -x c /dev/null \
++ > -o $sysroot/usr/lib/libc.so
++
++
++The Second GCC
++
++With the EGLIBC headers and selected object files installed, we can
++now build a GCC that is capable of compiling EGLIBC. We configure,
++build, and install the second GCC, again building only the C compiler,
++and avoiding libraries we won't use:
++
++ $ mkdir -p $obj/gcc2
++ $ cd $obj/gcc2
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot \
++ > --disable-libssp --disable-libgomp --disable-libmudflap \
++ > --disable-libffi --disable-libquadmath \
++ > --enable-languages=c
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++
++EGLIBC, Complete
++
++With the second compiler built and installed, we're now ready for the
++full EGLIBC build:
++
++ $ mkdir -p $obj/eglibc
++ $ cd $obj/eglibc
++ $ BUILD_CC=gcc \
++ > CC=$tools/bin/$target-gcc \
++ > CXX=$tools/bin/$target-g++ \
++ > AR=$tools/bin/$target-ar \
++ > RANLIB=$tools/bin/$target-ranlib \
++ > $src/eglibc/libc/configure \
++ > --prefix=/usr \
++ > --with-headers=$sysroot/usr/include \
++ > --with-kconfig=$obj/linux/scripts/kconfig \
++ > --build=$build \
++ > --host=$target \
++ > --disable-profile --without-gd --without-cvs \
++ > --enable-add-ons=nptl,libidn,../ports
++
++Note the additional '--with-kconfig' option. This tells EGLIBC where to
++find the host config tools used by the kernel 'make config' and 'make
++menuconfig'. These tools can be re-used by EGLIBC for its own 'make
++*config' support, which will create 'option-groups.config' for you.
++But first make sure those tools have been built by running some
++dummy 'make *config' calls in the kernel directory:
++
++ $ cd $obj/linux
++ $ PATH=$tools/bin:$PATH make config \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++ $ PATH=$tools/bin:$PATH make menuconfig \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++
++Now we can configure and build the full EGLIBC:
++
++ $ cd $obj/eglibc
++ $ PATH=$tools/bin:$PATH make defconfig
++ $ PATH=$tools/bin:$PATH make menuconfig
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install install_root=$sysroot
++
++At this point, we have a complete EGLIBC installation in '$sysroot',
++with header files, library files, and most of the C runtime startup
++files in place.
++
++
++The Third GCC
++
++Finally, we recompile GCC against this full installation, enabling
++whatever languages and libraries we would like to use:
++
++ $ mkdir -p $obj/gcc3
++ $ cd $obj/gcc3
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot \
++ > --enable-__cxa_atexit \
++ > --disable-libssp --disable-libgomp --disable-libmudflap \
++ > --enable-languages=c,c++
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++The '--enable-__cxa_atexit' option tells GCC what sort of C++
++destructor support to expect from the C library; it's required with
++EGLIBC.
++
++And since GCC's installation process isn't designed to help construct
++sysroot trees, we must manually copy certain libraries into place in
++the sysroot.
++
++ $ cp -d $tools/$target/lib/libgcc_s.so* $sysroot/lib
++ $ cp -d $tools/$target/lib/libstdc++.so* $sysroot/usr/lib
++
++
++Trying Things Out
++
++At this point, '$tools' contains a cross toolchain ready to use
++the EGLIBC installation in '$sysroot':
++
++ $ cat > hello.c <<EOF
++ > #include <stdio.h>
++ > int
++ > main (int argc, char **argv)
++ > {
++ > puts ("Hello, world!");
++ > return 0;
++ > }
++ > EOF
++ $ $tools/bin/$target-gcc -Wall hello.c -o hello
++ $ cat > c++-hello.cc <<EOF
++ > #include <iostream>
++ > int
++ > main (int argc, char **argv)
++ > {
++ > std::cout << "Hello, C++ world!" << std::endl;
++ > return 0;
++ > }
++ > EOF
++ $ $tools/bin/$target-g++ -Wall c++-hello.cc -o c++-hello
++
++
++We can use 'readelf' to verify that these are indeed executables for
++our target, using our dynamic linker:
++
++ $ $tools/bin/$target-readelf -hl hello
++ ELF Header:
++ ...
++ Type: EXEC (Executable file)
++ Machine: ARM
++
++ ...
++ Program Headers:
++ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
++ PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
++ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
++ [Requesting program interpreter: /lib/ld-linux.so.3]
++ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
++ ...
++
++Looking at the dynamic section of the installed 'libgcc_s.so', we see
++that the 'NEEDED' entry for the C library does include the '.6'
++suffix, indicating that was linked against our fully build EGLIBC, and
++not our dummy 'libc.so':
++
++ $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1
++ Dynamic section at offset 0x1083c contains 24 entries:
++ Tag Type Name/Value
++ 0x00000001 (NEEDED) Shared library: [libc.so.6]
++ 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
++ ...
++
++
++And on the target machine, we can run our programs:
++
++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \
++ > ./hello
++ Hello, world!
++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \
++ > ./c++-hello
++ Hello, C++ world!
+Index: git/EGLIBC.cross-testing
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.cross-testing 2014-08-27 07:24:41.532070587 +0000
+@@ -0,0 +1,205 @@
++ -*- mode: text -*-
++
++ Cross-Testing With EGLIBC
++ Jim Blandy <jimb@codesourcery.com>
++
++
++Introduction
++
++Developers writing software for embedded systems often use a desktop
++or other similarly capable computer for development, but need to run
++tests on the embedded system, or perhaps on a simulator. When
++configured for cross-compilation, the stock GNU C library simply
++disables running tests altogether: the command 'make tests' builds
++test programs, but does not run them. EGLIBC, however, provides
++facilities for compiling tests and generating data files on the build
++system, but running the test programs themselves on a remote system or
++simulator.
++
++
++Test environment requirements
++
++The test environment must meet certain conditions for EGLIBC's
++cross-testing facilities to work:
++
++- Shared filesystems. The 'build' system, on which you configure and
++ compile EGLIBC, and the 'host' system, on which you intend to run
++ EGLIBC, must share a filesystem containing the EGLIBC build and
++ source trees. Files must appear at the same paths on both systems.
++
++- Remote-shell like invocation. There must be a way to run a program
++ on the host system from the build system, passing it properly quoted
++ command-line arguments, setting environment variables, and
++ inheriting the caller's standard input and output.
++
++
++Usage
++
++To use EGLIBC's cross-testing support, provide values for the
++following Make variables when you invoke 'make':
++
++- cross-test-wrapper
++
++ This should be the name of the cross-testing wrapper command, along
++ with any arguments.
++
++- cross-localedef
++
++ This should be the name of a cross-capable localedef program, like
++ that included in the EGLIBC 'localedef' module, along with any
++ arguments needed.
++
++These are each explained in detail below.
++
++
++The Cross-Testing Wrapper
++
++To run test programs reliably, the stock GNU C library takes care to
++ensure that test programs use the newly compiled dynamic linker and
++shared libraries, and never the host system's installed libraries. To
++accomplish this, it runs the tests by explicitly invoking the dynamic
++linker from the build tree, passing it a list of build tree
++directories to search for shared libraries, followed by the name of
++the executable to run and its arguments.
++
++For example, where one might normally run a test program like this:
++
++ $ ./tst-foo arg1 arg2
++
++the GNU C library might run that program like this:
++
++ $ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++(where $objdir is the path to the top of the build tree, and the
++trailing backslash indicates a continuation of the command). In other
++words, each test program invocation is 'wrapped up' inside an explicit
++invocation of the dynamic linker, which must itself execute the test
++program, having loaded shared libraries from the appropriate
++directories.
++
++To support cross-testing, EGLIBC allows the developer to optionally
++set the 'cross-test-wrapper' Make variable to another wrapper command,
++to which it passes the entire dynamic linker invocation shown above as
++arguments. For example, if the developer supplies a wrapper of
++'my-wrapper hostname', then EGLIBC would run the test above as
++follows:
++
++ $ my-wrapper hostname \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++The 'my-wrapper' command is responsible for executing the command
++given on the host system.
++
++Since tests are run in varying directories, the wrapper should either
++be in your command search path, or 'cross-test-wrapper' should give an
++absolute path for the wrapper.
++
++The wrapper must meet several requirements:
++
++- It must preserve the current directory. As explained above, the
++ build directory tree must be visible on both the build and host
++ systems, at the same path. The test wrapper must ensure that the
++ current directory it inherits is also inherited by the dynamic
++ linker (and thus the test program itself).
++
++- It must preserve environment variables' values. Many EGLIBC tests
++ set environment variables for test runs; in native testing, it
++ invokes programs like this:
++
++ $ GCONV_PATH=$objdir/iconvdata \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++ With the cross-testing wrapper, that invocation becomes:
++
++ $ GCONV_PATH=$objdir/iconvdata \
++ my-wrapper hostname \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++ Here, 'my-wrapper' must ensure that the value it sees for
++ 'GCONV_PATH' will be seen by the dynamic linker, and thus 'tst-foo'
++ itself. (The wrapper supplied with GLIBC simply preserves the
++ values of *all* enviroment variables, with a fixed set of
++ exceptions.)
++
++ If your wrapper is a shell script, take care to correctly propagate
++ environment variables whose values contain spaces and shell
++ metacharacters.
++
++- It must pass the command's arguments, unmodified. The arguments
++ seen by the test program should be exactly those seen by the wrapper
++ (after whatever arguments are given to the wrapper itself). The
++ EGLIBC test framework performs all needed shell word splitting and
++ expansion (wildcard expansion, parameter substitution, and so on)
++ before invoking the wrapper; further expansion may break the tests.
++
++
++The 'cross-test-ssh.sh' script
++
++If you want to use 'ssh' (or something sufficiently similar) to run
++test programs on your host system, EGLIBC includes a shell script,
++'scripts/cross-test-ssh.sh', which you can use as your wrapper
++command. This script takes care of setting the test command's current
++directory, propagating environment variable values, and carrying
++command-line arguments, all across an 'ssh' connection. You may even
++supply an alternative to 'ssh' on the command line, if needed.
++
++For more details, pass 'cross-test-ssh.sh' the '--help' option.
++
++
++The Cross-Compiling Locale Definition Command
++
++Some EGLIBC tests rely on locales generated especially for the test
++process. In a native configuration, these tests simply run the
++'localedef' command built by the normal EGLIBC build process,
++'locale/localedef', to process and install their locales. However, in
++a cross-compiling configuration, this 'localedef' is built for the
++host system, not the build system, and since it requires quite a bit
++of memory to run (we have seen it fail on systems with 64MiB of
++memory), it may not be practical to run it on the host system.
++
++If set, EGLIBC uses the 'cross-localedef' Make variable as the command
++to run on the build system to process and install locales. The
++localedef program built from the EGLIBC 'localedef' module is
++suitable.
++
++The value of 'cross-localedef' may also include command-line arguments
++to be passed to the program; if you are using EGLIBC's 'localedef',
++you may include endianness and 'uint32_t' alignment arguments here.
++
++
++Example
++
++In developing EGLIBC's cross-testing facility, we invoked 'make' with
++the following script:
++
++ #!/bin/sh
++
++ srcdir=...
++ test_hostname=...
++ localedefdir=...
++ cross_gxx=...-g++
++
++ wrapper="$srcdir/scripts/cross-test-ssh.sh $test_hostname"
++ localedef="$localedefdir/localedef --little-endian --uint32-align=4"
++
++ make cross-test-wrapper="$wrapper" \
++ cross-localedef="$localedef" \
++ CXX="$cross_gxx" \
++ "$@"
++
++
++Other Cross-Testing Concerns
++
++Here are notes on some other issues which you may encounter in running
++the EGLIBC tests in a cross-compiling environment:
++
++- Some tests require a C++ cross-compiler; you should set the 'CXX'
++ Make variable to the name of an appropriate cross-compiler.
++
++- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we
++ simply place copies of these libraries in the top EGLIBC build
++ directory.
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
index e69de29bb2..e69de29bb2 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf
+++ b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch b/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch
index 25c43a9fe6..9ab9fdcf12 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch
+++ b/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch
@@ -10,11 +10,11 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: libc/localedata/locales/bo_CN
+Index: git/localedata/locales/bo_CN
===================================================================
---- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800
-+++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800
-@@ -145,7 +145,7 @@
+--- git.orig/localedata/locales/bo_CN 2014-08-29 10:35:22.464070587 -0700
++++ git/localedata/locales/bo_CN 2014-08-29 10:35:22.456070587 -0700
+@@ -146,7 +146,7 @@
LC_NAME
% FIXME
@@ -23,11 +23,11 @@ Index: libc/localedata/locales/bo_CN
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"
-Index: libc/localedata/locales/bo_IN
+Index: git/localedata/locales/bo_IN
===================================================================
---- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800
-+++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800
-@@ -70,7 +70,7 @@
+--- git.orig/localedata/locales/bo_IN 2014-08-29 10:35:22.464070587 -0700
++++ git/localedata/locales/bo_IN 2014-08-29 10:35:22.456070587 -0700
+@@ -71,7 +71,7 @@
LC_NAME
% FIXME
diff --git a/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch b/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch
new file mode 100644
index 0000000000..668e8bf678
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch
@@ -0,0 +1,29 @@
+sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir
+
+Upstream-Status:Pending
+Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
+
+Index: git/sysdeps/gnu/configure
+===================================================================
+--- git.orig/sysdeps/gnu/configure 2014-08-27 07:24:38.572070587 +0000
++++ git/sysdeps/gnu/configure 2014-08-27 07:24:41.308070587 +0000
+@@ -32,6 +32,6 @@
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
+- libc_cv_rootsbindir=/sbin
++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
+ ;;
+ esac
+Index: git/sysdeps/gnu/configure.ac
+===================================================================
+--- git.orig/sysdeps/gnu/configure.ac 2014-08-27 07:24:38.572070587 +0000
++++ git/sysdeps/gnu/configure.ac 2014-08-27 07:24:41.308070587 +0000
+@@ -21,6 +21,6 @@
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
+- libc_cv_rootsbindir=/sbin
++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
+ ;;
+ esac
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch
index 511ee9d19e..f88eaf444e 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch
+++ b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch
@@ -7,12 +7,12 @@ emit fsqrt intructions
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/fpu/math_private.h
+Index: git/sysdeps/powerpc/fpu/math_private.h
===================================================================
---- libc.orig/sysdeps/powerpc/fpu/math_private.h
-+++ libc/sysdeps/powerpc/fpu/math_private.h
+--- git.orig/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.224070587 -0700
++++ git/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -25,10 +25,12 @@
- #include <dl-procinfo.h>
+ #include <fenv_private.h>
#include_next <math_private.h>
-# if __WORDSIZE == 64 || defined _ARCH_PWR4
@@ -28,10 +28,10 @@ Index: libc/sysdeps/powerpc/fpu/math_private.h
# endif
extern double __slow_ieee754_sqrt (double);
-Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E5500_MATH_PRIVATE_H_
+#define _E5500_MATH_PRIVATE_H_ 1
@@ -42,10 +42,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E5500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E6500_MATH_PRIVATE_H_
+#define _E6500_MATH_PRIVATE_H_ 1
@@ -56,10 +56,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E6500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E500MC_MATH_PRIVATE_H_
+#define _E500MC_MATH_PRIVATE_H_ 1
@@ -70,10 +70,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E500MC_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E5500_MATH_PRIVATE_H_
+#define _E5500_MATH_PRIVATE_H_ 1
@@ -84,10 +84,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E5500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E6500_MATH_PRIVATE_H_
+#define _E6500_MATH_PRIVATE_H_ 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk b/meta/recipes-core/glibc/glibc/generate-supported.mk
index d2a28c2dc6..d2a28c2dc6 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk
+++ b/meta/recipes-core/glibc/glibc/generate-supported.mk
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch b/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch
index 689b79c61c..f5ed1bfeef 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch
+++ b/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch
@@ -1,10 +1,10 @@
Signed-of-by: Edmar Wienskoski <edmar@freescale.com>
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -140,10 +140,10 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -246,10 +246,10 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -385,10 +385,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -491,10 +491,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -630,10 +630,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -736,10 +736,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -875,10 +875,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -981,10 +981,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1120,10 +1120,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1226,10 +1226,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1365,10 +1365,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1471,46 +1471,46 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/603e/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1,2 @@
+# e300c3 is a variant of 603e so use the same optimizations for sqrt
+powerpc/powerpc32/603e/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e500mc/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e5500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e6500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc64/e5500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch b/meta/recipes-core/glibc/glibc/grok_gold.patch
index d46737af98..26875c79d4 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch
+++ b/meta/recipes-core/glibc/glibc/grok_gold.patch
@@ -6,11 +6,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Backport
-Index: libc/configure
+Index: git/configure
===================================================================
---- libc.orig/configure
-+++ libc/configure
-@@ -4654,7 +4654,7 @@ else
+--- git.orig/configure 2014-08-29 10:32:34.464070587 -0700
++++ git/configure 2014-08-29 10:32:34.456070587 -0700
+@@ -4592,7 +4592,7 @@
# Found it, now check the version.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
$as_echo_n "checking version of $LD... " >&6; }
@@ -19,11 +19,11 @@ Index: libc/configure
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
-Index: libc/configure.ac
+Index: git/configure.ac
===================================================================
---- libc.orig/configure.ac
-+++ libc/configure.ac
-@@ -990,7 +990,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
+--- git.orig/configure.ac 2014-08-29 10:32:34.464070587 -0700
++++ git/configure.ac 2014-08-29 10:32:34.460070587 -0700
+@@ -930,7 +930,7 @@
[GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
AC_CHECK_PROG_VER(LD, $LD, --version,
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch b/meta/recipes-core/glibc/glibc/initgroups_keys.patch
index be29856b03..32aa15a533 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch
+++ b/meta/recipes-core/glibc/glibc/initgroups_keys.patch
@@ -5,16 +5,16 @@ as undefined symbol
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: libc/nss/getent.c
+Index: git/nss/getent.c
===================================================================
---- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800
-+++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800
-@@ -898,7 +898,7 @@
+--- git.orig/nss/getent.c 2014-08-27 05:15:25.996070587 +0000
++++ git/nss/getent.c 2014-08-27 05:16:00.048070587 +0000
+@@ -879,7 +879,7 @@
D(group)
D(gshadow)
- DN(hosts)
+ D(hosts)
-D(initgroups)
+DN(initgroups)
- DN(netgroup)
- DN(networks)
+ D(netgroup)
+ D(networks)
D(passwd)
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch b/meta/recipes-core/glibc/glibc/ld-search-order.patch
index e83a0ad6d2..f518bc7642 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
+++ b/meta/recipes-core/glibc/glibc/ld-search-order.patch
@@ -19,12 +19,12 @@ means we need to switch the order of 3 and 4 above to make this work effectively
RP 14/10/2010
-Index: libc/elf/dl-load.c
+Index: git/elf/dl-load.c
===================================================================
---- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800
-+++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800
-@@ -2215,7 +2215,14 @@
- fd = open_path (name, namelen, mode & __RTLD_SECURE,
+--- git.orig/elf/dl-load.c 2014-08-28 17:32:46.292070587 -0700
++++ git/elf/dl-load.c 2014-08-28 17:33:56.048070587 -0700
+@@ -2050,7 +2050,14 @@
+ fd = open_path (name, namelen, mode,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
-
@@ -38,19 +38,19 @@ Index: libc/elf/dl-load.c
+ /* Finally try ld.so.cache */
#ifdef USE_LDCONFIG
if (fd == -1
- && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
-@@ -2283,14 +2290,6 @@
+ && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
+@@ -2113,14 +2120,6 @@
}
#endif
- /* Finally, try the default path. */
- if (fd == -1
- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
-- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
+- || __glibc_likely (!(l->l_flags_1 & DF_1_NODEFLIB)))
- && rtld_search_dirs.dirs != (void *) -1)
-- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
+- fd = open_path (name, namelen, mode, &rtld_search_dirs,
- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
-
/* Add another newline when we are tracing the library loading. */
- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch b/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch
index 9b646fea95..9f593d6359 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch
+++ b/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch
@@ -11,9 +11,10 @@ Upstream-Status: Pending
---
-diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
-+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
+Index: git/sysdeps/mips/dl-machine.h
+===================================================================
+--- git.orig/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.840070587 +0000
++++ git/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.832070587 +0000
@@ -70,7 +70,8 @@
/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
with the run-time address of the r_debug structure */
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch b/meta/recipes-core/glibc/glibc/multilib_readlib.patch
index 1542b1b519..13ffc46f91 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch
+++ b/meta/recipes-core/glibc/glibc/multilib_readlib.patch
@@ -5,9 +5,11 @@ variable EGLIBC_KNOWN_INTERPRETER_NAMES.
Lianhao Lu, 08/01/2011
---- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800
-+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800
-@@ -52,6 +52,7 @@
+Index: git/elf/readlib.c
+===================================================================
+--- git.orig/elf/readlib.c 2014-08-29 10:34:16.824070587 -0700
++++ git/elf/readlib.c 2014-08-29 10:34:16.816070587 -0700
+@@ -51,6 +51,7 @@
#ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
SYSDEP_KNOWN_INTERPRETER_NAMES
#endif
diff --git a/meta/recipes-core/glibc/glibc/option-groups.patch b/meta/recipes-core/glibc/glibc/option-groups.patch
new file mode 100644
index 0000000000..198be73524
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/option-groups.patch
@@ -0,0 +1,1397 @@
+Eglibc option group infrastructure
+
+Upstream-Status: Pending
+
+Index: git/option-groups.def
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.def 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,868 @@
++# This file documents the option groups EGLIBC currently supports, in
++# a format akin to the Linux Kconfig system's. The syntax may change
++# over time.
++#
++# An entry of the form:
++#
++# config GROUP_NAME
++# bool "one-line explanation of what this option group controls"
++# help
++# Multi-line help explaining the option group's meaning in
++# some detail, terminated by indentation level.
++#
++# defines an option group whose variable is GROUP_NAME, with
++# meaningful values 'y' (enabled) and 'n' (disabled). The
++# documentation is formatted to be consumed by some sort of
++# interactive configuration interface, but EGLIBC doesn't have such an
++# interface yet.
++#
++# An option may have a 'depends on' line, indicating which other options
++# must also be enabled if this option is. At present, EGLIBC doesn't
++# check that these dependencies are satisfied.
++#
++# Option group variables get their default values from the file
++# 'option-groups.defaults', in the top directory of the EGLIBC source
++# tree. By default, all EGLIBC option groups are enabled --- their
++# variables are set to 'y'.
++#
++# After including 'option-groups.defaults', the EGLIBC make machinery
++# includes the file 'option-groups.config' from the top of the build
++# tree, if it is present. Developers can place assignments to option
++# group variables in that file to override the defaults. For example,
++# to disable an option group, place a line of the form:
++#
++# OPTION_GROUP_NAME = n
++#
++# in 'option-groups.config' at the top of your build tree. To
++# explicitly enable an option group, you may also write:
++#
++# OPTION_GROUP_NAME = y
++#
++# although this simply reestablishes the value already set by
++# 'option-groups.defaults'.
++
++config EGLIBC_ADVANCED_INET6
++ bool "IPv6 Advanced Sockets API support (RFC3542)"
++ depends on EGLIBC_INET
++ help
++ This option group includes the functions specified by RFC 3542,
++ "Advanced Sockets Application Program Interface (API) for
++ IPv6".
++
++ This option group includes the following functions:
++
++ inet6_opt_append
++ inet6_opt_find
++ inet6_opt_finish
++ inet6_opt_get_val
++ inet6_opt_init
++ inet6_option_alloc
++ inet6_option_append
++ inet6_option_find
++ inet6_option_init
++ inet6_option_next
++ inet6_option_space
++ inet6_opt_next
++ inet6_opt_set_val
++ inet6_rth_add
++ inet6_rth_getaddr
++ inet6_rth_init
++ inet6_rth_reverse
++ inet6_rth_segments
++ inet6_rth_space
++
++config EGLIBC_BACKTRACE
++ bool "Functions for producing backtraces"
++ help
++ This option group includes functions for producing a list of
++ the function calls that are currently active in a thread, from
++ within the thread itself. These functions are often used
++ within signal handlers, to produce diagnostic output.
++
++ This option group includes the following functions:
++
++ backtrace
++ backtrace_symbols
++ backtrace_symbols_fd
++
++config EGLIBC_BIG_MACROS
++ bool "Use extensive inline code"
++ help
++ This option group specifies whether certain pieces of code
++ should be inlined to achieve maximum speed. If this option
++ group is not selected, function calls will be used instead,
++ hence reducing the library footprint.
++
++config EGLIBC_BSD
++ bool "BSD-specific functions, and their compatibility stubs"
++ help
++ This option group includes functions specific to BSD kernels.
++ A number of these functions have stub versions that are also
++ included in libraries built for non-BSD systems for
++ compatibility.
++
++ This option group includes the following functions:
++
++ chflags
++ fchflags
++ lchmod
++ revoke
++ setlogin
++
++config EGLIBC_CXX_TESTS
++ bool "Tests that link against the standard C++ library."
++ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
++ help
++ This option group does not include any C library functions;
++ instead, it controls which EGLIBC tests an ordinary 'make
++ tests' runs. With this group disabled, tests that would
++ normally link against the standard C++ library are not
++ run.
++
++ The standard C++ library depends on the math library 'libm' and
++ the wide character I/O functions included in EGLIBC. So those
++ option groups must be enabled if this test is enabled.
++
++config EGLIBC_CATGETS
++ bool "Functions for accessing message catalogs"
++ depends on EGLIBC_LOCALE_CODE
++ help
++ This option group includes functions for accessing message
++ catalogs: catopen, catclose, and catgets.
++
++ This option group depends on the EGLIBC_LOCALE_CODE
++ option group.
++
++config EGLIBC_CHARSETS
++ bool "iconv/gconv character set conversion libraries"
++ help
++ This option group includes support for character sets other
++ than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
++ various encodings. This affects both the character sets
++ supported by the wide and multibyte character functions, and
++ those supported by the 'iconv' functions.
++
++ With this option group disabled, EGLIBC supports only the
++ following character sets:
++
++ ANSI_X3.4 - ASCII
++ ANSI_X3.4-1968
++ ANSI_X3.4-1986
++ ASCII
++ CP367
++ CSASCII
++ IBM367
++ ISO-IR-6
++ ISO646-US
++ ISO_646.IRV:1991
++ OSF00010020
++ US
++ US-ASCII
++
++ 10646-1:1993 - ISO 10646, in big-endian UCS4 form
++ 10646-1:1993/UCS4
++ CSUCS4
++ ISO-10646
++ ISO-10646/UCS4
++ OSF00010104
++ OSF00010105
++ OSF00010106
++ UCS-4
++ UCS-4BE
++ UCS4
++
++ UCS-4LE - ISO 10646, in little-endian UCS4 form
++
++ ISO-10646/UTF-8 - ISO 10646, in UTF-8 form
++ ISO-10646/UTF8
++ ISO-IR-193
++ OSF05010001
++ UTF-8
++ UTF8
++
++ ISO-10646/UCS2 - ISO 10646, in target-endian UCS2 form
++ OSF00010100
++ OSF00010101
++ OSF00010102
++ UCS-2
++ UCS2
++
++ UCS-2BE - ISO 10646, in big-endian UCS2 form
++ UNICODEBIG
++
++ UCS-2LE - ISO 10646, in little-endian UCS2 form
++ UNICODELITTLE
++
++ WCHAR_T - EGLIBC's internal form (target-endian,
++ 32-bit ISO 10646)
++
++config EGLIBC_CRYPT
++ bool "Encryption library"
++ help
++ This option group includes the `libcrypt' library which
++ provides functions for one-way encryption. Supported
++ encryption algorithms include MD5, SHA-256, SHA-512 and DES.
++
++config EGLIBC_CRYPT_UFC
++ bool "Ultra fast `crypt' implementation"
++ depends on EGLIBC_CRYPT
++ help
++ This option group provides ultra fast DES-based implementation of
++ the `crypt' function. When this option group is disabled,
++ (a) the library will not provide the setkey[_r] and encrypt[_r]
++ functions and (b) the crypt[_r] function will return NULL and set the
++ errno to ENOSYS if /salt/ passed does not correspond to either MD5,
++ SHA-256 or SHA-512 algorithm.
++
++config EGLIBC_DB_ALIASES
++ bool "Functions for accessing the mail aliases database"
++ help
++ This option group includues functions for looking up mail
++ aliases in '/etc/aliases' or using nsswitch. It includes the
++ following functions:
++
++ endaliasent
++ getaliasbyname
++ getaliasbyname_r
++ getaliasent
++ getaliasent_r
++ setaliasent
++
++ When this option group is disabled, the NSS service libraries
++ also lack support for querying their mail alias tables.
++
++config EGLIBC_ENVZ
++ bool "Functions for handling envz-style environment vectors."
++ help
++ This option group contains functions for creating and operating
++ on envz vectors. An "envz vector" is a vector of strings in a
++ contiguous block of memory, where each element is a name-value
++ pair, and elements are separated from their neighbors by null
++ characters.
++
++ This option group includes the following functions:
++
++ envz_add envz_merge
++ envz_entry envz_remove
++ envz_get envz_strip
++
++config EGLIBC_FCVT
++ bool "Functions for converting floating-point numbers to strings"
++ help
++ This option group includes functions for converting
++ floating-point numbers to strings.
++
++ This option group includes the following functions:
++
++ ecvt qecvt
++ ecvt_r qecvt_r
++ fcvt qfcvt
++ fcvt_r qfcvt_r
++ gcvt qgcvt
++
++config EGLIBC_FMTMSG
++ bool "Functions for formatting messages"
++ help
++ This option group includes the following functions:
++
++ addseverity fmtmsg
++
++config EGLIBC_FSTAB
++ bool "Access functions for 'fstab'"
++ help
++ This option group includes functions for reading the mount
++ point specification table, '/etc/fstab'. These functions are
++ not included in the POSIX standard, which provides the
++ 'getmntent' family of functions instead.
++
++ This option group includes the following functions:
++
++ endfsent getfsspec
++ getfsent setfsent
++ getfsfile
++
++config EGLIBC_FTRAVERSE
++ bool "Functions for traversing file hierarchies"
++ help
++ This option group includes functions for traversing file
++ UNIX file hierachies.
++
++ This option group includes the following functions:
++
++ fts_open ftw
++ fts_read nftw
++ fts_children ftw64
++ fts_set nftw64
++ fts_close
++
++config EGLIBC_GETLOGIN
++ bool "The getlogin function"
++ depends on EGLIBC_UTMP
++ help
++ This function group includes the 'getlogin' and 'getlogin_r'
++ functions, which return the user name associated by the login
++ activity with the current process's controlling terminal.
++
++ With this option group disabled, the 'glob' function will not
++ fall back on 'getlogin' to find the user's login name for tilde
++ expansion when the 'HOME' environment variable is not set.
++
++config EGLIBC_IDN
++ bool "International domain names support"
++ help
++ This option group includes the `libcidn' library which
++ provides support for international domain names.
++
++config EGLIBC_INET
++ bool "Networking support"
++ help
++ This option group includes networking-specific functions and
++ data. With EGLIBC_INET disabled, the EGLIBC
++ installation and API changes as follows:
++
++ - The following libraries are not installed:
++
++ libnsl
++ libnss_compat
++ libnss_dns
++ libnss_hesiod
++ libnss_nis
++ libnss_nisplus
++ libresolv
++
++ - The following functions and variables are omitted from libc:
++
++ authdes_create hstrerror svc_fdset
++ authdes_getucred htonl svc_getreq
++ authdes_pk_create htons svc_getreq_common
++ authnone_create if_freenameindex svc_getreq_poll
++ authunix_create if_indextoname svc_getreqset
++ authunix_create_default if_nameindex svc_max_pollfd
++ bindresvport if_nametoindex svc_pollfd
++ callrpc in6addr_any svcraw_create
++ cbc_crypt in6addr_loopback svc_register
++ clnt_broadcast inet6_opt_append svc_run
++ clnt_create inet6_opt_find svc_sendreply
++ clnt_pcreateerror inet6_opt_finish svctcp_create
++ clnt_perrno inet6_opt_get_val svcudp_bufcreate
++ clnt_perror inet6_opt_init svcudp_create
++ clntraw_create inet6_option_alloc svcudp_enablecache
++ clnt_spcreateerror inet6_option_append svcunix_create
++ clnt_sperrno inet6_option_find svcunixfd_create
++ clnt_sperror inet6_option_init svc_unregister
++ clnttcp_create inet6_option_next user2netname
++ clntudp_bufcreate inet6_option_space xdecrypt
++ clntudp_create inet6_opt_next xdr_accepted_reply
++ clntunix_create inet6_opt_set_val xdr_array
++ des_setparity inet6_rth_add xdr_authdes_cred
++ ecb_crypt inet6_rth_getaddr xdr_authdes_verf
++ endaliasent inet6_rth_init xdr_authunix_parms
++ endhostent inet6_rth_reverse xdr_bool
++ endnetent inet6_rth_segments xdr_bytes
++ endnetgrent inet6_rth_space xdr_callhdr
++ endprotoent inet_addr xdr_callmsg
++ endrpcent inet_aton xdr_char
++ endservent inet_lnaof xdr_cryptkeyarg
++ ether_aton inet_makeaddr xdr_cryptkeyarg2
++ ether_aton_r inet_netof xdr_cryptkeyres
++ ether_hostton inet_network xdr_des_block
++ ether_line inet_nsap_addr xdr_double
++ ether_ntoa inet_nsap_ntoa xdr_enum
++ ether_ntoa_r inet_ntoa xdr_float
++ ether_ntohost inet_ntop xdr_free
++ freeaddrinfo inet_pton xdr_getcredres
++ freeifaddrs innetgr xdr_hyper
++ gai_strerror iruserok xdr_int
++ getaddrinfo iruserok_af xdr_int16_t
++ getaliasbyname key_decryptsession xdr_int32_t
++ getaliasbyname_r key_decryptsession_pk xdr_int64_t
++ getaliasent key_encryptsession xdr_int8_t
++ getaliasent_r key_encryptsession_pk xdr_keybuf
++ gethostbyaddr key_gendes xdr_key_netstarg
++ gethostbyaddr_r key_get_conv xdr_key_netstres
++ gethostbyname key_secretkey_is_set xdr_keystatus
++ gethostbyname2 key_setnet xdr_long
++ gethostbyname2_r key_setsecret xdr_longlong_t
++ gethostbyname_r netname2host xdrmem_create
++ gethostent netname2user xdr_netnamestr
++ gethostent_r ntohl xdr_netobj
++ getifaddrs ntohs xdr_opaque
++ getipv4sourcefilter passwd2des xdr_opaque_auth
++ get_myaddress pmap_getmaps xdr_pmap
++ getnameinfo pmap_getport xdr_pmaplist
++ getnetbyaddr pmap_rmtcall xdr_pointer
++ getnetbyaddr_r pmap_set xdr_quad_t
++ getnetbyname pmap_unset xdrrec_create
++ getnetbyname_r rcmd xdrrec_endofrecord
++ getnetent rcmd_af xdrrec_eof
++ getnetent_r registerrpc xdrrec_skiprecord
++ getnetgrent res_init xdr_reference
++ getnetgrent_r rexec xdr_rejected_reply
++ getnetname rexec_af xdr_replymsg
++ getprotobyname rexecoptions xdr_rmtcall_args
++ getprotobyname_r rpc_createerr xdr_rmtcallres
++ getprotobynumber rresvport xdr_short
++ getprotobynumber_r rresvport_af xdr_sizeof
++ getprotoent rtime xdrstdio_create
++ getprotoent_r ruserok xdr_string
++ getpublickey ruserok_af xdr_u_char
++ getrpcbyname ruserpass xdr_u_hyper
++ getrpcbyname_r setaliasent xdr_u_int
++ getrpcbynumber sethostent xdr_uint16_t
++ getrpcbynumber_r setipv4sourcefilter xdr_uint32_t
++ getrpcent setnetent xdr_uint64_t
++ getrpcent_r setnetgrent xdr_uint8_t
++ getrpcport setprotoent xdr_u_long
++ getsecretkey setrpcent xdr_u_longlong_t
++ getservbyname setservent xdr_union
++ getservbyname_r setsourcefilter xdr_unixcred
++ getservbyport svcauthdes_stats xdr_u_quad_t
++ getservbyport_r svcerr_auth xdr_u_short
++ getservent svcerr_decode xdr_vector
++ getservent_r svcerr_noproc xdr_void
++ getsourcefilter svcerr_noprog xdr_wrapstring
++ h_errlist svcerr_progvers xencrypt
++ h_errno svcerr_systemerr xprt_register
++ herror svcerr_weakauth xprt_unregister
++ h_nerr svc_exit
++ host2netname svcfd_create
++
++ - The rpcgen, nscd, and rpcinfo commands are not installed.
++
++ - The 'rpc' file (a text file listing RPC services) is not installed.
++
++ Socket-related system calls do not fall in this option group,
++ because many are also used for other inter-process
++ communication mechanisms. For example, the 'syslog' routines
++ use Unix-domain sockets to communicate with the syslog daemon;
++ syslog is valuable in non-networked contexts.
++
++config EGLIBC_INET_ANL
++ bool "Asynchronous name lookup"
++ depends on EGLIBC_INET
++ help
++ This option group includes the `libanl' library which
++ provides support for asynchronous name lookup.
++
++config EGLIBC_LIBM
++ bool "libm (math library)"
++ help
++ This option group includes the 'libm' library, containing
++ mathematical functions. If this option group is omitted, then
++ an EGLIBC installation does not include shared or unshared versions
++ of the math library.
++
++ Note that this does not remove all floating-point related
++ functionality from EGLIBC; for example, 'printf' and 'scanf'
++ can still print and read floating-point values with this option
++ group disabled.
++
++ Note that the ISO Standard C++ library 'libstdc++' depends on
++ EGLIBC's math library 'libm'. If you disable this option
++ group, you will not be able to build 'libstdc++' against the
++ resulting EGLIBC installation.
++
++config EGLIBC_LOCALES
++ bool "Locale definitions"
++ help
++ This option group includes all locale definitions other than
++ that for the "C" locale. If this option group is omitted, then
++ only the "C" locale is supported.
++
++
++config EGLIBC_LOCALE_CODE
++ bool "Locale functions"
++ depends on POSIX_C_LANG_WIDE_CHAR
++ help
++ This option group includes locale support functions, programs,
++ and libraries. With EGLIBC_LOCALE_CODE disabled,
++ EGLIBC supports only the 'C' locale (also known as 'POSIX'),
++ and ignores the settings of the 'LANG' and 'LC_*' environment
++ variables.
++
++ With EGLIBC_LOCALE_CODE disabled, the following
++ functions are omitted from libc:
++
++ duplocale localeconv nl_langinfo rpmatch strfmon_l
++ freelocale newlocale nl_langinfo_l strfmon uselocale
++
++ Furthermore, only the LC_CTYPE and LC_TIME categories of the
++ standard "C" locale are available.
++
++ The EGLIBC_CATGETS option group depends on this option group.
++
++
++config EGLIBC_MEMUSAGE
++ bool "Memory profiling library"
++ help
++ This option group includes the `libmemusage' library and
++ the `memusage' and `memusagestat' utilities.
++ These components provide memory profiling functions.
++
++config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++ int "Memory profiling library buffer size"
++ depends on EGLIBC_MEMUSAGE
++ default "32768"
++ help
++ Libmemusage library buffers the profiling data in memory
++ before writing it out to disk. By default, the library
++ allocates 1.5M buffer, which can be substantial for some
++ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
++ allows to change the default buffer size. It specifies
++ the number of entries the buffer should have.
++ On most architectures one buffer entry amounts to 48 bytes,
++ so setting this option to the value of 512 will reduce the size of
++ the memory buffer to 24K.
++
++config EGLIBC_NIS
++ bool "Support for NIS, NIS+, and the special 'compat' services."
++ depends on EGLIBC_INET && EGLIBC_SUNRPC
++ help
++ This option group includes the NIS, NIS+, and 'compat' Name
++ Service Switch service libraries. When it is disabled, those
++ services libraries are not installed; you should remove any
++ references to them from your 'nsswitch.conf' file.
++
++ This option group depends on the EGLIBC_INET option
++ group; you must enable that to enable this option group.
++
++config EGLIBC_NSSWITCH
++ bool "Name service switch (nsswitch) support"
++ help
++ This option group includes support for the 'nsswitch' facility.
++ With this option group enabled, all EGLIBC functions for
++ accessing various system databases (passwords and groups;
++ networking; aliases; public keys; and so on) consult the
++ '/etc/nsswitch.conf' configuration file to decide how to handle
++ queries.
++
++ With this option group disabled, EGLIBC uses a fixed list of
++ services to satisfy queries on each database, as requested by
++ configuration files specified when EGLIBC is built. Your
++ 'option-groups.config' file must set the following two
++ variables:
++
++config EGLIBC_NSSWITCH_FIXED_CONFIG
++ string "Nsswitch fixed config filename"
++ depends on !EGLIBC_NSSWITCH
++ default ""
++ help
++ Set this to the name of a file whose contents observe the
++ same syntax as an ordinary '/etc/nsswitch.conf' file. The
++ EGLIBC build process parses this file just as EGLIBC would
++ at run time if EGLIBC_NSSWITCH were enabled, and
++ produces a C library that uses the nsswitch service
++ libraries to search for database entries as this file
++ specifies, instead of consulting '/etc/nsswitch.conf' at run
++ time.
++
++ This should be an absolute filename. The EGLIBC build
++ process may use it from several different working
++ directories. It may include references to Makefile
++ variables like 'common-objpfx' (the top of the build tree,
++ with a trailing slash), or '..' (the top of the source tree,
++ with a trailing slash).
++
++ The EGLIBC source tree includes a sample configuration file
++ named 'nss/fixed-nsswitch.conf'; for simple configurations,
++ you will probably want to delete references to databases not
++ needed on your system.
++
++config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
++ string "Nsswitch fixed functions filename"
++ depends on !EGLIBC_NSSWITCH
++ default ""
++ help
++ The EGLIBC build process uses this file to decide which
++ functions to make available from which service libraries.
++ The file 'nss/fixed-nsswitch.functions' serves as a sample
++ configuration file for this setting, and explains its syntax
++ and meaning in more detail.
++
++ This should be an absolute file name. The EGLIBC build
++ process may use it from several different working
++ directories. It may include references to Makefile
++ variables like 'common-objpfx' (the top of the build tree,
++ with a trailing slash), or '..' (the top of the source tree,
++ with a trailing slash).
++
++ Be sure to mention each function in each service you wish to
++ use. If you do not mention a service's function here, the
++ EGLIBC database access functions will not find it, even if
++ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
++ file.
++
++ In this arrangement, EGLIBC will not use the 'dlopen' and
++ 'dlsym' functions to find database access functions. Instead,
++ libc hard-codes references to the service libraries' database
++ access functions. You must explicitly link your program
++ against the name service libraries (those whose names start
++ with 'libnss_', in the sysroot's '/lib' directory) whose
++ functions you intend to use. This arrangement helps
++ system-wide static analysis tools decide which functions a
++ system actually uses.
++
++ Note that some nsswitch service libraries require other option
++ groups to be enabled; for example, the EGLIBC_INET
++ option group must be enabled to use the 'libnss_dns.so.2'
++ service library, which uses the Domain Name System network
++ protocol to answer queries.
++
++config EGLIBC_RCMD
++ bool "Support for 'rcmd' and related library functions"
++ depends on EGLIBC_INET
++ help
++ This option group includes functions for running commands on
++ remote machines via the 'rsh' protocol, and doing authentication
++ related to those functions. This also includes functions that
++ use the 'rexec' protocol.
++
++ This option group includes the following functions:
++
++ rcmd ruserok
++ rcmd_af ruserok_af
++ rexec iruserok
++ rexec_af iruserok_af
++ rresvport ruserpass
++ rresvport_af
++
++config EGLIBC_RTLD_DEBUG
++ bool "Runtime linker debug print outs"
++ help
++ This option group enables debug output of the runtime linker
++ which is activated via LD_DEBUG and LD_TRACE_PRELINKING
++ environment variables. Disabling this option group yields
++ a smaller runtime linker binary.
++ BEWARE: Disabling this option group is likely to break
++ the `ldd' utility which may also be used by the prelinker.
++ In particular, the `--unused' ldd option will not work correctly.
++
++config EGLIBC_SPAWN
++ bool "Support for POSIX posix_spawn functions"
++ help
++ This option group includes the POSIX functions for executing
++ programs in child processes without using 'fork' or 'vfork'.
++
++ This option group includes the following functions:
++
++ posix_spawn
++ posix_spawnattr_destroy
++ posix_spawnattr_getflags
++ posix_spawnattr_getpgroup
++ posix_spawnattr_getschedparam
++ posix_spawnattr_getschedpolicy
++ posix_spawnattr_getsigdefault
++ posix_spawnattr_getsigmask
++ posix_spawnattr_init
++ posix_spawnattr_setflags
++ posix_spawnattr_setpgroup
++ posix_spawnattr_setschedparam
++ posix_spawnattr_setschedpolicy
++ posix_spawnattr_setsigdefault
++ posix_spawnattr_setsigmask
++ posix_spawn_file_actions_addclose
++ posix_spawn_file_actions_adddup2
++ posix_spawn_file_actions_addopen
++ posix_spawn_file_actions_destroy
++ posix_spawn_file_actions_init
++ posix_spawnp
++
++ This option group also provides the ability for the iconv,
++ localedef, and locale programs to operate transparently on
++ compressed charset definitions. When this option group is
++ disabled, those programs will only operate on uncompressed
++ charmap files.
++
++config EGLIBC_STREAMS
++ bool "Support for accessing STREAMS."
++ help
++ This option group includes functions for reading and writing
++ messages to and from STREAMS. The STREAMS interface provides a
++ uniform mechanism for implementing networking services and other
++ character-based I/O. (STREAMS are not to be confused with
++ <stdio.h> FILE objects, also called 'streams'.)
++
++ This option group includes the following functions:
++
++ getmsg putpmsg
++ getpmsg fattach
++ isastream fdetach
++ putmsg
++
++config EGLIBC_SUNRPC
++ bool "Support for the Sun 'RPC' protocol."
++ depends on EGLIBC_INET
++ help
++ This option group includes support for the Sun RPC protocols,
++ including the 'rpcgen' and 'rpcinfo' programs.
++
++config EGLIBC_UTMP
++ bool "Older access functions for 'utmp' login records"
++ help
++ This option group includes the older 'utent' family of
++ functions for accessing user login records in the 'utmp' file.
++ POSIX omits these functions in favor of the 'utxent' family,
++ and they are obsolete on systems other than Linux.
++
++ This option group includes the following functions:
++
++ endutent
++ getutent
++ getutent_r
++ getutid
++ getutid_r
++ getutline
++ getutline_r
++ logwtmp
++ pututline
++ setutent
++ updwtmp
++ utmpname
++
++ This option group includes the following libraries:
++
++ libutil.so (and libutil.a)
++
++config EGLIBC_UTMPX
++ bool "POSIX access functions for 'utmp' login records"
++ depends on EGLIBC_UTMP
++ help
++ This option group includes the POSIX functions for reading and
++ writing user login records in the 'utmp' file (usually
++ '/var/run/utmp'). The POSIX functions operate on 'struct
++ utmpx' structures, as opposed to the family of older 'utent'
++ functions, which operate on 'struct utmp' structures.
++
++ This option group includes the following functions:
++
++ endutxent
++ getutmp
++ getutmpx
++ getutxent
++ getutxid
++ getutxline
++ pututxline
++ setutxent
++ updwtmpx
++ utmpxname
++
++config EGLIBC_WORDEXP
++ bool "Shell-style word expansion"
++ help
++ This option group includes the 'wordexp' function for
++ performing word expansion in the manner of the shell, and the
++ accompanying 'wordfree' function.
++
++config POSIX_C_LANG_WIDE_CHAR
++ bool "ISO C library wide character functions, excluding I/O"
++ help
++ This option group includes the functions defined by the ISO C
++ standard for working with wide and multibyte characters in
++ memory. Functions for reading and writing wide and multibyte
++ characters from and to files call in the
++ POSIX_WIDE_CHAR_DEVICE_IO option group.
++
++ This option group includes the following functions:
++
++ btowc mbsinit wcscspn wcstoll
++ iswalnum mbsrtowcs wcsftime wcstombs
++ iswalpha mbstowcs wcslen wcstoul
++ iswblank mbtowc wcsncat wcstoull
++ iswcntrl swprintf wcsncmp wcstoumax
++ iswctype swscanf wcsncpy wcsxfrm
++ iswdigit towctrans wcspbrk wctob
++ iswgraph towlower wcsrchr wctomb
++ iswlower towupper wcsrtombs wctrans
++ iswprint vswprintf wcsspn wctype
++ iswpunct vswscanf wcsstr wmemchr
++ iswspace wcrtomb wcstod wmemcmp
++ iswupper wcscat wcstof wmemcpy
++ iswxdigit wcschr wcstoimax wmemmove
++ mblen wcscmp wcstok wmemset
++ mbrlen wcscoll wcstol
++ mbrtowc wcscpy wcstold
++
++config POSIX_REGEXP
++ bool "Regular expressions"
++ help
++ This option group includes the POSIX regular expression
++ functions, and the associated non-POSIX extensions and
++ compatibility functions.
++
++ With POSIX_REGEXP disabled, the following functions are
++ omitted from libc:
++
++ re_comp re_max_failures regcomp
++ re_compile_fastmap re_search regerror
++ re_compile_pattern re_search_2 regexec
++ re_exec re_set_registers regfree
++ re_match re_set_syntax rpmatch
++ re_match_2 re_syntax_options
++
++ Furthermore, the compatibility regexp interface defined in the
++ <regexp.h> header file, 'compile', 'step', and 'advance', is
++ omitted.
++
++config POSIX_REGEXP_GLIBC
++ bool "Regular expressions from GLIBC"
++ depends on POSIX_REGEXP
++ help
++ This option group specifies which regular expression
++ library to use. The choice is between regex
++ implementation from GLIBC and regex implementation from
++ libiberty. The GLIBC variant is fully POSIX conformant and
++ optimized for speed; regex from libiberty is more than twice
++ as small while still is enough for most practical purposes.
++
++config POSIX_WIDE_CHAR_DEVICE_IO
++ bool "Input and output functions for wide characters"
++ depends on POSIX_C_LANG_WIDE_CHAR
++ help
++ This option group includes functions for reading and writing
++ wide characters to and from <stdio.h> streams.
++
++ This option group includes the following functions:
++
++ fgetwc fwprintf putwchar vwscanf
++ fgetws fwscanf ungetwc wprintf
++ fputwc getwc vfwprintf wscanf
++ fputws getwchar vfwscanf
++ fwide putwc vwprintf
++
++ This option group further includes the following unlocked
++ variants of the above functions:
++
++ fgetwc_unlocked getwc_unlocked
++ fgetws_unlocked getwchar_unlocked
++ fputwc_unlocked putwc_unlocked
++ fputws_unlocked putwchar_unlocked
++
++ Note that the GNU standard C++ library, 'libstdc++.so', uses
++ some of these functions; you will not be able to link or run
++ C++ programs if you disable this option group.
++
++ This option group also affects the behavior of the following
++ functions:
++
++ fdopen
++ fopen
++ fopen64
++ freopen
++ freopen64
++
++ These functions all take an OPENTYPE parameter which may
++ contain a string of the form ",ccs=CHARSET", indicating that
++ the underlying file uses the character set named CHARSET.
++ This produces a wide-oriented stream, which is only useful
++ when the functions included in this option group are present.
++ If the user attempts to open a file specifying a character set
++ in the OPENTYPE parameter, and EGLIBC was built with this
++ option group disabled, the function returns NULL, and sets
++ errno to EINVAL.
++
++
++# This helps Emacs users browse this file using the page motion commands
++# and commands like 'pages-directory'.
++# Local Variables:
++# page-delimiter: "^config\\s-"
++# End:
+Index: git/option-groups.mak
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.mak 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,41 @@
++# Setup file for subdirectory Makefiles that define EGLIBC option groups.
++
++# EGLIBC shouldn't need to override this. However, the
++# cross-build-friendly localedef includes this makefile to get option
++# group variable definitions; it uses a single build tree for all the
++# multilibs, and needs to be able to specify a different option group
++# configuration file for each multilib.
++option_group_config_file ?= $(objdir)/option-groups.config
++
++# Read the default settings for all options.
++# We're included before ../Rules, so we can't assume $(..) is set.
++include $(firstword $(..) ../)option-groups.defaults
++
++# Read the developer's option group selections, overriding the
++# defaults from option-groups.defaults.
++-include $(option_group_config_file)
++
++# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
++# VAR should be a variable name, not a variable reference; this is
++# less general, but more terse for the intended use.
++# You can use it to add a file to a list if an option group is
++# disabled, like this:
++# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
++define option-disabled
++$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
++endef
++
++# Establish 'routines-y', etc. as simply-expanded variables.
++aux-y :=
++extra-libs-others-y :=
++extra-libs-y :=
++extra-objs-y :=
++install-bin-y :=
++install-others-y :=
++install-sbin-y :=
++others-y :=
++others-pie-y :=
++routines-y :=
++test-srcs-y :=
++tests-y :=
++xtests-y :=
+Index: git/option-groups.defaults
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.defaults 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,47 @@
++# This file sets default values for all option group variables
++# mentioned in option-groups.def; see that file for a description of
++# each option group.
++#
++# Subdirectory makefiles include this file before including the user's
++# settings from option-groups.config at the top of the build tree;
++# that file need only refer to those options whose default settings
++# are to be changed.
++#
++# By default, all option groups are enabled.
++OPTION_EGLIBC_ADVANCED_INET6 = y
++OPTION_EGLIBC_BACKTRACE = y
++OPTION_EGLIBC_BIG_MACROS = y
++OPTION_EGLIBC_BSD = y
++OPTION_EGLIBC_CXX_TESTS = y
++OPTION_EGLIBC_CATGETS = y
++OPTION_EGLIBC_CHARSETS = y
++OPTION_EGLIBC_CRYPT = y
++OPTION_EGLIBC_CRYPT_UFC = y
++OPTION_EGLIBC_DB_ALIASES = y
++OPTION_EGLIBC_ENVZ = y
++OPTION_EGLIBC_FCVT = y
++OPTION_EGLIBC_FMTMSG = y
++OPTION_EGLIBC_FSTAB = y
++OPTION_EGLIBC_FTRAVERSE = y
++OPTION_EGLIBC_GETLOGIN = y
++OPTION_EGLIBC_IDN = y
++OPTION_EGLIBC_INET = y
++OPTION_EGLIBC_INET_ANL = y
++OPTION_EGLIBC_LIBM = y
++OPTION_EGLIBC_LOCALES = y
++OPTION_EGLIBC_LOCALE_CODE = y
++OPTION_EGLIBC_MEMUSAGE = y
++OPTION_EGLIBC_NIS = y
++OPTION_EGLIBC_NSSWITCH = y
++OPTION_EGLIBC_RCMD = y
++OPTION_EGLIBC_RTLD_DEBUG = y
++OPTION_EGLIBC_SPAWN = y
++OPTION_EGLIBC_STREAMS = y
++OPTION_EGLIBC_SUNRPC = y
++OPTION_EGLIBC_UTMP = y
++OPTION_EGLIBC_UTMPX = y
++OPTION_EGLIBC_WORDEXP = y
++OPTION_POSIX_C_LANG_WIDE_CHAR = y
++OPTION_POSIX_REGEXP = y
++OPTION_POSIX_REGEXP_GLIBC = y
++OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-08-27 07:24:37.540070587 +0000
++++ git/Makefile 2014-08-27 07:24:41.656070587 +0000
+@@ -24,6 +24,7 @@
+
+ include Makeconfig
+
++include options-config/Makefile
+
+ # This is the default target; it makes everything except the tests.
+ .PHONY: all
+Index: git/EGLIBC.option-groups
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.option-groups 2014-08-27 07:24:41.656070587 +0000
+@@ -0,0 +1,122 @@
++ -*- mode: text -*-
++
++ The EGLIBC Component Configuration System
++ Jim Blandy <jimb@codesourcery.com>
++
++Introduction
++
++The GNU C library (GLIBC) provides a broad range of functionality,
++ranging from internationalization support to transcendental
++mathematical functions. Its website boasts that "nearly all known and
++useful functions from any other C library are available." This
++exhaustive approach has been one of GLIBC's strengths on desktop and
++server systems, but it has also given GLIBC a large footprint, both in
++memory and on disk, making it a challenge to use in embedded systems
++with limited resources.
++
++The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
++designed to work well on embedded systems. In particular, EGLIBC's
++component configuration system allows embedded developers to build
++customized versions of the library that include only the features
++their application uses, reducing its space requirements.
++
++EGLIBC's component configuration system categorizes the library's
++functions into "option groups", and allows you to include or exclude
++option groups individually. Some option groups depend on others;
++EGLIBC tracks these relationships, and ensures that the selected
++configuration yields a functioning library.
++
++
++Consistent and Predictable Behavior
++
++A flexible configuration system is a mixed blessing: if the options
++offered are poorly designed, it can be hard to see which choices will
++have the desired effects, and choices with obscure consequences can
++make debugging difficult. EGLIBC's configuration follows some general
++principles to reduce these risks:
++
++- EGLIBC has a single default configuration for each target
++ architecture.
++
++- In the default configuration, all option groups are enabled, and
++ EGLIBC is upwardly API- and ABI-compatible with GLIBC.
++
++- As much as possible, configurations only affect what functions are
++ present, not how they behave. If the system works with an option
++ group disabled, it will still work with it enabled.
++
++- As much as possible, configurations only select option groups ---
++ they do not describe characteristics of the target architecture.
++
++These rules mean that you have a simple debugging strategy available
++if you suspect that your EGLIBC configuration might be the source of a
++problem: fall back to the default configuration, re-test, and then
++disable option groups one by one, until the problem reappears.
++
++
++The Option Groups
++
++To see the current full list of implemented option groups, refer to the
++file 'option-groups.def' at the top of the source tree, or run
++'make menuconfig' from the top-level build directory.
++
++The POSIX.1-2001 specification includes a suggested partition of all
++the functions in the POSIX C API into option groups: math functions
++like 'sin' and 'cos'; networking functions like 'socket' and
++'connect'; and so on. EGLIBC could use this partitioning as the basis
++for future option groups.
++
++
++Implementation
++
++The EGLIBC component configuration system resembles the approach used
++by the Linux kernel to select device drivers, network protocols, and
++other features. A file named 'option-groups.config' in the top-level
++build directory contains assignments to Make variables, each of which
++enables or disables a particular option group. If the variable's
++value is set to 'y', then the option group is enabled; if it set to
++anything else, the option group is omitted. The file
++'option-groups.defaults', at the top of the source tree, establishes
++default values for all variables; all option groups are enabled by
++default.
++
++For example, the following 'option-groups.config' would omit locale
++data, but include mathematical functions, and everything else:
++
++ OPTION_EGLIBC_LOCALES = n
++ OPTION_EGLIBC_LIBM = y
++
++Like the Linux kernel, EGLIBC supports a similar set of '*config' make
++targets to make it easier to create 'option-groups.config', with all
++dependencies between option groups automatically satisfied. Run
++'make help' to see the list of supported make config targets. For
++example, 'make menuconfig' will update the current config utilising a
++menu based program.
++
++The option group names and their type (boolean, int, hex, string), help
++description, and dependencies with other option groups, are described by
++'option-groups.def' at the top of the source tree, analogous to the
++'Kconfig' files in the Linux kernel.
++
++In general, each option group variable controls whether a given set of
++object files in EGLIBC is compiled and included in the final
++libraries, or omitted from the build.
++
++Each subdirectory's Makefile categorizes its routines, libraries, and
++executables by option group. For example, EGLIBC's 'math/Makefile'
++places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
++
++ extra-libs-$(OPTION_EGLIBC_LIBM) := libm
++
++Finally, common code in 'Makerules' cites the value of the variable
++'extra-libs-y', selecting only those libraries that belong to enabled
++option groups to be built.
++
++
++Current Status and Future Directions
++
++The EGLIBC component configuration system described here is still
++under development.
++
++We have used the system to subset some portions of EGLIBC's
++Index: libc/configure.ac
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2014-08-27 07:24:41.196070587 +0000
++++ git/configure.ac 2014-08-27 07:24:41.656070587 +0000
+@@ -127,6 +127,16 @@
+ [sysheaders=''])
+ AC_SUBST(sysheaders)
+
++AC_ARG_WITH([kconfig],
++ AC_HELP_STRING([--with-kconfig=PATH],
++ [location of kconfig tools to use (from Linux
++ kernel builds) to re-use for configuring EGLIBC
++ option groups]),
++ [KCONFIG_TOOLS=$withval],
++ [KCONFIG_TOOLS=''])
++AC_SUBST(KCONFIG_TOOLS)
++
++
+ AC_SUBST(use_default_link)
+ AC_ARG_WITH([default-link],
+ AC_HELP_STRING([--with-default-link],
+Index: git/config.make.in
+===================================================================
+--- git.orig/config.make.in 2014-08-27 07:24:37.560070587 +0000
++++ git/config.make.in 2014-08-27 07:24:41.656070587 +0000
+@@ -46,6 +46,8 @@
+ c++-sysincludes = @CXX_SYSINCLUDES@
+ all-warnings = @all_warnings@
+
++kconfig_tools = @KCONFIG_TOOLS@
++
+ have-z-combreloc = @libc_cv_z_combreloc@
+ have-z-execstack = @libc_cv_z_execstack@
+ have-Bgroup = @libc_cv_Bgroup@
+Index: git/configure
+===================================================================
+--- git.orig/configure 2014-08-27 07:24:41.192070587 +0000
++++ git/configure 2014-08-27 07:24:41.660070587 +0000
+@@ -619,6 +619,7 @@
+ PERL
+ BASH_SHELL
+ libc_cv_gcc_static_libgcc
++KCONFIG_TOOLS
+ CXX_SYSINCLUDES
+ SYSINCLUDES
+ AUTOCONF
+@@ -733,6 +734,7 @@
+ with_binutils
+ with_selinux
+ with_headers
++with_kconfig
+ with_default_link
+ enable_sanity_checks
+ enable_shared
+@@ -1437,6 +1439,9 @@
+ --with-selinux if building with SELinux support
+ --with-headers=PATH location of system headers to use (for example
+ /usr/src/linux/include) [default=compiler default]
++ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
++ builds) to re-use for configuring EGLIBC option
++ groups
+ --with-default-link do not use explicit linker scripts
+ --with-cpu=CPU select code for CPU variant
+
+@@ -3400,6 +3405,14 @@
+
+
+
++# Check whether --with-kconfig was given.
++if test "${with_kconfig+set}" = set; then
++ withval=$with_kconfig; KCONFIG_TOOLS=$withval
++else
++ KCONFIG_TOOLS=''
++fi
++
++
+
+ # Check whether --with-default-link was given.
+ if test "${with_default_link+set}" = set; then :
+Index: git/options-config/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/Makefile 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,55 @@
++# ===========================================================================
++# EGLIBC option-groups configuration targets
++# These targets are included from top-level makefile
++
++ifneq ($(kconfig_tools),)
++ifneq (no,$(PERL))
++
++ocdir := options-config
++
++OconfigDefaults := option-groups.defaults
++OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
++OconfigDef := option-groups.def
++Oconfig := $(common-objpfx)option-groups.config
++Oconfig_tmp := $(common-objpfx).tmp.config
++
++conf := $(kconfig_tools)/conf
++mconf := $(kconfig_tools)/mconf
++
++preproc := $(PERL) $(ocdir)/config-preproc.pl
++postproc := $(PERL) $(ocdir)/config-postproc.pl
++
++PHONY += defconfig config menuconfig
++
++defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(OconfigDefaults_tmp)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
++ $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++ rm $(OconfigDefaults_tmp)
++
++config: $(conf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++
++menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++
++# Help text used by make help
++help:
++ @echo ' defconfig - New config with default from default config'
++ @echo ' config - Update current config utilising a line-oriented program'
++ @echo ' menuconfig - Update current config utilising a menu based program'
++
++endif
++endif
+Index: git/options-config/config-postproc.pl
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/config-postproc.pl 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,58 @@
++#!/usr/bin/perl
++
++$usage = "usage: $0 <default config file> <config file>\n";
++
++die "$usage" unless @ARGV;
++$defaults = shift @ARGV;
++die "$usage" unless @ARGV;
++die "Could not open $ARGV[0]" unless -T $ARGV[0];
++
++sub yank {
++ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
++}
++
++open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
++
++# get the full list of available options using the default config file
++$i = 0;
++while (<DEFAULTS>) {
++ if (/^\s*OPTION_(\w+\s*=.*$)/) {
++ $option[$i++] = $1;
++ }
++}
++
++# now go through the config file, making the necessary changes
++while (<>) {
++ if (/Linux Kernel Configuration/) {
++ # change title
++ s/Linux Kernel/Option Groups/;
++ print;
++ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
++ # this is an explicit option set line, change CONFIG_ to OPTION_
++ # before printing and remove this option from option list
++ $opt = $1;
++ yank($opt);
++ s/CONFIG_/OPTION_/g;
++ print;
++ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
++ # this is a comment line for an unset boolean option, change CONFIG_
++ # to OPTION_, remove this option from option list, and convert to
++ # explicit OPTION_FOO=n
++ $opt = $1;
++ yank($opt);
++ s/CONFIG_/OPTION_/g;
++ print "OPTION_$opt=n\n";
++ } else {
++ print;
++ }
++}
++
++# any boolean options left in @options, are options that were not mentioned in
++# the config file, and implicitly that means the option must be set =n,
++# so do that here.
++foreach $opt (@option) {
++ if ($opt =~ /=\s*[yn]/) {
++ $opt =~ s/=\s*[yn]/=n/;
++ print "OPTION_$opt\n";
++ }
++}
+Index: git/options-config/config-preproc.pl
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/config-preproc.pl 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,8 @@
++#!/usr/bin/perl
++
++if (@ARGV) {
++ while (<>) {
++ s/OPTION_/CONFIG_/g;
++ print;
++ }
++}
+Index: git/scripts/option-groups.awk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/scripts/option-groups.awk 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,63 @@
++# option-groups.awk --- generate option group header file
++# Given input files containing makefile-style assignments to variables,
++# print out a header file that #defines an appropriate preprocessor
++# symbol for each variable left set to 'y'.
++
++BEGIN { FS="=" }
++
++# Trim spaces.
++{ gsub (/[[:blank:]]/, "") }
++
++# Skip comments.
++/^#/ { next }
++
++# Process assignments.
++NF == 2 {
++ vars[$1] = $2
++}
++
++# Print final values.
++END {
++ print "/* This file is automatically generated by scripts/option-groups.awk"
++ print " in the EGLIBC source tree."
++ print ""
++ print " It defines macros that indicate which EGLIBC option groups were"
++ print " configured in 'option-groups.config' when this C library was"
++ print " built. For each option group named OPTION_foo, it #defines"
++ print " __OPTION_foo to be 1 if the group is enabled, or #defines that"
++ print " symbol to be 0 if the group is disabled. */"
++ print ""
++ print "#ifndef __GNU_OPTION_GROUPS_H"
++ print "#define __GNU_OPTION_GROUPS_H"
++ print ""
++
++ # Produce a sorted list of variable names.
++ i=0
++ for (var in vars)
++ names[i++] = var
++ n = asort (names)
++
++ for (i = 1; i <= n; i++)
++ {
++ var = names[i]
++ if (var ~ /^OPTION_/)
++ {
++ if (vars[var] == "y")
++ print "#define __" var " 1"
++ else if (vars[var] == "n")
++ print "#define __" var " 0"
++ else if (vars[var] ~ /^[0-9]+/ ||
++ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
++ vars[var] ~ /^\"/)
++ print "#define __" var " " vars[var]
++ else
++ print "/* #undef __" var " */"
++ # Ignore variables that don't have boolean, int, hex, or
++ # string values. Ideally, this would be driven by the types
++ # given in option-groups.def.
++ }
++ }
++
++ print ""
++ print "#endif /* __GNU_OPTION_GROUPS_H */"
++}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch b/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch
index 6ea666b1d6..6ea666b1d6 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch
+++ b/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch
index 60532cbd03..5b819bc458 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch
+++ b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch
@@ -3,11 +3,11 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -40,7 +40,7 @@
simultaneously. */
double
@@ -16,8 +16,8 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
+@@ -77,7 +77,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -25,7 +25,7 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+@@ -126,4 +126,12 @@
}
return f_wash (b);
}
@@ -38,11 +38,11 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -38,7 +38,7 @@
square root. */
float
@@ -51,7 +51,7 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
+@@ -93,4 +93,10 @@
}
return f_washf (b);
}
@@ -62,11 +62,11 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ return __slow_ieee754_sqrtf (x);
+}
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -40,7 +40,7 @@
simultaneously. */
double
@@ -75,8 +75,8 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
+@@ -77,7 +77,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -84,7 +84,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+@@ -126,4 +126,12 @@
}
return f_wash (b);
}
@@ -97,11 +97,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -38,7 +38,7 @@
square root. */
float
@@ -110,7 +110,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
+@@ -93,4 +93,11 @@
}
return f_washf (b);
}
@@ -122,11 +122,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -139,8 +139,8 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -148,7 +148,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -161,11 +161,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -178,7 +178,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -191,11 +191,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -208,8 +208,8 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -217,7 +217,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -230,11 +230,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -247,7 +247,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -260,11 +260,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -277,8 +277,8 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -286,7 +286,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -299,11 +299,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -316,7 +316,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -329,11 +329,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -346,11 +346,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch
index 4c6c1070c3..4c6c1070c3 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch
+++ b/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch b/meta/recipes-core/glibc/glibc/relocatable_sdk.patch
index ca5f17ba58..ca5f17ba58 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch
+++ b/meta/recipes-core/glibc/glibc/relocatable_sdk.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch
index f164f8f9ae..f164f8f9ae 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch
+++ b/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch
diff --git a/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch
new file mode 100644
index 0000000000..55547deae7
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch
@@ -0,0 +1,38 @@
+timezone: re-written tzselect as posix sh
+
+To avoid the bash dependency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ timezone/Makefile | 2 +-
+ timezone/tzselect.ksh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/timezone/Makefile
+===================================================================
+--- git.orig/timezone/Makefile 2014-08-27 05:35:58.008070587 +0000
++++ git/timezone/Makefile 2014-08-27 05:36:37.908070587 +0000
+@@ -114,7 +114,7 @@
+
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+- sed -e 's|/bin/bash|$(BASH)|' \
++ sed -e 's|/bin/bash|/bin/sh|' \
+ -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
+ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+Index: git/timezone/tzselect.ksh
+===================================================================
+--- git.orig/timezone/tzselect.ksh 2014-08-27 05:35:58.008070587 +0000
++++ git/timezone/tzselect.ksh 2014-08-27 05:35:58.000070587 +0000
+@@ -35,7 +35,7 @@
+
+ # Specify default values for environment variables if they are unset.
+ : ${AWK=awk}
+-: ${TZDIR=`pwd`}
++: ${TZDIR=$(pwd)}
+
+ # Check for awk Posix compliance.
+ ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
diff --git a/meta/recipes-core/eglibc/eglibc_2.19.bb b/meta/recipes-core/glibc/glibc_2.20.bb
index 2d354cbec5..8a8b296def 100644
--- a/meta/recipes-core/eglibc/eglibc_2.19.bb
+++ b/meta/recipes-core/glibc/glibc_2.20.bb
@@ -1,9 +1,12 @@
-require eglibc.inc
+require glibc.inc
DEPENDS += "gperf-native kconfig-frontends-native"
-SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25243.tar.bz2 \
- file://eglibc-svn-arm-lowlevellock-include-tls.patch \
+PV = "2.20"
+
+SRCREV = "b8079dd0d360648e4e8de48656c5c38972621072"
+
+SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \
file://IO-acquire-lock-fix.patch \
file://mips-rld-map-check.patch \
file://etc/ld.so.conf \
@@ -11,26 +14,38 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25
file://glibc.fix_sqrt2.patch \
file://multilib_readlib.patch \
file://ppc-sqrt_finite.patch \
- file://GLRO_dl_debug_mask.patch \
- file://initgroups_keys.patch \
- file://eglibc_fix_findidx_parameters.patch \
file://ppc_slow_ieee754_sqrt.patch \
- file://fileops-without-wchar-io.patch \
file://add_resource_h_to_wait_h.patch \
- file://0001-eglibc-menuconfig-support.patch \
- file://0002-eglibc-menuconfig-hex-string-options.patch \
- file://0003-eglibc-menuconfig-build-instructions.patch \
file://fsl-ppc-no-fsqrt.patch \
file://0001-R_ARM_TLS_DTPOFF32.patch \
file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://fix-tibetian-locales.patch \
file://ppce6500-32b_slow_ieee754_sqrt.patch \
file://grok_gold.patch \
- file://fix_am_rootsbindir.patch;striplevel=2 \
+ file://fix_am_rootsbindir.patch \
+ ${EGLIBCPATCHES} \
+ ${CVEPATCHES} \
"
-SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd"
-SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c"
+EGLIBCPATCHES = "\
+ file://timezone-re-written-tzselect-as-posix-sh.patch \
+ file://eglibc.patch \
+ file://option-groups.patch \
+ file://GLRO_dl_debug_mask.patch \
+ file://eglibc-header-bootstrap.patch \
+ file://eglibc-resolv-dynamic.patch \
+ file://eglibc-ppc8xx-cache-line-workaround.patch \
+ file://eglibc-sh4-fpscr_values.patch \
+ file://eglibc-use-option-groups.patch \
+ "
+# file://eglibc-install-pic-archives.patch \
+# file://initgroups_keys.patch \
+#
+CVEPATCHES = "\
+ file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
+ file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
+ file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \
+ "
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
@@ -40,7 +55,7 @@ SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
file://relocatable_sdk.patch \
file://relocatable_sdk_fix_openpath.patch \
"
-S = "${WORKDIR}/eglibc-${PV}/libc"
+S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"
PACKAGES_DYNAMIC = ""
@@ -76,15 +91,18 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-selinux \
--enable-obsolete-rpc \
--with-kconfig=${STAGING_BINDIR_NATIVE} \
+ --disable-nscd \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
+
do_patch_append() {
bb.build.exec_func('do_fix_readlib_c', d)
}
-# for mips eglibc now builds syscall tables for all abi's
+# for mips glibc now builds syscall tables for all abi's
# so we make sure that we choose right march option which is
# compatible with o32,n32 and n64 abi's
# e.g. -march=mips32 is not compatible with n32 and n64 therefore
@@ -139,6 +157,6 @@ do_compile () {
}
-require eglibc-package.inc
+require glibc-package.inc
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch
index cdfeaeadd8..cdfeaeadd8 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README b/meta/recipes-core/glibc/ldconfig-native-2.12.1/README
index 43fb983729..43fb983729 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/README
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch
index 7f8e4db78a..7f8e4db78a 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch
new file mode 100644
index 0000000000..6aecfe5268
--- /dev/null
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Fix problem during parsing of ELF headers for 64bit on big-endian.
+Some header fields were read with wrong size.
+
+2014/10/24
+Par Olsson <Par.Olsson@windriver.com>
+Shan Hai <shan.hai@windriver.com>
+
+diff --git a/readelflib.c b/readelflib.c
+index 3f5b25b..0bf0de3 100644
+--- a/readelflib.c
++++ b/readelflib.c
+@@ -261,8 +261,8 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ int i;
+ unsigned int j;
+ Elf64_Addr loadaddr;
+- unsigned int dynamic_addr;
+- size_t dynamic_size;
++ Elf64_Addr dynamic_addr;
++ Elf64_Xword dynamic_size;
+ char *program_interpreter;
+
+ Elf64_Ehdr *elf_header;
+@@ -311,7 +311,7 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ error (0, 0, _("more than one dynamic segment\n"));
+
+ dynamic_addr = read64(segment->p_offset, be);
+- dynamic_size = read32(segment->p_filesz, be);
++ dynamic_size = read64(segment->p_filesz, be);
+ break;
+
+ case PT_INTERP:
+@@ -329,11 +329,11 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ break;
+
+ case PT_NOTE:
+- if (!*osversion && read32(segment->p_filesz, be) >= 32 && read32(segment->p_align, be) >= 4)
++ if (!*osversion && read64(segment->p_filesz, be) >= 32 && read64(segment->p_align, be) >= 4)
+ {
+ Elf64_Word *abi_note = (Elf64_Word *) (file_contents
+ + read64(segment->p_offset, be));
+- Elf64_Addr size = read32(segment->p_filesz, be);
++ Elf64_Xword size = read64(segment->p_filesz, be);
+
+ while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16
+ || read32(abi_note [2], be) != 1
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch
index a18b2c20de..a18b2c20de 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch
index 4e9aab9416..4e9aab9416 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
index 5ed4f6ff69..5ed4f6ff69 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2 b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
index dc1e79888e..dc1e79888e 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
Binary files differ
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch
index 52986e61c7..52986e61c7 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
index 27bc411078..27bc411078 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
index 7c3463589b..1debf8ee2f 100644
--- a/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb
+++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
file://flag_fix.patch \
file://endianess-header.patch \
file://ldconfig-default-to-all-multilib-dirs.patch \
+ file://endian-ness_handling_fix.patch \
"
PR = "r2"
diff --git a/meta/recipes-core/eglibc/site_config/funcs b/meta/recipes-core/glibc/site_config/funcs
index ccc85392d7..ccc85392d7 100644
--- a/meta/recipes-core/eglibc/site_config/funcs
+++ b/meta/recipes-core/glibc/site_config/funcs
diff --git a/meta/recipes-core/eglibc/site_config/headers b/meta/recipes-core/glibc/site_config/headers
index 609ab53797..609ab53797 100644
--- a/meta/recipes-core/eglibc/site_config/headers
+++ b/meta/recipes-core/glibc/site_config/headers
diff --git a/meta/recipes-core/eglibc/site_config/types b/meta/recipes-core/glibc/site_config/types
index 178bd85a00..178bd85a00 100644
--- a/meta/recipes-core/eglibc/site_config/types
+++ b/meta/recipes-core/glibc/site_config/types
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
index b04a1b6a73..6472e87509 100644
--- a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
@@ -1,17 +1,23 @@
.encoding = "UTF-8"
-displayname = "Yocto Build Appliance"
-guestos = "other"
-tools.syncTime = "FALSE"
-virtualhw.version = "8"
config.version = "8"
+virtualHW.version = "10"
numvcpus = "2"
-cpuid.coresPerSocket = "1"
vcpu.hotadd = "TRUE"
-mem.hotadd = "TRUE"
memsize = "4096"
-svga.autodetect = "TRUE"
+mem.hotadd = "TRUE"
+sata0.present = "TRUE"
+sata0:0.present = "TRUE"
+sata0:0.fileName = "Yocto_Build_Appliance.vmdk"
+ethernet0.present = "TRUE"
+ethernet0.virtualDev = "e1000"
+ethernet0.wakeOnPcktRcv = "FALSE"
+ethernet0.addressType = "generated"
+usb.present = "TRUE"
+ehci.pciSlotNumber = "0"
+sound.present = "TRUE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
pciBridge0.present = "TRUE"
-mks.enable3d = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
@@ -25,28 +31,16 @@ pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
-floppy0.present = "TRUE"
-floppy0.fileType = "device"
-floppy0.autodetect = "FALSE"
-floppy0.startConnected = "FALSE"
-ide1:0.present = "TRUE"
-ide1:0.deviceType = "atapi-cdrom"
-ide1:0.autodetect = "TRUE"
-ide1:0.startConnected = "FALSE"
-ide0:0.present = "TRUE"
-ide0:0.deviceType = "disk"
-ide0:0.fileName = "Yocto_Build_Appliance.vmdk"
-usb.present = "TRUE"
-scsi0.virtualDev = "lsilogic"
-scsi0.present = "TRUE"
-ethernet0.present = "TRUE"
-ethernet0.virtualDev = "e1000"
-ethernet0.connectionType = "bridged"
-ethernet0.startConnected = "TRUE"
-ethernet0.addressType = "generated"
-sound.present = "TRUE"
-sound.virtualDev = "es1371"
-sound.autodetect = "TRUE"
-extendedConfigFile = "Yocto_Build_Appliance.vmxf"
-sound.fileName = "-1"
+hpet0.present = "TRUE"
+usb.vbluetooth.startConnected = "TRUE"
+displayName = "Yocto Build Appliance"
+guestOS = "other3xlinux-64"
virtualHW.productCompatibility = "hosted"
+gui.exitOnCLIHLT = "FALSE"
+powerType.powerOff = "soft"
+powerType.powerOn = "soft"
+powerType.suspend = "soft"
+powerType.reset = "soft"
+extendedConfigFile = "Yocto_Build_Appliance.vmxf"
+scsi0:0.present = "FALSE"
+floppy0.present = "FALSE"
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
index ca3f0264d6..9e941ff2f3 100644
--- a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Foundry>
<VM>
-<VMId type="string">52 e4 0b df 7b 70 21 f8-88 56 a7 26 47 43 95 93</VMId>
+<VMId type="string">52 a5 d8 cb ed 6c 85 48-cd 99 68 af cc 30 a0 98</VMId>
<ClientMetaData>
<clientMetaDataAttributes/>
<HistoryEventList/></ClientMetaData>
diff --git a/meta/recipes-core/images/build-appliance-image_8.0.bb b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
index 1c07156cdd..e2b8bbc6ff 100644
--- a/meta/recipes-core/images/build-appliance-image_8.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
inherit core-image
-SRCREV ?= "cc7d457392133ad2ecf7335447a4a01a0d8a8e4e"
+SRCREV ?= "e24043500078733533a615f043c1af328354e3bd"
SRC_URI = "git://git.yoctoproject.org/poky \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/{{=machine}}/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces
index 16967763e5..16967763e5 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/{{=machine}}/interfaces
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
index 3d88506c05..733ae41f20 100644
--- a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
@@ -16,6 +16,8 @@ SRC_URI = "file://copyright \
file://interfaces \
file://nfsroot"
+S = "${WORKDIR}"
+
do_install () {
install -d ${D}${sysconfdir}/init.d \
${D}${sysconfdir}/network/if-pre-up.d \
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 8bd70251cd..89d0750b09 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -14,46 +14,76 @@ boot_size=20
# 5% for swap
swap_ratio=5
-found="no"
-
-echo "Searching for a hard drive..."
-for device in 'hda' 'hdb' 'sda' 'sdb' 'mmcblk0' 'mmcblk1'
-do
- if [ -e /sys/block/${device}/removable ]; then
- if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then
- found="yes"
-
- while true; do
- # Try sleeping here to avoid getting kernel messages
- # obscuring/confusing user
- sleep 5
- echo "Found drive at /dev/${device}. Do you want to install this image there ? [y/n]"
- read answer
- if [ "$answer" = "y" ] ; then
- break
- fi
-
- if [ "$answer" = "n" ] ; then
- found=no
- break
- fi
-
- echo "Please answer y or n"
- done
- fi
- fi
+# Get a list of hard drives
+hdnamelist=""
+live_dev_name=${1%%/*}
+live_dev_name=${live_dev_name%%[0-9]*}
+
+echo "Searching for hard drives ..."
+
+for device in `ls /sys/block/`; do
+ case $device in
+ loop*)
+ # skip loop device
+ ;;
+ sr*)
+ # skip CDROM device
+ ;;
+ ram*)
+ # skip ram device
+ ;;
+ *)
+ # skip the device LiveOS is on
+ # Add valid hard drive name to the list
+ if [ $device != $live_dev_name -a -e /dev/$device ]; then
+ hdnamelist="$hdnamelist $device"
+ fi
+ ;;
+ esac
+done
- if [ "$found" = "yes" ]; then
- break;
+TARGET_DEVICE_NAME=""
+for hdname in $hdnamelist; do
+ # Display found hard drives and their basic info
+ echo "-------------------------------"
+ echo /dev/$hdname
+ if [ -r /sys/block/$hdname/device/vendor ]; then
+ echo -n "VENDOR="
+ cat /sys/block/$hdname/device/vendor
+ fi
+ if [ -r /sys/block/$hdname/device/model ]; then
+ echo -n "MODEL="
+ cat /sys/block/$hdname/device/model
+ fi
+ if [ -r /sys/block/$hdname/device/uevent ]; then
+ echo -n "UEVENT="
+ cat /sys/block/$hdname/device/uevent
+ fi
+ echo
+ # Get user choice
+ while true; do
+ echo -n "Do you want to install this image there? [y/n] "
+ read answer
+ if [ "$answer" = "y" -o "$answer" = "n" ]; then
+ break
+ fi
+ echo "Please answer y or n"
+ done
+ if [ "$answer" = "y" ]; then
+ TARGET_DEVICE_NAME=$hdname
+ break
fi
done
-if [ "$found" = "no" ]; then
+if [ -n "$TARGET_DEVICE_NAME" ]; then
+ echo "Installing image on /dev/$TARGET_DEVICE_NAME ..."
+else
+ echo "No hard drive selected. Installation aborted."
exit 1
fi
-echo "Installing image on /dev/${device}"
+device=$TARGET_DEVICE_NAME
#
# The udev automounter can cause pain here, kill it
@@ -123,34 +153,32 @@ mkfs.ext3 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
-mkdir /ssd
-mkdir /rootmnt
-mkdir /bootmnt
-
-mount $rootfs /ssd
-mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt
+mkdir /tgt_root
+mkdir /src_root
+mkdir -p /boot
+# Handling of the target root partition
+mount $rootfs /tgt_root
+mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
echo "Copying rootfs files..."
-cp -a /rootmnt/* /ssd
-
-if [ -d /ssd/etc/ ] ; then
- echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab
-
+cp -a /src_root/* /tgt_root
+if [ -d /tgt_root/etc/ ] ; then
+ echo "$swap swap swap defaults 0 0" >> /tgt_root/etc/fstab
+ echo "$bootfs /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
- if [ -d /ssd/etc/udev/ ] ; then
- echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
+ if [ -d /tgt_root/etc/udev/ ] ; then
+ echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
fi
fi
-umount /ssd
-umount /rootmnt
+umount /src_root
+# Handling of the target boot partition
+mount $bootfs /boot
echo "Preparing boot partition..."
-mount $bootfs /ssd
-EFIDIR="/ssd/EFI/BOOT"
+EFIDIR="/boot/EFI/BOOT"
mkdir -p $EFIDIR
-cp /run/media/$1/vmlinuz /ssd
# Copy the efi loader
cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
@@ -171,11 +199,11 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
fi
if [ -d /run/media/$1/loader ]; then
- GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf"
+ GUMMIBOOT_CFGS="/tgt_root/loader/entries/*.conf"
# copy config files for gummiboot
- cp -dr /run/media/$1/loader /ssd
+ cp -dr /run/media/$1/loader /tgt_root
# delete the install entry
- rm -f /ssd/loader/entries/install.conf
+ rm -f /tgt_root/loader/entries/install.conf
# delete the initrd lines
sed -i "/initrd /d" $GUMMIBOOT_CFGS
# delete any LABEL= strings
@@ -186,7 +214,12 @@ if [ -d /run/media/$1/loader ]; then
sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS
fi
-umount /ssd
+umount /tgt_root
+
+cp /run/media/$1/vmlinuz /boot
+
+umount /boot
+
sync
echo "Remove your installation media, and press ENTER"
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 486c9f2635..fb537ee310 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -16,6 +16,7 @@ swap_ratio=5
# Get a list of hard drives
hdnamelist=""
live_dev_name=${1%%/*}
+live_dev_name=${live_dev_name%%[0-9]*}
echo "Searching for hard drives ..."
@@ -24,6 +25,9 @@ for device in `ls /sys/block/`; do
loop*)
# skip loop device
;;
+ sr*)
+ # skip CDROM device
+ ;;
ram*)
# skip ram device
;;
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 28219641a4..d852c5737f 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -8,6 +8,8 @@ MOUNT="/bin/mount"
UMOUNT="/bin/umount"
ISOLINUX=""
+ROOT_DISK=""
+
# Copied from initramfs-framework. The core of this script probably should be
# turned into initramfs-framework modules to reduce duplication.
udev_daemon() {
@@ -80,6 +82,10 @@ boot_live_root() {
udevadm settle --timeout=3 --quiet
killall "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # Allow for identification of the real root even after boot
+ mkdir -p ${ROOT_MOUNT}/media/realroot
+ mount -n --move "/run/media/${ROOT_DISK}" ${ROOT_MOUNT}/media/realroot
+
# Move the mount points of some filesystems over to
# the corresponding directories under the real root filesystem.
for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
@@ -116,10 +122,12 @@ do
for i in `ls /run/media 2>/dev/null`; do
if [ -f /run/media/$i/$ROOT_IMAGE ] ; then
found="yes"
+ ROOT_DISK="$i"
break
elif [ -f /run/media/$i/isolinux/$ROOT_IMAGE ]; then
found="yes"
ISOLINUX="isolinux"
+ ROOT_DISK="$i"
break
fi
done
@@ -150,7 +158,7 @@ mount_and_boot() {
mkdir $ROOT_MOUNT
mknod /dev/loop0 b 7 0 2>/dev/null
- if ! mount -o rw,loop,noatime,nodiratime /run/media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
+ if ! mount -o rw,loop,noatime,nodiratime /run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
fatal "Could not mount rootfs image"
fi
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
index 0ede20b15d..7ae7969f5e 100644
--- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-boot.sh"
PR = "r2"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 403127be09..89b900dba9 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -14,6 +14,8 @@ SRC_URI = "file://init \
file://e2fs \
file://debug"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}/init.d
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
index 2d378e2101..b54cb619f1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -5,7 +5,9 @@ DEPENDS = "virtual/kernel"
RDEPENDS_${PN} = "udev udev-extraconf"
SRC_URI = "file://init-live.sh"
-PR = "r11"
+PR = "r12"
+
+S = "${WORKDIR}"
do_install() {
install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
@@ -13,5 +15,5 @@ do_install() {
FILES_${PN} += " /init "
-# Due to kernel depdendency
+# Due to kernel dependency
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
index a54960c596..c03bd2d765 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install-efi-testfs.sh"
RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-efi-testfs.sh ${D}/install-efi.sh
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index 7195dc2718..b0994d78c3 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -7,6 +7,8 @@ PR = "r1"
RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/install-efi.sh
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
index db4cf544e8..937bfd4d38 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install-testfs.sh"
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-testfs.sh ${D}/install.sh
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index 7bf31c9cf8..6241a90e20 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install.sh"
PR = "r9"
+S = "${WORKDIR}"
+
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
do_install() {
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index 3b5a47fcdd..df553bc079 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -36,7 +36,12 @@ if [ -f "${SYSCTL_CONF}" ]
then
if [ -x "/sbin/sysctl" ]
then
- /sbin/sysctl -p "${SYSCTL_CONF}"
+ # busybox sysctl does not support -q
+ VERBOSE_REDIR="1>/dev/null"
+ if [ "${VERBOSE}" != "no" ]; then
+ VERBOSE_REDIR="1>&1"
+ fi
+ eval /sbin/sysctl -p "${SYSCTL_CONF}" $VERBOSE_REDIR
else
echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
fi
@@ -61,10 +66,15 @@ fi
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
if test -e /etc/timestamp
then
- SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
+ SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S`
read TIMESTAMP < /etc/timestamp
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
- date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
+ # format the timestamp as date expects it (2m2d2H2M4Y.2S)
+ TS_YR=${TIMESTAMP%??????????}
+ TS_SEC=${TIMESTAMP#????????????}
+ TS_FIRST12=${TIMESTAMP%??}
+ TS_MIDDLE8=${TS_FIRST12#????}
+ date -u ${TS_MIDDLE8}${TS_YR}.${TS_SEC}
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
fi
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
index 78fb91c409..95287cc139 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
@@ -16,7 +16,7 @@ fi
# Busybox hostname doesn't support -b so we need implement it on our own
if [ -f /etc/hostname ];then
- hostname -F /etc/hostname
+ hostname `cat /etc/hostname`
elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
hostname localhost
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
index 1f804e2374..b038fc59d4 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -10,4 +10,4 @@
### END INIT INFO
# Update the timestamp
-date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
+date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/urandom b/meta/recipes-core/initscripts/initscripts-1.0/urandom
index eb3a7c3359..af1625b5fd 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/urandom
+++ b/meta/recipes-core/initscripts/initscripts-1.0/urandom
@@ -12,20 +12,23 @@
### END INIT INFO
test -c /dev/urandom || exit 0
+
+RANDOM_SEED_FILE=/var/lib/urandom/random-seed
+
. /etc/default/rcS
+[ -f /etc/default/urandom ] && . /etc/default/urandom
case "$1" in
start|"")
test "$VERBOSE" != no && echo "Initializing random number generator..."
- # Load and then save 512 bytes,
- # which is the size of the entropy pool
- if test -f /var/lib/urandom/random-seed
- then
- cat /var/lib/urandom/random-seed >/dev/urandom
- fi
- rm -f /var/lib/urandom/random-seed
+ # Load and then save 512 bytes, which is the size of the entropy
+ # pool. Also load the current date, in case the seed file is
+ # empty.
+ ( date +%s.%N; [ -f "$RANDOM_SEED_FILE" ] && cat "$RANDOM_SEED_FILE" ) \
+ >/dev/urandom
+ rm -f "$RANDOM_SEED_FILE"
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
;;
@@ -34,7 +37,7 @@ case "$1" in
# see documentation in linux/drivers/char/random.c
test "$VERBOSE" != no && echo "Saving random seed..."
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
;;
*)
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 7273a82367..dfb75b261b 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -35,6 +35,8 @@ SRC_URI = "file://functions \
file://logrotate-dmesg.conf \
"
+S = "${WORKDIR}"
+
SRC_URI_append_arm = " file://alignment.sh"
KERNEL_VERSION = ""
@@ -139,11 +141,15 @@ do_install () {
MASKED_SCRIPTS = " \
banner \
bootmisc \
+ checkfs \
checkroot \
devpts \
+ dmesg \
hostname \
mountall \
mountnfs \
+ populate-volatile \
+ read-only-rootfs-hook \
rmnologin \
sysfs \
urandom"
@@ -158,3 +164,5 @@ pkg_postinst_${PN} () {
done
fi
}
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh"
diff --git a/meta/recipes-core/kbd/kbd_2.0.1.bb b/meta/recipes-core/kbd/kbd_2.0.2.bb
index 9c6eabbfb6..0aa976a46b 100644
--- a/meta/recipes-core/kbd/kbd_2.0.1.bb
+++ b/meta/recipes-core/kbd/kbd_2.0.2.bb
@@ -10,12 +10,12 @@ RREPLACES_${PN} = "console-tools"
RPROVIDES_${PN} = "console-tools"
RCONFLICTS_${PN} = "console-tools"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
file://uclibc-stdarg.patch \
"
-SRC_URI[md5sum] = "f80b93a6abddb6cc2a3652daaf7562ba"
-SRC_URI[sha256sum] = "223d60bb6882323cca161aeb5965590768b2f590fd7cddbf27511ad0ba7a429e"
+SRC_URI[md5sum] = "87475eb78b1d6e6ab06686dd323ad4ba"
+SRC_URI[sha256sum] = "9dfddabf96012e329c4bebb96a21aeef7c3872f624e96e8156ba542b82aeb912"
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc
index e0b50cf207..1314bbfb8d 100644
--- a/meta/recipes-core/libxml/libxml2.inc
+++ b/meta/recipes-core/libxml/libxml2.inc
@@ -20,17 +20,21 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
file://run-ptest \
file://libxml2-CVE-2014-0191-fix.patch \
file://python-sitepackages-dir.patch \
+ file://libxml-m4-use-pkgconfig.patch \
+ file://configure.ac-fix-cross-compiling-warning.patch \
"
BINCONFIG = "${bindir}/xml2-config"
inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-RDEPENDS_${PN}-ptest_append_libc-glibc += "eglibc-gconv-ebcdic-us eglibc-gconv-ibm1141"
+RDEPENDS_${PN}-ptest += "python-core"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
do_configure_prepend () {
- sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
+ sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.ac
}
do_configure_prepend_class-nativesdk () {
@@ -38,10 +42,11 @@ do_configure_prepend_class-nativesdk () {
export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
}
-EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
-EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
-EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-catalog --with-docbook --with-c14n --without-lzma"
+# WARNING: zlib is require for RPM use
+EXTRA_OECONF = "--without-python --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
# required for pythong binding
export HOST_SYS
@@ -61,7 +66,7 @@ PACKAGES += "${PN}-utils ${PN}-python"
FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
FILES_${PN}-utils += "${bindir}/*"
FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch b/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
new file mode 100644
index 0000000000..10a8112b58
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
@@ -0,0 +1,30 @@
+From 72a46a519ce7326d9a00f0b6a7f2a8e958cd1675 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 23 Oct 2014 11:35:36 +0800
+Subject: Fix missing entities after CVE-2014-3660 fix
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=738805
+
+The fix for CVE-2014-3660 introduced a regression in some case
+where entity substitution is required and the entity is used
+first in anotther entity referenced from an attribute value
+
+Upstream-Status: Backport
+
+diff --git a/parser.c b/parser.c
+index 67c9dfd..a8d1b67 100644
+--- a/parser.c
++++ b/parser.c
+@@ -7235,7 +7235,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ * far more secure as the parser will only process data coming from
+ * the document entity by default.
+ */
+- if ((ent->checked == 0) &&
++ if (((ent->checked == 0) ||
++ ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
+ ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
+ (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
+ unsigned long oldnbent = ctxt->nbentities;
+--
+cgit v0.10.1
+
diff --git a/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
new file mode 100644
index 0000000000..2f8079b052
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
@@ -0,0 +1,45 @@
+configure.ac: fix cross compiling warning
+
+There is a warning while cross compiling which triggered a
+failure by do_qa_configure
+...
+|configure:12652: checking for gzread in -lz
+|configure:12677: mips-poky-linux-gcc -meb -mabi=32 -mhard-float
+ -L/lib conftest.c -lz >&5
+|ld: warning: library search path "/lib" is unsafe for cross-compilation
+...
+
+While do the lib checking, do not add '-L${Z_DIR}/lib' to LDFLAGS could fix it.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9a90600..0bac8a4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -391,8 +391,6 @@ if test "$with_zlib" = "no"; then
+ echo "Disabling compression support"
+ else
+ AC_CHECK_HEADERS(zlib.h,
+- [SAVE_LDFLAGS="${LDFLAGS}"
+- LDFLAGS="-L${Z_DIR}/lib"
+ AC_CHECK_LIB(z, gzread,[
+ AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
+ WITH_ZLIB=1
+@@ -406,8 +404,7 @@ else
+ esac]
+ else
+ Z_LIBS="-lz"
+- fi])
+- LDFLAGS="${SAVE_LDFLAGS}"])
++ fi]))
+ fi
+
+ AC_SUBST(Z_CFLAGS)
+--
+1.9.1
+
diff --git a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
new file mode 100644
index 0000000000..0fc84070ed
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -0,0 +1,204 @@
+AM_PATH_XML2 uses xml-config which we disable through
+binconfig-disabled.bbclass, so port it to use pkg-config instead.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/libxml.m4 b/libxml.m4
+index 68cd824..5fa0a9b 100644
+--- a/libxml.m4
++++ b/libxml.m4
+@@ -1,188 +1,12 @@
+-# Configure paths for LIBXML2
+-# Mike Hommey 2004-06-19
+-# use CPPFLAGS instead of CFLAGS
+-# Toshio Kuratomi 2001-04-21
+-# Adapted from:
+-# Configure paths for GLIB
+-# Owen Taylor 97-11-3
+-
+ dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
+ dnl
+-AC_DEFUN([AM_PATH_XML2],[
+-AC_ARG_WITH(xml-prefix,
+- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
+- xml_config_prefix="$withval", xml_config_prefix="")
+-AC_ARG_WITH(xml-exec-prefix,
+- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
+- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
+-AC_ARG_ENABLE(xmltest,
+- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
+- enable_xmltest=yes)
+-
+- if test x$xml_config_exec_prefix != x ; then
+- xml_config_args="$xml_config_args"
+- if test x${XML2_CONFIG+set} != xset ; then
+- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
+- fi
+- fi
+- if test x$xml_config_prefix != x ; then
+- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
+- if test x${XML2_CONFIG+set} != xset ; then
+- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
+- fi
+- fi
+-
+- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
+- min_xml_version=ifelse([$1], ,2.0.0,[$1])
+- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
+- no_xml=""
+- if test "$XML2_CONFIG" = "no" ; then
+- no_xml=yes
+- else
+- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
+- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
+- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+- if test "x$enable_xmltest" = "xyes" ; then
+- ac_save_CPPFLAGS="$CPPFLAGS"
+- ac_save_LIBS="$LIBS"
+- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+- LIBS="$XML_LIBS $LIBS"
+-dnl
+-dnl Now check if the installed libxml is sufficiently new.
+-dnl (Also sanity checks the results of xml2-config to some extent)
+-dnl
+- rm -f conf.xmltest
+- AC_TRY_RUN([
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <string.h>
+-#include <libxml/xmlversion.h>
+-
+-int
+-main()
+-{
+- int xml_major_version, xml_minor_version, xml_micro_version;
+- int major, minor, micro;
+- char *tmp_version;
+-
+- system("touch conf.xmltest");
+-
+- /* Capture xml2-config output via autoconf/configure variables */
+- /* HP/UX 9 (%@#!) writes to sscanf strings */
+- tmp_version = (char *)strdup("$min_xml_version");
+- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
+- exit(1);
+- }
+- free(tmp_version);
+-
+- /* Capture the version information from the header files */
+- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
+- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
+- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
+- exit(1);
+- }
+- free(tmp_version);
+-
+- /* Compare xml2-config output to the libxml headers */
+- if ((xml_major_version != $xml_config_major_version) ||
+- (xml_minor_version != $xml_config_minor_version) ||
+- (xml_micro_version != $xml_config_micro_version))
+- {
+- printf("*** libxml header files (version %d.%d.%d) do not match\n",
+- xml_major_version, xml_minor_version, xml_micro_version);
+- printf("*** xml2-config (version %d.%d.%d)\n",
+- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
+- return 1;
+- }
+-/* Compare the headers to the library to make sure we match */
+- /* Less than ideal -- doesn't provide us with return value feedback,
+- * only exits if there's a serious mismatch between header and library.
+- */
+- LIBXML_TEST_VERSION;
+-
+- /* Test that the library is greater than our minimum version */
+- if ((xml_major_version > major) ||
+- ((xml_major_version == major) && (xml_minor_version > minor)) ||
+- ((xml_major_version == major) && (xml_minor_version == minor) &&
+- (xml_micro_version >= micro)))
+- {
+- return 0;
+- }
+- else
+- {
+- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
+- xml_major_version, xml_minor_version, xml_micro_version);
+- printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
+- major, minor, micro);
+- printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
+- printf("***\n");
+- printf("*** If you have already installed a sufficiently new version, this error\n");
+- printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
+- printf("*** being found. The easiest way to fix this is to remove the old version\n");
+- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
+- printf("*** correct copy of xml2-config. (In this case, you will have to\n");
+- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+- printf("*** so that the correct libraries are found at run-time))\n");
+- }
+- return 1;
+-}
+-],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+- CPPFLAGS="$ac_save_CPPFLAGS"
+- LIBS="$ac_save_LIBS"
+- fi
+- fi
++AC_DEFUN([AM_PATH_XML2],[
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+- if test "x$no_xml" = x ; then
+- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
+- ifelse([$2], , :, [$2])
+- else
+- AC_MSG_RESULT(no)
+- if test "$XML2_CONFIG" = "no" ; then
+- echo "*** The xml2-config script installed by LIBXML could not be found"
+- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
+- echo "*** your path, or set the XML2_CONFIG environment variable to the"
+- echo "*** full path to xml2-config."
+- else
+- if test -f conf.xmltest ; then
+- :
+- else
+- echo "*** Could not run libxml test program, checking why..."
+- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+- LIBS="$LIBS $XML_LIBS"
+- AC_TRY_LINK([
+-#include <libxml/xmlversion.h>
+-#include <stdio.h>
+-], [ LIBXML_TEST_VERSION; return 0;],
+- [ echo "*** The test program compiled, but did not run. This usually means"
+- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
+- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
+- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+- echo "*** to the installed location Also, make sure you have run ldconfig if that"
+- echo "*** is required on your system"
+- echo "***"
+- echo "*** If you have an old version installed, it is best to remove it, although"
+- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+- [ echo "*** The test program failed to compile or link. See the file config.log for the"
+- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
+- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
+- CPPFLAGS="$ac_save_CPPFLAGS"
+- LIBS="$ac_save_LIBS"
+- fi
+- fi
++ verdep=ifelse([$1], [], [], [>= $1])
++ PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3])
+
+- XML_CPPFLAGS=""
+- XML_LIBS=""
+- ifelse([$3], , :, [$3])
+- fi
++ XML_CPPFLAGS=$XML_CFLAGS
+ AC_SUBST(XML_CPPFLAGS)
+- AC_SUBST(XML_LIBS)
+- rm -f conf.xmltest
+ ])
diff --git a/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch
new file mode 100644
index 0000000000..b9621c93eb
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch
@@ -0,0 +1,147 @@
+From be2a7edaf289c5da74a4f9ed3a0b6c733e775230 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 16 Oct 2014 13:59:47 +0800
+Subject: Fix for CVE-2014-3660
+
+Issues related to the billion laugh entity expansion which happened to
+escape the initial set of fixes
+
+Upstream-status: Backport
+Reference: https://git.gnome.org/browse/libxml2/commit/?id=be2a7edaf289c5da74a4f9ed3a0b6c733e775230&context=3&ignorews=0&ss=0
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+diff --git a/parser.c b/parser.c
+index f51e8d2..1d93967 100644
+--- a/parser.c
++++ b/parser.c
+@@ -130,6 +130,29 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+ return (0);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ return (1);
++
++ /*
++ * This may look absurd but is needed to detect
++ * entities problems
++ */
++ if ((ent != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
++ (ent->content != NULL) && (ent->checked == 0)) {
++ unsigned long oldnbent = ctxt->nbentities;
++ xmlChar *rep;
++
++ ent->checked = 1;
++
++ rep = xmlStringDecodeEntities(ctxt, ent->content,
++ XML_SUBSTITUTE_REF, 0, 0, 0);
++
++ ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
++ if (rep != NULL) {
++ if (xmlStrchr(rep, '<'))
++ ent->checked |= 1;
++ xmlFree(rep);
++ rep = NULL;
++ }
++ }
+ if (replacement != 0) {
+ if (replacement < XML_MAX_TEXT_LENGTH)
+ return(0);
+@@ -189,9 +212,12 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+ return (0);
+ } else {
+ /*
+- * strange we got no data for checking just return
++ * strange we got no data for checking
+ */
+- return (0);
++ if (((ctxt->lastError.code != XML_ERR_UNDECLARED_ENTITY) &&
++ (ctxt->lastError.code != XML_WAR_UNDECLARED_ENTITY)) ||
++ (ctxt->nbentities <= 10000))
++ return (0);
+ }
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ return (1);
+@@ -2589,6 +2615,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else if (ctxt->input->free != deallocblankswrapper) {
+ input = xmlNewBlanksWrapperInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+@@ -2759,6 +2786,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
+ (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
+ goto int_error;
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if ((ent != NULL) &&
+@@ -2810,6 +2838,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ ent = xmlParseStringPEReference(ctxt, &str);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ goto int_error;
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if (ent != NULL) {
+@@ -7312,6 +7341,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ (ret != XML_WAR_UNDECLARED_ENTITY)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "Entity '%s' failed to parse\n", ent->name);
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ } else if (list != NULL) {
+ xmlFreeNodeList(list);
+ list = NULL;
+@@ -7418,7 +7448,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+- ctxt->sizeentcopy += ent->length;
++ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+@@ -7466,7 +7496,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+- ctxt->sizeentcopy += ent->length;
++ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+@@ -7652,6 +7682,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
+ ctxt->sax->reference(ctxt->userData, name);
+ }
+ }
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ ctxt->valid = 0;
+ }
+
+@@ -7845,6 +7876,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
+ "Entity '%s' not defined\n",
+ name);
+ }
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ /* TODO ? check regressions ctxt->valid = 0; */
+ }
+
+@@ -8004,6 +8036,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+@@ -8243,6 +8276,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+--
+cgit v0.10.1
+
diff --git a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
index a697ddf873..e83c8325e5 100644
--- a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
+++ b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
@@ -4,12 +4,18 @@ The python binary used when building for nativesdk doesn't give us the
correct path here so we need to be able to specify it ourselves.
Upstream-Status: Inappropriate [config]
-
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---- a/configure.in
-+++ b/configure.in
-@@ -743,7 +743,8 @@ dnl
+Rebase to 2.9.2
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -813,7 +813,8 @@ dnl
PYTHON_VERSION=
PYTHON_INCLUDES=
@@ -19,3 +25,6 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
PYTHON_TESTS=
pythondir=
if test "$with_python" != "no" ; then
+--
+1.9.1
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.1.bb b/meta/recipes-core/libxml/libxml2_2.9.2.bb
index 0b6ac5d5c6..1affff12ae 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.1.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.2.bb
@@ -1,8 +1,9 @@
require libxml2.inc
-SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar"
+SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+ file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch"
-SRC_URI[libtar.md5sum] = "9c0cfef285d5c4a5c80d00904ddab380"
-SRC_URI[libtar.sha256sum] = "fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb"
+SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788"
+SRC_URI[libtar.sha256sum] = "5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc"
SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 62e1e0bbef..302510c798 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -9,40 +9,23 @@ TOOLCHAIN_TARGET_TASK ?= ""
TOOLCHAIN_HOST_TASK ?= "\
nativesdk-python-core \
- nativesdk-python-textutils \
- nativesdk-python-sqlite3 \
- nativesdk-python-pickle \
- nativesdk-python-logging \
- nativesdk-python-elementtree \
- nativesdk-python-curses \
- nativesdk-python-compile \
- nativesdk-python-compiler \
- nativesdk-python-fcntl \
- nativesdk-python-shell \
+ nativesdk-python-modules \
nativesdk-python-misc \
- nativesdk-python-multiprocessing \
- nativesdk-python-subprocess \
- nativesdk-python-xmlrpc \
- nativesdk-python-netclient \
- nativesdk-python-netserver \
- nativesdk-python-distutils \
- nativesdk-python-unixadmin \
- nativesdk-python-compression \
- nativesdk-python-json \
- nativesdk-python-unittest \
- nativesdk-python-mmap \
- nativesdk-python-difflib \
- nativesdk-python-pprint \
nativesdk-python-git \
- nativesdk-python-pkgutil \
nativesdk-ncurses-terminfo-base \
nativesdk-chrpath \
nativesdk-tar \
+ nativesdk-buildtools-perl-dummy \
nativesdk-git \
+ nativesdk-git-perltools \
nativesdk-pigz \
nativesdk-make \
+ nativesdk-wget \
+ nativesdk-ca-certificates \
"
+SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}"
+
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
@@ -67,4 +50,6 @@ create_sdk_files_append () {
# so instead of exporting the variable, we use a comment here.
echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+ echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
}
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index cf142ef5ca..5d72e38e91 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -6,32 +6,56 @@ PR = "r8"
EXCLUDE_FROM_WORLD = "1"
+MODIFYTOS = "0"
+
+REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+
inherit toolchain-scripts
TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"
-REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
-SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
inherit cross-canadian
-do_generate_content[nostamp] = "1"
-do_generate_content() {
+do_generate_content[cleandirs] = "${SDK_OUTPUT}"
+do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
+python do_generate_content() {
+ # Handle multilibs in the SDK environment, siteconfig, etc files...
+ localdata = bb.data.createCopy(d)
- rm -rf ${SDK_OUTPUT}
- mkdir -p ${SDK_OUTPUT}/${SDKPATH}
+ # make sure we only use the WORKDIR value from 'd', or it can change
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
- toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
+ # make sure we only use the SDKTARGETSYSROOT value from 'd'
+ localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
+ localdata.setVar('libdir', d.getVar('target_libdir', False))
- toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} ${REAL_MULTIMACH_TARGET_SYS} '##SDKTARGETSYSROOT##' ${target_libdir}
+ # Process DEFAULTTUNE
+ bb.build.exec_func("create_sdk_files", localdata)
- # Add version information
- toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ # Load overrides from 'd' to avoid having to reset the value...
+ overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", item + "-")
+ bb.data.update_data(localdata)
+ bb.build.exec_func("create_sdk_files", localdata)
}
addtask generate_content before do_install after do_compile
-do_install[nostamp] = "1"
+create_sdk_files() {
+ # Setup site file for external use
+ toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
+
+ # Add version information
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+}
+
do_install() {
install -d ${D}/${SDKPATH}
install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb
index 03cad6ed69..2f92912816 100644
--- a/meta/recipes-core/meta/meta-ide-support.bb
+++ b/meta/recipes-core/meta/meta-ide-support.bb
@@ -14,5 +14,4 @@ do_populate_ide_support () {
}
do_populate_ide_support[nostamp] = "1"
-do_populate_ide_support[recrdeptask] = "do_package_write"
addtask populate_ide_support before do_build after do_install
diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
new file mode 100644
index 0000000000..d971c3ca3d
--- /dev/null
+++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit nativesdk
+
+# Put it somewhere separate to ensure it's never used except when we want it
+PACKAGE_ARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
+
+PERLPACKAGES = "nativesdk-perl \
+ nativesdk-perl-module-file-path"
+
+ALLOW_EMPTY_${PN} = "1"
+
+python populate_packages_prepend() {
+ d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}')
+ d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}')
+}
+
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
index 27b6d8ea9f..3c46b49977 100644
--- a/meta/recipes-core/meta/package-index.bb
+++ b/meta/recipes-core/meta/package-index.bb
@@ -12,7 +12,6 @@ do_compile[noexec] = "1"
do_install[noexec] = "1"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
-do_package_write[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
new file mode 100644
index 0000000000..e17685a117
--- /dev/null
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -0,0 +1,48 @@
+SUMMARY = "libc and patchelf tarball for use with uninative.bbclass"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+TOOLCHAIN_TARGET_TASK = ""
+
+TOOLCHAIN_HOST_TASK = "\
+ nativesdk-glibc \
+ nativesdk-patchelf \
+ "
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "patchelf-native"
+
+TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+
+deltask install
+deltask package
+
+SDK_PACKAGING_FUNC = ""
+
+fakeroot create_sdk_files() {
+ cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
+
+ # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
+ # Escape special characters like '+' and '.' in the SDKPATH
+ escaped_sdkpath=$(echo ${SDKPATH}/sysroots/${SDK_SYS} |sed -e "s:[\+\.]:\\\\\\\\\0:g")
+ sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
+}
+
+
+fakeroot tar_sdk() {
+ mkdir -p ${SDK_DEPLOY}
+ cd ${SDK_OUTPUT}/${SDKPATH}
+ mv sysroots/${SDK_SYS} ./${BUILD_SYS}
+ rm sysroots -rf
+ patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf
+ mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative
+ tar ${SDKTAROPTS} -c --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+}
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 521d0e435c..10f7dd175d 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -98,6 +98,8 @@ do_configure() {
# not the case for /dev/null redirections)
export cf_cv_working_poll=yes
+ # The --enable-pc-files requires PKG_CONFIG_LIBDIR existed
+ mkdir -p ${PKG_CONFIG_LIBDIR}
( cd ${S}; gnu-configize --force )
ncurses_configure "narrowc" || \
return 1
diff --git a/meta/recipes-core/netbase/netbase_5.2.bb b/meta/recipes-core/netbase/netbase_5.3.bb
index ab7ae6527c..4ac0221c9e 100644
--- a/meta/recipes-core/netbase/netbase_5.2.bb
+++ b/meta/recipes-core/netbase/netbase_5.3.bb
@@ -6,11 +6,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
PE = "1"
-SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.xz \
file://hosts"
-SRC_URI[md5sum] = "3a01bfce6a28e1743412198abd241262"
-SRC_URI[sha256sum] = "d62ba56d62b9b121664828175c2a237a7014ef32df8a4116ea33cff332de3307"
+SRC_URI[md5sum] = "2637a27fd3de02a278d2b5be7e6558c1"
+SRC_URI[sha256sum] = "81f6c69795044d62b8ad959cf9daf049d0545fd466c52860ad3f933b1e97b88b"
do_install () {
install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
new file mode 100644
index 0000000000..33e958137f
--- /dev/null
+++ b/meta/recipes-core/os-release/os-release.bb
@@ -0,0 +1,36 @@
+inherit allarch
+
+SUMMARY = "Operating system identification"
+DESCRIPTION = "The /etc/os-release file contains operating system identification data."
+LICENSE = "MIT"
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+
+# Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
+# HOME_URL SUPPORT_URL BUG_REPORT_URL
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
+
+ID = "${DISTRO}"
+NAME = "${DISTRO_NAME}"
+VERSION = "${DISTRO_VERSION}${@' (%s)' % DISTRO_CODENAME if 'DISTRO_CODENAME' in d else ''}"
+VERSION_ID = "${DISTRO_VERSION}"
+PRETTY_NAME = "${DISTRO_NAME} ${VERSION}"
+BUILD_ID ?= "${DATETIME}"
+
+python do_compile () {
+ with open(d.expand('${B}/os-release'), 'w') as f:
+ for field in d.getVar('OS_RELEASE_FIELDS', True).split():
+ value = d.getVar(field, True)
+ if value:
+ f.write('{0}={1}\n'.format(field, value))
+}
+do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
+
+do_install () {
+ install -d ${D}${sysconfdir}
+ install -m 0644 os-release ${D}${sysconfdir}/
+}
diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb
index 16f3a510d8..f4b2cd574d 100644
--- a/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -2,6 +2,11 @@ SUMMARY = "Merge machine and distro options to create a basic machine task/packa
LICENSE = "MIT"
PR = "r83"
+#
+# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
+#
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
PROVIDES = "${PACKAGES}"
@@ -39,11 +44,6 @@ PACKAGES = ' \
\
'
-#
-# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
-#
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
# Override by distro if needed
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
@@ -124,13 +124,6 @@ python __anonymous () {
if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features):
d.setVar("ADD_NFC", "packagegroup-base-nfc")
-
- # For backwards compatibility after rename
- packages = d.getVar("PACKAGES", True).split()
- for pkg in packages:
- d.appendVar("RPROVIDES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
- d.appendVar("RREPLACES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
- d.appendVar("RCONFLICTS_%s" % pkg, pkg.replace("packagegroup-", "task-"))
}
#
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index c8bc362242..09f537372e 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -7,21 +7,16 @@ DESCRIPTION = "The minimal set of packages required to boot the system"
LICENSE = "MIT"
PR = "r17"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
+inherit packagegroup
+
#
# Set by the machine configuration with packages essential for device bootup
#
MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-boot"
-RREPLACES_${PN} = "task-core-boot"
-RCONFLICTS_${PN} = "task-core-boot"
-
# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_dev_manager ?= "udev"
VIRTUAL-RUNTIME_login_manager ?= "busybox"
@@ -32,6 +27,7 @@ VIRTUAL-RUNTIME_keymaps ?= "keymaps"
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
modutils-initscripts \
init-ifupdown \
+ ${VIRTUAL-RUNTIME_initscripts} \
"
RDEPENDS_${PN} = "\
@@ -43,7 +39,6 @@ RDEPENDS_${PN} = "\
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
- ${VIRTUAL-RUNTIME_initscripts} \
${VIRTUAL-RUNTIME_dev_manager} \
${VIRTUAL-RUNTIME_update-alternatives} \
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
index 24c98c4938..247a30e063 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
@@ -10,11 +10,6 @@ inherit packagegroup
PACKAGES = "${PN}-server"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-server = "task-core-nfs-server"
-RREPLACES_${PN}-server = "task-core-nfs-server"
-RCONFLICTS_${PN}-server = "task-core-nfs-server"
-
SUMMARY_${PN}-server = "NFS server"
RDEPENDS_${PN}-server = "\
nfs-utils \
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 172398929c..a41eada5af 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -6,15 +6,12 @@ SUMMARY = "Software development tools"
LICENSE = "MIT"
PR = "r9"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
#PACKAGEFUNCS =+ 'generate_sdk_pkgs'
-# For backwards compatibility after rename
-RPROVIDES_packagegroup-core-sdk = "task-core-sdk"
-RREPLACES_packagegroup-core-sdk = "task-core-sdk"
-RCONFLICTS_packagegroup-core-sdk = "task-core-sdk"
-
RDEPENDS_packagegroup-core-sdk = "\
packagegroup-core-buildessential \
coreutils \
@@ -31,9 +28,18 @@ RDEPENDS_packagegroup-core-sdk = "\
file \
tcl"
+SANITIZERS = "libasan-dev libubsan-dev"
+SANITIZERS_aarch64 = ""
+SANITIZERS_mips = ""
+SANITIZERS_mips64 = ""
+SANITIZERS_mips64n32 = ""
+SANITIZERS_powerpc64 = ""
+SANITIZERS_sparc = ""
+
RRECOMMENDS_packagegroup-core-sdk = "\
libgomp \
- libgomp-dev"
+ libgomp-dev \
+ ${SANITIZERS}"
#python generate_sdk_pkgs () {
# poky_pkgs = read_pkgdata('packagegroup-core', d)['PACKAGES']
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
index 458d8fa036..e99946f0a7 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
@@ -4,9 +4,4 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-ssh-dropbear"
-RREPLACES_${PN} = "task-core-ssh-dropbear"
-RCONFLICTS_${PN} = "task-core-ssh-dropbear"
-
RDEPENDS_${PN} = "dropbear"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
index df70962912..32d20e6214 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
@@ -4,9 +4,4 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-ssh-openssh"
-RREPLACES_${PN} = "task-core-ssh-openssh"
-RCONFLICTS_${PN} = "task-core-ssh-openssh"
-
RDEPENDS_${PN} = "openssh"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
index 3325ef672e..154a55cea2 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -4,17 +4,10 @@ LICENSE = "MIT"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-standalone-sdk-target"
-RREPLACES_${PN} = "task-core-standalone-sdk-target"
-RCONFLICTS_${PN} = "task-core-standalone-sdk-target"
-RPROVIDES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-RREPLACES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-RCONFLICTS_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-
RDEPENDS_${PN} = "\
libgcc \
libgcc-dev \
+ libgcov-dev \
libstdc++ \
libstdc++-dev \
${LIBC_DEPENDENCIES} \
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
index f72aae4c9d..82347b975d 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
@@ -7,14 +7,7 @@ LICENSE = "MIT"
inherit packagegroup
-PR = "r2"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-debug"
-RREPLACES_${PN} = "task-core-tools-debug"
-RCONFLICTS_${PN} = "task-core-tools-debug"
+PR = "r3"
MTRACE = ""
MTRACE_libc-glibc = "libc-mtrace"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index 7832c89d23..6f4842f182 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -7,16 +7,13 @@ LICENSE = "MIT"
PR = "r3"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-profile"
-RREPLACES_${PN} = "task-core-tools-profile"
-RCONFLICTS_${PN} = "task-core-tools-profile"
+inherit packagegroup
PROFILE_TOOLS_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
+# sysprof doesn't support aarch64
+PROFILE_TOOLS_X_aarch64 = ""
PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}"
RRECOMMENDS_${PN} = "\
@@ -41,6 +38,7 @@ SYSTEMTAP = "systemtap"
SYSTEMTAP_libc-uclibc = ""
SYSTEMTAP_mips = ""
SYSTEMTAP_mips64 = ""
+SYSTEMTAP_mips64n32 = ""
SYSTEMTAP_aarch64 = ""
# lttng-ust uses sched_getcpu() which is not there on uclibc
@@ -58,7 +56,6 @@ LTTNGTOOLS_aarch64 = ""
LTTNGMODULES = "lttng-modules"
LTTNGMODULES_aarch64 = ""
-LTTNGMODULES_arm = ""
BABELTRACE = "babeltrace"
BABELTRACE_aarch64 = ""
@@ -69,6 +66,7 @@ VALGRIND = "valgrind"
VALGRIND_libc-uclibc = ""
VALGRIND_mips = ""
VALGRIND_mips64 = ""
+VALGRIND_mips64n32 = ""
VALGRIND_arm = ""
VALGRIND_aarch64 = ""
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index c7667540c9..33a3eee258 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -7,14 +7,9 @@ LICENSE = "MIT"
PR = "r2"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-testapps"
-RREPLACES_${PN} = "task-core-tools-testapps"
-RCONFLICTS_${PN} = "task-core-tools-testapps"
+inherit packagegroup
# kexec-tools doesn't work on Mips
KEXECTOOLS ?= "kexec"
diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 8e3b917c75..c4710205ba 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -29,6 +29,7 @@ RDEPENDS_packagegroup-self-hosted = "\
# midori depends on webkit-gtk which could not build for mips64
MIDORI = "midori"
MIDORI_mips64 = ""
+MIDORI_mips64n32 = ""
RDEPENDS_packagegroup-self-hosted-host-tools = "\
connman \
@@ -41,19 +42,14 @@ RDEPENDS_packagegroup-self-hosted-host-tools = "\
hdparm \
iptables \
lsb \
- xdg-utils \
mc \
mc-fish \
mc-helpers \
mc-helpers-perl \
mc-helpers-python \
- leafpad \
- ${MIDORI} \
- pcmanfm \
parted \
pseudo \
screen \
- vte \
"
RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
@@ -64,7 +60,7 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
kernel-module-iptable-filter \
"
-# eglibc-utils: for rpcgen
+# glibc-utils: for rpcgen
RDEPENDS_packagegroup-self-hosted-sdk = "\
autoconf \
automake \
@@ -75,8 +71,8 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
cpp \
cpp-symlinks \
distcc \
- eglibc-utils \
- eglibc-gconv-ibm850 \
+ glibc-utils \
+ glibc-gconv-ibm850 \
file \
findutils \
g++ \
@@ -125,6 +121,7 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
gettext \
gettext-runtime \
git \
+ git-perltools \
grep \
groff \
gzip \
@@ -158,37 +155,11 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
perl-pod \
${PTH} \
python \
- python-compile \
python-compiler \
- python-compression \
- python-core \
- python-curses \
- python-datetime \
- python-difflib \
- python-distutils \
- python-elementtree \
- python-email \
- python-fcntl \
python-git \
- python-json \
- python-logging \
python-misc \
- python-mmap \
- python-multiprocessing \
- python-netclient \
- python-netserver \
- python-pickle \
- python-pkgutil \
- python-pprint \
- python-re \
+ python-modules \
python-rpm \
- python-shell \
- python-sqlite3 \
- python-subprocess \
- python-textutils \
- python-unittest \
- python-unixadmin \
- python-xmlrpc \
quota \
readline \
rpm \
@@ -224,6 +195,11 @@ RDEPENDS_packagegroup-self-hosted-graphics = "\
libx11-dev \
python-pygtk \
gtk-theme-clearlooks \
+ xdg-utils \
+ ${MIDORI} \
+ leafpad \
+ pcmanfm \
+ vte \
"
PTH = "pth"
PTH_libc-uclibc = ""
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4d49..7f0dc7859f 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -5,7 +5,7 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
-SRCREV = "afd4e228c606a9998feae44a3fed4474803240b7"
+SRCREV = "14c8f7b705de944beb4de3f296506d80871e410f"
PV = "0.1+git${SRCPV}"
PR = "r15"
@@ -109,3 +109,13 @@ FILES_${PN} += "/mnt/.psplash"
INITSCRIPT_NAME = "psplash.sh"
INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask psplash.service
+ fi
+}
diff --git a/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch b/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
new file mode 100644
index 0000000000..54d1ac6eb9
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
@@ -0,0 +1,32 @@
+From 8ef852a5be72c75e17f2510bea52455f809b56ce Mon Sep 17 00:00:00 2001
+From: Chet Ramey <chet.ramey@case.edu>
+Date: Fri, 28 Mar 2014 14:07:42 -0400
+Subject: [PATCH 04/10] Readline-6.3 patch 2
+
+Fixes multi-key issue identified in this thread:
+http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ readline.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/readline.c b/readline.c
+index eb4eae3..abb29a0 100644
+--- a/readline.c
++++ b/readline.c
+@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+- if (r == 0) /* success! */
++ /* We only treat values < 0 specially to simulate recursion. */
++ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+--
+1.8.3.1
+
diff --git a/meta/recipes-core/readline/readline-6.3/readline63-003 b/meta/recipes-core/readline/readline-6.3/readline63-003
new file mode 100644
index 0000000000..98a9d810b6
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.3/readline63-003
@@ -0,0 +1,43 @@
+readline: Security Advisory - readline - CVE-2014-2524
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 6.3
+Patch-ID: readline63-003
+
+Bug-Reported-by:
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+There are debugging functions in the readline release that are theoretically
+exploitable as security problems. They are not public functions, but have
+global linkage.
+
+Patch (apply with `patch -p0'):
+
+*** ../readline-6.3/util.c 2013-09-02 13:36:12.000000000 -0400
+--- util.c 2014-03-20 10:25:53.000000000 -0400
+***************
+*** 477,480 ****
+--- 479,483 ----
+ }
+
++ #if defined (DEBUG)
+ #if defined (USE_VARARGS)
+ static FILE *_rl_tracefp;
+***************
+*** 539,542 ****
+--- 542,546 ----
+ }
+ #endif
++ #endif /* DEBUG */
+
+
+
diff --git a/meta/recipes-core/readline/readline_6.3.bb b/meta/recipes-core/readline/readline_6.3.bb
index aa30f668b4..55964a6cf8 100644
--- a/meta/recipes-core/readline/readline_6.3.bb
+++ b/meta/recipes-core/readline/readline_6.3.bb
@@ -1,5 +1,8 @@
require readline.inc
+SRC_URI += "file://readline63-003 \
+ file://readline-dispatch-multikey.patch"
+
SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 6dd335c0bc..182167befe 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -21,7 +21,7 @@ IgnoreOnIsolate=yes
[Service]
Environment="TERM=xterm"
-ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM
+ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM
Type=idle
Restart=always
RestartSec=0
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb
index 72bc77df4f..fbdc9c0a18 100644
--- a/meta/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb
@@ -9,6 +9,8 @@ inherit native
SRC_URI = "file://systemctl"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/systemctl ${D}${bindir}
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index b37f27abfb..2e632b00bc 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -77,18 +77,31 @@ for service in $services; do
exit 0
fi
- echo "Try to find location of $service..."
+ service_base_file=`echo $service | sed 's/\(@\).*\(\.[^.]\+\)/\1\2/'`
+ if [ -z `echo $service | sed '/@/p;d'` ]; then
+ echo "Try to find location of $service..."
+ service_template=false
+ else
+ echo "Try to find location of template $service_base_file of instance $service..."
+ service_template=true
+ if [ -z `echo $service | sed 's/^.\+@\(.*\)\.[^.]\+/\1/'` ]; then
+ instance_specified=false
+ else
+ instance_specified=true
+ fi
+ fi
+
# find service file
for p in $ROOT/etc/systemd/system \
$ROOT/lib/systemd/system \
$ROOT/usr/lib/systemd/system; do
- if [ -e $p/$service ]; then
- service_file=$p/$service
+ if [ -e $p/$service_base_file ]; then
+ service_file=$p/$service_base_file
service_file=${service_file##$ROOT}
fi
done
if [ -z "$service_file" ]; then
- echo "'$service' couldn't be found; exiting with error"
+ echo "'$service_base_file' couldn't be found; exiting with error"
exit 1
fi
echo "Found $service in $service_file"
@@ -115,13 +128,29 @@ for service in $services; do
for r in $wanted_by; do
echo "WantedBy=$r found in $service"
if [ "$action" = "enable" ]; then
+ enable_service=$service
+ if [ "$service_template" = true -a "$instance_specified" = false ]; then
+ default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file")
+ if [ -z $default_instance ]; then
+ echo "Template unit without instance or DefaultInstance directive, nothing to enable"
+ continue
+ else
+ echo "Found DefaultInstance $default_instance, enabling it"
+ enable_service=$(echo $service | sed "s/@/@$default_instance/")
+ fi
+ fi
mkdir -p $ROOT/etc/systemd/system/$r.wants
- ln -s $service_file $ROOT/etc/systemd/system/$r.wants
- echo "Enabled $service for $wanted_by."
+ ln -s $service_file $ROOT/etc/systemd/system/$r.wants/$enable_service
+ echo "Enabled $enable_service for $wanted_by."
else
- rm -f $ROOT/etc/systemd/system/$r.wants/$service
+ if [ "$service_template" = true -a "$instance_specified" = false ]; then
+ disable_service="$ROOT/etc/systemd/system/$r.wants/`echo $service | sed 's/@/@*/'`"
+ else
+ disable_service="$ROOT/etc/systemd/system/$r.wants/$service"
+ fi
+ rm -f $disable_service
rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
- echo "Disabled $service for $wanted_by."
+ echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by."
fi
done
diff --git a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 0000000000..c5ad29174c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,180 @@
+From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001
+From: Dan McGregor <dan.mcgregor@usask.ca>
+Date: Fri, 5 Sep 2014 06:28:58 -0600
+Subject: [PATCH] Make root's home directory configurable.
+
+OpenEmbedded has a configurable home directory for root. Allow
+systemd to be built using its idea of what root's home directory
+should be.
+
+Upstream-Status: Pending
+
+Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
+---
+ Makefile.am | 2 ++
+ configure.ac | 7 +++++++
+ src/core/unit-printf.c | 2 +-
+ src/nspawn/nspawn.c | 4 ++--
+ src/shared/util.c | 4 ++--
+ units/console-shell.service.m4.in | 4 ++--
+ units/emergency.service.in | 4 ++--
+ units/rescue.service.m4.in | 4 ++--
+ 8 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4028112..5d18f5c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -191,6 +191,7 @@ AM_CPPFLAGS = \
+ -DKEXEC=\"$(KEXEC)\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DROOTLIBDIR=\"$(rootlibdir)\" \
++ -DROOTHOMEDIR=\"$(roothomedir)\" \
+ -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+ -I $(top_srcdir)/src \
+ -I $(top_builddir)/src/shared \
+@@ -5584,6 +5585,7 @@ EXTRA_DIST += \
+ substitutions = \
+ '|rootlibexecdir=$(rootlibexecdir)|' \
+ '|rootbindir=$(rootbindir)|' \
++ '|roothomedir=$(roothomedir)|' \
+ '|bindir=$(bindir)|' \
+ '|SYSTEMCTL=$(rootbindir)/systemctl|' \
+ '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
+diff --git a/configure.ac b/configure.ac
+index 18b7198..365bc73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1272,6 +1272,11 @@ AC_ARG_WITH([rootlibdir],
+ [],
+ [with_rootlibdir=${libdir}])
+
++AC_ARG_WITH([roothomedir],
++ AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
++ [],
++ [with_roothomedir=/root])
++
+ AC_ARG_WITH([pamlibdir],
+ AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
+ [],
+@@ -1317,6 +1322,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
+ AC_SUBST([pamconfdir], [$with_pamconfdir])
+ AC_SUBST([rootprefix], [$with_rootprefix])
+ AC_SUBST([rootlibdir], [$with_rootlibdir])
++AC_SUBST([roothomedir], [$with_roothomedir])
+
+ AC_CONFIG_FILES([
+ Makefile po/Makefile.in
+@@ -1400,6 +1406,7 @@ AC_MSG_RESULT([
+ include_prefix: ${INCLUDE_PREFIX}
+ lib dir: ${libdir}
+ rootlib dir: ${with_rootlibdir}
++ root home dir: ${with_roothomedir}
+ SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
+ SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
+ Build Python: ${PYTHON}
+diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
+index 62599d0..852d34c 100644
+--- a/src/core/unit-printf.c
++++ b/src/core/unit-printf.c
+@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
+ * best of it if we can, but fail if we can't */
+
+ if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
+- n = strdup("/root");
++ n = strdup(ROOTHOMEDIR);
+ else
+ return -ENOTSUP;
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index d01da45..3e876d5 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -3312,7 +3312,7 @@ int main(int argc, char *argv[]) {
+ if (r < 0)
+ _exit(EXIT_FAILURE);
+
+- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
++ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
+ (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
+ (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
+ log_oom();
+@@ -3402,7 +3402,7 @@ int main(int argc, char *argv[]) {
+ } else if (argc > optind)
+ execvpe(argv[optind], argv + optind, env_use);
+ else {
+- chdir(home ? home : "/root");
++ chdir(home ? home : ROOTHOMEDIR);
+ execle("/bin/bash", "-bash", NULL, env_use);
+ execle("/bin/sh", "-sh", NULL, env_use);
+ }
+diff --git a/src/shared/util.c b/src/shared/util.c
+index 85a570a..aef6033 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -4377,7 +4377,7 @@ int get_user_creds(
+ *gid = 0;
+
+ if (home)
+- *home = "/root";
++ *home = ROOTHOMEDIR;
+
+ if (shell)
+ *shell = "/bin/sh";
+@@ -5363,7 +5363,7 @@ int get_home_dir(char **_h) {
+ /* Hardcode home directory for root to avoid NSS */
+ u = getuid();
+ if (u == 0) {
+- h = strdup("/root");
++ h = strdup(ROOTHOMEDIR);
+ if (!h)
+ return -ENOMEM;
+
+diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
+index 3f4904a..e2af652 100644
+--- a/units/console-shell.service.m4.in
++++ b/units/console-shell.service.m4.in
+@@ -15,8 +15,8 @@ After=rc-local.service
+ Before=getty.target
+
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=@roothomedir@
+ ExecStart=-/sbin/sulogin
+ ExecStopPost=-@SYSTEMCTL@ poweroff
+ Type=idle
+diff --git a/units/emergency.service.in b/units/emergency.service.in
+index 91fc1bb..659547e 100644
+--- a/units/emergency.service.in
++++ b/units/emergency.service.in
+@@ -13,8 +13,8 @@ Conflicts=shutdown.target
+ Before=shutdown.target
+
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=@roothomedir@
+ ExecStartPre=-/bin/plymouth quit
+ ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
+ ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
+index ef54369..7aad86f 100644
+--- a/units/rescue.service.m4.in
++++ b/units/rescue.service.m4.in
+@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
+ Before=shutdown.target
+
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=@roothomedir@
+ ExecStartPre=-/bin/plymouth quit
+ ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
+ ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+--
+1.9.3
+
diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
new file mode 100644
index 0000000000..9aa07c1b10
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
@@ -0,0 +1,138 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: add support for executing scripts under /etc/rcS.d/
+
+To be compatible, all services translated from scripts under /etc/rcS.d would
+run before services translated from scripts under /etc/rcN.d.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++---------
+ 1 file changed, 38 insertions(+), 12 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 9a869ba..10c55c0 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -43,7 +43,8 @@
+
+ typedef enum RunlevelType {
+ RUNLEVEL_UP,
+- RUNLEVEL_DOWN
++ RUNLEVEL_DOWN,
++ RUNLEVEL_SYSINIT
+ } RunlevelType;
+
+ static const struct {
+@@ -58,6 +59,9 @@ static const struct {
+ { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
+ { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
+
++ /* Debian style rcS.d, also adopted by OE */
++ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT},
++
+ /* Standard SysV runlevels for shutdown */
+ { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN },
+ { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN }
+@@ -66,7 +70,7 @@ static const struct {
+ directories in this order, and we want to make sure that
+ sysv_start_priority is known when we first load the
+ unit. And that value we only know from S links. Hence
+- UP must be read before DOWN */
++ UP/SYSINIT must be read before DOWN */
+ };
+
+ typedef struct SysvStub {
+@@ -82,6 +86,8 @@ typedef struct SysvStub {
+ char **conflicts;
+ bool has_lsb;
+ bool reload;
++ bool default_dependencies;
++ bool from_rcsd;
+ } SysvStub;
+
+ const char *arg_dest = "/tmp";
+@@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) {
+ "Description=%s\n",
+ s->path, s->description);
+
++ if (!s->default_dependencies)
++ fprintf(f, "DefaultDependencies=no\n");
++
+ if (!isempty(before))
+ fprintf(f, "Before=%s\n", before);
+ if (!isempty(after))
+@@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+ if (s->has_lsb && other->has_lsb)
+ continue;
+
+- if (other->sysv_start_priority < s->sysv_start_priority) {
+- r = strv_extend(&s->after, other->name);
++ /* All scripts under /etc/rcS.d should execute before scripts under
++ * /etc/rcN.d */
++ if (!other->from_rcsd && s->from_rcsd) {
++ r = strv_extend(&s->before, other->name);
+ if (r < 0)
+ return log_oom();
+- }
+- else if (other->sysv_start_priority > s->sysv_start_priority) {
+- r = strv_extend(&s->before, other->name);
++ } else if (other->from_rcsd && !s->from_rcsd) {
++ r = strv_extend(&s->after, other->name);
+ if (r < 0)
+ return log_oom();
+- }
+- else
+- continue;
++ } else {
++ if (other->sysv_start_priority < s->sysv_start_priority) {
++ r = strv_extend(&s->after, other->name);
++ if (r < 0)
++ return log_oom();
++ }
++ else if (other->sysv_start_priority > s->sysv_start_priority) {
++ r = strv_extend(&s->before, other->name);
++ if (r < 0)
++ return log_oom();
++ }
++ else
++ continue;
++ }
+
+ /* FIXME: Maybe we should compare the name here lexicographically? */
+ }
+@@ -725,6 +746,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+ return log_oom();
+
+ service->sysv_start_priority = -1;
++ service->default_dependencies = true;
++ service->from_rcsd = false;
+ service->name = name;
+ service->path = fpath;
+
+@@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+
+ if (de->d_name[0] == 'S') {
+
+- if (rcnd_table[i].type == RUNLEVEL_UP) {
++ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
+ service->sysv_start_priority =
+ MAX(a*10 + b, service->sysv_start_priority);
++ service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
++ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
+ }
+
+ r = set_ensure_allocated(&runlevel_services[i],
+@@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+ goto finish;
+
+ } else if (de->d_name[0] == 'K' &&
+- (rcnd_table[i].type == RUNLEVEL_DOWN)) {
++ (rcnd_table[i].type == RUNLEVEL_DOWN ||
++ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
+
+ r = set_ensure_allocated(&shutdown_services,
+ trivial_hash_func, trivial_compare_func);
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch
new file mode 100644
index 0000000000..e0043597a2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch
@@ -0,0 +1,176 @@
+From 5a16bc264c32237e38a844d55e7a1820a31b8440 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>
+Date: Fri, 28 Nov 2014 15:59:59 +0100
+Subject: [PATCH] build-sys: configure the list of system users, files and
+ directories
+
+Choose which system users defined in sysusers.d/systemd.conf and files
+or directories in tmpfiles.d/systemd.conf, should be provided depending
+on comile-time configuration.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 4 ++++
+ configure.ac | 2 ++
+ sysusers.d/.gitignore | 1 +
+ sysusers.d/{systemd.conf => systemd.conf.m4} | 8 ++++++++
+ tmpfiles.d/.gitignore | 3 ++-
+ tmpfiles.d/{systemd.conf => systemd.conf.m4} | 2 ++
+ 6 files changed, 19 insertions(+), 1 deletion(-)
+ rename sysusers.d/{systemd.conf => systemd.conf.m4} (77%)
+ rename tmpfiles.d/{systemd.conf => systemd.conf.m4} (96%)
+
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am 2015-01-23 21:23:04.000000000 +0000
++++ git/Makefile.am 2015-01-23 21:23:04.000000000 +0000
+@@ -5698,6 +5698,10 @@
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
++sysusers.d/%: sysusers.d/%.m4
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
++ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
++
+ tmpfiles.d/%: tmpfiles.d/%.m4
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2015-01-23 21:23:04.000000000 +0000
++++ git/configure.ac 2015-01-23 21:23:04.000000000 +0000
+@@ -971,6 +971,7 @@
+ AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
+ if test "x$enable_timesyncd" != "xno"; then
+ have_timesyncd=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
+ fi
+ AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
+
+@@ -1060,6 +1061,7 @@
+ AS_IF([test "x$enable_networkd" != "xno"], [
+ AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
+ have_networkd=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
+ ])
+ AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
+
+Index: git/sysusers.d/systemd.conf
+===================================================================
+--- git.orig/sysusers.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,12 +0,0 @@
+-# This file is part of systemd.
+-#
+-# systemd is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU Lesser General Public License as published by
+-# the Free Software Foundation; either version 2.1 of the License, or
+-# (at your option) any later version.
+-
+-g systemd-journal - -
+-u systemd-bus-proxy - "systemd Bus Proxy"
+-u systemd-network - "systemd Network Management"
+-u systemd-resolve - "systemd Resolver"
+-u systemd-timesync - "systemd Time Synchronization"
+Index: git/sysusers.d/systemd.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysusers.d/systemd.conf.m4 2015-01-23 21:26:30.000000000 +0000
+@@ -0,0 +1,20 @@
++# This file is part of systemd.
++#
++# systemd is free software; you can redistribute it and/or modify it
++# under the terms of the GNU Lesser General Public License as published by
++# the Free Software Foundation; either version 2.1 of the License, or
++# (at your option) any later version.
++
++g systemd-journal - -
++m4_ifdef(`ENABLE_KDBUS',
++u systemd-bus-proxy - "systemd Bus Proxy"
++)m4_dnl
++m4_ifdef(`ENABLE_NETWORKD',
++u systemd-network - "systemd Network Management"
++)m4_dnl
++m4_ifdef(`ENABLE_RESOLVED',
++u systemd-resolve - "systemd Resolver"
++)m4_dnl
++m4_ifdef(`ENABLE_TIMESYNCD',
++u systemd-timesync - "systemd Time Synchronization"
++)m4_dnl
+Index: git/tmpfiles.d/systemd.conf
+===================================================================
+--- git.orig/tmpfiles.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,32 +0,0 @@
+-# This file is part of systemd.
+-#
+-# systemd is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU Lesser General Public License as published by
+-# the Free Software Foundation; either version 2.1 of the License, or
+-# (at your option) any later version.
+-
+-# See tmpfiles.d(5) for details
+-
+-d /run/user 0755 root root -
+-F! /run/utmp 0664 root utmp -
+-
+-d /run/systemd/ask-password 0755 root root -
+-d /run/systemd/seats 0755 root root -
+-d /run/systemd/sessions 0755 root root -
+-d /run/systemd/users 0755 root root -
+-d /run/systemd/machines 0755 root root -
+-d /run/systemd/shutdown 0755 root root -
+-d /run/systemd/netif 0755 systemd-network systemd-network -
+-d /run/systemd/netif/links 0755 systemd-network systemd-network -
+-d /run/systemd/netif/leases 0755 systemd-network systemd-network -
+-
+-d /run/log 0755 root root -
+-
+-z /run/log/journal 2755 root systemd-journal - -
+-Z /run/log/journal/%m ~2750 root systemd-journal - -
+-
+-z /var/log/journal 2755 root systemd-journal - -
+-z /var/log/journal/%m 2755 root systemd-journal - -
+-
+-d /var/lib/systemd 0755 root root -
+-d /var/lib/systemd/coredump 0755 root root 3d
+Index: git/tmpfiles.d/systemd.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/systemd.conf.m4 2015-01-23 21:26:46.000000000 +0000
+@@ -0,0 +1,34 @@
++# This file is part of systemd.
++#
++# systemd is free software; you can redistribute it and/or modify it
++# under the terms of the GNU Lesser General Public License as published by
++# the Free Software Foundation; either version 2.1 of the License, or
++# (at your option) any later version.
++
++# See tmpfiles.d(5) for details
++
++d /run/user 0755 root root -
++F! /run/utmp 0664 root utmp -
++
++d /run/systemd/ask-password 0755 root root -
++d /run/systemd/seats 0755 root root -
++d /run/systemd/sessions 0755 root root -
++d /run/systemd/users 0755 root root -
++d /run/systemd/machines 0755 root root -
++d /run/systemd/shutdown 0755 root root -
++m4_ifdef(`ENABLE_NETWORKD',
++d /run/systemd/netif 0755 systemd-network systemd-network -
++d /run/systemd/netif/links 0755 systemd-network systemd-network -
++d /run/systemd/netif/leases 0755 systemd-network systemd-network -
++)m4_dnl
++
++d /run/log 0755 root root -
++
++z /run/log/journal 2755 root systemd-journal - -
++Z /run/log/journal/%m ~2750 root systemd-journal - -
++
++z /var/log/journal 2755 root systemd-journal - -
++z /var/log/journal/%m 2755 root systemd-journal - -
++
++d /var/lib/systemd 0755 root root -
++d /var/lib/systemd/coredump 0755 root root 3d
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch
new file mode 100644
index 0000000000..4795f8670f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch
@@ -0,0 +1,56 @@
+From bedd083aaedb3bbb14ef579a047bf4b4fed56d9b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>
+Date: Wed, 26 Nov 2014 09:17:50 +0100
+Subject: [PATCH] build-sys: do not install tmpfiles and sysusers files by
+ default
+
+Upstream-Status: Backport
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ Makefile.am | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ddd0df1..65bb176 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2039,7 +2039,6 @@ nodist_tmpfiles_DATA = \
+ dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ tmpfiles.d/systemd-nologin.conf \
+- tmpfiles.d/systemd-remote.conf \
+ tmpfiles.d/tmp.conf \
+ tmpfiles.d/x11.conf \
+ tmpfiles.d/var.conf
+@@ -2094,8 +2093,7 @@ SYSINIT_TARGET_WANTS += \
+ systemd-sysusers.service
+
+ dist_sysusers_DATA = \
+- sysusers.d/systemd.conf \
+- sysusers.d/systemd-remote.conf
++ sysusers.d/systemd.conf
+
+ nodist_sysusers_DATA = \
+ sysusers.d/basic.conf
+@@ -3839,6 +3837,16 @@ systemd_journal_remote_CFLAGS = \
+ systemd_journal_remote_LDADD += \
+ $(MICROHTTPD_LIBS)
+
++if ENABLE_SYSUSERS
++dist_sysusers_DATA += \
++ sysusers.d/systemd-remote.conf
++endif
++
++if ENABLE_TMPFILES
++dist_tmpfiles_DATA += \
++ tmpfiles.d/systemd-remote.conf
++endif
++
+ if HAVE_GNUTLS
+ systemd_journal_remote_LDADD += \
+ $(GNUTLS_LIBS)
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch
new file mode 100644
index 0000000000..621a0da87c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch
@@ -0,0 +1,34 @@
+From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001
+From: Olivier Brunel <jjk@jjacky.com>
+Date: Fri, 5 Dec 2014 16:06:45 +0100
+Subject: [PATCH] journal: Fix navigating backwards missing entries
+
+With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
+needle was found as the last item in the array, it wasn't actually processed as
+match, resulting in entries being missed.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=86855
+
+Upstream-Status: Backport
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/journal/journal-file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 7858435..c5d2d19 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
+ }
+ }
+
+- if (k > n) {
++ if (k >= n) {
+ if (direction == DIRECTION_UP) {
+ i = n;
+ subtract_one = true;
+--
+2.1.3
+
diff --git a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
new file mode 100644
index 0000000000..448ef1a917
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Backport
+
+Subject: missing.h: add fake __NR_memfd_create for MIPS
+
+We don't have the correct __NR_memfd_create syscall number yet, so set it to
+0xffffffff for now to prevent compile time errors.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/shared/missing.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/shared/missing.h b/src/shared/missing.h
+index 3ff1a21..3051cb5 100644
+--- a/src/shared/missing.h
++++ b/src/shared/missing.h
+@@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ # define __NR_fanotify_mark 5296
+ # endif
+ # endif
++# ifndef __NR_memfd_create
++# define __NR_memfd_create 0xffffffff /* FIXME */
++# endif
+ #else
+ # ifndef __NR_fanotify_init
+ # define __NR_fanotify_init 338
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch
new file mode 100644
index 0000000000..97701f707c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Inappropriate [oe specific]
+
+Subject: systemd-user: avoid using system-auth
+
+In OE, we don't provide system-auth, instead, we use common-* files.
+So modify systemd-user file to use common-* files.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/login/systemd-user | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/login/systemd-user b/src/login/systemd-user
+index 8112d74..99635af 100644
+--- a/src/login/systemd-user
++++ b/src/login/systemd-user
+@@ -2,5 +2,5 @@
+ #
+ # Used by systemd --user instances.
+
+-account include system-auth
+-session include system-auth
++account include common-account
++session include common-session
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch
new file mode 100644
index 0000000000..b5b0168149
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch
@@ -0,0 +1,142 @@
+From aeb50ff0bd4bbbca74c4695072232348351d512d Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Wed, 27 Aug 2014 17:45:41 +0200
+Subject: [PATCH] tmpfiles: make resolv.conf entry conditional on resolved
+ support
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ Makefile.am | 15 +++++++++++++--
+ TODO | 2 --
+ configure.ac | 1 +
+ tmpfiles.d/.gitignore | 1 +
+ tmpfiles.d/{etc.conf => etc.conf.m4} | 2 ++
+ 5 files changed, 17 insertions(+), 4 deletions(-)
+ create mode 100644 tmpfiles.d/.gitignore
+ rename tmpfiles.d/{etc.conf => etc.conf.m4} (95%)
+
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am 2015-01-24 00:41:20.134716451 -0800
++++ git/Makefile.am 2015-01-24 00:41:20.126716451 -0800
+@@ -1935,14 +1935,16 @@
+ units/systemd-tmpfiles-setup.service \
+ units/systemd-tmpfiles-clean.service
+
++nodist_tmpfiles_DATA = \
++ tmpfiles.d/etc.conf
++
+ dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ tmpfiles.d/systemd-nologin.conf \
+ tmpfiles.d/systemd-remote.conf \
+ tmpfiles.d/tmp.conf \
+ tmpfiles.d/x11.conf \
+- tmpfiles.d/var.conf \
+- tmpfiles.d/etc.conf
++ tmpfiles.d/var.conf
+
+ if HAVE_SYSV_COMPAT
+ dist_tmpfiles_DATA += \
+@@ -1965,10 +1967,14 @@
+ endif
+
+ EXTRA_DIST += \
++ tmpfiles.d/etc.conf.m4 \
+ units/systemd-tmpfiles-setup-dev.service.in \
+ units/systemd-tmpfiles-setup.service.in \
+ units/systemd-tmpfiles-clean.service.in
+
++CLEANFILES += \
++ tmpfiles.d/etc.conf
++
+ # ------------------------------------------------------------------------------
+ if ENABLE_SYSUSERS
+ systemd_sysusers_SOURCES = \
+@@ -5684,6 +5690,11 @@
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
++tmpfiles.d/%: tmpfiles.d/%.m4
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
++ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
++
++
+ units/%: units/%.m4
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
+Index: git/TODO
+===================================================================
+--- git.orig/TODO 2015-01-24 00:41:20.134716451 -0800
++++ git/TODO 2015-01-24 00:41:20.126716451 -0800
+@@ -111,8 +111,6 @@
+
+ * Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely
+
+-* the resolv.conf tmpfiles line should be covered by ENABLE_NETWORKD...
+-
+ * Add a new verb "systemctl top"
+
+ * logind: allow users to kill or lock their own sessions
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2015-01-24 00:41:20.134716451 -0800
++++ git/configure.ac 2015-01-24 00:41:20.126716451 -0800
+@@ -1041,6 +1041,7 @@
+ AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
+ if test "x$enable_resolved" != "xno"; then
+ have_resolved=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
+ fi
+ AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
+
+Index: git/tmpfiles.d/.gitignore
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/.gitignore 2015-01-24 00:41:20.126716451 -0800
+@@ -0,0 +1 @@
++etc.conf
+Index: git/tmpfiles.d/etc.conf
+===================================================================
+--- git.orig/tmpfiles.d/etc.conf 2015-01-24 00:41:20.134716451 -0800
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,15 +0,0 @@
+-# This file is part of systemd.
+-#
+-# systemd is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU Lesser General Public License as published by
+-# the Free Software Foundation; either version 2.1 of the License, or
+-# (at your option) any later version.
+-
+-# See tmpfiles.d(5) for details
+-
+-L /etc/os-release - - - - ../usr/lib/os-release
+-L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+-L+ /etc/mtab - - - - ../proc/self/mounts
+-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
+-C /etc/nsswitch.conf - - - -
+-C /etc/pam.d - - - -
+Index: git/tmpfiles.d/etc.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/etc.conf.m4 2015-01-24 00:41:20.126716451 -0800
+@@ -0,0 +1,17 @@
++# This file is part of systemd.
++#
++# systemd is free software; you can redistribute it and/or modify it
++# under the terms of the GNU Lesser General Public License as published by
++# the Free Software Foundation; either version 2.1 of the License, or
++# (at your option) any later version.
++
++# See tmpfiles.d(5) for details
++
++L /etc/os-release - - - - ../usr/lib/os-release
++L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
++L+ /etc/mtab - - - - ../proc/self/mounts
++m4_ifdef(`ENABLE_RESOLVED',
++L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
++)
++C /etc/nsswitch.conf - - - -
++C /etc/pam.d - - - -
diff --git a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
deleted file mode 100644
index 9fdb3c9ab3..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Inappropriate [uclibc specific]
-
-From 7be9273548bcb1f57d011fc252965e45dd2a058c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 21 Aug 2013 19:09:27 -0700
-Subject: [PATCH] uClibc doesn't implement pwritev/preadv
-
-Lets stub out the testcase for building.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/libsystemd-bus/test-bus-memfd.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c
-===================================================================
---- systemd-209.orig/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 15:03:09.983254602 -0800
-+++ systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 23:42:10.636652864 -0800
-@@ -151,6 +151,7 @@
- /* check content */
- assert_se(memcmp(buf, "ll", 2) == 0);
-
-+#ifndef __UCLIBC__
- /* writev it out*/
- iov[0].iov_base = (char *)"ABC";
- iov[0].iov_len = 3;
-@@ -173,6 +174,7 @@
- assert_se(memcmp(bufv[0], "ABC", 3) == 0);
- assert_se(memcmp(bufv[1], "DEF", 3) == 0);
- assert_se(memcmp(bufv[2], "GHI", 3) == 0);
-+#endif /* __UCLIBC__ */
-
- sd_memfd_free(m);
-
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
index 2f6bd93a5b..a2d61c2894 100644
--- a/meta/recipes-core/systemd/systemd/run-ptest
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -1,3 +1,5 @@
+#!/bin/sh
+
tar -C test -xJf test/sys.tar.xz
make test/rules-test.sh.log
make test/udev-test.pl.log
diff --git a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch b/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
deleted file mode 100644
index 18b50e797a..0000000000
--- a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6109f02dcc4f2d7a461c5772bab494f5753a2203 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 29 May 2014 08:09:07 +0000
-Subject: [PATCH] rtnl-types.c: check IFLA_VLAN_PROTOCOL
-
-The older kernel's linux/if_link.h doesn't have IFLA_VLAN_PROTOCOL, we need
-check whether it has been defined or not.
-
-The maintainer said that he would fix it:
-
-http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/18200
-
-Also we need redefine IFLA_MAX from 34 to 35 when define IFLA_CARRIER,
-otherwise there would be error:
-
-| src/libsystemd/sd-rtnl/rtnl-types.c:233:9: error: array index in initializer exceeds array bounds
-| [IFLA_CARRIER] = { .type = NLA_U8 },
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/libsystemd/sd-rtnl/rtnl-types.c | 2 ++
- src/shared/missing.h | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
-index 44ac5ec..ab6161f 100644
---- a/src/libsystemd/sd-rtnl/rtnl-types.c
-+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
-@@ -67,7 +67,9 @@ static const NLType rtnl_link_info_data_vlan_types[IFLA_VLAN_MAX + 1] = {
- [IFLA_VLAN_EGRESS_QOS] = { .type = NLA_NESTED },
- [IFLA_VLAN_INGRESS_QOS] = { .type = NLA_NESTED },
- */
-+#ifdef IFLA_VLAN_PROTOCOL
- [IFLA_VLAN_PROTOCOL] = { .type = NLA_U16 },
-+#endif
- };
-
- static const NLType rtnl_link_info_data_bond_types[IFLA_BOND_MAX + 1] = {
-diff --git a/src/shared/missing.h b/src/shared/missing.h
-index d5ec2f8..732853f 100644
---- a/src/shared/missing.h
-+++ b/src/shared/missing.h
-@@ -94,6 +94,8 @@
-
- #ifndef IFLA_CARRIER
- #define IFLA_CARRIER 33
-+ #undef IFLA_MAX
-+ #define IFLA_MAX 35
- #ifndef IFLA_NUM_RX_QUEUES
- #define IFLA_NUM_RX_QUEUES 32
- #ifndef IFLA_NUM_TX_QUEUES
---
-1.8.3.4
-
diff --git a/meta/recipes-core/systemd/systemd_213.bb b/meta/recipes-core/systemd/systemd_216.bb
index 28cc4cb0d9..569e88c240 100644
--- a/meta/recipes-core/systemd/systemd_213.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -10,16 +10,16 @@ PROVIDES = "udev"
PE = "1"
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SECTION = "base/shell"
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
-SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95"
+SRCREV = "5d0ae62c665262c4c55536457e84e278c252cc0b"
-PV = "213+git${SRCPV}"
+PV = "216+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
file://binfmt-install.patch \
@@ -28,14 +28,20 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://systemd-pam-fix-fallocate.patch \
file://systemd-pam-fix-mkostemp.patch \
file://optional_secure_getenv.patch \
- file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
file://uclibc-sysinfo_h.patch \
file://uclibc-get-physmem.patch \
+ file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
+ file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
+ file://0001-Make-root-s-home-directory-configurable.patch \
+ file://0001-systemd-user-avoid-using-system-auth.patch \
+ file://0001-journal-Fix-navigating-backwards-missing-entries.patch \
+ file://0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch \
+ file://0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch \
+ file://0001-build-sys-configure-the-list-of-system-users-files-a.patch \
file://touchscreen.rules \
file://00-create-volatile.conf \
file://init \
file://run-ptest \
- file://systemd-older-kernel.patch \
"
S = "${WORKDIR}/git"
@@ -48,6 +54,7 @@ LDFLAGS_append_libc-uclibc = " -lrt"
GTKDOC_DOCDIR = "${S}/docs/"
PACKAGECONFIG ??= "xz"
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
# regardless of PACKAGECONFIG, libgcrypt is always required to expand
@@ -57,6 +64,12 @@ DEPENDS += "libgcrypt"
PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
+PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
+PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
+PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
@@ -69,8 +82,8 @@ rootlibexecdir = "${rootprefix}/lib"
# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
--with-rootlibdir=${rootlibdir} \
+ --with-roothomedir=${ROOT_HOME} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
- --disable-manpages \
--disable-coredump \
--disable-introspection \
--disable-kdbus \
@@ -94,7 +107,6 @@ do_configure_prepend() {
else
cp -r ${S}/units ${S}/units.pre_sed
fi
- sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
sed -i '/ln --relative --help/d' ${S}/configure.ac
sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
@@ -126,6 +138,27 @@ do_install() {
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+ install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+ install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+ install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+ # its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
+ # don't order journal flushing afte remote-fs.target
+ sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+ # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+ # for existence else it fails
+ ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
}
do_install_ptest () {
@@ -148,16 +181,16 @@ python populate_packages_prepend (){
systemdlibdir = d.getVar("rootlibdir", True)
do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
}
-PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
+PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
- ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh"
+ ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
FILES_${PN}-analyze = "${bindir}/systemd-analyze"
@@ -165,8 +198,9 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
-# The test cases need perl and bash to run correctly.
-RDEPENDS_${PN}-ptest += "perl bash"
+FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+
+RDEPENDS_${PN}-ptest += "perl python bash"
FILES_${PN}-ptest += "${libdir}/udev/rules.d"
FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
@@ -177,6 +211,7 @@ FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
${systemd_unitdir}/system/systemd-vconsole-setup.service \
${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+RDEPENDS_${PN}-kernel-install += "bash"
FILES_${PN}-kernel-install = "${bindir}/kernel-install \
${sysconfdir}/kernel/ \
${exec_prefix}/lib/kernel \
@@ -193,7 +228,7 @@ FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
${systemd_unitdir}/system/systemd-binfmt.service"
RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
${sysconfdir}/systemd/logind.conf \
@@ -206,6 +241,7 @@ FILES_${PN} = " ${base_bindir}/* \
${datadir}/dbus-1/system-services \
${datadir}/polkit-1 \
${datadir}/${BPN} \
+ ${datadir}/factory \
${sysconfdir}/bash_completion.d/ \
${sysconfdir}/dbus-1/ \
${sysconfdir}/machine-id \
@@ -218,7 +254,7 @@ FILES_${PN} = " ${base_bindir}/* \
${rootlibexecdir}/systemd/* \
${systemd_unitdir}/* \
${base_libdir}/security/*.so \
- ${libdir}/libnss_myhostname.so.2 \
+ ${libdir}/libnss_* \
/cgroup \
${bindir}/systemd* \
${bindir}/busctl \
@@ -231,6 +267,7 @@ FILES_${PN} = " ${base_bindir}/* \
${exec_prefix}/lib/systemd \
${exec_prefix}/lib/modules-load.d \
${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
${localstatedir} \
/lib/udev/rules.d/70-uaccess.rules \
/lib/udev/rules.d/71-seat.rules \
@@ -243,11 +280,12 @@ FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_uni
FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds"
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \
+RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
util-linux-agetty \
util-linux-fsck e2fsprogs-e2fsck \
- kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
"
PACKAGES =+ "udev-dbg udev udev-hwdb"
@@ -255,7 +293,8 @@ PACKAGES =+ "udev-dbg udev udev-hwdb"
FILES_udev-dbg += "/lib/udev/.debug"
RPROVIDES_udev = "hotplug"
-RRECOMMENDS_udev += "udev-hwdb"
+
+RDEPENDS_udev-hwdb += "udev"
FILES_udev += "${base_sbindir}/udevd \
${rootlibexecdir}/systemd/systemd-udevd \
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index c3244b4602..eed2104f65 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -6,7 +6,7 @@ PR = "r10"
SRC_URI = "file://inittab"
-S = "${WORKDIR}/sysvinit-${PV}"
+S = "${WORKDIR}"
INHIBIT_DEFAULT_DEPS = "1"
@@ -23,7 +23,7 @@ do_install() {
do
j=`echo ${i} | sed s/\;/\ /g`
label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
- echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+ echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then
diff --git a/meta/recipes-core/sysvinit/sysvinit/01_bootlogd b/meta/recipes-core/sysvinit/sysvinit/01_bootlogd
new file mode 100644
index 0000000000..a689d92d63
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/01_bootlogd
@@ -0,0 +1 @@
+f root root 0644 /var/log/boot none
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index 7d6518d981..df5aa430cf 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -46,7 +46,7 @@ esac
case "$ACTION" in
start)
- echo -n "Starting $DESC: "
+ [ "${VERBOSE}" != "no" ] && echo -n "Starting $DESC: "
if [ -d /proc/1/. ]
then
umask 027
@@ -55,14 +55,16 @@ case "$ACTION" in
else
$DAEMON -r -c
fi
- echo "$NAME."
+ [ "${VERBOSE}" != "no" ] && echo "$NAME."
;;
stop)
- echo -n "Stopping $DESC: "
+ # stop may get called during bootup, so let it honor
+ # rcS VERBOSE setting
+ [ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
- if [ "$STOPPER" ] && [ -f /var/log/boot ] && \
- [ -f /var/log/boot~ ]
+ if [ "$STOPPER" ] && [ "$(which savelog 2>/dev/null)" ] && \
+ [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
then
cd /var/log
chgrp adm boot
@@ -71,7 +73,7 @@ case "$ACTION" in
mv boot~ boot.0
fi
- echo "$NAME."
+ [ "${VERBOSE}" != "no" ] && echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index 1f400d9e55..7ca41ae1ae 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -65,6 +65,9 @@ startup() {
# Set onlcr to avoid staircase effect.
stty onlcr 0>&1
+ # Limit stack size for startup scripts
+ [ "$STACK_SIZE" == "" ] || ulimit -S -s $STACK_SIZE
+
# Now find out what the current and what the previous runlevel are.
runlevel=$RUNLEVEL
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 448d0216be..00d333323e 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -16,7 +16,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \
file://rcS-default \
file://rc \
file://rcS \
- file://bootlogd.init"
+ file://bootlogd.init \
+ file://01_bootlogd \
+"
SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f"
SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
@@ -92,6 +94,9 @@ do_install () {
update-rc.d -r ${D} bootlogd start 07 S .
update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
+
chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
}
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index 69e834d6d1..a2b2353c5a 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -1,4 +1,4 @@
-SRCREV="5eddde8f094ef52dca06695cc598e3b2556dcccb"
+SRCREV = "48a0006012679ff0eda6f256da958d73a924fb57"
PV = "0.9.33+git${SRCPV}"
@@ -23,7 +23,7 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
file://0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch \
file://0001-Add-eventfd_read-and-eventfd_write.patch \
file://0002-wire-setns-syscall.patch \
- file://0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch \
- file://0004-Add-clock_adjtime-syscall.patch \
+ file://0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch \
+ file://0001-timex-Sync-with-glibc.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch
new file mode 100644
index 0000000000..d613823695
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch
@@ -0,0 +1,75 @@
+From be8ed13a90c528adfbe3c8543946bb2c5a2ad713 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Aug 2014 15:50:36 -0700
+Subject: [PATCH] Define IPTOS_CLASS_* macros according to RFC 2474
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-status: Pending
+---
+ include/netinet/ip.h | 42 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 30 insertions(+), 12 deletions(-)
+
+diff --git a/include/netinet/ip.h b/include/netinet/ip.h
+index 19e1249..3fe58b9 100644
+--- a/include/netinet/ip.h
++++ b/include/netinet/ip.h
+@@ -188,7 +188,25 @@ struct ip_timestamp
+ #define IPTOS_DSCP_EF 0xb8
+
+ /*
+- * Definitions for IP type of service (ip_tos)
++ * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume
++ * the old ToS Precedence values.
++ */
++#define IPTOS_CLASS_MASK 0xe0
++#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
++#define IPTOS_CLASS_CS0 0x00
++#define IPTOS_CLASS_CS1 0x20
++#define IPTOS_CLASS_CS2 0x40
++#define IPTOS_CLASS_CS3 0x60
++#define IPTOS_CLASS_CS4 0x80
++#define IPTOS_CLASS_CS5 0xa0
++#define IPTOS_CLASS_CS6 0xc0
++#define IPTOS_CLASS_CS7 0xe0
++
++#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
++
++/*
++ * Definitions for IP type of service (ip_tos) [deprecated; use DSCP
++ * and CS definitions above instead.]
+ */
+ #define IPTOS_TOS_MASK 0x1E
+ #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
+@@ -199,18 +217,18 @@ struct ip_timestamp
+ #define IPTOS_MINCOST IPTOS_LOWCOST
+
+ /*
+- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
++ * Definitions for IP precedence (also in ip_tos) [also deprecated.]
+ */
+-#define IPTOS_PREC_MASK 0xe0
+-#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
+-#define IPTOS_PREC_NETCONTROL 0xe0
+-#define IPTOS_PREC_INTERNETCONTROL 0xc0
+-#define IPTOS_PREC_CRITIC_ECP 0xa0
+-#define IPTOS_PREC_FLASHOVERRIDE 0x80
+-#define IPTOS_PREC_FLASH 0x60
+-#define IPTOS_PREC_IMMEDIATE 0x40
+-#define IPTOS_PREC_PRIORITY 0x20
+-#define IPTOS_PREC_ROUTINE 0x00
++#define IPTOS_PREC_MASK IPTOS_CLASS_MASK
++#define IPTOS_PREC(tos) IPTOS_CLASS(tos)
++#define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7
++#define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6
++#define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5
++#define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4
++#define IPTOS_PREC_FLASH IPTOS_CLASS_CS3
++#define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2
++#define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1
++#define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0
+
+ /*
+ * Definitions for options.
+--
+2.1.0
+
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch b/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch
new file mode 100644
index 0000000000..5d6a0a5366
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch
@@ -0,0 +1,33 @@
+From f489cc44a209f6c4370e94c9c788fc9cc4820be1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Aug 2014 16:22:57 -0700
+Subject: [PATCH] timex: Sync with glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-status: Pending
+---
+ include/sys/timex.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/include/sys/timex.h b/include/sys/timex.h
+index 9082a28..57059bd 100644
+--- a/include/sys/timex.h
++++ b/include/sys/timex.h
+@@ -67,8 +67,12 @@ struct timex
+ #define ADJ_ESTERROR 0x0008 /* estimated time error */
+ #define ADJ_STATUS 0x0010 /* clock status */
+ #define ADJ_TIMECONST 0x0020 /* pll time constant */
+-#define ADJ_TICK 0x4000 /* tick value */
+-#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
++#define ADJ_TAI 0x0080 /* set TAI offset */
++#define ADJ_MICRO 0x1000 /* select microsecond resolution */
++#define ADJ_NANO 0x2000 /* select nanosecond resolution */
++#define ADJ_TICK 0x4000 /* tick value */
++#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
++#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
+
+ /* xntp 3.4 compatibility names */
+ #define MOD_OFFSET ADJ_OFFSET
+--
+2.1.0
+
diff --git a/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch b/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch
deleted file mode 100644
index f4387db9c7..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch
+++ /dev/null
@@ -1,377 +0,0 @@
-From 7791d129d777e481a1e429815edcd05978438840 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 20 Feb 2014 01:12:14 -0800
-Subject: [PATCH 3/3] fcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZ
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- libc/sysdeps/linux/alpha/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/arc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/arm/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/bfin/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/cris/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/e1/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/frv/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/h8300/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/hppa/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/i386/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/i960/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/ia64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/m68k/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/metag/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/microblaze/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/mips/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/nios/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/nios2/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/powerpc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sh/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sh64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sparc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/v850/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/vax/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/x86_64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/xtensa/bits/fcntl.h | 2 ++
- 26 files changed, 52 insertions(+)
-
-diff --git a/libc/sysdeps/linux/alpha/bits/fcntl.h b/libc/sysdeps/linux/alpha/bits/fcntl.h
-index dd32529..a44be9e 100644
---- a/libc/sysdeps/linux/alpha/bits/fcntl.h
-+++ b/libc/sysdeps/linux/alpha/bits/fcntl.h
-@@ -94,6 +94,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* for F_[GET|SET]FD */
-diff --git a/libc/sysdeps/linux/arc/bits/fcntl.h b/libc/sysdeps/linux/arc/bits/fcntl.h
-index 71136da..1cb9600 100755
---- a/libc/sysdeps/linux/arc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/arc/bits/fcntl.h
-@@ -87,6 +87,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
-index f1a54f0..aedc154 100644
---- a/libc/sysdeps/linux/arm/bits/fcntl.h
-+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/bfin/bits/fcntl.h b/libc/sysdeps/linux/bfin/bits/fcntl.h
-index c6cba56..e987824 100644
---- a/libc/sysdeps/linux/bfin/bits/fcntl.h
-+++ b/libc/sysdeps/linux/bfin/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/cris/bits/fcntl.h b/libc/sysdeps/linux/cris/bits/fcntl.h
-index acc5e25..029bb80 100644
---- a/libc/sysdeps/linux/cris/bits/fcntl.h
-+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/e1/bits/fcntl.h b/libc/sysdeps/linux/e1/bits/fcntl.h
-index da699c8..2e0e6ba 100644
---- a/libc/sysdeps/linux/e1/bits/fcntl.h
-+++ b/libc/sysdeps/linux/e1/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/frv/bits/fcntl.h b/libc/sysdeps/linux/frv/bits/fcntl.h
-index 3aacc9d..5a7d9ef 100644
---- a/libc/sysdeps/linux/frv/bits/fcntl.h
-+++ b/libc/sysdeps/linux/frv/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/h8300/bits/fcntl.h b/libc/sysdeps/linux/h8300/bits/fcntl.h
-index d0b8310..45deec4 100644
---- a/libc/sysdeps/linux/h8300/bits/fcntl.h
-+++ b/libc/sysdeps/linux/h8300/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/hppa/bits/fcntl.h b/libc/sysdeps/linux/hppa/bits/fcntl.h
-index 1bb41ce..abb3372 100644
---- a/libc/sysdeps/linux/hppa/bits/fcntl.h
-+++ b/libc/sysdeps/linux/hppa/bits/fcntl.h
-@@ -96,6 +96,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* for F_[GET|SET]FL */
-diff --git a/libc/sysdeps/linux/i386/bits/fcntl.h b/libc/sysdeps/linux/i386/bits/fcntl.h
-index d48e62a..79b69d4 100644
---- a/libc/sysdeps/linux/i386/bits/fcntl.h
-+++ b/libc/sysdeps/linux/i386/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/i960/bits/fcntl.h b/libc/sysdeps/linux/i960/bits/fcntl.h
-index e2fcbe6..f6e145d 100644
---- a/libc/sysdeps/linux/i960/bits/fcntl.h
-+++ b/libc/sysdeps/linux/i960/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/ia64/bits/fcntl.h b/libc/sysdeps/linux/ia64/bits/fcntl.h
-index 1ff0ed5..fedefb6 100644
---- a/libc/sysdeps/linux/ia64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/m68k/bits/fcntl.h b/libc/sysdeps/linux/m68k/bits/fcntl.h
-index d7beb6c..66df337 100644
---- a/libc/sysdeps/linux/m68k/bits/fcntl.h
-+++ b/libc/sysdeps/linux/m68k/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/metag/bits/fcntl.h b/libc/sysdeps/linux/metag/bits/fcntl.h
-index c4f641b..e10abd7 100644
---- a/libc/sysdeps/linux/metag/bits/fcntl.h
-+++ b/libc/sysdeps/linux/metag/bits/fcntl.h
-@@ -100,6 +100,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/microblaze/bits/fcntl.h b/libc/sysdeps/linux/microblaze/bits/fcntl.h
-index a2e3573..20b7597 100644
---- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
-+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- # define F_SETPIPE_SZ 1031 /* Set of pipe page size array */
- # define F_GETPIPE_SZ 1032 /* Get of pipe page size array */
- #endif
-diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
-index 4291f6e..8c4c115 100644
---- a/libc/sysdeps/linux/mips/bits/fcntl.h
-+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
-@@ -111,6 +111,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/nios/bits/fcntl.h b/libc/sysdeps/linux/nios/bits/fcntl.h
-index 5854c18..36ca766 100644
---- a/libc/sysdeps/linux/nios/bits/fcntl.h
-+++ b/libc/sysdeps/linux/nios/bits/fcntl.h
-@@ -96,6 +96,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/nios2/bits/fcntl.h b/libc/sysdeps/linux/nios2/bits/fcntl.h
-index d7beb6c..66df337 100644
---- a/libc/sysdeps/linux/nios2/bits/fcntl.h
-+++ b/libc/sysdeps/linux/nios2/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
-index 217f54a..d150a31 100644
---- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h
-index 5c9f047..aceaec6 100644
---- a/libc/sysdeps/linux/sh/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/sh64/bits/fcntl.h b/libc/sysdeps/linux/sh64/bits/fcntl.h
-index ff741cb..b319e8b 100644
---- a/libc/sysdeps/linux/sh64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sh64/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/sparc/bits/fcntl.h b/libc/sysdeps/linux/sparc/bits/fcntl.h
-index 235d2ad..7e80d9e 100644
---- a/libc/sysdeps/linux/sparc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sparc/bits/fcntl.h
-@@ -106,6 +106,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- #if __WORDSIZE == 64
-diff --git a/libc/sysdeps/linux/v850/bits/fcntl.h b/libc/sysdeps/linux/v850/bits/fcntl.h
-index d0b8310..45deec4 100644
---- a/libc/sysdeps/linux/v850/bits/fcntl.h
-+++ b/libc/sysdeps/linux/v850/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/vax/bits/fcntl.h b/libc/sysdeps/linux/vax/bits/fcntl.h
-index ff5bff3..a30d5e1 100644
---- a/libc/sysdeps/linux/vax/bits/fcntl.h
-+++ b/libc/sysdeps/linux/vax/bits/fcntl.h
-@@ -92,6 +92,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h
-index a899dcf..02e011d 100644
---- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
-@@ -113,6 +113,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/xtensa/bits/fcntl.h b/libc/sysdeps/linux/xtensa/bits/fcntl.h
-index 5d28547..4e9aa7e 100644
---- a/libc/sysdeps/linux/xtensa/bits/fcntl.h
-+++ b/libc/sysdeps/linux/xtensa/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
---
-1.9.0
-
diff --git a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
deleted file mode 100644
index c596db67b1..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Pending
-
-From 8e19e651145554fbcb90179f3dfbc7ea8a07c900 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 15 Mar 2014 09:32:20 -0700
-Subject: [PATCH 4/4] Add clock_adjtime syscall
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- include/sys/timex.h | 5 ++++-
- libc/sysdeps/linux/common/Makefile.in | 2 +-
- libc/sysdeps/linux/common/clock_adjtime.c | 15 +++++++++++++++
- 3 files changed, 20 insertions(+), 2 deletions(-)
- create mode 100644 libc/sysdeps/linux/common/clock_adjtime.c
-
-diff --git a/include/sys/timex.h b/include/sys/timex.h
-index 621afce..9082a28 100644
---- a/include/sys/timex.h
-+++ b/include/sys/timex.h
-@@ -20,6 +20,7 @@
-
- #include <features.h>
- #include <sys/time.h>
-+#include <time.h>
-
- /* These definitions from linux/timex.h as of 2.2.0. */
-
-@@ -125,7 +126,9 @@ libc_hidden_proto(adjtimex)
- extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
- extern int ntp_adjtime (struct timex *__tntx) __THROW;
- #endif
--
-+#if defined __UCLIBC_HAS_REALTIME__
-+extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW;
-+#endif
- __END_DECLS
-
- #endif /* sys/timex.h */
-diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
-index 10d9884..bb985b6 100644
---- a/libc/sysdeps/linux/common/Makefile.in
-+++ b/libc/sysdeps/linux/common/Makefile.in
-@@ -84,7 +84,7 @@ CSRC-$(ARCH_USE_MMU) += msync.c
- CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
- CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
- # aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
--CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
-+CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c clock_settime.c \
- fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
- nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
- sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
-diff --git a/libc/sysdeps/linux/common/clock_adjtime.c b/libc/sysdeps/linux/common/clock_adjtime.c
-new file mode 100644
-index 0000000..968ec27
---- /dev/null
-+++ b/libc/sysdeps/linux/common/clock_adjtime.c
-@@ -0,0 +1,15 @@
-+/*
-+ * clock_adjtime() for uClibc
-+ *
-+ * Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
-+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+#include <sys/timex.h>
-+
-+#ifdef __NR_clock_adjtime
-+_syscall2(int, clock_adjtime, clockid_t, clock_id, struct timex*, ntx)
-+#endif
---
-1.9.0
-
diff --git a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
index d2a8a81b94..fb52faa7a0 100644
--- a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
@@ -5,8 +5,8 @@ Upstream-Status: Pending
Index: git/libpthread/nptl/pthread_mutex_timedlock.c
===================================================================
---- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:22:20.000000000 -0800
-+++ git/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:24:12.275557670 -0800
+--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 2014-08-25 10:58:06.000000000 -0700
++++ git/libpthread/nptl/pthread_mutex_timedlock.c 2014-08-25 11:00:42.078242266 -0700
@@ -28,7 +28,9 @@
* error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
*/
@@ -17,124 +17,3 @@ Index: git/libpthread/nptl/pthread_mutex_timedlock.c
pthread_mutex_timedlock (
pthread_mutex_t *mutex,
const struct timespec *abstime)
-Index: git/libc/sysdeps/linux/powerpc/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -26,7 +26,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif /* __cplusplus */
-
- #if defined __GNUC__ && !defined _SOFT_FLOAT
-Index: git/libc/sysdeps/linux/alpha/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -24,7 +24,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
- #if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
-Index: git/libc/sysdeps/linux/i386/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -25,7 +25,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
-
-Index: git/libc/sysdeps/linux/ia64/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -23,7 +23,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
- #if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
-Index: git/libc/sysdeps/linux/m68k/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -91,7 +91,7 @@
- # ifdef __cplusplus
- # define __m81_inline __inline
- # else
--# define __m81_inline extern __inline
-+# define __m81_inline __extern_inline
- # endif
- # define __M81_MATH_INLINES 1
- #endif
-@@ -350,14 +350,14 @@
- /* Note that there must be no whitespace before the argument passed for
- NAME, to make token pasting work correctly with -traditional. */
- # define __inline_forward_c(rettype, name, args1, args2) \
--extern __inline rettype __attribute__((__const__)) \
-+__extern_inline rettype __attribute__((__const__)) \
- name args1 \
- { \
- return __CONCAT(__,name) args2; \
- }
-
- # define __inline_forward(rettype, name, args1, args2) \
--extern __inline rettype name args1 \
-+__extern_inline rettype name args1 \
- { \
- return __CONCAT(__,name) args2; \
- }
-Index: git/libc/sysdeps/linux/mips/sys/tas.h
-===================================================================
---- git.orig/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:24:12.275557670 -0800
-@@ -29,7 +29,7 @@
- #ifdef __USE_EXTERN_INLINES
-
- # ifndef _EXTERN_INLINE
--# define _EXTERN_INLINE extern __inline
-+# define _EXTERN_INLINE __extern_inline
- # endif
-
- _EXTERN_INLINE int
-Index: git/libc/sysdeps/linux/sparc/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
-@@ -130,7 +130,7 @@
- # ifdef __cplusplus
- # define __MATH_INLINE __inline
- # else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- # endif /* __cplusplus */
-
- /* The gcc, version 2.7 or below, has problems with all this inlining
-Index: git/libc/sysdeps/linux/x86_64/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
-@@ -24,7 +24,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
-
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index a86ac3ddf7..18587ca273 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -93,10 +93,10 @@ python () {
# if we use TARGET_CC_ARCH="-march=mips32" we end up
# with conflicting march options to gcc. Here we
# ask for MIPS32 ISA to match the chosen arch
-
- if "mips32" in d.getVar("TUNE_FEATURES",True):
+ tune = d.getVar("DEFAULTTUNE", True)
+ if tune in ['mips32', 'mips32r2']:
d.setVar('configmangle_append',
- "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_MIPS32=y\n\n")
+ "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_%s=y\n\n" % (tune.upper()))
if "${OE_FEATURES}":
d.setVar('configmangle_append',
"/^### DISTRO FEATURES$/a\\\n%s\n\n" %
diff --git a/meta/recipes-core/udev/udev-extraconf/automount.rules b/meta/recipes-core/udev/udev-extraconf/automount.rules
index 7e844c31bd..62578ea631 100644
--- a/meta/recipes-core/udev/udev-extraconf/automount.rules
+++ b/meta/recipes-core/udev/udev-extraconf/automount.rules
@@ -16,4 +16,4 @@
# Media automounting
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
-
+SUBSYSTEM=="block", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1" RUN+="/etc/udev/scripts/mount.sh"
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 7df1b6e3e7..3eea910854 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -78,8 +78,7 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_t
fi
-
-if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
+if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
do
$UMOUNT $mnt
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index d69056dd76..6fbd92548a 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -13,6 +13,8 @@ SRC_URI = " \
file://localextra.rules \
"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index 11204aaa41..19e0e86506 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
LDFLAGS += "-lrt"
-DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux"
+DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux"
RPROVIDES_${PN} = "hotplug"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
@@ -27,11 +27,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://udev-cache \
file://udev-cache.default \
file://add-install-ptest.patch \
+ file://fix_rule-syntax-regex-ptest.patch \
file://run-ptest \
file://init"
inherit autotools pkgconfig update-rc.d ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make perl python"
libexecdir = "${base_libdir}"
EXTRA_OECONF = "--disable-introspection \
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
index 0f8e9b6588..bfc2e9409d 100644
--- a/meta/recipes-core/udev/udev/add-install-ptest.patch
+++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
@@ -8,20 +8,33 @@ Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Alexandra Safta <alst@enea.com>
Upstream-Status: Pending
+Add missing files for rule-syntax-check
+- Add rule-syntax-check.py
+- Add the deployed udev rules to the testdata
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+Upstream-Status: Pending
--- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100
+++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100
-@@ -708,3 +708,11 @@
+@@ -708,3 +708,18 @@
for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
+
++RULES = rules/* src/accelerometer/61-accelerometer.rules \
++ src/cdrom_id/60-cdrom_id.rules \
++ src/keymap/95-keyboard-force-release.rules src/keymap/95-keymap.rules \
++ src/mtd_probe/75-probe_mtd.rules src/v4l_id/60-persistent-v4l.rules
++
+install-ptest:
+ install test-udev $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
-+ $(MKDIR_P) $(DESTDIR)/test
++ install -d $(DESTDIR)/test $(DESTDIR)/rules
+ (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
-+ tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
++ (cd $(top_srcdir) && install test/rule-syntax-check.py $(DESTDIR)/test)
++ (cd $(top_srcdir) && install $(RULES) $(DESTDIR)/rules)
++ cp $(top_srcdir)/test/sys.tar.xz $(DESTDIR)/test/
--- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100
+++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100
@@ -1459,11 +1459,13 @@
diff --git a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
new file mode 100644
index 0000000000..548a241d8a
--- /dev/null
+++ b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
@@ -0,0 +1,59 @@
+The rule-syntax-check script fails with errors like this:
+
+Invalid line /lib/udev/rules.d/95-keymap.rules:49: ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
+(' clause:', 'ATTR{[dmi/id]product_name}=="W3J"')
+()
+
+
+Move line comment from end of rules file to its own line, the regex used to
+test correct syntax choke on it.
+
+The rule-syntax-check.py uses regex which errournessly complains on ATTR rules
+of the form ATTR{[dmi/id]board_name}=="30B7"
+Use the regex from systemd's script which allow [] characters and additional
+compare operators
+
+The Makefile passes rules-test.sh script a build host path to the testdata.
+Ignore the argument and use a relative path instead.
+
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+Upstream status pending
+Upstream status Inappropriate (cross environment path)
+
+diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules
+--- udev-182.orig/src/keymap/95-keymap.rules 2012-02-07 00:01:55.154640792 +0100
++++ udev-182/src/keymap/95-keymap.rules 2015-01-24 20:58:40.156930520 +0100
+@@ -94,7 +94,8 @@
+ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
+ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill"
+ # HP Pavillion dv6315ea has empty DMI_VENDOR
+-ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
++# "quick play"
++ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media"
+
+ # Gateway clone of Acer Aspire One AOA110/AOA150
+ ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer"
+diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py
+--- udev-182.orig/test/rule-syntax-check.py 2012-02-15 20:10:12.872333342 +0100
++++ udev-182/test/rule-syntax-check.py 2015-01-24 21:08:00.496049600 +0100
+@@ -28,7 +28,7 @@
+ no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
+ args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
+ no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
+-args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
++args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$')
+
+ result = 0
+ buffer = ''
+--- udev-182.orig/test/rules-test.sh 2012-01-29 01:15:46.000000000 +0100
++++ udev-182/test/rules-test.sh 2015-01-24 17:53:51.201858658 +0100
+@@ -4,7 +4,7 @@
+ # (C) 2010 Canonical Ltd.
+ # Author: Martin Pitt <martin.pitt@ubuntu.com>
+
+-[ -n "$srcdir" ] || srcdir=`dirname $0`/..
++srcdir=`dirname $0`/..
+
+ # skip if we don't have python
+ type python >/dev/null 2>&1 || {
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index f2c84d5d3e..0ab028b391 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -14,21 +14,28 @@ export TZ=/etc/localtime
[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x @UDEVD@ ] || exit 1
+SYSCONF_CACHED="/etc/udev/cache.data"
+SYSCONF_TMP="/dev/shm/udev.cache"
+DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
+
+# A list of files which are used as a criteria to judge whether the udev cache could be reused.
+CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
+[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
+
+# List of files whose metadata (size/mtime/name) will be included in cached
+# system state.
+META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
+
+# Command to compute system configuration.
+sysconf_cmd () {
+ cat -- $CMP_FILE_LIST
+ stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
+}
+
[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
[ -f /etc/default/rcS ] && . /etc/default/rcS
-readfiles () {
- READDATA=""
- for filename in $@; do
- if [ -r $filename ]; then
- while read line; do
- READDATA="$READDATA$line"
- done < $filename
- fi
- done
-}
-
kill_udevd () {
pid=`pidof -x udevd`
[ -n "$pid" ] && kill $pid
@@ -57,38 +64,35 @@ case "$1" in
# the automount rule for udev needs /tmp directory available, as /tmp is a symlink
# to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
# /var/volatile/tmp directory to be available.
- mkdir -p /var/volatile/tmp
+ mkdir -m 1777 -p /var/volatile/tmp
# Cache handling.
- # A list of files which are used as a criteria to judge whether the udev cache could be reused.
- CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags"
if [ "$DEVCACHE" != "" ]; then
if [ -e $DEVCACHE ]; then
- readfiles $CMP_FILE_LIST
- NEWDATA="$READDATA"
- readfiles /etc/udev/cache.data
- OLDDATA="$READDATA"
- if [ "$OLDDATA" = "$NEWDATA" ]; then
- (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
+ sysconf_cmd > "$SYSCONF_TMP"
+ if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then
+ tar xmf $DEVCACHE -C / -m
not_first_boot=1
[ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
- [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
+ [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
+ [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
else
# Output detailed reason why the cached /dev is not used
- if [ "$VERBOSE" != "no" ]; then
- echo "udev: udev cache not used"
- echo "udev: we use $CMP_FILE_LIST as criteria to judge whether the cache /dev could be resued"
- echo "udev: olddata: $OLDDATA"
- echo "udev: newdata: $NEWDATA"
- fi
- echo "$NEWDATA" > /dev/shm/udev.cache
+ cat <<EOF
+udev: Not using udev cache because of changes detected in the following files:
+udev: $CMP_FILE_LIST
+udev: $META_FILE_LIST
+udev: The udev cache will be regenerated. To identify the detected changes,
+udev: compare the cached sysconf at $SYSCONF_CACHED
+udev: against the current sysconf at $SYSCONF_TMP
+EOF
+ touch "$DEVCACHE_REGEN"
fi
else
if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
# If rootfs is not read-only, it's possible that a new udev cache would be generated;
# otherwise, we do not bother to read files.
- readfiles $CMP_FILE_LIST
- echo "$READDATA" > /dev/shm/udev.cache
+ touch "$DEVCACHE_REGEN"
fi
fi
fi
@@ -97,7 +101,7 @@ case "$1" in
kill_udevd > "/dev/null" 2>&1
# trigger the sorted events
- echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+ [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
@UDEVD@ -d
udevadm control --env=STARTUP=1
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
index c6961ce58a..0e39806b01 100644
--- a/meta/recipes-core/udev/udev/run-ptest
+++ b/meta/recipes-core/udev/udev/run-ptest
@@ -1,3 +1,5 @@
#!/bin/sh
+tar -C test/ -xJf test/sys.tar.xz
make -k check-TESTS
+make test-sys-distclean
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index db5a513e14..df97000dde 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -16,6 +16,25 @@ export TZ=/etc/localtime
[ -d /sys/class ] || exit 1
[ -f /etc/default/rcS ] && . /etc/default/rcS
+DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
+SYSCONF_CACHED="/etc/udev/cache.data"
+SYSCONF_TMP="/dev/shm/udev.cache"
+DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
+
+# A list of files which are used as a criteria to judge whether the udev cache could be reused.
+CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
+[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
+
+# List of files whose metadata (size/mtime/name) will be included in cached
+# system state.
+META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
+
+# Command to compute system configuration.
+sysconf_cmd () {
+ cat -- $CMP_FILE_LIST
+ stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
+}
+
[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
@@ -23,10 +42,28 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
exit 0
fi
-if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
- echo "Populating dev cache"
- (cd /; tar cf "$DEVCACHE" dev)
- mv /dev/shm/udev.cache /etc/udev/cache.data
+[ "$DEVCACHE" != "" ] || exit 0
+[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... "
+if ! [ -e "$DEVCACHE_REGEN" ]; then
+ [ "${VERBOSE}" == "no" ] || echo "not found."
+ exit 0
fi
+[ "${VERBOSE}" == "no" ] || echo "found."
+echo "Populating dev cache"
+
+(
+ set -e
+ trap 'echo "udev-cache: update failed!"' EXIT
+ udevadm control --stop-exec-queue
+ sysconf_cmd > "$SYSCONF_TMP"
+ find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
+ | xargs tar cf "${DEVCACHE_TMP}" -T-
+ gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
+ rm -f "${DEVCACHE_TMP}"
+ mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
+ udevadm control --start-exec-queue
+ rm -f "$DEVCACHE_REGEN"
+ trap - EXIT
+) &
exit 0
diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
index 20933361a9..a3b732698d 100644
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -1,5 +1,5 @@
# Default for /etc/init.d/udev
# Comment this out to disable device cache
-DEVCACHE="/etc/dev.tar"
+DEVCACHE="/etc/udev-cache.tar.gz"
PROBE_PLATFORM_BUS="yes"
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 83bb4a66b9..b4f51e9e4f 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,16 +17,12 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
-inherit autotools gettext pkgconfig systemd
+inherit autotools gettext pkgconfig systemd update-alternatives python-dir
DEPENDS = "zlib ncurses"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \
- file://MCONFIG \
- file://defines.h \
- file://make_include \
- file://swapargs.h \
"
PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
@@ -36,7 +32,9 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
util-linux-mkfs util-linux-mcookie util-linux-reset \
util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
- util-linux-partx ${PN}-bash-completion"
+ util-linux-partx ${PN}-bash-completion util-linux-hwclock \
+ util-linux-findfs util-linux-getopt"
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
@@ -55,14 +53,20 @@ PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'p
PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
# Respect the systemd feature for uuidd
-PACKAGECONFIG[systemd] = "--enable-socket-activation --with-systemdsystemunitdir=${systemd_unitdir}/system/, --disable-socket-activation --without-systemdsystemunitdir"
+PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemd --without-systemdsystemunitdir,systemd"
# Build setpriv requires libcap-ng
PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
+# Build python bindings for libmount
+PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python"
+
FILES_${PN}-bash-completion += "${datadir}/bash-completion"
FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
+FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/.debug/"
+
FILES_util-linux-agetty = "${base_sbindir}/agetty"
FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
FILES_util-linux-fstrim = "${base_sbindir}/fstrim"
@@ -73,14 +77,19 @@ FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}"
FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
FILES_util-linux-mcookie = "${bindir}/mcookie"
FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
-FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}"
+FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
FILES_util-linux-uuidgen = "${bindir}/uuidgen"
FILES_util-linux-uuidd = "${sbindir}/uuidd"
FILES_util-linux-reset = "${base_bindir}/reset"
FILES_util-linux-partx = "${sbindir}/partx"
+FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
+FILES_util-linux-findfs = "${sbindir}/findfs"
+FILES_util-linux-getopt = "${bindir}/getopt.${BPN}"
FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
FILES_util-linux-libmount = "${base_libdir}/libmount.so.*"
+FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \
+ ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*"
FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*"
FILES_util-linux-lscpu = "${bindir}/lscpu"
@@ -90,7 +99,6 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
-
# Util-linux' blkid replaces the e2fsprogs one
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -109,15 +117,14 @@ RDEPENDS_${PN}_class-nativesdk = ""
RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev"
-SYSTEMD_PACKAGES = "${PN}-uuidd"
-SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service"
+SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim"
+SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
+SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
+SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
do_compile () {
set -e
- install ${WORKDIR}/MCONFIG ${S}/MCONFIG
- install ${WORKDIR}/make_include ${S}/make_include
- install ${WORKDIR}/swapargs.h ${S}/mount-deprecated/swapargs.h
- install ${WORKDIR}/defines.h ${S}/defines.h
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
}
@@ -132,8 +139,8 @@ do_install () {
mkdir -p ${D}${base_bindir}
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
- sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev fstrim sulogin"
- usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt"
+ sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root"
+ usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt readprofile"
binprogs_a="dmesg kill more umount mount login reset su"
if [ "${base_sbindir}" != "${sbindir}" ]; then
@@ -160,13 +167,11 @@ do_install () {
rm -f ${D}${bindir}/chkdupexe
}
-inherit update-alternatives
-
ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root"
+ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock hwclock utmpdump eject getopt sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -174,11 +179,10 @@ ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
+ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
-ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
-ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt"
ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
@@ -190,6 +194,7 @@ ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
+ALTERNATIVE_util-linux-hwclock = "hwclock"
# There seems to be problem, atleast on nslu2, with these, untill they are
# fixed the busybox ones have higher priority
ALTERNATIVE_PRIORITY[hwclock] = "10"
@@ -209,7 +214,7 @@ ALTERNATIVE_util-linux-umount = "umount"
ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
ALTERNATIVE_util-linux-readprofile = "readprofile"
-ALTERNATIVE_LINK_NAME[readprofile] = "${base_sbindir}/readprofile"
+ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile"
ALTERNATIVE_util-linux-losetup = "losetup"
ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
@@ -229,6 +234,8 @@ ALTERNATIVE_util-linux-reset = "reset"
ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-getopt = "getopt"
+
BBCLASSEXTEND = "native nativesdk"
python do_package_prepend () {
diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG
deleted file mode 100644
index 3fea2c02d7..0000000000
--- a/meta/recipes-core/util-linux/util-linux/MCONFIG
+++ /dev/null
@@ -1,223 +0,0 @@
-# MCONFIG -- Configuration stuff for util-linux
-# Created: Sat Feb 4 15:50:30 1995
-# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
-
-# For a user-mode install, make (at least) three changes:
-# - remove the `-o root' part in INSTALLSUID
-# - set USE_TTY_GROUP=no
-# - define DESTDIR
-
-# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
-# Select for CPU i386 if the binaries must be able to run on an intel 386
-# (by default i486 code is generated, see below)
-CPU=$(shell uname -m)
-ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
-
-# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
-# will use PAM for authentication. Additionally, passwd will not be
-# installed as it is not PAM aware.
-HAVE_PAM=no
-
-# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
-# and vipw will not be built or installed from the login-utils
-# subdirectory.
-HAVE_SHADOW=yes
-
-# If HAVE_PASSWD is set to "yes", then passwd will not be built or
-# installed from the login-utils subdirectory (but login, chfn, chsh,
-# newgrp, and vipw *will* be installed).
-HAVE_PASSWD=no
-
-# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
-# non-root users to enter the account password before updating /etc/passwd.
-REQUIRE_PASSWORD=yes
-#REQUIRE_PASSWORD=no
-
-# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
-# the selected shell be listed in /etc/shells -- otherwise only a warning is
-# printed. This prevents someone from setting their shell to /bin/false.
-ONLY_LISTED_SHELLS=yes
-#ONLY_LISTED_SHELLS=no
-
-
-# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
-# be built or installed from the login-utils subdirectory. (The shutdown
-# and halt that come with the SysVinit package should be used with the init
-# found in that package.)
-HAVE_SYSVINIT=no
-
-# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
-# not be built or installed from the login-utils subdirectory. (The
-# shutdown and init from the SysVinit package do not depend on the last,
-# mesg, and wall from that package.)
-HAVE_SYSVINIT_UTILS=no
-
-# If HAVE_WRITE is set to "yes", then write will not be built or
-# installed from the misc-utils subdirectory.
-# (There is a network aware write in netwrite from NetKit 0.16 or later.)
-HAVE_WRITE=no
-
-# If HAVE_GETTY is set to "yes", then agetty will not be built or
-# installed from the login-utils subdirectory. Note that agetty can
-# co-exist with other gettys, so this option should never be used.
-HAVE_GETTY=no
-
-# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
-# setgid to the "tty" group, and mesg will only set the group write bit.
-# Note that this is only useful if login/xterm/etc. change the group of the
-# user's tty to "tty" [The login in util-linux does this correctly, and
-# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
-# properly.]
-USE_TTY_GROUP=no
-
-# If HAVE_KILL is set to "yes", then kill will not be built or
-# installed from the misc-utils subdirectory.
-# (There is also a kill in the procps package.)
-HAVE_KILL=no
-
-# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
-# to the current user, allowing her to make a screendump and do other
-# nifty things on the console, but also allowing him to keep an open
-# file descriptor after logging out to trick the next user.
-ALLOW_VCS_USE=yes
-
-# If HAVE_RESET is set to "yes", then reset won't be installed. The version
-# of reset that comes with the ncurses package is less aggressive.
-HAVE_RESET=yes
-
-# If HAVE_SLN is set to "yes", then sln won't be installed
-# (but the man page sln.8 will be installed anyway).
-# sln also comes with libc and glibc.
-HAVE_SLN=no
-
-# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
-HAVE_FDUTILS=no
-
-# If SILENT_PG is set to "yes", then pg will not ring the bell
-# when an invalid key is pressed
-SILENT_PG=no
-
-# If configure decides that Native Language Support (NLS) is available,
-# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
-# DISABLE_NLS to "yes".
-DISABLE_NLS=no
-
-# Different optimizations for different cpus.
-# gcc 3.0 likes options -mcpu=i486 instead of -m486
-ifeq "$(ARCH)" "intel"
- ifeq "$(HAVE_OLD_GCC)" "yes"
- CPUHEAD=-m
- else
- CPUHEAD=-mcpu=i
- endif
- ifeq "$(CPU)" "i386"
- CPUTAIL=386
- else
- CPUTAIL=486
- endif
- CPUOPT= $(CPUHEAD)$(CPUTAIL)
- OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
-else
- ifeq "$(ARCH)" "arm"
- OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
- else
- OPT= -O2 -fomit-frame-pointer
- endif
-endif
-
-WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
-
-LIB=../lib
-
-ERR_O=$(LIB)/err.o
-
-# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
-# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
-# HAVE_SLANG=yes
-# There is a subdirectory /usr/include/slang containing slcurses.h
-# SLANGFLAGS=-I/usr/include/slang
-# No such subdirectory - slcurses.h lives in /usr/include
-# (no extra definition required).
-LIBSLANG=-lslang
-
-#
-# Paths used for compilation (not all are actually used, see CFLAGS below)
-#
-DEV_DIR= /dev
-ETC_DIR= /etc
-SBIN_DIR= /sbin
-USRSBIN_DIR= /usr/sbin
-USRLIB_DIR= /usr/lib
-USRBIN_DIR= /usr/bin
-USRGAMES_DIR= /usr/games
-USRSHAREMISC_DIR=/usr/share/misc
-LOCALE_DIR= /usr/share/locale
-BIN_DIR= /bin
-VAR_PATH= /var
-LOG_DIR= /var/log
-MAN_DIR= /usr/share/man
-INFO_DIR= /usr/share/info
-
-#
-# Paths used for install
-#
-DEVDIR= $(DESTDIR)$(DEV_DIR)
-ETCDIR= $(DESTDIR)$(ETC_DIR)
-SBINDIR= $(DESTDIR)$(SBIN_DIR)
-USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
-USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
-USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
-USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
-USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
-LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
-BINDIR= $(DESTDIR)$(BIN_DIR)
-VARPATH= $(DESTDIR)$(VAR_PATH)
-LOGDIR= $(DESTDIR)$(LOG_DIR)
-MANDIR= $(DESTDIR)$(MAN_DIR)
-MAN1DIR= $(MANDIR)/man1
-MAN3DIR= $(MANDIR)/man3
-MAN5DIR= $(MANDIR)/man5
-MAN6DIR= $(MANDIR)/man6
-MAN8DIR= $(MANDIR)/man8
-INFODIR= $(DESTDIR)$(INFO_DIR)
-
-# Directory for shutdown, halt, reboot, etc.
-SHUTDOWNDIR= $(SBINDIR)
-
-# Modes
-DIRMODE= 755
-BINMODE= 755
-MANMODE= 644
-DATMODE= 644
-INFOMODE= 644
-SUIDMODE= 4755
-
-CHMOD= chmod
-INSTALL= install
-INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
-INSTALLBIN= $(INSTALL) -m $(BINMODE)
-INSTALLMAN= $(INSTALL) -m $(MANMODE)
-INSTALLDAT= $(INSTALL) -m $(DATMODE)
-INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
-
-ifeq "$(DISABLE_NLS)" "yes"
-NLSFLAGS = -DDISABLE_NLS
-endif
-
-CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
- $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
- -D_FILE_OFFSET_BITS=64 \
- -DSBINDIR=\"$(SBIN_DIR)\" \
- -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
- -DLOGDIR=\"$(LOG_DIR)\" \
- -DVARPATH=\"$(VAR_PATH)\" \
- -DLOCALEDIR=\"$(LOCALE_DIR)\" \
- $(CFLAGS)
-
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $< -o $@
-
-%: %.cc
- $(CXX) $(CFLAGS) $< -o $@
-
diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h
deleted file mode 100644
index 6ce6b86df5..0000000000
--- a/meta/recipes-core/util-linux/util-linux/defines.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#define UTIL_LINUX_VERSION "2.12"
-#define util_linux_version "util-linux-2.12"
-
-#define HAVE_blkpg_h
-#define HAVE_kd_h
-#define HAVE_locale_h
-#define HAVE_langinfo_h
-#define HAVE_sys_user_h
-#define HAVE_asm_types_h
-//#define NEED_tqueue_h
diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch
deleted file mode 100644
index cefae97e9c..0000000000
--- a/meta/recipes-core/util-linux/util-linux/fix-configure.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-The userlib_execdir was not getting set correctly, the quoting
-was wrong as these quoted items were not getting expanded correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: util-linux-2.24.1/configure.ac
-===================================================================
---- util-linux-2.24.1.orig/configure.ac
-+++ util-linux-2.24.1/configure.ac
-@@ -76,7 +76,7 @@ fi
- AC_SUBST([usrsbin_execdir])
-
- AS_CASE([$libdir],
-- ['${exec_prefix}/'* | '${prefix}/'* | /usr/*],
-+ [${exec_prefix}/* | ${prefix}/* | /usr/*],
- [usrlib_execdir=$libdir],
- [usrlib_execdir='${exec_prefix}'$libdir]
- )
diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include
deleted file mode 100644
index e6abcd91f7..0000000000
--- a/meta/recipes-core/util-linux/util-linux/make_include
+++ /dev/null
@@ -1,17 +0,0 @@
-VERSION=2.12
-CC=gcc
-CFLAGS=
-LDFLAGS=
-HAVE_OLD_GCC=yes
-HAVE_RAW_H=yes
-HAVE_NCURSES=yes
-CURSESFLAGS=-DNCH=1
-LIBCURSES=-lncurses
-HAVE_TERMCAP=no
-NEED_LIBCRYPT=yes
-FOREIGN = --foreign-user
-HAVE_XGETTEXT=yes
-HAVE_OPENPTY=yes
-HAVE_PIVOT_ROOT=yes
-HAVE_GOOD_RPC=yes
-HAVE_ZLIB=yes
diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h
deleted file mode 100644
index e960eef05f..0000000000
--- a/meta/recipes-core/util-linux/util-linux/swapargs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SWAPON_HAS_TWO_ARGS
-#include <asm/page.h>
-#include <sys/swap.h>
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch
deleted file mode 100644
index 8f26451aa8..0000000000
--- a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Pending
-
-util-linux: ensure the existence of directory for PATHFILES
-
-When compiling util-linux, it's possible to encounter the following error.
- /bin/sh: line 2:: misc-utils/uuidd.8.tmp: No such file or directory
-
-This is because that the misc-utils directory doesn't exist when trying to write to
-misc-utils/uuidd.8.tmp.
-
-When generating misc-utils/uuidd.8 (or anything in PATHFILES), its directory
-may not have been created yet. So we need to ensure the existence of the directory
-to avoid the compilation error.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 17f4c33..ca3dc0f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -123,6 +123,7 @@ EXTRA_DIST += $(PATHFILES:=.in)
-
- $(PATHFILES): Makefile
- @ rm -f $@ $@.tmp
-+ @ mkdir -p `dirname $@`
- $(AM_V_GEN) srcdir=''; \
- test -f ./$@.in || srcdir=$(srcdir)/; \
- $(edit_cmd) $${srcdir}$@.in >$@.tmp
---
-1.7.9.5
-
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
index afe543c6e8..1f496dee21 100644
--- a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
@@ -16,24 +16,29 @@ Patches revert upstream changes in order to support older
machines.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 1 +
+ include/c.h | 7 +++++++
+ 2 files changed, 8 insertions(+)
-Index: util-linux-2.24.1/configure.ac
-===================================================================
---- util-linux-2.24.1.orig/configure.ac
-+++ util-linux-2.24.1/configure.ac
-@@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \
+diff --git a/configure.ac b/configure.ac
+index eb3680b..93e015f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \
llseek \
lseek64 \
mempcpy \
+ mkostemp \
nanosleep \
+ open_memstream \
personality \
- posix_fadvise \
-Index: util-linux-2.24.1/include/c.h
-===================================================================
---- util-linux-2.24.1.orig/include/c.h
-+++ util-linux-2.24.1/include/c.h
-@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
+diff --git a/include/c.h b/include/c.h
+index e423e8b..cf33b94 100644
+--- a/include/c.h
++++ b/include/c.h
+@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
#endif
/*
@@ -47,27 +52,6 @@ Index: util-linux-2.24.1/include/c.h
* MAXHOSTNAMELEN replacement
*/
static inline size_t get_hostname_max(void)
-Index: util-linux-2.24.1/lib/randutils.c
-===================================================================
---- util-linux-2.24.1.orig/lib/randutils.c
-+++ util-linux-2.24.1/lib/randutils.c
-@@ -16,6 +16,7 @@
- #include <sys/syscall.h>
-
- #include "randutils.h"
-+#include "c.h"
-
- #ifdef HAVE_TLS
- #define THREAD_LOCAL static __thread
-Index: util-linux-2.24.1/lib/wholedisk.c
-===================================================================
---- util-linux-2.24.1.orig/lib/wholedisk.c
-+++ util-linux-2.24.1/lib/wholedisk.c
-@@ -10,6 +10,7 @@
-
- #include "blkdev.h"
- #include "wholedisk.h"
-+#include "c.h"
-
- int is_whole_disk_fd(int fd, const char *name)
- {
+--
+1.9.1
+
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
index f131b763ca..6717a75a90 100644
--- a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
@@ -1,27 +1,33 @@
Upstream-Status: Pending
-Index: util-linux-2.22.1/login-utils/login.c
-===================================================================
---- util-linux-2.22.1.orig/login-utils/login.c
-+++ util-linux-2.22.1/login-utils/login.c
-@@ -1239,6 +1239,8 @@ int main(int argc, char **argv)
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ login-utils/login.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/login-utils/login.c b/login-utils/login.c
+index ebb76f5..38c881b 100644
+--- a/login-utils/login.c
++++ b/login-utils/login.c
+@@ -1110,6 +1110,7 @@ int main(int argc, char **argv)
char *buff;
int childArgc = 0;
int retcode;
+ struct sigaction act;
-+
char *pwdbuf = NULL;
struct passwd *pwd = NULL, _pwd;
-@@ -1252,7 +1254,10 @@ int main(int argc, char **argv)
+@@ -1123,7 +1124,9 @@ int main(int argc, char **argv)
timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
signal(SIGALRM, timedout);
-- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */
+- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioctl() */
+ (void) sigaction(SIGALRM, NULL, &act);
+ act.sa_flags &= ~SA_RESTART;
+ sigaction(SIGALRM, &act, NULL);
-+
alarm(timeout);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
+--
+1.9.1
+
diff --git a/meta/recipes-core/util-linux/util-linux_2.24.2.bb b/meta/recipes-core/util-linux/util-linux_2.25.2.bb
index ed753e48b3..697b9000c0 100644
--- a/meta/recipes-core/util-linux/util-linux_2.24.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.25.2.bb
@@ -1,4 +1,4 @@
-MAJOR_VERSION = "2.24"
+MAJOR_VERSION = "2.25"
require util-linux.inc
PR = "r1"
@@ -13,14 +13,12 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
file://util-linux-ng-2.16-mount_lock_path.patch \
file://uclibc-__progname-conflict.patch \
file://configure-sbindir.patch \
- file://fix-configure.patch \
file://fix-parallel-build.patch \
- file://util-linux-ensure-the-existence-of-directory-for-PAT.patch \
${OLDHOST} \
"
-SRC_URI[md5sum] = "3f191727a0d28f7204b755cf1b6ea0aa"
-SRC_URI[sha256sum] = "1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0"
+SRC_URI[md5sum] = "cab3d7be354000f629bc601238b629b3"
+SRC_URI[sha256sum] = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6"
CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
diff --git a/meta/recipes-core/volatile-binds/files/COPYING.MIT b/meta/recipes-core/volatile-binds/files/COPYING.MIT
new file mode 100644
index 0000000000..7e7d57413d
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind
new file mode 100755
index 0000000000..2aeaf84ddb
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Perform a bind mount, copying existing files as we do so to ensure the
+# overlaid path has the necessary content.
+
+if [ $# -lt 2 ]; then
+ echo >&2 "Usage: $0 spec mountpoint [OPTIONS]"
+ exit 1
+fi
+
+spec=$1
+mountpoint=$2
+
+if [ $# -gt 2 ]; then
+ options=$3
+else
+ options=
+fi
+
+[ -n "$options" ] && options=",$options"
+
+mkdir -p "${spec%/*}"
+if [ -d "$mountpoint" ]; then
+ if [ ! -d "$spec" ]; then
+ mkdir "$spec"
+ cp -pPR "$mountpoint"/. "$spec/"
+ fi
+elif [ -f "$mountpoint" ]; then
+ if [ ! -f "$spec" ]; then
+ cp -pP "$mountpoint" "$spec"
+ fi
+fi
+
+mount -o "bind$options" "$spec" "$mountpoint"
diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
new file mode 100644
index 0000000000..32be5b4425
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
@@ -0,0 +1,19 @@
+[Unit]
+Description=Bind mount volatile @where@
+DefaultDependencies=false
+Before=local-fs.target
+RequiresMountsFor=@whatparent@ @whereparent@
+ConditionPathIsReadWrite=@whatparent@
+ConditionPathExists=@where@
+ConditionPathIsReadWrite=!@where@
+
+[Service]
+Type=oneshot
+RemainAfterExit=Yes
+StandardOutput=syslog
+TimeoutSec=0
+ExecStart=/sbin/mount-copybind @what@ @where@
+ExecStop=/sbin/umount @where@
+
+[Install]
+WantedBy=local-fs.target
diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb
new file mode 100644
index 0000000000..694ba1e487
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Volatile bind mount setup and configuration for read-only-rootfs"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://../COPYING.MIT;md5=5750f3aa4ea2b00c2bf21b2b2a7b714d"
+
+SRC_URI = "\
+ file://mount-copybind \
+ file://COPYING.MIT \
+ file://volatile-binds.service.in \
+"
+
+inherit allarch systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+VOLATILE_BINDS ?= "\
+ /var/volatile/lib /var/lib\n\
+"
+VOLATILE_BINDS[type] = "list"
+VOLATILE_BINDS[separator] = "\n"
+
+def volatile_systemd_services(d):
+ services = []
+ for line in oe.data.typed_value("VOLATILE_BINDS", d):
+ if not line:
+ continue
+ what, where = line.split(None, 1)
+ services.append("%s.service" % what[1:].replace("/", "-"))
+ return " ".join(services)
+
+SYSTEMD_SERVICE_${PN} = "${@volatile_systemd_services(d)}"
+
+FILES_${PN} += "${systemd_unitdir}/system/*.service"
+
+do_compile () {
+ while read spec mountpoint; do
+ if [ -z "$spec" ]; then
+ continue
+ fi
+
+ servicefile="${spec#/}"
+ servicefile="$(echo "$servicefile" | tr / -).service"
+ sed -e "s#@what@#$spec#g; s#@where@#$mountpoint#g" \
+ -e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \
+ volatile-binds.service.in >$servicefile
+ done <<END
+${@d.getVar('VOLATILE_BINDS', True).replace("\\n", "\n")}
+END
+
+ if [ -e var-volatile-lib.service ]; then
+ # As the seed is stored under /var/lib, ensure that this service runs
+ # after the volatile /var/lib is mounted.
+ sed -i -e "/^Before=/s/\$/ systemd-random-seed.service/" \
+ -e "/^WantedBy=/s/\$/ systemd-random-seed.service/" \
+ var-volatile-lib.service
+ fi
+}
+do_compile[dirs] = "${WORKDIR}"
+
+do_install () {
+ install -d ${D}${base_sbindir}
+ install -m 0755 mount-copybind ${D}${base_sbindir}/
+
+ install -d ${D}${systemd_unitdir}/system
+ for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+ install -m 0644 $service ${D}${systemd_unitdir}/system/
+ done
+}
+do_install[dirs] = "${WORKDIR}"
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch b/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch
new file mode 100644
index 0000000000..650794f504
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch
@@ -0,0 +1,45 @@
+Obey LDFLAGS for tests
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- zlib-1.2.8.orig/Makefile.in
++++ zlib-1.2.8/Makefile.in
+@@ -26,7 +26,7 @@ CFLAGS=-O
+
+ SFLAGS=-O
+ LDFLAGS=
+-TEST_LDFLAGS=-L. libz.a
++TEST_LDFLAGS=-L. $(LDFLAGS)
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.
+ -@rmdir objs
+
+ example$(EXE): example.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ minigzip$(EXE): minigzip.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ examplesh$(EXE): example.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV)
+
+ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV)
+
+ example64$(EXE): example64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ minigzip64$(EXE): minigzip64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ install-libs: $(LIBS)
+ -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
index bdfa045b7b..ca0ba3ff6e 100644
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b
SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
file://remove.ldconfig.call.patch \
file://Makefile-runtests.patch \
+ file://ldflags-tests.patch \
file://run-ptest \
"
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch b/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch
new file mode 100644
index 0000000000..79a6897572
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch
@@ -0,0 +1,193 @@
+This patch comes from:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=73;filename=apt_0.9.7.9%2Bdeb7u2.debdiff;att=1;bug=749795
+
+Upstream-Status: Backport
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+
+diff -uarN apt-0.9.9.4-org/cmdline/apt-get.cc apt-0.9.9.4/cmdline/apt-get.cc
+--- apt-0.9.9.4-org/cmdline/apt-get.cc 2014-08-29 15:37:42.587156134 +0800
++++ apt-0.9.9.4/cmdline/apt-get.cc 2014-08-29 15:51:16.672334086 +0800
+@@ -1046,25 +1046,8 @@
+ return true;
+ }
+ /*}}}*/
+-// CheckAuth - check if each download comes form a trusted source /*{{{*/
+-// ---------------------------------------------------------------------
+-/* */
+-static bool CheckAuth(pkgAcquire& Fetcher)
++static bool AuthPrompt(std::string UntrustedList, bool const PromptUser)
+ {
+- string UntrustedList;
+- for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
+- {
+- if (!(*I)->IsTrusted())
+- {
+- UntrustedList += string((*I)->ShortDesc()) + " ";
+- }
+- }
+-
+- if (UntrustedList == "")
+- {
+- return true;
+- }
+-
+ ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"),UntrustedList,"");
+
+ if (_config->FindB("APT::Get::AllowUnauthenticated",false) == true)
+@@ -1073,6 +1056,9 @@
+ return true;
+ }
+
++ if (PromptUser == false)
++ return _error->Error(_("Some packages could not be authenticated"));
++
+ if (_config->FindI("quiet",0) < 2
+ && _config->FindB("APT::Get::Assume-Yes",false) == false)
+ {
+@@ -1090,6 +1076,28 @@
+ return _error->Error(_("There are problems and -y was used without --force-yes"));
+ }
+ /*}}}*/
++// CheckAuth - check if each download comes form a trusted source /*{{{*/
++// ---------------------------------------------------------------------
++/* */
++static bool CheckAuth(pkgAcquire& Fetcher, bool PromptUser=true)
++{
++ string UntrustedList;
++ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
++ {
++ if (!(*I)->IsTrusted())
++ {
++ UntrustedList += string((*I)->ShortDesc()) + " ";
++ }
++ }
++
++ if (UntrustedList == "")
++ {
++ return true;
++ }
++
++ return AuthPrompt(UntrustedList, PromptUser);
++}
++
+ // InstallPackages - Actually download and install the packages /*{{{*/
+ // ---------------------------------------------------------------------
+ /* This displays the informative messages describing what is going to
+@@ -2482,6 +2490,7 @@
+
+ // Load the requestd sources into the fetcher
+ unsigned J = 0;
++ std::string UntrustedList;
+ for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
+ {
+ string Src;
+@@ -2491,7 +2500,10 @@
+ delete[] Dsc;
+ return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
+ }
+-
++
++ if (Last->Index().IsTrusted() == false)
++ UntrustedList += Src + " ";
++
+ string srec = Last->AsStr();
+ string::size_type pos = srec.find("\nVcs-");
+ while (pos != string::npos)
+@@ -2575,7 +2587,11 @@
+ Last->Index().SourceInfo(*Last,*I),Src);
+ }
+ }
+-
++
++ // check authentication status of the source as well
++ if (UntrustedList != "" && !AuthPrompt(UntrustedList, false))
++ return false;
++
+ // Display statistics
+ unsigned long long FetchBytes = Fetcher.FetchNeeded();
+ unsigned long long FetchPBytes = Fetcher.PartialPresent();
+diff -uarN apt-0.9.9.4-org/test/integration/framework apt-0.9.9.4/test/integration/framework
+--- apt-0.9.9.4-org/test/integration/framework 2014-08-29 15:37:42.623156154 +0800
++++ apt-0.9.9.4/test/integration/framework 2014-08-29 15:55:23.592197940 +0800
+@@ -151,7 +151,7 @@
+ mkdir rootdir aptarchive keys
+ cd rootdir
+ mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d
+- mkdir -p var/cache var/lib var/log
++ mkdir -p var/cache var/lib var/log tmp
+ mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers
+ touch var/lib/dpkg/available
+ mkdir -p usr/lib/apt
+@@ -910,3 +910,35 @@
+ local IGNORE
+ read IGNORE
+ }
++
++testsuccess() {
++ if [ "$1" = '--nomsg' ]; then
++ shift
++ else
++ msgtest 'Test for successful execution of' "$*"
++ fi
++ local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output"
++ if $@ >${OUTPUT} 2>&1; then
++ msgpass
++ else
++ echo >&2
++ cat >&2 $OUTPUT
++ msgfail
++ fi
++}
++
++testfailure() {
++ if [ "$1" = '--nomsg' ]; then
++ shift
++ else
++ msgtest 'Test for failure in execution of' "$*"
++ fi
++ local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output"
++ if $@ >${OUTPUT} 2>&1; then
++ echo >&2
++ cat >&2 $OUTPUT
++ msgfail
++ else
++ msgpass
++ fi
++}
+diff -uarN apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated apt-0.9.9.4/test/integration/test-apt-get-source-authenticated
+--- apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated 1970-01-01 08:00:00.000000000 +0800
++++ apt-0.9.9.4/test/integration/test-apt-get-source-authenticated 2014-08-29 15:58:06.137156796 +0800
+@@ -0,0 +1,31 @@
++#!/bin/sh
++#
++# Regression test for debian bug #749795. Ensure that we fail with
++# a error if apt-get source foo will download a source that comes
++# from a unauthenticated repository
++#
++set -e
++
++TESTDIR=$(readlink -f $(dirname $0))
++. $TESTDIR/framework
++
++setupenvironment
++configarchitecture "i386"
++
++# a "normal" package with source and binary
++buildsimplenativepackage 'foo' 'all' '2.0'
++
++setupaptarchive --no-update
++
++APTARCHIVE=$(readlink -f ./aptarchive)
++rm -f $APTARCHIVE/dists/unstable/*Release*
++
++# update without authenticated InRelease file
++testsuccess aptget update
++
++# this all should fail
++testfailure aptget install -y foo
++testfailure aptget source foo
++
++# allow overriding the warning
++testsuccess aptget source --allow-unauthenticated foo
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 36035b0d51..fede8694c4 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -1,7 +1,7 @@
require apt.inc
inherit native
-DEPENDS += "dpkg-native gettext-native"
+DEPENDS += "dpkg-native gettext-native db-native curl-native"
PACKAGES = ""
USE_NLS = "yes"
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
index 0897d3a9fc..a553aa21fe 100644
--- a/meta/recipes-devtools/apt/apt-package.inc
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -42,6 +42,7 @@ FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
install -d ${D}${bindir}
+ install -m 0755 bin/apt-key ${D}${bindir}/
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
install -m 0755 bin/apt-config ${D}${bindir}/
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index b528c00fd8..378021a327 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -11,6 +11,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
file://truncate-filename.patch \
file://nodoc.patch \
file://disable-configure-in-makefile.patch \
+ file://apt-0.9.9.4-CVE-2014-0478.patch \
"
inherit autotools gettext
diff --git a/meta/recipes-devtools/apt/apt_0.9.9.4.bb b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
index ae9ed6cb66..77cbff1c0c 100644
--- a/meta/recipes-devtools/apt/apt_0.9.9.4.bb
+++ b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
@@ -1,5 +1,5 @@
DEPENDS = "curl db"
-RDEPENDS_${PN} = "dpkg"
+RDEPENDS_${PN} = "dpkg bash debianutils"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
require apt.inc
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc
index 8ed4b134ea..8b00fbddf5 100644
--- a/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -23,6 +23,7 @@ RDEPENDS_${PN} = "m4 gnu-config \
perl-module-getopt-long \
perl-module-io-file \
perl-module-posix \
+ perl-module-data-dumper \
"
RDEPENDS_${PN}_class-native = "m4-native gnu-config-native"
diff --git a/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch b/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch
deleted file mode 100644
index 88f750195d..0000000000
--- a/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400
-+++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400
-@@ -184,6 +184,8 @@
-
- $aclocal_supports_force = `$aclocal --help` =~ /--force/;
-
-+ $automake .= ' --foreign';
-+
- # Dispatch autoreconf's option to the tools.
- # --include;
- $autoconf .= join (' --include=', '', @include);
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index 5c652d43fa..41a17d2913 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
SRC_URI += "file://autoreconf-include.patch \
file://check-automake-cross-warning.patch \
file://autoreconf-exclude.patch \
- file://autoreconf-foreign.patch \
file://autoreconf-gnuconfigize.patch \
file://config_site.patch \
file://remove-usr-local-lib-from-m4.patch \
@@ -23,6 +22,6 @@ SRC_URI[sha256sum] = "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd
SRC_URI_append_class-native = " file://fix_path_xtra.patch"
-EXTRA_OECONF += "ac_cv_path_M4=m4"
+EXTRA_OECONF += "ac_cv_path_M4=m4 ac_cv_prog_TEST_EMACS=no"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
index 61bd21fc38..302ba79f77 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
@@ -13,12 +13,12 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
file://increase-timeout-limit.patch \
file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch"
-SRC_URI[md5sum] = "0fb6b003423e004d94e0119c2390078f"
-SRC_URI[sha256sum] = "73d05a689105eb9b8be54f32498c99ddbd360776fc61cf45be6a2a4eb4a40039"
+SRC_URI[md5sum] = "6f48029cc839303d28496e1609868938"
+SRC_URI[sha256sum] = "3cd9f81a8ae7c6865bb9bbbe16c4307a243a1373d0b315a83571cbba1fff725d"
DEPENDS = "guile-native libtool-native libxml2-native"
-inherit autotools texinfo native
+inherit autotools texinfo native pkgconfig
# autogen-native links against libguile which may have been relocated with sstate
# these environment variables ensure there isn't a relocation issue
diff --git a/meta/recipes-devtools/automake/automake_1.14.1.bb b/meta/recipes-devtools/automake/automake_1.15.bb
index be73d19cf6..d5b6e9eba4 100644
--- a/meta/recipes-devtools/automake/automake_1.14.1.bb
+++ b/meta/recipes-devtools/automake/automake_1.15.bb
@@ -22,8 +22,8 @@ SRC_URI += " file://python-libdir.patch \
file://py-compile-compile-only-optimized-byte-code.patch \
file://buildtest.patch"
-SRC_URI[md5sum] = "d052a3e884631b9c7892f2efce542d75"
-SRC_URI[sha256sum] = "814c2333f350ce00034a1fe718e0e4239998ceea7b0aff67e9fd273ed6dfc23b"
+SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
+SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
do_install_append () {
install -d ${D}${datadir}
diff --git a/meta/recipes-devtools/binutils/binutils-2.24.inc b/meta/recipes-devtools/binutils/binutils-2.24.inc
index 8f3216f2bf..63c928712e 100644
--- a/meta/recipes-devtools/binutils/binutils-2.24.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.24.inc
@@ -32,6 +32,14 @@ SRC_URI = "\
file://replace_macros_with_static_inline.patch \
file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
file://binutils-uninitialised-warning.patch \
+ file://binutils_CVE-2014-8484.patch \
+ file://binutils_CVE-2014-8485.patch \
+ file://binutils_CVE-2014-8501.patch \
+ file://binutils_CVE-2014-8502_1.patch \
+ file://binutils_CVE-2014-8502.patch \
+ file://binutils_CVE-2014-8503.patch \
+ file://binutils_CVE-2014-8504.patch \
+ file://binutils_CVE-2014-8737.patch \
"
SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index 52c573e190..ae14642272 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -4,7 +4,7 @@ SUMMARY = "GNU binary utilities (cross-canadian for ${TARGET_ARCH} target)"
PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "binutils"
-DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext"
+DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
"
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch
new file mode 100644
index 0000000000..e789499477
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch
@@ -0,0 +1,67 @@
+Upstream-Status: Backport
+
+CVE-2014-8484 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From bd25671c6f202c4a5108883caa2adb24ff6f361f Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Fri, 29 Aug 2014 10:36:29 +0930
+Subject: [PATCH] Report an error for S-records with less than the miniumum
+ size
+
+ * srec.c (srec_scan): Revert last change. Report an error for
+ S-records with less than the miniumum byte count.
+---
+ bfd/ChangeLog | 5 +++++
+ bfd/srec.c | 18 +++++++++++++++---
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+Index: binutils-2.24/bfd/srec.c
+===================================================================
+--- binutils-2.24.orig/bfd/srec.c
++++ binutils-2.24/bfd/srec.c
+@@ -455,7 +455,7 @@ srec_scan (bfd *abfd)
+ {
+ file_ptr pos;
+ char hdr[3];
+- unsigned int bytes;
++ unsigned int bytes, min_bytes;
+ bfd_vma address;
+ bfd_byte *data;
+ unsigned char check_sum;
+@@ -478,6 +478,19 @@ srec_scan (bfd *abfd)
+ }
+
+ check_sum = bytes = HEX (hdr + 1);
++ min_bytes = 3;
++ if (hdr[0] == '2' || hdr[0] == '8')
++ min_bytes = 4;
++ else if (hdr[0] == '3' || hdr[0] == '7')
++ min_bytes = 5;
++ if (bytes < min_bytes)
++ {
++ (*_bfd_error_handler) (_("%B:%d: byte count %d too small\n"),
++ abfd, lineno, bytes);
++ bfd_set_error (bfd_error_bad_value);
++ goto error_return;
++ }
++
+ if (bytes * 2 > bufsize)
+ {
+ if (buf != NULL)
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,8 @@
++2014-08-29 Alan Modra <amodra@gmail.com>
++
++ * srec.c (srec_scan): Revert last change. Report an error for
++ S-records with less than the miniumum byte count.
++
+ 2013-12-02 Tristan Gingold <gingold@adacore.com>
+
+ * configure.in: Bump version to 2.24
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch
new file mode 100644
index 0000000000..ec3308b4f4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch
@@ -0,0 +1,102 @@
+Upstream-Status: Backport
+
+CVE-2014-8485 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 493a33860c71cac998f1a56d6d87d6faa801fbaa Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 12:43:16 +0000
+Subject: [PATCH] This patch closes a potential security hole in applications
+ that use the bfd library to parse binaries containing maliciously corrupt
+ section group headers.
+
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
+ sections.
+---
+ bfd/ChangeLog | 6 ++++++
+ bfd/elf.c | 34 ++++++++++++++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 4 deletions(-)
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -608,9 +608,10 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ if (shdr->contents == NULL)
+ {
+ _bfd_error_handler
+- (_("%B: Corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
++ (_("%B: corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
+ bfd_set_error (bfd_error_bad_value);
+- return FALSE;
++ -- num_group;
++ continue;
+ }
+
+ memset (shdr->contents, 0, amt);
+@@ -618,7 +619,16 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
+ || (bfd_bread (shdr->contents, shdr->sh_size, abfd)
+ != shdr->sh_size))
+- return FALSE;
++ {
++ _bfd_error_handler
++ (_("%B: invalid size field in group section header: 0x%lx"), abfd, shdr->sh_size);
++ bfd_set_error (bfd_error_bad_value);
++ -- num_group;
++ /* PR 17510: If the group contents are even partially
++ corrupt, do not allow any of the contents to be used. */
++ memset (shdr->contents, 0, amt);
++ continue;
++ }
+
+ /* Translate raw contents, a flag word followed by an
+ array of elf section indices all in target byte order,
+@@ -651,6 +661,21 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ }
+ }
+ }
++
++ /* PR 17510: Corrupt binaries might contain invalid groups. */
++ if (num_group != (unsigned) elf_tdata (abfd)->num_group)
++ {
++ elf_tdata (abfd)->num_group = num_group;
++
++ /* If all groups are invalid then fail. */
++ if (num_group == 0)
++ {
++ elf_tdata (abfd)->group_sect_ptr = NULL;
++ elf_tdata (abfd)->num_group = num_group = -1;
++ (*_bfd_error_handler) (_("%B: no valid group sections found"), abfd);
++ bfd_set_error (bfd_error_bad_value);
++ }
++ }
+ }
+ }
+
+@@ -716,6 +741,7 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ {
+ (*_bfd_error_handler) (_("%B: no group info for section %A"),
+ abfd, newsect);
++ return FALSE;
+ }
+ return TRUE;
+ }
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,9 @@
++2014-10-27 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17510
++ * elf.c (setup_group): Improve handling of corrupt group
++ sections.
++
+ 2014-08-29 Alan Modra <amodra@gmail.com>
+
+ * srec.c (srec_scan): Revert last change. Report an error for
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch
new file mode 100644
index 0000000000..a48fe9b23b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch
@@ -0,0 +1,60 @@
+Upstream-Status: Backport
+
+CVE-2014-8501 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 7e1e19887abd24aeb15066b141cdff5541e0ec8e Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 14:45:06 +0000
+Subject: [PATCH] Fix a seg-fault in strings and other binutuils when parsing a
+ corrupt PE executable with an invalid value in the NumberOfRvaAndSizes field
+ of the AOUT header.
+
+ PR binutils/17512
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
+ with an invalid value for NumberOfRvaAndSizes.
+---
+ bfd/ChangeLog | 4 ++++
+ bfd/peXXigen.c | 12 ++++++++++++
+ 2 files changed, 16 insertions(+)
+
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -460,6 +460,18 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
+ {
+ int idx;
+
++ /* PR 17512: Corrupt PE binaries can cause seg-faults. */
++ if (a->NumberOfRvaAndSizes > 16)
++ {
++ (*_bfd_error_handler)
++ (_("%B: aout header specifies an invalid number of data-directory entries: %d"),
++ abfd, a->NumberOfRvaAndSizes);
++ /* Paranoia: If the number is corrupt, then assume that the
++ actual entries themselves might be corrupt as well. */
++ a->NumberOfRvaAndSizes = 0;
++ }
++
++
+ for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++)
+ {
+ /* If data directory is empty, rva also should be 0. */
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,5 +1,9 @@
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
++ PR binutils/17512
++ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
++ with an invalid value for NumberOfRvaAndSizes.
++
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
+ sections.
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch
new file mode 100644
index 0000000000..05af65bad1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch
@@ -0,0 +1,89 @@
+Upstream-Status: Backport
+
+CVE-2014-8502 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 5a4b0ccc20ba30caef53b01bee2c0aaa5b855339 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 28 Oct 2014 15:42:56 +0000
+Subject: [PATCH] More fixes for corrupt binaries crashing the binutils.
+
+ PR binutils/17512
+ * elf.c (bfd_section_from_shdr): Allocate and free the recursion
+ detection table on a per-bfd basis.
+ * peXXigen.c (pe_print_edata): Handle binaries with a truncated
+ export table.
+---
+ bfd/ChangeLog | 8 ++++++++
+ bfd/elf.c | 16 +++++++++++++---
+ bfd/peXXigen.c | 9 +++++++++
+ 3 files changed, 30 insertions(+), 3 deletions(-)
+
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -1438,6 +1438,15 @@ pe_print_edata (bfd * abfd, void * vfile
+ }
+ }
+
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (datasize < 36)
++ {
++ fprintf (file,
++ _("\nThere is an export table in %s, but it is too small (%d)\n"),
++ section->name, (int) datasize);
++ return TRUE;
++ }
++
+ fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"),
+ section->name, (unsigned long) addr);
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -1576,6 +1576,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ const char *name;
+ bfd_boolean ret = TRUE;
+ static bfd_boolean * sections_being_created = NULL;
++ static bfd * sections_being_created_abfd = NULL;
+ static unsigned int nesting = 0;
+
+ if (shindex >= elf_numsections (abfd))
+@@ -1588,13 +1589,20 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ loop. Detect this here, by refusing to load a section that we are
+ already in the process of loading. We only trigger this test if
+ we have nested at least three sections deep as normal ELF binaries
+- can expect to recurse at least once. */
++ can expect to recurse at least once.
++
++ FIXME: It would be better if this array was attached to the bfd,
++ rather than being held in a static pointer. */
++
++ if (sections_being_created_abfd != abfd)
++ sections_being_created = NULL;
+
+ if (sections_being_created == NULL)
+ {
+ /* FIXME: It would be more efficient to attach this array to the bfd somehow. */
+ sections_being_created = (bfd_boolean *)
+ bfd_zalloc (abfd, elf_numsections (abfd) * sizeof (bfd_boolean));
++ sections_being_created_abfd = abfd;
+ }
+ if (sections_being_created [shindex])
+ {
+@@ -2098,7 +2106,10 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if (sections_being_created)
+ sections_being_created [shindex] = FALSE;
+ if (-- nesting == 0)
++ {
+ sections_being_created = NULL;
++ sections_being_created_abfd = abfd;
++ }
+ return ret;
+ }
+
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch
new file mode 100644
index 0000000000..9e0c9c8b3c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch
@@ -0,0 +1,523 @@
+Upstream-Status: Backport
+
+CVE-2014-8502 supporting patch.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From bf67003b4567600ed3022a439207ac8f26454f91 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 18:05:37 +0000
+Subject: [PATCH] This fixes more seg-faults in tools like "strings" and
+ "objdump" when presented with corrupt binaries.
+
+ PR binutils/17512
+ * elf.c (bfd_section_from_shdr): Detect and warn about ELF
+ binaries with a group of sections linked by the string table
+ indicies.
+ * peXXigen.c (pe_print_edata): Detect out of range rvas and
+ entry counts for the Export Address table, Name Pointer table
+ and Ordinal table.
+---
+ bfd/ChangeLog | 5 ++
+ bfd/elf.c | 194 ++++++++++++++++++++++++++++++++++++++-------------------
+ bfd/peXXigen.c | 18 +++++-
+ 3 files changed, 150 insertions(+), 67 deletions(-)
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -1574,38 +1574,67 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ Elf_Internal_Ehdr *ehdr;
+ const struct elf_backend_data *bed;
+ const char *name;
++ bfd_boolean ret = TRUE;
++ static bfd_boolean * sections_being_created = NULL;
++ static unsigned int nesting = 0;
+
+ if (shindex >= elf_numsections (abfd))
+ return FALSE;
+
++ if (++ nesting > 3)
++ {
++ /* PR17512: A corrupt ELF binary might contain a recursive group of
++ sections, each the string indicies pointing to the next in the
++ loop. Detect this here, by refusing to load a section that we are
++ already in the process of loading. We only trigger this test if
++ we have nested at least three sections deep as normal ELF binaries
++ can expect to recurse at least once. */
++
++ if (sections_being_created == NULL)
++ {
++ /* FIXME: It would be more efficient to attach this array to the bfd somehow. */
++ sections_being_created = (bfd_boolean *)
++ bfd_zalloc (abfd, elf_numsections (abfd) * sizeof (bfd_boolean));
++ }
++ if (sections_being_created [shindex])
++ {
++ (*_bfd_error_handler)
++ (_("%B: warning: loop in section dependencies detected"), abfd);
++ return FALSE;
++ }
++ sections_being_created [shindex] = TRUE;
++ }
++
+ hdr = elf_elfsections (abfd)[shindex];
+ ehdr = elf_elfheader (abfd);
+ name = bfd_elf_string_from_elf_section (abfd, ehdr->e_shstrndx,
+ hdr->sh_name);
+ if (name == NULL)
+- return FALSE;
++ goto fail;
+
+ bed = get_elf_backend_data (abfd);
+ switch (hdr->sh_type)
+ {
+ case SHT_NULL:
+ /* Inactive section. Throw it away. */
+- return TRUE;
++ goto success;
+
+- case SHT_PROGBITS: /* Normal section with contents. */
+- case SHT_NOBITS: /* .bss section. */
+- case SHT_HASH: /* .hash section. */
+- case SHT_NOTE: /* .note section. */
++ case SHT_PROGBITS: /* Normal section with contents. */
++ case SHT_NOBITS: /* .bss section. */
++ case SHT_HASH: /* .hash section. */
++ case SHT_NOTE: /* .note section. */
+ case SHT_INIT_ARRAY: /* .init_array section. */
+ case SHT_FINI_ARRAY: /* .fini_array section. */
+ case SHT_PREINIT_ARRAY: /* .preinit_array section. */
+ case SHT_GNU_LIBLIST: /* .gnu.liblist section. */
+ case SHT_GNU_HASH: /* .gnu.hash section. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_DYNAMIC: /* Dynamic linking information. */
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_link > elf_numsections (abfd))
+ {
+ /* PR 10478: Accept Solaris binaries with a sh_link
+@@ -1619,11 +1648,11 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ break;
+ /* Otherwise fall through. */
+ default:
+- return FALSE;
++ goto fail;
+ }
+ }
+ else if (elf_elfsections (abfd)[hdr->sh_link] == NULL)
+- return FALSE;
++ goto fail;
+ else if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
+ {
+ Elf_Internal_Shdr *dynsymhdr;
+@@ -1652,24 +1681,26 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- break;
++ goto success;
+
+- case SHT_SYMTAB: /* A symbol table */
++ case SHT_SYMTAB: /* A symbol table. */
+ if (elf_onesymtab (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
+ {
+ if (hdr->sh_size != 0)
+- return FALSE;
++ goto fail;
+ /* Some assemblers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+- return TRUE;
++ goto success;
+ }
++
+ BFD_ASSERT (elf_onesymtab (abfd) == 0);
+ elf_onesymtab (abfd) = shindex;
+ elf_tdata (abfd)->symtab_hdr = *hdr;
+@@ -1686,7 +1717,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ && (abfd->flags & DYNAMIC) != 0
+ && ! _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex))
+- return FALSE;
++ goto fail;
+
+ /* Go looking for SHT_SYMTAB_SHNDX too, since if there is one we
+ can't read symbols without that section loaded as well. It
+@@ -1712,26 +1743,29 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ break;
+ }
+ if (i != shindex)
+- return bfd_section_from_shdr (abfd, i);
++ ret = bfd_section_from_shdr (abfd, i);
+ }
+- return TRUE;
++ goto success;
+
+- case SHT_DYNSYM: /* A dynamic symbol table */
++ case SHT_DYNSYM: /* A dynamic symbol table. */
+ if (elf_dynsymtab (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
+ {
+ if (hdr->sh_size != 0)
+- return FALSE;
++ goto fail;
++
+ /* Some linkers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+- return TRUE;
++ goto success;
+ }
++
+ BFD_ASSERT (elf_dynsymtab (abfd) == 0);
+ elf_dynsymtab (abfd) = shindex;
+ elf_tdata (abfd)->dynsymtab_hdr = *hdr;
+@@ -1740,34 +1774,38 @@ bfd_section_from_shdr (bfd *abfd, unsign
+
+ /* Besides being a symbol table, we also treat this as a regular
+ section, so that objcopy can handle it. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+- case SHT_SYMTAB_SHNDX: /* Symbol section indices when >64k sections */
++ case SHT_SYMTAB_SHNDX: /* Symbol section indices when >64k sections. */
+ if (elf_symtab_shndx (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ BFD_ASSERT (elf_symtab_shndx (abfd) == 0);
+ elf_symtab_shndx (abfd) = shindex;
+ elf_tdata (abfd)->symtab_shndx_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->symtab_shndx_hdr;
+- return TRUE;
++ goto success;
+
+- case SHT_STRTAB: /* A string table */
++ case SHT_STRTAB: /* A string table. */
+ if (hdr->bfd_section != NULL)
+- return TRUE;
++ goto success;
++
+ if (ehdr->e_shstrndx == shindex)
+ {
+ elf_tdata (abfd)->shstrtab_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->shstrtab_hdr;
+- return TRUE;
++ goto success;
+ }
++
+ if (elf_elfsections (abfd)[elf_onesymtab (abfd)]->sh_link == shindex)
+ {
+ symtab_strtab:
+ elf_tdata (abfd)->strtab_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->strtab_hdr;
+- return TRUE;
++ goto success;
+ }
++
+ if (elf_elfsections (abfd)[elf_dynsymtab (abfd)]->sh_link == shindex)
+ {
+ dynsymtab_strtab:
+@@ -1776,8 +1814,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ elf_elfsections (abfd)[shindex] = hdr;
+ /* We also treat this as a regular section, so that objcopy
+ can handle it. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
+ }
+
+ /* If the string table isn't one of the above, then treat it as a
+@@ -1795,9 +1834,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ {
+ /* Prevent endless recursion on broken objects. */
+ if (i == shindex)
+- return FALSE;
++ goto fail;
+ if (! bfd_section_from_shdr (abfd, i))
+- return FALSE;
++ goto fail;
+ if (elf_onesymtab (abfd) == i)
+ goto symtab_strtab;
+ if (elf_dynsymtab (abfd) == i)
+@@ -1805,7 +1844,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_REL:
+ case SHT_RELA:
+@@ -1820,7 +1860,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if (hdr->sh_entsize
+ != (bfd_size_type) (hdr->sh_type == SHT_REL
+ ? bed->s->sizeof_rel : bed->s->sizeof_rela))
+- return FALSE;
++ goto fail;
+
+ /* Check for a bogus link to avoid crashing. */
+ if (hdr->sh_link >= num_sec)
+@@ -1828,8 +1868,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ ((*_bfd_error_handler)
+ (_("%B: invalid link %lu for reloc section %s (index %u)"),
+ abfd, hdr->sh_link, name, shindex));
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
+ }
+
+ /* For some incomprehensible reason Oracle distributes
+@@ -1870,7 +1911,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if ((elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_SYMTAB
+ || elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_DYNSYM)
+ && ! bfd_section_from_shdr (abfd, hdr->sh_link))
+- return FALSE;
++ goto fail;
+
+ /* If this reloc section does not use the main symbol table we
+ don't treat it as a reloc section. BFD can't adequately
+@@ -1885,14 +1926,18 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ || hdr->sh_info >= num_sec
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_REL
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_RELA)
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ {
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
++ }
+
+ if (! bfd_section_from_shdr (abfd, hdr->sh_info))
+- return FALSE;
++ goto fail;
++
+ target_sect = bfd_section_from_elf_index (abfd, hdr->sh_info);
+ if (target_sect == NULL)
+- return FALSE;
++ goto fail;
+
+ esdt = elf_section_data (target_sect);
+ if (hdr->sh_type == SHT_RELA)
+@@ -1904,7 +1949,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ amt = sizeof (*hdr2);
+ hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+ if (hdr2 == NULL)
+- return FALSE;
++ goto fail;
+ *hdr2 = *hdr;
+ *p_hdr = hdr2;
+ elf_elfsections (abfd)[shindex] = hdr2;
+@@ -1920,34 +1965,40 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ target_sect->use_rela_p = 1;
+ }
+ abfd->flags |= HAS_RELOC;
+- return TRUE;
++ goto success;
+ }
+
+ case SHT_GNU_verdef:
+ elf_dynverdef (abfd) = shindex;
+ elf_tdata (abfd)->dynverdef_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_GNU_versym:
+ if (hdr->sh_entsize != sizeof (Elf_External_Versym))
+- return FALSE;
++ goto fail;
++
+ elf_dynversym (abfd) = shindex;
+ elf_tdata (abfd)->dynversym_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_GNU_verneed:
+ elf_dynverref (abfd) = shindex;
+ elf_tdata (abfd)->dynverref_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_SHLIB:
+- return TRUE;
++ goto success;
+
+ case SHT_GROUP:
+ if (! IS_VALID_GROUP_SECTION_HEADER (hdr, GRP_ENTRY_SIZE))
+- return FALSE;
++ goto fail;
++
+ if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
++
+ if (hdr->contents != NULL)
+ {
+ Elf_Internal_Group *idx = (Elf_Internal_Group *) hdr->contents;
+@@ -1973,7 +2024,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- break;
++ goto success;
+
+ default:
+ /* Possibly an attributes section. */
+@@ -1981,14 +2032,14 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ || hdr->sh_type == bed->obj_attrs_section_type)
+ {
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
+ _bfd_elf_parse_attributes (abfd, hdr);
+- return TRUE;
++ goto success;
+ }
+
+ /* Check for any processor-specific section types. */
+ if (bed->elf_backend_section_from_shdr (abfd, hdr, name, shindex))
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_type >= SHT_LOUSER && hdr->sh_type <= SHT_HIUSER)
+ {
+@@ -2000,9 +2051,12 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ "specific section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+- /* Allow sections reserved for applications. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ {
++ /* Allow sections reserved for applications. */
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
++ }
+ }
+ else if (hdr->sh_type >= SHT_LOPROC
+ && hdr->sh_type <= SHT_HIPROC)
+@@ -2023,8 +2077,11 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ "`%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+- /* Otherwise it should be processed. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ {
++ /* Otherwise it should be processed. */
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
++ }
+ }
+ else
+ /* FIXME: We should handle this section. */
+@@ -2032,10 +2089,17 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ (_("%B: don't know how to handle section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+
+- return FALSE;
++ goto fail;
+ }
+
+- return TRUE;
++ fail:
++ ret = FALSE;
++ success:
++ if (sections_being_created)
++ sections_being_created [shindex] = FALSE;
++ if (-- nesting == 0)
++ sections_being_created = NULL;
++ return ret;
+ }
+
+ /* Return the local symbol specified by ABFD, R_SYMNDX. */
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -1528,7 +1528,12 @@ pe_print_edata (bfd * abfd, void * vfile
+ _("\nExport Address Table -- Ordinal Base %ld\n"),
+ edt.base);
+
+- for (i = 0; i < edt.num_functions; ++i)
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (edt.eat_addr + (edt.num_functions * 4) - adj >= datasize)
++ fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.eat_addr,
++ (long) edt.num_functions);
++ else for (i = 0; i < edt.num_functions; ++i)
+ {
+ bfd_vma eat_member = bfd_get_32 (abfd,
+ data + edt.eat_addr + (i * 4) - adj);
+@@ -1564,7 +1569,16 @@ pe_print_edata (bfd * abfd, void * vfile
+ fprintf (file,
+ _("\n[Ordinal/Name Pointer] Table\n"));
+
+- for (i = 0; i < edt.num_names; ++i)
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (edt.npt_addr + (edt.num_names * 4) - adj >= datasize)
++ fprintf (file, _("\tInvalid Name Pointer Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.npt_addr,
++ (long) edt.num_names);
++ else if (edt.ot_addr + (edt.num_names * 2) - adj >= datasize)
++ fprintf (file, _("\tInvalid Ordinal Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.ot_addr,
++ (long) edt.num_names);
++ else for (i = 0; i < edt.num_names; ++i)
+ {
+ bfd_vma name_ptr = bfd_get_32 (abfd,
+ data +
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,8 +1,13 @@
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
++ * elf.c (bfd_section_from_shdr): Detect and warn about ELF
++ binaries with a group of sections linked by the string table
++ indicies.
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
+ with an invalid value for NumberOfRvaAndSizes.
++ (pe_print_edata): Detect out of range rvas and entry counts for
++ the Export Address table, Name Pointer table and Ordinal table.
+
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch
new file mode 100644
index 0000000000..2dd3354fc1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Backport
+
+CVE-2014-8503 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 0102ea8cec5fc509bba6c91df61b7ce23a799d32 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Thu, 30 Oct 2014 17:16:17 +0000
+Subject: [PATCH] Fixes a seg-fault in the ihex parser when it encounters a
+ malformed ihex file.
+
+ PR binutils/17512
+ * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
+---
+ bfd/ChangeLog | 1 +
+ bfd/ihex.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+Index: binutils-2.24/bfd/ihex.c
+===================================================================
+--- binutils-2.24.orig/bfd/ihex.c
++++ binutils-2.24/bfd/ihex.c
+@@ -322,7 +322,7 @@ ihex_scan (bfd *abfd)
+ {
+ if (! ISHEX (buf[i]))
+ {
+- ihex_bad_byte (abfd, lineno, hdr[i], error);
++ ihex_bad_byte (abfd, lineno, buf[i], error);
+ goto error_return;
+ }
+ }
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,8 @@
++2014-10-30 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17512
++ * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
++
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch
new file mode 100644
index 0000000000..b4d1d1ff61
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+
+CVE-2014-8504 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 708d7d0d11f0f2d776171979aa3479e8e12a38a0 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 28 Oct 2014 10:48:14 +0000
+Subject: [PATCH] This patch fixes a flaw in the SREC parser which could cause
+ a stack overflow and potential secuiryt breach.
+
+ PR binutils/17510
+ * srec.c (srec_bad_byte): Increase size of buf to allow for
+ negative values.
+ (srec_scan): Use an unsigned char buffer to hold header bytes.
+---
+ bfd/ChangeLog | 8 ++++++++
+ bfd/elf.c | 2 +-
+ bfd/peXXigen.c | 1 -
+ bfd/srec.c | 4 ++--
+ 4 files changed, 11 insertions(+), 4 deletions(-)
+
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,11 @@
++2014-10-28 Andreas Schwab <schwab@suse.de>
++ Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17510
++ * srec.c (srec_bad_byte): Increase size of buf to allow for
++ negative values.
++ (srec_scan): Use an unsigned char buffer to hold header bytes.
++
+ 2014-10-30 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -471,7 +471,6 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
+ a->NumberOfRvaAndSizes = 0;
+ }
+
+-
+ for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++)
+ {
+ /* If data directory is empty, rva also should be 0. */
+Index: binutils-2.24/bfd/srec.c
+===================================================================
+--- binutils-2.24.orig/bfd/srec.c
++++ binutils-2.24/bfd/srec.c
+@@ -248,7 +248,7 @@ srec_bad_byte (bfd *abfd,
+ }
+ else
+ {
+- char buf[10];
++ char buf[40];
+
+ if (! ISPRINT (c))
+ sprintf (buf, "\\%03o", (unsigned int) c);
+@@ -454,7 +454,7 @@ srec_scan (bfd *abfd)
+ case 'S':
+ {
+ file_ptr pos;
+- char hdr[3];
++ unsigned char hdr[3];
+ unsigned int bytes, min_bytes;
+ bfd_vma address;
+ bfd_byte *data;
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch
new file mode 100644
index 0000000000..4a84562201
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch
@@ -0,0 +1,177 @@
+Upstream-Status: Backport
+
+CVE-2014-8737 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From dd9b91de2149ee81d47f708e7b0bbf57da10ad42 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Thu, 6 Nov 2014 14:49:10 +0000
+Subject: [PATCH] Prevent archive memebers with illegal pathnames from being
+ extracted from an archive.
+
+ PR binutils/17552, binutils/17533
+ * bucomm.c (is_valid_archive_path): New function. Returns false
+ for absolute pathnames and pathnames that include /../.
+ * bucomm.h (is_valid_archive_path): Add prototype.
+ * ar.c (extract_file): Use new function to check for valid
+ pathnames when extracting files from an archive.
+ * objcopy.c (copy_archive): Likewise.
+ * doc/binutils.texi: Update documentation to mention the
+ limitation on pathname of archive members.
+---
+ binutils/ChangeLog | 16 ++++++++++++++--
+ binutils/ar.c | 9 +++++++++
+ binutils/bucomm.c | 26 ++++++++++++++++++++++++++
+ binutils/bucomm.h | 12 ++++++++----
+ binutils/doc/binutils.texi | 3 ++-
+ binutils/objcopy.c | 6 ++++++
+ 6 files changed, 65 insertions(+), 7 deletions(-)
+
+Index: binutils-2.24/binutils/ar.c
+===================================================================
+--- binutils-2.24.orig/binutils/ar.c
++++ binutils-2.24/binutils/ar.c
+@@ -1031,6 +1031,15 @@ extract_file (bfd *abfd)
+ bfd_size_type size;
+ struct stat buf;
+
++ /* PR binutils/17533: Do not allow directory traversal
++ outside of the current directory tree. */
++ if (! is_valid_archive_path (bfd_get_filename (abfd)))
++ {
++ non_fatal (_("illegal pathname found in archive member: %s"),
++ bfd_get_filename (abfd));
++ return;
++ }
++
+ if (bfd_stat_arch_elt (abfd, &buf) != 0)
+ /* xgettext:c-format */
+ fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
+Index: binutils-2.24/binutils/bucomm.c
+===================================================================
+--- binutils-2.24.orig/binutils/bucomm.c
++++ binutils-2.24/binutils/bucomm.c
+@@ -624,3 +624,29 @@ bfd_get_archive_filename (const bfd *abf
+ bfd_get_filename (abfd));
+ return buf;
+ }
++
++/* Returns TRUE iff PATHNAME, a filename of an archive member,
++ is valid for writing. For security reasons absolute paths
++ and paths containing /../ are not allowed. See PR 17533. */
++
++bfd_boolean
++is_valid_archive_path (char const * pathname)
++{
++ const char * n = pathname;
++
++ if (IS_ABSOLUTE_PATH (n))
++ return FALSE;
++
++ while (*n)
++ {
++ if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
++ return FALSE;
++
++ while (*n && ! IS_DIR_SEPARATOR (*n))
++ n++;
++ while (IS_DIR_SEPARATOR (*n))
++ n++;
++ }
++
++ return TRUE;
++}
+Index: binutils-2.24/binutils/bucomm.h
+===================================================================
+--- binutils-2.24.orig/binutils/bucomm.h
++++ binutils-2.24/binutils/bucomm.h
+@@ -23,6 +23,8 @@
+ #ifndef _BUCOMM_H
+ #define _BUCOMM_H
+
++/* In bucomm.c. */
++
+ /* Return the filename in a static buffer. */
+ const char *bfd_get_archive_filename (const bfd *);
+
+@@ -58,20 +60,22 @@ bfd_vma parse_vma (const char *, const c
+
+ off_t get_file_size (const char *);
+
++bfd_boolean is_valid_archive_path (char const *);
++
+ extern char *program_name;
+
+-/* filemode.c */
++/* In filemode.c. */
+ void mode_string (unsigned long, char *);
+
+-/* version.c */
++/* In version.c. */
+ extern void print_version (const char *);
+
+-/* rename.c */
++/* In rename.c. */
+ extern void set_times (const char *, const struct stat *);
+
+ extern int smart_rename (const char *, const char *, int);
+
+-/* libiberty. */
++/* In libiberty. */
+ void *xmalloc (size_t);
+
+ void *xrealloc (void *, size_t);
+Index: binutils-2.24/binutils/doc/binutils.texi
+===================================================================
+--- binutils-2.24.orig/binutils/doc/binutils.texi
++++ binutils-2.24/binutils/doc/binutils.texi
+@@ -234,7 +234,8 @@ a normal archive. Instead the elements
+ individually to the second archive.
+
+ The paths to the elements of the archive are stored relative to the
+-archive itself.
++archive itself. For security reasons absolute paths and paths with a
++@code{/../} component are not allowed.
+
+ @cindex compatibility, @command{ar}
+ @cindex @command{ar} compatibility
+Index: binutils-2.24/binutils/objcopy.c
+===================================================================
+--- binutils-2.24.orig/binutils/objcopy.c
++++ binutils-2.24/binutils/objcopy.c
+@@ -2206,6 +2206,12 @@ copy_archive (bfd *ibfd, bfd *obfd, cons
+ bfd_boolean del = TRUE;
+ bfd_boolean ok_object;
+
++ /* PR binutils/17533: Do not allow directory traversal
++ outside of the current directory tree by archive members. */
++ if (! is_valid_archive_path (bfd_get_filename (this_element)))
++ fatal (_("illegal pathname found in archive member: %s"),
++ bfd_get_filename (this_element));
++
+ /* Create an output file for this member. */
+ output_name = concat (dir, "/",
+ bfd_get_filename (this_element), (char *) 0);
+Index: binutils-2.24/binutils/ChangeLog
+===================================================================
+--- binutils-2.24.orig/binutils/ChangeLog
++++ binutils-2.24/binutils/ChangeLog
+@@ -1,3 +1,15 @@
++2014-11-06 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17552, binutils/17533
++ * bucomm.c (is_valid_archive_path): New function. Returns false
++ for absolute pathnames and pathnames that include /../.
++ * bucomm.h (is_valid_archive_path): Add prototype.
++ * ar.c (extract_file): Use new function to check for valid
++ pathnames when extracting files from an archive.
++ * objcopy.c (copy_archive): Likewise.
++ * doc/binutils.texi: Update documentation to mention the
++ limitation on pathname of archive members.
++
+ 2013-11-22 Cory Fields <cory@coryfields.com>
+
+ * windres.c (define_resource): Use zero for timestamp, making
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch
new file mode 100644
index 0000000000..b013995a0d
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch
@@ -0,0 +1,27 @@
+From ffb5bae5d588aaea6325623462a8070a04767196 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Aug 2014 08:33:28 -0700
+Subject: [PATCH] bootchartd.in: no bashism
+
+No bashism in bootchartd.in, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ bootchartd.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bootchartd.in b/bootchartd.in
+index a408bab..064f6a4 100755
+--- a/bootchartd.in
++++ b/bootchartd.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Bootchart logger script
+ # Ziga Mahkovec <ziga.mahkovec@klika.si>
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh
new file mode 100644
index 0000000000..21a78877a2
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: bootchartd_stop
+# Required-Start: $remote_fs $all
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Stop bootchartd collection
+# Description: This script accompanies bootchartd from bootchart2.
+# bootchartd should stop detect the end of the boot process
+# automatically if a window manager is launched, but for
+# command-line only operating systems, this script should be
+# used instead.
+### END INIT INFO
+
+/sbin/bootchartd stop
+
+: exit 0
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
new file mode 100644
index 0000000000..5fc7211f79
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -0,0 +1,157 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+# Copyright (C) 2014 Intel Corp.
+
+# This recipe creates packages for the bootchart2 system-wide profiler daemon
+# and related utilities. Depending on the images you're building, additional
+# configuration may be needed in order to use it.
+#
+# Packages:
+# * bootchart2 - The daemon itself.
+# * pybootchartgui - Python program to visualize and display the data
+# collected by bootchart2 or compatible daemons such as the original
+# bootchart.
+# * bootchartd-stop-initscript - A SysV init script to stop data collection
+# when booting completes (see below for details.)
+#
+# While bootchart2 is designed to stop collecting data roughly when the boot
+# process completes, it is not exactly a stopwatch. It has a list of programs
+# which are supposed signify that the boot process has completed (for example,
+# openbox or gnome-shell,) but it waits a full 20 seconds after such a program
+# is launched before stopping itself, to collect additional data.
+#
+# If you are using a window manager or GUI which isn't included in bootchart2's
+# default configuration file, you should write bbappend file to amend
+# bootchartd.conf and add it to EXIT_PROC. An example of this is shown in this
+# recipe, where the Matchbox window manager (used by Sato) is added.
+#
+# If you want data collection to end at a certain point exactly, you should
+# arrange for the following command to be run:
+# bootchartd stop
+# You might set this command to be launched by the desktop environment shipped
+# on the image you're building after the other startup programs are complete.
+# This will not incur the 20 second wait period and will cause bootchart2 to
+# behave a bit more like a stopwatch. An example of this is shown in this
+# recipe, specifically the bootchartd-stop-initscript package, which stops data
+# collection as the last action when switching to runlevels 2 through 5. You can
+# add bootchartd-stop-initscript to IMAGE_INSTALL if you need to use it.
+#
+# Unless you're doing something special, if your image does not launch an X
+# window manager, you will need to add bootchartd-stop-initscript to your image.
+#
+# Bootchart2 can be started in two ways. Data collection can be initiated by
+# running the following command:
+# bootchartd start
+# However, for the most complete data, the bootchart2 developers recommend
+# running it as PID 1. This can be done by adding the following to the kernel
+# command line parameters in the bootloader setup:
+# init=/sbin/bootchartd
+# When invoked this way, bootchart2 will set itself up and then automatically
+# run /sbin/init. For example, when booting the default qemux86 image, one might
+# use a command like this:
+# runqemu qemux86 bootparams="initcall_debug printk.time=y quiet \
+# init=/sbin/bootchartd"
+#
+# Neither method is actually implemented here, choose what works for you.
+#
+# If you are building your image with systemd instead of SysV init, bootchart2
+# includes systemd service files to begin collection automatically at boot and
+# end collection automatically 20 seconds after the boot process has completed.
+# However, be aware that systemd tends to start bootchart2 relatively late into
+# the boot process, so it's highly recommended to use bootchart2 as PID 1. If
+# you're using systemd and you wish to use another method to stop data
+# collection at a time of your choosing, you may do so as long as you get to it
+# before the 20 second timeout of the systemd service files. Also, you may write
+# a bbappend to patch bootchart2-done.timer.in to increase or decrease the
+# timeout. Decreasing it to 0 will make it behave like
+# bootchartd-stop-initscript.
+#
+# By default, when data collection is stopped, a file named bootchart.tgz will
+# be created in /var/log. If pybootchartgui is included in your image,
+# bootchart.png will also be created at the same time. However, this results in
+# a noticeable hitch or pause at boot time, which may not be what you want on an
+# embedded device. So you may prefer to omit pybootchartgui from your image. In
+# that case, copy bootchart.tgz over to your development system and generate
+# bootchart.png there. To get pybootchartgui on your development system, you can
+# either install it directly from some other source, or build bootchart2-native
+# and find pybootchartgui in the native sysroot:
+# bitbake bootchart2-native
+# ./tmp/sysroots/x86_64-linux/usr/bin/pybootchartgui /path/to/bootchart.tgz
+# Note that, whether installed on your build system or on your image, the
+# pybootchartgui provided by this recipe does not support the -i option. You
+# will need to install pybootchartgui by other means in order to run it in
+# interactive mode.
+
+SUMMARY = "Booting sequence and CPU,I/O usage monitor"
+DESCRIPTION = "Monitors where the system spends its time at start, creating a graph of all processes, disk utilization, and wait time."
+AUTHOR = "Wonhong Kwon <wonhong.kwon@lge.com>"
+HOMEPAGE = "https://github.com/mmeeks/bootchart"
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44ac4678311254db62edf8fd39cb8124"
+
+# one commit beyond 1.14.6 for a systemd-related bugfix
+PV = "0.14.6+git${SRCPV}"
+
+SRC_URI = "git://github.com/mmeeks/bootchart.git \
+ file://bootchartd_stop.sh \
+ file://bootchartd-no-bashism.patch \
+ "
+
+SRCREV = "b65ed43b0ae832080fb728245de9ef1a4b48d8b5"
+
+S = "${WORKDIR}/git"
+
+inherit systemd
+inherit update-rc.d
+inherit pythonnative
+
+# The only reason to build bootchart2-native is for a native pybootchartgui.
+BBCLASSEXTEND = "native"
+
+SYSTEMD_SERVICE_${PN} = "bootchart2.service bootchart2-done.service bootchart2-done.timer"
+
+UPDATERCPN = "bootchartd-stop-initscript"
+INITSCRIPT_NAME = "bootchartd_stop.sh"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
+# We want native pybootchartgui to execute with the correct Python interpeter.
+do_compile_append_class-native () {
+ echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
+ mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
+ chmod +x ${S}/pybootchartgui
+}
+
+do_compile_prepend () {
+ export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+ export BINDIR="${bindir}"
+ export LIBDIR="${base_libdir}"
+}
+
+do_install () {
+ install -d ${D}${sysconfdir} # needed for -native
+ export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+ export BINDIR="${bindir}"
+ export DESTDIR="${D}"
+ export LIBDIR="${base_libdir}"
+
+ oe_runmake install
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
+
+ echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
+}
+
+PACKAGES =+ "pybootchartgui"
+FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
+RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
+DEPENDS_append_class-native = " python-pycairo-native"
+
+PACKAGES =+ "bootchartd-stop-initscript"
+FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
+
+FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
+FILES_${PN} += "${base_libdir}/bootchart/tmpfs"
+FILES_${PN} += "${libdir}"
+FILES_${PN}-dbg += "${base_libdir}/bootchart/.debug"
+FILES_${PN}-doc += "${datadir}/docs"
+
+RCONFLICTS_${PN} = "bootchart"
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch
deleted file mode 100644
index 695973eded..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
-
-The bug accurs when exec:
- # mkfs.btrfs -r <a relative path> <device>
- (note: the path should be 'valid' correspond to your `pwd`)
-error msg:
- $ scandir for <a relative path> failed: No such file...
-
-Replace strdup() with realpath() to get the correct scan path.
-
-Upstream-Status: Backport (pending)
-
-Reported-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
----
- mkfs.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/mkfs.c b/mkfs.c
-index 2dc90c2..1bd3069 100644
---- a/mkfs.c
-+++ b/mkfs.c
-@@ -756,6 +756,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- ino_t parent_inum, cur_inum;
- ino_t highest_inum = 0;
- char *parent_dir_name;
-+ char real_path[PATH_MAX];
- struct btrfs_path path;
- struct extent_buffer *leaf;
- struct btrfs_key root_dir_key;
-@@ -764,7 +765,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- /* Add list for source directory */
- dir_entry = malloc(sizeof(struct directory_name_entry));
- dir_entry->dir_name = dir_name;
-- dir_entry->path = strdup(dir_name);
-+ dir_entry->path = realpath(dir_name, real_path);
-
- parent_inum = highest_inum + BTRFS_FIRST_FREE_OBJECTID;
- dir_entry->inum = parent_inum;
-@@ -876,7 +877,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- }
-
- free_namelist(files, count);
-- free(parent_dir_entry->path);
- free(parent_dir_entry);
-
- index_cnt = 2;
-@@ -887,7 +887,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- fail:
- free_namelist(files, count);
- fail_no_files:
-- free(parent_dir_entry->path);
- free(parent_dir_entry);
- return -1;
- }
---
-1.8.1.4
-
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
new file mode 100644
index 0000000000..6df4e10a19
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
@@ -0,0 +1,22 @@
+Doc generation requires xmlto and ascidoc which we don't have right now.
+Disable doc generation until such times as we have the right dependencies.
+
+RP 2014/7/16
+
+Upstream-Status: Inappropriate
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-07-16 13:21:43.289386655 +0000
++++ git/Makefile 2014-07-16 13:42:46.453421079 +0000
+@@ -57,8 +57,8 @@
+ btrfs_fragment_libs = -lgd -lpng -ljpeg -lfreetype
+
+ SUBDIRS =
+-BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS)) build-Documentation
+-INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS)) install-Documentation
++BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
++INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
+ CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
+
+ .PHONY: $(SUBDIRS)
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch
deleted file mode 100644
index 9ca9fca3ee..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Allow mandir to be set from the environment, fixing the following packaging warnings:
-
-WARNING: For recipe btrfs-tools, the following files were installed but not shipped in any package:
-WARNING: /usr/man/man8/btrfs-show.8.gz
-WARNING: /usr/man/man8/btrfs-image.8.gz
-WARNING: /usr/man/man8/btrfsctl.8.gz
-WARNING: /usr/man/man8/btrfs.8.gz
-WARNING: /usr/man/man8/btrfsck.8.gz
-WARNING: /usr/man/man8/mkfs.btrfs.8.gz
-
-RP - 5/7/2011
-
-Index: git/man/Makefile
-===================================================================
---- git.orig/man/Makefile 2011-07-05 22:03:58.949919067 +0100
-+++ git/man/Makefile 2011-07-05 22:04:07.789919856 +0100
-@@ -2,9 +2,9 @@
- INSTALL= install
-
- prefix ?= /usr/local
--bindir = $(prefix)/bin
--mandir = $(prefix)/man
--man8dir = $(mandir)/man8
-+bindir ?= $(prefix)/bin
-+mandir ?= $(prefix)/man
-+man8dir ?= $(mandir)/man8
-
- MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \
- btrfs-show.8.gz btrfs.8.gz
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
index 8129cd5e99..ef850570fb 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
@@ -12,16 +12,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
SECTION = "base"
DEPENDS = "util-linux attr e2fsprogs lzo acl"
-SRCREV = "8cae1840afb3ea44dcc298f32983e577480dfee4"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git \
- file://weak-defaults.patch \
- file://allow-relative-path.patch \
- "
-
+SRCREV = "44cdb62d3478c834f41c87ea79d261b9c8982dce"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
S = "${WORKDIR}/git"
-PV = "3.12+git${SRCPV}"
+PV = "3.14.2+git${SRCPV}"
+EXTRA_OEMAKE += "DISABLE_DOCUMENTATION=1"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
index 01f9e6efb6..282710908e 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
@@ -2,12 +2,12 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "A set of tools for CD recording, including cdrecord"
-HOMEPAGE = "http://cdrecord.berlios.de/private/cdrecord.html"
+HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
SECTION = "console/utils"
LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
-SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/alpha/cdrtools-${PV}.tar.bz2"
SRC_URI[md5sum] = "f8c6f0fdcba7df0606095498d10315a7"
SRC_URI[sha256sum] = "e399ea964b8048793721b71461271e46d81f242bd2feefb8dbd259c30e75a5a9"
diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
index cd6b1d8845..e40dfdd2d8 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
@@ -15,4 +15,5 @@ SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a
CMAKE_EXTRACONF = "\
-DBUILD_CursesDialog=0 \
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 8592a23046..28b7f2d887 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -13,13 +13,13 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
- file://aarch64-cmake.patch \
- file://aarch64-kwsys.patch \
file://qt4-fail-silent.patch \
file://cmake-2.8.11.2-FindFreetype.patch \
"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
# and possibly missing qmake binary (qtbase-native can be removed from sysroot
@@ -47,5 +47,5 @@ do_configure_prepend() {
CMAKE_EXTRACONF = ""
do_configure () {
- ./configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+ ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
}
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
new file mode 100644
index 0000000000..60014bbf2b
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -0,0 +1,18 @@
+set( CMAKE_SYSTEM_NAME Linux )
+set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
+set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
+set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
+set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+
+string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
+string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+
+# Include the toolchain configuration subscripts
+file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
+foreach(config ${toolchain_config_files})
+ include(${config})
+endforeach()
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch b/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
deleted file mode 100644
index 3e26d58267..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Riku Voipio <riku.voipio@linaro.org>
-Date: Fri, 21 Dec 2012 11:20:02 +0000 (+0200)
-Subject: KWIML: Teach ABI.h about Aarch64
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=34916522
-
-KWIML: Teach ABI.h about Aarch64
-
-The __aarch64__ defines Aarch64, while __AARCH64EB__ defines bigendian
-and __AARCH64EL__ little endian. Only little endian tested, no big
-endian toolchain exists yet.
-
-Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/ABI.h.in b/ABI.h.in
-index f93ddba..7f4772a 100644
---- a/Utilities/KWIML/ABI.h.in
-+++ b/Utilities/KWIML/ABI.h.in
-@@ -418,6 +418,14 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
- #elif defined(__vax__)
- # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
-+# else
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN)
- # error "Byte order of target CPU unknown."
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch b/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
deleted file mode 100644
index 2b68eae6c2..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: KWSys Robot <kwrobot@kitware.com>
-Date: Fri, 21 Dec 2012 13:29:37 +0000 (-0500)
-Subject: KWSys 2012-12-21 (8ce09af5)
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=567e7d94
-
-KWSys 2012-12-21 (8ce09af5)
-
-Extract upstream KWSys using the following shell commands.
-
-$ git archive --prefix=upstream-kwsys/ 8ce09af5 | tar x
-$ git shortlog --no-merges --abbrev=8 --format='%h %s' 933eb822..8ce09af5
-Riku Voipio (1):
- 8ce09af5 CPU: Add Aarch64 support
-
-Change-Id: I4bd0a97abaa0f958e2679afe2d4ad4bcc37434a0
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/CPU.h.in b/CPU.h.in
-index ecd29d1..2e1a584 100644
---- a/Source/kwsys/CPU.h.in
-+++ b/Source/kwsys/CPU.h.in
-@@ -98,6 +98,14 @@
- #elif defined(__SYSC_ZARCH__)
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
-+# else
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #else
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID 0
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
new file mode 100644
index 0000000000..0eb56b66fa
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -0,0 +1 @@
+alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
index de2ac6b219..66a6af629c 100644
--- a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
@@ -6,6 +6,10 @@ DEPENDS += "curl expat zlib libarchive"
SRC_URI += "file://dont-run-cross-binaries.patch"
+SRC_URI_append_class-nativesdk = " \
+ file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh"
+
SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
@@ -32,6 +36,16 @@ EXTRA_OECMAKE=" \
${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
"
+do_install_append_class-nativesdk() {
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+
+ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
+}
+
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
+
FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
diff --git a/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch b/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch
deleted file mode 100644
index d95561bc48..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Add a description to the HAVE_POPEN_PROTOTYPE AC_DEFINE so that this define is
-included in config.h.
-
-Upstream-Status: Submitted (via email)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 3f20573..ec5ca51 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -931,7 +931,7 @@ ac_cv_td_popen=no,
- ac_cv_td_popen=yes))
- AC_MSG_RESULT($ac_cv_td_popen)
- if test $ac_cv_td_popen = yes; then
-- AC_DEFINE(HAVE_POPEN_PROTOTYPE)
-+ AC_DEFINE(HAVE_POPEN_PROTOTYPE,[1],[Conflicting popen prototype])
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
diff --git a/meta/recipes-devtools/diffstat/diffstat/aclocal.patch b/meta/recipes-devtools/diffstat/diffstat/aclocal.patch
deleted file mode 100644
index cde4a4050b..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/aclocal.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Use the correct macro name (AC_AUTOCONF_VERSION) in the CF_ACVERSION_CHECK macro.
-The original macro name (AC_ACVERSION) leads to this error:
-
-| autoreconf: running: aclocal --system-acdir=/poky/buildnew/tmp/work/i586-poky-linux/diffstat/1.57-r0/build/aclocal-copy/ --automake-acdir=/poky/buildnew/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12 --force
-| aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
-| configure.in:9: error: m4_defn: undefined macro: AC_ACVERSION
-| acinclude.m4:989: CF_PROG_CC is expanded from...
-| configure.in:9: the top level
-| autom4te: m4 failed with exit status: 1
-
-Upstream-Status: Submitted (via email)
-Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
-
-Index: diffstat-1.58/aclocal.m4
-===================================================================
---- diffstat-1.58.orig/aclocal.m4 2013-10-29 01:43:23.000000000 +0200
-+++ diffstat-1.58/aclocal.m4 2013-11-04 11:22:53.461562567 +0200
-@@ -13,16 +13,16 @@
- dnl Conditionally generate script according to whether we're using a given autoconf.
- dnl
- dnl $1 = version to compare against
--dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
--dnl $3 = code to use if AC_ACVERSION is older than $1.
-+dnl $2 = code to use if AC_AUTOCONF_VERSION is at least as high as $1.
-+dnl $3 = code to use if AC_AUTOCONF_VERSION is older than $1.
- define([CF_ACVERSION_CHECK],
- [
- ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
- ifdef([m4_version_compare],
--[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
-+[m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [$1]), -1, [$3], [$2])],
- [CF_ACVERSION_COMPARE(
- AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
--AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
-+AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_AUTOCONF_VERSION)), AC_AUTOCONF_VERSION, [$2], [$3])])])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
- dnl --------------------
diff --git a/meta/recipes-devtools/diffstat/diffstat/dirfix.patch b/meta/recipes-devtools/diffstat/diffstat/dirfix.patch
deleted file mode 100644
index 15dbf2b778..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/dirfix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-$libdir isn't used by the Makefile at all apart from in this mkdir.
-This will be used without any DESTDIR so if your libdir is a different
-layout to the bulid system it will cause a failure. E.g:
-
-Build system has /usr/lib only
-libdir = /usr/lib64 for the target
-Results in "mkdir: cannot create directory `/usr/lib64': Permission denied"
-
-Since the directory is never used, we can just remove the mkdir.
-
-Upstream-Status: Submitted (via email)
-
-RP 23/9/2011
-
-Index: diffstat-1.54/makefile.in
-===================================================================
---- diffstat-1.54.orig/makefile.in 2011-09-22 19:13:11.330158571 +0100
-+++ diffstat-1.54/makefile.in 2011-09-22 19:13:35.610158363 +0100
-@@ -79,7 +79,7 @@
- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(man1dir)/$(THIS).$(manext)
-
- installdirs :
-- mkdir -p $(BINDIR) $(libdir) $(man1dir)
-+ mkdir -p $(BINDIR) $(man1dir)
-
- uninstall :
- rm -f $(BINDIR)/$(PROG) $(man1dir)/$(THIS).$(manext)
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.58.bb b/meta/recipes-devtools/diffstat/diffstat_1.59.bb
index 15fb4231c8..f599622b3e 100644
--- a/meta/recipes-devtools/diffstat/diffstat_1.58.bb
+++ b/meta/recipes-devtools/diffstat/diffstat_1.59.bb
@@ -8,14 +8,11 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
- file://dirfix.patch \
- file://aclocal.patch \
- file://aclocal-popen.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "6d6e13f7dcfe4db5da65c5175260ea47"
-SRC_URI[sha256sum] = "fad5135199c3b9aea132c5d45874248f4ce0ff35f61abb8d03c3b90258713793"
+SRC_URI[md5sum] = "1dc7bc48ce846a0686a1af0d091ff8fb"
+SRC_URI[sha256sum] = "267d1441b8889cbefbb7ca7dfd4a17f6c8bc73bc114904c74ecad945a3dbf270"
S = "${WORKDIR}/diffstat-${PV}"
diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
index c7c414d829..e36f0fa695 100755
--- a/meta/recipes-devtools/distcc/files/distcc
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -51,6 +51,9 @@ should_start() {
echo "$DAEMON not starting"
exit 0
fi
+ # we need permission to write to the pid file
+ touch /var/run/$NAME.pid
+ chown distcc /var/run/$NAME.pid
}
case "$1" in
@@ -75,6 +78,7 @@ case "$1" in
echo "$0: stop failed with error code $code" >&2
exit $code
}
+ rm -f /var/run/$NAME.pid >/dev/null 2>&1
echo "."
;;
restart|force-reload)
@@ -92,6 +96,7 @@ case "$1" in
--exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
{
code=$?
+ rm -f /var/run/$NAME.pid >/dev/null 2>&1
echo "$0: restart failed with error code $code" >&2
exit $code
}
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
index 3e3a350fd8..b5151b8acd 100644
--- a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
+++ b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.bz2"
-COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc).*-linux"
+COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
do_install() {
oe_runmake DESTDIR="${D}" install
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS
new file mode 100644
index 0000000000..6da7f5b8c7
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS
@@ -0,0 +1,16 @@
+Permission to use, copy, modify and distribute the DocBook XML DTD
+and its accompanying documentation for any purpose and without fee
+is hereby granted in perpetuity, provided that the above copyright
+notice and this paragraph appear in all copies. The copyright
+holders make no representation about the suitability of the DTD for
+any purpose. It is provided "as is" without expressed or implied
+warranty.
+
+If you modify the DocBook DTD in any way, except for declaring and
+referencing additional sets of general entities and declaring
+additional notations, label your DTD as a variant of DocBook. See
+the maintenance documentation for more information.
+
+Please direct all questions, bug reports, or suggestions for
+changes to the docbook@lists.oasis-open.org mailing list. For more
+information, see http://www.oasis-open.org/docbook/.
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
new file mode 100644
index 0000000000..59703609ca
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
@@ -0,0 +1,515 @@
+docbook-xml: update catalog.xml
+
+Refer Ubuntu 13.04 to update catalog.xml
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ docbook-4.0/catalog.xml | 72 +++++++++++++++++++++++++++++++++++++++++++++++
+ docbook-4.1.2/catalog.xml | 66 +++++++++++++++++++++++++++++++++++++++++++
+ docbook-4.2/catalog.xml | 69 ++++++---------------------------------------
+ docbook-4.3/catalog.xml | 72 ++++++++---------------------------------------
+ docbook-4.4/catalog.xml | 63 ++---------------------------------------
+ docbook-4.5/catalog.xml | 63 ++---------------------------------------
+ 6 files changed, 165 insertions(+), 240 deletions(-)
+ create mode 100644 docbook-4.0/catalog.xml
+ create mode 100644 docbook-4.1.2/catalog.xml
+
+diff --git a/docbook-4.0/catalog.xml b/docbook-4.0/catalog.xml
+new file mode 100644
+--- /dev/null
++++ b/docbook-4.0/catalog.xml
+@@ -0,0 +1,72 @@
++<?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
++<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
++
++<!-- ...................................................................... -->
++<!-- XML Catalog data for DocBook XML V4.0............................... -->
++<!-- File catalog.xml ..................................................... -->
++
++<!-- Please direct all questions, bug reports, or suggestions for
++ changes to the docbook@lists.oasis-open.org mailing list. For more
++ information, see http://www.oasis-open.org/.
++ -->
++
++<!-- This is the catalog data file for DocBook V4.0. It is provided as
++ a convenience in building your own catalog files. You need not use
++ the filenames listed here, and need not use the filename method of
++ identifying storage objects at all. See the documentation for
++ detailed information on the files associated with the DocBook DTD.
++ See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
++ detailed information on supplying and using catalog data.
++ -->
++
++<!-- ...................................................................... -->
++<!-- DocBook driver file .................................................. -->
++
++<public publicId="-//Norman Walsh//DTD DocBk XML V4.0//EN"
++ uri="docbookx.dtd"/>
++
++<!-- Other ways to refer to DocBook XML v4.0............................... -->
++<public publicId="-//Norman Walsh//DTD DocBook XML V4.0//EN"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<!-- ...................................................................... -->
++<!-- DocBook modules ...................................................... -->
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Notations V4.0//EN"
++ uri="dbnotnx.mod"/>
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Character Entities V4.0//EN"
++ uri="dbcentx.mod"/>
++
++<public publicId="-//Norman Walsh//ELEMENTS DocBook XML Information Pool V4.0//EN"
++ uri="dbpoolx.mod"/>
++
++<public publicId="-//Norman Walsh//ELEMENTS DocBook XML Document Hierarchy V4.0//EN"
++ uri="dbhierx.mod"/>
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Additional General Entities V4.0//EN"
++ uri="dbgenent.mod"/>
++
++<public publicId="-//Norman Walsh//DTD CALS Table Model XML V4.0//EN"
++ uri="calstblx.dtd"/>
++
++<!-- UNOFFICIAL conversion of the exchange table model to XML, based on the OASIS Exchange -->
++<!-- Table Model PUBLIC "-//SGML Open//DTD Exchange Table Model 19960430//EN" -->
++<public publicId="-//Normal Walsh//Exchange Table Model 19960430 XML V4.0//EN"
++ uri="soextblx.dtd"/>
++
++<!-- the following FPI is declared for the DTD inside the DTD, but we'll -->
++<!-- use the version from the latest DocBook
++<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
++ uri="soextblx.dtd"/> -->
++
++<!-- End of catalog data for DocBook XML V4.0 ............................. -->
++<!-- ...................................................................... -->
++
++</catalog>
+diff --git a/docbook-4.1.2/catalog.xml b/docbook-4.1.2/catalog.xml
+new file mode 100644
+--- /dev/null
++++ b/docbook-4.1.2/catalog.xml
+@@ -0,0 +1,66 @@
++<?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
++<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
++
++<!-- ...................................................................... -->
++<!-- XML Catalog data for DocBook XML V4.1.2............................... -->
++<!-- File catalog.xml ..................................................... -->
++
++<!-- Please direct all questions, bug reports, or suggestions for
++ changes to the docbook@lists.oasis-open.org mailing list. For more
++ information, see http://www.oasis-open.org/.
++ -->
++
++<!-- This is the catalog data file for DocBook V4.1.2. It is provided as
++ a convenience in building your own catalog files. You need not use
++ the filenames listed here, and need not use the filename method of
++ identifying storage objects at all. See the documentation for
++ detailed information on the files associated with the DocBook DTD.
++ See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
++ detailed information on supplying and using catalog data.
++ -->
++
++<!-- ...................................................................... -->
++<!-- DocBook driver file .................................................. -->
++
++<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.1.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<!-- ...................................................................... -->
++<!-- DocBook modules ...................................................... -->
++
++<public publicId="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN"
++ uri="calstblx.dtd"/>
++
++ <!-- already included in docbook 4.2
++<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
++ uri="soextblx.dtd"/> -->
++
++<public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN"
++ uri="dbpoolx.mod"/>
++
++<public publicId="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN"
++ uri="dbhierx.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN"
++ uri="dbgenent.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN"
++ uri="dbnotnx.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN"
++ uri="dbcentx.mod"/>
++
++
++<!-- End of catalog data for DocBook XML V4.1.2 ............................. -->
++<!-- ...................................................................... -->
++
++</catalog>
+diff --git a/docbook-4.2/catalog.xml b/docbook-4.2/catalog.xml
+--- a/docbook-4.2/catalog.xml
++++ b/docbook-4.2/catalog.xml
+@@ -1,4 +1,7 @@
+ <?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
+ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+ <!-- ...................................................................... -->
+@@ -25,6 +28,12 @@
+ <public publicId="-//OASIS//DTD DocBook XML V4.2//EN"
+ uri="docbookx.dtd"/>
+
++<system systemId="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
+ <!-- ...................................................................... -->
+ <!-- DocBook modules ...................................................... -->
+
+@@ -49,66 +58,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/iso-dia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/iso-num.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/iso-pub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/iso-tech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/iso-lat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/iso-lat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/iso-grk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/iso-grk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/iso-grk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/iso-grk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/iso-amsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/iso-amsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/iso-amsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/iso-amsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/iso-amso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/iso-amsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/iso-box.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.2 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.3/catalog.xml b/docbook-4.3/catalog.xml
+--- a/docbook-4.3/catalog.xml
++++ b/docbook-4.3/catalog.xml
+@@ -1,4 +1,7 @@
+ <?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
+ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+ <!-- ...................................................................... -->
+@@ -25,12 +28,21 @@
+ <public publicId="-//OASIS//DTD DocBook XML V4.3//EN"
+ uri="docbookx.dtd"/>
+
++<system systemId="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.3/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
+ <!-- ...................................................................... -->
+ <!-- DocBook modules ...................................................... -->
+
+ <public publicId="-//OASIS//DTD DocBook CALS Table Model V4.3//EN"
+ uri="calstblx.dtd"/>
+
++<public publicId="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN"
++ uri="htmltblx.mod"/>
++
+ <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+ uri="soextblx.dtd"/>
+
+@@ -49,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/iso-dia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/iso-num.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/iso-pub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/iso-tech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/iso-lat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/iso-lat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/iso-grk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/iso-grk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/iso-grk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/iso-grk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/iso-amsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/iso-amsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/iso-amsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/iso-amsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/iso-amso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/iso-amsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/iso-box.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.3 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.4/catalog.xml b/docbook-4.4/catalog.xml
+--- a/docbook-4.4/catalog.xml
++++ b/docbook-4.4/catalog.xml
+@@ -1,4 +1,7 @@
+ <?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
+ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
+
+ <!-- ...................................................................... -->
+@@ -58,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/isodia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/isonum.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/isopub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/isotech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/isolat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/isolat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/isogrk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/isogrk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/isogrk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/isogrk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/isoamsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/isoamsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/isoamsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/isoamsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/isoamso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/isoamsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/isobox.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/isocyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/isocyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.4 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.5/catalog.xml b/docbook-4.5/catalog.xml
+--- a/docbook-4.5/catalog.xml
++++ b/docbook-4.5/catalog.xml
+@@ -1,4 +1,7 @@
+ <?xml version='1.0'?>
++<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
++ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
++
+ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
+
+ <!-- ...................................................................... -->
+@@ -58,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/isodia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/isonum.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/isopub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/isotech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/isolat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/isolat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/isogrk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/isogrk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/isogrk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/isogrk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/isoamsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/isoamsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/isoamsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/isoamsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/isoamso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/isoamsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/isobox.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/isocyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/isocyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.5 ............................. -->
+ <!-- ...................................................................... -->
+
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml
new file mode 100644
index 0000000000..b71f559ef5
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBook XML Information Pool V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Notations V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//DTD CALS Table Model XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Character Entities V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBook XML Document Hierarchy V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Normal Walsh//Exchange Table Model 19960430 XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.4/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.1/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBk XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBook XML V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.1.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.5/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBook XML Additional General Entities V4.0//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.0/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.2/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://docbook.org/xml/4.3/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
+ <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" catalog="file:///usr/share/xml/docbook/schema/dtd/catalog.xml"/>
+</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
new file mode 100644
index 0000000000..de1bc39704
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Document type definitions for verification of XML data files"
+DESCRIPTION = "Document type definitions for verification of XML data \
+files against the DocBook rule set, it ships with the latest DocBook 4.5 \
+XML DTD, as well as a selected set of legacy DTDs for use with older \
+documents, including 4.0, 4.1.2, 4.2, 4.3 and 4.4"
+HOMEPAGE = "http://www.docbook.org/xml/"
+
+LICENSE = "OASIS"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
+
+# Note: the upstream sources are not distributed with a license file.
+# LICENSE-OASIS is included as a "patch" to workaround this. When
+# upgrading this recipe, please verify whether this is still needed.
+SRC_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
+ file://LICENSE-OASIS \
+ file://docbook-xml-update-catalog.xml.patch \
+ file://docbook-xml.xml \
+"
+
+SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e"
+SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f"
+
+S="${WORKDIR}/docbook-xml-4.5.c31424"
+
+inherit allarch
+BBCLASSEXTEND = "native"
+
+SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xml_dtd_sstate_postinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xml_dtd_sysroot_preprocess"
+
+do_configre (){
+ :
+}
+
+do_compile (){
+ :
+}
+
+do_install () {
+ # Refer debian https://packages.debian.org/sid/all/docbook-xml/filelist
+ for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do
+ install -d -m 755 ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
+ cp -v -R docbook-${DTDVERSION}/* ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
+ done
+
+ install -d ${D}${sysconfdir}/xml/
+ install -m 755 ${WORKDIR}/docbook-xml.xml ${D}${sysconfdir}/xml/docbook-xml.xml
+}
+
+docbook_xml_dtd_sstate_postinst () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ # Ensure that the catalog file sgml-docbook.cat is properly
+ # updated when the package is installed from sstate cache.
+ sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
+ fi
+}
+
+docbook_xml_dtd_sysroot_preprocess () {
+ # Update the hardcode dir in docbook-xml.xml
+ sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
+}
+
+FILES_${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
new file mode 100644
index 0000000000..0559a5c0d2
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
@@ -0,0 +1,24 @@
+docbook-xsl-stylesheets: no bashism in docbook-xsl-update
+
+The checkbashisms shows there is no bashism, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ tools/bin/docbook-xsl-update | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/bin/docbook-xsl-update b/tools/bin/docbook-xsl-update
+index aba0016..cc73aa2 100755
+--- a/tools/bin/docbook-xsl-update
++++ b/tools/bin/docbook-xsl-update
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # vim: number
+
+ # docbook-xsl-update - Update environment to latest docbook-xsl snapshot
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
new file mode 100644
index 0000000000..a1a576a2ec
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets-1.78.1/catalog.xml"/>
+<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets-1.78.1/catalog.xml"/>
+</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
new file mode 100644
index 0000000000..2a1bdc47f7
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
@@ -0,0 +1,69 @@
+SUMMARY = "XSL stylesheets for processing DocBook XML to various output formats"
+HOMEPAGE = "http://docbook.sourceforge.net"
+LICENSE = "XSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6eeeed43d498c22a835382533356462"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
+ file://docbook-xsl.xml \
+ file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
+"
+
+SRC_URI[md5sum] = "6dd0f89131cc35bf4f2ed105a1c17771"
+SRC_URI[sha256sum] = "c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467"
+
+S = "${WORKDIR}/docbook-xsl-${PV}"
+
+inherit allarch
+BBCLASSEXTEND = "native"
+
+SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xsl_stylesheets_sstate_postinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xsl_stylesheets_sysroot_preprocess"
+
+do_configure (){
+ :
+}
+
+do_compile (){
+ :
+}
+
+do_install () {
+ # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
+ # for details.
+ install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1
+
+ cp -v -R VERSION common eclipse epub extensions fo highlighting html \
+ htmlhelp images javahelp lib manpages params profiling \
+ roundtrip slides template tests tools webhelp website \
+ xhtml xhtml-1_1 catalog.xml \
+ ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1
+
+ ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl
+
+ install -v -m644 -D README \
+ ${D}${datadir}/doc/docbook-xsl-1.78.1/README.txt
+ install -v -m644 RELEASE-NOTES* NEWS* \
+ ${D}${datadir}/doc/docbook-xsl-1.78.1
+
+ install -d ${D}${sysconfdir}/xml/
+ install -m 755 ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
+
+}
+
+docbook_xsl_stylesheets_sstate_postinst () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ # Ensure that the catalog file sgml-docbook.cat is properly
+ # updated when the package is installed from sstate cache.
+ sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
+ fi
+}
+
+docbook_xsl_stylesheets_sysroot_preprocess () {
+ # Update the hardcode dir in docbook-xml.xml
+ sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
+}
+
+RDEPENDS_${PN} += "perl"
+FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
+FILES_${PN}-doc = "${datadir}/doc/*"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index a6a7ddcbd9..d1c24b8748 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -2,13 +2,14 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "DOS FAT Filesystem Utilities"
+HOMEPAGE = "http://daniel-baumann.ch/software/dosfstools/"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
PR = "r5"
-SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d405ade410f7597d364ab5dc8c9f6/${BP}.src.tar.gz \
file://mkdosfs-bootcode.patch \
file://mkdosfs-dir.patch \
file://alignment_hack.patch \
@@ -27,7 +28,7 @@ SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c
CFLAGS_append = " -D_FILE_OFFSET_BITS=64"
do_install () {
- oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
+ oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
"MANDIR=${D}${mandir}/man8" install
}
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 929906dfd8..5515666d3c 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,12 +2,11 @@ SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
- file://ignore_extra_fields.patch"
+SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz"
DEPENDS = "zlib bzip2 perl ncurses"
DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
RDEPENDS_${PN}_class-native = "xz-native"
S = "${WORKDIR}/${BPN}-${PV}"
@@ -37,6 +36,8 @@ EXTRA_OECONF = "\
--without-selinux \
"
+EXTRA_OECONF_append_class-target = " TAR=tar"
+
do_configure () {
echo >> ${S}/m4/compiler.m4
sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
deleted file mode 100644
index e59c6661ea..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-dpkg: Security Advisory - CVE-2014-3127
-
-commit a12eb58959d0a10584a428f4a3103a49204c410f upstream
-
-dpkg 1.15.9 on Debian squeeze introduces support for the "C-style
-encoded filenames" feature without recognizing that the squeeze patch
-program lacks this feature, which triggers an interaction error that
-allows remote attackers to conduct directory traversal attacks and
-modify files outside of the intended directories via a crafted source
-package.
-
-NOTE: this can be considered a release engineering problem in the
-effort to fix CVE-2014-0471.
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-=====================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:32:41.765446564 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:37:21.461446359 +0800
-@@ -324,31 +324,6 @@
- return $line;
- }
-
--my %ESCAPE = ((
-- 'a' => "\a",
-- 'b' => "\b",
-- 'f' => "\f",
-- 'n' => "\n",
-- 'r' => "\r",
-- 't' => "\t",
-- 'v' => "\cK",
-- '\\' => '\\',
-- '"' => '"',
--), (
-- map { sprintf('%03o', $_) => chr($_) } (0..255)
--));
--
--sub _unescape {
-- my ($diff, $str) = @_;
--
-- if (exists $ESCAPE{$str}) {
-- return $ESCAPE{$str};
-- } else {
-- error(_g('diff %s patches file with unknown escape sequence \\%s'),
-- $diff, $str);
-- }
--}
--
- # Fetch the header filename ignoring the optional timestamp
- sub _fetch_filename {
- my ($diff, $header) = @_;
-@@ -358,12 +333,7 @@
-
- # Is it a C-style string?
- if ($header =~ m/^"/) {
-- $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-- error(_g('diff %s patches file with unbalanced quote'), $diff)
-- unless defined $1;
--
-- $header = $1;
-- $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ error(_g('diff %s patches file with C-style encoded filename'), $diff);
- } else {
- # Tab is the official separator, it's always used when
- # filename contain spaces. Try it first, otherwise strip on space
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
deleted file mode 100644
index 195d309506..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-dpkg: Security Advisory - CVE-2014-0471
-
-commit a82651188476841d190c58693f95827d61959b51 upstream
-
-Directory traversal vulnerability in the unpacking functionality in
-dpkg before 1.15.9, 1.16.x before 1.16.13, and 1.17.x before 1.17.8
-allows remote attackers to write arbitrary files via a crafted source
-package, related to "C-style filename quoting."
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-===================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:24:07.422446284 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:41:37.746446314 +0800
-@@ -324,14 +324,53 @@
- return $line;
- }
-
--# Strip timestamp
--sub _strip_ts {
-- my $header = shift;
--
-- # Tab is the official separator, it's always used when
-- # filename contain spaces. Try it first, otherwise strip on space
-- # if there's no tab
-- $header =~ s/\s.*// unless ($header =~ s/\t.*//);
-+my %ESCAPE = ((
-+ 'a' => "\a",
-+ 'b' => "\b",
-+ 'f' => "\f",
-+ 'n' => "\n",
-+ 'r' => "\r",
-+ 't' => "\t",
-+ 'v' => "\cK",
-+ '\\' => '\\',
-+ '"' => '"',
-+), (
-+ map { sprintf('%03o', $_) => chr($_) } (0..255)
-+));
-+
-+sub _unescape {
-+ my ($diff, $str) = @_;
-+
-+ if (exists $ESCAPE{$str}) {
-+ return $ESCAPE{$str};
-+ } else {
-+ error(_g('diff %s patches file with unknown escape sequence \\%s'),
-+ $diff, $str);
-+ }
-+}
-+
-+# Fetch the header filename ignoring the optional timestamp
-+sub _fetch_filename {
-+ my ($diff, $header) = @_;
-+
-+ # Strip any leading spaces.
-+ $header =~ s/^\s+//;
-+
-+ # Is it a C-style string?
-+ if ($header =~ m/^"/) {
-+ $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-+ error(_g('diff %s patches file with unbalanced quote'), $diff)
-+ unless defined $1;
-+
-+ $header = $1;
-+ $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ } else {
-+ # Tab is the official separator, it's always used when
-+ # filename contain spaces. Try it first, otherwise strip on space
-+ # if there's no tab
-+ $header =~ s/\s.*// unless $header =~ s/\t.*//;
-+ }
-+
- return $header;
- }
-
-@@ -400,7 +439,7 @@
- unless(s/^--- //) {
- error(_g("expected ^--- in line %d of diff `%s'"), $., $diff);
- }
-- $path{old} = $_ = _strip_ts($_);
-+ $path{old} = $_ = _fetch_filename($diff, $_);
- $fn{old} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
- if (/\.dpkg-orig$/) {
- error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff);
-@@ -412,7 +451,7 @@
- unless (s/^\+\+\+ //) {
- error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.);
- }
-- $path{new} = $_ = _strip_ts($_);
-+ $path{new} = $_ = _fetch_filename($diff, $_);
- $fn{new} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
-
- unless (defined $fn{old} or defined $fn{new}) {
diff --git a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
deleted file mode 100644
index 4e3eb97ed8..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [workaround]
-
-Index: dpkg-1.16.8/dpkg-deb/build.c
-===================================================================
---- dpkg-1.16.8.orig/dpkg-deb/build.c
-+++ dpkg-1.16.8/dpkg-deb/build.c
-@@ -340,13 +340,13 @@ check_new_pkg(const char *dir)
- if (pkg->priority == pri_other)
- warning(_("'%s' contains user-defined Priority value '%s'"),
- controlfile, pkg->otherpriority);
-- for (field = pkg->available.arbs; field; field = field->next) {
-+ /*for (field = pkg->available.arbs; field; field = field->next) {
- if (known_arbitrary_field(field))
- continue;
-
- warning(_("'%s' contains user-defined field '%s'"), controlfile,
- field->name);
-- }
-+ }*/
-
- free(controlfile);
diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
index 0e57dbc7fc..f660b18646 100644
--- a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
@@ -11,22 +11,22 @@ Upstream-Status: Pending
Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
m4/dpkg-compiler.m4 | 1 -
1 file changed, 1 deletion(-)
diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
-index f1c760b..500b5ad 100644
+index 53f67c6..6e66a43 100644
--- a/m4/dpkg-compiler.m4
+++ b/m4/dpkg-compiler.m4
-@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then
- DPKG_WARNING_ALL([-Wformat-security])
- DPKG_WARNING_ALL([-Wpointer-arith])
- DPKG_WARNING_ALL([-Wlogical-op])
-- DPKG_WARNING_ALL([-Wvla])
- DPKG_WARNING_ALL([-Winit-self])
- DPKG_WARNING_ALL([-Wwrite-strings])
- DPKG_WARNING_ALL([-Wcast-align])
---
-1.7.10.4
-
+@@ -49,7 +49,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
+ DPKG_CHECK_COMPILER_FLAG([-Wformat-security])
+ DPKG_CHECK_COMPILER_FLAG([-Wpointer-arith])
+ DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
+- DPKG_CHECK_COMPILER_FLAG([-Wvla])
+ DPKG_CHECK_COMPILER_FLAG([-Winit-self])
+ DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
+ DPKG_CHECK_COMPILER_FLAG([-Wcast-align])
+---
+1.17.21
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
index 83526f3c96..15c0277015 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
@@ -12,10 +12,8 @@ SRC_URI += "file://noman.patch \
file://dpkg-configure.service \
file://glibc2.5-sync_file_range.patch \
file://no-vla-warning.patch \
- file://dpkg-1.17.4-CVE-2014-0471.patch \
- file://dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch \
"
-SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
-SRC_URI[sha256sum] = "01cdc81c33e77c3d7c40df17e19171794542be7cf12e411381ffcaa8f87b1854"
+SRC_URI[md5sum] = "765a96fd0180196613bbfa3c4aef0775"
+SRC_URI[sha256sum] = "3ed776627181cb9c1c9ba33f94a6319084be2e9ec9c23dd61ce784c4f602cf05"
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
new file mode 100644
index 0000000000..2624f90e72
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
@@ -0,0 +1,54 @@
+From c6ff7feb9038d6e8aaffe2e69b205ad5fa33df2f Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Mon, 18 Aug 2014 21:02:56 +0200
+Subject: [PATCH] Fix musl build failures
+
+In lib/ext2fs/unix_io.c, __u64 should be used instead of __uint64_t. This type
+is guaranteed by the e2fsprogs build system.
+(795c02def3681a99cc792a5ebc162d06f8a1eeb7)
+
+In misc/create_inode.c, <limits.h> is needed for the definition of PATH_MAX.
+(bbccc6f3c6a106721fb6f1ef4df6bc32c7986235)
+
+Both of these fixes have been made upstream with the git commit IDs given but
+those are larger commits containing other changes not needed here.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Backport
+---
+ lib/ext2fs/unix_io.c | 6 +++---
+ misc/create_inode.c | 1 +
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 19be630..0cc0f52 100644
+--- a/lib/ext2fs/unix_io.c
++++ b/lib/ext2fs/unix_io.c
+@@ -931,10 +931,10 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block,
+
+ if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+ #ifdef BLKDISCARD
+- __uint64_t range[2];
++ __u64 range[2];
+
+- range[0] = (__uint64_t)(block) * channel->block_size;
+- range[1] = (__uint64_t)(count) * channel->block_size;
++ range[0] = (__u64)(block) * channel->block_size;
++ range[1] = (__u64)(count) * channel->block_size;
+
+ ret = ioctl(data->dev, BLKDISCARD, &range);
+ #else
+diff --git a/misc/create_inode.c b/misc/create_inode.c
+index 6d8de04..fcec5aa 100644
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -1,4 +1,5 @@
+ #include "create_inode.h"
++#include <limits.h>
+
+ #if __STDC_VERSION__ < 199901L
+ # if __GNUC__ >= 2
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
index 4b00668476..c0bd7dbdee 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
@@ -1,7 +1,56 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
+# Extracted from the package's shipped aclocal.m4. Custom macros should be in
# acinclude.m4 so running aclocal doesn't blow them away.
#
-# RP 1/6/2010
+# Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+# from http://autoconf-archive.cryp.to/ax_tls.html
+#
+# This was licensed under the GPL with the following exception:
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you make
+# and distribute a modified version of the Autoconf Macro, you may
+# extend this special exception to the GPL to apply to your modified
+# version as well.
+#
+AC_DEFUN([AX_TLS], [
+ AC_MSG_CHECKING(for thread local storage (TLS) class)
+ AC_CACHE_VAL(ac_cv_tls, [
+ ax_tls_keywords="__thread __declspec(thread) none"
+ for ax_tls_keyword in $ax_tls_keywords; do
+ case $ax_tls_keyword in
+ none) ac_cv_tls=none ; break ;;
+ *)
+ AC_TRY_COMPILE(
+ [#include <stdlib.h>
+ static void
+ foo(void) {
+ static ] $ax_tls_keyword [ int bar;
+ exit(1);
+ }],
+ [],
+ [ac_cv_tls=$ax_tls_keyword ; break],
+ ac_cv_tls=none
+ )
+ esac
+ done
+])
+
+ if test "$ac_cv_tls" != "none"; then
+ dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
+ AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
+ fi
+ AC_MSG_RESULT($ac_cv_tls)
+])
# ===========================================================================
# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 530255474d..1fb4a6cd85 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -16,6 +16,7 @@ SRC_URI += "file://acinclude.m4 \
file://0009-misc-create_inode.c-handle-hardlinks.patch \
file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \
file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \
+ file://0012-Fix-musl-build-failures.patch \
file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
file://misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch \
"
@@ -23,18 +24,13 @@ SRC_URI += "file://acinclude.m4 \
SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
SRC_URI[sha256sum] = "2f92ac06e92fa00f2ada3ee67dad012d74d685537527ad1241d82f2d041f2802"
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid --disable-uuidd"
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid --disable-uuidd --enable-verbose-makecmds"
EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
do_configure_prepend () {
cp ${WORKDIR}/acinclude.m4 ${S}/
}
-do_compile_prepend () {
- find ./ -print | grep -v ./patches | xargs chmod u=rwX
- ( cd ${S}/util; ${BUILD_CC} subst.c -o ${B}/util/subst )
-}
-
do_install () {
oe_runmake 'DESTDIR=${D}' install
oe_runmake 'DESTDIR=${D}' install-libs
@@ -58,6 +54,12 @@ do_install () {
mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
}
+do_install_append_class-target() {
+ # Clean host path in compile_et, mk_cmds
+ sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et
+ sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds
+}
+
RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
diff --git a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
index d4e4675ad5..d4e4675ad5 100644
--- a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
index 5baa709000..5baa709000 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
new file mode 100644
index 0000000000..84e8ddcca7
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
@@ -0,0 +1,36 @@
+From 323ca04a0c9189544075c19b49da67f6443a8950 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Wed, 21 Jan 2015 09:33:38 +0900
+Subject: [PATCH] elf_begin.c: CVE-2014-9447 fix
+
+this patch is from:
+ https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=147018e729e7c22eeabf15b82d26e4bf68a0d18e
+
+Upstream-Status: Backport
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ libelf/elf_begin.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
+index e46add3..e83ba35 100644
+--- a/libelf/elf_begin.c
++++ b/libelf/elf_begin.c
+@@ -736,11 +736,8 @@ read_long_names (Elf *elf)
+ break;
+
+ /* NUL-terminate the string. */
+- *runp = '\0';
+-
+- /* Skip the NUL byte and the \012. */
+- runp += 2;
+-
++ *runp++ = '\0';
++
+ /* A sanity check. Somebody might have generated invalid
+ archive. */
+ if (runp >= newp + len)
+--
+1.8.4.2
+
diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
index b619619ec0..b619619ec0 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
index 0ff353d0de..0ff353d0de 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
index 0e28690207..0e28690207 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
index bd634b4418..bd634b4418 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
index a86b97c683..a86b97c683 100644
--- a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
index 5b621f92ff..5b621f92ff 100644
--- a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
index 3f81a75b1a..3f81a75b1a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
index 2b5dad368a..2b5dad368a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
index b8a912c412..b8a912c412 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
index cd398549df..cd398549df 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
index 6a19791480..6a19791480 100644
--- a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
index d792d5fd73..d792d5fd73 100644
--- a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
deleted file mode 100644
index 6c44314589..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 7f1eec317db79627b473c5b149a22a1b20d1f68f Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mjw@redhat.com>
-Date: Wed, 9 Apr 2014 11:33:23 +0200
-Subject: [PATCH] CVE-2014-0172 Check for overflow before calling malloc to
- uncompress data.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1085663
-
-Reported-by: Florian Weimer <fweimer@redhat.com>
-Signed-off-by: Mark Wielaard <mjw@redhat.com>
-
-Index: elfutils-0.158/libdw/dwarf_begin_elf.c
-===================================================================
---- elfutils-0.158.orig/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.928213292 +0000
-+++ elfutils-0.158/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.924213375 +0000
-@@ -1,5 +1,5 @@
- /* Create descriptor from ELF descriptor for processing file.
-- Copyright (C) 2002-2011 Red Hat, Inc.
-+ Copyright (C) 2002-2011, 2014 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-@@ -289,6 +289,12 @@
- memcpy (&size, data->d_buf + 4, sizeof size);
- size = be64toh (size);
-
-+ /* Check for unsigned overflow so malloc always allocated
-+ enough memory for both the Elf_Data header and the
-+ uncompressed section data. */
-+ if (unlikely (sizeof (Elf_Data) + size < size))
-+ break;
-+
- Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
- if (unlikely (zdata == NULL))
- break;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
deleted file mode 100644
index e2f0576d7b..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Matthias Klose <doko@ubuntu.com>
-Date: Tue, 7 Jan 2014 10:25:29 +0100
-Subject: [PATCH] tests: backtrace-subr.sh (check_native_core) should check
- core file name.
-
-Needed when /proc/sys/kernel/core_uses_pid is set to 0. Try to rename
-the core file, and if it does still fail, skip the test.
-
-diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
-index e7ece91..62b873c 100644
---- a/tests/backtrace-subr.sh
-+++ b/tests/backtrace-subr.sh
-@@ -111,6 +111,11 @@ check_native_core()
-
- # Skip the test if we cannot adjust core ulimit.
- core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
-+ # see if /proc/sys/kernel/core_uses_pid is set to 0
-+ if [ -f core ]; then
-+ mv core "$core"
-+ fi
-+ if [ ! -f "$core" ]; then exit 77; fi
-
- if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
- VALGRIND_CMD="$SAVED_VALGRIND_CMD"
---
-1.9.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
deleted file mode 100644
index 671c8ee1ae..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libelf/elf.h | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/libelf/elf.h b/libelf/elf.h
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -142,6 +142,7 @@ typedef struct
- #define ELFOSABI_NETBSD 2 /* NetBSD. */
- #define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
- #define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
-+#define ELFOSABI_HURD 4 /* GNU/Hurd */
- #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
- #define ELFOSABI_AIX 7 /* IBM AIX. */
- #define ELFOSABI_IRIX 8 /* SGI Irix. */
-@@ -149,8 +150,13 @@ typedef struct
- #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
- #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
- #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
-+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
-+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-+#define ELFOSABI_AROS 15 /* Amiga Research OS */
-+/* 64-255 Architecture-specific value range */
- #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
- #define ELFOSABI_ARM 97 /* ARM */
-+/* This is deprecated? It's not in the latest version anymore. */
- #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
- #define EI_ABIVERSION 8 /* ABI version */
-@@ -205,7 +211,7 @@ typedef struct
- #define EM_H8_300H 47 /* Hitachi H8/300H */
- #define EM_H8S 48 /* Hitachi H8S */
- #define EM_H8_500 49 /* Hitachi H8/500 */
--#define EM_IA_64 50 /* Intel Merced */
-+#define EM_IA_64 50 /* Intel IA64 */
- #define EM_MIPS_X 51 /* Stanford MIPS-X */
- #define EM_COLDFIRE 52 /* Motorola Coldfire */
- #define EM_68HC12 53 /* Motorola M68HC12 */
-@@ -219,7 +225,8 @@ typedef struct
- #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
- #define EM_X86_64 62 /* AMD x86-64 architecture */
- #define EM_PDSP 63 /* Sony DSP Processor */
--
-+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
- #define EM_FX66 66 /* Siemens FX66 microcontroller */
- #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
- #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
-@@ -249,6 +256,22 @@ typedef struct
- #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
- #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
- #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-+#define EM_NS32K 97 /* National Semiconductor 32000 series */
-+#define EM_TPC 98 /* Tenor Network TPC processor */
-+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
-+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
-+#define EM_MAX 102 /* MAX Processor */
-+#define EM_CR 103 /* National Semiconductor CompactRISC */
-+#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-+#define EM_MSP430 105 /* TI msp430 micro controller */
-+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
-+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-+#define EM_SEP 108 /* Sharp embedded microprocessor */
-+#define EM_ARCA 109 /* Arca RISC Microprocessor */
-+
- #define EM_AARCH64 183 /* ARM AARCH64 */
- #define EM_TILEPRO 188 /* Tilera TILEPro */
- #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
deleted file mode 100644
index 1dbd52d557..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-m4/biarch.m4: tweak AC_RUN_IFELSE for cross-compiling
-
-Macro: AC_RUN_IFELSE (input,
- [action-if-true],
- [action-if-false],
- [action-if-cross-compiling])
-
-Add the missing [action-if-cross-compiling] part to support
-cross-compiling.
-
-Upstream-Status: inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- m4/biarch.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/biarch.m4 b/m4/biarch.m4
---- a/m4/biarch.m4
-+++ b/m4/biarch.m4
-@@ -40,7 +40,9 @@ AC_CACHE_CHECK([whether $biarch_CC makes executables we can run],
- save_CC="$CC"
- CC="$biarch_CC"
- AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
-- utrace_cv_cc_biarch=yes, utrace_cv_cc_biarch=no)
-+ utrace_cv_cc_biarch=yes,
-+ utrace_cv_cc_biarch=no,
-+ utrace_cv_cc_biarch=yes)
- CC="$save_CC"])], [utrace_cv_cc_biarch=no])
- AS_IF([test $utrace_cv_cc_biarch != yes], [dnl
- AC_MSG_WARN([not running biarch tests, $biarch_CC does not work])])])
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
deleted file mode 100644
index f358a85466..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
+++ /dev/null
@@ -1,1756 +0,0 @@
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -680,6 +680,11 @@
- * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
- Reported by Kurt Roeckx <kurt@roeckx.be>.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * relocate.c (relocate_section): Use gelf_fsize instead of relying
-+ on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
---- elfutils/libdwfl/relocate.c
-+++ elfutils/libdwfl/relocate.c
-@@ -1,5 +1,5 @@
- /* Relocate debug information.
-- Copyright (C) 2005-2010 Red Hat, Inc.
-+ Copyright (C) 2005-2011 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
-@@ -456,7 +456,10 @@ relocate_section (Dwfl_Module *mod, Elf
- }
- }
-
-- size_t nrels = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize
-+ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA,
-+ 1, EV_CURRENT);
-+ size_t nrels = shdr->sh_size / sh_entsize;
- size_t complete = 0;
- if (shdr->sh_type == SHT_REL)
- for (size_t relidx = 0; !result && relidx < nrels; ++relidx)
-@@ -558,7 +561,7 @@ relocate_section (Dwfl_Module *mod, Elf
- nrels = next;
- }
-
-- shdr->sh_size = reldata->d_size = nrels * shdr->sh_entsize;
-+ shdr->sh_size = reldata->d_size = nrels * sh_entsize;
- gelf_update_shdr (scn, shdr);
- }
-
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -754,10 +754,53 @@
- If section content hasn't been read yet, do it before looking for the
- block size. If no section data present, infer size of section header.
-
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * libelfP.h (INVALID_NDX): Define.
-+ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
-+ * gelf_getlib.c (gelf_getlib): Likewise.
-+ * gelf_getmove.c (gelf_getmove): Likewise.
-+ * gelf_getrel.c (gelf_getrel): Likewise.
-+ * gelf_getrela.c (gelf_getrela): Likewise.
-+ * gelf_getsym.c (gelf_getsym): Likewise.
-+ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
-+ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
-+ * gelf_getversym.c (gelf_getversym): Likewise.
-+ * gelf_update_dyn.c (gelf_update_dyn): Likewise.
-+ * gelf_update_lib.c (gelf_update_lib): Likewise.
-+ * gelf_update_move.c (gelf_update_move): Likewise.
-+ * gelf_update_rel.c (gelf_update_rel): Likewise.
-+ * gelf_update_rela.c (gelf_update_rela): Likewise.
-+ * gelf_update_sym.c (gelf_update_sym): Likewise.
-+ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
-+ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
-+ * gelf_update_versym.c (gelf_update_versym): Likewise.
-+ * elf_newscn.c (elf_newscn): Check for overflow.
-+ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
-+ (__elfw2(LIBELFBITS,updatefile)): Likewise.
-+ * elf_begin.c (file_read_elf): Likewise.
-+ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
-+ * elf_getarsym.c (elf_getarsym): Likewise.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise.
- 2005-05-11 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update again.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
-+ table fits into object's bounds.
-+ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to
-+ elf->map_address. Check if first section header fits into object's
-+ bounds.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
-+ Check if section header table fits into object's bounds.
-+ * elf_begin.c (get_shnum): Ensure section headers fits into
-+ object's bounds.
-+ (file_read_elf): Make sure scncnt is small enough to allocate both
-+ ElfXX_Shdr and Elf_Scn array. Make sure section and program header
-+ tables fit into object's bounds. Avoid memory leak on failure.
-+
- 2005-05-09 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update from glibc.
---- elfutils/libelf/elf32_getphdr.c
-+++ elfutils/libelf/elf32_getphdr.c
-@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_phoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_phoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_PHDR);
-+ goto out;
-+ }
-+
- /* All the data is already mapped. Use it. */
- void *file_phdr = ((char *) elf->map_address
- + elf->start_offset + ehdr->e_phoff);
---- elfutils/libelf/elf32_getshdr.c
-+++ elfutils/libelf/elf32_getshdr.c
-@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn)
- goto out;
-
- size_t shnum;
-- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0)
-+ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0
-+ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
- goto out;
- size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
-
-@@ -77,6 +78,16 @@ load_shdr_wrlock (Elf_Scn *scn)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_shoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_shoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ goto free_and_out;
-+ }
-+
- ElfW2(LIBELFBITS,Shdr) *notcvt;
-
- /* All the data is already mapped. If we could use it
---- elfutils/libelf/elf32_newphdr.c
-+++ elfutils/libelf/elf32_newphdr.c
-@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count)
- || count == PN_XNUM
- || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
- {
-+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
-+ {
-+ result = NULL;
-+ goto out;
-+ }
-+
- /* Allocate a new program header with the appropriate number of
- elements. */
- result = (ElfW2(LIBELFBITS,Phdr) *)
---- elfutils/libelf/elf32_updatefile.c
-+++ elfutils/libelf/elf32_updatefile.c
-@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
-+ return 1;
-+
- Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
- Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
- char *const shdr_start = ((char *) elf->map_address + elf->start_offset
-@@ -624,6 +627,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
-+ + sizeof (ElfW2(LIBELFBITS,Shdr)))))
-+ return 1;
-+
- off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
- #if EV_NUM != 2
- xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
---- elfutils/libelf/elf_begin.c
-+++ elfutils/libelf/elf_begin.c
-@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
- {
-- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
-+ if (unlikely (ehdr.e32->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr)))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -192,7 +193,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
- {
-- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
-+ if (unlikely (ehdr.e64->e_shoff >= maxsize)
-+ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -264,6 +266,15 @@ file_read_elf (int fildes, void *map_add
- /* Could not determine the number of sections. */
- return NULL;
-
-+ /* Check for too many sections. */
-+ if (e_ident[EI_CLASS] == ELFCLASS32)
-+ {
-+ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
-+ return NULL;
-+ }
-+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
-+ return NULL;
-+
- /* We can now allocate the memory. Even if there are no section headers,
- we allocate space for a zeroth section in case we need it later. */
- const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
-@@ -303,6 +314,16 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf32.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr->e_shoff
-+ < scncnt * sizeof (Elf32_Shdr)))
-+ {
-+ free_and_out:
-+ free (elf);
-+ __libelf_seterrno (ELF_E_INVALID_FILE);
-+ return NULL;
-+ }
- elf->state.elf32.shdr
- = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
-@@ -389,6 +410,11 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf64.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (ehdr->e_shoff
-+ + scncnt * sizeof (Elf32_Shdr) > maxsize))
-+ goto free_and_out;
- elf->state.elf64.shdr
- = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
---- elfutils/libelf/elf_getarsym.c
-+++ elfutils/libelf/elf_getarsym.c
-@@ -183,6 +183,9 @@ elf_getarsym (elf, ptr)
- size_t index_size = atol (tmpbuf);
-
- if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
-+#if SIZE_MAX <= 4294967295U
-+ || n >= SIZE_MAX / sizeof (Elf_Arsym)
-+#endif
- || n * w > index_size)
- {
- /* This index table cannot be right since it does not fit into
---- elfutils/libelf/elf_getshdrstrndx.c
-+++ elfutils/libelf/elf_getshdrstrndx.c
-@@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf32_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf32_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
-@@ -142,10 +157,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf64_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf64_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
---- elfutils/libelf/elf_newscn.c
-+++ elfutils/libelf/elf_newscn.c
-@@ -83,10 +83,18 @@ elf_newscn (elf)
- else
- {
- /* We must allocate a new element. */
-- Elf_ScnList *newp;
-+ Elf_ScnList *newp = NULL;
-
- assert (elf->state.elf.scnincr > 0);
-
-+ if (
-+#if SIZE_MAX <= 4294967295U
-+ likely (elf->state.elf.scnincr
-+ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
-+#else
-+ 1
-+#endif
-+ )
- newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
- + ((elf->state.elf.scnincr *= 2)
- * sizeof (Elf_Scn)), 1);
---- elfutils/libelf/gelf_getdyn.c
-+++ elfutils/libelf/gelf_getdyn.c
-@@ -1,5 +1,5 @@
- /* Get information from dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -72,7 +72,7 @@ gelf_getdyn (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +93,7 @@ gelf_getdyn (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getlib.c
-+++ elfutils/libelf/gelf_getlib.c
-@@ -1,5 +1,5 @@
- /* Get library from table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -65,7 +65,7 @@ gelf_getlib (data, ndx, dst)
- /* The data is already in the correct form. Just make sure the
- index is OK. */
- GElf_Lib *result = NULL;
-- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Lib, data))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_getmove.c
-+++ elfutils/libelf/gelf_getmove.c
-@@ -1,5 +1,5 @@
- /* Get move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -62,7 +62,7 @@ gelf_getmove (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getrela.c
-+++ elfutils/libelf/gelf_getrela.c
-@@ -1,5 +1,5 @@
- /* Get RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getrel.c
-+++ elfutils/libelf/gelf_getrel.c
-@@ -1,5 +1,5 @@
- /* Get REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrel (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrel (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -92,7 +86,7 @@ gelf_getrel (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getsym.c
-+++ elfutils/libelf/gelf_getsym.c
-@@ -1,5 +1,5 @@
- /* Get symbol information from symbol table at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -69,7 +69,7 @@ gelf_getsym (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -98,7 +98,7 @@ gelf_getsym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsyminfo.c
-+++ elfutils/libelf/gelf_getsyminfo.c
-@@ -1,5 +1,5 @@
- /* Get additional symbol information from symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -63,7 +63,7 @@ gelf_getsyminfo (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsymshndx.c
-+++ elfutils/libelf/gelf_getsymshndx.c
-@@ -1,6 +1,6 @@
- /* Get symbol information and separate section index from symbol table
- at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -69,7 +69,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- section index table. */
- if (likely (shndxdata_scn != NULL))
- {
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -89,7 +89,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -118,7 +118,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getversym.c
-+++ elfutils/libelf/gelf_getversym.c
-@@ -1,5 +1,5 @@
- /* Get symbol version information at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -71,7 +71,7 @@ gelf_getversym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_update_dyn.c
-+++ elfutils/libelf/gelf_update_dyn.c
-@@ -1,5 +1,5 @@
- /* Update information in dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_update_dyn (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_DYN))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_dyn (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -95,7 +89,7 @@ gelf_update_dyn (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_lib.c
-+++ elfutils/libelf/gelf_update_lib.c
-@@ -1,5 +1,5 @@
- /* Update library in table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -47,12 +47,6 @@ gelf_update_lib (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
- if (unlikely (data_scn->d.d_type != ELF_T_LIB))
- {
-@@ -66,7 +60,7 @@ gelf_update_lib (data, ndx, src)
-
- /* Check whether we have to resize the data buffer. */
- int result = 0;
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_update_move.c
-+++ elfutils/libelf/gelf_update_move.c
-@@ -1,5 +1,5 @@
- /* Update move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -54,8 +54,7 @@ gelf_update_move (data, ndx, src)
- assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/gelf_update_rela.c
-+++ elfutils/libelf/gelf_update_rela.c
-@@ -1,5 +1,5 @@
- /* Update RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- /* The type of the data better should match. */
-@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_rel.c
-+++ elfutils/libelf/gelf_update_rel.c
-@@ -1,5 +1,5 @@
- /* Update REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- /* The type of the data better should match. */
-@@ -78,7 +72,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +87,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_sym.c
-+++ elfutils/libelf/gelf_update_sym.c
-@@ -1,5 +1,5 @@
- /* Update symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_sym (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_sym (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -104,7 +98,7 @@ gelf_update_sym (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_syminfo.c
-+++ elfutils/libelf/gelf_update_syminfo.c
-@@ -1,5 +1,5 @@
- /* Update additional symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_syminfo (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
- {
- /* The type of the data better should match. */
-@@ -72,7 +66,7 @@ gelf_update_syminfo (data, ndx, src)
- rwlock_wrlock (scn->elf->lock);
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_symshndx.c
-+++ elfutils/libelf/gelf_update_symshndx.c
-@@ -1,6 +1,6 @@
- /* Update symbol information and section index in symbol table at the
- given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -56,12 +56,6 @@ gelf_update_symshndx (symdata, shndxdata
- if (symdata == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -107,7 +101,7 @@ gelf_update_symshndx (symdata, shndxdata
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -130,7 +124,7 @@ gelf_update_symshndx (symdata, shndxdata
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_versym.c
-+++ elfutils/libelf/gelf_update_versym.c
-@@ -1,5 +1,5 @@
- /* Update symbol version information.
-- Copyright (C) 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2001-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2001.
-
-@@ -54,8 +54,7 @@ gelf_update_versym (data, ndx, src)
- assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/libelfP.h
-+++ elfutils/libelf/libelfP.h
-@@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t
- /* Align offset to 4 bytes as needed for note name and descriptor data. */
- #define NOTE_ALIGN(n) (((n) + 3) & -4U)
-
-+/* Convenience macro. */
-+#define INVALID_NDX(ndx, type, data) \
-+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
-+
- #endif /* libelfP.h */
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -702,6 +702,12 @@
-
- * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_relocs_rel)
-+ (handle_relocs_rela, handle_versym, print_liblist):
-+ Use gelf_fsize instead of relying on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * elfcmp.c (verbose): New variable.
-@@ -2414,6 +2420,16 @@
- object symbols or symbols with unknown type.
- (check_rel): Likewise.
-
-+2005-06-09 Roland McGrath <roland@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
-+ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
-+ (handle_scngrp): Check for bogus sh_info.
-+
-+ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
-+ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
-+ Don't use assert on input values, instead bail with "illformed" error.
-+
- 2005-06-08 Roland McGrath <roland@redhat.com>
-
- * readelf.c (print_ops): Add consts.
-@@ -2459,6 +2475,19 @@
-
- * readelf.c (dwarf_tag_string): Add new tags.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (check_hash): Don't check entries beyond end of section.
-+ (check_note): Don't crash if gelf_rawchunk fails.
-+ (section_name): Return <invalid> if gelf_getshdr returns NULL.
-+
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (section_name): Return "<invalid>" instead of
-+ crashing on invalid section name.
-+ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
-+ check_symtab_shndx, check_hash, check_versym): Robustify.
-+
- 2005-05-08 Roland McGrath <roland@redhat.com>
-
- * strip.c (handle_elf): Don't translate hash and versym data formats,
---- elfutils/src/elflint.c
-+++ elfutils/src/elflint.c
-@@ -123,6 +123,10 @@ static uint32_t shstrndx;
- /* Array to count references in section groups. */
- static int *scnref;
-
-+/* Numbers of sections and program headers. */
-+static unsigned int shnum;
-+static unsigned int phnum;
-+
-
- int
- main (int argc, char *argv[])
-@@ -311,10 +315,19 @@ section_name (Ebl *ebl, int idx)
- {
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr;
-+ const char *ret;
-+
-+ if ((unsigned int) idx > shnum)
-+ return "<invalid>";
-
- shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
-+ if (shdr == NULL)
-+ return "<invalid>";
-
-- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ if (ret == NULL)
-+ return "<invalid>";
-+ return ret;
- }
-
-
-@@ -337,11 +350,6 @@ static const int valid_e_machine[] =
- (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
-
-
--/* Numbers of sections and program headers. */
--static unsigned int shnum;
--static unsigned int phnum;
--
--
- static void
- check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
- {
-@@ -625,7 +633,8 @@ section [%2d] '%s': symbol table cannot
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
- idx, section_name (ebl, idx));
-@@ -663,7 +672,7 @@ section [%2d] '%s': XINDEX for zeroth en
- xndxscnidx, section_name (ebl, xndxscnidx));
- }
-
-- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
- if (sym == NULL)
-@@ -683,7 +692,8 @@ section [%2d] '%s': symbol %zu: invalid
- else
- {
- name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
-- assert (name != NULL);
-+ assert (name != NULL
-+ || strshdr->sh_type != SHT_STRTAB);
- }
-
- if (sym->st_shndx == SHN_XINDEX)
-@@ -1040,9 +1050,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Shdr rcshdr_mem;
- const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
-- assert (rcshdr != NULL);
-
-- if (rcshdr->sh_type == SHT_DYNAMIC)
-+ if (rcshdr == NULL)
-+ break;
-+
-+ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
- {
- /* Found the dynamic section. Look through it. */
- Elf_Data *d = elf_getdata (scn, NULL);
-@@ -1052,7 +1064,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
-- assert (dyn != NULL);
-+
-+ if (dyn == NULL)
-+ break;
-
- if (dyn->d_tag == DT_RELCOUNT)
- {
-@@ -1066,7 +1080,9 @@ section [%2d] '%s': DT_RELCOUNT used for
- /* Does the number specified number of relative
- relocations exceed the total number of
- relocations? */
-- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
-+ if (shdr->sh_entsize != 0
-+ && dyn->d_un.d_val > (shdr->sh_size
-+ / shdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
- idx, section_name (ebl, idx),
-@@ -1226,7 +1242,8 @@ section [%2d] '%s': no relocations for m
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext (reltype == ELF_T_RELA ? "\
- section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
- section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
-@@ -1449,7 +1466,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rela rela_mem;
- GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
-@@ -1499,7 +1517,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rel rel_mem;
- GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
-@@ -1598,7 +1617,8 @@ section [%2d] '%s': referenced as string
- shdr->sh_link, section_name (ebl, shdr->sh_link),
- idx, section_name (ebl, idx));
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
- idx, section_name (ebl, idx));
-@@ -1608,7 +1628,7 @@ section [%2d] '%s': section entry size d
- idx, section_name (ebl, idx));
-
- bool non_null_warned = false;
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
-@@ -1880,6 +1900,8 @@ section [%2d] '%s': entry size does not
- idx, section_name (ebl, idx));
-
- if (symshdr != NULL
-+ && shdr->sh_entsize
-+ && symshdr->sh_entsize
- && (shdr->sh_size / shdr->sh_entsize
- < symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
-@@ -1906,6 +1928,12 @@ section [%2d] '%s': extended section ind
- }
-
- Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
-+ if (data == NULL)
-+ {
-+ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
-+ idx, section_name (ebl, idx));
-+ return;
-+ }
-
- if (*((Elf32_Word *) data->d_buf) != 0)
- ERROR (gettext ("symbol 0 should have zero extended section index\n"));
-@@ -1948,7 +1976,7 @@ section [%2d] '%s': hash table section i
-
- size_t maxidx = nchain;
-
-- if (symshdr != NULL)
-+ if (symshdr != NULL && symshdr->sh_entsize != 0)
- {
- size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
-
-@@ -1959,18 +1987,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf32_Word *buf = (Elf32_Word *) data->d_buf;
-+ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2000,18 +2038,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
-+ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
-- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
-+ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2036,7 +2084,7 @@ section [%2d] '%s': bitmask size not pow
- if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
- {
- ERROR (gettext ("\
--section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
-+section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
- idx, section_name (ebl, idx), (long int) shdr->sh_size,
- (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
- return;
-@@ -2708,8 +2756,9 @@ section [%2d] '%s' refers in sh_link to
-
- /* The number of elements in the version symbol table must be the
- same as the number of symbols. */
-- if (shdr->sh_size / shdr->sh_entsize
-- != symshdr->sh_size / symshdr->sh_entsize)
-+ if (shdr->sh_entsize && symshdr->sh_entsize
-+ && (shdr->sh_size / shdr->sh_entsize
-+ != symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
- idx, section_name (ebl, idx),
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -1364,6 +1364,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
-
- GElf_Sym sym_mem;
-+ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
-+
- printf ((grpref[0] & GRP_COMDAT)
- ? ngettext ("\
- \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
-@@ -1376,8 +1378,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- data->d_size / sizeof (Elf32_Word) - 1),
- elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- elf_strptr (ebl->elf, symshdr->sh_link,
-- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
-+ (sym == NULL ? NULL
-+ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
- ?: gettext ("<INVALID SYMBOL>"),
- data->d_size / sizeof (Elf32_Word) - 1);
-
-@@ -1528,10 +1530,12 @@ static void
- handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
- Elf_Data *data;
- size_t cnt;
- size_t shstrndx;
-+ size_t sh_entsize;
-
- /* Get the data of the section. */
- data = elf_getdata (scn, NULL);
-@@ -1543,21 +1547,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
- \nDynamic segment contains %lu entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
-- shdr->sh_size / shdr->sh_entsize),
-- (unsigned long int) (shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
-+ (unsigned long int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
- fputs_unlocked (gettext (" Type Value\n"), stdout);
-
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dynmem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
-@@ -1706,7 +1715,8 @@ static void
- handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -1892,7 +1902,8 @@ static void
- handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -2139,6 +2150,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Now we can compute the number of entries in the section. */
- unsigned int nsyms = data->d_size / (class == ELFCLASS32
- ? sizeof (Elf32_Sym)
-@@ -2149,15 +2167,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- nsyms),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
-- GElf_Shdr glink;
- printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n",
- " %lu local symbols String table: [%2u] '%s'\n",
- shdr->sh_info),
- (unsigned long int) shdr->sh_info,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- fputs_unlocked (class == ELFCLASS32
- ? gettext ("\
-@@ -2393,7 +2408,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2404,9 +2425,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2459,8 +2478,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2472,9 +2497,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2736,25 +2759,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
- filename = NULL;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Print the header. */
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
- "\
- \nVersion symbols section [%2u] '%s' contains %d entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
-- shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- (int) (shdr->sh_size / shdr->sh_entsize),
-+ (int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- /* Now we can finally look at the actual contents of this section. */
-- for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (unsigned int cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- if (cnt % 2 == 0)
- printf ("\n %4d:", cnt);
-@@ -2803,7 +2831,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
- ++counts[lengths[cnt]];
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
-+ shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2816,9 +2854,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- if (extrastr != NULL)
- fputs (extrastr, stdout);
-@@ -3078,7 +3114,8 @@ print_liblist (Ebl *ebl)
-
- if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST)
- {
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_LIB, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
- printf (ngettext ("\
- \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n",
- "\
-@@ -4398,6 +4435,16 @@ print_decoded_aranges_section (Ebl *ebl,
- return;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
- "\
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
-@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char
- goto fail_close;
- }
-
-+ if (shstrndx >= shnum)
-+ goto illformed;
-+
-+#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
-+
- /* Storage for section information. We leave room for two more
- entries since we unconditionally create a section header string
- table. Maybe some weird tool created an ELF file without one.
-@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* This should always be true (i.e., there should not be any
- holes in the numbering). */
-- assert (elf_ndxscn (scn) == cnt);
-+ elf_assert (elf_ndxscn (scn) == cnt);
-
- shdr_info[cnt].scn = scn;
-
-@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char
- shdr_info[cnt].shdr.sh_name);
- if (shdr_info[cnt].name == NULL)
- {
-+ illformed:
- error (0, 0, gettext ("illformed file '%s'"), fname);
- goto fail_close;
- }
-@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char
-
- /* Remember the shdr.sh_link value. */
- shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
-+ if (shdr_info[cnt].old_sh_link >= shnum)
-+ goto illformed;
-
- /* Sections in files other than relocatable object files which
- are not loaded can be freely moved by us. In relocatable
-@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char
- appropriate reference. */
- if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
-@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char
- for (inner = 1;
- inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
- ++inner)
-+ {
-+ if (grpref[inner] < shnum)
- shdr_info[grpref[inner]].group_idx = cnt;
-+ else
-+ goto illformed;
-+ }
-
- if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
- /* If the section group contains only one element and this
-@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
- }
-
-@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char
- discarded right away. */
- if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
- {
-- assert (shdr_info[cnt].group_idx != 0);
-+ elf_assert (shdr_info[cnt].group_idx != 0);
-
- if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
- {
-@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* If a relocation section is marked as being removed make
- sure the section it is relocating is removed, too. */
-- if ((shdr_info[cnt].shdr.sh_type == SHT_REL
-+ if (shdr_info[cnt].shdr.sh_type == SHT_REL
- || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-- shdr_info[cnt].idx = 1;
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-+ shdr_info[cnt].idx = 1;
-+ }
-
- /* If a group section is marked as being removed make
- sure all the sections it contains are being removed, too. */
-@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char
- if (shdr_info[cnt].symtab_idx != 0
- && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-
- shdr_info[shdr_info[cnt].symtab_idx].data
- = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
-@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char
- else if (scnidx == SHN_XINDEX)
- scnidx = xndx;
-
-+ if (scnidx >= shnum)
-+ goto illformed;
-+
- if (shdr_info[scnidx].idx == 0)
- /* This symbol table has a real symbol in
- a discarded section. So preserve the
-@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char
- }
-
- /* Handle references through sh_info. */
-- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
-+ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
- {
- shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
- changes |= shdr_info[cnt].shdr.sh_info < cnt;
- }
-+ }
-
- /* Mark the section as investigated. */
- shdr_info[cnt].idx = 2;
-@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
- elf_errmsg (-1));
-
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- /* Add this name to the section header string table. */
- shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
-@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
- if (shdr_info[cnt].data == NULL)
-@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-
- /* Finalize the string table and fill in the correct indices in the
- section headers. */
-@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char
- shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (Elf32_Word))
-+ elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
- if (shdr_info[cnt].version_idx != 0)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
- /* This section has associated version
- information. We have to modify that
- information, too. */
- versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (GElf_Versym))
-+ elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
-@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char
- sec = shdr_info[sym->st_shndx].idx;
- else
- {
-- assert (shndxdata != NULL);
-+ elf_assert (shndxdata != NULL);
-
- sec = shdr_info[xshndx].idx;
- }
-@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char
- nxshndx = sec;
- }
-
-- assert (sec < SHN_LORESERVE || shndxdata != NULL);
-+ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
-
- if ((inner != destidx || nshndx != sym->st_shndx
- || (shndxdata != NULL && nxshndx != xshndx))
-@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- size_t sidx = (sym->st_shndx != SHN_XINDEX
- ? sym->st_shndx : xshndx);
-- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-- || (shdr_info[sidx].shdr.sh_type == SHT_GROUP
-- && shdr_info[sidx].shdr.sh_info == inner));
-+ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-+ || ((shdr_info[sidx].shdr.sh_type
-+ == SHT_GROUP)
-+ && (shdr_info[sidx].shdr.sh_info
-+ == inner)));
- }
- }
-
-@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
-@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char
- else
- {
- /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
-- assert (shdr_info[cnt].shdr.sh_entsize
-- == sizeof (Elf64_Xword));
-+ elf_assert (shdr_info[cnt].shdr.sh_entsize
-+ == sizeof (Elf64_Xword));
-
- Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
-
-@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
deleted file mode 100644
index 870ec23703..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
+++ /dev/null
@@ -1,256 +0,0 @@
-From 02cefdaa6429e620d6457fdb3ad9934f194c5a93 Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt@roeckx.be>
-Date: Tue, 22 Apr 2014 21:46:22 +0200
-Subject: [PATCH] Unwinding is only supported on Linux
-
-Index: elfutils-0.158/backends/i386_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/i386_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/i386_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#if !defined __i386__ && !defined __x86_64__
-+#if (!defined __i386__ && !defined __x86_64__) || !defined(__linux__)
- return false;
- #else /* __i386__ || __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/backends/x86_64_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/x86_64_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/x86_64_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
- return false;
- #else /* __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/libdwfl/linux-pid-attach.c
-===================================================================
---- elfutils-0.158.orig/libdwfl/linux-pid-attach.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/libdwfl/linux-pid-attach.c 2014-05-01 17:12:47.980766442 +0000
-@@ -37,6 +37,8 @@
- # define MAX(a, b) ((a) > (b) ? (a) : (b))
- #endif
-
-+#ifdef __linux__
-+
- struct pid_arg
- {
- DIR *dir;
-@@ -358,3 +360,87 @@
- return 0;
- }
- INTDEF (dwfl_linux_proc_attach)
-+
-+#else /* __linux__ */
-+
-+static pid_t
-+pid_next_thread (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return -1;
-+}
-+
-+static bool
-+pid_getthread (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t tid __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
-+ Dwarf_Addr addr __attribute__ ((unused)),
-+ Dwarf_Word *result __attribute__ ((unused)),
-+ void *arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_set_initial_registers (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static void
-+pid_detach (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static void
-+pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static const Dwfl_Thread_Callbacks pid_thread_callbacks =
-+{
-+ pid_next_thread,
-+ pid_getthread,
-+ pid_memory_read,
-+ pid_set_initial_registers,
-+ pid_detach,
-+ pid_thread_detach,
-+};
-+
-+int
-+dwfl_linux_proc_attach (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t pid __attribute__ ((unused)),
-+ bool assume_ptrace_stopped __attribute__ ((unused)))
-+{
-+ return ENOSYS;
-+}
-+INTDEF (dwfl_linux_proc_attach)
-+
-+struct __libdwfl_pid_arg *
-+internal_function
-+__libdwfl_get_pid_arg (Dwfl *dwfl __attribute__ ((unused)))
-+{
-+ return NULL;
-+}
-+
-+#endif /* ! __linux __ */
-+
-Index: elfutils-0.158/tests/backtrace-child.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-child.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-child.c 2014-05-01 17:11:18.866616384 +0000
-@@ -79,6 +79,18 @@
- #include <stdio.h>
- #include <unistd.h>
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
- #define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
- #else
-@@ -221,3 +233,6 @@
- /* Not reached. */
- abort ();
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-data.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-data.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-data.c 2014-05-01 17:11:18.866616384 +0000
-@@ -40,7 +40,7 @@
- #include <string.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
-
- int
- main (int argc __attribute__ ((unused)), char **argv)
-@@ -50,7 +50,7 @@
- return 77;
- }
-
--#else /* __x86_64__ */
-+#else /* __x86_64__ && __linux__ */
-
- /* The only arch specific code is set_initial_registers. */
-
-Index: elfutils-0.158/tests/backtrace-dwarf.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-dwarf.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-dwarf.c 2014-05-01 17:11:18.866616384 +0000
-@@ -25,6 +25,18 @@
- #include <sys/ptrace.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static void cleanup_13_abort (void);
- #define main cleanup_13_main
- #include "cleanup-13.c"
-@@ -148,3 +160,6 @@
- /* There is an exit (0) call if we find the "main" frame, */
- error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-subr.sh
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-subr.sh 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-subr.sh 2014-05-01 17:11:18.866616384 +0000
-@@ -84,6 +84,7 @@
- echo ./backtrace ./backtrace.$arch.{exec,core}
- testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true
- cat backtrace.$arch.{bt,err}
-+ check_unsupported backtrace.$arch.err backtrace.$arch.core
- check_all backtrace.$arch.{bt,err} backtrace.$arch.core
- }
-
-Index: elfutils-0.158/tests/backtrace.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace.c 2014-05-01 17:11:18.866616384 +0000
-@@ -39,6 +39,18 @@
- #include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static int
- dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
- const char *name, Dwarf_Addr start,
-@@ -452,3 +464,6 @@
- dwfl_end (dwfl);
- return 0;
- }
-+
-+#endif /* ! __linux__ */
-+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
index fc3d6dc3f4..c97c4e470d 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
@@ -1,7 +1,25 @@
-Index: elfutils-0.158/backends/arm_init.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_init.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_init.c 2014-04-21 11:13:24.374519343 +0000
+From 0db1687eee0b4d16ccbc40db5a06b574fca6614c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 14 Nov 2014 15:25:42 +0800
+Subject: [PATCH] Rebase arm_backend.diff from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 44 +++++++++++-
+ backends/libebl_arm.h | 9 +++
+ libelf/elf.h | 11 +++
+ tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
+ tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
+ tests/run-readelf-mixed-corenote.sh | 11 ++-
+ 8 files changed, 401 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 3283c97..8b57d3f 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
@@ -35,21 +35,32 @@
#define RELOC_PREFIX R_ARM_
#include "libebl_CPU.h"
@@ -36,7 +54,7 @@ Index: elfutils-0.158/backends/arm_init.c
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
-@@ -61,7 +72,10 @@
+@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen)
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
@@ -46,12 +64,12 @@ Index: elfutils-0.158/backends/arm_init.c
+ else
+ eh->return_value_location = arm_return_value_location_hard;
HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
- return MODVERSION;
-Index: elfutils-0.158/backends/arm_regs.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_regs.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_regs.c 2014-04-21 11:13:24.374519343 +0000
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 21c5ad3..4ee1039 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
@@ -31,6 +31,7 @@
#endif
@@ -60,7 +78,7 @@ Index: elfutils-0.158/backends/arm_regs.c
#include <dwarf.h>
#define BACKEND arm_
-@@ -76,6 +77,9 @@
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
break;
case 16 + 0 ... 16 + 7:
@@ -70,7 +88,7 @@ Index: elfutils-0.158/backends/arm_regs.c
regno += 96 - 16;
/* Fall through. */
case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
namelen = 2;
break;
@@ -210,11 +228,11 @@ Index: elfutils-0.158/backends/arm_regs.c
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
-Index: elfutils-0.158/backends/arm_retval.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_retval.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_retval.c 2014-04-21 11:13:24.374519343 +0000
-@@ -48,6 +48,13 @@
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 7aced74..052132e 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
#define nloc_intreg 1
#define nloc_intregs(n) (2 * (n))
@@ -228,7 +246,7 @@ Index: elfutils-0.158/backends/arm_retval.c
/* The return value is a structure and is actually stored in stack space
passed in a hidden argument by the caller. But, the compiler
helpfully returns the address of that space in r0. */
-@@ -58,8 +65,9 @@
+@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] =
#define nloc_aggregate 1
@@ -240,11 +258,11 @@ Index: elfutils-0.158/backends/arm_retval.c
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
-@@ -112,14 +120,31 @@
- else
- return -1;
- }
-+ if (tag == DW_TAG_base_type)
+@@ -98,14 +106,31 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ else
+ return -1;
+ }
++ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
@@ -259,20 +277,20 @@ Index: elfutils-0.158/backends/arm_retval.c
+ goto aggregate;
+ }
+ }
- if (size <= 16)
- {
- intreg:
- *locp = loc_intreg;
- return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
- }
-+ /* fall through. */
+ if (size <= 16)
+ {
+ intreg:
+ *locp = loc_intreg;
+ return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
+ }
++ /* fall through. */
- aggregate:
-+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
- *locp = loc_aggregate;
- return nloc_aggregate;
-
-@@ -138,3 +163,18 @@
+ aggregate:
++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ }
+@@ -125,3 +150,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
DWARF and might be valid. */
return -2;
}
@@ -291,11 +309,26 @@ Index: elfutils-0.158/backends/arm_retval.c
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
-Index: elfutils-0.158/libelf/elf.h
-===================================================================
---- elfutils-0.158.orig/libelf/elf.h 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/libelf/elf.h 2014-04-21 11:13:24.374519343 +0000
-@@ -2318,6 +2318,9 @@
+diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
+new file mode 100644
+index 0000000..c00770c
+--- /dev/null
++++ b/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/libelf/elf.h b/libelf/elf.h
+index a3cce3e..0891674 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2346,6 +2346,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
@@ -305,7 +338,7 @@ Index: elfutils-0.158/libelf/elf.h
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2335,12 +2338,19 @@
+@@ -2363,12 +2366,19 @@ typedef Elf32_Addr Elf32_Conflict;
/* Processor specific values for the Phdr p_type field. */
#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -325,7 +358,7 @@ Index: elfutils-0.158/libelf/elf.h
/* AArch64 relocs. */
-@@ -2619,6 +2629,7 @@
+@@ -2647,6 +2657,7 @@ typedef Elf32_Addr Elf32_Conflict;
TLS block (LDR, STR). */
#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
to GOT origin (LDR). */
@@ -333,25 +366,122 @@ Index: elfutils-0.158/libelf/elf.h
#define R_ARM_ME_TOO 128 /* Obsolete. */
#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_THM_TLS_DESCSEQ16 129
-Index: elfutils-0.158/backends/libebl_arm.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/libebl_arm.h 2014-04-21 11:13:24.374519343 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.158/tests/run-allregs.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2671,7 +2671,28 @@
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index 5d33246..78464a8 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -2530,6 +2530,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
++ VFP reg64 (s0): undefined
++ VFP reg65 (s1): undefined
++ VFP reg66 (s2): undefined
++ VFP reg67 (s3): undefined
++ VFP reg68 (s4): undefined
++ VFP reg69 (s5): undefined
++ VFP reg70 (s6): undefined
++ VFP reg71 (s7): undefined
++ VFP reg72 (s8): undefined
++ VFP reg73 (s9): undefined
++ VFP reg74 (s10): undefined
++ VFP reg75 (s11): undefined
++ VFP reg76 (s12): undefined
++ VFP reg77 (s13): undefined
++ VFP reg78 (s14): undefined
++ VFP reg79 (s15): undefined
++ VFP reg80 (s16): undefined
++ VFP reg81 (s17): undefined
++ VFP reg82 (s18): undefined
++ VFP reg83 (s19): undefined
++ VFP reg84 (s20): undefined
++ VFP reg85 (s21): undefined
++ VFP reg86 (s22): undefined
++ VFP reg87 (s23): undefined
++ VFP reg88 (s24): undefined
++ VFP reg89 (s25): undefined
++ VFP reg90 (s26): undefined
++ VFP reg91 (s27): undefined
++ VFP reg92 (s28): undefined
++ VFP reg93 (s29): undefined
++ VFP reg94 (s30): undefined
++ VFP reg95 (s31): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+@@ -2538,7 +2570,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+- integer reg128 (spsr): undefined
++ MMX reg104 (wcgr0): undefined
++ MMX reg105 (wcgr1): undefined
++ MMX reg106 (wcgr2): undefined
++ MMX reg107 (wcgr3): undefined
++ MMX reg108 (wcgr4): undefined
++ MMX reg109 (wcgr5): undefined
++ MMX reg110 (wcgr6): undefined
++ MMX reg111 (wcgr7): undefined
++ MMX reg112 (wr0): undefined
++ MMX reg113 (wr1): undefined
++ MMX reg114 (wr2): undefined
++ MMX reg115 (wr3): undefined
++ MMX reg116 (wr4): undefined
++ MMX reg117 (wr5): undefined
++ MMX reg118 (wr6): undefined
++ MMX reg119 (wr7): undefined
++ MMX reg120 (wr8): undefined
++ MMX reg121 (wr9): undefined
++ MMX reg122 (wr10): undefined
++ MMX reg123 (wr11): undefined
++ MMX reg124 (wr12): undefined
++ MMX reg125 (wr13): undefined
++ MMX reg126 (wr14): undefined
++ MMX reg127 (wr15): undefined
++ state reg128 (spsr): undefined
++ state reg129 (spsr_fiq): undefined
++ state reg130 (spsr_irq): undefined
++ state reg131 (spsr_abt): undefined
++ state reg132 (spsr_und): undefined
++ state reg133 (spsr_svc): undefined
++ integer reg144 (r8_usr): undefined
++ integer reg145 (r9_usr): undefined
++ integer reg146 (r10_usr): undefined
++ integer reg147 (r11_usr): undefined
++ integer reg148 (r12_usr): undefined
++ integer reg149 (r13_usr): undefined
++ integer reg150 (r14_usr): undefined
++ integer reg151 (r8_fiq): undefined
++ integer reg152 (r9_fiq): undefined
++ integer reg153 (r10_fiq): undefined
++ integer reg154 (r11_fiq): undefined
++ integer reg155 (r12_fiq): undefined
++ integer reg156 (r13_fiq): undefined
++ integer reg157 (r14_fiq): undefined
++ integer reg158 (r13_irq): undefined
++ integer reg159 (r14_irq): undefined
++ integer reg160 (r13_abt): undefined
++ integer reg161 (r14_abt): undefined
++ integer reg162 (r13_und): undefined
++ integer reg163 (r14_und): undefined
++ integer reg164 (r13_svc): undefined
++ integer reg165 (r14_svc): undefined
++ MMX reg192 (wc0): undefined
++ MMX reg193 (wc1): undefined
++ MMX reg194 (wc2): undefined
++ MMX reg195 (wc3): undefined
++ MMX reg196 (wc4): undefined
++ MMX reg197 (wc5): undefined
++ MMX reg198 (wc6): undefined
++ MMX reg199 (wc7): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
+index 6f3862e..13557d5 100755
+--- a/tests/run-allregs.sh
++++ b/tests/run-allregs.sh
+@@ -2671,7 +2671,28 @@ integer registers:
13: sp (sp), address 32 bits
14: lr (lr), address 32 bits
15: pc (pc), address 32 bits
@@ -381,7 +511,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
FPA registers:
16: f0 (f0), float 96 bits
17: f1 (f1), float 96 bits
-@@ -2689,7 +2710,72 @@
+@@ -2689,7 +2710,72 @@ FPA registers:
101: f5 (f5), float 96 bits
102: f6 (f6), float 96 bits
103: f7 (f7), float 96 bits
@@ -454,7 +584,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
256: d0 (d0), float 64 bits
257: d1 (d1), float 64 bits
258: d2 (d2), float 64 bits
-@@ -2722,6 +2808,13 @@
+@@ -2722,6 +2808,13 @@ VFP registers:
285: d29 (d29), float 64 bits
286: d30 (d30), float 64 bits
287: d31 (d31), float 64 bits
@@ -468,11 +598,11 @@ Index: elfutils-0.158/tests/run-allregs.sh
EOF
# See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -30,12 +30,11 @@
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index 01e4594..9a8a380 100755
+--- a/tests/run-readelf-mixed-corenote.sh
++++ b/tests/run-readelf-mixed-corenote.sh
+@@ -30,12 +30,11 @@ Note segment of 892 bytes at offset 0x274:
pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
orig_r0: -1, fpvalid: 1
@@ -490,114 +620,6 @@ Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
CORE 124 PRPSINFO
state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-Index: elfutils-0.158/tests/run-addrcfi.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2530,6 +2530,38 @@
- FPA reg21 (f5): undefined
- FPA reg22 (f6): undefined
- FPA reg23 (f7): undefined
-+ VFP reg64 (s0): undefined
-+ VFP reg65 (s1): undefined
-+ VFP reg66 (s2): undefined
-+ VFP reg67 (s3): undefined
-+ VFP reg68 (s4): undefined
-+ VFP reg69 (s5): undefined
-+ VFP reg70 (s6): undefined
-+ VFP reg71 (s7): undefined
-+ VFP reg72 (s8): undefined
-+ VFP reg73 (s9): undefined
-+ VFP reg74 (s10): undefined
-+ VFP reg75 (s11): undefined
-+ VFP reg76 (s12): undefined
-+ VFP reg77 (s13): undefined
-+ VFP reg78 (s14): undefined
-+ VFP reg79 (s15): undefined
-+ VFP reg80 (s16): undefined
-+ VFP reg81 (s17): undefined
-+ VFP reg82 (s18): undefined
-+ VFP reg83 (s19): undefined
-+ VFP reg84 (s20): undefined
-+ VFP reg85 (s21): undefined
-+ VFP reg86 (s22): undefined
-+ VFP reg87 (s23): undefined
-+ VFP reg88 (s24): undefined
-+ VFP reg89 (s25): undefined
-+ VFP reg90 (s26): undefined
-+ VFP reg91 (s27): undefined
-+ VFP reg92 (s28): undefined
-+ VFP reg93 (s29): undefined
-+ VFP reg94 (s30): undefined
-+ VFP reg95 (s31): undefined
- FPA reg96 (f0): undefined
- FPA reg97 (f1): undefined
- FPA reg98 (f2): undefined
-@@ -2538,7 +2570,66 @@
- FPA reg101 (f5): undefined
- FPA reg102 (f6): undefined
- FPA reg103 (f7): undefined
-- integer reg128 (spsr): undefined
-+ MMX reg104 (wcgr0): undefined
-+ MMX reg105 (wcgr1): undefined
-+ MMX reg106 (wcgr2): undefined
-+ MMX reg107 (wcgr3): undefined
-+ MMX reg108 (wcgr4): undefined
-+ MMX reg109 (wcgr5): undefined
-+ MMX reg110 (wcgr6): undefined
-+ MMX reg111 (wcgr7): undefined
-+ MMX reg112 (wr0): undefined
-+ MMX reg113 (wr1): undefined
-+ MMX reg114 (wr2): undefined
-+ MMX reg115 (wr3): undefined
-+ MMX reg116 (wr4): undefined
-+ MMX reg117 (wr5): undefined
-+ MMX reg118 (wr6): undefined
-+ MMX reg119 (wr7): undefined
-+ MMX reg120 (wr8): undefined
-+ MMX reg121 (wr9): undefined
-+ MMX reg122 (wr10): undefined
-+ MMX reg123 (wr11): undefined
-+ MMX reg124 (wr12): undefined
-+ MMX reg125 (wr13): undefined
-+ MMX reg126 (wr14): undefined
-+ MMX reg127 (wr15): undefined
-+ state reg128 (spsr): undefined
-+ state reg129 (spsr_fiq): undefined
-+ state reg130 (spsr_irq): undefined
-+ state reg131 (spsr_abt): undefined
-+ state reg132 (spsr_und): undefined
-+ state reg133 (spsr_svc): undefined
-+ integer reg144 (r8_usr): undefined
-+ integer reg145 (r9_usr): undefined
-+ integer reg146 (r10_usr): undefined
-+ integer reg147 (r11_usr): undefined
-+ integer reg148 (r12_usr): undefined
-+ integer reg149 (r13_usr): undefined
-+ integer reg150 (r14_usr): undefined
-+ integer reg151 (r8_fiq): undefined
-+ integer reg152 (r9_fiq): undefined
-+ integer reg153 (r10_fiq): undefined
-+ integer reg154 (r11_fiq): undefined
-+ integer reg155 (r12_fiq): undefined
-+ integer reg156 (r13_fiq): undefined
-+ integer reg157 (r14_fiq): undefined
-+ integer reg158 (r13_irq): undefined
-+ integer reg159 (r14_irq): undefined
-+ integer reg160 (r13_abt): undefined
-+ integer reg161 (r14_abt): undefined
-+ integer reg162 (r13_und): undefined
-+ integer reg163 (r14_und): undefined
-+ integer reg164 (r13_svc): undefined
-+ integer reg165 (r14_svc): undefined
-+ MMX reg192 (wc0): undefined
-+ MMX reg193 (wc1): undefined
-+ MMX reg194 (wc2): undefined
-+ MMX reg195 (wc3): undefined
-+ MMX reg196 (wc4): undefined
-+ MMX reg197 (wc5): undefined
-+ MMX reg198 (wc6): undefined
-+ MMX reg199 (wc7): undefined
- VFP reg256 (d0): undefined
- VFP reg257 (d1): undefined
- VFP reg258 (d2): undefined
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
new file mode 100644
index 0000000000..eeb2063807
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
@@ -0,0 +1,166 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 11:30:35 +0200
+Subject: libebl: Add sym_func_value hook.
+
+The ARM EABI says that the zero bit of function symbol st_value indicates
+whether the symbol points to a THUMB or ARM function. Add a new ebl hook
+to adjust the st_value in such a case so that we get the actual value that
+the symbol points to. It isn't easily possible to reuse the existing
+resolve_sym_value for this purpose, so we end up with another hook that
+can be used from dwfl_module_getsym and elflint.
+
+Rebase arm_func_value.patch from 0.159 to 0.160
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 1 +
+ backends/arm_symbol.c | 8 ++++++++
+ libdwfl/dwfl_module_getsym.c | 2 +-
+ libebl/Makefile.am | 3 ++-
+ libebl/ebl-hooks.h | 3 +++
+ libebl/eblsymfuncval.c | 43 +++++++++++++++++++++++++++++++++++++++++++
+ libebl/libebl.h | 11 +++++++++++
+ 7 files changed, 69 insertions(+), 2 deletions(-)
+ create mode 100644 libebl/eblsymfuncval.c
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 8b57d3f..2266829 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -78,6 +78,7 @@ arm_init (elf, machine, eh, ehlen)
+ eh->return_value_location = arm_return_value_location_hard;
+ HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
++ HOOK (eh, sym_func_value);
+
+ /* We only unwind the core integer registers. */
+ eh->frame_nregs = 16;
+diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
+index cd467ff..49fca55 100644
+--- a/backends/arm_symbol.c
++++ b/backends/arm_symbol.c
+@@ -129,3 +129,11 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty
+ {
+ return sh_type == SHT_ARM_EXIDX;
+ }
++
++/* ARM EABI says that the low bit indicates whether the function
++ symbol value is a THUMB function or not. Mask it off. */
++GElf_Addr
++arm_sym_func_value (Ebl *ebl __attribute__ ((unused)), GElf_Addr val)
++{
++ return val & ~(GElf_Addr)1;
++}
+diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
+index 42d2b67..fb192d7 100644
+--- a/libdwfl/dwfl_module_getsym.c
++++ b/libdwfl/dwfl_module_getsym.c
+@@ -119,7 +119,7 @@ __libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, GElf_Addr *addr,
+ descriptors). */
+
+ char *ident;
+- GElf_Addr st_value = sym->st_value & ebl_func_addr_mask (mod->ebl);
++ GElf_Addr st_value = ebl_sym_func_value (mod->ebl, sym->st_value);
+ *resolved = false;
+ if (! adjust_st_value && mod->e_type != ET_REL && alloc
+ && (GELF_ST_TYPE (sym->st_info) == STT_FUNC
+diff --git a/libebl/Makefile.am b/libebl/Makefile.am
+index ec4477b..889c21b 100644
+--- a/libebl/Makefile.am
++++ b/libebl/Makefile.am
+@@ -55,7 +55,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
+ eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
+ ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
+ eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \
+- eblunwind.c eblresolvesym.c eblcheckreloctargettype.c
++ eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
++ eblsymfuncval.c
+
+ libebl_a_SOURCES = $(gen_SOURCES)
+
+diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
+index e1186f8..160a821 100644
+--- a/libebl/ebl-hooks.h
++++ b/libebl/ebl-hooks.h
+@@ -191,5 +191,8 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ (e.g. function descriptor resolving) */
+ bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr);
+
++/* Returns the real value of a symbol function address or offset. */
++GElf_Addr EBLHOOK(sym_func_value) (Ebl *ebl, GElf_Addr val);
++
+ /* Destructor for ELF backend handle. */
+ void EBLHOOK(destr) (struct ebl *);
+diff --git a/libebl/eblsymfuncval.c b/libebl/eblsymfuncval.c
+new file mode 100644
+index 0000000..c0b322f
+--- /dev/null
++++ b/libebl/eblsymfuncval.c
+@@ -0,0 +1,43 @@
++/* Turn a symbol function value into a real function address or offset.
++ Copyright (C) 2014 Red Hat, Inc.
++ This file is part of elfutils.
++
++ This file is free software; you can redistribute it and/or modify
++ it under the terms of either
++
++ * the GNU Lesser General Public License as published by the Free
++ Software Foundation; either version 3 of the License, or (at
++ your option) any later version
++
++ or
++
++ * the GNU General Public License as published by the Free
++ Software Foundation; either version 2 of the License, or (at
++ your option) any later version
++
++ or both in parallel, as here.
++
++ elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received copies of the GNU General Public License and
++ the GNU Lesser General Public License along with this program. If
++ not, see <http://www.gnu.org/licenses/>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <libeblP.h>
++#include <assert.h>
++
++GElf_Addr
++ebl_sym_func_value (Ebl *ebl, GElf_Addr val)
++{
++ if (ebl == NULL || ebl->sym_func_value == NULL)
++ return val;
++
++ return ebl->sym_func_value (ebl, val);
++}
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index bb993bf..40cf635 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -459,6 +459,17 @@ extern bool ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ extern bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
+ __nonnull_attribute__ (2);
+
++/* Returns the real value of a symbol function address or offset
++ (e.g. when the st_value contains some flag bits that need to be
++ masked off). This is different from ebl_resolve_sym_value which
++ only works for actual symbol addresses (in non-ET_REL files) that
++ might resolve to an address in a different section.
++ ebl_sym_func_value is called to turn the given value into the a
++ real address or offset (the original value might not be a real
++ address). This works for both ET_REL when the value is a section
++ offset or ET_EXEC or ET_DYN symbol values, which are addresses. */
++extern GElf_Addr ebl_sym_func_value (Ebl *ebl, GElf_Addr val);
++
+ #ifdef __cplusplus
+ }
+ #endif
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
new file mode 100644
index 0000000000..8abb36bb49
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
@@ -0,0 +1,83 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 12:30:02 +0200
+Subject: libebl: Add ebl_unwind_ret_mask.
+
+Another ARM oddity. A return value address in an unwind will contain an
+extra bit to indicate whether to return to a regular ARM or THUMB function.
+Add a new ebl function to return a mask to use to get the actual return
+address during an unwind ebl_unwind_ret_mask.
+
+Rebase arm_unwind_ret_mask.patch from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 3 +++
+ libebl/eblinitreg.c | 8 ++++++++
+ libebl/libebl.h | 4 ++++
+ libebl/libeblP.h | 6 ++++++
+ 4 files changed, 21 insertions(+)
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 2266829..f8df042 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -87,5 +87,8 @@ arm_init (elf, machine, eh, ehlen)
+ /* Bit zero encodes whether an function address is THUMB or ARM. */
+ eh->func_addr_mask = ~(GElf_Addr)1;
+
++ /* Bit zero encodes whether to return to a THUMB or ARM function. */
++ eh->unwind_ret_mask = ~(GElf_Addr)1;
++
+ return MODVERSION;
+ }
+diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c
+index 5729b3c..ca681c0 100644
+--- a/libebl/eblinitreg.c
++++ b/libebl/eblinitreg.c
+@@ -56,3 +56,11 @@ ebl_func_addr_mask (Ebl *ebl)
+ return ((ebl == NULL || ebl->func_addr_mask == 0)
+ ? ~(GElf_Addr)0 : ebl->func_addr_mask);
+ }
++
++GElf_Addr
++ebl_unwind_ret_mask (Ebl *ebl)
++{
++ return ((ebl == NULL || ebl->unwind_ret_mask == 0)
++ ? ~(GElf_Addr)0 : ebl->unwind_ret_mask);
++}
++
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index 40cf635..be70027 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -420,6 +420,10 @@ extern size_t ebl_frame_nregs (Ebl *ebl)
+ tables) is needed. */
+ extern GElf_Addr ebl_func_addr_mask (Ebl *ebl);
+
++/* Mask to use for unwind return address in case the architecture adds
++ some extra non-address bits to it. */
++extern GElf_Addr ebl_unwind_ret_mask (Ebl *ebl);
++
+ /* Convert *REGNO as is in DWARF to a lower range suitable for
+ Dwarf_Frame->REGS indexing. */
+ extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
+diff --git a/libebl/libeblP.h b/libebl/libeblP.h
+index dbd67f3..e18ace6 100644
+--- a/libebl/libeblP.h
++++ b/libebl/libeblP.h
+@@ -70,6 +70,12 @@ struct ebl
+ otherwise it should be the actual mask to use. */
+ GElf_Addr func_addr_mask;
+
++ /* Mask to use to get the return address from an unwind in case the
++ architecture adds some extra non-address bits to it. When not
++ initialized (0) then ebl_unwind_ret_mask will return ~0, otherwise
++ it should be the actual mask to use. */
++ GElf_Addr unwind_ret_mask;
++
+ /* Function descriptor load address and table as used by
+ ebl_resolve_sym_value if available for this arch. */
+ GElf_Addr fd_addr;
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
index 8796e9a394..8796e9a394 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
index 6c19d176e0..d51a720073 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
@@ -478,7 +478,7 @@ Index: elfutils-0.158/backends/parisc_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
index 48bffdad0c..f5b566f2d5 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
@@ -409,7 +409,7 @@ Index: elfutils-0.158/backends/m68k_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
index b188927a0b..d73a3f2869 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
@@ -496,7 +496,7 @@ Index: elfutils-0.158/backends/mips_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
index 8e669e7199..8e669e7199 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
new file mode 100644
index 0000000000..35b1b389fb
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
@@ -0,0 +1,35 @@
+Index: elfutils-0.159/libdwfl/linux-pid-attach.c
+===================================================================
+--- elfutils-0.159.orig/libdwfl/linux-pid-attach.c
++++ elfutils-0.159/libdwfl/linux-pid-attach.c
+@@ -393,6 +393,16 @@ pid_getthread (Dwfl *dwfl __attribute__
+ return false;
+ }
+
++bool
++internal_function
++__libdwfl_ptrace_attach (pid_t tid __attribute__ ((unused)),
++ bool *tid_was_stoppedp __attribute__ ((unused)))
++{
++ errno = ENOSYS;
++ __libdwfl_seterrno (DWFL_E_ERRNO);
++ return false;
++}
++
+ static bool
+ pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
+ Dwarf_Addr addr __attribute__ ((unused)),
+@@ -419,6 +429,13 @@ pid_detach (Dwfl *dwfl __attribute__ ((u
+ {
+ }
+
++void
++internal_function
++__libdwfl_ptrace_detach (pid_t tid __attribute__ ((unused)),
++ bool tid_was_stopped __attribute__ ((unused)))
++{
++}
++
+ static void
+ pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
+ void *thread_arg __attribute__ ((unused)))
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
index 5a75375690..08f25a53eb 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
@@ -1,52 +1,47 @@
---- elfutils/backends/ChangeLog
-+++ elfutils/backends/ChangeLog
-@@ -292,6 +292,10 @@
- * ppc_attrs.c (ppc_check_object_attribute): Handle tag
- GNU_Power_ABI_Struct_Return.
-
-+2009-01-23 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
-+
- 2008-10-04 Ulrich Drepper <drepper@redhat.com>
-
- * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
-@@ -619,6 +623,11 @@
- * sparc_init.c: Likewise.
- * x86_64_init.c: Likewise.
-
-+2005-11-22 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
-+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
-+
- 2005-11-19 Roland McGrath <roland@redhat.com>
-
- * ppc64_reloc.def: REL30 -> ADDR30.
-@@ -641,6 +650,9 @@
- * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
- (CLEANFILES): Add libebl_$(m).so.
-
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
- * ppc64_reloc.def: Likewise.
-
---- elfutils/backends/Makefile.am
-+++ elfutils/backends/Makefile.am
-@@ -124,7 +124,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
- $(LINK) -shared -o $(@:.map=.so) \
- -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
- -Wl,--version-script,$(@:.so=.map) \
-- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
-+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
- $(textrel_check)
-
- libebl_i386.so: $(cpu_i386)
---- elfutils/ChangeLog
-+++ elfutils/ChangeLog
-@@ -118,6 +118,8 @@
+Rebase to 1.161
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ ChangeLog | 30 +++++++++++++++++++++++
+ backends/ChangeLog | 12 +++++++++
+ backends/Makefile.am | 2 +-
+ config/ChangeLog | 4 +++
+ config/eu.am | 14 ++++++++---
+ configure.ac | 60 +++++++++++++++++++++++++++++++++++++++++++--
+ lib/ChangeLog | 8 ++++++
+ lib/eu-config.h | 11 +++++++++
+ libasm/ChangeLog | 5 ++++
+ libcpu/ChangeLog | 8 ++++++
+ libcpu/i386_disasm.c | 1 +
+ libdw/ChangeLog | 13 ++++++++++
+ libdw/dwarf_begin_elf.c | 8 ++++++
+ libdw/libdw.h | 2 +-
+ libdwfl/ChangeLog | 20 +++++++++++++++
+ libdwfl/linux-core-attach.c | 29 ++++++++++++++++++++++
+ libdwfl/linux-pid-attach.c | 14 +++++++++++
+ libebl/ChangeLog | 5 ++++
+ libelf/ChangeLog | 10 ++++++++
+ libelf/common.h | 4 +--
+ libelf/gnuhash_xlate.h | 6 +++--
+ src/ChangeLog | 30 +++++++++++++++++++++++
+ src/Makefile.am | 5 ++++
+ src/addr2line.c | 4 +--
+ src/findtextrel.c | 6 ++++-
+ src/ld.h | 2 ++
+ src/readelf.c | 15 ++++++++----
+ src/strings.c | 11 +++++++++
+ src/strip.c | 20 +++++++++++++--
+ tests/ChangeLog | 14 +++++++++++
+ tests/Makefile.am | 1 +
+ tests/backtrace.c | 1 +
+ tests/line2addr.c | 2 +-
+ 33 files changed, 355 insertions(+), 22 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index f81b302..3f9eaf1 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -187,6 +187,8 @@
2012-01-24 Mark Wielaard <mjw@redhat.com>
@@ -55,7 +50,7 @@
* COPYING: Fix address. Updated version from gnulib.
2012-01-23 Mark Wielaard <mjw@redhat.com>
-@@ -136,6 +138,9 @@
+@@ -205,6 +207,9 @@
2011-10-08 Mike Frysinger <vapier@gentoo.org>
@@ -65,7 +60,7 @@
* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
2011-10-02 Ulrich Drepper <drepper@gmail.com>
-@@ -157,6 +162,10 @@
+@@ -226,6 +231,10 @@
* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
@@ -76,7 +71,7 @@
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
-@@ -165,6 +174,10 @@
+@@ -234,6 +243,10 @@
* configure.ac (zip_LIBS): Check for liblzma too.
@@ -87,7 +82,7 @@
2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros.
-@@ -176,6 +189,8 @@
+@@ -245,6 +258,8 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -96,7 +91,7 @@
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
-@@ -256,6 +271,10 @@
+@@ -325,6 +340,10 @@
* configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am.
@@ -107,7 +102,7 @@
2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
-@@ -303,6 +322,17 @@
+@@ -372,6 +391,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile.
@@ -125,9 +120,61 @@
2005-05-19 Roland McGrath <roland@redhat.com>
* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
---- elfutils/config/ChangeLog
-+++ elfutils/config/ChangeLog
-@@ -44,6 +44,10 @@
+diff --git a/backends/ChangeLog b/backends/ChangeLog
+index e800d16..6a86248 100644
+--- a/backends/ChangeLog
++++ b/backends/ChangeLog
+@@ -433,6 +433,10 @@
+ * ppc_attrs.c (ppc_check_object_attribute): Handle tag
+ GNU_Power_ABI_Struct_Return.
+
++2009-01-23 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
++
+ 2008-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
+@@ -760,6 +764,11 @@
+ * sparc_init.c: Likewise.
+ * x86_64_init.c: Likewise.
+
++2005-11-22 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
++ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
++
+ 2005-11-19 Roland McGrath <roland@redhat.com>
+
+ * ppc64_reloc.def: REL30 -> ADDR30.
+@@ -782,6 +791,9 @@
+ * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
+ (CLEANFILES): Add libebl_$(m).so.
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
+ * ppc64_reloc.def: Likewise.
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 4d15a5d..507c9df 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -131,7 +131,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ $(LINK) -shared -o $(@:.map=.so) \
+ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
+ -Wl,--version-script,$(@:.so=.map) \
+- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
+ @$(textrel_check)
+
+ libebl_i386.so: $(cpu_i386)
+diff --git a/config/ChangeLog b/config/ChangeLog
+index 1b4e896..058dd88 100644
+--- a/config/ChangeLog
++++ b/config/ChangeLog
+@@ -71,6 +71,10 @@
* known-dwarf.awk: Use gawk.
@@ -138,17 +185,19 @@
2010-07-02 Ulrich Drepper <drepper@redhat.com>
* elfutils.spec.in: Add more BuildRequires.
---- elfutils/config/eu.am
-+++ elfutils/config/eu.am
+diff --git a/config/eu.am b/config/eu.am
+index faf8add..6ca36a5 100644
+--- a/config/eu.am
++++ b/config/eu.am
@@ -1,6 +1,6 @@
## Common automake fragments for elfutils subdirectory makefiles.
##
--## Copyright (C) 2010 Red Hat, Inc.
-+## Copyright (C) 2010-2011 Red Hat, Inc.
+-## Copyright (C) 2010, 2014 Red Hat, Inc.
++## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
##
## This file is part of elfutils.
##
-@@ -29,14 +29,20 @@
+@@ -29,13 +29,21 @@
## not, see <http://www.gnu.org/licenses/>.
##
@@ -157,43 +206,26 @@
+
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
- AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
-- $(if $($(*F)_no_Werror),,-Werror) \
+-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
++AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
+ $(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
- $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
++ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
$($(*F)_CFLAGS)
+if BUILD_WERROR
+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
+endif
+
- if MUDFLAP
- AM_CFLAGS += -fmudflap
- libmudflap = -lmudflap
---- elfutils/config.h.in
-+++ elfutils/config.h.in
-@@ -6,6 +6,9 @@
- /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */
- #undef ENABLE_DWZ
+ COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
-+/* Have __builtin_popcount. */
-+#undef HAVE_BUILTIN_POPCOUNT
-+
- /* Define to 1 if you have the <inttypes.h> header file. */
- #undef HAVE_INTTYPES_H
-
-@@ -102,4 +105,7 @@
- /* Define for large files, on AIX-style hosts. */
- #undef _LARGE_FILES
-
-+/* Stubbed out if missing compiler support. */
-+#undef __thread
-+
- #include <eu-config.h>
---- elfutils/configure.ac
-+++ elfutils/configure.ac
-@@ -99,6 +99,54 @@ CFLAGS="$old_CFLAGS"])
+ %.os: %.c %.o
+diff --git a/configure.ac b/configure.ac
+index 0e67a79..a1ad6db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
@@ -248,7 +280,7 @@
AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
# Use the same flags that we use for our DSOs, so the test is representative.
# Some old compiler/linker/libc combinations fail some ways and not others.
-@@ -114,7 +162,10 @@ static __thread int a; int foo (int b) {
+@@ -104,7 +152,10 @@ static __thread int a; int foo (int b) { return a + b; }]],
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"])
AS_IF([test "x$ac_cv_tls" != xyes],
@@ -260,9 +292,9 @@
dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
-@@ -213,6 +264,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
+@@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
AM_CONDITIONAL(BUILD_STATIC, [dnl
- test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
+ test "$use_gprof" = yes -o "$use_gcov" = yes])
+AC_ARG_ENABLE([werror],
+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
@@ -272,7 +304,7 @@
AC_ARG_ENABLE([tests-rpath],
AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
[tests_use_rpath=$enableval], [tests_use_rpath=no])
-@@ -324,7 +380,7 @@ case "$eu_version" in
+@@ -302,7 +358,7 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
@@ -281,9 +313,11 @@
AC_CHECK_SIZEOF(long)
---- elfutils/lib/ChangeLog
-+++ elfutils/lib/ChangeLog
-@@ -61,6 +61,9 @@
+diff --git a/lib/ChangeLog b/lib/ChangeLog
+index 4415213..4911cc1 100644
+--- a/lib/ChangeLog
++++ b/lib/ChangeLog
+@@ -65,6 +65,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -293,7 +327,7 @@
* eu-config.h: Add multiple inclusion protection.
2009-01-17 Ulrich Drepper <drepper@redhat.com>
-@@ -117,6 +120,11 @@
+@@ -121,6 +124,11 @@
* Makefile.am (libeu_a_SOURCES): Add it.
* system.h: Declare crc32_file.
@@ -305,9 +339,11 @@
2005-04-30 Ulrich Drepper <drepper@redhat.com>
* Makefile.am: Use -ffunction-sections for xmalloc.c.
---- elfutils/lib/eu-config.h
-+++ elfutils/lib/eu-config.h
-@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 3afff26..d89f3a8 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .previous\n"
/* This macro is used by the tests conditionalize for standalone building. */
#define ELFUTILS_HEADER(name) <lib##name.h>
@@ -325,9 +361,11 @@
#ifdef SHARED
# define OLD_VERSION(name, version) \
---- elfutils/libasm/ChangeLog
-+++ elfutils/libasm/ChangeLog
-@@ -75,6 +75,11 @@
+diff --git a/libasm/ChangeLog b/libasm/ChangeLog
+index 9b25af9..32b9fd0 100644
+--- a/libasm/ChangeLog
++++ b/libasm/ChangeLog
+@@ -87,6 +87,11 @@
* asm_error.c: Add new error ASM_E_IOERROR.
* libasmP.h: Add ASM_E_IOERROR definition.
@@ -339,9 +377,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/ChangeLog
-+++ elfutils/libcpu/ChangeLog
-@@ -47,6 +47,9 @@
+diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
+index a20f440..5ea23b7 100644
+--- a/libcpu/ChangeLog
++++ b/libcpu/ChangeLog
+@@ -51,6 +51,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -351,7 +391,7 @@
* Makefile.am (i386_parse_CFLAGS): Use quotes around command
substitution that can produce leading whitespace.
-@@ -376,6 +379,11 @@
+@@ -380,6 +383,11 @@
* defs/i386.doc: New file.
* defs/x86_64: New file.
@@ -363,9 +403,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/i386_disasm.c
-+++ elfutils/libcpu/i386_disasm.c
-@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 832241f..c7a0df0 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
default:
assert (! "INVALID not handled");
@@ -373,9 +415,11 @@
}
}
else
---- elfutils/libdw/ChangeLog
-+++ elfutils/libdw/ChangeLog
-@@ -346,6 +346,10 @@
+diff --git a/libdw/ChangeLog b/libdw/ChangeLog
+index abc2d71..a9ee0b0 100644
+--- a/libdw/ChangeLog
++++ b/libdw/ChangeLog
+@@ -717,6 +717,10 @@
* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
@@ -386,7 +430,7 @@
2011-07-14 Mark Wielaard <mjw@redhat.com>
* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
-@@ -705,6 +709,10 @@
+@@ -1076,6 +1080,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
@@ -397,7 +441,7 @@
2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename.
-@@ -1473,6 +1481,11 @@
+@@ -1844,6 +1852,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
@@ -409,9 +453,11 @@
* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
formref offset.
---- elfutils/libdw/dwarf_begin_elf.c
-+++ elfutils/libdw/dwarf_begin_elf.c
-@@ -48,6 +48,14 @@
+diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
+index 4c49ce2..7ea1430 100644
+--- a/libdw/dwarf_begin_elf.c
++++ b/libdw/dwarf_begin_elf.c
+@@ -47,6 +47,14 @@
#if USE_ZLIB
# include <endian.h>
# define crc32 loser_crc32
@@ -426,9 +472,11 @@
# include <zlib.h>
# undef crc32
#endif
---- elfutils/libdw/libdw.h
-+++ elfutils/libdw/libdw.h
-@@ -879,7 +879,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
+diff --git a/libdw/libdw.h b/libdw/libdw.h
+index b2b2282..722c589 100644
+--- a/libdw/libdw.h
++++ b/libdw/libdw.h
+@@ -1003,7 +1003,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler);
/* Inline optimizations. */
@@ -437,9 +485,11 @@
/* Return attribute code of given attribute. */
__libdw_extern_inline unsigned int
dwarf_whatattr (Dwarf_Attribute *attr)
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -283,6 +283,21 @@
+diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
+index 69e59a6..15c2987 100644
+--- a/libdwfl/ChangeLog
++++ b/libdwfl/ChangeLog
+@@ -571,6 +571,21 @@
(dwfl_module_addrsym) (i_to_symfile): New function.
(dwfl_module_addrsym) (search_table): Use it.
@@ -461,7 +511,7 @@
2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Mark Wielaard <mjw@redhat.com>
-@@ -2048,6 +2063,11 @@
+@@ -2336,6 +2351,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
@@ -473,8 +523,10 @@
* Makefile.am (noinst_HEADERS): Add loc2c.c.
* test2.c (main): Check sscanf result to quiet warning.
---- elfutils/libdwfl/linux-core-attach.c
-+++ elfutils/libdwfl/linux-core-attach.c
+diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
+index 5a7b3b3..d05ac7e 100644
+--- a/libdwfl/linux-core-attach.c
++++ b/libdwfl/linux-core-attach.c
@@ -29,6 +29,35 @@
#include "libdwflP.h"
#include <fcntl.h>
@@ -509,42 +561,45 @@
+# endif
+#endif
- #ifndef MIN
- # define MIN(a, b) ((a) < (b) ? (a) : (b))
---- elfutils/libdwfl/linux-pid-attach.c
-+++ elfutils/libdwfl/linux-pid-attach.c
-@@ -268,13 +268,24 @@ pid_thread_detach (Dwfl_Thread *thread,
- pid_arg->tid_attached = 0;
- if (! pid_arg->assume_ptrace_stopped)
- {
-+ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
-+ // handling of the detachment to keep the process State: T (stopped).
-+ if (pid_arg->tid_was_stopped)
-+ syscall (__NR_tkill, tid, SIGSTOP);
- /* This handling is needed only on older Linux kernels such as
-- 2.6.32-358.23.2.el6.ppc64. Later kernels such as
-- 3.11.7-200.fc19.x86_64 remember the T (stopped) state
-- themselves and no longer need to pass SIGSTOP during
-- PTRACE_DETACH. */
-+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64
-+ remember the T (stopped) state themselves and no longer need to pass
-+ SIGSTOP during PTRACE_DETACH. */
- ptrace (PTRACE_DETACH, tid, NULL,
- (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0));
-+ if (pid_arg->tid_was_stopped)
-+ {
-+ // Wait till the SIGSTOP settles down.
-+ int i;
-+ for (i = 0; i < 100000; i++)
-+ if (linux_proc_pid_is_stopped (tid))
-+ break;
-+ }
- }
+ #include "../libdw/memory-access.h"
+
+diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
+index efbcf03..ae5af38 100644
+--- a/libdwfl/linux-pid-attach.c
++++ b/libdwfl/linux-pid-attach.c
+@@ -255,6 +255,11 @@ void
+ internal_function
+ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ {
++ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
++ // handling of the detachment to keep the process State: T (stopped).
++ if (tid_was_stopped)
++ syscall (__NR_tkill, tid, SIGSTOP);
++
+ /* This handling is needed only on older Linux kernels such as
+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as
+ 3.11.7-200.fc19.x86_64 remember the T (stopped) state
+@@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ PTRACE_DETACH. */
+ ptrace (PTRACE_DETACH, tid, NULL,
+ (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
++
++ if (tid_was_stopped)
++ {
++ // Wait till the SIGSTOP settles down.
++ int i;
++ for (i = 0; i < 100000; i++)
++ if (linux_proc_pid_is_stopped (tid))
++ break;
++ }
}
---- elfutils/libebl/ChangeLog
-+++ elfutils/libebl/ChangeLog
-@@ -738,6 +738,11 @@
+ static void
+diff --git a/libebl/ChangeLog b/libebl/ChangeLog
+index 5e635f2..998544f 100644
+--- a/libebl/ChangeLog
++++ b/libebl/ChangeLog
+@@ -765,6 +765,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
@@ -556,9 +611,11 @@
2005-05-21 Ulrich Drepper <drepper@redhat.com>
* libebl_x86_64.map: Add x86_64_core_note.
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -85,6 +85,11 @@
+diff --git a/libelf/ChangeLog b/libelf/ChangeLog
+index 3b88d03..cb6cad5 100644
+--- a/libelf/ChangeLog
++++ b/libelf/ChangeLog
+@@ -244,6 +244,11 @@
* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
@@ -570,7 +627,7 @@
2011-02-26 Mark Wielaard <mjw@redhat.com>
* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
-@@ -762,6 +767,11 @@
+@@ -921,6 +926,11 @@
* elf.h: Update from glibc.
@@ -582,8 +639,10 @@
2005-05-08 Roland McGrath <roland@redhat.com>
* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
---- elfutils/libelf/common.h
-+++ elfutils/libelf/common.h
+diff --git a/libelf/common.h b/libelf/common.h
+index 744f1bb..185ea59 100644
+--- a/libelf/common.h
++++ b/libelf/common.h
@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
(Var) = (sizeof (Var) == 1 \
? (unsigned char) (Var) \
@@ -602,8 +661,10 @@
: (sizeof (Var) == 4 \
? bswap_32 (Var) \
: bswap_64 (Var))))
---- elfutils/libelf/gnuhash_xlate.h
-+++ elfutils/libelf/gnuhash_xlate.h
+diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
+index 04d9ca1..3e25936 100644
+--- a/libelf/gnuhash_xlate.h
++++ b/libelf/gnuhash_xlate.h
@@ -1,5 +1,5 @@
/* Conversion functions for versioning information.
- Copyright (C) 2006, 2007 Red Hat, Inc.
@@ -611,7 +672,7 @@
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2006.
-@@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
+@@ -69,7 +69,9 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
dest32 = (Elf32_Word *) &dest64[bitmask_words];
while (len >= 4)
{
@@ -622,24 +683,11 @@
len -= 4;
}
}
---- elfutils/src/addr2line.c
-+++ elfutils/src/addr2line.c
-@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl
- bool parsed = false;
- int i, j;
- char *name = NULL;
-- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- && string[i] == '\0')
- parsed = adjust_to_section (name, &addr, dwfl);
-- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- {
- default:
- break;
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -964,8 +964,16 @@
+diff --git a/src/ChangeLog b/src/ChangeLog
+index 0ae863e..1162f6e 100644
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1371,8 +1371,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use
print_ops.
@@ -656,7 +704,7 @@
* ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com>
-@@ -1129,6 +1137,8 @@
+@@ -1536,6 +1544,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET.
@@ -665,7 +713,7 @@
2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
-@@ -1312,6 +1322,11 @@
+@@ -1719,6 +1729,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO.
@@ -677,7 +725,7 @@
2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast.
-@@ -1563,6 +1578,8 @@
+@@ -1970,6 +1985,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
@@ -686,7 +734,7 @@
2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file.
-@@ -2002,6 +2019,10 @@
+@@ -2409,6 +2426,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
@@ -697,7 +745,7 @@
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -2078,6 +2099,10 @@
+@@ -2485,6 +2506,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
@@ -708,7 +756,7 @@
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -2426,6 +2451,11 @@
+@@ -2833,6 +2858,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
@@ -720,9 +768,44 @@
2005-05-30 Roland McGrath <roland@redhat.com>
* readelf.c (print_debug_line_section): Print section offset of each
---- elfutils/src/findtextrel.c
-+++ elfutils/src/findtextrel.c
-@@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 4f198da..a612cf6 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -89,6 +89,11 @@ endif
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
+
++# Buggy old compilers or libc headers.
++readelf_no_Werror = yes
++strings_no_Werror = yes
++addr2line_no_Wformat = yes
++
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
+ $(demanglelib)
+diff --git a/src/addr2line.c b/src/addr2line.c
+index de80294..e982982 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl *dwfl)
+ bool parsed = false;
+ int i, j;
+ char *name = NULL;
+- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ && string[i] == '\0')
+ parsed = adjust_to_section (name, &addr, dwfl);
+- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ {
+ default:
+ break;
+diff --git a/src/findtextrel.c b/src/findtextrel.c
+index 264a06b..d7de202 100644
+--- a/src/findtextrel.c
++++ b/src/findtextrel.c
+@@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void *p2)
static void
@@ -735,8 +818,10 @@
GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
const char *fname, bool more_than_one, void **knownsrcs)
{
---- elfutils/src/ld.h
-+++ elfutils/src/ld.h
+diff --git a/src/ld.h b/src/ld.h
+index 29f4031..8695c31 100644
+--- a/src/ld.h
++++ b/src/ld.h
@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
/* Checked whether the symbol is undefined and referenced from a DSO. */
@@ -745,28 +830,18 @@
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
-@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
+@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scninfo, size_t symidx)
return sym->defined && sym->in_dso;
}
+#endif /* Optimizing and not GCC 4.2. */
#endif /* ld.h */
---- elfutils/src/Makefile.am
-+++ elfutils/src/Makefile.am
-@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes
- # XXX While the file is not finished, don't warn about this
- ldgeneric_no_Wunused = yes
-
-+# Buggy old compilers.
-+readelf_no_Werror = yes
-+
- readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
- nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
- $(demanglelib)
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -4171,10 +4171,12 @@ listptr_base (struct listptr *p)
+diff --git a/src/readelf.c b/src/readelf.c
+index d49544f..15dbe62 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -4368,10 +4368,12 @@ listptr_base (struct listptr *p)
return base;
}
@@ -781,7 +856,7 @@
struct listptr *p1 = (void *) a;
struct listptr *p2 = (void *) b;
-@@ -4263,8 +4265,11 @@ static void
+@@ -4467,8 +4469,11 @@ static void
sort_listptr (struct listptr_table *table, const char *name)
{
if (table->n > 0)
@@ -795,7 +870,7 @@
}
static bool
-@@ -9151,7 +9156,7 @@ dump_archive_index (Elf *elf, const char
+@@ -9540,7 +9545,7 @@ dump_archive_index (Elf *elf, const char *fname)
if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL))
@@ -804,8 +879,10 @@
while (1)
#endif
error (EXIT_FAILURE, 0,
---- elfutils/src/strings.c
-+++ elfutils/src/strings.c
+diff --git a/src/strings.c b/src/strings.c
+index f60e4b4..dae6ab2 100644
+--- a/src/strings.c
++++ b/src/strings.c
@@ -43,6 +43,10 @@
#include <system.h>
@@ -817,7 +894,7 @@
/* Prototypes of local functions. */
static int read_fd (int fd, const char *fname, off64_t fdlen);
-@@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off
+@@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
fd, start_off);
if (mem != MAP_FAILED)
{
@@ -831,7 +908,7 @@
break;
}
if (errno != EINVAL && errno != ENOMEM)
-@@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o
+@@ -581,9 +590,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
elfmap_off = from & ~(ps - 1);
elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
@@ -843,8 +920,10 @@
}
if (unlikely (elfmap == MAP_FAILED))
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
+diff --git a/src/strip.c b/src/strip.c
+index 2b21799..1b34eee 100644
+--- a/src/strip.c
++++ b/src/strip.c
@@ -45,6 +45,12 @@
#include <libebl.h>
#include <system.h>
@@ -877,7 +956,7 @@
}
/* Open the file. */
-@@ -2060,7 +2076,7 @@ while computing checksum for debug infor
+@@ -2091,7 +2107,7 @@ while computing checksum for debug information"));
/* If requested, preserve the timestamp. */
if (tvp != NULL)
{
@@ -886,7 +965,7 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"),
-@@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char
+@@ -2148,7 +2164,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
if (tvp != NULL)
{
@@ -895,19 +974,11 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"), fname);
---- elfutils/tests/backtrace.c
-+++ elfutils/tests/backtrace.c
-@@ -36,6 +36,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <argp.h>
-+#include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
- static int
---- elfutils/tests/ChangeLog
-+++ elfutils/tests/ChangeLog
-@@ -123,6 +123,13 @@
+diff --git a/tests/ChangeLog b/tests/ChangeLog
+index 59048f6..02eccfc 100644
+--- a/tests/ChangeLog
++++ b/tests/ChangeLog
+@@ -421,6 +421,13 @@
2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
@@ -921,7 +992,7 @@
* Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
backtrace-data and backtrace-dwarf.
(BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
-@@ -987,6 +994,8 @@
+@@ -1285,6 +1292,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
@@ -930,7 +1001,7 @@
* testfile45.S.bz2: Add tests for cltq, cqto.
* testfile45.expect.bz2: Adjust.
-@@ -1695,6 +1704,11 @@
+@@ -1993,6 +2002,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
@@ -942,8 +1013,34 @@
2005-05-24 Ulrich Drepper <drepper@redhat.com>
* get-files.c (main): Use correct format specifier.
---- elfutils/tests/line2addr.c
-+++ elfutils/tests/line2addr.c
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index f32e4d0..2652fb8 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -365,6 +365,7 @@ get_lines_LDADD = $(libdw) $(libelf)
+ get_files_LDADD = $(libdw) $(libelf)
+ get_aranges_LDADD = $(libdw) $(libelf)
+ allfcts_LDADD = $(libdw) $(libelf)
++line2addr_no_Wformat = yes
+ line2addr_LDADD = $(libdw)
+ addrscopes_LDADD = $(libdw)
+ funcscopes_LDADD = $(libdw)
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 331ba0f..46af9b5 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <argp.h>
++#include <sys/syscall.h>
+ #include ELFUTILS_HEADER(dwfl)
+
+ #ifndef __linux__
+diff --git a/tests/line2addr.c b/tests/line2addr.c
+index e0d65d3..7c171b9 100644
+--- a/tests/line2addr.c
++++ b/tests/line2addr.c
@@ -124,7 +124,7 @@ main (int argc, char *argv[])
{
struct args a = { .arg = argv[cnt] };
@@ -953,3 +1050,6 @@
{
default:
case 0:
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
index c08519cf53..c08519cf53 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
index eae5796de3..eae5796de3 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
new file mode 100644
index 0000000000..374cba555e
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
@@ -0,0 +1,29 @@
+Fix elf_cvt_gunhash if dest and src are same.
+
+Upstream-status: Pending
+
+The 'dest' and 'src' can be same, we need to save the value of src32[2]
+before swaping it.
+
+Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com>
+diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
+index 6faf113..04d9ca1 100644
+--- a/libelf/gnuhash_xlate.h
++++ b/libelf/gnuhash_xlate.h
+@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
+ words. We must detangle them here. */
+ Elf32_Word *dest32 = dest;
+ const Elf32_Word *src32 = src;
++ Elf32_Word save_src32_2 = src32[2]; // dest could be equal to src
+
+ /* First four control words, 32 bits. */
+ for (unsigned int cnt = 0; cnt < 4; ++cnt)
+@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
+ len -= 4;
+ }
+
+- Elf32_Word bitmask_words = encode ? src32[2] : dest32[2];
++ Elf32_Word bitmask_words = encode ? save_src32_2 : dest32[2];
+
+ /* Now the 64 bit words. */
+ Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4];
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index 110624297e..5e75f129a4 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -8,7 +8,7 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
PR = "r11"
-SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
+SRC_URI = "https://fedorahosted.org/releases/e/l/${PN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "a0bed1130135f17ad27533b0034dba8d"
SRC_URI[sha256sum] = "8aebfa4a745db21cf5429c9541fe482729b62efc7e53e9110151b4169fe887da"
@@ -25,13 +25,15 @@ SRC_URI += "\
file://m68k_backend.diff \
file://testsuite-ignore-elflint.diff \
file://elf_additions.diff \
- file://elfutils-fsize.patch \
- file://remove-unused.patch \
- file://mempcpy.patch \
- file://fix_for_gcc-4.7.patch \
- file://dso-link-change.patch \
- file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
- file://elfutils-ar-c-fix-num-passed-to-memset.patch \
+ file://elfutils-fsize.patch \
+ file://remove-unused.patch \
+ file://mempcpy.patch \
+ file://fix_for_gcc-4.7.patch \
+ file://dso-link-change.patch \
+ file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
+ file://elfutils-ar-c-fix-num-passed-to-memset.patch \
+ file://Fix_elf_cvt_gunhash.patch \
+ file://elf_begin.c-CVE-2014-9447-fix.patch \
"
# Only apply when building uclibc based target recipe
SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
@@ -51,9 +53,9 @@ EXTRA_OECONF_append_class-native = " --without-bzlib"
EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
do_configure_prepend() {
- sed -i '/^i386_dis.h:/,+4 {/.*/d}' ${S}/libcpu/Makefile.am
+ sed -i '/^i386_dis.h:/,+4 {/.*/d}' ${S}/libcpu/Makefile.am
- cp ${WORKDIR}/*dis.h ${S}/libcpu
+ cp ${WORKDIR}/*dis.h ${S}/libcpu
}
# we can not build complete elfutils when using uclibc
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.158.bb b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
index ef3dd0bb40..a3c1f36f6a 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.158.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
@@ -7,14 +7,20 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
-SRC_URI[md5sum] = "050a4909e452d01ab4747fd69d4036e0"
-SRC_URI[sha256sum] = "be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d"
+SRC_URI[md5sum] = "e1b9847c9a6a1ad340de8d47a863ec52"
+SRC_URI[sha256sum] = "570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070"
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.158-2.debian.tar.xz
+SRC_URI += "\
+ file://mempcpy.patch \
+ file://dso-link-change.patch \
+ file://Fix_elf_cvt_gunhash.patch \
+ file://fixheadercheck.patch \
+"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz
SRC_URI += "\
file://redhat-portability.diff \
- file://redhat-robustify.diff \
file://hppa_backend.diff \
file://arm_backend.diff \
file://mips_backend.diff \
@@ -22,14 +28,9 @@ SRC_URI += "\
file://testsuite-ignore-elflint.diff \
file://scanf-format.patch \
file://mips_readelf_w.patch \
- file://core_filename.patch \
- file://CVE-2014-0172.patch \
- file://unwind_non_linux.patch \
- file://elf_additions.diff \
- file://mempcpy.patch \
- file://dso-link-change.patch \
- file://m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch \
- file://fixheadercheck.patch \
+ file://arm_func_value.patch \
+ file://arm_unwind_ret_mask.patch \
+ file://non_linux.patch \
"
# Only apply when building uclibc based target recipe
diff --git a/meta/recipes-devtools/expect/expect_5.45.bb b/meta/recipes-devtools/expect/expect_5.45.bb
index 970f4a5ccc..264f00718b 100644
--- a/meta/recipes-devtools/expect/expect_5.45.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.bb
@@ -16,7 +16,9 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
DEPENDS += "tcl"
RDEPENDS_${PN} = "tcl"
-inherit autotools-brokensep
+inherit autotools
+
+PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
file://0001-configure.in.patch \
@@ -35,6 +37,7 @@ do_install_append() {
install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/
rm ${D}${libdir}/expect${PV}/libexpect*.so
+ sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
}
EXTRA_OECONF += "--includedir=${STAGING_INCDIR} \
diff --git a/meta/recipes-devtools/fdisk/gptfdisk_git.bb b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
new file mode 100644
index 0000000000..477c1d986f
--- /dev/null
+++ b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "util-linux popt ncurses"
+
+PV = "0.8.10+git${SRCPV}"
+SRCREV = "a920398fa393f9d6301b32b191bc01e086ab8bc8"
+SRC_URI = "git://git.code.sf.net/p/gptfdisk/code"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 cgdisk ${D}${sbindir}
+ install -m 0755 gdisk ${D}${sbindir}
+ install -m 0755 sgdisk ${D}${sbindir}
+ install -m 0755 fixparts ${D}${sbindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/file/file/debian-742262.patch b/meta/recipes-devtools/file/file/debian-742262.patch
new file mode 100644
index 0000000000..1ef485e93c
--- /dev/null
+++ b/meta/recipes-devtools/file/file/debian-742262.patch
@@ -0,0 +1,19 @@
+The awk pattern was checked *before* the Perl pattern, so the perl
+script with BEGIN{...} would be reported as awk, this patch fixes it.
+
+Upstream-Status: Backport [debian]
+
+Signed-off-by: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+diff --git a/magic/Magdir/commands b/magic/Magdir/commands
+--- a/magic/Magdir/commands
++++ b/magic/Magdir/commands
+@@ -57,6 +57,7 @@
+ 0 string/wt #!\ /usr/bin/awk awk script text executable
+ !:mime text/x-awk
+ 0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text
++!:strength - 12
+
+ # AT&T Bell Labs' Plan 9 shell
+ 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
diff --git a/meta/recipes-devtools/file/file/dump b/meta/recipes-devtools/file/file/dump
deleted file mode 100644
index 628ead86c6..0000000000
--- a/meta/recipes-devtools/file/file/dump
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#------------------------------------------------------------------------------
-# dump: file(1) magic for dump file format--for new and old dump filesystems
-#
-# We specify both byte orders in order to recognize byte-swapped dumps.
-#
-24 belong 60012 new-fs dump file (big endian),
->4 bedate x Previous dump %s,
->8 bedate x This dump %s,
->12 belong >0 Volume %ld,
->692 belong 0 Level zero, type:
->692 belong >0 Level %d, type:
->0 belong 1 tape header,
->0 belong 2 beginning of file record,
->0 belong 3 map of inodes on tape,
->0 belong 4 continuation of file record,
->0 belong 5 end of volume,
->0 belong 6 map of inodes deleted,
->0 belong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 belong >0 Flags %x
-
-24 belong 60011 old-fs dump file (big endian),
-#>4 bedate x Previous dump %s,
-#>8 bedate x This dump %s,
->12 belong >0 Volume %ld,
->692 belong 0 Level zero, type:
->692 belong >0 Level %d, type:
->0 belong 1 tape header,
->0 belong 2 beginning of file record,
->0 belong 3 map of inodes on tape,
->0 belong 4 continuation of file record,
->0 belong 5 end of volume,
->0 belong 6 map of inodes deleted,
->0 belong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 belong >0 Flags %x
-
-24 lelong 60012 new-fs dump file (little endian),
->4 ledate x This dump %s,
->8 ledate x Previous dump %s,
->12 lelong >0 Volume %ld,
->692 lelong 0 Level zero, type:
->692 lelong >0 Level %d, type:
->0 lelong 1 tape header,
->0 lelong 2 beginning of file record,
->0 lelong 3 map of inodes on tape,
->0 lelong 4 continuation of file record,
->0 lelong 5 end of volume,
->0 lelong 6 map of inodes deleted,
->0 lelong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 lelong >0 Flags %x
-
-24 lelong 60011 old-fs dump file (little endian),
-#>4 ledate x Previous dump %s,
-#>8 ledate x This dump %s,
->12 lelong >0 Volume %ld,
->692 lelong 0 Level zero, type:
->692 lelong >0 Level %d, type:
->0 lelong 1 tape header,
->0 lelong 2 beginning of file record,
->0 lelong 3 map of inodes on tape,
->0 lelong 4 continuation of file record,
->0 lelong 5 end of volume,
->0 lelong 6 map of inodes deleted,
->0 lelong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 lelong >0 Flags %x
diff --git a/meta/recipes-devtools/file/file/filesystems b/meta/recipes-devtools/file/file/filesystems
deleted file mode 100644
index fd5073334c..0000000000
--- a/meta/recipes-devtools/file/file/filesystems
+++ /dev/null
@@ -1,812 +0,0 @@
-
-#------------------------------------------------------------------------------
-# filesystems: file(1) magic for different filesystems
-#
-0 string \366\366\366\366 PC formatted floppy with no filesystem
-# Sun disk labels
-# From /usr/include/sun/dklabel.h:
-0774 beshort 0xdabe Sun disk label
->0 string x '%s
->>31 string >\0 \b%s
->>>63 string >\0 \b%s
->>>>95 string >\0 \b%s
->0 string x \b'
->0734 short >0 %d rpm,
->0736 short >0 %d phys cys,
->0740 short >0 %d alts/cyl,
->0746 short >0 %d interleave,
->0750 short >0 %d data cyls,
->0752 short >0 %d alt cyls,
->0754 short >0 %d heads/partition,
->0756 short >0 %d sectors/track,
->0764 long >0 start cyl %ld,
->0770 long x %ld blocks
-# Is there a boot block written 1 sector in?
->512 belong&077777777 0600407 \b, boot block present
-# Smart Boot Manager backup file is 41 byte header + first sectors of disc
-# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
-0 string SBMBAKUP_ Smart Boot Manager backup file
->9 string x \b, version %-5.5s
->>14 string =_
->>>15 string x %-.1s
->>>>16 string =_ \b.
->>>>>17 string x \b%-.1s
->>>>>>18 string =_ \b.
->>>>>>>19 string x \b%-.1s
-# DOS Emulator image is 128 byte header + harddisc image
-0 string DOSEMU\0
->0x27E leshort 0xAA55 DOS Emulator image
-0x1FE leshort 0xAA55 x86 boot sector
->2 string OSBS \b, OS/BS MBR
-# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
->0x8C string Invalid\ partition\ table \b, MS-DOS MBR
-# dr-dos with some upper-, lowercase variants
->0x9D string Invalid\ partition\ table$
->>181 string No\ Operating\ System$
->>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
->0x9D string Invalid\ partition\ table$
->>181 string No\ operating\ system$
->>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
->342 string Invalid\ partition\ table$
->>366 string No\ operating\ system$
->>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
->295 string NEWLDR\0
->>302 string Bad\ PT\ $
->>>310 string No\ OS\ $
->>>>317 string OS\ load\ err$
->>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
->>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
->>>>>>>387 string Copyright\ (c)\ 1984,1998
->>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
->0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
->>0x1B8 ubelong >0 \b, Serial 0x%-.4x
->0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
->271 string Invalid\ partition\ table\0
->>295 string Error\ loading\ operating\ system\0
->>>326 string Missing\ operating\ system\0 \b, mbr
-#
->139 string Invalid\ partition\ table\0
->>163 string Error\ loading\ operating\ system\0
->>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
-# http://www.heise.de/ct/05/09/006/ page 184
-#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
->>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
->300 string Invalid\ partition\ table\0
->>324 string Error\ loading\ operating\ system\0
->>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
-#??>>>389 string Invalid\ system\ disk
->>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
->300 string Ung\201ltige\ Partitionstabelle
-#split string to avoid error: String too long
->>328 string Fehler\ beim\ Laden\
->>>346 string des\ Betriebssystems
->>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
->>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
->0x145 string Default:\ F \b, FREE-DOS MBR
->64 string no\ active\ partition\ found
->>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
->271 string Operating\ system\ loading
->>296 string error\r \b, SYSLINUX MBR (2.10)
-# bootloader, bootmanager
->43 string SMART\ BTMGRFAT12\ \ \
->>430 string SBMK\ Bad!\r
->>>3 string SBM \b, Smart Boot Manager
->>>>6 string >\0 \b, version %s
->382 string XOSLLOADXCF \b, eXtended Operating System Loader
->6 string LILO \b, LInux i386 boot LOader
->>120 string LILO \b, version 22.3.4 SuSe
->>172 string LILO \b, version 22.5.8 Debian
->402 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>394 string stage1 \b, GRand Unified Bootloader (0.5.95)
->343 string Geom\0Read\0\ Error\0
->>321 string Loading\ stage1.5 \b, Grand Unified Bootloader
->380 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>374 string GRUB\ \0 \b, GRand Unified Bootloader
->382 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>376 string GRUB\ \0 \b, GRand Unified Bootloader (0.93)
->383 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>377 string GRUB\ \0 \b, GRand Unified Bootloader (0.94)
->385 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>379 string GRUB\ \0 \b, GRand Unified Bootloader (0.95)
->480 string Boot\ failed\r
->>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06)
->395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
->185 string FDBOOT\ Version\
->>204 string \rNo\ Systemdisk.\
->>>220 string Booting\ from\ harddisk.\n\r
->>>245 string Cannot\ load\ from\ harddisk.\n\r
->>>>273 string Insert\ Systemdisk\
->>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
->>>>>>200 string >\0 \b, version %-3s
->242 string Bootsector\ from\ C.H.\ Hochst\204
->>278 string No\ Systemdisk.\
->>>293 string Booting\ from\ harddisk.\n\r
->>>441 string Cannot\ load\ from\ harddisk.\n\r
->>>>469 string Insert\ Systemdisk\
->>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
->>>>>>209 string >\0 \b, version %-4.4s
->(1.b+2) ubyte 0xe
->>(1.b+3) ubyte 0x1f
->>>(1.b+4) ubyte 0xbe
->>>>(1.b+5) ubyte 0x77
->>>>(1.b+6) ubyte 0x7c
->>>>>(1.b+7) ubyte 0xac
->>>>>>(1.b+8) ubyte 0x22
->>>>>>>(1.b+9) ubyte 0xc0
->>>>>>>>(1.b+10) ubyte 0x74
->>>>>>>>>(1.b+11) ubyte 0xb
->>>>>>>>>>(1.b+12) ubyte 0x56
->>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
-#
->66 string Solaris\ Boot\ Sector
->>99 string Incomplete\ MDBoot\ load.
->>>89 string Version \b, Sun Solaris Bootloader
->>>>97 byte x version %c
-#
->408 string OS/2\ !!\ SYS01475\r\0
->>429 string OS/2\ !!\ SYS02025\r\0
->>>450 string OS/2\ !!\ SYS02027\r\0
->>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
-#
->409 string OS/2\ !!\ SYS01475\r\0
->>430 string OS/2\ !!\ SYS02025\r\0
->>>451 string OS/2\ !!\ SYS02027\r\0
->>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
->112 string This\ disk\ is\ not\ bootable\r
->>142 string If\ you\ wish\ to\ make\ it\ bootable
->>>176 string run\ the\ DOS\ program\ SYS\
->>>200 string after\ the\r
->>>>216 string system\ has\ been\ loaded\r\n
->>>>>242 string Please\ insert\ a\ DOS\ diskette\
->>>>>271 string into\r\n\ the\ drive\ and\
->>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
-# XP
->430 string NTLDR\ is\ missing\xFF\r\n
->>449 string Disk\ error\xFF\r\n
->>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
-# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ nicht\ gefunden\xFF\r\n
->>453 string Datentr\204gerfehler\xFF\r\n
->>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->>>>368 ubyte&0xDF >0
->>>>>368 string x %-.5s
->>>>>>373 ubyte&0xDF >0
->>>>>>>373 string x \b%-.3s
->>>>>376 ubyte&0xDF >0
->>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ fehlt\xFF\r\n
->>444 string Datentr\204gerfehler\xFF\r\n
->>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-# variant
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ fehlt\xFF\r\n
->>444 string Medienfehler\xFF\r\n
->>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-# variant
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->430 string Datentr\204ger\ entfernen\xFF\r\n
->>454 string Medienfehler\xFF\r\n
->>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
->>>>368 ubyte&0xDF >0
->>>>>368 string x %-.5s
->>>>>>373 ubyte&0xDF >0
->>>>>>>373 string x \b%-.3s
->>>>>376 ubyte&0xDF >0
->>>>>>376 string x \b.%-.3s
-#>3 string NTFS\ \ \ \
->389 string Fehler\ beim\ Lesen\
->>407 string des\ Datentr\204gers
->>>426 string NTLDR\ fehlt
->>>>440 string NTLDR\ ist\ komprimiert
->>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
-#>3 string NTFS\ \ \ \
->313 string A\ disk\ read\ error\ occurred.\r
->>345 string A\ kernel\ file\ is\ missing\
->>>370 string from\ the\ disk.\r
->>>>484 string NTLDR\ is\ compressed
->>>>>429 string Insert\ a\ system\ diskette\
->>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
-# DOS loader variants different languages,offsets
->472 ubyte&0xDF >0
->>389 string Invalid\ system\ disk\xFF\r\n
->>>411 string Disk\ I/O\ error
->>>>428 string Replace\ the\ disk,\ and\
->>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
-#IO.SYS
->>>>>>472 ubyte&0xDF >0
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.5s
->>>>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>>>479 string x \b%-.1s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>390 string Invalid\ system\ disk\xFF\r\n
->>>412 string Disk\ I/O\ error\xFF\r\n
->>>>429 string Replace\ the\ disk,\ and\
->>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
->>388 string Ungueltiges\ System\ \xFF\r\n
->>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>427 string Datentraeger\ wechseln\ und\
->>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
-#WINBOOT.SYS only not spaces (0xDF)
->>>>>>497 ubyte&0xDF >0
->>>>>>>497 string x %-.5s
->>>>>>>>502 ubyte&0xDF >0
->>>>>>>>>502 string x \b%-.1s
->>>>>>>>>>503 ubyte&0xDF >0
->>>>>>>>>>>503 string x \b%-.1s
->>>>>>>>>>>>504 ubyte&0xDF >0
->>>>>>>>>>>>>504 string x \b%-.1s
->>>>>>505 ubyte&0xDF >0
->>>>>>>505 string x \b.%-.3s
-#IO.SYS
->>>>>>472 ubyte&0xDF >0 or
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.5s
->>>>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>>>479 string x \b%-.1s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>390 string Ungueltiges\ System\ \xFF\r\n
->>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>429 string Datentraeger\ wechseln\ und\
->>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
-#WINBOOT.SYS only not spaces (0xDF)
->>>>>>497 ubyte&0xDF >0
->>>>>>>497 string x %-.7s
->>>>>>>>504 ubyte&0xDF >0
->>>>>>>>>504 string x \b%-.1s
->>>>>>505 ubyte&0xDF >0
->>>>>>>505 string x \b.%-.3s
-#IO.SYS
->>>>>>472 ubyte&0xDF >0 or
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.6s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>389 string Ungueltiges\ System\ \xFF\r\n
->>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>428 string Datentraeger\ wechseln\ und\
->>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
-# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
->>>>>>472 string x %-.2s
->>>>>>>474 ubyte&0xDF >0
->>>>>>>>474 string x \b%-.5s
->>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>479 string x \b%-.1s
->>>>>>480 ubyte&0xDF >0
->>>>>>>480 string x \b.%-.3s
->>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>483 string x \b%-.5s
->>>>>>>488 ubyte&0xDF >0
->>>>>>>>488 string x \b%-.2s
->>>>>>>>490 ubyte&0xDF >0
->>>>>>>>>490 string x \b%-.1s
->>>>>>>491 ubyte&0xDF >0
->>>>>>>>491 string x \b.%-.3s
->479 ubyte&0xDF >0
->>416 string Kein\ System\ oder\
->>>433 string Laufwerksfehler
->>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
-#IO.SYS
->>>>>479 string x \b %-.2s
->>>>>>481 ubyte&0xDF >0
->>>>>>>481 string x \b%-.6s
->>>>>487 ubyte&0xDF >0
->>>>>>487 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>490 ubyte&0xDF >0 \b+
->>>>>>>490 string x \b%-.5s
->>>>>>>>495 ubyte&0xDF >0
->>>>>>>>>495 string x \b%-.3s
->>>>>>>498 ubyte&0xDF >0
->>>>>>>>498 string x \b.%-.3s
-#
->486 ubyte&0xDF >0
->>416 string Non-System\ disk\ or\
->>>435 string disk\ error\r
->>>>447 string Replace\ and\ press\ any\ key\
->>>>>473 string when\ ready\r \b, Microsoft DOS Bootloader
->480 ubyte&0xDF >0
->>393 string Non-System\ disk\ or\
->>>412 string disk\ error\r
->>>>424 string Replace\ and\ press\ any\ key\
->>>>>450 string when\ ready\r \b, Microsoft DOS bootloader
-#IO.SYS
->>>>>480 string x \b %-.2s
->>>>>>482 ubyte&0xDF >0
->>>>>>>48 string x \b%-.6s
->>>>>488 ubyte&0xDF >0
->>>>>>488 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>491 ubyte&0xDF >0 \b+
->>>>>>>491 string x \b%-.5s
->>>>>>>>496 ubyte&0xDF >0
->>>>>>>>>496 string x \b%-.3s
->>>>>>>499 ubyte&0xDF >0
->>>>>>>>499 string x \b.%-.3s
-#>43 string \224R-LOADER\ \ SYS =label
->54 string SYS
->>324 string VASKK
->>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
-#
->70 string IBMBIO\ \ COM
->>472 string Cannot\ load\ DOS!\
->>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
->>471 string Cannot\ load\ DOS\
->>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
->444 string KERNEL\ \ SYS
->>314 string BOOT\ error! \b, FREE-DOS Bootloader
->499 string KERNEL\ \ SYS
->>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
->449 string KERNEL\ \ SYS
->>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
->125 string Loading\ FreeDOS...\r
->>311 string BOOT\ error!\r \b, FREE-DOS bootloader
->>>441 ubyte&0xDF >0
->>>>441 string x \b %-.6s
->>>>>447 ubyte&0xDF >0
->>>>>>447 string x \b%-.1s
->>>>>>>448 ubyte&0xDF >0
->>>>>>>>448 string x \b%-.1s
->>>>449 ubyte&0xDF >0
->>>>>449 string x \b.%-.3s
->124 string FreeDOS\0
->>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
-# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->336 string Error!\
->>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
-# loader end
->0 string \0\0\0\0 \b, extended partition table
-# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
-# older drives may use E9 xx xx
->0 lelong&0x009000EB 0x009000EB
->0 lelong&0x000000E9 0x000000E9
->>1 ubyte >37 \b, code offset 0x%x
-# mtools-3.9.8/msdos.h
-# usual values are marked with comments to get only informations of strange FAT systems
-# valid sectorsize are from 32 to 2048
->>>11 uleshort <2049
->>>>11 uleshort >31
->>>>>3 string >\0 \b, OEM-ID "%8.8s"
->>>>>11 uleshort >512 \b, Bytes/sector %u
-#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
->>>>>11 uleshort <512 \b, Bytes/sector %u
->>>>>13 ubyte >1 \b, sectors/cluster %u
-#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
->>>>>14 uleshort >32 \b, reserved sectors %u
-#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
-#>>>>>14 uleshort >1 \b, reserved sectors %u
-#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
->>>>>14 uleshort <1 \b, reserved sectors %u
->>>>>16 ubyte >2 \b, FATs %u
-#>>>>>16 ubyte =2 \b, FATs %u (usual)
->>>>>16 ubyte =1 \b, FAT %u
->>>>>16 ubyte >0
->>>>>17 uleshort >0 \b, root entries %u
-#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
->>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
-#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
->>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
-#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
->>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
->>>>>22 uleshort >0 \b, sectors/FAT %u
-#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
->>>>>26 ubyte >2 \b, heads %u
-#>>>>>26 ubyte =2 \b, heads %u (usual floppy)
->>>>>26 ubyte =1 \b, heads %u
->>>>>28 ulelong >0 \b, hidden sectors %u
-#>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
->>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
-#>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
-# FAT<32 specific
-# NOT le FAT3=NOT 3TAF=0xCCABBEB9
->>>>>82 ulelong&0xCCABBEB9 >0
->>>>>>36 ubyte >0x80 \b, physical drive 0x%x
-#>>>>>>36 ubyte =0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
->>>>>>36 ubyte&0x7F >0 \b, physical drive 0x%x
-#>>>>>>36 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
->>>>>>37 ubyte >0 \b, reserved 0x%x
-#>>>>>>37 ubyte =0 \b, reserved 0x%x
->>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>38 ubyte =0x29
->>>>>>>39 ulelong x \b, serial number 0x%x
->>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
->>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
->>>>>>>43 string =NO\ NAME \b, unlabeled
->>>>>>54 string FAT \b, FAT
->>>>>>>54 string FAT12 \b (12 bit)
->>>>>>>54 string FAT16 \b (16 bit)
-# FAT32 specific
->>>>>82 string FAT32 \b, FAT (32 bit)
->>>>>>36 ulelong x \b, sectors/FAT %u
->>>>>>40 uleshort >0 \b, extension flags %u
-#>>>>>>40 uleshort =0 \b, extension flags %u
->>>>>>42 uleshort >0 \b, fsVersion %u
-#>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
->>>>>>44 ulelong >2 \b, rootdir cluster %u
-#>>>>>>44 ulelong =2 \b, rootdir cluster %u
-#>>>>>>44 ulelong =1 \b, rootdir cluster %u
->>>>>>48 uleshort >1 \b, infoSector %u
-#>>>>>>48 uleshort =1 \b, infoSector %u (usual)
->>>>>>48 uleshort <1 \b, infoSector %u
->>>>>>50 uleshort >6 \b, Backup boot sector %u
-#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
->>>>>>50 uleshort <6 \b, Backup boot sector %u
->>>>>>54 ulelong >0 \b, reserved1 0x%x
->>>>>>58 ulelong >0 \b, reserved2 0x%x
->>>>>>62 ulelong >0 \b, reserved3 0x%x
-# same structure as FAT1X
->>>>>>64 ubyte >0x80 \b, physical drive 0x%x
-#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
->>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
-#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
->>>>>>65 ubyte >0 \b, reserved 0x%x
->>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>66 ubyte =0x29
->>>>>>>67 ulelong x \b, serial number 0x%x
->>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
->>>>>>71 string >NO\ NAME \b, label: "%11.11s"
->>>>>>71 string =NO\ NAME \b, unlabeled
-### FATs end
->0x200 lelong 0x82564557 \b, BSD disklabel
-# FATX
-0 string FATX FATX filesystem data
-
-
-# Minix filesystems - Juan Cespedes <cespedes@debian.org>
-0x410 leshort 0x137f Minix filesystem
-0x410 beshort 0x137f Minix filesystem (big endian),
->0x402 beshort !0 \b, %d zones
->0x1e string minix \b, bootable
-0x410 leshort 0x138f Minix filesystem, 30 char names
-0x410 leshort 0x2468 Minix filesystem, version 2
-0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
-
-# romfs filesystems - Juan Cespedes <cespedes@debian.org>
-0 string -rom1fs-\0 romfs filesystem, version 1
->8 belong x %d bytes,
->16 string x named %s.
-
-# netboot image - Juan Cespedes <cespedes@debian.org>
-0 lelong 0x1b031336L Netboot image,
->4 lelong&0xFFFFFF00 0
->>4 lelong&0x100 0x000 mode 2
->>4 lelong&0x100 0x100 mode 3
->4 lelong&0xFFFFFF00 !0 unknown mode
-
-0x18b string OS/2 OS/2 Boot Manager
-
-9564 lelong 0x00011954 Unix Fast File system (little-endian),
->8404 string x last mounted on %s,
-#>9504 ledate x last checked at %s,
->8224 ledate x last written at %s,
->8401 byte x clean flag %d,
->8228 lelong x number of blocks %d,
->8232 lelong x number of data blocks %d,
->8236 lelong x number of cylinder groups %d,
->8240 lelong x block size %d,
->8244 lelong x fragment size %d,
->8252 lelong x minimum percentage of free blocks %d,
->8256 lelong x rotational delay %dms,
->8260 lelong x disk rotational speed %drps,
->8320 lelong 0 TIME optimization
->8320 lelong 1 SPACE optimization
-
-9564 belong 0x00011954 Unix Fast File system (big-endian),
->7168 long 0x4c41424c Apple UFS Volume
->>7186 string x named %s,
->>7176 belong x volume label version %d,
->>7180 bedate x created on %s,
->8404 string x last mounted on %s,
-#>9504 bedate x last checked at %s,
->8224 bedate x last written at %s,
->8401 byte x clean flag %d,
->8228 belong x number of blocks %d,
->8232 belong x number of data blocks %d,
->8236 belong x number of cylinder groups %d,
->8240 belong x block size %d,
->8244 belong x fragment size %d,
->8252 belong x minimum percentage of free blocks %d,
->8256 belong x rotational delay %dms,
->8260 belong x disk rotational speed %drps,
->8320 belong 0 TIME optimization
->8320 belong 1 SPACE optimization
-
-# ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
-0x438 leshort 0xEF53 Linux
->0x44c lelong x rev %d
->0x43e leshort x \b.%d
->0x45c lelong ^0x0000004 ext2 filesystem data
->>0x43a leshort ^0x0000001 (mounted or unclean)
->0x45c lelong &0x0000004 ext3 filesystem data
->>0x460 lelong &0x0000004 (needs journal recovery)
->0x43a leshort &0x0000002 (errors)
->0x460 lelong &0x0000001 (compressed)
-#>0x460 lelong &0x0000002 (filetype)
-#>0x464 lelong &0x0000001 (sparse_super)
->0x464 lelong &0x0000002 (large files)
-
-# SGI disk labels - Nathan Scott <nathans@debian.org>
-0 belong 0x0BE5A941 SGI disk label (volume header)
-
-# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
-0 belong 0x58465342 SGI XFS filesystem data
->0x4 belong x (blksz %d,
->0x68 beshort x inosz %d,
->0x64 beshort ^0x2004 v1 dirs)
->0x64 beshort &0x2004 v2 dirs)
-
-############################################################################
-# Minix-ST kernel floppy
-0x800 belong 0x46fc2700 Atari-ST Minix kernel image
->19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy
->19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy
-
-############################################################################
-# Hmmm, is this a better way of detecting _standard_ floppy images ?
-19 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-
-19 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-
-19 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k
-19 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k
-
-# Valid media descriptor bytes for MS-DOS:
-#
-# Byte Capacity Media Size and Type
-# -------------------------------------------------
-#
-# F0 2.88 MB 3.5-inch, 2-sided, 36-sector
-# F0 1.44 MB 3.5-inch, 2-sided, 18-sector
-# F9 720K 3.5-inch, 2-sided, 9-sector
-# F9 1.2 MB 5.25-inch, 2-sided, 15-sector
-# FD 360K 5.25-inch, 2-sided, 9-sector
-# FF 320K 5.25-inch, 2-sided, 8-sector
-# FC 180K 5.25-inch, 1-sided, 9-sector
-# FE 160K 5.25-inch, 1-sided, 8-sector
-# FE 250K 8-inch, 1-sided, single-density
-# FD 500K 8-inch, 2-sided, single-density
-# FE 1.2 MB 8-inch, 2-sided, double-density
-# F8 ----- Fixed disk
-#
-# FC xxxK Apricot 70x1x9 boot disk.
-#
-# Originally a bitmap:
-# xxxxxxx0 Not two sided
-# xxxxxxx1 Double sided
-# xxxxxx0x Not 8 SPT
-# xxxxxx1x 8 SPT
-# xxxxx0xx Not Removable drive
-# xxxxx1xx Removable drive
-# 11111xxx Must be one.
-#
-# But now it's rather random:
-# 111111xx Low density disk
-# 00 SS, Not 8 SPT
-# 01 DS, Not 8 SPT
-# 10 SS, 8 SPT
-# 11 DS, 8 SPT
-#
-# 11111001 Double density 3½ floppy disk, high density 5¼
-# 11110000 High density 3½ floppy disk
-# 11111000 Hard disk any format
-#
-
-# CDROM Filesystems
-32769 string CD001 ISO 9660 CD-ROM filesystem data
-# "application id" which appears to be used as a volume label
->32808 string >\0 '%s'
->34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
-37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
-32776 string CDROM High Sierra CD-ROM filesystem data
-
-# cramfs filesystem - russell@coker.com.au
-0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
->4 lelong x size %d
->8 lelong &1 version #2
->8 lelong &2 sorted_dirs
->8 lelong &4 hole_support
->32 lelong x CRC 0x%x,
->36 lelong x edition %d,
->40 lelong x %d blocks,
->44 lelong x %d files
-
-0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
->4 belong x size %d
->8 belong &1 version #2
->8 belong &2 sorted_dirs
->8 belong &4 hole_support
->32 belong x CRC 0x%x,
->36 belong x edition %d,
->40 belong x %d blocks,
->44 belong x %d files
-
-# reiserfs - russell@coker.com.au
-0x10034 string ReIsErFs ReiserFS V3.5
-0x10034 string ReIsEr2Fs ReiserFS V3.6
->0x1002c leshort x block size %d
->0x10032 leshort &2 (mounted or unclean)
->0x10000 lelong x num blocks %d
->0x10040 lelong 1 tea hash
->0x10040 lelong 2 yura hash
->0x10040 lelong 3 r5 hash
-
-# JFFS - russell@coker.com.au
-0 lelong 0x34383931 Linux Journalled Flash File system, little endian
-0 belong 0x34383931 Linux Journalled Flash File system, big endian
-
-# EST flat binary format (which isn't, but anyway)
-# From: Mark Brown <broonie@sirena.org.uk>
-0 string ESTFBINR EST flat binary
-
-# Aculab VoIP firmware
-# From: Mark Brown <broonie@sirena.org.uk>
-0 string VoIP\ Startup\ and Aculab VoIP firmware
->35 string x format %s
-
-# PPCBoot image file
-# From: Mark Brown <broonie@sirena.org.uk>
-0 belong 0x27051956 PPCBoot image
->4 string PPCBoot
->>12 string x version %s
-
-# JFFS2 file system
-0 leshort 0x1984 Linux old jffs2 filesystem data little endian
-0 lelong 0xe0011985 Linux jffs2 filesystem data little endian
-
-# Squashfs
-0 string sqsh Squashfs filesystem, big endian,
->28 beshort x version %d.
->30 beshort x \b%d,
->8 belong x %d bytes,
->4 belong x %d inodes,
->28 beshort <2
->>32 beshort x blocksize: %d bytes,
->28 beshort >1
->>51 belong x blocksize: %d bytes,
->39 bedate x created: %s
-0 string hsqs Squashfs filesystem, little endian,
->28 leshort x version %d.
->30 leshort x \b%d,
->8 lelong x %d bytes,
->4 lelong x %d inodes,
->28 leshort <2
->>32 leshort x blocksize: %d bytes,
->28 leshort >1
->>51 lelong x blocksize: %d bytes,
->39 ledate x created: %s
-
-# AFS Dump Magic
-# From: Ty Sarna <tsarna@sarna.org>
-0 string \x01\xb3\xa1\x13\x22 AFS Dump
->&0 belong x (v%d)
->>&0 byte 0x76
->>>&0 belong x Vol %d,
->>>>&0 byte 0x6e
->>>>>&0 string x %s
->>>>>>&1 byte 0x74
->>>>>>>&0 beshort 2
->>>>>>>>&4 bedate x on: %s
->>>>>>>>&0 bedate =0 full dump
->>>>>>>>&0 bedate !0 incremental since: %s
diff --git a/meta/recipes-devtools/file/file_5.18.bb b/meta/recipes-devtools/file/file_5.22.bb
index a7db410e92..9c6bb38d71 100644
--- a/meta/recipes-devtools/file/file_5.18.bb
+++ b/meta/recipes-devtools/file/file_5.22.bb
@@ -12,19 +12,14 @@ DEPENDS = "zlib file-native"
DEPENDS_class-native = "zlib-native"
SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
- file://dump \
- file://filesystems"
+ file://debian-742262.patch \
+ "
-SRC_URI[md5sum] = "d420d8f2990cd344673acfbf8d76ff5a"
-SRC_URI[sha256sum] = "6519fb706d583231c2419592ebecdbb21d33c62eaf7a1a0b24ddfcb80c08bf07"
+SRC_URI[md5sum] = "8fb13e5259fe447e02c4a37bc7225add"
+SRC_URI[sha256sum] = "c4e3a8e44cb888c5e4b476e738503e37fb9de3b25a38c143e214bfc12109fc0b"
inherit autotools
-do_configure_prepend() {
- cp ${WORKDIR}/dump ${S}/magic/Magdir/
- cp ${WORKDIR}/filesystems ${S}/magic/Magdir/
-}
-
FILES_${PN} += "${datadir}/misc/*.mgc"
do_install_append_class-native() {
@@ -32,5 +27,9 @@ do_install_append_class-native() {
--magic-file ${datadir}/misc/magic.mgc
}
+do_install_append_class-nativesdk() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 54e4ec3b25..a4a26e2787 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -5,6 +5,7 @@ HOMEPAGE = "http://sourceforge.net/projects/flex/"
SECTION = "devel"
LICENSE = "BSD"
+DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}"
SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
file://run-ptest \
@@ -28,7 +29,6 @@ do_install_append_class-nativesdk() {
}
RDEPENDS_${PN} += "m4"
-DEPENDS_${PN}-ptest += "bison-native flex-native"
do_compile_ptest() {
for i in `find ${S}/tests/ -type d |grep -Ev "concatenated-options|reject|table-opts" | awk -F/ '{print $NF}'`; \
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 9f2928b78a..06e6982d93 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -15,62 +15,66 @@ NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-c99-complex-ugly-hack.patch \
- file://0011-index_macro.patch \
- file://0012-libmudflap-susv3-legacy.patch \
- file://0013-libstdc-namespace.patch \
- file://0014-sh-pr24836.patch \
- file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
- file://0016-gcc-poison-system-directories.patch \
- file://0017-gcc-poison-dir-extend.patch \
- file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0019-64-bit-multilib-hack.patch \
- file://0020-optional-libstdc.patch \
- file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0022-COLLECT_GCC_OPTIONS.patch \
- file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0024-PR-target-32219.patch \
- file://0025-fortran-cross-compile-hack.patch \
- file://0026-libgcc-sjlj-check.patch \
- file://0027-cpp-honor-sysroot.patch \
- file://0028-MIPS64-Default-to-N64-ABI.patch \
- file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0030-gcc-Fix-argument-list-too-long-error.patch \
- file://0031-Disable-sdt.patch \
- file://0032-libtool.patch \
- file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0035-wcast-qual-PR-55383.patch \
- file://0037-gcc-4.8-PR56797.patch \
- file://0038-gcc-4.8-build-args.patch \
- file://0039-gcc-4.8-PR57717.patch \
- file://0040-fix-g++-sysroot.patch \
- file://0041-libtool-avoid-libdir.patch \
- file://0042-pr57748.patch \
- file://0043-cpp.patch \
- file://0044-gengtypes.patch \
- file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
- file://0046-libatomic-deptracking.patch \
- file://0047-repomembug.patch \
- file://0048-PR58854_fix_arm_apcs_epilogue.patch \
- file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0050-PR-target-58595.patch \
- "
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+
+SRC_URI = "\
+ ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://0002-uclibc-conf.patch \
+ file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://0004-uclibc-locale.patch \
+ file://0005-uclibc-locale-no__x.patch \
+ file://0006-uclibc-locale-wchar_fix.patch \
+ file://0007-uclibc-locale-update.patch \
+ file://0008-missing-execinfo_h.patch \
+ file://0009-c99-snprintf.patch \
+ file://0010-c99-complex-ugly-hack.patch \
+ file://0011-index_macro.patch \
+ file://0012-libmudflap-susv3-legacy.patch \
+ file://0013-libstdc-namespace.patch \
+ file://0014-sh-pr24836.patch \
+ file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
+ file://0016-gcc-poison-system-directories.patch \
+ file://0017-gcc-poison-dir-extend.patch \
+ file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0019-64-bit-multilib-hack.patch \
+ file://0020-optional-libstdc.patch \
+ file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0022-COLLECT_GCC_OPTIONS.patch \
+ file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0024-PR-target-32219.patch \
+ file://0025-fortran-cross-compile-hack.patch \
+ file://0026-libgcc-sjlj-check.patch \
+ file://0027-cpp-honor-sysroot.patch \
+ file://0028-MIPS64-Default-to-N64-ABI.patch \
+ file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0030-gcc-Fix-argument-list-too-long-error.patch \
+ file://0031-Disable-sdt.patch \
+ file://0032-libtool.patch \
+ file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0035-wcast-qual-PR-55383.patch \
+ file://0038-gcc-4.8-build-args.patch \
+ file://0039-gcc-4.8-PR57717.patch \
+ file://0040-fix-g++-sysroot.patch \
+ file://0041-libtool-avoid-libdir.patch \
+ file://0042-pr57748.patch \
+ file://0043-cpp.patch \
+ file://0044-gengtypes.patch \
+ file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
+ file://0046-libatomic-deptracking.patch \
+ file://0047-repomembug.patch \
+ file://0048-PR58854_fix_arm_apcs_epilogue.patch \
+ file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0050-PR-target-58595.patch \
+ file://0052-PR-rtl-optimization-61801.patch \
+ file://target-gcc-includedir.patch \
+"
SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
@@ -83,40 +87,47 @@ JAVA = ""
LTO = "--enable-lto"
-EXTRA_OECONF_BASE = " ${LTO} \
- --enable-libssp \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global "
-
-EXTRA_OECONF_INITIAL = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libssp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no"
-
-EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --disable-libssp"
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ --enable-cheaders=c_global \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+"
+
+EXTRA_OECONF_INTERMEDIATE = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --disable-libssp \
+"
EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch b/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch
deleted file mode 100644
index b5d7b864fd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From patchwork Fri Apr 19 09:34:49 2013
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [ARM] Fix PR56797
-Date: Thu, 18 Apr 2013 23:34:49 -0000
-From: Greta Yorsh <Greta.Yorsh@arm.com>
-X-Patchwork-Id: 237891
-Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com>
-To: "GCC Patches" <gcc-patches@gcc.gnu.org>
-Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>,
- "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com>
-
-Fix PR56797
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797
-
-The problem is that peephole optimizer thinks it can generate an ldm, but
-the pattern for ldm no longer matches, because after r188738 it requires
-that if one of the destination registers is SP then the base register must
-be SP, and it's not SP in the test case.
-
-The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because
-peephole doesn't trigger there (because there is a different epilogue
-sequence). It looks like a latent problem for other architecture or CPUs.
-
-This patch adds this condition to the peephole optimizer.
-
-No regression on qemu for arm-none-eabi and fixes the test reported in the
-PR. I couldn't minimize the test sufficiently to include it in the
-testsuite.
-
-Ok for trunk?
-
-Thanks,
-Greta
-
-gcc/
-
-2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com>
-
- PR target/56797
- * config/arm/arm.c (load_multiple_sequence): Require SP
- as base register for loads if SP is in the register list.
-
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index d00849c..60fef78 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order,
- || (i != nops - 1 && unsorted_regs[i] == base_reg))
- return 0;
-
-+ /* Don't allow SP to be loaded unless it is also the base
-+ register. It guarantees that SP is reset correctly when
-+ an LDM instruction is interruptted. Otherwise, we might
-+ end up with a corrupt stack. */
-+ if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM)
-+ return 0;
-+
- unsorted_offsets[i] = INTVAL (offset);
- if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]])
- order[0] = i;
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch b/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
deleted file mode 100644
index e4fff127b3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-These is a race over the installation of files into the include/ directory between:
-
-| (cd `${PWDCMD-pwd}`/include ; \| tar -cf - .; exit 0) | (cd /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include; tar xpf - )
-
-and
-
-| /bin/install -c -m 644 unwind.h /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include
-| /bin/install: cannot create regular file '/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include/unwind.h': File exists
-| make[1]: *** [install-unwind_h] Error 1
-
-which under the right circumstances leads to the above build failure. Since we don't
-need two copies of this file and we don't use install-no-fixincludes, we can disable
-the libgcc installation.
-
-RP 2014/04/10
-
-Upstream-Status: Pending [would need a rewrite into an acceptable patch form]
-
-Index: gcc-4.8.2/libgcc/Makefile.in
-===================================================================
---- gcc-4.8.2.orig/libgcc/Makefile.in 2013-02-04 19:06:20.000000000 +0000
-+++ gcc-4.8.2/libgcc/Makefile.in 2014-04-10 09:58:33.018748787 +0000
-@@ -1020,8 +1020,8 @@
- # This is however useful for "install-no-fixincludes" case, when only the gcc
- # internal headers are copied by gcc's install.
- install-unwind_h:
-- $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-- $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-+# $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-+# $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-
- all: install-unwind_h-forbuild
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch b/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch
new file mode 100644
index 0000000000..300b2042b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch
@@ -0,0 +1,36 @@
+From 8dfe30973ab03f0480f1e249f320e78f210dc230 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 17 Jul 2014 07:49:44 +0000
+Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
+ debug-insn.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@212740 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801]
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+
+---
+ gcc/sched-deps.c | 3 ++-
+
+diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
+index 07857f2..4ac2542 100644
+--- a/gcc/sched-deps.c
++++ b/gcc/sched-deps.c
+@@ -2744,7 +2744,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
+ Consider for instance a volatile asm that changes the fpu rounding
+ mode. An insn should not be moved across this even if it only uses
+ pseudo-regs because it might give an incorrectly rounded result. */
+- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ && !DEBUG_INSN_P (insn))
+ reg_pending_barrier = TRUE_BARRIER;
+
+ /* For all ASM_OPERANDS, we must traverse the vector of input operands.
+--
+1.8.5.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
new file mode 100644
index 0000000000..f48c66dcac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
@@ -0,0 +1,81 @@
+Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
++++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
+@@ -587,6 +587,7 @@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+ # Directory in which all plugin resources are installed
+@@ -2534,6 +2535,7 @@
+
+ PREPROCESSOR_DEFINES = \
+ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+ -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+--- a/gcc/cppdefault.c 2015-01-13 17:40:26.131012725 +0000
++++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
+@@ -59,6 +59,10 @@
+ /* This is the dir for gcc's private headers. */
+ { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++ /* This is the dir for gcc's private headers under the specified sysroot. */
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index f94ae17..d98b40b 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1390,4 +1390,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+
+ #endif /* GCC_INSN_FLAGS_H */
+
++/* Default prefixes to attach to command names. */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 9f0b781..174fca8 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1189,13 +1189,6 @@ static const char *gcc_libexec_prefix;
+
+ /* Default prefixes to attach to command names. */
+
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc
index cbf1355fcb..0f407b7d5d 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.9.inc
@@ -2,11 +2,11 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
-PV = "4.9.0"
+PV = "4.9.1"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "4.9.0"
+BINV = "4.9.1"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-4.9:"
@@ -15,61 +15,69 @@ NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-c99-complex-ugly-hack.patch \
- file://0011-index_macro.patch \
- file://0013-libstdc-namespace.patch \
- file://0014-sh-pr24836.patch \
- file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
- file://0016-gcc-poison-system-directories.patch \
- file://0017-gcc-poison-dir-extend.patch \
- file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0019-64-bit-multilib-hack.patch \
- file://0020-optional-libstdc.patch \
- file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0022-COLLECT_GCC_OPTIONS.patch \
- file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0024-PR-target-32219.patch \
- file://0025-fortran-cross-compile-hack.patch \
- file://0026-libgcc-sjlj-check.patch \
- file://0027-cpp-honor-sysroot.patch \
- file://0028-MIPS64-Default-to-N64-ABI.patch \
- file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0030-gcc-Fix-argument-list-too-long-error.patch \
- file://0031-Disable-sdt.patch \
- file://0032-libtool.patch \
- file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0037-gcc-4.8-PR56797.patch \
- file://0040-fix-g++-sysroot.patch \
- file://0041-libtool-avoid-libdir.patch \
- file://0043-cpp.patch \
- file://0044-gengtypes.patch \
- file://0046-libatomic-deptracking.patch \
- file://0047-repomembug.patch \
- file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
- file://0051-eabispe.patch \
- file://0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch \
- file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
- "
-SRC_URI[md5sum] = "9709b49ae0e904cbb0a6a1b62853b556"
-SRC_URI[sha256sum] = "b9b047a97bade9c1c89970bc8e211ff57b7b8998a1730a80a653d329f8ed1257"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+
+SRC_URI = "\
+ ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0002-uclibc-conf.patch \
+ file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://0004-uclibc-locale.patch \
+ file://0005-uclibc-locale-no__x.patch \
+ file://0006-uclibc-locale-wchar_fix.patch \
+ file://0007-uclibc-locale-update.patch \
+ file://0008-missing-execinfo_h.patch \
+ file://0009-c99-snprintf.patch \
+ file://0010-c99-complex-ugly-hack.patch \
+ file://0011-index_macro.patch \
+ file://0013-libstdc-namespace.patch \
+ file://0014-sh-pr24836.patch \
+ file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
+ file://0016-gcc-poison-system-directories.patch \
+ file://0017-gcc-poison-dir-extend.patch \
+ file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0019-64-bit-multilib-hack.patch \
+ file://0020-optional-libstdc.patch \
+ file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0022-COLLECT_GCC_OPTIONS.patch \
+ file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0024-PR-target-32219.patch \
+ file://0025-fortran-cross-compile-hack.patch \
+ file://0026-libgcc-sjlj-check.patch \
+ file://0027-cpp-honor-sysroot.patch \
+ file://0028-MIPS64-Default-to-N64-ABI.patch \
+ file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0030-gcc-Fix-argument-list-too-long-error.patch \
+ file://0031-Disable-sdt.patch \
+ file://0032-libtool.patch \
+ file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0040-fix-g++-sysroot.patch \
+ file://0041-libtool-avoid-libdir.patch \
+ file://0043-cpp.patch \
+ file://0044-gengtypes.patch \
+ file://0046-libatomic-deptracking.patch \
+ file://0047-repomembug.patch \
+ file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
+ file://0051-eabispe.patch \
+ file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
+ file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \
+ file://0055-PR-rtl-optimization-61801.patch \
+ file://0056-top-level-reorder_gcc-bug-61144.patch \
+ file://0057-aarch64-config.patch \
+ file://0058-gcc-r212171.patch \
+ file://0059-gcc-PR-rtl-optimization-63348.patch \
+ file://target-gcc-includedir.patch \
+"
+SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1"
+SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
@@ -80,40 +88,47 @@ JAVA = ""
LTO = "--enable-lto"
-EXTRA_OECONF_BASE = " ${LTO} \
- --enable-libssp \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global "
-
-EXTRA_OECONF_INITIAL = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libssp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no"
-
-EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --disable-libssp"
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ --enable-cheaders=c_global \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+"
+
+EXTRA_OECONF_INTERMEDIATE = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --disable-libssp \
+"
EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index 9e4435cf59..fddfe9e5e8 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,4 +1,4 @@
-From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001
+From f7d49ca445e60faa1b5256c6b4f96c1ee5c0e353 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:17:25 +0400
Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
@@ -11,6 +11,14 @@ gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
+
+While compiling gcc-crosssdk-initial-x86_64 on some host, there is
+occasionally failure that test the existance of default.h doesn't
+work, the reason is tm_include_list='** defaults.h' rather than
+tm_include_list='** ./defaults.h'
+
+So we add the test condition for this situation.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
gcc/Makefile.in | 2 +-
gcc/configure | 4 ++--
@@ -19,10 +27,10 @@ Upstream-Status: Pending
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 90a2bba..2320497 100644
+index d1ab22f..15fe4b6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+@@ -483,7 +483,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
@@ -32,10 +40,10 @@ index 90a2bba..2320497 100644
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
-index bdab45a..d587993 100755
+index 5399b2b..60a04bd 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -11539,8 +11539,8 @@ for f in $tm_file; do
+@@ -11631,8 +11631,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -47,10 +55,10 @@ index bdab45a..d587993 100755
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 5f5c909..5e5e84f 100644
+index f87c3b6..460e0d9 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1720,8 +1720,8 @@ for f in $tm_file; do
+@@ -1740,8 +1740,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -62,7 +70,7 @@ index 5f5c909..5e5e84f 100644
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 29fdfc7..e048dce 100644
+index c7146ed..b153f45 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
@@ -70,11 +78,11 @@ index 29fdfc7..e048dce 100644
echo '#ifdef IN_GCC' >> ${output}T
for file in "$@"; do
- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h"; then
++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
postpone_defaults_h="yes"
else
echo "# include \"$file\"" >> ${output}T
-@@ -103,7 +103,7 @@ esac
+@@ -106,7 +106,7 @@ esac
# If we postponed including defaults.h, add the #include now.
if test x"$postpone_defaults_h" = x"yes"; then
@@ -84,5 +92,5 @@ index 29fdfc7..e048dce 100644
# Add multiple inclusion protection guard, part two.
--
-1.7.10.4
+1.9.1
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch b/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch
deleted file mode 100644
index b5d7b864fd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From patchwork Fri Apr 19 09:34:49 2013
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [ARM] Fix PR56797
-Date: Thu, 18 Apr 2013 23:34:49 -0000
-From: Greta Yorsh <Greta.Yorsh@arm.com>
-X-Patchwork-Id: 237891
-Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com>
-To: "GCC Patches" <gcc-patches@gcc.gnu.org>
-Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>,
- "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com>
-
-Fix PR56797
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797
-
-The problem is that peephole optimizer thinks it can generate an ldm, but
-the pattern for ldm no longer matches, because after r188738 it requires
-that if one of the destination registers is SP then the base register must
-be SP, and it's not SP in the test case.
-
-The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because
-peephole doesn't trigger there (because there is a different epilogue
-sequence). It looks like a latent problem for other architecture or CPUs.
-
-This patch adds this condition to the peephole optimizer.
-
-No regression on qemu for arm-none-eabi and fixes the test reported in the
-PR. I couldn't minimize the test sufficiently to include it in the
-testsuite.
-
-Ok for trunk?
-
-Thanks,
-Greta
-
-gcc/
-
-2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com>
-
- PR target/56797
- * config/arm/arm.c (load_multiple_sequence): Require SP
- as base register for loads if SP is in the register list.
-
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index d00849c..60fef78 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order,
- || (i != nops - 1 && unsorted_regs[i] == base_reg))
- return 0;
-
-+ /* Don't allow SP to be loaded unless it is also the base
-+ register. It guarantees that SP is reset correctly when
-+ an LDM instruction is interruptted. Otherwise, we might
-+ end up with a corrupt stack. */
-+ if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM)
-+ return 0;
-+
- unsorted_offsets[i] = INTVAL (offset);
- if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]])
- order[0] = i;
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch b/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch
deleted file mode 100644
index b4be18e212..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From e44a6d438db4848c2a555be773568a3cf7994206 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
-Date: Mon, 26 May 2014 12:11:13 +0300
-Subject: [PATCH] Fix E500 with SPE errors with the _Decimal64 type
-
-[gcc]
-2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-
- PR target/60735
- * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64 case):
- If mode is DDmode and TARGET_E500_DOUBLE allow move.
-
- * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print some
- more debug information for E500 if -mdebug=reg.
-
-[gcc/testsuite]
-2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-
- PR target/60735
- * gcc.target/powerpc/pr60735.c: New test. Insure _Decimal64 does
- not cause errors if -mspe.
-
-Upstream status: Accepted
-
-This solves upstream bug 60735
-(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735).
-
-Patch taken from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=209664
----
- gcc/config/rs6000/rs6000.c | 18 ++++++++++++++++++
- gcc/config/rs6000/rs6000.md | 3 ++-
- gcc/testsuite/gcc.target/powerpc/pr60735.c | 11 +++++++++++
- 3 files changed, 31 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/powerpc/pr60735.c
-
-diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
-index 494efc5..6dcf440 100644
---- a/gcc/config/rs6000/rs6000.c
-+++ b/gcc/config/rs6000/rs6000.c
-@@ -2283,6 +2283,24 @@ rs6000_debug_reg_global (void)
- if (rs6000_float_gprs)
- fprintf (stderr, DEBUG_FMT_S, "float_gprs", "true");
-
-+ fprintf (stderr, DEBUG_FMT_S, "fprs",
-+ (TARGET_FPRS ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "single_float",
-+ (TARGET_SINGLE_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "double_float",
-+ (TARGET_DOUBLE_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "soft_float",
-+ (TARGET_SOFT_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "e500_single",
-+ (TARGET_E500_SINGLE ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "e500_double",
-+ (TARGET_E500_DOUBLE ? "true" : "false"));
-+
- if (TARGET_LINK_STACK)
- fprintf (stderr, DEBUG_FMT_S, "link_stack", "true");
-
-diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
-index 64c9e7c..9cefe15 100644
---- a/gcc/config/rs6000/rs6000.md
-+++ b/gcc/config/rs6000/rs6000.md
-@@ -9395,7 +9395,8 @@
- (match_operand:FMOVE64 1 "input_operand" "r,Y,r,G,H,F"))]
- "! TARGET_POWERPC64
- && ((TARGET_FPRS && TARGET_SINGLE_FLOAT)
-- || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
-+ || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE
-+ || (<MODE>mode == DDmode && TARGET_E500_DOUBLE))
- && (gpc_reg_operand (operands[0], <MODE>mode)
- || gpc_reg_operand (operands[1], <MODE>mode))"
- "#"
-diff --git a/gcc/testsuite/gcc.target/powerpc/pr60735.c b/gcc/testsuite/gcc.target/powerpc/pr60735.c
-new file mode 100644
-index 0000000..9bac30b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/powerpc/pr60735.c
-@@ -0,0 +1,11 @@
-+/* { dg-do compile } */
-+/* { dg-options "-mcpu=8548 -mspe -mabi=spe -O2" } */
-+/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
-+
-+/* In PR60735, the type _Decimal64 generated an insn not found message. */
-+
-+void
-+pr60735 (_Decimal64 *p, _Decimal64 *q)
-+{
-+ *p = *q;
-+}
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
new file mode 100644
index 0000000000..4c98ca273a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
@@ -0,0 +1,61 @@
+gcc/Makefile.in: fix parallel building failure
+
+The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
+config.h which was a generated file. But no explicity rule
+to clarify the dependency. There was potential building
+failure while parallel make.
+
+For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
+source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
+'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
+objects.
+
+For errors.o, it is part of gengtype, and the gengtype generator program
+is special: Two versions are built. One is for the build machine, and one
+is for the host. We refered what gengtype-parse.o did (which also is part
+of gengtype).
+
+[GCC #61899]
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
+
+Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 6475cba..56e50bb 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
+ opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
+ hash-table.o file-find.o
+
++# Objects compiled from one C source file gcc-ar.c
++OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
++
+ # This lists all host objects for the front ends.
+ ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
+
+ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
+ $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
+ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
+- lto-wrapper.o
++ lto-wrapper.o $(OBJS-gcc-ar)
+
+ # This lists all host object files, whether they are included in this
+ # compilation or not.
+@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
+ CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
+ build/gengtype-parse.o: $(BCONFIG_H)
+
++errors.o : $(CONFIG_H)
++
+ gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
+ gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
+ $(XREGEX_H)
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch b/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
new file mode 100644
index 0000000000..b27abdef38
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
@@ -0,0 +1,36 @@
+From 556537c4ad0df4cbebb74197bb2bdea75cf5dd35 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 17 Jul 2014 07:48:49 +0000
+Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
+ debug-insn.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212739 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801]
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+
+---
+ gcc/sched-deps.c | 3 ++-
+
+diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
+index efc4223..df29bd3 100644
+--- a/gcc/sched-deps.c
++++ b/gcc/sched-deps.c
+@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
+ Consider for instance a volatile asm that changes the fpu rounding
+ mode. An insn should not be moved across this even if it only uses
+ pseudo-regs because it might give an incorrectly rounded result. */
+- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ && !DEBUG_INSN_P (insn))
+ reg_pending_barrier = TRUE_BARRIER;
+
+ /* For all ASM_OPERANDS, we must traverse the vector of input operands.
+--
+1.8.5.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
new file mode 100644
index 0000000000..f44893251c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
@@ -0,0 +1,31 @@
+
+Upstream-Status: Backport
+
+Originally-submitted-by: Peter Urbanec <openembedded-devel@urbanec.net>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+--- /dev/null
++++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
+@@ -0,0 +1,21 @@
++--- a/gcc/varpool.c 2014/10/05 02:50:01 215895
+++++ b/gcc/varpool.c 2014/10/05 04:52:19 215896
++@@ -329,8 +329,16 @@
++
++ /* Variables declared 'const' without an initializer
++ have zero as the initializer if they may not be
++- overridden at link or run time. */
++- if (!DECL_INITIAL (real_decl)
+++ overridden at link or run time.
+++
+++ It is actually requirement for C++ compiler to optimize const variables
+++ consistently. As a GNU extension, do not enfore this rule for user defined
+++ weak variables, so we support interposition on:
+++ static const int dummy = 0;
+++ extern const int foo __attribute__((__weak__, __alias__("dummy")));
+++ */
+++ if ((!DECL_INITIAL (real_decl)
+++ || (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
++ && (DECL_EXTERNAL (decl) || decl_replaceable_p (decl)))
++ return error_mark_node;
++
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
new file mode 100644
index 0000000000..f29559698a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
@@ -0,0 +1,32 @@
+Disable the MULTILIB_OSDIRNAMES and other multilib options.
+
+Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
+systems where the libdir is NOT set to /lib64. This is allowed by the ABI, as
+long as the dynamic loader is present in /lib.
+
+We simply want to use the default rules in gcc to find and configure the
+normal libdir.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+===================================================================
+--- gcc-4.9.1.orig/gcc/config/aarch64/t-aarch64-linux
++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+@@ -21,11 +21,11 @@
+ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ # Disable the multilib for linux-gnu targets for the time being; focus
+ # on the baremetal targets.
+-MULTILIB_OPTIONS =
+-MULTILIB_DIRNAMES =
++#MULTILIB_OPTIONS =
++#MULTILIB_DIRNAMES =
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
new file mode 100644
index 0000000000..4b312d4fa9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
@@ -0,0 +1,113 @@
+From ca03cf1b133d66eb978c68f6dbc345e9aabcba88 Mon Sep 17 00:00:00 2001
+From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 30 Jun 2014 19:30:52 +0000
+Subject: [PATCH] r212171
+
+* except.c (emit_note_eh_region_end): New helper
+ function. (convert_to_eh_region_ranges): Use
+ emit_note_eh_region_end to emit EH_REGION_END note.
+ * jump.c (cleanup_barriers): Do not split a call and its
+ corresponding CALL_ARG_LOCATION note.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212171 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212171]
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+---
+ gcc/except.c | 23 ++++++++++++++++++-----
+ gcc/jump.c | 19 +++++++++++++++----
+ 2 files changed, 33 insertions(+), 9 deletions(-)
+
+diff --git a/gcc/except.c b/gcc/except.c
+index dc5c1d2..7ac114f 100644
+--- a/gcc/except.c
++++ b/gcc/except.c
+@@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section)
+ return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1;
+ }
+
++static rtx
++emit_note_eh_region_end (rtx insn)
++{
++ rtx next = NEXT_INSN (insn);
++
++ /* Make sure we do not split a call and its corresponding
++ CALL_ARG_LOCATION note. */
++ if (next && NOTE_P (next)
++ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
++ insn = next;
++
++ return emit_note_after (NOTE_INSN_EH_REGION_END, insn);
++}
++
+ /* Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes.
+ The new note numbers will not refer to region numbers, but
+ instead to call site entries. */
+@@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void)
+ note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
+ first_no_action_insn_before_switch);
+ NOTE_EH_HANDLER (note) = call_site;
+- note = emit_note_after (NOTE_INSN_EH_REGION_END,
+- last_no_action_insn_before_switch);
++ note
++ = emit_note_eh_region_end (last_no_action_insn_before_switch);
+ NOTE_EH_HANDLER (note) = call_site;
+ gcc_assert (last_action != -3
+ || (last_action_insn
+@@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void)
+ first_no_action_insn = NULL_RTX;
+ }
+
+- note = emit_note_after (NOTE_INSN_EH_REGION_END,
+- last_action_insn);
++ note = emit_note_eh_region_end (last_action_insn);
+ NOTE_EH_HANDLER (note) = call_site;
+ }
+
+@@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void)
+
+ if (last_action >= -1 && ! first_no_action_insn)
+ {
+- note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn);
++ note = emit_note_eh_region_end (last_action_insn);
+ NOTE_EH_HANDLER (note) = call_site;
+ }
+
+diff --git a/gcc/jump.c b/gcc/jump.c
+index 9418f65..a5e5f52 100644
+--- a/gcc/jump.c
++++ b/gcc/jump.c
+@@ -121,15 +121,26 @@ rebuild_jump_labels_chain (rtx chain)
+ static unsigned int
+ cleanup_barriers (void)
+ {
+- rtx insn, next, prev;
+- for (insn = get_insns (); insn; insn = next)
++ rtx insn;
++ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+- next = NEXT_INSN (insn);
+ if (BARRIER_P (insn))
+ {
+- prev = prev_nonnote_insn (insn);
++ rtx prev = prev_nonnote_insn (insn);
+ if (!prev)
+ continue;
++
++ if (CALL_P (prev))
++ {
++ /* Make sure we do not split a call and its corresponding
++ CALL_ARG_LOCATION note. */
++ rtx next = NEXT_INSN (prev);
++
++ if (NOTE_P (next)
++ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
++ prev = next;
++ }
++
+ if (BARRIER_P (prev))
+ delete_insn (insn);
+ else if (prev != PREV_INSN (insn))
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
new file mode 100644
index 0000000000..6d24aa4572
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
@@ -0,0 +1,59 @@
+From 6eae3e637fcc22d21b51d44d61e3a9cb4825e776 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 30 Oct 2014 20:37:14 -0700
+Subject: [PATCH]PR rtl-optimization/63348
+
+PR rtl-optimization/63348
+* emit-rtl.c (try_split): Do not emit extra barrier.
+
+Note: this patch is to fix the side effect introduced by r212171 which was reported at:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63348
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215613 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215613]
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ gcc/emit-rtl.c | 11 -----------
+ 1 files changed, 0 insertions(+), 11 deletions(-)
+
+diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
+index 4736f8d..ae69dbd 100644
+--- a/gcc/emit-rtl.c
++++ b/gcc/emit-rtl.c
+@@ -3422,7 +3422,6 @@ try_split (rtx pat, rtx trial, int last)
+ {
+ rtx before = PREV_INSN (trial);
+ rtx after = NEXT_INSN (trial);
+- int has_barrier = 0;
+ rtx note, seq, tem;
+ int probability;
+ rtx insn_last, insn;
+@@ -3441,14 +3440,6 @@ try_split (rtx pat, rtx trial, int last)
+
+ split_branch_probability = -1;
+
+- /* If we are splitting a JUMP_INSN, it might be followed by a BARRIER.
+- We may need to handle this specially. */
+- if (after && BARRIER_P (after))
+- {
+- has_barrier = 1;
+- after = NEXT_INSN (after);
+- }
+-
+ if (!seq)
+ return trial;
+
+@@ -3594,8 +3585,6 @@ try_split (rtx pat, rtx trial, int last)
+ tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
+
+ delete_insn (trial);
+- if (has_barrier)
+- emit_barrier_after (tem);
+
+ /* Recursively call try_split for each new insn created; by the
+ time control returns here that insn will be fully split, so
+--
+1.7.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch
new file mode 100644
index 0000000000..f48c66dcac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch
@@ -0,0 +1,81 @@
+Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
++++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
+@@ -587,6 +587,7 @@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+ # Directory in which all plugin resources are installed
+@@ -2534,6 +2535,7 @@
+
+ PREPROCESSOR_DEFINES = \
+ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+ -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+--- a/gcc/cppdefault.c 2015-01-13 17:40:26.131012725 +0000
++++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
+@@ -59,6 +59,10 @@
+ /* This is the dir for gcc's private headers. */
+ { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++ /* This is the dir for gcc's private headers under the specified sysroot. */
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index f94ae17..d98b40b 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1390,4 +1390,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+
+ #endif /* GCC_INSN_FLAGS_H */
+
++/* Default prefixes to attach to command names. */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 9f0b781..174fca8 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1189,13 +1189,6 @@ static const char *gcc_libexec_prefix;
+
+ /* Default prefixes to attach to command names. */
+
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 66a18d9749..04c701a974 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -9,7 +9,7 @@ inherit autotools gettext texinfo
BPN = "gcc"
-def get_gcc_fpu_setting(bb, d):
+def get_gcc_float_setting(bb, d):
if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm":
return "--with-float=hard"
if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
@@ -18,13 +18,18 @@ def get_gcc_fpu_setting(bb, d):
return "--enable-e500_double"
return ""
-get_gcc_fpu_setting[vardepvalue] = "${@get_gcc_fpu_setting(bb, d)}"
+get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}"
def get_gcc_mips_plt_setting(bb, d):
if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
return "--with-mips-plt"
return ""
+def get_long_double_setting(bb, d):
+ if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'glibc' ]:
+ return "--with-long-double-128"
+ return ""
+
def get_gcc_multiarch_setting(bb, d):
target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
multiarch_options = {
@@ -74,7 +79,6 @@ ${GNU_MIRROR}/gcc http://mirrors.rcn.net/pub/sourceware/gcc/releases/ \n \
${GNU_MIRROR}/gcc http://gcc.get-software.com/releases/ \n \
${GNU_MIRROR}/gcc http://gcc.get-software.com/releases/ \n \
"
-
#
# Set some default values
#
@@ -84,48 +88,12 @@ BINV = "${PV}"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-# SS means Shared Stamps directory
-SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}-${PR}"
-do_fetch[stamp-base] = "${SS}"
-do_unpack[stamp-base] = "${SS}"
-do_patch[stamp-base] = "${SS}"
-do_preconfigure[stamp-base] = "${SS}"
-SSCLEAN = "${TMPDIR}/stamps/work-shared/gcc-[0-9]*-*"
-do_fetch[stamp-base-clean] = "${SSCLEAN}"
-do_unpack[stamp-base-clean] = "${SSCLEAN}"
-do_unpack[umask] = "022"
-do_patch[stamp-base-clean] = "${SSCLEAN}"
-do_preconfigure[stamp-base-clean] = "${SSCLEAN}"
-
-# SW means Shared Work directory
-SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
-SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
-WORKDIR_task-unpack = "${SW}"
-WORKDIR_task-patch = "${SW}"
-WORKDIR_task-preconfigure = "${SW}"
-
target_includedir ?= "${includedir}"
target_libdir ?= "${libdir}"
target_base_libdir ?= "${base_libdir}"
target_prefix ?= "${prefix}"
-CLEANFUNCS += "workshared_clean"
-# The do_clean should be exclusive since share ${S}
-do_clean[lockfiles] = "${SW}.clean.lock"
-
-python workshared_clean () {
- """clear the source directory"""
- dir = d.expand("${SW}")
- bb.note("Removing " + dir)
- oe.path.remove(dir)
-
- """clear the the stamps in work-shared"""
- dir = "%s.*" % bb.data.expand(d.getVarFlag('do_fetch', 'stamp-base', True), d)
- bb.note("Removing " + dir)
- oe.path.remove(dir)
-}
-
-# We need to ensure that for the shared work directory, the do_patch singatures match
+# We need to ensure that for the shared work directory, the do_patch signatures match
# The real WORKDIR location isn't a dependency for the shared workdir.
src_patches[vardepsexclude] = "WORKDIR"
should_apply[vardepsexclude] += "PN"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 75fb379956..c30242d41a 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -1,4 +1,5 @@
require gcc-multilib-config.inc
+require gcc-shared-source.inc
#
# Build the list of lanaguages to build.
#
@@ -29,24 +30,27 @@ EXTRA_OECONF_INTERMEDIATE ?= ""
GCCMULTILIB ?= "--disable-multilib"
GCCTHREADS ?= "posix"
-EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
- --with-gnu-ld \
- --enable-shared \
- --enable-languages=${LANGUAGES} \
- --enable-threads=${GCCTHREADS} \
- ${GCCMULTILIB} \
- --enable-c99 \
- --enable-long-long \
- --enable-symvers=gnu \
- --enable-libstdcxx-pch \
- --program-prefix=${TARGET_PREFIX} \
- --without-local-prefix \
- ${OPTSPACE} \
- ${EXTRA_OECONF_BASE} \
- ${EXTRA_OECONF_FPU} \
- ${EXTRA_OECONF_PATHS} \
- ${@get_gcc_mips_plt_setting(bb, d)} \
- ${@get_gcc_multiarch_setting(bb, d)}"
+EXTRA_OECONF = "\
+ ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-languages=${LANGUAGES} \
+ --enable-threads=${GCCTHREADS} \
+ ${GCCMULTILIB} \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --enable-libstdcxx-pch \
+ --program-prefix=${TARGET_PREFIX} \
+ --without-local-prefix \
+ ${OPTSPACE} \
+ ${EXTRA_OECONF_BASE} \
+ ${EXTRA_OECONF_GCC_FLOAT} \
+ ${EXTRA_OECONF_PATHS} \
+ ${@get_gcc_mips_plt_setting(bb, d)} \
+ ${@get_long_double_setting(bb, d)} \
+ ${@get_gcc_multiarch_setting(bb, d)} \
+"
export ac_cv_path_SED = 'sed'
export gcc_cv_collect2_libs = 'none required'
@@ -55,19 +59,24 @@ export gcc_cv_collect2_libs = 'none required'
# hence being missed by the insane do_configure check).
# Build uclibc compilers without cxa_atexit support
-EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
-EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit"
-
-EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
-EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
-
-EXTRA_OECONF_FPU ??= ""
+EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
+EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit"
+
+EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+
+# ARMv6+ adds atomic instructions that affect the ABI in libraries built
+# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a
+# compatible architecture. armv6 and armv7a cover the minimum tune
+# features used in OE.
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
+
+EXTRA_OECONF_GCC_FLOAT ??= ""
CPPFLAGS = ""
-# powerpc needs this to comply with the ABI
-EXTRA_OECONF_append_powerpc = " --with-long-double-128"
-EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
-
SYSTEMHEADERS = "${target_includedir}"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
@@ -87,16 +96,6 @@ _EOF
mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
}
-python do_preconfigure () {
- import subprocess
- cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- # See 0044-gengtypes.patch, we need to regenerate this file
- bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
-}
-addtask do_preconfigure after do_patch before do_configure
-do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
-
do_configure () {
# Setup these vars for cross building only
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 63adae8386..0f79533771 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -9,15 +9,17 @@ GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \
- --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
- --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+ --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
# We have to point gcc at a sysroot but we don't need to rebuild if this changes
# e.g. we switch between different machines with different tunes.
EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH"
TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
-get_gcc_fpu_setting[vardepvalue] = ""
+get_gcc_float_setting[vardepvalue] = ""
#
# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
@@ -53,7 +55,6 @@ do_configure () {
export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
@@ -82,14 +83,14 @@ FILES_${PN} = "\
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
${prefix}/${TARGET_SYS}/usr/include/* \
- "
+"
INSANE_SKIP_${PN} += "dev-so"
FILES_${PN}-doc = "\
${infodir} \
${mandir} \
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
- "
+"
EXEEXT = ""
@@ -156,11 +157,12 @@ SYSTEMHEADERS = "/usr/include"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
-EXTRA_OECONF += " --enable-poison-system-directories"
+EXTRA_OECONF += "--enable-poison-system-directories"
-EXTRA_OECONF += "--disable-libunwind-exceptions \
- --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
- --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
+EXTRA_OECONF += "\
+ --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
+ --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix} \
+"
# gcc 4.7 needs -isystem
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 5a6da8bbd2..7197447080 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -11,22 +11,24 @@ CROSS_TARGET_SYS_DIR_append = ".${PN}"
# This is intended to be a -very- basic config
# sysroot is needed in case we use libc-initial
-EXTRA_OECONF = "--with-newlib \
- --without-headers \
- --disable-shared \
- --disable-threads \
- --disable-multilib \
- --disable-__cxa_atexit \
- --enable-languages=c \
- ${OPTSPACE} \
- --program-prefix=${TARGET_PREFIX} \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
- ${EXTRA_OECONF_INITIAL} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
- ${EXTRA_OECONF_FPU}"
+EXTRA_OECONF = "\
+ --with-newlib \
+ --without-headers \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ ${OPTSPACE} \
+ --program-prefix=${TARGET_PREFIX} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
+ ${EXTRA_OECONF_INITIAL} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
+ ${EXTRA_OECONF_GCC_FLOAT} \
+"
-EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} "
+EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}"
GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
@@ -57,7 +59,9 @@ do_install () {
# found. These need to be relative paths so they work in different locations.
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
install -d $dest
- for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+ useld=${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '.bfd', '', d)}
+ ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld${useld} ${dest}ld
+ for t in ar as nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
done
# fixed limits.h infact includes the so called real limits.h
@@ -66,7 +70,7 @@ do_install () {
# includes real limits.h but this real limits.h is not staged yet
# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
# to get rid references to real limits.h
- cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
+ cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/limits.h
# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
case ${PN} in
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 0bf29e34d3..97929501e8 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -13,24 +13,25 @@ PN = "gcc-cross-${TARGET_ARCH}"
require gcc-configure-common.inc
-EXTRA_OECONF += " --enable-poison-system-directories"
-EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
-
-EXTRA_OECONF += "--disable-libunwind-exceptions \
- --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
- --with-system-zlib "
-
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF += "--enable-poison-system-directories"
+EXTRA_OECONF_append_sh4 = " \
+ --with-multilib-list= \
+ --enable-incomplete-targets \
+"
+
+EXTRA_OECONF += "\
+ --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
+ --with-system-zlib \
+"
+
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
-do_configure_prepend () {
- sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure
-}
-
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index 81d664a1b3..61340979ba 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -14,6 +14,8 @@
# gcc/config/mips/linux64.h
# gcc/config/rs6000/linux64.h
+MULTILIB_OPTION_WHITELIST ??= "-m32 -m64 -mx32 -mabi=n32 -mabi=32 -mabi=64"
+
python gcc_multilib_setup() {
import re
import shutil
@@ -88,8 +90,10 @@ python gcc_multilib_setup() {
substs = [
(r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdir32) + r'\3'),
- (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$',
+ (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\"\S+\")$',
r'\1' + wrap_libdir(libdir64) + r'\3'),
+ (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$',
+ r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'),
(r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdirx32) + r'\3'),
(r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
@@ -100,7 +104,7 @@ python gcc_multilib_setup() {
r'\1' + wrap_libdir(libdir64) + r'\3'),
(r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdirn32) + r'\3'),
- (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\s*)(\S+)(\s*\".*\")$',
+ (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdir32) + r'\3'),
]
@@ -148,7 +152,7 @@ python gcc_multilib_setup() {
if mlprefix:
mlindex = 0
for ml in multilibs:
- if mlprefix.startswith(ml):
+ if mlprefix == ml + '-':
break
mlindex += 1
@@ -185,30 +189,19 @@ python gcc_multilib_setup() {
bb.error('Unknown libdir (%s) of the tune : %s' % (tune_baselib, tune))
# take out '-' mcpu='s and march='s from parameters
- options.append(re.sub(r'mcpu=[^ ]+ *', '',
- re.sub(r'march=[^ ]+ *', '',
- re.sub(r' +\-+', ' ',
- re.sub(r'^ *\-+', '', tune_parameters['ccargs'])))))
+ opts = []
+ whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST", True) or "").split()
+ for i in tune_parameters['ccargs'].split():
+ if i in whitelist:
+ opts.append(i)
+ options.append(" ".join(opts))
+
if tune_baselib == 'lib':
dirnames.append('32') # /lib => 32bit lib
else:
dirnames.append(tune_baselib.replace('lib', ''))
osdirnames.append('../' + tune_baselib)
- if len(options) > 1:
- for optstr in options:
- optsets.append(optstr.split())
-
- #get common options present in all the tune parameters
- common_opt_set = set.intersection(*map(set, optsets))
-
- #common options will be added at the end of the options string only once
- if (len(common_opt_set) > 0):
- rex = re.compile(''.join(['\\b(', '|'.join(common_opt_set), ')\\W']), re.I)
- options = [rex.sub("", optstr) for optstr in options]
- options = [optstr.strip() for optstr in options]
- options[len(options)-1] = ' '.join((options[len(options)-1], ' '.join(common_opt_set)))
-
write_config(builddir, target_config_files, options, dirnames, osdirnames)
write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
}
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 70f9e0eb52..09757e6ccc 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -2,12 +2,12 @@ require gcc-configure-common.inc
CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${includedir}/c++/ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=${includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
-EXTRA_OECONF += "--disable-libunwind-exceptions"
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
@@ -53,6 +53,9 @@ do_install () {
if [ -d ${D}${infodir} ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
fi
+ if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ fi
chown -R root:root ${D}
}
@@ -63,111 +66,129 @@ PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"
PACKAGES = "\
- ${PN}-dbg \
- libstdc++ \
- libstdc++-precompile-dev \
- libstdc++-dev \
- libstdc++-staticdev \
- libg2c \
- libg2c-dev \
- libssp \
- libssp-dev \
- libssp-staticdev \
- libgfortran \
- libgfortran-dev \
- libgfortran-staticdev \
- libmudflap \
- libmudflap-dev \
- libmudflap-staticdev \
- libquadmath \
- libquadmath-dev \
- libquadmath-staticdev \
- libgomp \
- libgomp-dev \
- libgomp-staticdev \
- libatomic \
- libatomic-dev \
- libatomic-staticdev \
+ ${PN}-dbg \
+ libstdc++ \
+ libstdc++-precompile-dev \
+ libstdc++-dev \
+ libstdc++-staticdev \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libssp-staticdev \
+ libmudflap \
+ libmudflap-dev \
+ libmudflap-staticdev \
+ libquadmath \
+ libquadmath-dev \
+ libquadmath-staticdev \
+ libgomp \
+ libgomp-dev \
+ libgomp-staticdev \
+ libatomic \
+ libatomic-dev \
+ libatomic-staticdev \
"
+
+# Most libraries are licensed with the exception, but
+# one library is really GPLv3.
+#
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception & GPLv3"
+LICENSE_libstdc++ = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-precompile-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-staticdev = "GPL-3.0-with-GCC-exception"
+
+LICENSE_libgomp = "GPLv3"
+LICENSE_libgomp-dev = "GPLv3"
+LICENSE_libgomp-staticdev = "GPLv3"
+
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
# include python debugging scripts
FILES_${PN}-dbg += "\
- ${libdir}/libstdc++.so.*-gdb.py \
- ${datadir}/gcc-${BINV}/python/libstdcxx"
+ ${libdir}/libstdc++.so.*-gdb.py \
+ ${datadir}/gcc-${BINV}/python/libstdcxx \
+"
FILES_libg2c = "${target_libdir}/libg2c.so.*"
FILES_libg2c-dev = "\
- ${libdir}/libg2c.so \
- ${libdir}/libg2c.a \
- ${libdir}/libfrtbegin.a"
+ ${libdir}/libg2c.so \
+ ${libdir}/libg2c.a \
+ ${libdir}/libfrtbegin.a \
+"
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
FILES_libstdc++-dev = "\
- ${includedir}/c++/ \
- ${libdir}/libstdc++.so \
- ${libdir}/libstdc++.la \
- ${libdir}/libsupc++.la"
+ ${includedir}/c++/ \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libsupc++.la \
+"
FILES_libstdc++-staticdev = "\
- ${libdir}/libstdc++.a \
- ${libdir}/libsupc++.a"
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.a \
+"
FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
FILES_libssp = "${libdir}/libssp.so.*"
-FILES_libssp-dev = " \
- ${libdir}/libssp*.so \
- ${libdir}/libssp*_nonshared.a \
- ${libdir}/libssp*.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
-FILES_libssp-staticdev = " \
- ${libdir}/libssp*.a"
-
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = " \
- ${libdir}/libgfortran*.so \
- ${libdir}/libgfortran.spec \
- ${libdir}/libgfortran.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single*"
-FILES_libgfortran-staticdev = " \
- ${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
+FILES_libssp-dev = "\
+ ${libdir}/libssp*.so \
+ ${libdir}/libssp*_nonshared.a \
+ ${libdir}/libssp*.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
+"
+FILES_libssp-staticdev = "${libdir}/libssp*.a"
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
FILES_libquadmath-dev = "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
- ${libdir}/libquadmath*.so \
- ${libdir}/libquadmath.la"
-FILES_libquadmath-staticdev = "\
- ${libdir}/libquadmath.a"
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
+ ${libdir}/libquadmath*.so \
+ ${libdir}/libquadmath.la \
+"
+FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
FILES_libmudflap-dev = "\
- ${libdir}/libmudflap*.so \
- ${libdir}/libmudflap.la"
-FILES_libmudflap-staticdev = "\
- ${libdir}/libmudflap.a"
+ ${libdir}/libmudflap*.so \
+ ${libdir}/libmudflap.la \
+"
+FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
FILES_libgomp-dev = "\
- ${libdir}/libgomp*${SOLIBSDEV} \
- ${libdir}/libgomp*.la \
- ${libdir}/libgomp.spec \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
- "
-FILES_libgomp-staticdev = "\
- ${libdir}/libgomp*.a \
- "
+ ${libdir}/libgomp*${SOLIBSDEV} \
+ ${libdir}/libgomp*.la \
+ ${libdir}/libgomp.spec \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
+"
+FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
FILES_libatomic = "${libdir}/libatomic.so.*"
-FILES_libatomic-dev = " \
- ${libdir}/libatomic.so \
- ${libdir}/libatomic.la"
-FILES_libatomic-staticdev = " \
- ${libdir}/libatomic.a"
+FILES_libatomic-dev = "\
+ ${libdir}/libatomic.so \
+ ${libdir}/libatomic.la \
+"
+FILES_libatomic-staticdev = "${libdir}/libatomic.a"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
new file mode 100644
index 0000000000..35c9247cc1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -0,0 +1,117 @@
+require gcc-configure-common.inc
+
+LICENSE = "NCSA | MIT"
+
+LIC_FILES_CHKSUM = "\
+ file://libsanitizer/LICENSE.TXT;md5=0249c37748936faf5b1efd5789587909 \
+"
+
+EXTRA_OECONF_PATHS = "\
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
+
+do_configure () {
+ mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
+
+ echo "Configuring libsanitizer"
+ rm -rf ${B}/$target/libsanitizer/
+ mkdir -p ${B}/$target/libsanitizer/
+ # This is kind of gross, but it's an easy way to make configure happy
+ # without hacking it up to use the system stdc++ instead of the one it
+ # expects to be newly built.
+ rm -rf ${B}/$target/libstdc++-v3/
+ mkdir -p ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.la ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.so ${B}/$target/libstdc++-v3/src/
+ cd ${B}/$target/libsanitizer/
+ chmod a+x ${S}/libsanitizer/configure
+ ${S}/libsanitizer/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool
+}
+
+do_compile () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/
+}
+
+do_install () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install
+ if [ -d ${D}${infodir} ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ fi
+ chown -R root:root ${D}
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+ALLOW_EMPTY_${PN} = "1"
+DEPENDS = "gcc-runtime"
+
+BBCLASSEXTEND = "nativesdk"
+
+PACKAGES = "${PN}"
+PACKAGES += "libasan libubsan liblsan libtsan"
+PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
+PACKAGES += "libasan-dbg libubsan-dbg liblsan-dbg libtsan-dbg"
+PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
+
+RDEPENDS_libasan += "libstdc++"
+RDEPENDS_libubsan += "libstdc++"
+RDEPENDS_liblsan += "libstdc++"
+RDEPENDS_libtsan += "libstdc++"
+RDEPENDS_libasan-dev += "${PN}"
+RDEPENDS_libubsan-dev += "${PN}"
+RDEPENDS_liblsan-dev += "${PN}"
+RDEPENDS_libtsan-dev += "${PN}"
+RRECOMMENDS_${PN} += "libasan libubsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_x86 = " liblsan"
+
+do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+
+# MIPS, aarch64, and SPARC are broken.
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+
+FILES_libasan += "${libdir}/libasan.so.*"
+FILES_libasan-dbg += "${libdir}/.debug/libasan.so.*"
+FILES_libasan-dev += "\
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/libasan.la \
+"
+FILES_libasan-staticdev += "${libdir}/libasan.a"
+
+FILES_libubsan += "${libdir}/libubsan.so.*"
+FILES_libubsan-dbg += "${libdir}/.debug/libubsan.so.*"
+FILES_libubsan-dev += "\
+ ${libdir}/libubsan.so \
+ ${libdir}/libubsan.la \
+"
+FILES_libubsan-staticdev += "${libdir}/libubsan.a"
+
+FILES_liblsan += "${libdir}/liblsan.so.*"
+FILES_liblsan-dbg += "${libdir}/.debug/liblsan.so.*"
+FILES_liblsan-dev += "\
+ ${libdir}/liblsan.so \
+ ${libdir}/liblsan.la \
+"
+FILES_liblsan-staticdev += "${libdir}/liblsan.a"
+
+FILES_libtsan += "${libdir}/libtsan.so.*"
+FILES_libtsan-dbg += "${libdir}/.debug/libtsan.so.*"
+FILES_libtsan-dev += "\
+ ${libdir}/libtsan.so \
+ ${libdir}/libtsan.la \
+"
+FILES_libtsan-staticdev += "${libdir}/libtsan.a"
+
+FILES_${PN} = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-shared-source.inc b/meta/recipes-devtools/gcc/gcc-shared-source.inc
new file mode 100644
index 0000000000..cb5d9071b6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-shared-source.inc
@@ -0,0 +1,9 @@
+do_fetch() {
+ :
+}
+do_fetch[noexec] = "1"
+deltask do_unpack
+deltask do_patch
+
+do_configure[depends] += "gcc-source:do_preconfigure"
+do_populate_lic[depends] += "gcc-source:do_unpack"
diff --git a/meta/recipes-devtools/gcc/gcc-source.inc b/meta/recipes-devtools/gcc/gcc-source.inc
new file mode 100644
index 0000000000..968830aa35
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source.inc
@@ -0,0 +1,34 @@
+deltask do_configure
+deltask do_compile
+deltask do_package
+deltask do_package_write_rpm
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_install
+deltask do_populate_sysroot
+deltask do_populate_lic
+deltask do_package_qa
+deltask do_packagedata
+deltask do_rm_work
+
+WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
+SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
+
+STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
+STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-[0-9]*-*"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = ""
+
+python do_preconfigure () {
+ import subprocess
+ cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ # See 0044-gengtypes.patch, we need to regenerate this file
+ bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
+ cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+}
+addtask do_preconfigure after do_patch
+do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
+
diff --git a/meta/recipes-devtools/gcc/gcc-source_4.8.bb b/meta/recipes-devtools/gcc/gcc-source_4.8.bb
new file mode 100644
index 0000000000..234b82efc6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require recipes-devtools/gcc/gcc-source.inc
diff --git a/meta/recipes-devtools/gcc/gcc-source_4.9.bb b/meta/recipes-devtools/gcc/gcc-source_4.9.bb
new file mode 100644
index 0000000000..234b82efc6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source_4.9.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require recipes-devtools/gcc/gcc-source.inc
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index de906d6241..a266f16edf 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -1,105 +1,107 @@
GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = " \
+EXTRA_OECONF_PATHS = "\
--with-sysroot=/ \
--with-build-sysroot=${STAGING_DIR_TARGET} \
--with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
- --with-gxx-include-dir=${includedir}/c++/"
+ --with-gxx-include-dir=${includedir}/c++/${BINV} \
+"
+
+EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
-EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
+EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
PACKAGES = "\
- ${PN} ${PN}-plugins ${PN}-symlinks \
- g++ g++-symlinks \
- cpp cpp-symlinks \
- g77 g77-symlinks \
- gfortran gfortran-symlinks \
- gcov gcov-symlinks \
- ${PN}-plugin-dev \
- ${PN}-doc \
- ${PN}-dev \
- ${PN}-dbg \
+ ${PN} ${PN}-plugins ${PN}-symlinks \
+ g++ g++-symlinks \
+ cpp cpp-symlinks \
+ g77 g77-symlinks \
+ gfortran gfortran-symlinks \
+ gcov gcov-symlinks \
+ ${PN}-plugin-dev \
+ ${PN}-doc \
+ ${PN}-dev \
+ ${PN}-dbg \
"
FILES_${PN} = "\
- ${bindir}/${TARGET_PREFIX}gcc* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
+ ${bindir}/${TARGET_PREFIX}gcc* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
"
INSANE_SKIP_${PN} += "dev-so"
FILES_${PN}-dbg += "\
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
"
FILES_${PN}-dev = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
"
FILES_${PN}-plugin-dev = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
"
FILES_${PN}-symlinks = "\
- ${bindir}/cc \
- ${bindir}/gcc \
- ${bindir}/gccbug \
+ ${bindir}/cc \
+ ${bindir}/gcc \
+ ${bindir}/gccbug \
"
FILES_${PN}-plugins = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
"
ALLOW_EMPTY_${PN}-plugins = "1"
FILES_g77 = "\
- ${bindir}/${TARGET_PREFIX}g77 \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
+ ${bindir}/${TARGET_PREFIX}g77 \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
"
FILES_g77-symlinks = "\
- ${bindir}/g77 \
- ${bindir}/f77 \
+ ${bindir}/g77 \
+ ${bindir}/f77 \
"
FILES_gfortran = "\
- ${bindir}/${TARGET_PREFIX}gfortran \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
+ ${bindir}/${TARGET_PREFIX}gfortran \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
"
FILES_gfortran-symlinks = "\
- ${bindir}/gfortran \
- ${bindir}/f95"
+ ${bindir}/gfortran \
+ ${bindir}/f95"
FILES_cpp = "\
- ${bindir}/${TARGET_PREFIX}cpp \
- ${base_libdir}/cpp \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${base_libdir}/cpp \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
FILES_cpp-symlinks = "${bindir}/cpp"
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
FILES_gcov-symlinks = "${bindir}/gcov"
FILES_g++ = "\
- ${bindir}/${TARGET_PREFIX}g++ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
+ ${bindir}/${TARGET_PREFIX}g++ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
"
FILES_g++-symlinks = "\
- ${bindir}/c++ \
- ${bindir}/g++ \
+ ${bindir}/c++ \
+ ${bindir}/g++ \
"
-
FILES_${PN}-doc = "\
- ${infodir} \
- ${mandir} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
+ ${infodir} \
+ ${mandir} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
"
do_compile () {
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index c81a80c6de..3101762b02 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -1,5 +1,7 @@
BPN = "libgcc"
+require gcc-shared-source.inc
+
INHIBIT_DEFAULT_DEPS = "1"
do_configure () {
@@ -52,7 +54,7 @@ addtask multilib_install after do_install before do_package do_populate_sysroot
# by creating this symlink to it
# /usr/lib64/x86_64-poky-linux/4.7/32
-python do_multilib_install() {
+fakeroot python do_multilib_install() {
import re
multilibs = d.getVar('MULTILIB_VARIANTS', True)
@@ -115,7 +117,7 @@ python do_multilib_install() {
}
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
-python do_extra_symlinks() {
+fakeroot python do_extra_symlinks() {
targetsysnoext = d.getVar('TARGET_SYS_NO_EXTENSION', True)
if targetsysnoext != d.getVar('TARGET_SYS', True):
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 45dd151e5f..21cb8c1084 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -3,25 +3,33 @@ require libgcc-common.inc
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
PACKAGES = "\
- ${PN} \
- ${PN}-dev \
- ${PN}-dbg \
- libgcov-dev \
- "
+ ${PN} \
+ ${PN}-dev \
+ ${PN}-dbg \
+ libgcov-dev \
+"
+
+# All libgcc source is marked with the exception.
+#
+LICENSE_${PN} = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
+
FILES_${PN} = "${base_libdir}/libgcc*.so.*"
-FILES_${PN}-dev = " \
- ${base_libdir}/libgcc*.so \
- ${libdir}/${TARGET_SYS}/${BINV}/*crt* \
- ${libdir}/${TARGET_SYS}/${BINV}/64 \
- ${libdir}/${TARGET_SYS}/${BINV}/32 \
- ${libdir}/${TARGET_SYS}/${BINV}/x32 \
- ${libdir}/${TARGET_SYS}/${BINV}/n32 \
- ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \
- ${@base_conditional('TARGET_SYS_NO_EXTENSION', '${TARGET_SYS}', '', '${libdir}/${TARGET_SYS_NO_EXTENSION}', d)}"
-FILES_libgcov-dev = " \
- ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
- "
+FILES_${PN}-dev = "\
+ ${base_libdir}/libgcc*.so \
+ ${libdir}/${TARGET_SYS}/${BINV}/*crt* \
+ ${libdir}/${TARGET_SYS}/${BINV}/64 \
+ ${libdir}/${TARGET_SYS}/${BINV}/32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/x32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/n32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \
+ ${@base_conditional('TARGET_SYS_NO_EXTENSION', '${TARGET_SYS}', '', '${libdir}/${TARGET_SYS_NO_EXTENSION}', d)} \
+"
+FILES_libgcov-dev = "\
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
+"
FILES_${PN}-dbg += "${base_libdir}/.debug/"
LIBGCCBUILDTREENAME = "gcc-build-internal-"
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index 7bf412134b..e42843d2f1 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -1,8 +1,9 @@
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = " \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
do_configure () {
mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
@@ -45,20 +46,20 @@ DEPENDS = "gcc-runtime"
BBCLASSEXTEND = "nativesdk"
PACKAGES = "\
- ${PN}-dbg \
- libgfortran \
- libgfortran-dev \
- libgfortran-staticdev \
+ ${PN}-dbg \
+ libgfortran \
+ libgfortran-dev \
+ libgfortran-staticdev \
"
FILES_${PN} = "${libdir}/libgfortran.so.*"
-FILES_${PN}-dev = " \
- ${libdir}/libgfortran*.so \
- ${libdir}/libgfortran.spec \
- ${libdir}/libgfortran.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single*"
-FILES_${PN}-staticdev = " \
- ${libdir}/libgfortran.a"
+FILES_${PN}-dev = "\
+ ${libdir}/libgfortran*.so \
+ ${libdir}/libgfortran.spec \
+ ${libdir}/libgfortran.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
+"
+FILES_${PN}-staticdev = "${libdir}/libgfortran.a"
INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
diff --git a/meta/recipes-devtools/gdb/gdb-7.7.inc b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
index 62adcaa830..6fa13bc582 100644
--- a/meta/recipes-devtools/gdb/gdb-7.7.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
@@ -6,5 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
S = "${WORKDIR}/${BPN}-${PV}"
-SRC_URI[md5sum] = "40051ff95b39bd57b14b1809e2c16152"
-SRC_URI[sha256sum] = "8814d98c2733639cb602b6ecd8d69e02498017e02b5724c9451c285b0e9ee173"
+SRC_URI[md5sum] = "997492cc3475c96f35ecc8775248c9b1"
+SRC_URI[sha256sum] = "d7a923d876ecfa1cec4c1c79c014c9d8e58783a25855a95cf260275f61990647"
+
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index b4d48809d3..81af42f323 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -2,7 +2,7 @@ SUMMARY = "GNU debugger"
HOMEPAGE = "http://www.gnu.org/software/gdb/"
LICENSE = "GPLv3+"
SECTION = "devel"
-DEPENDS = "expat ncurses readline ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses readline ${LTTNGUST}"
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
@@ -11,6 +11,8 @@ LTTNGUST_mips = ""
LTTNGUST_mipsel = ""
LTTNGUST_mips64 = ""
LTTNGUST_mips64el = ""
+LTTNGUST_mips64n32 = ""
+LTTNGUST_mips64eln32 = ""
LTTNGUST_sh4 = ""
INC_PR = "r0"
@@ -38,7 +40,7 @@ EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
--with-curses --disable-multilib --with-system-readline --disable-sim \
- --without-lzma \
+ --without-lzma --without-guile \
${GDBPROPREFIX} ${EXPAT} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
--disable-rpath \
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e594bb12f5..844dce9451 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -13,6 +13,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
+SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
+
do_configure_prepend() {
cat > ${WORKDIR}/python << EOF
#! /bin/sh
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
index 301035940c..301035940c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
index cb99b06c5b..6e44778cd3 100644
--- a/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -1,8 +1,17 @@
require gdb-common.inc
-DEPENDS = "expat-native ncurses-native readline-native"
+DEPENDS = "expat-native ncurses-native readline-native python-native"
-EXTRA_OECONF += "--without-python"
+inherit pythonnative
+
+EXTRA_OECONF += "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python"
+
+do_compile_prepend() {
+ export BUILD_SYS="${BUILD_SYS}"
+ export HOST_SYS="${HOST_SYS}"
+ export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"
+ export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}"
+}
#EXTRA_OEMAKE += "LDFLAGS='${BUILD_LDFLAGS}'"
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.7.bb b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
index f9da486d7d..f9da486d7d 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 3321a244e8..2c95e03b1b 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -2,8 +2,7 @@ require gdb-common.inc
inherit gettext
-SRC_URI += "file://kill_arm_map_symbols.patch \
- file://gdbserver-cflags-last.diff;striplevel=0 \
+SRC_URI += "file://gdbserver-cflags-last.diff;striplevel=0 \
file://renesas-sh-native-support.patch \
"
#LDFLAGS_append = " -s"
diff --git a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
deleted file mode 100644
index 9fc45b9f2a..0000000000
--- a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: gdb-7.3/gdb/arm-tdep.c
-===================================================================
---- gdb-7.3.orig/gdb/arm-tdep.c 2011-05-17 14:27:01.000000000 -0700
-+++ gdb-7.3/gdb/arm-tdep.c 2011-08-05 22:29:58.784201850 -0700
-@@ -7806,6 +7806,19 @@
- static void
- arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
- {
-+
-+ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
-+ displaying disassembly so we use this horrible hack here to
-+ artifically set their address to the highest possible value.
-+ This is wrong of course, and it prevents the symbols from being
-+ used for their intended purpose - to distinguish between ARM
-+ and THUMB code. So we ought to find a better way to do this. */
-+ if (bfd_asymbol_name (sym)
-+ && bfd_asymbol_name (sym)[0] == '$'
-+ && bfd_asymbol_name (sym)[1] != 0
-+ && bfd_asymbol_name (sym)[2] == 0)
-+ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
-+
- if (ARM_SYM_BRANCH_TYPE (&((elf_symbol_type *)sym)->internal_elf_sym)
- == ST_BRANCH_TO_THUMB)
- MSYMBOL_SET_SPECIAL (msym);
diff --git a/meta/recipes-devtools/gdb/gdb_7.7.bb b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
index 1abc9d8e76..1abc9d8e76 100644
--- a/meta/recipes-devtools/gdb/gdb_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index 4e0527cab6..5396628790 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -5,6 +5,7 @@ DEPENDS = "openssl curl zlib expat"
PROVIDES_append_class-native = " git-replacement-native"
+SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz"
S = "${WORKDIR}/git-${PV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
@@ -29,24 +30,24 @@ do_install () {
oe_runmake install DESTDIR="${D}" bindir=${bindir} \
template_dir=${datadir}/git-core/templates \
GIT_PYTHON_DIR=${D}${datadir}/git-core/python
-
- # ${libdir} is not applicable here, perl-native files are always
- # installed to /usr/lib on both 32/64 bits targets.
- rm -rf ${D}${exec_prefix}/lib/perl-native
- rmdir ${D}${exec_prefix}/lib || true
}
-PERLSEDFIXUP = " \
+perl_native_fixup () {
sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
-e 's#${libdir}/perl-native/#${libdir}/#' \
- ${@d.getVar("PERLTOOLS", True).replace(' /',d.getVar('D', True) + '/')} \
-"
+ ${@d.getVar("PERLTOOLS", True).replace(' /',d.getVar('D', True) + '/')}
+
+ # ${libdir} is not applicable here, perl-native files are always
+ # installed to /usr/lib on both 32/64 bits targets.
+ mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
+ rmdir -p ${D}${exec_prefix}/lib/perl-native || true
+}
REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
do_install_append_class-target () {
- ${PERLSEDFIXUP}
+ perl_native_fixup
}
do_install_append_class-native() {
@@ -59,7 +60,7 @@ do_install_append_class-nativesdk() {
create_wrapper ${D}${bindir}/git \
GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
- ${PERLSEDFIXUP}
+ perl_native_fixup
}
FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
@@ -89,6 +90,7 @@ PERLTOOLS = " \
PACKAGES =+ "${PN}-perltools"
FILES_${PN}-perltools += " \
${PERLTOOLS} \
+ ${libdir}/perl \
${datadir}/perl \
"
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
diff --git a/meta/recipes-devtools/git/git_1.9.0.bb b/meta/recipes-devtools/git/git_2.2.1.bb
index 4eb6c99a30..2d47cda775 100644
--- a/meta/recipes-devtools/git/git_1.9.0.bb
+++ b/meta/recipes-devtools/git/git_2.2.1.bb
@@ -1,9 +1,7 @@
require git.inc
-SRC_URI = "http://git-core.googlecode.com/files/git-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "e16c14b27c644b8e0dd72bdb5ff77450"
-SRC_URI[sha256sum] = "de3097fdc36d624ea6cf4bb853402fde781acdb860f12152c5eb879777389882"
+SRC_URI[md5sum] = "ff41fdb094eed1ec430aed8ee9b9849c"
+SRC_URI[sha256sum] = "367a77d0b10a5070b02a0fb0e942f26f25af61793128e0ddfd5c5c474de93589"
EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes \
ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
index d67466ae79..f5fce6f020 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
@@ -17,6 +17,8 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV
SRC_URI[md5sum] = "bcfca5a2bb39edad4aae5a65efc84094"
SRC_URI[sha256sum] = "44f99a8e76f3e8e4fec0bb5ad4762f8e44366168554ce66cb85afbe2ed3efd8b"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 00fa759176..754a99a4b0 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -17,6 +17,8 @@ SRC_URI = "git://git.sv.gnu.org/config.git \
S = "${WORKDIR}/git"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/guile/files/arm_aarch64.patch b/meta/recipes-devtools/guile/files/arm_aarch64.patch
new file mode 100644
index 0000000000..f1788b62fb
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/arm_aarch64.patch
@@ -0,0 +1,19 @@
+guile: add aarch64 recognition
+
+Assume little-endian.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+--- a/module/system/base/target.scm
++++ b/module/system/base/target.scm
+@@ -70,6 +70,8 @@
+ ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
+ "mips" "mips64"))
+ (endianness big))
++ ((string-match "^aarch64" cpu)
++ (endianness little))
+ ((string-match "^arm.*eb" cpu)
+ (endianness big))
+ ((string-match "^arm.*" cpu)
diff --git a/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
new file mode 100644
index 0000000000..290b9d447d
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
@@ -0,0 +1,42 @@
+From 9c4e120a7a87db34d22a50883a5a525170b480d7 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 6 Jan 2015 23:10:51 -0800
+Subject: [PATCH] libguile/Makefile.am: install-data-hook -> install-exec-hook
+
+It may install such a file:
+/usr/lib64/libguile-2.0*-gdb.scm
+
+This is because when there is no file in the directory:
+for f in libguile-2.0*; do
+ [snip]
+done
+
+The f would be libguile-2.0* itself, use install-exec-hook will fix the
+problem since it depends on install-libLTLIBRARIES.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libguile/Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/libguile/Makefile.am b/libguile/Makefile.am
+index 5decd99..52645b7 100644
+--- a/libguile/Makefile.am
++++ b/libguile/Makefile.am
+@@ -446,10 +446,8 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
+ ## delete guile-snarf.awk from the installation bindir, in case it's
+ ## lingering there due to an earlier guile version not having been
+ ## wiped out.
+-install-exec-hook:
++install-exec-hook: libguile-2.0-gdb.scm
+ rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
+-
+-install-data-hook: libguile-2.0-gdb.scm
+ @$(MKDIR_P) $(DESTDIR)$(libdir)
+ ## We want to install libguile-2.0-gdb.scm as SOMETHING-gdb.scm.
+ ## SOMETHING is the full name of the final library. We want to ignore
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
new file mode 100644
index 0000000000..6c348384a5
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
@@ -0,0 +1,60 @@
+libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
+
+While compiling with option -g -O, there was a ssa corruption:
+..
+Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
+sp_48(ab) and sp_3476(ab)
+guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
+guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
+ #define VM_NAME vm_debug_engine
+ ^
+guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
+ VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
+ ^
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <http://gcc.gnu.org/bugs.html> for instructions.
+...
+
+Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libguile/vm-i-system.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
+--- a/libguile/vm-i-system.c
++++ b/libguile/vm-i-system.c
+@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
+ /* now shuffle up, from walk to ntotal */
+ {
+ scm_t_ptrdiff nshuf = sp - walk + 1, i;
+- sp = (fp - 1) + ntotal + nshuf;
+- CHECK_OVERFLOW ();
+- for (i = 0; i < nshuf; i++)
+- sp[-i] = walk[nshuf-i-1];
++ /* check the value of nshuf to workaround ice ssa corruption */
++ /* while compiling with -O -g */
++ if (nshuf > 0)
++ {
++ sp = (fp - 1) + ntotal + nshuf;
++ CHECK_OVERFLOW ();
++ for (i = 0; i < nshuf; i++)
++ sp[-i] = walk[nshuf-i-1];
++ }
++ else
++ {
++ sp = (fp - 1) + ntotal + nshuf;
++ CHECK_OVERFLOW ();
++ for (i = 0; i < nshuf; i++)
++ sp[-i] = walk[nshuf-i-1];
++ }
+ }
+ /* and fill optionals & keyword args with SCM_UNDEFINED */
+ while (walk <= (fp - 1) + ntotal)
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/guile/guile_2.0.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
index d19460a20d..d1578e08cf 100644
--- a/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -19,6 +19,9 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
file://opensuse/guile-64bit.patch \
file://guile_2.0.6_fix_sed_error.patch \
file://arm_endianness.patch \
+ file://arm_aarch64.patch \
+ file://workaround-ice-ssa-corruption.patch \
+ file://libguile-Makefile.am-hook.patch \
"
# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -31,7 +34,7 @@ SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c6
inherit autotools gettext pkgconfig texinfo
BBCLASSEXTEND = "native"
-DEPENDS = "libunistring bdwgc gmp libtool libffi"
+DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
# add guile-native only to the target recipe's DEPENDS
DEPENDS_append_class-target = " guile-native libatomics-ops"
diff --git a/meta/recipes-devtools/help2man/help2man-native_1.45.1.bb b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
index dec17b5149..5b90da9afa 100644
--- a/meta/recipes-devtools/help2man/help2man-native_1.45.1.bb
+++ b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
@@ -6,8 +6,8 @@ DEPENDS = "autoconf-native automake-native"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "8a8a5314284e46185e492756afdca29a"
-SRC_URI[sha256sum] = "c70fc791e6d13240327955de355244371b00bb1c9e247d5693ed601b716467c2"
+SRC_URI[md5sum] = "a1b7fe49eddae8a2537ed74ee9ef11cb"
+SRC_URI[sha256sum] = "1ae7f15f53b0cc55b070ae49df2ee5caa942c71529054e157599427bba3c5633"
inherit autotools native
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
index fcaf72f22a..fcaf72f22a 100644
--- a/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb
deleted file mode 100644
index b8be9eddda..0000000000
--- a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-RDEPENDS_${PN} += "perl"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/i2c-tools/i2c-tools-3.1.0.tar.bz2/f15019e559e378c6e9d5d6299a00df21/i2c-tools-${PV}.tar.bz2 \
- file://Module.mk \
-"
-SRC_URI[md5sum] = "f15019e559e378c6e9d5d6299a00df21"
-SRC_URI[sha256sum] = "960023f61de292c6dd757fcedec4bffa7dd036e8594e24b26a706094ca4c142a"
-
-inherit autotools-brokensep
-
-do_compile_prepend() {
- cp ${WORKDIR}/Module.mk ${S}/eepromer/
- sed -i 's#/usr/local#/usr#' ${S}/Makefile
- echo "include eepromer/Module.mk" >> ${S}/Makefile
-}
-
-do_install_append() {
- install -d ${D}${includedir}/linux
- install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
- rm -f ${D}${includedir}/linux/i2c-dev.h
-}
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
new file mode 100644
index 0000000000..71c98a4fd1
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Set of i2c tools for linux"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \
+ file://Module.mk \
+"
+SRC_URI[md5sum] = "0fdbff53ebd0b8d9249256d6c56480b1"
+SRC_URI[sha256sum] = "14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700"
+
+inherit autotools-brokensep
+
+do_compile_prepend() {
+ cp ${WORKDIR}/Module.mk ${S}/eepromer/
+ sed -i 's#/usr/local#/usr#' ${S}/Makefile
+ echo "include eepromer/Module.mk" >> ${S}/Makefile
+}
+
+do_install_append() {
+ install -d ${D}${includedir}/linux
+ install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
+ rm -f ${D}${includedir}/linux/i2c-dev.h
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
+ ${bindir}/ddcmon \
+ ${bindir}/decode-edid \
+ ${bindir}/decode-dimms \
+ ${bindir}/decode-vaio \
+ "
+RDEPENDS_${PN} += "${PN}-misc"
+RDEPENDS_${PN}-misc += "perl"
diff --git a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
index 18e7fc0062..6b356b0d44 100644
--- a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
+++ b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
@@ -10,7 +10,7 @@ and names that can be used to make icon themes work in a desktop \
environment or application that implements the naming specification. "
LICENSE = "GPLv2"
DEPENDS = "libxml-simple-perl-native"
-PR = "r4"
+PR = "r5"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
@@ -18,7 +18,7 @@ SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-${PV}.tar.gz"
SRC_URI[md5sum] = "2c5c7a418e5eb3268f65e21993277fba"
SRC_URI[sha256sum] = "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c"
-inherit autotools-brokensep allarch perlnative
+inherit autotools allarch perlnative
do_configure_append() {
# Make sure we use our nativeperl wrapper.
diff --git a/meta/recipes-devtools/insserv/files/run-ptest b/meta/recipes-devtools/insserv/files/run-ptest
index 495d1551c2..4a6da3030a 100644
--- a/meta/recipes-devtools/insserv/files/run-ptest
+++ b/meta/recipes-devtools/insserv/files/run-ptest
@@ -11,7 +11,7 @@ output() {
}
for i in test_simple_sequence test_undetected_loop; \
- do $i &>/dev/null ; output; \
+ do $i >/dev/null 2>&1; output; \
done
rm -rf ${tmpdir}
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index cdf93da206..2a8a30ccdc 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -163,10 +163,11 @@ for target_type in $YOCTOADT_TARGETS; do
# opkg will not install packagegroup-cross-canadian package if it was already
# installed. So, the environment script is in one place or the other.
+ [ -e "$INSTALL_FOLDER/$env_script_original" ] && env_script=$INSTALL_FOLDER/$env_script_original
[ -e "$env_script_original" ] && env_script=$env_script_original
[ -e "$env_script_relocated" ] && env_script=$env_script_relocated
- $SUDO sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_script
+ $SUDO sed -i -e "s%SDKTARGETSYSROOT=.*%SDKTARGETSYSROOT=$target_sysroot%g" $env_script
done
if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" == "y" ]; then
diff --git a/meta/recipes-devtools/installer/adt-installer_1.0.bb b/meta/recipes-devtools/installer/adt-installer_1.0.bb
index 6a63e79e9f..07070b54cf 100644
--- a/meta/recipes-devtools/installer/adt-installer_1.0.bb
+++ b/meta/recipes-devtools/installer/adt-installer_1.0.bb
@@ -29,6 +29,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
LICENSE = "MIT"
PACKAGES = ""
+INHIBIT_DEFAULT_DEPS = "1"
PR = "r11"
@@ -86,7 +87,6 @@ do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
-do_package_write[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/recipes-devtools/json-c/json-c_0.11.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb
index 389e0f9ebf..79cf6dca70 100644
--- a/meta/recipes-devtools/json-c/json-c_0.11.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "aa02367d2f7a830bf1e3376f77881e98"
-SRC_URI[sha256sum] = "28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c"
+SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
+SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
RPROVIDES_${PN} = "libjson"
@@ -19,3 +19,5 @@ do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
rm -f ${S}/config.status
}
+
+CFLAGS += "-Wno-error=unused-but-set-variable"
diff --git a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
index 2f57527e43..ef0019fc7d 100644
--- a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
@@ -12,7 +12,7 @@ LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
SECTION = "devel"
DEPENDS += "ncurses flex bison gperf-native pkgconfig-native"
-RDEPENDS_${PN} += "python"
+RDEPENDS_${PN} += "python bash"
SRC_URI = "http://ymorin.is-a-geek.org/download/${BPN}/${BP}.tar.xz"
SRC_URI[md5sum] = "b939280dcc83f8feabd87a1d5f9b00c2"
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.5.inc
index 9c50d46fe2..5b222504af 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.5.inc
@@ -5,31 +5,28 @@ Libtool hides the complexity of generating special library types \
HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
SECTION = "devel"
LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-INC_PR = "r6"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://libltdl/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c "
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
file://trailingslash.patch \
file://rename-with-sysroot.patch \
file://use-sysroot-in-libpath.patch \
file://fix-final-rpath.patch \
- file://avoid_absolute_paths_for_general_utils.patch \
file://fix-rpath.patch \
- file://respect-fstack-protector.patch \
file://norm-rpath.patch \
file://dont-depend-on-help2man.patch \
file://fix-resolve-lt-sysroot.patch \
+ file://nohardcodepaths.patch \
"
-SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50"
-SRC_URI[sha256sum] = "b38de44862a987293cd3d8dfae1c409d514b6c4e794ebc93648febf9afc38918"
+SRC_URI[md5sum] = "7d30ed9fa6bb11270ebb31639a37bd54"
+SRC_URI[sha256sum] = "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987"
do_compile_prepend () {
# Sometimes this file doesn't get rebuilt, force the issue
- rm -f ${S}/libltdl/config/ltmain.sh
- make libltdl/config/ltmain.sh
+ rm -f ${S}/build-aux/ltmain.sh
+ make build-aux/ltmain.sh
./config.status
}
@@ -49,3 +46,5 @@ FILES_libltdl = "${libdir}/libltdl${SOLIBS}"
FILES_libltdl-dev = "${libdir}/libltdl${SOLIBSDEV} ${includedir}"
FILES_libltdl-staticdev = "${libdir}/libltdl.a"
FILES_libltdl-dbg = "${libdir}/.debug/"
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb
index 72fad37eaf..847880270d 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb
@@ -1,6 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.1"
PACKAGES = ""
SRC_URI += "file://prefix.patch"
SRC_URI += "file://fixinstall.patch"
@@ -18,17 +17,18 @@ do_install () {
install -d ${D}${bindir_crossscripts}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
install -d ${D}${bindir_crossscripts}/
- install -m 0755 libtoolize ${D}${bindir_crossscripts}/
- install -d ${D}${target_datadir}/libtool/config/
+ GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
+ chmod 0755 ${D}${bindir_crossscripts}/libtoolize
+ install -d ${D}${target_datadir}/libtool/build-aux/
install -d ${D}${target_datadir}/aclocal/
- install -c ${S}/libltdl/config/compile ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.guess ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.sub ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/depcomp ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/install-sh ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/missing ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/m4/*.m4 ${D}${target_datadir}/aclocal/
+ install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
}
SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
@@ -39,5 +39,3 @@ libtoolcross_sysroot_preprocess () {
}
SSTATE_SCAN_FILES += "libtoolize *-libtool"
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.5.bb
index f1051d84f3..4c5218ade0 100644
--- a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-native_2.4.5.bb
@@ -2,7 +2,6 @@ require libtool-${PV}.inc
DEPENDS = ""
-PR = "${INC_PR}.1"
SRC_URI += "file://prefix.patch"
inherit native
@@ -21,5 +20,3 @@ do_install () {
install -d ${D}${bindir}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch b/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
deleted file mode 100644
index 3c751ed0e2..0000000000
--- a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Pending
-
-On some distro the path of utils like sed, grep etc are different than the
-buildhost system.
- This was causing runtime issue while running libtoolize from the
-libtool-nativesdk package.
- This patch takes out the absolute paths of these utils, and put
-responsibility on the end-user to set correct paths for these utilities to be
-found out.
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/02/18
-
-
-Index: libtool-2.4.2/libltdl/config/general.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/general.m4sh
-+++ libtool-2.4.2/libltdl/config/general.m4sh
-@@ -45,15 +45,15 @@ progpath="$0"
- M4SH_VERBATIM([[
- : ${CP="cp -f"}
- test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
--: ${EGREP="@EGREP@"}
--: ${FGREP="@FGREP@"}
--: ${GREP="@GREP@"}
--: ${LN_S="@LN_S@"}
-+: ${EGREP="egrep"}
-+: ${FGREP="fgrep"}
-+: ${GREP="grep"}
-+: ${LN_S="ln -s"}
- : ${MAKE="make"}
- : ${MKDIR="mkdir"}
- : ${MV="mv -f"}
- : ${RM="rm -f"}
--: ${SED="@SED@"}
-+: ${SED="sed"}
- : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
- : ${Xsed="$SED -e 1s/^X//"}
-
diff --git a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
index 67552b0ff5..fd4084c859 100644
--- a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
+++ b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
@@ -1,24 +1,30 @@
Upstream-Status: Inappropriate
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libtool-2.4.2/Makefile.am libtool-2.4.2/Makefile.am
---- libtool-2.4.2/Makefile.am 2011-10-17 13:17:04.000000000 +0300
-+++ libtool-2.4.2/Makefile.am 2013-01-01 22:03:36.865586811 +0200
-@@ -327,17 +327,6 @@
- cd $(srcdir)/doc && \
- $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
+Updated by: Robert Yang <liezhi.yang@windriver.com>
--dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -404,21 +404,6 @@ $(notes_txt): $(notes_texi)
+ $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
+ $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
+
+-dist_man1_MANS = $(libtool_1) $(libtoolize_1)
-MAINTAINERCLEANFILES += $(dist_man1_MANS)
-update_mans = \
- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
-- $(HELP2MAN) --output=$@
--$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
-- $(update_mans) --help-option=--help-all libtool
--$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
-- $(update_mans) libtoolize
+- $(HELP2MAN) --output='$@'
-
+-# It's wrong to make distributed files (e.g. $(libtool_1)) rely on
+-# files created in the build tree, so instead we regenerate the
+-# manual pages if the sources for the build-tree files we want to
+-# run have changed.
+-$(libtool_1): $(ltmain_sh)
+- $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
+-$(libtoolize_1): $(libtoolize_in)
+- $(AM_V_GEN)$(update_mans) libtoolize
-
+
## ------------- ##
## Installation. ##
- ## ------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
index 5c275ffd32..5c9f8cc9c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
@@ -6,13 +6,14 @@ This works around the issue until it gets sorted out upstream.
Fix suggested by Richard Purdie <richard.purdie@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -7268,9 +7268,11 @@ EOF
- test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -7569,9 +7569,11 @@ EOF
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ func_replace_sysroot "$libdir"
@@ -23,9 +24,9 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
- func_replace_sysroot "$libdir"
- libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
-@@ -7999,6 +8001,10 @@ EOF
+@@ -8301,6 +8303,10 @@ EOF
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
@@ -35,4 +36,15 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+ libdir=$func_stripname_result
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
+@@ -8352,6 +8358,10 @@ EOF
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
++ func_replace_sysroot "$libdir"
++ libdir=$func_replace_sysroot_result
++ func_stripname '=' '' "$libdir"
++ libdir=$func_stripname_result
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
index 44e9fe17ae..1bd95980c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
@@ -10,17 +10,18 @@ I have also reported the problem to libtool here
http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html
Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
---
-diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2013-09-13 22:37:43.647282945 +0200
-+++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-09-14 10:27:37.168178605 +0200
-@@ -1234,16 +1234,21 @@
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
- case ${with_libtool_sysroot} in #(
+ case $with_libtool_sysroot in #(
- yes)
+ no)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Treat "/" the same a an unset sysroot. It seems to be more
+ # compatible across host platforms that way!?
@@ -37,5 +38,5 @@ diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libto
- no|'')
- ;; #(
*)
- AC_MSG_RESULT([${with_libtool_sysroot}])
+ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
index 1571178a6a..a2ec9473e7 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
@@ -6,10 +6,12 @@ RP 23/9/2011
Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+Index: libtool-2.4.2/build-aux/ltmain.in
===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
+--- libtool-2.4.2.orig/build-aux/ltmain.in
++++ libtool-2.4.2/build-aux/ltmain.in
@@ -7286,8 +7286,14 @@ EOF
esac
fi
diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
index 279c07be37..8f343bf436 100644
--- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch
+++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
@@ -16,12 +16,13 @@ Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this]
RP 2011/11/16
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2011-11-16 14:50:01.070383779 +0000
-+++ libtool-2.4/libltdl/config/ltmain.m4sh 2011-11-16 15:27:13.582310413 +0000
-@@ -2163,7 +2163,7 @@
- dir="$func_dirname_result"
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2355,7 +2355,7 @@ func_mode_install ()
+ dir=$func_dirname_result
func_append dir "$objdir"
- if test -n "$relink_command"; then
@@ -29,16 +30,16 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
# Strip any trailing slash from the destination.
func_stripname '' '/' "$libdir"
destlibdir=$func_stripname_result
-@@ -2202,7 +2202,7 @@
+@@ -2394,7 +2394,7 @@ func_mode_install ()
shift
- srcname="$realname"
-- test -n "$relink_command" && srcname="$realname"T
+ srcname=$realname
+- test -n "$relink_command" && srcname=${realname}T
+ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
-@@ -5856,15 +5856,15 @@
+@@ -6162,15 +6162,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -63,7 +64,7 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -5930,15 +5930,15 @@
+@@ -6236,15 +6236,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -88,14 +89,14 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -6284,8 +6284,8 @@
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+@@ -6590,8 +6590,8 @@ func_mode_link ()
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
-- func_warning "\`$deplib' seems to be moved"
+- func_warning "'$deplib' seems to be moved"
+ #test "$absdir" != "$libdir" && \
-+ # func_warning "\`$deplib' seems to be moved"
++ # func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
new file mode 100644
index 0000000000..b2239fbade
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
@@ -0,0 +1,27 @@
+If for example you build on a machine with /bin/grep, then restore that sstate
+onto a machine with /usr/bin/grep, things will fail. Simply don't bother
+hardcoding paths.
+
+RP 2015/2/3
+
+Index: libtool-2.4.5/libtoolize.in
+===================================================================
+--- libtool-2.4.5.orig/libtoolize.in
++++ libtool-2.4.5/libtoolize.in
+@@ -40,11 +40,11 @@
+
+ : ${AUTOCONF="autoconf"}
+ : ${AUTOMAKE="automake"}
+-: ${EGREP="@EGREP@"}
+-: ${FGREP="@FGREP@"}
+-: ${GREP="@GREP@"}
+-: ${LN_S="@LN_S@"}
+-: ${SED="@SED@"}
++: ${EGREP="egrep"}
++: ${FGREP="fgrep"}
++: ${GREP="grep"}
++: ${LN_S="ln -s"}
++: ${SED="sed"}
+
+
+ ## -------------------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
index dce1576c41..1e4c65e024 100644
--- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
@@ -7,9 +7,11 @@ RPATH in the generated binary. Normalize before comparision.
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Upstream-Status: Pending
-diff -ur a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
---- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700
-+++ b/libltdl/config/ltmain.m4sh 2012-08-22 11:01:34.191345989 -0700
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700
++++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700
@@ -7288,8 +7288,10 @@
else
# We only want to hardcode in an rpath if it isn't in the
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
index 5e46e68f03..a73df2e4a7 100644
--- a/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -18,35 +18,13 @@ the simplest fix is just to remove $SHELL.
Updated: Date: 2011/11/09
RP
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS="$ltmain"
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
-
- _LT_SETUP
-@@ -206,7 +207,7 @@ aix3*)
- esac
-
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
-
- # All known linkers require a `.a' archive for static linking (except MSVC,
-Index: libtool-2.4.2/Makefile.am
-===================================================================
---- libtool-2.4.2.orig/Makefile.am
-+++ libtool-2.4.2/Makefile.am
-@@ -31,7 +31,7 @@ AM_LDFLAGS =
- DIST_SUBDIRS = .
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -31,7 +31,7 @@ SUBDIRS = .
+ DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST =
-BUILT_SOURCES = libtool libtoolize
@@ -54,58 +32,67 @@ Index: libtool-2.4.2/Makefile.am
CLEANFILES =
MOSTLYCLEANFILES =
-@@ -72,7 +72,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
- ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
- ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
- ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
--CLEANFILES += libtool libtoolize libtoolize.tmp \
-+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
- $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
+
+ EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
+ GNUmakefile
+-CLEANFILES += libtool libtoolize
++CLEANFILES += $(host_alias)-libtool libtoolize
- ## These are the replacements that need to be made at bootstrap time,
-@@ -231,7 +231,7 @@ configure_edit = sed \
- -e 's,@SED\@,$(SED),g'
+ ## If a file is named several times below, and especially if it
+ ## is a distributed file created during Libtool bootstrap, we
+@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
+ -e 's|@srcdir\@|$(srcdir)|g'
# The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtoolize libtool
-+bin_SCRIPTS = libtoolize $(host_alias)-libtool
+-bin_SCRIPTS = libtool
++bin_SCRIPTS = $(host_alias)-libtool
- libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
- rm -f libtoolize.tmp libtoolize
-@@ -244,8 +244,8 @@ libtoolize: $(srcdir)/libtoolize.in $(to
+ libtoolize: $(libtoolize_in) $(config_status)
+ $(AM_V_at)rm -f '$@'
+@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
# We used to do this with a 'stamp-vcl' file, but non-gmake builds
# would rerun configure on every invocation, so now we manually
# check the version numbers from the build rule when necessary.
--libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-- @target=libtool; $(rebuild); \
-+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-+ @target=$(host_alias)-libtool; $(rebuild); \
- if test -f "$$target"; then \
- set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
- test "$$actualver" = "$$correctver" && rebuild=false; \
-@@ -254,8 +254,8 @@ libtool: $(top_builddir)/config.status $
- case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
- done; \
- if $$rebuild; then \
-- echo $(SHELL) ./config.status $$target; \
-- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
-+ echo $(SHELL) ./config.status libtool; \
-+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
- fi
-
- .PHONY: configure-subdirs
-@@ -535,12 +535,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
+-libtool: $(ltmain_sh) $(config_status) $(dotversion)
++$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
+ @$(rebuild); \
+ if test -f '$@'; then \
+ eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
+@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
- LIBTOOL="$(abs_top_builddir)/libtool" \
+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
- tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+ tst_aclocaldir="$(abs_top_srcdir)/m4"
INSTALLCHECK_ENVIRONMENT = \
- LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
-- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
-+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
+ LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
+- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
LTDLINCL="-I$(includedir)" \
LIBLTDL="$(libdir)/libltdl.la" \
tst_aclocaldir="$(aclocaldir)"
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
+ LIBTOOL_DEPS=$ltmain
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+ _LT_SETUP
+@@ -199,7 +200,7 @@ aix3*)
+ esac
+
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a '.a' archive for static linking (except MSVC,
diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
index c3e3e867aa..ad2b110530 100644
--- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
@@ -10,29 +10,31 @@ http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
-Khem Raj <raj.khem@gmail.com>
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -1224,27 +1224,27 @@ _LT_DECL([], [ECHO], [1], [An echo progr
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
--[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+AC_ARG_WITH([libtool-sysroot],
-+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
++[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
-[], [with_sysroot=no])
+[], [with_libtool_sysroot=no])
dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
--case ${with_sysroot} in #(
-+case ${with_libtool_sysroot} in #(
+-case $with_sysroot in #(
++case $with_libtool_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -43,15 +45,14 @@ Index: libtool-2.4.2/libltdl/m4/libtool.m4
no|'')
;; #(
*)
-- AC_MSG_RESULT([${with_sysroot}])
-+ AC_MSG_RESULT([${with_libtool_sysroot}])
+- AC_MSG_RESULT([$with_sysroot])
++ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
;;
esac
-Index: libtool-2.4.2/tests/sysroot.at
-===================================================================
---- libtool-2.4.2.orig/tests/sysroot.at
-+++ libtool-2.4.2/tests/sysroot.at
+diff --git a/tests/sysroot.at b/tests/sysroot.at
+--- a/tests/sysroot.at
++++ b/tests/sysroot.at
@@ -64,7 +64,7 @@ while read file; do
done])
@@ -60,7 +61,7 @@ Index: libtool-2.4.2/tests/sysroot.at
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
+ if test PATH = "$shlibpath_var"; then
@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
@@ -79,11 +80,10 @@ Index: libtool-2.4.2/tests/sysroot.at
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
]])
-Index: libtool-2.4.2/tests/testsuite
-===================================================================
---- libtool-2.4.2.orig/tests/testsuite
-+++ libtool-2.4.2/tests/testsuite
-@@ -26676,7 +26676,7 @@ $at_traceon; }
+diff --git a/tests/testsuite b/tests/testsuite
+--- a/tests/testsuite
++++ b/tests/testsuite
+@@ -48945,7 +48945,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -91,8 +91,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -26874,7 +26874,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -101,7 +101,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27051,7 +27051,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -110,7 +110,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27392,7 +27392,7 @@ $at_traceon; }
+@@ -49694,7 +49694,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -118,8 +118,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -27590,7 +27590,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -128,7 +128,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27767,7 +27767,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -137,7 +137,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28108,7 +28108,7 @@ $at_traceon; }
+@@ -50443,7 +50443,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -145,8 +145,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -28306,7 +28306,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -155,7 +155,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28483,7 +28483,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
diff --git a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
deleted file mode 100644
index a82b2ec5a1..0000000000
--- a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Source: http://permalink.gmane.org/gmane.comp.gnu.libtool.bugs/7341
-
-Bug confirmed. When code is compiled with -fstack-protector{,-all},
-GCC "emits extra code to check for buffer overflows, such as stack
-smashing attacks". This extra code uses symbols from libssp, and
-therefore (at least) Cygwin's GCC specs contain:
-
-*link_ssp:
-%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
-
-Therefore, when libtool fails to pass -fstack-protector{,-all} at link
-stage, the link fails.
-
-Patch attached. (Yes, I have a copyright assignment on file.)
-
-Yaakov
-Cygwin/X
-
-From b79f4e117b6f73cc461a2e232063e08481d33300 Mon Sep 17 00:00:00 2001
-From: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
-Date: Tue, 1 Jun 2010 22:18:51 -0500
-Subject: [PATCH] Fix linking with -fstack-protector
-
-* libltdl/config/ltmain.m4sh (func_mode_link): Pass -fstack-protector*
-to the linker as it is required at link time to resolve libssp symbols.
-
-Signed-off-by: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
----
- libltdl/config/ltmain.m4sh | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh 2012-06-01 12:35:44.089638130 -0700
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh 2012-06-01 12:37:25.789643055 -0700
-@@ -5067,13 +5067,14 @@
- # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
- # -F/path path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
-+ # -fstack-protector* stack protector flags for GCC
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
- # --sysroot=* for sysroot support
- # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
index bb7a761e25..e8824d7db9 100644
--- a/meta/recipes-devtools/libtool/libtool/trailingslash.patch
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -11,11 +11,12 @@ Merged a patch received from Gary Thomas <gary@mlbassoc.com>
Date: 2010/07/12
Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -2167,8 +2167,15 @@ func_mode_install ()
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2356,8 +2356,15 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
index 0cd66ad524..6af99f327c 100644
--- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
@@ -6,16 +6,16 @@ i.e. when lt_sysroot is not set, it will still behave the same and add
-L/usr/lib to the relink command.
-Khem Raj <raj.khem@gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -6138,7 +6138,7 @@ func_mode_link ()
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -6421,7 +6421,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
-- add_dir="-L$libdir"
+- add_dir=-L$libdir
+ add_dir="-L$lt_sysroot$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.2.bb b/meta/recipes-devtools/libtool/libtool_2.4.2.bb
deleted file mode 100644
index a2eb4ea437..0000000000
--- a/meta/recipes-devtools/libtool/libtool_2.4.2.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require libtool-${PV}.inc
-
-PR = "${INC_PR}.0"
-
-#
-# We want the results of libtool-cross preserved - don't stage anything ourselves.
-#
-SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
-
-libtool_sysroot_preprocess () {
- rm -rf ${SYSROOT_DESTDIR}${bindir}/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/config/*
-}
-
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.5.bb b/meta/recipes-devtools/libtool/libtool_2.4.5.bb
new file mode 100644
index 0000000000..45f1b2f3a9
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool_2.4.5.bb
@@ -0,0 +1,26 @@
+require libtool-${PV}.inc
+
+RDEPENDS_${PN} += "bash"
+
+#
+# We want the results of libtool-cross preserved - don't stage anything ourselves.
+#
+SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
+
+do_install_append () {
+ sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
+ -e 's@${STAGING_DIR_HOST}@@g' \
+ -e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(predep_objects="\).*@\1"@' \
+ -e 's@^\(postdep_objects="\).*@\1"@' \
+ -i ${D}${bindir}/libtool
+}
+
+libtool_sysroot_preprocess () {
+ rm -rf ${SYSROOT_DESTDIR}${bindir}/*
+ rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
+ rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
+}
+
diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb
index fff15e916d..508eade326 100644
--- a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb
@@ -1,7 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.0"
-
FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
SRC_URI += "file://prefix.patch"
@@ -31,5 +29,3 @@ libtoolnativesdk_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
index ed6ab738a8..a8a90fc82e 100644
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
@@ -19,3 +19,7 @@ inherit autotools-brokensep native
do_configure () {
oe_runconf
}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' 'TMPDIR=${T}' install
+}
diff --git a/meta/recipes-devtools/m4/m4.inc b/meta/recipes-devtools/m4/m4.inc
index 4a83929f0c..e473e23824 100644
--- a/meta/recipes-devtools/m4/m4.inc
+++ b/meta/recipes-devtools/m4/m4.inc
@@ -5,6 +5,7 @@ GNU M4 also has built-in functions for including files, running shell commands,
inherit autotools texinfo
+EXTRA_OECONF += "--without-libsigsegv-prefix"
EXTRA_OEMAKE += "'infodir=${infodir}'"
LDFLAGS_prepend_libc-uclibc = " -lrt "
SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/meta/recipes-devtools/make/make_4.0.bb b/meta/recipes-devtools/make/make_4.1.bb
index 38d328c8a5..a1b0d7c45f 100644
--- a/meta/recipes-devtools/make/make_4.0.bb
+++ b/meta/recipes-devtools/make/make_4.1.bb
@@ -6,7 +6,7 @@ require make.inc
EXTRA_OECONF += "--without-guile"
-SRC_URI[md5sum] = "571d470a7647b455e3af3f92d79f1c18"
-SRC_URI[sha256sum] = "e60686c7afede62cc8c86ad3012cf081ea4887daf9d223ce7115703b2bb2dbdb"
+SRC_URI[md5sum] = "57a7a224a822f94789a587ccbcedff69"
+SRC_URI[sha256sum] = "0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
index dd9bea2619..92d5870f42 100644
--- a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
+++ b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
@@ -5,11 +5,9 @@ SECTION = "base"
SRC_URI = "file://makedevs.c \
file://COPYING.patch"
-FILES_${PN}_append_class-nativesdk = " ${datadir}"
+S = "${WORKDIR}"
-do_configure() {
- install -m 0644 ${WORKDIR}/makedevs.c ${S}/
-}
+FILES_${PN}_append_class-nativesdk = " ${datadir}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} -o ${S}/makedevs ${S}/makedevs.c
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index bcf68a8e37..28aff9124e 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -14,6 +14,8 @@ SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
file://fix-makefile-to-find-libz.patch \
"
+CLEANBROKEN = "1"
+
S = "${WORKDIR}/git/util/mkelfImage"
CFLAGS += "-fno-stack-protector"
diff --git a/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch b/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
new file mode 100644
index 0000000000..75500a029a
--- /dev/null
+++ b/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
@@ -0,0 +1,18 @@
+In cross builds we will have to respect sysroot
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: mklibs-0.1.39/src/mklibs
+===================================================================
+--- mklibs-0.1.39.orig/src/mklibs 2014-03-01 18:25:36.000000000 +0000
++++ mklibs-0.1.39/src/mklibs 2014-10-19 00:51:46.813534596 +0000
+@@ -495,7 +495,7 @@
+ present_symbols = {}
+ checked_libs = small_libs
+ checked_libs.extend(available_libs)
+- checked_libs.append(ldlib)
++ checked_libs.append(sysroot + ldlib)
+ for lib in checked_libs:
+ for symbol in provided_symbols(lib):
+ debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
index ff8d5003ee..b2fcae576a 100644
--- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb
+++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
@@ -9,13 +9,10 @@ DEPENDS = "python-native dpkg-native"
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.xz \
file://ac_init_fix.patch\
file://fix_STT_GNU_IFUNC.patch\
+ file://sysrooted-ldso.patch \
"
-SRC_URI[md5sum] = "38a579a531401eb76f4bab4ccfb774a2"
-SRC_URI[sha256sum] = "fa2881ab4fe72b0504878357f1fc6b17920459b56e8a60dfb083ca28fb64e733"
+SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
+SRC_URI[sha256sum] = "1db24ae779d21ccfed49f22e49a2b7ee43ec0e9197bc206d81cd02f96e91e125"
inherit autotools gettext native pythonnative
-
-do_configure_prepend() {
- sed "s+MKLIBS_VERSION+${PV}+" ${S}/configure.ac
-}
diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index d88520c786..c54e3513f5 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=17;md5=d7747fc87f1eb22b946ef819969503f0"
BRANCH ?= "master"
-SRCREV = "11f2ceabc4ad3f0dd568e0ce68166e4803e0615b"
+SRCREV = "f4eb241519f8d500ce6068a70d2389be39ac5189"
PV = "0.1"
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
new file mode 100644
index 0000000000..05f1629d58
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Pending
+
+NEON instruction VLD1.64 was used to copy 64 bits data after type
+casting, and they will trigger alignment trap.
+This patch uses memcpy to avoid alignment problem.
+
+Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+
+diff --git a/mkfs.ubifs/key.h b/mkfs.ubifs/key.h
+index d3a02d4..e7e9218 100644
+--- a/mkfs.ubifs/key.h
++++ b/mkfs.ubifs/key.h
+@@ -141,10 +141,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
+ */
+ static inline void key_write(const union ubifs_key *from, void *to)
+ {
+- union ubifs_key *t = to;
++ __le32 x[2];
+
+- t->j32[0] = cpu_to_le32(from->u32[0]);
+- t->j32[1] = cpu_to_le32(from->u32[1]);
++ x[0] = cpu_to_le32(from->u32[0]);
++ x[1] = cpu_to_le32(from->u32[1]);
++
++ memcpy(to, &x, 8);
+ memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
+ }
+
+@@ -156,10 +158,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
+ */
+ static inline void key_write_idx(const union ubifs_key *from, void *to)
+ {
+- union ubifs_key *t = to;
++ __le32 x[2];
++
++ x[0] = cpu_to_le32(from->u32[0]);
++ x[1] = cpu_to_le32(from->u32[1]);
+
+- t->j32[0] = cpu_to_le32(from->u32[0]);
+- t->j32[1] = cpu_to_le32(from->u32[1]);
++ memcpy(to, &x, 8);
+ }
+
+ /**
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index f78bc7e7f9..52297c63ba 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+ file://fix-armv7-neon-alignment.patch \
"
PV = "1.5.1+git${SRCPV}"
diff --git a/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch b/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
new file mode 100644
index 0000000000..cb454917ff
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Backport
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ Makefile.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 8f9305a..694e837 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -251,6 +251,7 @@ install-scripts: ${DESTDIR}$(bindir)/mtools
+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ @for j in $(SCRIPTS) ; do \
+ $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
++ $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
+ echo ${DESTDIR}$(bindir)/$$j ; \
+ done
+ rm -f ${DESTDIR}$(bindir)/lz
+--
+2.0.0
+
diff --git a/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index d995c8f042..f6dd3361c9 100644
--- a/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -31,7 +31,9 @@ RRECOMMENDS_${PN} = "\
SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
file://mtools-makeinfo.patch \
file://mtools.patch \
- file://no-x11.patch"
+ file://no-x11.patch \
+ file://fix-broken-lz.patch \
+"
SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
diff --git a/meta/recipes-devtools/nasm/nasm_2.11.02.bb b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
index db84ec579f..4a69a6a92e 100644
--- a/meta/recipes-devtools/nasm/nasm_2.11.02.bb
+++ b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
@@ -6,8 +6,8 @@ COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-SRC_URI[md5sum] = "3bbc8ed83115b8caf7931f35ec3bc5e0"
-SRC_URI[sha256sum] = "ece26b5ef565f94d19a72756d05965e424d2e5ca55f88b949852da70dd62f0e0"
+SRC_URI[md5sum] = "9d93e8df5f5c005567f47ed6ca3a93d4"
+SRC_URI[sha256sum] = "87b6d97d6981ca468f9dafda44cf1bb1ba122cec329d4d389af5db04fa0c3e6c"
inherit autotools-brokensep
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 2d16660742..2800a5deb7 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
PROVIDES += "virtual/update-alternatives"
-SRCREV = "d14458499af7dd41d8e424946c164961421b0ddb"
+SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
PV = "0.1.8+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/opkg-utils"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
index b121827ac7..0cf6b8be40 100644
--- a/meta/recipes-devtools/opkg/opkg-collateral.bb
+++ b/meta/recipes-devtools/opkg/opkg-collateral.bb
@@ -8,12 +8,14 @@ SRC_URI = "file://opkg.conf.comments \
file://dest \
file://src "
+S = "${WORKDIR}"
+
OPKGLIBDIR = "${localstatedir}/lib"
do_compile () {
cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
- echo "lists_dir ext ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
+ echo "option lists_dir ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
}
do_install () {
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index ba21d84960..56c54b6ab7 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -27,7 +27,7 @@ OPKGLIBDIR = "${target_localstatedir}/lib"
PACKAGECONFIG ??= ""
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
index cf95ee22c6..48de923590 100644
--- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch
+++ b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
@@ -1,4 +1,4 @@
-From 45a1e33a048f479b15b99d09df3dd1b62fef0253 Mon Sep 17 00:00:00 2001
+From 60c3f93e95a3ca54ef0a7eebc5ef29a5d92d3110 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:20:22 +0000
Subject: [PATCH 2/2] opkg-0.2.x: add-exclude
@@ -12,10 +12,14 @@ no error will be generated.
The lifespan of the exclude_list covers the execution of the process,
so there is no need to free the data.
-Upstream-Status: Pending
+v2: Use xmalloc instead of malloc and xrealloc instead of realloc. In opkg,
+these functions are guaranteed not to return NULL.
+
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
libopkg/opkg_conf.c | 1 +
libopkg/opkg_conf.h | 2 ++
@@ -24,10 +28,10 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
4 files changed, 34 insertions(+)
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
-index 1e65bad..9c4c854 100644
+index 4eee37b..1ab63fb 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
-@@ -442,6 +442,7 @@ opkg_conf_init(void)
+@@ -447,6 +447,7 @@ opkg_conf_init(void)
pkg_dest_list_init(&conf->pkg_dest_list);
pkg_dest_list_init(&conf->tmp_dest_list);
nv_pair_list_init(&conf->arch_list);
@@ -36,7 +40,7 @@ index 1e65bad..9c4c854 100644
return 0;
}
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 6045a58..ad58849 100644
+index 2f189e0..6d6e613 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -51,6 +51,8 @@ struct opkg_conf
@@ -49,10 +53,10 @@ index 6045a58..ad58849 100644
int restrict_to_default_dest;
pkg_dest_t *default_dest;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index d2d279e..b572e18 100644
+index 41bf206..eb630d1 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -212,6 +212,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -204,6 +204,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
continue;
}
@@ -76,7 +80,7 @@ index d2d279e..b572e18 100644
if (satisfying_pkg != NULL) {
satisfier_entry_pkg = satisfying_pkg;
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index 0315d41..0db2794 100644
+index 6378380..f10d10b 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -45,6 +45,7 @@ enum {
@@ -87,7 +91,7 @@ index 0315d41..0db2794 100644
ARGS_OPT_NOACTION,
ARGS_OPT_DOWNLOAD_ONLY,
ARGS_OPT_NODEPS,
-@@ -95,6 +96,7 @@ static struct option long_options[] = {
+@@ -97,6 +98,7 @@ static struct option long_options[] = {
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
{"add-dest", 1, 0, ARGS_OPT_ADD_DEST},
@@ -95,7 +99,7 @@ index 0315d41..0db2794 100644
{"test", 0, 0, ARGS_OPT_NOACTION},
{"tmp-dir", 1, 0, 't'},
{"tmp_dir", 1, 0, 't'},
-@@ -198,6 +200,18 @@ args_parse(int argc, char *argv[])
+@@ -200,6 +202,18 @@ args_parse(int argc, char *argv[])
}
free(tuple);
break;
@@ -103,18 +107,18 @@ index 0315d41..0db2794 100644
+ tuple = xstrdup(optarg);
+ if (!conf->exclude_list) {
+ conf->exclude_count = 1;
-+ conf->exclude_list = malloc(sizeof(char *) * conf->exclude_count);
++ conf->exclude_list = xmalloc(sizeof(char *) * conf->exclude_count);
+ conf->exclude_list[conf->exclude_count - 1] = tuple;
+ } else {
+ conf->exclude_count++;
-+ conf->exclude_list = realloc(conf->exclude_list, sizeof(char *) * conf->exclude_count);
++ conf->exclude_list = xrealloc(conf->exclude_list, sizeof(char *) * conf->exclude_count);
+ conf->exclude_list[conf->exclude_count - 1] = tuple;
+ }
+ break;
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
-@@ -282,6 +296,7 @@ usage()
+@@ -287,6 +301,7 @@ usage()
printf("\t--offline-root <dir> offline installation of packages.\n");
printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n");
printf("\t--add-dest <name>:<path> Register destination with given path\n");
@@ -123,5 +127,5 @@ index 0315d41..0db2794 100644
printf("\t than the higher version one if more\n");
printf("\t than one candidate is found.\n");
--
-1.9.1
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
new file mode 100644
index 0000000000..5e5eafcd97
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
@@ -0,0 +1,39 @@
+From 41425d67d3589b1912416a17f740d6407c7834f2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 8 Oct 2014 19:53:13 +0800
+Subject: [PATCH] libopkg/opkg_remove.c: avoid remove pkg repeatly with option
+ --force-removal-of-dependent-packages
+
+While remove pkg with '--force-removal-of-dependent-packages',
+pkg may be added to pkgs remove list multiple times, add status
+check to make sure pkg only be removed once.
+
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ libopkg/opkg_remove.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
+index 34f9154..a225e41 100644
+--- a/libopkg/opkg_remove.c
++++ b/libopkg/opkg_remove.c
+@@ -250,6 +250,14 @@ opkg_remove_pkg(pkg_t *pkg, int from_upgrade)
+ if ((parent_pkg = pkg->parent) == NULL)
+ return 0;
+
++ /* While remove pkg with '--force-removal-of-dependent-packages',
++ pkg may be added to remove list multiple times, add status
++ check to make sure pkg only be removed once. */
++ if (conf->force_removal_of_dependent_packages &&
++ pkg->state_flag & SF_FILELIST_CHANGED &&
++ pkg->state_status == SS_NOT_INSTALLED)
++ return 0;
++
+ /* only attempt to remove dependent installed packages if
+ * force_depends is not specified or the package is being
+ * replaced.
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
index bcca56c6ce..c2d244d26e 100644
--- a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
+++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
@@ -1,11 +1,11 @@
-From 610207c9bc82f20c77d6f234465e36857c997ea0 Mon Sep 17 00:00:00 2001
+From 2e2ccc7e7fc81a7eee2d004d3644efbc1be1ad73 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:19:08 +0000
Subject: [PATCH 1/2] opkg-0.2.x: no-install-recommends
Add the ability to not install ANY recommended packages.
-Upstream-Status: Pending
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
@@ -15,7 +15,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 38fa375..6045a58 100644
+index e0e045a..2f189e0 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -82,6 +82,7 @@ struct opkg_conf
@@ -27,10 +27,10 @@ index 38fa375..6045a58 100644
char *overlay_root;
int query_all;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index a4df7de..d2d279e 100644
+index 8ab6508..41bf206 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -19,6 +19,7 @@
+@@ -21,6 +21,7 @@
#include <ctype.h>
#include "pkg.h"
@@ -38,7 +38,7 @@ index a4df7de..d2d279e 100644
#include "opkg_utils.h"
#include "pkg_hash.h"
#include "opkg_message.h"
-@@ -204,7 +205,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -196,7 +197,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
/* user request overrides package recommendation */
if (satisfying_pkg != NULL
&& (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
@@ -48,18 +48,18 @@ index a4df7de..d2d279e 100644
"%s at user request\n",
pkg->name, satisfying_pkg->name);
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index b711511..0315d41 100644
+index a1d121f..6378380 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
-@@ -50,6 +50,7 @@ enum {
- ARGS_OPT_NODEPS,
+@@ -51,6 +51,7 @@ enum {
ARGS_OPT_AUTOREMOVE,
ARGS_OPT_CACHE,
+ ARGS_OPT_COMBINE,
+ ARGS_OPT_NOINSTALL_RECOMMENDS,
};
static struct option long_options[] = {
-@@ -89,6 +90,7 @@ static struct option long_options[] = {
+@@ -91,6 +92,7 @@ static struct option long_options[] = {
{"noaction", 0, 0, ARGS_OPT_NOACTION},
{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
{"nodeps", 0, 0, ARGS_OPT_NODEPS},
@@ -67,7 +67,7 @@ index b711511..0315d41 100644
{"offline", 1, 0, 'o'},
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
-@@ -199,6 +201,9 @@ args_parse(int argc, char *argv[])
+@@ -201,6 +203,9 @@ args_parse(int argc, char *argv[])
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
@@ -77,7 +77,7 @@ index b711511..0315d41 100644
case ARGS_OPT_DOWNLOAD_ONLY:
conf->download_only = 1;
break;
-@@ -293,6 +298,8 @@ usage()
+@@ -300,6 +305,8 @@ usage()
printf("\t--noaction No action -- test only\n");
printf("\t--download-only No action -- download only\n");
printf("\t--nodeps Do not follow dependencies\n");
@@ -87,5 +87,5 @@ index b711511..0315d41 100644
printf("\t Remove package and all dependencies\n");
printf("\t--autoremove Remove packages that were installed\n");
--
-1.9.1
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
new file mode 100644
index 0000000000..8bde02af0d
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
@@ -0,0 +1,32 @@
+From d480d837ff57e855d1cf0b63054d6b1ad7aaf2ee Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 6 Jan 2015 17:54:43 -0800
+Subject: [PATCH] Makefile.am: remove ACLOCAL_AMFLAGS = -I shave -I m4
+
+Fixed:
+libtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I shave.
+
+They are already included by configure.ac:
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIR([shave])
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8baa62c..6679f77 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-ACLOCAL_AMFLAGS = -I shave -I m4
+-
+ SUBDIRS = libbb libopkg src tests utils man
+
+
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.2.bb b/meta/recipes-devtools/opkg/opkg_0.2.2.bb
deleted file mode 100644
index 3dd74898b3..0000000000
--- a/meta/recipes-devtools/opkg/opkg_0.2.2.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require opkg.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://no-install-recommends.patch \
- file://add-exclude.patch \
- file://opkg-configure.service \
-"
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-SRC_URI[md5sum] = "b3ecef90d67d2aed2a14c2116a027482"
-SRC_URI[sha256sum] = "aa554ce7538544aac4f69e8274a0f9b8b433b8c3b1d00704bd393f713303a12b"
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
new file mode 100644
index 0000000000..0d08bf9e7e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
@@ -0,0 +1,14 @@
+require opkg.inc
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://no-install-recommends.patch \
+ file://add-exclude.patch \
+ file://opkg-configure.service \
+ file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
+ file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \
+"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd"
+SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086"
diff --git a/meta/recipes-devtools/orc/orc_0.4.18.bb b/meta/recipes-devtools/orc/orc_0.4.18.bb
deleted file mode 100644
index 2375d8c696..0000000000
--- a/meta/recipes-devtools/orc/orc_0.4.18.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require orc.inc
-
-PR = "${INC_PR}.0"
-
-SRC_URI[orc.md5sum] = "1a2552e8d127526c48d644fe6437b377"
-SRC_URI[orc.sha256sum] = "34d3c8a7259f42bed4dcfbc106c5e3d0cc8e17eeaa73128d1c5eaf92883a6a24"
diff --git a/meta/recipes-devtools/orc/orc.inc b/meta/recipes-devtools/orc/orc_0.4.23.bb
index b1348310ab..0e07731ac6 100644
--- a/meta/recipes-devtools/orc/orc.inc
+++ b/meta/recipes-devtools/orc/orc_0.4.23.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "http://code.entropywave.com/projects/orc/"
LICENSE = "BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-INC_PR = "r2"
-
-SRC_URI = "http://code.entropywave.com/download/orc/orc-${PV}.tar.gz;name=orc"
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz;name=orc"
+SRC_URI[orc.md5sum] = "72e0612ace54d77aa2f7a006348ee81a"
+SRC_URI[orc.sha256sum] = "767eaebce2941737b43368225ec54598b3055ca78b4dc50c4092f5fcdc0bdfe7"
inherit autotools pkgconfig
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
new file mode 100644
index 0000000000..f4f0ef870e
--- /dev/null
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
@@ -0,0 +1,26 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- uuid-1.6.2.orig/Makefile.in
++++ uuid-1.6.2/Makefile.in
+@@ -113,15 +113,15 @@ all: $(TARGETS)
+ @$(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+ $(LIB_NAME): $(LIB_OBJS)
+- @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
++ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+ $(DCE_NAME): $(DCE_OBJS)
+- @$(LIBTOOL) --mode=link $(CC) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \
++ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+ $(CXX_NAME): $(CXX_OBJS)
+- @$(LIBTOOL) --mode=link $(CXX) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \
++ @$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \
+ -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h`
+
+ $(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb b/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
index f524854a2d..160990c142 100644
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
@@ -25,6 +25,7 @@ SRC_URI = "http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz \
file://uuid-libtool.patch \
file://uuid-nostrip.patch \
file://install-pc.patch \
+ file://ldflags.patch \
"
SRC_URI[md5sum] = "5db0d43a9022a6ebbbc25337ae28942f"
SRC_URI[sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"
diff --git a/meta/recipes-devtools/patchelf/patchelf_0.8.bb b/meta/recipes-devtools/patchelf/patchelf_0.8.bb
new file mode 100644
index 0000000000..c1b87f5539
--- /dev/null
+++ b/meta/recipes-devtools/patchelf/patchelf_0.8.bb
@@ -0,0 +1,12 @@
+SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2"
+LICENSE = "GPLv3"
+SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
+
+SRC_URI[md5sum] = "5b151e3c83b31f5931b4a9fc01635bfd"
+SRC_URI[sha256sum] = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
index e79347f679..ea3d78ebaa 100644
--- a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb
+++ b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
@@ -9,8 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz"
-SRC_URI[md5sum] = "bc42279c5aff3682c12be40f72805cec"
-SRC_URI[sha256sum] = "844ff25b1a11bcef92ef34b22f576f226a772b67196818656f8874513438f5b9"
+SRC_URI[md5sum] = "34c41888cec67759c21333bef13e950c"
+SRC_URI[sha256sum] = "578801df0661b1b7b8fed0ce4a9859239f919fd37529907681e51091a1bcb4de"
+
+RDEPENDS_${PN} += "bash python"
do_install() {
oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 26241e884c..9ccd417398 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -1,15 +1,13 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
DEPENDS += "expat expat-native"
-PR = "r3"
-
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
-SRC_URI[md5sum] = "c320d2ffa459e6cdc6f9f59c1185855e"
-SRC_URI[sha256sum] = "b48197cd2265a26c5f016489f11a7b450d8833cb8b3d6a46ee15975740894de9"
+SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
+SRC_URI[sha256sum] = "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216"
S = "${WORKDIR}/XML-Parser-${PV}"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
index 1fcb3224e8..b72afc0ca4 100644
--- a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
@@ -6,7 +6,7 @@ on top of an underlying XML parsing module to maintain XML files \
where the original uses plain Perl or SAX parsers."
HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7dbb3e2241fac8457967053fc1a1ddb"
DEPENDS += "libxml-parser-perl"
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/config.sh b/meta/recipes-devtools/perl/perl-5.20.0/config.sh
index 2532c8d413..1ac1355829 100644
--- a/meta/recipes-devtools/perl/perl-5.20.0/config.sh
+++ b/meta/recipes-devtools/perl/perl-5.20.0/config.sh
@@ -1104,3 +1104,10 @@ usekernprocpathname='undef'
usensgetexecutablepath='undef'
st_ino_sign='1'
st_ino_size='4'
+
+# for Time-HiRes
+d_clock_nanosleep='define'
+d_clock_gettime='define'
+d_clock_getres='define'
+d_clock='define'
+d_nanosleep='define'
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch b/meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch
new file mode 100644
index 0000000000..9ec041c833
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Backport
+Reference: https://rt.perl.org/Public/Bug/Display.html?id=123591
+ From 62db6ea5fed19611596cbc5fc0b8a4df2c604e58 Mon Sep 17 00:00:00 2001
+ From: Tony Cook <tony@develop-help.com>
+ Date: Mon, 19 Jan 2015 16:03:18 +1100
+ Subject: [PATCH 1/1] [perl #123538] always set chophere and itembytes at the same time
+
+ Previously this would crash in FF_MORE because chophere was still NULL.
+
+Signed-off-by: Gary Thomas <gary@mlbassoc.com>
+Index: perl-5.20.0/pp_ctl.c
+===================================================================
+--- perl-5.20.0.orig/pp_ctl.c
++++ perl-5.20.0/pp_ctl.c
+@@ -590,6 +590,7 @@ PP(pp_formline)
+ break;
+ }
+ itembytes = s - item;
++ chophere = s;
+ break;
+ }
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
new file mode 100644
index 0000000000..de6f65294c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
@@ -0,0 +1,30 @@
+make_ext.pl: fix regenerate makefile failed while $cc changed
+
+While $cc changed, the existance of 'xdefine' caused makefile
+regeneration failed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ make_ext.pl | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/make_ext.pl b/make_ext.pl
+index b433762..9fc1a36 100644
+--- a/make_ext.pl
++++ b/make_ext.pl
+@@ -335,6 +335,10 @@ sub build_extension {
+ print "Deleting non-Cross makefile\n";
+ close $mfh or die "close $makefile: $!";
+ _unlink($makefile);
++ if(-e 'xdefine') {
++ print "Deleting xdefine for regenerate makefile\n";
++ _unlink('xdefine');
++ }
+ }
+ }
+ }
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/run-ptest b/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
index ed59b4b145..1e2dd1b66d 100644
--- a/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
+++ b/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
@@ -1,2 +1,2 @@
#!/bin/sh
-cd t && ./TEST | sed -u -e 's/^\([^. \t]*\)\.\.\.\+ok/PASS: \1/' -e 's/^\([^. \t]*\)\.\.\.\+skipped/SKIP: \1/' -e 's/^\([^. \t]*\)\.\.\.\+\(.*\)/FAIL: \1\n\2/'
+cd t && ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
diff --git a/meta/recipes-devtools/perl/perl-native_5.20.0.bb b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
index 4364d41b35..586a347c0f 100644
--- a/meta/recipes-devtools/perl/perl-native_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
@@ -103,8 +103,13 @@ do_install () {
install $i ${D}${libdir}/perl/${PV}/CORE
done
- create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
- create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
+ create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
+ create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
+
+ # Use /usr/bin/env nativeperl for the perl script.
+ for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+ sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+ done
}
SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index 6a9df4ad4a..948ea7cddf 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -8,7 +8,7 @@ do_install_ptest () {
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
index 47a7548de4..041471a046 100644
--- a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
@@ -12,6 +12,8 @@
#| sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;'
#| egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-build-.*|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' > /tmp/
+RDEPENDS_perl-misc += "perl"
+RDEPENDS_${PN}-pod += "perl"
# Some additional dependencies that the above doesn't manage to figure out
RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
@@ -345,36 +347,56 @@ RDEPENDS_${PN}-module-corelist += "${PN}-module-strict"
RDEPENDS_${PN}-module-corelist += "${PN}-module-vars"
RDEPENDS_${PN}-module-corelist += "${PN}-module-version"
RDEPENDS_${PN}-module-corelist += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-archive-tar"
RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-build"
RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-config-git"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-compress-zlib"
RDEPENDS_${PN}-module-cpan += "${PN}-module-cpan"
RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-md5"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-sha"
RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-cbuilder"
RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm-unix"
RDEPENDS_${PN}-module-cpan += "${PN}-module-fcntl"
RDEPENDS_${PN}-module-cpan += "${PN}-module-file-basename"
RDEPENDS_${PN}-module-cpan += "${PN}-module-file-copy"
RDEPENDS_${PN}-module-cpan += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-glob"
RDEPENDS_${PN}-module-cpan += "${PN}-module-filehandle"
RDEPENDS_${PN}-module-cpan += "${PN}-module-file-path"
RDEPENDS_${PN}-module-cpan += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-http-tiny"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-io-compress-base"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-json-pp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
RDEPENDS_${PN}-module-cpan += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ftp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-parse-cpan-meta"
RDEPENDS_${PN}-module-cpan += "${PN}-module-posix"
RDEPENDS_${PN}-module-cpan += "${PN}-module-safe"
RDEPENDS_${PN}-module-cpan += "${PN}-module-scalar-util"
RDEPENDS_${PN}-module-cpan += "${PN}-module-strict"
RDEPENDS_${PN}-module-cpan += "${PN}-module-sys-hostname"
RDEPENDS_${PN}-module-cpan += "${PN}-module-term-readline"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-test-harness"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-test-more"
RDEPENDS_${PN}-module-cpan += "${PN}-module-text-parsewords"
RDEPENDS_${PN}-module-cpan += "${PN}-module-text-wrap"
RDEPENDS_${PN}-module-cpan += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-unicore"
RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
RDEPENDS_${PN}-module-cpan += "${PN}-module-version"
RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
diff --git a/meta/recipes-devtools/perl/perl_5.20.0.bb b/meta/recipes-devtools/perl/perl_5.20.0.bb
index 4bd452512d..db65202ec8 100644
--- a/meta/recipes-devtools/perl/perl_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "devel"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
# We need gnugrep (for -I)
@@ -63,6 +63,7 @@ SRC_URI += " \
file://fix_bad_rpath.patch \
file://perl-archlib-exp.patch \
file://dynaloaderhack.patch \
+ file://fix-FF_MORE-crash.patch \
\
\
file://config.sh \
@@ -74,6 +75,7 @@ SRC_URI += " \
file://config.sh-64-be \
file://perl-5.14.3-fix-CVE-2010-4777.patch \
file://0001-Makefile.SH-fix-do_install-failed.patch \
+ file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
"
# Fix test case issues
@@ -93,6 +95,11 @@ HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
# Where to find .so files - use the -native versions not those from the target build
export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+# Where to find perl @INC/#include files
+# - use the -native versions not those from the target build
+export PERL_LIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+export PERL_ARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+
# LDFLAGS for shared libraries
export LDDLFLAGS = "${LDFLAGS} -shared"
@@ -116,6 +123,16 @@ do_configure() {
# Make hostperl in build directory be the native perl
ln -sf ${HOSTPERL} hostperl
+ if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+ if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
+ ${MAKE} clean
+ fi
+ find ${S} -name *.so -delete
+ fi
+ if [ -n "${CONFIGURESTAMPFILE}" ]; then
+ echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+ fi
+
# Do our work in the cross subdir
cd Cross
@@ -188,7 +205,7 @@ do_compile() {
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" ext/Errno/Errno_pm.PL
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" cpan/Compress-Raw-Zlib/config.in
sed -i -e 's|/usr/lib|""|g' cpan/Compress-Raw-Zlib/config.in
- sed -i -e 's|SYSROOTLIB|${STAGING_LIBDIR}|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+ sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
cd Cross
oe_runmake perl LD="${CCLD}"
@@ -220,7 +237,7 @@ do_install() {
do_install_append_class-nativesdk () {
create_wrapper ${D}${bindir}/perl \
- PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+ PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}'
}
PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
index 62c886fce1..c4ada808ab 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -35,7 +35,7 @@ FILES_${PN} += "${datadir}/aclocal/pkg.m4"
# When using the RPM generated automatic package dependencies, some packages
# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
# specifying an appropriate provide.
-RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
# Install a pkg-config-native wrapper that will use the native sysroot instead
# of the MACHINE sysroot, for using pkg-config when building native tools.
diff --git a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
index 41b9a6e49e..7dc45c68f2 100644
--- a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb
+++ b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
@@ -2,12 +2,12 @@ SUMMARY = "Postinstall scriptlets"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-FILES_${PN}_append_class-nativesdk = " ${datadir}/postinst-intercepts/*"
+FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
-do_install_append_class-nativesdk() {
+do_install() {
install -d ${D}${datadir}/postinst-intercepts
install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
@@ -15,5 +15,5 @@ do_install_append_class-nativesdk() {
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
}
-BBCLASSEXTEND = "nativesdk"
+inherit nativesdk
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 3288822102..56781a4091 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -8,7 +8,7 @@ and executables, so that far fewer relocations need to be resolved at \
runtime and thus programs come up faster."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "6822ec76aa95f278195aeae59d4868ef224d7e4d"
+SRCREV = "faa069deec99bf61418d0bab831c83d7c1b797ca"
PV = "1.0+git${SRCPV}"
#
diff --git a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch b/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
deleted file mode 100644
index b5c81c9d3e..0000000000
--- a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-From be97cb958f2934fa398fc8e344b25b84ebd4e90c Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 25 Aug 2013 19:22:09 -0500
-Subject: [PATCH] pseudo_has_unload: add function
-
-Various wrappers checked for a non-null pseudo_get_value("PSEUDO_UNLOAD") to
-determine whether the environment should include the pseudo variables. None
-of those checks freed the returned value when it was not null. The new
-check function does.
-
-The new check function also sees whether PSEUDO_UNLOAD was defined in the
-environment that should be used in the wrapped system call. This allows
-pkg_postinst scripts to strip out the LD_PRELOAD setting, for example before
-invoking qemu to execute commands in an environment that does not have
-libpseudo.so.
-
-[YOCTO #4843]
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- ports/common/guts/execv.c | 2 +-
- ports/common/guts/execve.c | 2 +-
- ports/common/guts/execvp.c | 2 +-
- ports/common/guts/fork.c | 2 +-
- ports/linux/newclone/pseudo_wrappers.c | 2 +-
- ports/linux/oldclone/pseudo_wrappers.c | 2 +-
- ports/unix/guts/popen.c | 2 +-
- ports/unix/guts/system.c | 2 +-
- pseudo.h | 1 +
- pseudo_util.c | 27 +++++++++++++++++++++++++++
- 10 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/ports/common/guts/execv.c b/ports/common/guts/execv.c
-index 763e1f9..3e1f820 100644
---- a/ports/common/guts/execv.c
-+++ b/ports/common/guts/execv.c
-@@ -19,7 +19,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execve.c b/ports/common/guts/execve.c
-index a003657..ff6a44e 100644
---- a/ports/common/guts/execve.c
-+++ b/ports/common/guts/execve.c
-@@ -20,7 +20,7 @@
- }
-
- new_environ = pseudo_setupenvp(envp);
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(new_environ))
- new_environ = pseudo_dropenvp(new_environ);
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execvp.c b/ports/common/guts/execvp.c
-index 5e75be7..04253c3 100644
---- a/ports/common/guts/execvp.c
-+++ b/ports/common/guts/execvp.c
-@@ -20,7 +20,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/fork.c b/ports/common/guts/fork.c
-index df8abd7..bebe3b0 100644
---- a/ports/common/guts/fork.c
-+++ b/ports/common/guts/fork.c
-@@ -12,7 +12,7 @@
- */
- if (rc == 0) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/newclone/pseudo_wrappers.c b/ports/linux/newclone/pseudo_wrappers.c
-index 9dbac42..257e8bb 100644
---- a/ports/linux/newclone/pseudo_wrappers.c
-+++ b/ports/linux/newclone/pseudo_wrappers.c
-@@ -28,7 +28,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/oldclone/pseudo_wrappers.c b/ports/linux/oldclone/pseudo_wrappers.c
-index c0ce5dd..598d966 100644
---- a/ports/linux/oldclone/pseudo_wrappers.c
-+++ b/ports/linux/oldclone/pseudo_wrappers.c
-@@ -22,7 +22,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/unix/guts/popen.c b/ports/unix/guts/popen.c
-index 0ca16b0..5d44c0e 100644
---- a/ports/unix/guts/popen.c
-+++ b/ports/unix/guts/popen.c
-@@ -9,7 +9,7 @@
- * in ways that avoid our usual enforcement of the environment.
- */
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_popen(command, mode);
-diff --git a/ports/unix/guts/system.c b/ports/unix/guts/system.c
-index 028b372..6351592 100644
---- a/ports/unix/guts/system.c
-+++ b/ports/unix/guts/system.c
-@@ -9,7 +9,7 @@
- return 1;
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_system(command);
-diff --git a/pseudo.h b/pseudo.h
-index 56760a4..f600793 100644
---- a/pseudo.h
-+++ b/pseudo.h
-@@ -28,6 +28,7 @@ extern void pseudo_init_client(void);
- void pseudo_dump_env(char **envp);
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-+int pseudo_has_unload(char * const *envp);
-
- #include "pseudo_tables.h"
-
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 8d0969e..16c70e0 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -95,6 +95,33 @@ dump_env(char **envp) {
- }
- #endif
-
-+int
-+pseudo_has_unload(char * const *envp) {
-+ static const char unload[] = "PSEUDO_UNLOAD";
-+ static size_t unload_len = strlen(unload);
-+ size_t i = 0;
-+
-+ /* Is it in the caller environment? */
-+ if (NULL != getenv(unload))
-+ return 1;
-+
-+ /* Is it in the environment cache? */
-+ if (pseudo_util_initted == -1)
-+ pseudo_init_util();
-+ while (pseudo_env[i].key && strcmp(pseudo_env[i].key, unload))
-+ ++i;
-+ if (pseudo_env[i].key && pseudo_env[i].value)
-+ return 1;
-+
-+ /* Is it in the operational environment? */
-+ while (envp && *envp) {
-+ if ((!strncmp(*envp, unload, unload_len)) && ('=' == (*envp)[unload_len]))
-+ return 1;
-+ ++envp;
-+ }
-+ return 0;
-+}
-+
- /* Caller must free memory! */
- char *
- pseudo_get_value(const char *key) {
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/pseudo/files/fallback-group b/meta/recipes-devtools/pseudo/files/fallback-group
new file mode 100644
index 0000000000..81bf732312
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-group
@@ -0,0 +1,2 @@
+root:*:0:
+mail:*:8:
diff --git a/meta/recipes-devtools/pseudo/files/fallback-passwd b/meta/recipes-devtools/pseudo/files/fallback-passwd
new file mode 100644
index 0000000000..c1458dc0f6
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-passwd
@@ -0,0 +1 @@
+root::0:0:root:/home/root:/bin/sh
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
deleted file mode 100644
index e8eaf13f74..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Backport
-
-when install command sets the created directory mode, pseudo will change
-the mode of the directory to 0700 incorrectly.
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -25,6 +25,7 @@
- stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
- #endif
- if (stat_rc != -1) {
-+ buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
- pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
- } else {
- pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch b/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
deleted file mode 100644
index 7b1f82d577..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-commit 7e67d082737b3df4788caf85fedd607b3acd9786
-Author: Peter Seebach <peter.seebach@windriver.com>
-Date: Fri May 16 15:53:06 2014 -0500
-
- permissions updates: improve fchmodat, mask out write bits
-
- Upstream-Status: Backport of several patches from 1.6 branch,
- combined.
-
- Backport from pseudo 1.6 of improvements to fchmodat (handle
- AT_SYMLINK_NOFOLLOW by rejecting it if the host system does,
- to make GNU tar happier), also mask out write bits from filesystem
- modes to avoid security problems.
-
- Also start tracking umask so we can use the right modes for
- open, mkdir, and mknod.
-
- The 1.6 patches are:
-
- 87c53ea58befef48677846693aab445df1850e16
- 3c716e0bab4f0cfe4be84caa9ce5fd5e3f5e2a23
- c98e4f43b5d6499748a5057134408f4ba4854fb4
- 2f71a021b725c1aa415439209a89327f0b997d02
- 14925786b55202d8147b0af719038e8a23ef73c0
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index 113f675..cc966ce 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,18 @@
-+2014-05-27:
-+ * (seebs) start noticing umask, mask it out from open or mkdir
-+ calls rather than relying on underlying open/mkdir to do it.
-+
-+2014-05-16:
-+ * (seebs) fchmodat: don't drop flags, report failures, to improve
-+ compatibility/consistency. Cache the knowledge that
-+ AT_SYMLINK_NOFOLLOW gets ENOTSUP.
-+ * (seebs) mask out group/other write bits in real filesystem to
-+ reduce risks when assembling a rootfs including world-writeable
-+ directories.
-+
-+2014-05-15:
-+ * (seebs) drop flags when calling fchmodat() to appease GNU tar.
-+
- 2013-02-27:
- * (seebs) Oh, hey, what if I took out my debug messages?
- * (seebs) update docs a bit to reduce bitrot
-diff --git a/makewrappers b/makewrappers
-index e87cc56..0127766 100755
---- a/makewrappers
-+++ b/makewrappers
-@@ -204,6 +204,7 @@ class Function:
- 'uid_t': '0',
- 'int': '-1',
- 'long': '-1',
-+ 'mode_t': '0',
- 'ssize_t': '-1'
- }
-
-diff --git a/ports/darwin/guts/open.c b/ports/darwin/guts/open.c
-index c66cc15..520bb70 100644
---- a/ports/darwin/guts/open.c
-+++ b/ports/darwin/guts/open.c
-@@ -9,6 +9,9 @@
- struct stat buf = { };
- int existed = 1;
- int save_errno;
-+
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_FORCE_ASYNCH
- flags &= ~O_SYNC;
- #endif
-diff --git a/ports/linux/guts/__xmknodat.c b/ports/linux/guts/__xmknodat.c
-index 59b4f2f..0888b8a 100644
---- a/ports/linux/guts/__xmknodat.c
-+++ b/ports/linux/guts/__xmknodat.c
-@@ -9,6 +9,9 @@
- pseudo_msg_t *msg;
- struct stat64 buf;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- /* we don't use underlying call, so _ver is irrelevant to us */
- (void) ver;
-
-diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c
-index 8460073..4053549 100644
---- a/ports/linux/guts/openat.c
-+++ b/ports/linux/guts/openat.c
-@@ -10,6 +10,9 @@
- int existed = 1;
- int save_errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c
-index 59a92ce..69a953c 100644
---- a/ports/unix/guts/fchmodat.c
-+++ b/ports/unix/guts/fchmodat.c
-@@ -8,6 +8,7 @@
- */
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-+ static int picky_fchmodat = 0;
-
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
-@@ -15,6 +16,16 @@
- return -1;
- }
- if (flags & AT_SYMLINK_NOFOLLOW) {
-+ /* Linux, as of this writing, will always reject this.
-+ * GNU tar relies on getting the rejection. To cut down
-+ * on traffic, we check for the failure, and if we saw
-+ * a failure previously, we reject it right away and tell
-+ * the caller to retry.
-+ */
-+ if (picky_fchmodat) {
-+ errno = ENOTSUP;
-+ return -1;
-+ }
- rc = base_lstat(path, &buf);
- } else {
- rc = base_stat(path, &buf);
-@@ -50,13 +61,22 @@
-
- /* user bits added so "root" can always access files. */
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
-- /* note: if path was a symlink, and AT_NOFOLLOW_SYMLINKS was
-+ /* note: if path was a symlink, and AT_SYMLINK_NOFOLLOW was
- * specified, we already bailed previously. */
- real_chmod(path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)));
- #else
-- real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ rc = real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ /* AT_SYMLINK_NOFOLLOW isn't supported by fchmodat. GNU tar
-+ * tries to use it anyway, figuring it can just retry if that
-+ * fails. So we want to report that *particular* failure instead
-+ * of doing the fallback.
-+ */
-+ if (rc == -1 && errno == ENOTSUP && (flags & AT_SYMLINK_NOFOLLOW)) {
-+ picky_fchmodat = 1;
-+ return -1;
-+ }
- #endif
-- /* we ignore a failure from underlying fchmod, because pseudo
-+ /* we otherwise ignore failures from underlying fchmod, because pseudo
- * may believe you are permitted to change modes that the filesystem
- * doesn't. Note that we also don't need to know whether the
- * file might be a (pseudo) block device or some such; pseudo
-diff --git a/ports/unix/guts/mkdirat.c b/ports/unix/guts/mkdirat.c
-index e846b70..e0b6af9 100644
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -6,11 +6,14 @@
- * wrap_mkdirat(int dirfd, const char *path, mode_t mode) {
- * int rc = -1;
- */
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
- return -1;
- }
-+
- rc = real_mkdir(path, PSEUDO_FS_MODE(mode, 1));
- #else
- rc = real_mkdirat(dirfd, path, PSEUDO_FS_MODE(mode, 1));
-diff --git a/ports/unix/guts/mknodat.c b/ports/unix/guts/mknodat.c
-index 6fd5b42..5d8d47c 100644
---- a/ports/unix/guts/mknodat.c
-+++ b/ports/unix/guts/mknodat.c
-@@ -10,6 +10,9 @@
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/umask.c b/ports/unix/guts/umask.c
-new file mode 100644
-index 0000000..6b060d3
---- /dev/null
-+++ b/ports/unix/guts/umask.c
-@@ -0,0 +1,14 @@
-+/*
-+ * Copyright (c) 2014 Wind River Systems; see
-+ * guts/COPYRIGHT for information.
-+ *
-+ * mode_t umask(mode_t mask)
-+ * mode_t rc = 0;
-+ */
-+
-+ pseudo_umask = mask;
-+ rc = real_umask(mask);
-+
-+/* return rc;
-+ * }
-+ */
-diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in
-index 8460a65..e0e9739 100644
---- a/ports/unix/wrapfuncs.in
-+++ b/ports/unix/wrapfuncs.in
-@@ -67,3 +67,4 @@ void sync(void); /* async_skip= */
- int syncfs(int fd); /* async_skip=0 */
- int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); /* async_skip=0 */
- int msync(void *addr, size_t length, int flags); /* async_skip=0 */
-+mode_t umask(mode_t mask);
-diff --git a/pseudo_client.c b/pseudo_client.c
-index b6d11a6..535c810 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -71,6 +71,8 @@ int pseudo_disabled = 0;
- int pseudo_allow_fsync = 0;
- static int pseudo_local_only = 0;
-
-+int pseudo_umask = 022;
-+
- static char **fd_paths = NULL;
- static int nfds = 0;
- static int messages = 0;
-@@ -219,6 +221,9 @@ pseudo_init_client(void) {
- if (!pseudo_disabled && !pseudo_inited) {
- char *pseudo_path = 0;
-
-+ pseudo_umask = umask(022);
-+ umask(pseudo_umask);
-+
- pseudo_path = pseudo_prefix_path(NULL);
- if (pseudo_prefix_dir_fd == -1) {
- if (pseudo_path) {
-diff --git a/pseudo_client.h b/pseudo_client.h
-index f36a772..5bf820e 100644
---- a/pseudo_client.h
-+++ b/pseudo_client.h
-@@ -72,6 +72,8 @@ extern char *pseudo_passwd;
- extern size_t pseudo_chroot_len;
- extern int pseudo_nosymlinkexp;
-
-+extern int pseudo_umask;
-+
- /* Root can read and write files, and enter directories which have no
- * read, write, or execute permissions. (But can't execute files without
- * execute permissions!)
-@@ -85,6 +87,6 @@ extern int pseudo_nosymlinkexp;
- * None of this will behave very sensibly if umask has 0700 bits in it;
- * this is a known limitation.
- */
--#define PSEUDO_FS_MODE(mode, isdir) ((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0))
--#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0700) | ((user_mode & 0700)))
-+#define PSEUDO_FS_MODE(mode, isdir) (((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0)) & ~(S_IWGRP | S_IWOTH))
-+#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0722) | ((user_mode & 0722)))
-
diff --git a/meta/recipes-devtools/pseudo/files/shutdownping.patch b/meta/recipes-devtools/pseudo/files/shutdownping.patch
deleted file mode 100644
index 8af8e0b594..0000000000
--- a/meta/recipes-devtools/pseudo/files/shutdownping.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-There is a potential issue with the fastop code in pseudo since a process may
-exit and allow some other function to run before the server has processed
-the commands run by the process. Issues have been see with unpredictable
-file permissions.
-
-To avoid this, we ping the server before exitting which guarantees it has
-processed the current command queue.
-
-Debugged-by: RP
-Fix written by peter.seebach@windriver.com
-
-Upstream-Status: Submitted
-
-[YOCTO #5132]
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index f58ce4c..20943b6 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -75,6 +75,9 @@ static int nfds = 0;
- static int messages = 0;
- static struct timeval message_time = { .tv_sec = 0 };
- static int pseudo_inited = 0;
-+
-+static int sent_messages = 0;
-+
- int pseudo_nosymlinkexp = 0;
-
- /* note: these are int, not uid_t/gid_t, so I can use 'em with scanf */
-@@ -711,6 +714,11 @@ client_ping(void) {
- return 0;
- }
-
-+static void
-+void_client_ping(void) {
-+ client_ping();
-+}
-+
- int
- pseudo_fd(int fd, int how) {
- int newfd;
-@@ -1043,6 +1051,11 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
- /* disable wrappers */
- pseudo_antimagic();
-
-+ if (!sent_messages) {
-+ sent_messages = 1;
-+ atexit(void_client_ping);
-+ }
-+
- if (op == OP_RENAME) {
- va_list ap;
- va_start(ap, buf);
diff --git a/meta/recipes-devtools/pseudo/files/symver.patch b/meta/recipes-devtools/pseudo/files/symver.patch
deleted file mode 100644
index 8d1b377ec0..0000000000
--- a/meta/recipes-devtools/pseudo/files/symver.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-When running as pseudo-nativesdk, we might need to run host binaries
-linked against the host libc. Having a 2.14 libc dependency from memcpy is
-problematic so instruct the linker to use older symbols.
-
-Upstream-Status: Pending
-
-RP 2012/4/22
-
-Index: pseudo-1.3/pseudo.h
-===================================================================
---- pseudo-1.3.orig/pseudo.h 2012-04-22 12:17:59.078909060 +0000
-+++ pseudo-1.3/pseudo.h 2012-04-22 12:32:42.954888587 +0000
-@@ -29,6 +29,13 @@
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-
-+#ifdef __amd64__
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.2.5")
-+#else
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.0")
-+#endif
-+GLIBC_COMPAT_SYMBOL(memcpy);
-+
- #include "pseudo_tables.h"
-
- extern void pseudo_debug_verbose(void);
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 42738abfc5..11a8514675 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -7,11 +7,7 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
SECTION = "base"
LICENSE = "LGPL2.1"
-DEPENDS = "sqlite3"
-
-SRC_URI_append_class-nativesdk = " file://symver.patch"
-
-SRC_URI_append_class-native = " file://symver.patch"
+DEPENDS = "sqlite3 attr"
FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
deleted file mode 100644
index 47291fd52e..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require pseudo.inc
-
-PR = "r5"
-
-SRC_URI = " \
- http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://0001-pseudo_has_unload-add-function.patch \
- file://shutdownping.patch \
- file://pseudo-1.5.1-install-directory-mode.patch \
- file://pseudo-fchmodat-permissions.patch \
-"
-
-SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
-SRC_URI[sha256sum] = "3b896f592f4d568569bd02323fad2d6b8c398e16ca36ee5a8947d2ff6c1d3d52"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
new file mode 100644
index 0000000000..3d5b1fbd3e
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
@@ -0,0 +1,19 @@
+require pseudo.inc
+
+SRC_URI = " \
+ http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://fallback-passwd \
+ file://fallback-group \
+"
+
+SRC_URI[md5sum] = "2fb800c90d643bfce55e1ce5ca67f3b3"
+SRC_URI[sha256sum] = "25a7528f9191f74cceccc08a90c00086f2b3a9f6b900ea419a4f092de9a06775"
+
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+
+do_install_append_class-native () {
+ install -d ${D}${sysconfdir}
+ # The fallback files should never be modified
+ install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
+ install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+}
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 66fc85ff8d..b505910fb5 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,7 +1,7 @@
require pseudo.inc
-SRCREV = "b9eb2b5633b5a23efe72c950494728d93c2b5823"
-PV = "1.5.1+git${SRCPV}"
+SRCREV = "41389d4279d6a5f694615906217f481605b183b7"
+PV = "1.6.4+git${SRCPV}"
DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc
deleted file mode 100644
index 0738c59ada..0000000000
--- a/meta/recipes-devtools/python/fix-path.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-do_install_append() {
- for i in `find ${D} -name "*.py"` ; do \
- sed -i -e s:${D}::g $i
- done
-
- for i in `find ${D} -name "*.la"` ; do \
- sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
- done
-
- if test -e ${D}${bindir} ; then
- for i in ${D}${bindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-
- if test -e ${D}${sbindir} ; then
- for i in ${D}${sbindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-}
-
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc
index a8afe13a79..2e68a26cbd 100644
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ b/meta/recipes-devtools/python/python-2.7-manifest.inc
@@ -5,14 +5,18 @@
-PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
+SUMMARY_${PN}-argparse="Python command line argument parser"
+RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
+FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
+
SUMMARY_${PN}-audio="Python Audio Handling"
RDEPENDS_${PN}-audio="${PN}-core"
FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
@@ -37,6 +41,10 @@ SUMMARY_${PN}-compression="Python high-level compression support"
RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so "
+SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts. See PEP 343."
+RDEPENDS_${PN}-contextlib="${PN}-core"
+FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.py* "
+
SUMMARY_${PN}-core="Python interpreter and core modules"
RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
@@ -122,11 +130,11 @@ RDEPENDS_${PN}-importlib="${PN}-core"
FILES_${PN}-importlib="${libdir}/python2.7/importlib "
SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils"
+RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient"
FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
+RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so "
SUMMARY_${PN}-lang="Python low-level language support"
@@ -274,7 +282,7 @@ RDEPENDS_${PN}-zlib="${PN}-core"
FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/python/python-3.3-manifest.inc b/meta/recipes-devtools/python/python-3.3-manifest.inc
index 46a2d441af..61119c687c 100644
--- a/meta/recipes-devtools/python/python-3.3-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.3-manifest.inc
@@ -5,9 +5,9 @@
-PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
@@ -30,8 +30,8 @@ RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
FILES_${PN}-compression="${libdir}/python3.3/gzip.* ${libdir}/python3.3/zipfile.* ${libdir}/python3.3/tarfile.* ${libdir}/python3.3/lib-dynload/bz2.*.so "
SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copy_reg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
+FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copyreg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/_sysconfigdata.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
RDEPENDS_${PN}-crypt="${PN}-core"
@@ -185,6 +185,10 @@ SUMMARY_${PN}-readline="Python readline support"
RDEPENDS_${PN}-readline="${PN}-core"
FILES_${PN}-readline="${libdir}/python3.3/lib-dynload/readline.*.so ${libdir}/python3.3/rlcompleter.* "
+SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
+RDEPENDS_${PN}-reprlib="${PN}-core"
+FILES_${PN}-reprlib="${libdir}/python3.3/reprlib.py "
+
SUMMARY_${PN}-resource="Python resource control interface"
RDEPENDS_${PN}-resource="${PN}-core"
FILES_${PN}-resource="${libdir}/python3.3/lib-dynload/resource.*.so "
@@ -258,7 +262,7 @@ RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
FILES_${PN}-xmlrpc="${libdir}/python3.3/xmlrpclib.* ${libdir}/python3.3/SimpleXMLRPCServer.* ${libdir}/python3.3/DocXMLRPCServer.* ${libdir}/python3.3/xmlrpc "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/python/python-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
deleted file mode 100644
index b2850a3831..0000000000
--- a/meta/recipes-devtools/python/python-argparse_1.2.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Python command-line parsing library"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8"
-SRCNAME = "argparse"
-PR = "r4"
-RDEPENDS_${PN} += "python-codecs python-textutils"
-
-SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c"
-SRC_URI[sha256sum] = "ddaf4b0a618335a32b6664d4ae038a1de8fbada3b25033f9021510ed2b3941a4"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python-dbus_1.2.0.bb b/meta/recipes-devtools/python/python-dbus_1.2.0.bb
index e64f99f87a..b314dce1c7 100644
--- a/meta/recipes-devtools/python/python-dbus_1.2.0.bb
+++ b/meta/recipes-devtools/python/python-dbus_1.2.0.bb
@@ -14,6 +14,10 @@ S = "${WORKDIR}/dbus-python-${PV}"
inherit distutils-base autotools pkgconfig
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python-docutils-native python-epydoc-native"
+
export BUILD_SYS
export HOST_SYS
diff --git a/meta/recipes-devtools/python/python-distribute_0.6.32.bb b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
index 58bb8b4545..70001457e0 100644
--- a/meta/recipes-devtools/python/python-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -39,6 +39,12 @@ do_install_append() {
echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
}
+do_install_append_class-nativesdk() {
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install-${PYTHON_BASEVERSION}
+}
+
RDEPENDS_${PN} = "\
python-distutils \
python-compression \
@@ -46,4 +52,4 @@ RDEPENDS_${PN} = "\
RPROVIDES_${PN} += "python-setuptools"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-docutils_0.11.bb b/meta/recipes-devtools/python/python-docutils_0.12.bb
index f5da973d99..8cda88d277 100644
--- a/meta/recipes-devtools/python/python-docutils_0.11.bb
+++ b/meta/recipes-devtools/python/python-docutils_0.12.bb
@@ -2,13 +2,13 @@ SUMMARY = "Text processing system for documentation"
HOMEPAGE = "http://docutils.sourceforge.net"
SECTION = "devel/python"
LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=da0d261d1db78ab21ce86c79364a4098"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
DEPENDS = "python"
SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "20ac380a18b369824276864d98ec0ad6"
-SRC_URI[sha256sum] = "9af4166adf364447289c5c697bb83c52f1d6f57e77849abcccd6a4a18a5e7ec9"
+SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
+SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
S = "${WORKDIR}/docutils-${PV}"
diff --git a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb b/meta/recipes-devtools/python/python-git_0.3.3.bb
index 02a0eac040..860c37bf99 100644
--- a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb
+++ b/meta/recipes-devtools/python/python-git_0.3.3.bb
@@ -10,8 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
DEPENDS = "python-gitdb"
SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-SRC_URI[md5sum] = "849082fe29adc653a3621465213cab96"
-SRC_URI[sha256sum] = "fd6786684a0d0dd7ebb961da754e3312fafe0c8e88f55ceb09858aa0af6094e0"
+
+SRC_URI[md5sum] = "c9fdde02c476c11168fd620659496aba"
+SRC_URI[sha256sum] = "08193acf4e22b57a471cde3748ebce7c17e0f15f1e5042db74ca2c5e9e3e4db5"
S = "${WORKDIR}/GitPython-${PV}"
diff --git a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb b/meta/recipes-devtools/python/python-gitdb_0.6.1.bb
index 9e961528b9..ead93e1e7d 100644
--- a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb
+++ b/meta/recipes-devtools/python/python-gitdb_0.6.1.bb
@@ -6,8 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
DEPENDS = "python-async python-smmap"
SRC_URI = "https://pypi.python.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
-SRC_URI[md5sum] = "25353bb8d3ea527ba443dd88cd4e8a1c"
-SRC_URI[sha256sum] = "de5d2dac0daec4a9cd7bb1ae1cd42d53510dcf597397c608c12a154b69ad3783"
+
+SRC_URI[md5sum] = "daeb85a5e97d2d100fd37cf522fd65d5"
+SRC_URI[sha256sum] = "0d784ec4a75e93c8f65d4aca219c17e388a052d461714ed0edfda657e542b716"
S = "${WORKDIR}/gitdb-${PV}"
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb
index 0571d3a488..e55f5feac2 100644
--- a/meta/recipes-devtools/python/python-native_2.7.3.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.3.bb
@@ -19,6 +19,7 @@ SRC_URI += "\
file://parallel-makeinst-create-bindir.patch \
file://python-fix-build-error-with-Readline-6.3.patch \
file://gcc-4.8-fix-configure-Wformat.patch \
+ file://json-flaw-fix.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -57,4 +58,8 @@ do_install() {
# (these often end up too long for the #! parser in the kernel as the
# buffer is 128 bytes long).
ln -s python-native/python ${D}${bindir}/nativepython
+
+ # We don't want modules in ~/.local being used in preference to those
+ # installed in the native sysroot, so disable user site support.
+ sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
}
diff --git a/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64/config.h b/meta/recipes-devtools/python/python-numpy/mips64/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/config.h b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc64/config.h b/meta/recipes-devtools/python/python-numpy/powerpc64/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/powerpc64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
index f8974cf802..d4fd279230 100644
--- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb
+++ b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
@@ -42,6 +42,18 @@ CONFIGFILESURI_powerpc = " \
file://config.h \
file://_numpyconfig.h \
"
+CONFIGFILESURI_powerpc64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64n32 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
S = "${WORKDIR}/numpy-${PV}"
diff --git a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
index 5b59b6ccc1..70fe25c1a1 100644
--- a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
+++ b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
@@ -20,6 +20,8 @@ S = "${WORKDIR}/py2cairo-${PV}"
inherit distutils pkgconfig
+BBCLASSEXTEND = "native"
+
do_configure() {
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
}
diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
index 907380f1ca..c5349ee578 100644
--- a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
+++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
@@ -2,16 +2,16 @@ Upstream-Status: Pending
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Index: pycurl-7.19.3/setup.py
+Index: pycurl-7.19.3.1/setup.py
===================================================================
---- pycurl-7.19.3.orig/setup.py 2014-01-10 08:04:40.000000000 +0200
-+++ pycurl-7.19.3/setup.py 2014-02-04 15:09:08.411552887 +0200
-@@ -211,7 +211,7 @@
- # If neither --libs nor --static-libs work, fail.
- optbuf = ""
- errtext = ''
-- for option in ["--libs", "--static-libs"]:
-+ for option in ["--libs"]:
- p = subprocess.Popen((CURL_CONFIG, option),
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = p.communicate()
+--- pycurl-7.19.3.1.orig/setup.py 2014-07-16 12:57:24.065346887 +0000
++++ pycurl-7.19.3.1/setup.py 2014-07-16 12:57:53.057347678 +0000
+@@ -147,7 +147,7 @@
+ optbuf = ''
+ sslhintbuf = ''
+ errtext = ''
+- for option in ["--libs", "--static-libs"]:
++ for option in ["--libs"]:
+ p = subprocess.Popen((CURL_CONFIG, option),
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout, stderr = p.communicate()
diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.3.bb b/meta/recipes-devtools/python/python-pycurl_7.19.5.bb
index aee6cdda82..e4619c740e 100644
--- a/meta/recipes-devtools/python/python-pycurl_7.19.3.bb
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.5.bb
@@ -2,7 +2,7 @@ SUMMARY = "Python bindings for libcurl"
HOMEPAGE = "http://pycurl.sourceforge.net/"
SECTION = "devel/python"
LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=204;endline=219;md5=57e5ab0c0f964533fc59d93dec5695bb \
+LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=181;md5=57e5ab0c0f964533fc59d93dec5695bb \
file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
file://COPYING-MIT;md5=e8200955c773b2a0fd6cea36ea5e87be"
@@ -15,8 +15,8 @@ SRC_URI = "\
file://no-static-link.patch \
"
-SRC_URI[archive.md5sum] = "b9091b7438d3de1552e28862d2971cd1"
-SRC_URI[archive.sha256sum] = "05e48835fe445ff327dcd373f49d9970e0b828a07cd4d08a23264507a742d616"
+SRC_URI[archive.md5sum] = "47b4eac84118e2606658122104e62072"
+SRC_URI[archive.sha256sum] = "69a0aa7c9dddbfe4cebf4d1f674c490faccf739fc930d85d8990ce2fd0551a43"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils
@@ -29,6 +29,11 @@ export STAGING_LIBDIR
BBCLASSEXTEND = "native"
+# Ensure the docstrings are generated as make clean will remove them
+do_compile_prepend() {
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
+}
+
do_install_append() {
rm -rf ${D}${datadir}/share
}
diff --git a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
index 2e65b3808a..45a0603eb7 100644
--- a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
+++ b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
@@ -2,8 +2,8 @@ SUMMARY = "Python GObject bindings"
SECTION = "devel/python"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-DEPENDS = "python python-pygobject-native glib-2.0"
-DEPENDS_class-native = "python-native glib-2.0-native"
+DEPENDS = "python python-pygobject-native libffi glib-2.0"
+DEPENDS_class-native = "python-native libffi-native glib-2.0-native"
RDEPENDS_class-native = ""
MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
diff --git a/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
new file mode 100644
index 0000000000..b6156540bd
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
@@ -0,0 +1,13 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: pygtk-2.24.0/pygtk-2.0.pc.in
+===================================================================
+--- pygtk-2.24.0.orig/pygtk-2.0.pc.in
++++ pygtk-2.24.0/pygtk-2.0.pc.in
+@@ -1,5 +1,6 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
++libdir=@libdir@
+ includedir=@includedir@
+ datarootdir=@datarootdir@
+ datadir=@datadir@
diff --git a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
index 3dbef897a2..053f37fcbe 100644
--- a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
+++ b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
@@ -15,6 +15,7 @@ SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/${SRCNAME}-${PV}.tar
file://fix-gtkunixprint.patch \
file://prevent_to_get_display_during_import.patch \
file://nodocs.patch \
+ file://fix-pygtk-2.0.pc.patch \
file://acinclude.m4 \
file://update-dependences-of-defs.c.patch"
@@ -39,15 +40,30 @@ do_configure_prepend() {
sed -i 's:tests docs:tests:' ${S}/Makefile.am
}
-# dirty fix #1: remove dependency on python-pygobject-dev
+# dirty fix #2: fix build system paths leaking in
do_install_append() {
- find ${D} -name "*.la"|xargs rm -f
- rm -f ${D}/${bindir}/pygtk-codegen-2.0
- rm -rf ${D}/${libdir}/pkgconfig
-}
+ for i in `find ${D} -name "*.py"` ; do \
+ sed -i -e s:${D}::g $i
+ done
-# dirty fix #2: fix build system paths leaking in
-require fix-path.inc
+ for i in `find ${D} -name "*.la"` ; do \
+ sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
+ done
+
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ if test -e ${D}${sbindir} ; then
+ for i in ${D}${sbindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ sed -i -e '1s|^#!.*python|#!/usr/bin/env python|' ${D}${bindir}/pygtk-demo
+}
PACKAGES =+ "${PN}-demo"
FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk "
diff --git a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb b/meta/recipes-devtools/python/python-scons-native_2.3.2.bb
index 067ed61a4e..dae89ab5d2 100644
--- a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb
+++ b/meta/recipes-devtools/python/python-scons-native_2.3.2.bb
@@ -4,5 +4,5 @@ DEPENDS = "python-native"
RDEPENDS_${PN} = ""
do_install_append() {
- create_wrapper ${D}${bindir}/scons PYTHONPATH='$PYTHONPATH:${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
+ create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
}
diff --git a/meta/recipes-devtools/python/python-scons_2.3.0.bb b/meta/recipes-devtools/python/python-scons_2.3.2.bb
index eb2735d46f..fc5b302aae 100644
--- a/meta/recipes-devtools/python/python-scons_2.3.0.bb
+++ b/meta/recipes-devtools/python/python-scons_2.3.2.bb
@@ -1,13 +1,13 @@
SUMMARY = "Software Construction tool (make/autotools replacement)"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=98e9a1e6029e715255c52032a1eba637"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f0ad8a74a10870caa5e08a3e45d719e2"
SRCNAME = "scons"
SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "083ce5624d6adcbdaf2526623f456ca9"
-SRC_URI[sha256sum] = "9442069999cf4b2caa94a5886ab4c2c71de1718ed5e9176c18e2b6dbca463b4b"
+SRC_URI[md5sum] = "bbd428da35ec176575a2b0be1f8d7162"
+SRC_URI[sha256sum] = "f993320c5e9515e6567fcce73df0a7a8808414bf1223c69123d3dcf339a449d4"
S = "${WORKDIR}/${SRCNAME}-${PV}"
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
new file mode 100644
index 0000000000..8a27f2583a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
@@ -0,0 +1,37 @@
+python-smartpm: Add checking for "rpm-ignoresize" option
+
+The do_rootfs takes a very long time when build host has mounted many NFS
+devices. syscall lstat() was being called on every filesystem mounted on the
+build host during building.
+The reason for the lstat() is that rpm is verifying that enough free disk space
+is available to do the install. However, since the install is into the target
+rootfs it should not matter how much free space there is in the host mounts.
+Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip
+checking for diskspace when install a rpm package.
+
+Upstream-Status: Pending
+
+Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ smart/backends/rpm/pm.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 5da9ee6..f0488ec 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -241,6 +241,10 @@ class RPMPackageManager(PackageManager):
+ except AttributeError:
+ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
+
++ if sysconf.get("rpm-ignoresize", False):
++ probfilter |= rpm.RPMPROB_FILTER_DISKNODES
++ probfilter |= rpm.RPMPROB_FILTER_DISKSPACE
++
+ if force or reinstall:
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
index 113618255f..82d2e6cf31 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
@@ -1,4 +1,4 @@
-From 7ee23804a06f81476cc2b31a6db11b52d7af764e Mon Sep 17 00:00:00 2001
+From b105e7fe812da3ccaf7155c0fe14c8728b0d39a5 Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@windriver.com>
Date: Mon, 20 Jan 2014 14:30:52 +0000
Subject: [PATCH] Add mechanism to attempt install without failing
@@ -9,19 +9,24 @@ failures (usually conflicts).
This option only works for the install operation.
+If a complementary install fails, an actual error occurred, one that
+we can't ignore without losing the entire attempted transaction. Keep
+this as an error so that we can catch these cases in the futre.
+
Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
+ smart.py | 5 +++-
smart/commands/install.py | 5 ++++
smart/transaction.py | 65 +++++++++++++++++++++++++++++++++++------------
- 2 files changed, 54 insertions(+), 16 deletions(-)
+ 3 files changed, 58 insertions(+), 17 deletions(-)
-diff --git a/smart/commands/install.py b/smart/commands/install.py
-index 590222c..6ef9682 100644
---- a/smart/commands/install.py
-+++ b/smart/commands/install.py
+Index: smart-1.4.1/smart/commands/install.py
+===================================================================
+--- smart-1.4.1.orig/smart/commands/install.py
++++ smart-1.4.1/smart/commands/install.py
@@ -50,6 +50,8 @@ def option_parser():
parser = OptionParser(usage=USAGE,
description=DESCRIPTION,
@@ -41,10 +46,10 @@ index 590222c..6ef9682 100644
if opts.explain:
sysconf.set("explain-changesets", True, soft=True)
-diff --git a/smart/transaction.py b/smart/transaction.py
-index 5730a42..e3e61c6 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
+Index: smart-1.4.1/smart/transaction.py
+===================================================================
+--- smart-1.4.1.orig/smart/transaction.py
++++ smart-1.4.1/smart/transaction.py
@@ -555,6 +555,8 @@ class Transaction(object):
changeset.set(pkg, INSTALL)
isinst = changeset.installed
@@ -162,6 +167,57 @@ index 5730a42..e3e61c6 100644
elif op is REMOVE:
self._remove(pkg, changeset, locked, pending)
elif op is UPGRADE:
---
-1.8.4.2
-
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -243,15 +253,48 @@ class RPMPackageManager(PackageManager):
+ cb = RPMCallback(prog, upgradednames)
+ cb.grabOutput(True)
+ probs = None
++ retry = 0
+ try:
+ probs = ts.run(cb, None)
+ finally:
+ del getTS.ts
+ cb.grabOutput(False)
++ if probs and sysconf.has("attempt-install", soft=True):
++ def remove_conflict(pkgNEVR):
++ for key in changeset.keys():
++ if pkgNEVR == str(key):
++ del changeset[key]
++ del pkgpaths[key]
++ iface.warning("Removing %s due to file %s conflicting with %s" % (pkgNEVR, fname, altNEVR))
++ break
++
++ retry = 1
++ for prob in probs:
++ if prob[1][0] == rpm.RPMPROB_NEW_FILE_CONFLICT:
++ msg = prob[0].split()
++ fname = msg[1]
++ pkgNEVR = msg[7]
++ altNEVR = msg[9]
++ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
++ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
++ remove_conflict(pkgNEVR)
++ elif prob[1][0] == rpm.RPMPROB_FILE_CONFLICT:
++ msg = prob[0].split()
++ fname = msg[1]
++ pkgNEVR = msg[5]
++ altNEVR = msg[11]
++ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
++ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
++ remove_conflict(pkgNEVR)
++ else:
++ retry = 0
++
+ prog.setDone()
+- if probs:
++ if probs and (not retry):
+ raise Error, "\n".join([x[0] for x in probs])
+ prog.stop()
++ if retry and len(changeset):
++ self.commit(changeset, pkgpaths)
+
+ class RPMCallback:
+ def __init__(self, prog, upgradednames):
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
index 3f27262156..531ea51cad 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
@@ -7,34 +7,39 @@ Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 707a146..aec82e7 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager):
+[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -106,6 +106,26 @@ class RPMPackageManager(PackageManager):
flags |= rpm.RPMTRANS_FLAG_TEST
ts.setFlags(flags)
-+ dflags = ts.setDFlags(0)
-+ if sysconf.get("rpm-noupgrade", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
-+ if sysconf.get("rpm-norequires", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
-+ if sysconf.get("rpm-noconflicts", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
-+ if sysconf.get("rpm-noobsoletes", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
-+ if sysconf.get("rpm-noparentdirs", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
-+ if sysconf.get("rpm-nolinktos", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
-+ if sysconf.get("rpm-nosuggest", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
-+ ts.setDFlags(dflags)
++ try:
++ dflags = ts.setDFlags(0)
++ if sysconf.get("rpm-noupgrade", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
++ if sysconf.get("rpm-norequires", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
++ if sysconf.get("rpm-noconflicts", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
++ if sysconf.get("rpm-noobsoletes", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
++ if sysconf.get("rpm-noparentdirs", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
++ if sysconf.get("rpm-nolinktos", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
++ if sysconf.get("rpm-nosuggest", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
++ ts.setDFlags(dflags)
++ except AttributeError, ae:
++ pass
+
# Set rpm verbosity level.
levelname = sysconf.get('rpm-log-level')
level = {
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
index fece5b9009..2ca0f6d593 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
@@ -24,7 +24,7 @@ index aa76f91..63fbb35 100644
+ opts.check_args_of_option("edit", 0)
+ opts.check_args_of_option("enable", -1)
+ opts.check_args_of_option("disable", -1)
-+ opts.ensure_action("channel", ["add", "set", "remove", "remove-all",
++ opts.ensure_action("channel", ["add", "set", "remove", "remove_all",
+ "list", "show", "yaml", "enable", "disable"])
+ opts.check_remaining_args()
+
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch b/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
new file mode 100644
index 0000000000..708ffe67d3
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
@@ -0,0 +1,49 @@
+
+This patch checks for rpm5 related functions in order to allow rpm4
+to work correctly. Currently the rpm4 archscore and filter work
+differently enough that they need to be changed.
+
+Upstream-Status: Inappropriate [OE-Core Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: smart-1.4.1/smart/backends/rpm/base.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/base.py
++++ smart-1.4.1/smart/backends/rpm/base.py
+@@ -338,10 +338,14 @@ class RPMObsoletes(Depends):
+
+ _SCOREMAP = {}
+ def getArchScore(arch, _sm=_SCOREMAP):
+- if arch not in _sm:
+- score = rpm.archscore(arch)
+- _sm[arch] = score
+- return _sm.get(arch, 0)
++ try:
++ rpm.platformscore(arch)
++ if arch not in _sm:
++ score = rpm.archscore(arch)
++ _sm[arch] = score
++ return _sm.get(arch, 0)
++ except AttributeError:
++ return 1
+
+ # TODO: Embed color into nameprovides and obsoletes relations.
+ _COLORMAP = {"noarch": 0, "x86_64": 2, "ppc64": 2, "s390x": 2, "sparc64": 2}
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -235,6 +235,12 @@ class RPMPackageManager(PackageManager):
+ if sysconf.get("rpm-order"):
+ ts.order()
+ probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
++ try:
++ # Test for RPM5 function
++ rpm.platformscore("")
++ except AttributeError:
++ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
++
+ if force or reinstall:
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
index 09715794b3..c75f10fbf3 100644
--- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -8,7 +8,7 @@ SECTION = "devel/python"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
-DEPENDS = "python rpm gettext-native"
+DEPENDS = "python rpm gettext-native python-rpm"
PR = "r9"
SRCNAME = "smart"
@@ -32,7 +32,9 @@ SRC_URI = "\
file://smart-config-ignore-all-recommends.patch \
file://smart-attempt.patch \
file://smart-filename-NAME_MAX.patch \
- "
+ file://smart-rpm4-fixes.patch \
+ file://smart-add-for-rpm-ignoresize-check.patch \
+ "
SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
SRC_URI[sha256sum] = "b1d519ddb43d60f293b065c28870a5d9e8b591cd49e8c68caea48ace91085eba"
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index 19942baeb0..bc5e5b91f7 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org"
LICENSE = "PSFv2"
SECTION = "devel/python"
# bump this on every change in contrib/python/generate-manifest-2.7.py
-INC_PR = "r0"
+INC_PR = "r1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6"
@@ -14,7 +14,7 @@ SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a3
PYTHON_MAJMIN = "2.7"
-inherit autotools-brokensep
+inherit autotools
PYTHONLSBOPTS = "--with-wctype-functions"
PYTHONLSBOPTS_linuxstdbase = "ac_cv_sizeof_off_t=8"
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 208c57c822..bedc3909d8 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -2,17 +2,22 @@ _tkinter module needs tk module along with tcl. tk is not yet integrated
in yocto so we skip the check for this module.
Avoid a warning by not adding this module to missing variable.
+Also simply disable the tk module since its not in DEPENDS.
+
Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.3/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-2.7.3.orig/setup.py 2014-07-07 13:45:15.056233820 +0000
++++ Python-2.7.3/setup.py 2014-07-16 16:06:37.145656284 +0000
+@@ -1639,10 +1639,12 @@
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ #self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
diff --git a/meta/recipes-devtools/python/python/json-flaw-fix.patch b/meta/recipes-devtools/python/python/json-flaw-fix.patch
new file mode 100644
index 0000000000..e9a6cca017
--- /dev/null
+++ b/meta/recipes-devtools/python/python/json-flaw-fix.patch
@@ -0,0 +1,27 @@
+
+python: fix _json module arbitrary process memory read vulnerability
+
+Upstream-Status: submitted
+
+Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com>
+
+--- a/Modules/_json.c 2014-07-15 15:37:17.151046356 +0200
++++ b/Modules/_json.c 2014-07-15 15:38:37.335605042 +0200
+@@ -1491,7 +1491,7 @@ scan_once_str(PyScannerObject *s, PyObje
+ PyObject *res;
+ char *str = PyString_AS_STRING(pystr);
+ Py_ssize_t length = PyString_GET_SIZE(pystr);
+- if (idx >= length) {
++ if ( idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+@@ -1578,7 +1578,7 @@ scan_once_unicode(PyScannerObject *s, Py
+ PyObject *res;
+ Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
+ Py_ssize_t length = PyUnicode_GET_SIZE(pystr);
+- if (idx >= length) {
++ if ( idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch
new file mode 100644
index 0000000000..725531a240
--- /dev/null
+++ b/meta/recipes-devtools/python/python/posix_close.patch
@@ -0,0 +1,43 @@
+backport from http://bugs.python.org/issue20594
+
+- Issue #20594: Avoid name clash with the libc function posix_close.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1392131776 18000
+# Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932
+# Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3
+avoid name clash with posix_close (closes #20594)
+
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__,
+ "close(fd)\n\n\
+ Close a file descriptor (for low level IO).");
+
+-static PyObject *
+-posix_close(PyObject *self, PyObject *args)
++/*
++The underscore at end of function name avoids a name clash with the libc
++function posix_close.
++*/
++static PyObject *
++posix_close_(PyObject *self, PyObject *args)
+ {
+ int fd, res;
+ if (!PyArg_ParseTuple(args, "i:close", &fd))
+@@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = {
+ {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
+ #endif /* HAVE_TCSETPGRP */
+ {"open", posix_open, METH_VARARGS, posix_open__doc__},
+- {"close", posix_close, METH_VARARGS, posix_close__doc__},
++ {"close", posix_close_, METH_VARARGS, posix_close__doc__},
+ {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
+ {"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
+ {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},
+
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
new file mode 100644
index 0000000000..60ef145c7c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
@@ -0,0 +1,75 @@
+From 104eb318283dde5203aa6cf7384287bef181e308 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Wed, 12 Nov 2014 01:58:02 -0500
+Subject: [PATCH] python: fix CVE-2014-7185
+
+Reference: http://bugs.python.org/issue21831
+
+CVE-2014-7185: Integer overflow in bufferobject.c in Python before
+2.7.8 allows context-dependent attackers to obtain sensitive
+information from process memory via a large size and offset in a
+"buffer" function.
+
+Upstream-Status: Backport
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ Lib/test/test_buffer.py | 6 ++++++
+ Misc/NEWS | 3 +++
+ Objects/bufferobject.c | 2 +-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
+index 6bdc34d..3ac1f8c 100644
+--- a/Lib/test/test_buffer.py
++++ b/Lib/test/test_buffer.py
+@@ -4,6 +4,7 @@ For now, tests just new or changed functionality.
+
+ """
+
++import sys
+ import unittest
+ from test import test_support
+
+@@ -21,6 +22,11 @@ class BufferTests(unittest.TestCase):
+ self.assertEqual(b[start:stop:step],
+ s[start:stop:step])
+
++ def test_large_buffer_size_and_offset(self):
++ data = bytearray('hola mundo')
++ buf = buffer(data, sys.maxsize, sys.maxsize)
++ self.assertEqual(buf[:4096], "")
++
+
+ def test_main():
+ with test_support.check_py3k_warnings(("buffer.. not supported",
+diff --git a/Misc/NEWS b/Misc/NEWS
+index e8778ad..77396c5 100644
+--- a/Misc/NEWS
++++ b/Misc/NEWS
+@@ -1896,6 +1896,9 @@ What's New in Python 2.7 Release Candidate 1?
+ Core and Builtins
+ -----------------
+
++- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
++ the buffer type. CVE-2014-7185.
++
+ - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
+ start byte and the continuation byte(s) are now considered invalid, instead
+ of the number of bytes specified by the start byte.
+diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
+index c52f0bc..c542506 100644
+--- a/Objects/bufferobject.c
++++ b/Objects/bufferobject.c
+@@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size,
+ *size = count;
+ else
+ *size = self->b_size;
+- if (offset + *size > count)
++ if (*size > count - offset)
+ *size = count - offset;
+ }
+ return 1;
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
new file mode 100644
index 0000000000..2d35520a6d
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
@@ -0,0 +1,37 @@
+python: Building without SSLv3 support
+
+Building without SSLv3 support when openssl is built
+without any support for SSLv3
+
+Upstream-Status: Backport
+
+Reference:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76A8611#22
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+diff -ruN a/Modules/_ssl.c b/Modules/_ssl.c
+--- a/Modules/_ssl.c 2014-11-26 07:43:58.755679939 +0100
++++ b/Modules/_ssl.c 2014-11-26 07:49:10.454182400 +0100
+@@ -302,8 +302,10 @@
+ PySSL_BEGIN_ALLOW_THREADS
+ if (proto_version == PY_SSL_VERSION_TLS1)
+ self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
++#ifndef OPENSSL_NO_SSL3
+ else if (proto_version == PY_SSL_VERSION_SSL3)
+ self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
++#endif
+ #ifndef OPENSSL_NO_SSL2
+ else if (proto_version == PY_SSL_VERSION_SSL2)
+ self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
+@@ -1777,8 +1779,10 @@
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
+ PY_SSL_VERSION_SSL2);
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
+ PY_SSL_VERSION_SSL3);
++#endif
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
+ PY_SSL_VERSION_SSL23);
+ PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
new file mode 100644
index 0000000000..3462620917
--- /dev/null
+++ b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Vinay Sajip <vinay_sajip@yahoo.co.uk>
+# Date 1334583503 -3600
+# Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0
+# Parent 33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1
+Issue #14452: remove BOM insertion code.
+
+Backport from https://hg.python.org/cpython/rev/af46a001d5ec.
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
+--- a/Lib/logging/handlers.py
++++ b/Lib/logging/handlers.py
+@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
+ # Message is a string. Convert to bytes as required by RFC 5424
+ if type(msg) is unicode:
+ msg = msg.encode('utf-8')
+- if codecs:
+- msg = codecs.BOM_UTF8 + msg
+ msg = prio + msg
+ try:
+ if self.unixsocket:
diff --git a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
index 573096cb1c..0ef3a8762f 100644
--- a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
@@ -37,6 +37,8 @@ do_install_append() {
rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+ sed -i -e '1s|^#!.*python|#!/usr/bin/env python3|' \
+ ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
}
RDEPENDS_${PN} = "\
diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
index 9ae2a0b373..73ce0952bd 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -27,6 +27,8 @@ file://fix-ast.h-dependency.patch \
file://makerace.patch \
${DISTRO_SRC_URI} \
file://python3-fix-build-error-with-Readline-6.3.patch \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
diff --git a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
new file mode 100644
index 0000000000..2bc8b8c460
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
@@ -0,0 +1,33 @@
+From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 18 Nov 2014 00:07:07 -0500
+Subject: [PATCH] setup.py: no host headers libs
+
+When we are cross-compiling, setup.py should never look in /usr
+or /usr/local to find headers or libraries.
+
+Upstream-Status: Inappropriate [Cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ setup.py | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f020b28..e8339cd 100644
+--- a/setup.py
++++ b/setup.py
+@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
+ if not cross_compiling:
+ add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+- # only change this for cross builds for 3.3, issues on Mageia
+- if cross_compiling:
+ self.add_gcc_paths()
+- if not cross_compiling:
+ self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
+--
+2.0.0
+
diff --git a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
new file mode 100644
index 0000000000..74490d93a5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -0,0 +1,28 @@
+From 53ed216d7bf70dd2a925432b6805a701e5fc3e0e Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 17 Nov 2014 06:44:47 +0000
+Subject: [PATCH] python3 use CROSSPYTHONPATH for PYTHON_FOR_BUILD
+
+Upstream-Status: Inappropriate [Cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 989baf9..2890c96 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then
+ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ fi
+ AC_MSG_RESULT($interp)
+- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
+--
+2.0.1
+
diff --git a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
new file mode 100644
index 0000000000..fc2e12dfe5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
@@ -0,0 +1,50 @@
+From 8dad810f3a3d073f09ad72e1a3ee0a895eab2ca1 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 19:05:36 -0800
+Subject: [PATCH] setup.py:check cross_compiling when get FLAGS
+
+Fixed when compile target pythnon3:
+gcc -isystem/path/to/sysroots/x86_64-linux/usr/include \
+ -L=/path/to/sysroots/x86_64-linux/usr/lib
+
+This is incorrect, the native sysroot should not be used by target
+python3.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ setup.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index e8339cd..83fd31f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -238,7 +238,10 @@ class PyBuildExt(build_ext):
+ # unfortunately, distutils doesn't let us provide separate C and C++
+ # compilers
+ if compiler is not None:
+- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
++ if cross_compiling:
++ (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '')
++ else:
++ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+ self.compiler.set_executables(**args)
+
+@@ -457,7 +460,10 @@ class PyBuildExt(build_ext):
+ ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+ ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+- env_val = sysconfig.get_config_var(env_var)
++ if cross_compiling:
++ env_val = os.environ.get(env_var)
++ else:
++ env_val = sysconfig.get_config_var(env_var)
+ if env_val:
+ # To prevent optparse from raising an exception about any
+ # options in env_val that it doesn't know about we strip out
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
new file mode 100644
index 0000000000..de07643f2b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -0,0 +1,54 @@
+From fc93b3cc23b4f9698ae92a42986dbb02b6f19588 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 06:29:50 -0800
+Subject: [PATCH] sysconfig.py: add _PYTHON_PROJECT_SRC
+
+python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B
+and S, but it doesn't work when compile Modules, the target python3 runs
+python3-native's sysconfig to get srcdir which is the native's, there
+would be errors when native's srcdir has been removed, add
+_PYTHON_PROJECT_SRC to fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Lib/distutils/sysconfig.py | 5 ++++-
+ Lib/sysconfig.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index a545ab9..74317d1 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -554,7 +554,10 @@ def get_config_vars(*args):
+ _config_vars['exec_prefix'] = EXEC_PREFIX
+
+ # Always convert srcdir to an absolute path
+- srcdir = _config_vars.get('srcdir', project_base)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _config_vars.get('srcdir', project_base)
+ if os.name == 'posix':
+ if python_build:
+ # If srcdir is a relative path (typically '.' or '..')
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 7287f11..cc92998 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -562,7 +562,10 @@ def get_config_vars(*args):
+ _CONFIG_VARS['userbase'] = _getuserbase()
+
+ # Always convert srcdir to an absolute path
+- srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
+ if os.name == 'posix':
+ if _PYTHON_BUILD:
+ # If srcdir is a relative path (typically '.' or '..')
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index a1cb12078f..6147408937 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -37,6 +37,10 @@ SRC_URI += "\
file://sysroot-include-headers.patch \
file://unixccompiler.patch \
file://avoid-ncursesw-include-path.patch \
+ file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://python3-setup.py-no-host-headers-libs.patch \
+ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
@@ -62,6 +66,11 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
# No ctypes option for python 3
PYTHONLSBOPTS = ""
@@ -73,7 +82,7 @@ do_configure_prepend() {
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux*
+ cd ${S}/Lib/plat-linux*
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -84,7 +93,7 @@ do_compile() {
cd -
# remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
- sed -i -e s,ccache,'$(CCACHE)', Makefile
+ sed -i -e s,ccache\ ,'$(CCACHE) ', Makefile
# remove any bogus LD_LIBRARY_PATH
sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
@@ -104,8 +113,6 @@ do_compile() {
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -116,8 +123,8 @@ do_compile() {
ARCH=${TARGET_ARCH} \
OPT="${CFLAGS}" libpython3.so
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
@@ -132,16 +139,13 @@ do_install() {
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
install -d ${D}${libdir}/pkgconfig
install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
# rerun the build once again with original makefile this time
# run install in a separate step to avoid compile/install race
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
@@ -150,9 +154,8 @@ do_install() {
ARCH=${TARGET_ARCH} \
DESTDIR=${D} LIBDIR=${libdir}
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 0d641720f1..a4c95c18e0 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -36,6 +36,11 @@ SRC_URI += "\
file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \
file://python-fix-build-error-with-Readline-6.3.patch \
file://python-2.7.3-CVE-2014-1912.patch \
+ file://json-flaw-fix.patch \
+ file://posix_close.patch \
+ file://remove-BOM-insection-code.patch \
+ file://python-2.7.3-CVE-2014-7185.patch \
+ file://python2.7.3-nossl3.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -47,6 +52,9 @@ inherit autotools multilib_header python-dir pythonnative
TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
+# The following is a hack until we drop ac_cv_sizeof_off_t from site files
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
+
do_configure_prepend() {
rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
@@ -54,7 +62,7 @@ do_configure_prepend() {
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux2
+ cd ${S}/Lib/plat-linux2
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -73,7 +81,7 @@ do_compile() {
if [ ! -f Makefile.orig ]; then
install -m 0644 Makefile Makefile.orig
fi
- sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
@@ -86,7 +94,7 @@ do_compile() {
install -m 0644 Makefile Makefile.sysroot
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
@@ -103,7 +111,7 @@ do_install() {
install -m 0644 Makefile.orig Makefile
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
# After swizzling the makefile, we need to run the build again.
# install can race with the build so we have to run this first, then install
@@ -154,8 +162,8 @@ require python-${PYTHON_MAJMIN}-manifest.inc
# manual dependency additions
RPROVIDES_${PN}-core = "${PN}"
RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
# package libpython2
PACKAGES =+ "lib${BPN}2"
diff --git a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
index 3834aed6d0..b0c2ea5be9 100644
--- a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
@@ -14,6 +14,10 @@ Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
Updated it on 2014-01-15 for rebasing
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Update it when upgrade qemu to 2.2.0
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
hw/arm/versatilepb.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -22,7 +26,7 @@ diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index b48d84c..ad2cd5a 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
-@@ -199,6 +199,12 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id)
+@@ -198,6 +198,12 @@ static void versatile_init(MachineState *machine, int board_id)
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
@@ -32,9 +36,9 @@ index b48d84c..ad2cd5a 100644
+ ((unsigned int)ram_size / (1 << 20)));
+ exit(1);
+ }
- memory_region_init_ram(ram, NULL, "versatile.ram", args->ram_size);
+ memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size,
+ &error_abort);
vmstate_register_ram_global(ram);
- /* ??? RAM should repeat to fill physical memory space. */
--
1.7.10.4
diff --git a/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch b/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch
new file mode 100644
index 0000000000..171bda7e95
--- /dev/null
+++ b/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch
@@ -0,0 +1,93 @@
+[PATCH] exclude some arm EABI obsolete syscalls
+
+Upstream-Status: Pending
+
+some syscalls are obsolete and no longer available for EABI, exclude them to
+fix the below error:
+ In file included from qemu-seccomp.c:16:0:
+ qemu-seccomp.c:28:7: error: '__NR_select' undeclared here (not in a function)
+ { SCMP_SYS(select), 252 },
+ ^
+ qemu-seccomp.c:36:7: error: '__NR_mmap' undeclared here (not in a function)
+ { SCMP_SYS(mmap), 247 },
+ ^
+ qemu-seccomp.c:57:7: error: '__NR_getrlimit' undeclared here (not in a function)
+ { SCMP_SYS(getrlimit), 245 },
+ ^
+ qemu-seccomp.c:96:7: error: '__NR_time' undeclared here (not in a function)
+ { SCMP_SYS(time), 245 },
+ ^
+ qemu-seccomp.c:185:7: error: '__NR_alarm' undeclared here (not in a function)
+ { SCMP_SYS(alarm), 241 },
+
+please refer source files:
+ arch/arm/include/uapi/asm/unistd.h
+or kernel header:
+ /usr/include/asm/unistd.h
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ qemu-seccomp.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/qemu-seccomp.c b/qemu-seccomp.c
+index caa926e..5a78502 100644
+--- a/qemu-seccomp.c
++++ b/qemu-seccomp.c
+@@ -25,15 +25,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
+ { SCMP_SYS(timer_settime), 255 },
+ { SCMP_SYS(timer_gettime), 254 },
+ { SCMP_SYS(futex), 253 },
++#if !defined(__ARM_EABI__)
+ { SCMP_SYS(select), 252 },
++ { SCMP_SYS(time), 245 },
++ { SCMP_SYS(alarm), 241 },
++ { SCMP_SYS(getrlimit), 245 },
++ { SCMP_SYS(mmap), 247 },
++ { SCMP_SYS(socketcall), 250 },
++ { SCMP_SYS(ipc), 245 },
++#endif
+ { SCMP_SYS(recvfrom), 251 },
+ { SCMP_SYS(sendto), 250 },
+- { SCMP_SYS(socketcall), 250 },
+ { SCMP_SYS(read), 249 },
+ { SCMP_SYS(io_submit), 249 },
+ { SCMP_SYS(brk), 248 },
+ { SCMP_SYS(clone), 247 },
+- { SCMP_SYS(mmap), 247 },
+ { SCMP_SYS(mprotect), 246 },
+ { SCMP_SYS(execve), 245 },
+ { SCMP_SYS(open), 245 },
+@@ -48,13 +54,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
+ { SCMP_SYS(bind), 245 },
+ { SCMP_SYS(listen), 245 },
+ { SCMP_SYS(semget), 245 },
+- { SCMP_SYS(ipc), 245 },
+ { SCMP_SYS(gettimeofday), 245 },
+ { SCMP_SYS(readlink), 245 },
+ { SCMP_SYS(access), 245 },
+ { SCMP_SYS(prctl), 245 },
+ { SCMP_SYS(signalfd), 245 },
+- { SCMP_SYS(getrlimit), 245 },
+ { SCMP_SYS(set_tid_address), 245 },
+ { SCMP_SYS(statfs), 245 },
+ { SCMP_SYS(unlink), 245 },
+@@ -93,7 +97,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
+ { SCMP_SYS(times), 245 },
+ { SCMP_SYS(exit), 245 },
+ { SCMP_SYS(clock_gettime), 245 },
+- { SCMP_SYS(time), 245 },
+ { SCMP_SYS(restart_syscall), 245 },
+ { SCMP_SYS(pwrite64), 245 },
+ { SCMP_SYS(nanosleep), 245 },
+@@ -182,7 +185,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
+ { SCMP_SYS(lstat64), 241 },
+ { SCMP_SYS(sendfile64), 241 },
+ { SCMP_SYS(ugetrlimit), 241 },
+- { SCMP_SYS(alarm), 241 },
+ { SCMP_SYS(rt_sigsuspend), 241 },
+ { SCMP_SYS(rt_sigqueueinfo), 241 },
+ { SCMP_SYS(rt_tgsigqueueinfo), 241 },
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
index 5a60bfda82..5c3565544e 100644
--- a/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -1,18 +1,22 @@
-# possible arch values are arm mips mipsel mips64 mips64el ppc ppc64 ppc64abi32
+# possible arch values are arm aarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64abi32
# ppcemb armeb alpha sparc32plus i386 x86_64 cris m68k microblaze sparc sparc32
# sparc32plus
def get_qemu_target_list(d):
import bb
archs = d.getVar('QEMU_TARGETS', True).split()
- targets = ""
+ tos = d.getVar('HOST_OS', True)
+ softmmuonly = ""
for arch in ['mips64', 'mips64el', 'ppcemb']:
if arch in archs:
- targets += arch + "-softmmu,"
+ softmmuonly += arch + "-softmmu,"
archs.remove(arch)
+ linuxuseronly = ""
for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus']:
if arch in archs:
- targets += arch + "-linux-user,"
+ linuxuseronly += arch + "-linux-user,"
archs.remove(arch)
- return targets + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ if 'linux' not in tos:
+ return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 611ee61beb..49415c1250 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,32 +1,31 @@
SUMMARY = "Fast open source processor emulator"
HOMEPAGE = "http://qemu.org"
LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "glib-2.0 zlib alsa-lib pixman dtc libsdl \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
-DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native"
-DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
-RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
+DEPENDS = "glib-2.0 zlib pixman"
RDEPENDS_${PN}_class-target += "bash python"
require qemu-targets.inc
-inherit autotools-brokensep
+inherit autotools
BBCLASSEXTEND = "native nativesdk"
+PR = "r1"
+
# QEMU_TARGETS is overridable variable
-QEMU_TARGETS ?= "arm i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
SRC_URI = "\
file://powerpc_rom.bin \
- file://no-strip.patch \
file://larger_default_ram_size.patch \
file://disable-grabs.patch \
+ file://exclude-some-arm-EABI-obsolete-syscalls.patch \
+ file://wacom.patch \
"
SRC_URI_append_class-native = "\
file://fix-libcap-header-issue-on-some-distro.patch \
"
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
"
@@ -34,26 +33,32 @@ export LIBTOOL="${HOST_SYS}-libtool"
do_configure_prepend_class-native() {
# Append build host pkg-config paths for native target since the host may provide sdl
- BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+ BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
+ if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
+ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+ fi
# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
}
do_configure_prepend_class-nativesdk() {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
# Undo the -lX11 added by linker-flags.patch
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
fi
}
+KVMENABLE = "--enable-kvm"
+KVMENABLE_darwin = "--disable-kvm"
+KVMENABLE_mingw32 = "--disable-kvm"
+
do_configure() {
# Handle distros such as CentOS 5 32-bit that do not have kvm support
KVMOPTS="--disable-kvm"
if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
|| [ -f /usr/include/linux/kvm.h ] ; then
- KVMOPTS="--enable-kvm"
+ KVMOPTS="${KVMENABLE}"
fi
${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
@@ -81,11 +86,17 @@ do_install_append() {
}
# END of qemu-mips workaround
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "fdt sdl alsa"
+PACKAGECONFIG_class-native ??= "fdt alsa"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+NATIVEDEPS = ""
+NATIVEDEPS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxext-native', '',d)}"
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl ${NATIVEDEPS},"
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
PACKAGECONFIG[xen] = "--enable-xen, --disable-xen,,"
+PACKAGECONFIG[quorum] = "--enable-quorum, --disable-quorum, gnutls,"
PACKAGECONFIG[vnc-tls] = "--enable-vnc --enable-vnc-tls,--disable-vnc-tls, gnutls,"
PACKAGECONFIG[vnc-ws] = "--enable-vnc --enable-vnc-ws,--disable-vnc-ws, gnutls,"
PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
@@ -95,10 +106,17 @@ PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
PACKAGECONFIG[nss] = "--enable-smartcard-nss,--disable-smartcard-nss,nss,"
PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+ libvte,"
+PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+ libvte,"
PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
-PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl,"
PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
+PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
+PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
+PACKAGECONFIG[alsa] = ",,alsa-lib"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,mesa"
+PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
+PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
+
+EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
# Qemu target will not build in world build for ARM or Mips
BROKEN_qemuarm = "1"
diff --git a/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch b/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
new file mode 100644
index 0000000000..59cdc1c304
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+
+From 9ac096d8eccf2d56ece646320c282c8369f8337c Mon Sep 17 00:00:00 2001
+From: Cristian Iorga <cristian.iorga@intel.com>
+Date: Tue, 29 Jul 2014 18:35:59 +0300
+Subject: [PATCH] configure: fix Darwin target detection
+
+fix Darwin target detection for qemu
+cross-compilation.
+
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+---
+ configure | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure b/configure
+index 283c71c..1c66a11 100755
+--- a/configure
++++ b/configure
+@@ -444,6 +444,8 @@ elif check_define __sun__ ; then
+ targetos='SunOS'
+ elif check_define __HAIKU__ ; then
+ targetos='Haiku'
++elif check_define __APPLE__ ; then
++ targetos='Darwin'
+ else
+ targetos=`uname -s`
+ fi
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/qemu/qemu/no-strip.patch b/meta/recipes-devtools/qemu/qemu/no-strip.patch
deleted file mode 100644
index d6a4377cd0..0000000000
--- a/meta/recipes-devtools/qemu/qemu/no-strip.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: qemu-0.14.0/Makefile
-===================================================================
---- qemu-0.14.0.orig/Makefile
-+++ qemu-0.14.0/Makefile
-@@ -235,7 +235,7 @@ install-sysconfig:
- install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
- $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
- ifneq ($(TOOLS),)
-- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
-+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
- endif
- ifneq ($(BLOBS),)
- $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
new file mode 100644
index 0000000000..cd06aa4ac6
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -0,0 +1,130 @@
+The USB wacom device is missing a HID descriptor which causes it
+to fail to operate with recent kernels (e.g. 3.17).
+
+This patch adds a HID desriptor to the device, based upon one from
+real wcom device.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Submitted
+2014/11/27
+
+Index: qemu-2.1.0/hw/usb/dev-wacom.c
+===================================================================
+--- qemu-2.1.0.orig/hw/usb/dev-wacom.c 2014-08-01 15:12:17.000000000 +0100
++++ qemu-2.1.0/hw/usb/dev-wacom.c 2014-10-12 12:13:30.540306042 +0100
+@@ -68,6 +68,89 @@
+ [STR_SERIALNUMBER] = "1",
+ };
+
++static const uint8_t qemu_tablet_hid_report_descriptor[] = {
++ 0x05, 0x01, /* Usage Page (Generic Desktop) */
++ 0x09, 0x02, /* Usage (Mouse) */
++ 0xa1, 0x01, /* Collection (Application) */
++ 0x85, 0x01, /* Report ID (1) */
++ 0x09, 0x01, /* Usage (Pointer) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x05, 0x09, /* Usage Page (Button) */
++ 0x19, 0x01, /* Usage Minimum (1) */
++ 0x29, 0x05, /* Usage Maximum (5) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x25, 0x01, /* Logical Maximum (1) */
++ 0x95, 0x05, /* Report Count (5) */
++ 0x75, 0x01, /* Report Size (1) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x95, 0x01, /* Report Count (1) */
++ 0x75, 0x03, /* Report Size (3) */
++ 0x81, 0x01, /* Input (Constant) */
++ 0x05, 0x01, /* Usage Page (Generic Desktop) */
++ 0x09, 0x30, /* Usage (X) */
++ 0x09, 0x31, /* Usage (Y) */
++ 0x15, 0x81, /* Logical Minimum (-127) */
++ 0x25, 0x7f, /* Logical Maximum (127) */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x02, /* Report Count (2) */
++ 0x81, 0x06, /* Input (Data, Variable, Relative) */
++ 0xc0, /* End Collection */
++ 0xc0, /* End Collection */
++ 0x05, 0x0d, /* Usage Page (Digitizer) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0xa1, 0x01, /* Collection (Application) */
++ 0x85, 0x02, /* Report ID (2) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x26, 0xff, 0x00, /* Logical Maximum (255) */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x08, /* Report Count (8) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0xc0, /* End Collection */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x85, 0x02, /* Report ID (2) */
++ 0x95, 0x01, /* Report Count (1) */
++ 0xb1, 0x02, /* FEATURE (2) */
++ 0xc0, /* End Collection */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0xa1, 0x01, /* Collection (Application) */
++ 0x85, 0x02, /* Report ID (2) */
++ 0x05, 0x0d, /* Usage Page (Digitizer) */
++ 0x09, 0x22, /* Usage (Finger) */
++ 0xa1, 0x00, /* Collection (Physical) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x15, 0x00, /* Logical Minimum (0) */
++ 0x26, 0xff, 0x00, /* Logical Maximum */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x02, /* Report Count (2) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x05, 0x01, /* Usage Page (Generic Desktop) */
++ 0x09, 0x30, /* Usage (X) */
++ 0x35, 0x00, /* Physical Minimum */
++ 0x46, 0xe0, 0x2e, /* Physical Maximum */
++ 0x26, 0xe0, 0x01, /* Logical Maximum */
++ 0x75, 0x10, /* Report Size (16) */
++ 0x95, 0x01, /* Report Count (1) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x09, 0x31, /* Usage (Y) */
++ 0x46, 0x40, 0x1f, /* Physical Maximum */
++ 0x26, 0x40, 0x01, /* Logical Maximum */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
++ 0x09, 0x01, /* Usage (Digitizer) */
++ 0x26, 0xff, 0x00, /* Logical Maximum */
++ 0x75, 0x08, /* Report Size (8) */
++ 0x95, 0x0d, /* Report Count (13) */
++ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
++ 0xc0, /* End Collection */
++ 0xc0, /* End Collection */
++};
++
++
+ static const USBDescIface desc_iface_wacom = {
+ .bInterfaceNumber = 0,
+ .bNumEndpoints = 1,
+@@ -85,7 +168,7 @@
+ 0x00, /* u8 country_code */
+ 0x01, /* u8 num_descriptors */
+ 0x22, /* u8 type: Report */
+- 0x6e, 0, /* u16 len */
++ sizeof(qemu_tablet_hid_report_descriptor), 0, /* u16 len */
+ },
+ },
+ },
+@@ -265,6 +350,15 @@
+ }
+
+ switch (request) {
++ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
++ switch (value >> 8) {
++ case 0x22:
++ memcpy(data, qemu_tablet_hid_report_descriptor,
++ sizeof(qemu_tablet_hid_report_descriptor));
++ p->actual_length = sizeof(qemu_tablet_hid_report_descriptor);
++ break;
++ }
++ break;
+ case WACOM_SET_REPORT:
+ if (s->mouse_grabbed) {
+ qemu_remove_mouse_event_handler(s->eh_entry);
diff --git a/meta/recipes-devtools/qemu/qemu_2.0.0.bb b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
index b8ce62428b..209b910103 100644
--- a/meta/recipes-devtools/qemu/qemu_2.0.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
@@ -3,23 +3,16 @@ require qemu.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-SRC_URI += "file://qemu-enlarge-env-entry-size.patch \
- file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch"
-
+SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
+ file://qemu-enlarge-env-entry-size.patch \
+ file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
+ "
SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "2790f44fd76da5de5024b4aafeb594c2"
-SRC_URI[sha256sum] = "60cc1aa0cad39cec891f970bed60ca8a484f071adad4943123599ac223543a3b"
+SRC_URI[md5sum] = "f7a5e2da22d057eb838a91da7aff43c8"
+SRC_URI[sha256sum] = "b68c9b6c7c694f5489b5a6bffe993cd976ffbb78e7d178eb3bc016caf460039c"
COMPATIBLE_HOST_class-target_mips64 = "null"
-do_sanitize_sources() {
- # These .git files point to a nonexistent path "../.git/modules" and will confuse git
- # if it tries to recurse into those directories.
- rm -f ${S}/dtc/.git ${S}/pixman/.git
-}
-
-addtask sanitize_sources after do_unpack before do_patch
-
do_install_append() {
# Prevent QA warnings about installed ${localstatedir}/run
if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index d2981b5575..959cd6fba0 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -9,7 +9,7 @@ do_install () {
echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
qemu_binary=${@qemu_target_binary(d)}
- qemu_options='${@d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or d.getVar('QEMU_OPTIONS', True) or ""}'
+ qemu_options='${QEMU_OPTIONS}'
echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
fallback_qemu_bin=
case $qemu_binary in
diff --git a/meta/recipes-devtools/quilt/quilt-0.63.inc b/meta/recipes-devtools/quilt/quilt-0.63.inc
index f3757859ff..220a3bcdcf 100644
--- a/meta/recipes-devtools/quilt/quilt-0.63.inc
+++ b/meta/recipes-devtools/quilt/quilt-0.63.inc
@@ -19,6 +19,8 @@ EXTRA_OECONF_darwin += "--without-date \
--without-getopt \
"
+CLEANBROKEN = "1"
+
PACKAGES += "guards guards-doc"
FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
${bindir}/quilt ${libdir}/quilt"
@@ -55,5 +57,5 @@ do_install_ptest() {
RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
perl-module-filehandle perl-module-getopt-std \
perl-module-posix perl-module-file-temp \
- perl-module-text-parsewords \
+ perl-module-text-parsewords bash \
"
diff --git a/meta/recipes-devtools/quilt/quilt/run-ptest b/meta/recipes-devtools/quilt/quilt/run-ptest
index 1ea0dae128..958a9df5b6 100755
--- a/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -1,5 +1,5 @@
#!/bin/sh
ln -sf /bin/ed /usr/bin/ed
-for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? == 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
+for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
rm -f /usr/bin/ed
diff --git a/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch b/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch
new file mode 100644
index 0000000000..98b646092b
--- /dev/null
+++ b/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch
@@ -0,0 +1,39 @@
+From 1316f10a97a4a2f5d11a30ec367aa61101318742 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@enea.com>
+Date: Wed, 6 Aug 2014 15:05:56 +0200
+Subject: [PATCH] remake: remove errors about @colophon and @cygnus commands
+ not defined
+
+texinfo5 needs replacing @ with @@ when it is part of the text
+
+Upstream-Status: Backport
+Signed-off-by: Maxin B. John <maxin.john@enea.com>
+---
+ doc/remake.texi | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/remake.texi b/doc/remake.texi
+index cd73437..fa5ba16 100644
+--- a/doc/remake.texi
++++ b/doc/remake.texi
+@@ -2752,7 +2752,7 @@ this list, we would like to add your names!
+ @printindex cp
+
+ @tex
+-% I think something like @colophon should be in texinfo. In the
++% I think something like @@colophon should be in texinfo. In the
+ % meantime:
+ \long\def\colophon{\hbox to0pt{}\vfill
+ \centerline{The body of this manual is set in}
+@@ -2764,7 +2764,7 @@ this list, we would like to add your names!
+ \centerline{{\sl\fontname\tensl\/}}
+ \centerline{are used for emphasis.}\vfill}
+ \page\colophon
+-% Blame: doc@cygnus.com, 1991.
++% Blame: doc@@cygnus.com, 1991.
+ @end tex
+
+ @bye
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/remake/remake_git.bb b/meta/recipes-devtools/remake/remake_git.bb
index 405c69f6a6..2ba2b809f8 100644
--- a/meta/recipes-devtools/remake/remake_git.bb
+++ b/meta/recipes-devtools/remake/remake_git.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
require remake.inc
-SRC_URI += "file://version-remake.texi.patch"
+SRC_URI += "file://version-remake.texi.patch \
+ file://remake-remove-errors-about-colophon-and-cygnus-comma.patch \
+ "
SRCREV = "f05508e521987c8494c92d9c2871aec46307d51d"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
new file mode 100644
index 0000000000..b877870411
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/python/rpmmodule.c b/python/rpmmodule.c
+index a4fe217..728c66c 100644
+--- a/python/rpmmodule.c
++++ b/python/rpmmodule.c
+@@ -396,6 +396,10 @@ static int initModule(PyObject *m)
+ REGISTER_ENUM(RPMSENSE_STRONG);
+ REGISTER_ENUM(RPMSENSE_CONFIG);
+
++#if defined(RPM_VENDOR_OE)
++ REGISTER_ENUM(RPMSENSE_MISSINGOK);
++#endif
++
+ REGISTER_ENUM(RPMTRANS_FLAG_TEST);
+ REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS);
+ REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
new file mode 100644
index 0000000000..7a646de373
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/build/pack.c
+===================================================================
+--- rpm-4.11.2.orig/build/pack.c
++++ rpm-4.11.2/build/pack.c
+@@ -571,9 +571,9 @@ rpmRC packageBinaries(rpmSpec spec, cons
+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+ }
+
+- if (cheating) {
+- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
+- }
++// if (cheating) {
++// (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
++// }
+
+ { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+ char *binRpm, *binDir;
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
new file mode 100644
index 0000000000..be0626c8b3
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+diff --git a/installplatform b/installplatform
+index 8c3eba0..fa15e91 100755
+--- a/installplatform
++++ b/installplatform
+@@ -112,7 +112,7 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
+ [ -z "$CANONARCH" ] && continue
+
+ if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
+- LIB=${LIB}64
++ LIB=${LIB}
+ fi
+
+ PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
new file mode 100755
index 0000000000..083b174f17
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ $# -ge 1 ] || {
+ cat > /dev/null
+ exit 0
+}
+
+case $1 in
+-R|--requires)
+ shift
+ grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
+ exit 0
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
new file mode 100644
index 0000000000..2640e54b5b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
@@ -0,0 +1,26 @@
+
+Disable configuring the db3 directory since we will be using the
+external DB provided as part of OE-Core already, no need to have
+duplicate database code.
+
+Upstream-Status: Inappropriate [OE-Core Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: rpm-4.11.2/configure.ac
+===================================================================
+--- rpm-4.11.2.orig/configure.ac
++++ rpm-4.11.2/configure.ac
+@@ -825,9 +825,9 @@ AC_SUBST(RPMCONFIGDIR)
+
+ AC_SUBST(OBJDUMP)
+
+-if test "$with_external_db" = no; then
+- AC_CONFIG_SUBDIRS(db3)
+-fi
++#if test "$with_external_db" = no; then
++# AC_CONFIG_SUBDIRS(db3)
++#fi
+
+ AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
+ AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
new file mode 100644
index 0000000000..f1ecab7b0e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/build/files.c
+===================================================================
+--- rpm-4.11.2.orig/build/files.c
++++ rpm-4.11.2/build/files.c
+@@ -1321,12 +1321,6 @@ static rpmRC addFile(FileList fl, const
+ }
+ }
+
+- /* Error out when a non-directory is specified as one in spec */
+- if (fl->cur.isDir && (statp == &statbuf) && !S_ISDIR(statp->st_mode)) {
+- rpmlog(RPMLOG_ERR, _("Not a directory: %s\n"), diskPath);
+- goto exit;
+- }
+-
+ /* Don't recurse into explicit %dir, don't double-recurse from fts */
+ if ((fl->cur.isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) {
+ return recurseDir(fl, diskPath);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
new file mode 100644
index 0000000000..9333dea441
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
@@ -0,0 +1,194 @@
+Upstream-Status: Inappropriate [OE-Core]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/lib/psm.c
+===================================================================
+--- rpm-4.11.2.orig/lib/psm.c
++++ rpm-4.11.2/lib/psm.c
+@@ -421,7 +421,8 @@ static rpmRC runScript(rpmpsm psm, ARGV_
+
+ rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
+ rc = rpmScriptRun(script, arg1, arg2, sfd,
+- prefixes, warn_only, selinux);
++ prefixes, warn_only, selinux, rpmtsRootDir(psm->ts) );
++
+ rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
+
+ /* Map warn-only errors to "notfound" for script stop callback */
+@@ -958,15 +959,49 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
+ case PSM_DESTROY:
+ break;
+ case PSM_SCRIPT: /* Run current package scriptlets. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
++
+ rc = runInstScript(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+ case PSM_TRIGGERS:
+ /* Run triggers in other package(s) this package sets off. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
+ rc = runTriggers(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+ case PSM_IMMED_TRIGGERS:
+ /* Run triggers in this package other package(s) set off. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
+ rc = runImmedTriggers(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+
+ case PSM_RPMDB_ADD: {
+Index: rpm-4.11.2/lib/rpmscript.c
+===================================================================
+--- rpm-4.11.2.orig/lib/rpmscript.c
++++ rpm-4.11.2/lib/rpmscript.c
+@@ -92,7 +92,7 @@ static rpmRC runLuaScript(int selinux, A
+ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
+
+ static void doScriptExec(int selinux, ARGV_const_t argv, ARGV_const_t prefixes,
+- FD_t scriptFd, FD_t out)
++ FD_t scriptFd, FD_t out, char * rootDir )
+ {
+ int pipes[2];
+ int flag;
+@@ -158,13 +158,12 @@ static void doScriptExec(int selinux, AR
+ setenv("RPM_INSTALL_PREFIX", *pf, 1);
+ }
+ }
+-
+- if (chdir("/") == 0) {
++ if (chdir(rootDir) == 0) {
+ /* XXX Don't mtrace into children. */
+ unsetenv("MALLOC_CHECK_");
+
+ /* Permit libselinux to do the scriptlet exec. */
+- if (selinux == 1) {
++ if (selinux == 1) {
+ xx = rpm_execcon(0, argv[0], argv, environ);
+ }
+
+@@ -175,12 +174,12 @@ static void doScriptExec(int selinux, AR
+ _exit(127); /* exit 127 for compatibility with bash(1) */
+ }
+
+-static char * writeScript(const char *cmd, const char *script)
++static char * writeScript(const char *cmd, const char *script, char * rootDir)
+ {
+ char *fn = NULL;
+ size_t slen = strlen(script);
+ int ok = 0;
+- FD_t fd = rpmMkTempFile("/", &fn);
++ FD_t fd = rpmMkTempFile(rootDir, &fn);
+
+ if (Ferror(fd))
+ goto exit;
+@@ -204,7 +203,7 @@ exit:
+ */
+ static rpmRC runExtScript(int selinux, ARGV_const_t prefixes,
+ const char *sname, rpmlogLvl lvl, FD_t scriptFd,
+- ARGV_t * argvp, const char *script, int arg1, int arg2)
++ ARGV_t * argvp, const char *script, int arg1, int arg2,char * rootDir)
+ {
+ FD_t out = NULL;
+ char * fn = NULL;
+@@ -215,7 +214,7 @@ static rpmRC runExtScript(int selinux, A
+ rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
+
+ if (script) {
+- fn = writeScript(*argvp[0], script);
++ fn = writeScript(*argvp[0], script, rootDir);
+ if (fn == NULL) {
+ rpmlog(RPMLOG_ERR,
+ _("Couldn't create temporary file for %s: %s\n"),
+@@ -258,7 +257,7 @@ static rpmRC runExtScript(int selinux, A
+ } else if (pid == 0) {/* Child */
+ rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
+ sname, *argvp[0], (unsigned)getpid());
+- doScriptExec(selinux, *argvp, prefixes, scriptFd, out);
++ doScriptExec(selinux, *argvp, prefixes, scriptFd, out, rootDir);
+ }
+
+ do {
+@@ -297,13 +296,27 @@ exit:
+ }
+
+ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+- ARGV_const_t prefixes, int warn_only, int selinux)
++ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir)
+ {
+ ARGV_t args = NULL;
+ rpmlogLvl lvl = warn_only ? RPMLOG_WARNING : RPMLOG_ERR;
+ rpmRC rc;
+-
+- if (script == NULL) return RPMRC_OK;
++#ifdef RPM_VENDOR_OE
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++#endif
++
++ if (script == NULL) return RPMRC_OK;
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper) {
++ argvAdd(&args, scriptletWrapper);
++
++ if ( rootDir ) {
++ argvAdd(&args, rootDir);
++ } else {
++ argvAdd(&args, "/");
++ }
++ }
++#endif
+
+ /* construct a new argv as we can't modify the one from header */
+ if (script->args) {
+@@ -315,7 +328,7 @@ rpmRC rpmScriptRun(rpmScript script, int
+ if (rstreq(args[0], "<lua>")) {
+ rc = runLuaScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
+ } else {
+- rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
++ rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, rootDir);
+ }
+ argvFree(args);
+
+Index: rpm-4.11.2/lib/rpmscript.h
+===================================================================
+--- rpm-4.11.2.orig/lib/rpmscript.h
++++ rpm-4.11.2/lib/rpmscript.h
+@@ -29,7 +29,7 @@ rpmScript rpmScriptFree(rpmScript script
+
+ RPM_GNUC_INTERNAL
+ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+- ARGV_const_t prefixes, int warn_only, int selinux);
++ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir);
+
+ RPM_GNUC_INTERNAL
+ rpmTagVal rpmScriptTag(rpmScript script);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
new file mode 100644
index 0000000000..3da608573a
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
@@ -0,0 +1,384 @@
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/build/pack.c b/build/pack.c
+index b6b2bea..5c3d8df 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -273,8 +273,10 @@ static rpmTagVal depevrtags[] = {
+ RPMTAG_CONFLICTVERSION,
+ RPMTAG_ORDERVERSION,
+ RPMTAG_TRIGGERVERSION,
+- RPMTAG_SUGGESTSVERSION,
+- RPMTAG_ENHANCESVERSION,
++ RPMTAG_SUGGESTVERSION,
++ RPMTAG_ENHANCEVERSION,
++ RPMTAG_RECOMMENDVERSION,
++ RPMTAG_SUPPLEMENTVERSION,
+ 0
+ };
+
+diff --git a/build/parsePreamble.c b/build/parsePreamble.c
+index 5772bef..cbbbee3 100644
+--- a/build/parsePreamble.c
++++ b/build/parsePreamble.c
+@@ -821,6 +821,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
+ }
+ /* fallthrough */
+ case RPMTAG_PREREQ:
++ case RPMTAG_RECOMMENDFLAGS:
++ case RPMTAG_SUGGESTFLAGS:
++ case RPMTAG_SUPPLEMENTFLAGS:
++ case RPMTAG_ENHANCEFLAGS:
+ case RPMTAG_CONFLICTFLAGS:
+ case RPMTAG_OBSOLETEFLAGS:
+ case RPMTAG_PROVIDEFLAGS:
+@@ -922,6 +926,10 @@ static struct PreambleRec_s const preambleList[] = {
+ {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
+ {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
+ {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
++ {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")},
++ {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")},
++ {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")},
++ {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")},
+ {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
+ {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
+ {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
+diff --git a/build/parseReqs.c b/build/parseReqs.c
+index ba080a1..1427111 100644
+--- a/build/parseReqs.c
++++ b/build/parseReqs.c
+@@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
+ nametag = RPMTAG_REQUIRENAME;
+ tagflags |= RPMSENSE_ANY;
+ break;
++ case RPMTAG_RECOMMENDFLAGS:
++ nametag = RPMTAG_RECOMMENDNAME;
++ break;
++ case RPMTAG_SUGGESTFLAGS:
++ nametag = RPMTAG_SUGGESTNAME;
++ break;
++ case RPMTAG_SUPPLEMENTFLAGS:
++ nametag = RPMTAG_SUPPLEMENTNAME;
++ break;
++ case RPMTAG_ENHANCEFLAGS:
++ nametag = RPMTAG_ENHANCENAME;
++ break;
+ case RPMTAG_PROVIDEFLAGS:
+ nametag = RPMTAG_PROVIDENAME;
+ break;
+diff --git a/build/reqprov.c b/build/reqprov.c
+index a368f42..c270af6 100644
+--- a/build/reqprov.c
++++ b/build/reqprov.c
+@@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal tagN,
+ extra = Flags & RPMSENSE_TRIGGER;
+ dsp = &pkg->triggers;
+ break;
++ case RPMTAG_RECOMMENDNAME:
++ versiontag = RPMTAG_RECOMMENDVERSION;
++ flagtag = RPMTAG_RECOMMENDFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->recommends;
++ break;
++ case RPMTAG_SUGGESTNAME:
++ versiontag = RPMTAG_SUGGESTVERSION;
++ flagtag = RPMTAG_SUGGESTFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->suggests;
++ break;
++ case RPMTAG_SUPPLEMENTNAME:
++ versiontag = RPMTAG_SUPPLEMENTVERSION;
++ flagtag = RPMTAG_SUPPLEMENTFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->supplements;
++ break;
++ case RPMTAG_ENHANCENAME:
++ versiontag = RPMTAG_ENHANCEVERSION;
++ flagtag = RPMTAG_ENHANCEFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->enhances;
++ break;
+ case RPMTAG_REQUIRENAME:
+ default:
+ tagN = RPMTAG_REQUIRENAME;
+diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
+index a9e4c7c..0a1977f 100644
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -93,6 +93,10 @@ struct Package_s {
+ rpmds ds; /*!< Requires: N = EVR */
+ rpmds requires;
+ rpmds provides;
++ rpmds recommends;
++ rpmds suggests;
++ rpmds supplements;
++ rpmds enhances;
+ rpmds conflicts;
+ rpmds obsoletes;
+ rpmds triggers;
+diff --git a/build/spec.c b/build/spec.c
+index 703ec78..7ae2120 100644
+--- a/build/spec.c
++++ b/build/spec.c
+@@ -139,6 +139,11 @@ static Package freePackage(Package pkg)
+ pkg->ds = rpmdsFree(pkg->ds);
+ pkg->requires = rpmdsFree(pkg->requires);
+ pkg->provides = rpmdsFree(pkg->provides);
++ pkg->recommends = rpmdsFree(pkg->recommends);
++ pkg->suggests = rpmdsFree(pkg->suggests);
++ pkg->supplements = rpmdsFree(pkg->supplements);
++ pkg->enhances = rpmdsFree(pkg->enhances);
++
+ pkg->conflicts = rpmdsFree(pkg->conflicts);
+ pkg->obsoletes = rpmdsFree(pkg->obsoletes);
+ pkg->triggers = rpmdsFree(pkg->triggers);
+diff --git a/lib/rpmds.c b/lib/rpmds.c
+index 7a51167..1e5dda0 100644
+--- a/lib/rpmds.c
++++ b/lib/rpmds.c
+@@ -52,6 +52,22 @@ static int dsType(rpmTagVal tag,
+ t = "Requires";
+ evr = RPMTAG_REQUIREVERSION;
+ f = RPMTAG_REQUIREFLAGS;
++ } else if (tag == RPMTAG_SUPPLEMENTNAME) {
++ t = "Supplements";
++ evr = RPMTAG_SUPPLEMENTVERSION;
++ f = RPMTAG_SUPPLEMENTFLAGS;
++ } else if (tag == RPMTAG_ENHANCENAME) {
++ t = "Enhances";
++ evr = RPMTAG_ENHANCEVERSION;
++ f = RPMTAG_ENHANCEFLAGS;
++ } else if (tag == RPMTAG_RECOMMENDNAME) {
++ t = "Recommends";
++ evr = RPMTAG_RECOMMENDVERSION;
++ f = RPMTAG_RECOMMENDFLAGS;
++ } else if (tag == RPMTAG_SUGGESTNAME) {
++ t = "Suggests";
++ evr = RPMTAG_SUGGESTVERSION;
++ f = RPMTAG_SUGGESTFLAGS;
+ } else if (tag == RPMTAG_CONFLICTNAME) {
+ t = "Conflicts";
+ evr = RPMTAG_CONFLICTVERSION;
+diff --git a/lib/rpmtag.h b/lib/rpmtag.h
+index 64b03f1..b943229 100644
+--- a/lib/rpmtag.h
++++ b/lib/rpmtag.h
+@@ -217,14 +217,14 @@ typedef enum rpmTag_e {
+ RPMTAG_PRETRANSPROG = 1153, /* s[] */
+ RPMTAG_POSTTRANSPROG = 1154, /* s[] */
+ RPMTAG_DISTTAG = 1155, /* s */
+- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */
+-#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */
+- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */
+- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */
+- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */
+-#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */
+- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */
+- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */
++ RPMTAG_OLDSUGGESTSNAME = 1156, /* s[] (unimplemented) */
++#define RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */
++ RPMTAG_OLDSUGGESTSVERSION = 1157, /* s[] (unimplemented) */
++ RPMTAG_OLDSUGGESTSFLAGS = 1158, /* i[] (unimplemented) */
++ RPMTAG_OLDENHANCESNAME = 1159, /* s[] (unimplemented) */
++#define RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */
++ RPMTAG_OLDENHANCESVERSION = 1160, /* s[] (unimplemented) */
++ RPMTAG_OLDENHANCESFLAGS = 1161, /* i[] (unimplemented) */
+ RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
+ RPMTAG_CVSID = 1163, /* s (unimplemented) */
+ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
+@@ -261,6 +261,7 @@ typedef enum rpmTag_e {
+ RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */
+ RPMTAG_DBINSTANCE = 1195, /* i extension */
+ RPMTAG_NVRA = 1196, /* s extension */
++
+ /* tags 1997-4999 reserved */
+ RPMTAG_FILENAMES = 5000, /* s[] extension */
+ RPMTAG_FILEPROVIDE = 5001, /* s[] extension */
+@@ -307,6 +308,26 @@ typedef enum rpmTag_e {
+ RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */
+ RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */
+ RPMTAG_FILENLINKS = 5045, /* i[] extension */
++ RPMTAG_RECOMMENDNAME = 5046, /* s[] */
++#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */
++ RPMTAG_RECOMMENDVERSION = 5047, /* s[] */
++ RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */
++ RPMTAG_SUGGESTNAME = 5049, /* s[] */
++#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */
++ RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */
++ RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */
++ RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */
++#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */
++ RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */
++ RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */
++ RPMTAG_ENHANCENAME = 5055, /* s[] */
++#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */
++ RPMTAG_ENHANCEVERSION = 5056, /* s[] */
++ RPMTAG_ENHANCEFLAGS = 5057, /* i[] */
++ RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */
++ RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */
++ RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */
++ RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */
+
+ RPMTAG_FIRSTFREE_TAG /*!< internal */
+ } rpmTag;
+diff --git a/lib/tagexts.c b/lib/tagexts.c
+index 29b2bae..e940310 100644
+--- a/lib/tagexts.c
++++ b/lib/tagexts.c
+@@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
+ return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
+ }
+
++static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
++}
++
++static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
++}
++
++static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
++}
++
++static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
++}
++
+ static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
+ {
+ return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME);
+@@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = {
+ { RPMTAG_EPOCHNUM, epochnumTag },
+ { RPMTAG_INSTFILENAMES, instfilenamesTag },
+ { RPMTAG_REQUIRENEVRS, requirenevrsTag },
++ { RPMTAG_RECOMMENDNEVRS, recommendnevrsTag},
++ { RPMTAG_SUGGESTNEVRS, suggestnevrsTag},
++ { RPMTAG_SUPPLEMENTNEVRS, supplementnevrsTag},
++ { RPMTAG_ENHANCENEVRS, enhancenevrsTag},
+ { RPMTAG_PROVIDENEVRS, providenevrsTag },
+ { RPMTAG_OBSOLETENEVRS, obsoletenevrsTag },
+ { RPMTAG_CONFLICTNEVRS, conflictnevrsTag },
+diff --git a/rpmpopt.in b/rpmpopt.in
+index 805599e..036ab4e 100644
+--- a/rpmpopt.in
++++ b/rpmpopt.in
+@@ -67,6 +67,19 @@ rpm alias --requires --qf \
+ --POPTdesc=$"list capabilities required by package(s)"
+ rpm alias -R --requires
+
++rpm alias --recommends --qf \
++ "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
++ --POPTdesc=$"list capabilities recommended by package(s)"
++rpm alias --suggests --qf \
++ "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
++ --POPTdesc=$"list capabilities suggested by package(s)"
++rpm alias --supplements --qf \
++ "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
++ --POPTdesc=$"list capabilities supplemented by package(s)"
++rpm alias --enhances --qf \
++ "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
++ --POPTdesc=$"list capabilities enhanced by package(s)"
++
+ rpm alias --info --qf '\
+ Name : %{NAME}\n\
+ %|EPOCH?{Epoch : %{EPOCH}\n}|\
+diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec
+index cb4cbbd..7c47f6d 100644
+--- a/tests/data/SPECS/deptest.spec
++++ b/tests/data/SPECS/deptest.spec
+@@ -10,6 +10,10 @@ BuildArch: noarch
+ %{?provs:Provides: %{provs}}
+ %{?cfls:Conflicts: %{cfls}}
+ %{?obs:Obsoletes: %{obs}}
++%{?recs:Recommends: %{recs}}
++%{?sugs:Suggests: %{sugs}}
++%{?sups:Supplements: %{sups}}
++%{?ens:Enhances: %{ens}}
+
+ %description
+ %{summary}
+diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
+index 6230903..c4c954c 100644
+--- a/tests/rpmbuild.at
++++ b/tests/rpmbuild.at
+@@ -185,3 +185,25 @@ lrwxrwxrwx /opt/globtest/linkgood
+ ],
+ [])
+ AT_CLEANUP
++
++# ------------------------------
++# Check if weak and reverse requires can be built
++AT_SETUP([Weak and reverse requires])
++AT_KEYWORDS([build])
++AT_CHECK([
++
++runroot rpmbuild -bb --quiet \
++ --define "pkg weakdeps" \
++ --define "recs foo > 1.2.3" \
++ --define "sugs bar >= 0.1.2" \
++ --define "sups baz" \
++ --define "ens zap = 3" \
++ /data/SPECS/deptest.spec
++
++runroot rpm -qp --qf "[%{supplementname}\n]" /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
++],
++[0],
++[baz
++],
++[ignore])
++AT_CLEANUP
+diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
+index 13131e2..80cca63 100644
+--- a/tests/rpmgeneral.at
++++ b/tests/rpmgeneral.at
+@@ -79,6 +79,11 @@ DISTTAG
+ DISTURL
+ DSAHEADER
+ E
++ENHANCEFLAGS
++ENHANCENAME
++ENHANCENEVRS
++ENHANCES
++ENHANCEVERSION
+ EPOCH
+ EPOCHNUM
+ EVR
+@@ -199,6 +204,11 @@ PROVIDES
+ PROVIDEVERSION
+ PUBKEYS
+ R
++RECOMMENDFLAGS
++RECOMMENDNAME
++RECOMMENDNEVRS
++RECOMMENDS
++RECOMMENDVERSION
+ RECONTEXTS
+ RELEASE
+ REMOVETID
+@@ -219,7 +229,17 @@ SOURCE
+ SOURCEPACKAGE
+ SOURCEPKGID
+ SOURCERPM
++SUGGESTFLAGS
++SUGGESTNAME
++SUGGESTNEVRS
++SUGGESTS
++SUGGESTVERSION
+ SUMMARY
++SUPPLEMENTFLAGS
++SUPPLEMENTNAME
++SUPPLEMENTNEVRS
++SUPPLEMENTS
++SUPPLEMENTVERSION
+ TRIGGERCONDS
+ TRIGGERFLAGS
+ TRIGGERINDEX
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
new file mode 100644
index 0000000000..8d84cf8a11
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
@@ -0,0 +1,38 @@
+
+Use pkgconfig to get the correct include paths
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/configure.ac b/configure.ac
+index e97f727..8179f44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -540,10 +540,10 @@ esac],
+
+ AS_IF([test "$enable_python" = yes],[
+ AM_PATH_PYTHON([2.6],[
+- WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
++ WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I python)
+ WITH_PYTHON_SUBPACKAGE=1
+ save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
++ CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE"
+ AC_CHECK_HEADER([Python.h],[],
+ [AC_MSG_ERROR([missing Python.h])
+ ])
+diff --git a/python/Makefile.am b/python/Makefile.am
+index fff51ae..f37cb9d 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py
+
+ AM_CPPFLAGS = -I$(top_builddir)/include/
+ AM_CPPFLAGS += -I$(top_srcdir)/python
+-AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@
++AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@
+
+ pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la
+ pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py
diff --git a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
new file mode 100644
index 0000000000..23bc3361d9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
@@ -0,0 +1,49 @@
+From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Tue, 11 Nov 2014 16:28:22 +0800
+Subject: [PATCH] using poptParseArgvString to parse the
+ _gpg_check_password_cmd
+
+Upstream-Status: Pending
+
+Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but
+strace shows that gpg_name has a quote when run _gpg_check_password,
+but not when run __gpg_sign_cmd; for example, if gpg_name is "tester"
+
+ execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose",
+ "--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars */]) = 0
+
+ execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor",
+ "--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", "-sbo"..,) = 0
+
+it can be fixed by removing the quote around %{gpg_name} when define
+__gpg_check_password_cmd in macros/macros, like below, but if gpg_name includes
+space, it will not work.
+
+ %__gpg_check_password_cmd %{__gpg} \
+ gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so -
+
+The poptParseArgvString function is used to parse _gpg_sign_cmd, so using
+poptParseArgvString to parse __gpg_check_password_cmd to fix this issue.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ rpmdb/signature.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpmdb/signature.c b/rpmdb/signature.c
+index c35e0ab..016e8d1 100644
+--- a/rpmdb/signature.c
++++ b/rpmdb/signature.c
+@@ -529,7 +529,7 @@ int rpmCheckPassPhrase(const char * passPhrase)
+ (void) setenv("GNUPGHOME", gpg_path, 1);
+
+ cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
+- rc = argvSplit(&av, cmd, NULL);
++ rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
+ if (!rc)
+ rc = execve(av[0], (char *const *)av+1, environ);
+
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
new file mode 100644
index 0000000000..8b5f8d66c8
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
@@ -0,0 +1,32 @@
+From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 8 Jul 2014 07:41:10 +0800
+Subject: [PATCH] configure.ac: disable -Wno-override-init
+
+Fixed rpm-native.do_configure error on CentOS 5.x:
+
+cc1: error: unrecognized command line option "-Wno-override-init"
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index adeffe0..6746b4c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings,
+ # XXX gcc-4.2 on Mac OS X hasn't
+ # CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
+ # XXX rpmio/set.c needs this
+- CFLAGS="$CFLAGS -Wno-override-init"
++# CFLAGS="$CFLAGS -Wno-override-init"
+ elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then
+ dnl # Sun Studio (usually "cc")
+ CFLAGS="$CFLAGS -v"
+--
+1.8.2.1
+
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
new file mode 100644
index 0000000000..d2d9b09845
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
@@ -0,0 +1,24 @@
+chroot: realpath is required before expanding _dbpath
+
+_usr turned out to be a relative path to support dyanmic config, but it's
+being used somewhere as a indicator to locate substrings, so we must get
+the real path of it in advance.
+
+Upstream-Status: Inapproriate (OpenEmbedded specific)
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
+--- a/rpmio/rpmrpc.c
++++ b/rpmio/rpmrpc.c
+@@ -257,7 +257,9 @@ int Open(const char * path, int flags, m
+ /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */
+ if (fdno < 0 && errno == ENOENT) {
+ const char *dbpath = rpmExpand("%{?_dbpath}/", NULL);
+- const char * fn = strstr(path + 1, dbpath);
++ char resolved_dbpath[PATH_MAX];
++ realpath(dbpath, resolved_dbpath);
++ const char * fn = strstr(path + 1, resolved_dbpath);
+ if (fn)
+ fdno = open(fn, flags, mode);
+ dbpath = _free(dbpath);
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
new file mode 100644
index 0000000000..f08bd688f1
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
@@ -0,0 +1,32 @@
+rpm: compile rpmqv.c instead of rpmqv.cc
+
+Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
+into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we
+generate does not.
+
+So, go back to using rpmqv.c (which is currently identical to rpmqv.cc).
+
+Upstream-Status: Inappropriate [other]
+
+ When linking with g++ is really necessary, the upstream package will do that.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -127,13 +127,13 @@ rpm_SOURCES = build.c
+ rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
+ rpm_LDADD = rpm.o $(myLDADD)
+ rpm.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c
+
+ rpmbuild_SOURCES = build.c
+ rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
+ rpmbuild_LDADD = rpmbuild.o $(myLDADD)
+ rpmbuild.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c
+
+ .PHONY: splint
+ splint:
diff --git a/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
new file mode 100644
index 0000000000..4e44bc4fec
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
@@ -0,0 +1,135 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://www.rpm.org"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python"
+
+SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \
+ file://use-pkgconfig-for-python.patch \
+ file://remove-db3-from-configure.patch \
+ file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \
+ file://support-suggests-tag.patch \
+ file://remove-dir-check.patch \
+ file://disable_shortcircuited.patch \
+ file://fix_libdir.patch \
+ file://rpm-scriptetexechelp.patch \
+ file://pythondeps.sh \
+ "
+
+SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
+SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4"
+
+PR = "r1"
+
+inherit autotools
+inherit pythonnative
+inherit pkgconfig
+inherit gettext
+
+EXTRA_OECONF += "--host=${HOST_SYS} \
+ --program-prefix= \
+ --prefix=${prefix} \
+ --exec-prefix=${prefix} \
+ --bindir=${prefix}/bin \
+ --sbindir=${prefix}/sbin \
+ --sysconfdir=${sysconfdir} \
+ --datadir=${prefix}/share \
+ --includedir=${prefix}/include \
+ --libdir=${prefix}/lib \
+ --libexecdir=${prefix}/libexec \
+ --localstatedir=${localstatedir} \
+ --sharedstatedir=${prefix}/com \
+ --mandir=${mandir} \
+ --infodir=${infodir} \
+ --disable-dependency-tracking \
+ --with-acl \
+ --without-lua \
+ --without-cap \
+ --enable-shared \
+ --enable-python \
+ --with-external-db \
+ "
+
+CPPFLAGS_append = " `pkg-config --cflags nss`"
+LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections"
+CCFLAGS_append = " -fPIC "
+CXXFLAGS_append = " -fPIC "
+CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE "
+
+do_configure_prepend() {
+ rm -rf sqlite
+ rm -f m4/libtool.m4
+ rm -f m4/lt*.m4
+ rm -rf db3/configure*
+}
+
+do_install_append() {
+ mv ${D}/${base_bindir}/rpm ${D}/${bindir}/
+ rmdir ${D}/${base_bindir}
+ rm -f ${D}${prefix}/lib/*.la
+ rm -f ${D}${prefix}/lib/rpm-plugins/*.la
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
+ rm -fr ${D}/var
+ install -d ${D}${prefix}/lib/rpm/bin
+ ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit
+ ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore
+ install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
+}
+
+pkg_postinst_${PN}() {
+
+ [ "x\$D" == "x" ] && ldconfig
+ test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb
+ rm -f ${localstatedir}/lib/rpm/Filemd5s \
+ ${localstatedir}/lib/rpm/Filedigests \
+ ${localstatedir}/lib/rpm/Requireversion \
+ ${localstatedir}/lib/rpm/Provideversion
+
+}
+
+pkg_postrm_${PN}() {
+ [ "x\$D" == "x" ] && ldconfig
+
+}
+
+PACKAGES += "python-${PN}"
+PROVIDES += "python-rpm"
+
+FILES_${PN} += "${libdir}/rpm \
+ ${libdir}/rpm-plugins/exec.so \
+ "
+RDEPENDS_${PN} = "base-files run-postinsts"
+RDEPENDS_${PN}_class-native = "base-files run-postinsts"
+
+FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \
+ ${libdir}/rpm-plugins/.debug/* \
+ ${libdir}/python2.7/site-packages/rpm/.debug/* \
+ "
+
+FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la"
+
+FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*"
+RDEPENDS_python-${PN} = "${PN} python"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index 4ab22e7602..a85e28fa1f 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -108,6 +108,8 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
file://rpm-fix-logio-cp.patch \
file://rpm-db5-or-db6.patch \
file://rpm-rpmpgp-fix.patch \
+ file://rpm-disable-Wno-override-init.patch \
+ file://rpm-realpath.patch \
"
# Uncomment the following line to enable platform score debugging
@@ -273,8 +275,6 @@ FILES_${PN}-libs = "${libdir}/librpm-*.so \
${libdir}/librpmbuild-*.so \
"
-RDEPENDS_${PN}-build += "bash"
-
FILES_${PN}-build = "${prefix}/src/rpm \
${bindir}/rpmbuild \
${bindir}/rpmbuild.real \
@@ -348,7 +348,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file"
+RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN}"
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index cc836befe0..d99a300285 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -91,6 +91,10 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
file://rpm-payload-use-hashed-inode.patch \
file://rpm-fix-logio-cp.patch \
file://rpm-db5-or-db6.patch \
+ file://rpm-disable-Wno-override-init.patch \
+ file://rpmqv_cc_b_gone.patch \
+ file://rpm-realpath.patch \
+ file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
"
# Uncomment the following line to enable platform score debugging
@@ -259,8 +263,6 @@ FILES_${PN}-libs = "${libdir}/librpm-*.so \
${libdir}/librpmbuild-*.so \
"
-RDEPENDS_${PN}-build += "bash"
-
FILES_${PN}-build = "${prefix}/src/rpm \
${bindir}/rpmbuild \
${bindir}/rpmbuild.real \
@@ -334,7 +336,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file"
+RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN}"
@@ -342,6 +344,7 @@ FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*"
FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+PROVIDES += "python-rpm"
FILES_perl-module-rpm = "${libdir}/perl/*/* \
"
diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 4e9d055f24..7f4caf9886 100644
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
@@ -275,7 +275,13 @@ int printDepList(rpmts *ts, int tscount)
char *name = strdup((char *)he->p.ptr);
/* Get its requires */
he->tag = RPMTAG_REQUIRENAME;
- rc = (headerGet(h, he, 0) != 1);
+ if (rc = (headerGet(h, he, 0) != 1)) {
+ if (debugmode) {
+ printf("DEBUG: %s requires null\n", name);
+ }
+ rc = 0;
+ continue;
+ }
ARGV_t reqs = (ARGV_t)he->p.ptr;
/* Get its requireflags */
he->tag = RPMTAG_REQUIREFLAGS;
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.0.bb b/meta/recipes-devtools/rsync/rsync_3.1.0.bb
deleted file mode 100644
index 72c072dae5..0000000000
--- a/meta/recipes-devtools/rsync/rsync_3.1.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require rsync.inc
-
-
-SRC_URI += "file://acinclude.m4"
-
-SRC_URI[md5sum] = "3be148772a33224771a8d4d2a028b132"
-SRC_URI[sha256sum] = "81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e"
-
-EXTRA_OECONF += "--disable-xattr-support --disable-acl-support"
-
-# rsync 3.0 uses configure.sh instead of configure, and
-# makefile checks the existence of configure.sh
-do_configure_prepend () {
- rm -f ${S}/configure ${S}/configure.sh
- cp -f ${WORKDIR}/acinclude.m4 ${S}/
-
- # by default, if crosscompiling, rsync
- # disables a number of capabilities, hardlinking
- # symlinks and special files (ie devices)
- export rsync_cv_can_hardlink_special=yes
- export rsync_cv_can_hardlink_symlink=yes
-}
-
-do_configure_append () {
- cp -f ${S}/configure ${S}/configure.sh
-}
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.1.bb b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
new file mode 100644
index 0000000000..5ff8ae8bb4
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
@@ -0,0 +1,27 @@
+require rsync.inc
+
+
+SRC_URI += "file://acinclude.m4"
+
+SRC_URI[md5sum] = "43bd6676f0b404326eee2d63be3cdcfe"
+SRC_URI[sha256sum] = "7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621"
+
+PACKAGECONFIG ??= "acl attr"
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+ rm -f ${S}/configure ${S}/configure.sh
+ cp -f ${WORKDIR}/acinclude.m4 ${S}/
+
+ # By default, if crosscompiling, rsync disables a number of
+ # capabilities, hardlinking symlinks and special files (i.e. devices)
+ export rsync_cv_can_hardlink_special=yes
+ export rsync_cv_can_hardlink_symlink=yes
+}
+
+do_configure_append () {
+ cp -f ${S}/configure ${S}/configure.sh
+}
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 822327aadc..85a043949e 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -13,5 +13,4 @@ RemainAfterExit=No
TimeoutSec=0
[Install]
-WantedBy=basic.target
WantedBy=sysinit.target
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 64f85c262d..d126132a87 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -9,6 +9,8 @@ SRC_URI = "file://run-postinsts \
file://run-postinsts.init \
file://run-postinsts.service"
+S = "${WORKDIR}"
+
inherit allarch systemd update-rc.d
INITSCRIPT_NAME = "run-postinsts"
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch
deleted file mode 100644
index 8b9904fd56..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Upstream-Status: Backport
-
-Reference:http://squashfs.git.sourceforge.net/git/gitweb.cgi?p=
-squashfs/squashfs;a=commit;h=19c38fba0be1ce949ab44310d7f49887576cc123
-
-Fix potential stack overflow in get_component() where an individual
-pathname component in an extract file (specified on the command line
-or in an extract file) could exceed the 1024 byte sized targname
-allocated on the stack.
-
-Fix by dynamically allocating targname rather than storing it as
-a fixed size on the stack.
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-29 17:04:08.000000000 +0800
-+++ b/unsquashfs.c 2012-11-29 17:04:25.000000000 +0800
-@@ -1034,15 +1034,18 @@ void squashfs_closedir(struct dir *dir)
- }
-
-
--char *get_component(char *target, char *targname)
-+char *get_component(char *target, char **targname)
- {
-+ char *start;
-+
- while(*target == '/')
- target ++;
-
-+ start = target;
- while(*target != '/' && *target!= '\0')
-- *targname ++ = *target ++;
-+ target ++;
-
-- *targname = '\0';
-+ *targname = strndup(start, target - start);
-
- return target;
- }
-@@ -1068,12 +1071,12 @@ void free_path(struct pathname *paths)
-
- struct pathname *add_path(struct pathname *paths, char *target, char *alltarget)
- {
-- char targname[1024];
-+ char *targname;
- int i, error;
-
- TRACE("add_path: adding \"%s\" extract file\n", target);
-
-- target = get_component(target, targname);
-+ target = get_component(target, &targname);
-
- if(paths == NULL) {
- paths = malloc(sizeof(struct pathname));
-@@ -1097,7 +1100,7 @@ struct pathname *add_path(struct pathnam
- sizeof(struct path_entry));
- if(paths->name == NULL)
- EXIT_UNSQUASH("Out of memory in add_path\n");
-- paths->name[i].name = strdup(targname);
-+ paths->name[i].name = targname;
- paths->name[i].paths = NULL;
- if(use_regex) {
- paths->name[i].preg = malloc(sizeof(regex_t));
-@@ -1130,6 +1133,8 @@ struct pathname *add_path(struct pathnam
- /*
- * existing matching entry
- */
-+ free(targname);
-+
- if(paths->name[i].paths == NULL) {
- /*
- * No sub-directory which means this is the leaf
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch
deleted file mode 100644
index 0dabfba663..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-Upstream-Status: Backport
-
-Reference: http://squashfs.git.sourceforge.net/git/gitweb.cgi?
-p=squashfs/squashfs;a=patch;h=8515b3d420f502c5c0236b86e2d6d7e3b23c190e
-
-Integer overflow in the queue_init function in unsquashfs.c in
-unsquashfs in Squashfs 4.2 and earlier allows remote attackers
-to execute arbitrary code via a crafted block_log field in the
-superblock of a .sqsh file, leading to a heap-based buffer overflow.
-
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4025
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
---- a/unsquashfs.c 2012-11-30 17:57:57.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 17:58:09.000000000 +0800
-@@ -33,6 +33,7 @@
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-+#include <limits.h>
-
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_deflate, *to_writer, *from_writer;
-@@ -138,6 +139,24 @@ void sigalrm_handler()
- }
-
-
-+int add_overflow(int a, int b)
-+{
-+ return (INT_MAX - a) < b;
-+}
-+
-+
-+int shift_overflow(int a, int shift)
-+{
-+ return (INT_MAX >> shift) < a;
-+}
-+
-+
-+int multiply_overflow(int a, int multiplier)
-+{
-+ return (INT_MAX / multiplier) < a;
-+}
-+
-+
- struct queue *queue_init(int size)
- {
- struct queue *queue = malloc(sizeof(struct queue));
-@@ -145,6 +164,10 @@ struct queue *queue_init(int size)
- if(queue == NULL)
- EXIT_UNSQUASH("Out of memory in queue_init\n");
-
-+ if(add_overflow(size, 1) ||
-+ multiply_overflow(size + 1, sizeof(void *)))
-+ EXIT_UNSQUASH("Size too large in queue_init\n");
-+
- queue->data = malloc(sizeof(void *) * (size + 1));
- if(queue->data == NULL)
- EXIT_UNSQUASH("Out of memory in queue_init\n");
-@@ -1948,13 +1971,30 @@ void initialise_threads(int fragment_buf
- * allocate to_reader, to_deflate and to_writer queues. Set based on
- * open file limit and cache size, unless open file limit is unlimited,
- * in which case set purely based on cache limits
-+ *
-+ * In doing so, check that the user supplied values do not overflow
-+ * a signed int
- */
- if (max_files != -1) {
-+ if(add_overflow(data_buffer_size, max_files) ||
-+ add_overflow(data_buffer_size, max_files * 2))
-+ EXIT_UNSQUASH("Data queue size is too large\n");
-+
- to_reader = queue_init(max_files + data_buffer_size);
- to_deflate = queue_init(max_files + data_buffer_size);
- to_writer = queue_init(max_files * 2 + data_buffer_size);
- } else {
-- int all_buffers_size = fragment_buffer_size + data_buffer_size;
-+ int all_buffers_size;
-+
-+ if(add_overflow(fragment_buffer_size, data_buffer_size))
-+ EXIT_UNSQUASH("Data and fragment queues combined are"
-+ " too large\n");
-+
-+ all_buffers_size = fragment_buffer_size + data_buffer_size;
-+
-+ if(add_overflow(all_buffers_size, all_buffers_size))
-+ EXIT_UNSQUASH("Data and fragment queues combined are"
-+ " too large\n");
-
- to_reader = queue_init(all_buffers_size);
- to_deflate = queue_init(all_buffers_size);
-@@ -2059,6 +2099,32 @@ void progress_bar(long long current, lon
- }
-
-
-+int parse_number(char *arg, int *res)
-+{
-+ char *b;
-+ long number = strtol(arg, &b, 10);
-+
-+ /* check for trailing junk after number */
-+ if(*b != '\0')
-+ return 0;
-+
-+ /* check for strtol underflow or overflow in conversion */
-+ if(number == LONG_MIN || number == LONG_MAX)
-+ return 0;
-+
-+ /* reject negative numbers as invalid */
-+ if(number < 0)
-+ return 0;
-+
-+ /* check if long result will overflow signed int */
-+ if(number > INT_MAX)
-+ return 0;
-+
-+ *res = number;
-+ return 1;
-+}
-+
-+
- #define VERSION() \
- printf("unsquashfs version 4.2 (2011/02/28)\n");\
- printf("copyright (C) 2011 Phillip Lougher "\
-@@ -2140,8 +2206,8 @@ int main(int argc, char *argv[])
- } else if(strcmp(argv[i], "-data-queue") == 0 ||
- strcmp(argv[i], "-da") == 0) {
- if((++i == argc) ||
-- (data_buffer_size = strtol(argv[i], &b,
-- 10), *b != '\0')) {
-+ !parse_number(argv[i],
-+ &data_buffer_size)) {
- ERROR("%s: -data-queue missing or invalid "
- "queue size\n", argv[0]);
- exit(1);
-@@ -2154,8 +2220,8 @@ int main(int argc, char *argv[])
- } else if(strcmp(argv[i], "-frag-queue") == 0 ||
- strcmp(argv[i], "-fr") == 0) {
- if((++i == argc) ||
-- (fragment_buffer_size = strtol(argv[i],
-- &b, 10), *b != '\0')) {
-+ !parse_number(argv[i],
-+ &fragment_buffer_size)) {
- ERROR("%s: -frag-queue missing or invalid "
- "queue size\n", argv[0]);
- exit(1);
-@@ -2280,11 +2346,39 @@ options:
- block_log = sBlk.s.block_log;
-
- /*
-+ * Sanity check block size and block log.
-+ *
-+ * Check they're within correct limits
-+ */
-+ if(block_size > SQUASHFS_FILE_MAX_SIZE ||
-+ block_log > SQUASHFS_FILE_MAX_LOG)
-+ EXIT_UNSQUASH("Block size or block_log too large."
-+ " File system is corrupt.\n");
-+
-+ /*
-+ * Check block_size and block_log match
-+ */
-+ if(block_size != (1 << block_log))
-+ EXIT_UNSQUASH("Block size and block_log do not match."
-+ " File system is corrupt.\n");
-+
-+ /*
- * convert from queue size in Mbytes to queue size in
-- * blocks
-+ * blocks.
-+ *
-+ * In doing so, check that the user supplied values do not
-+ * overflow a signed int
- */
-- fragment_buffer_size <<= 20 - block_log;
-- data_buffer_size <<= 20 - block_log;
-+ if(shift_overflow(fragment_buffer_size, 20 - block_log))
-+ EXIT_UNSQUASH("Fragment queue size is too large\n");
-+ else
-+ fragment_buffer_size <<= 20 - block_log;
-+
-+ if(shift_overflow(data_buffer_size, 20 - block_log))
-+ EXIT_UNSQUASH("Data queue size is too large\n");
-+ else
-+ data_buffer_size <<= 20 - block_log;
-+
- initialise_threads(fragment_buffer_size, data_buffer_size);
-
- fragment_data = malloc(block_size);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch
deleted file mode 100644
index fa075f9e7d..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Backport
-
-unsquashfs: add a commment and fix some other comments
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-30 15:27:14.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 15:27:56.000000000 +0800
-@@ -814,7 +814,7 @@ int write_file(struct inode *inode, char
-
- /*
- * the writer thread is queued a squashfs_file structure describing the
-- * file. If the file has one or more blocks or a fragments they are
-+ * file. If the file has one or more blocks or a fragment they are
- * queued separately (references to blocks in the cache).
- */
- file->fd = file_fd;
-@@ -838,7 +838,7 @@ int write_file(struct inode *inode, char
- block->offset = 0;
- block->size = i == file_end ? inode->data & (block_size - 1) :
- block_size;
-- if(block_list[i] == 0) /* sparse file */
-+ if(block_list[i] == 0) /* sparse block */
- block->buffer = NULL;
- else {
- block->buffer = cache_get(data_cache, start,
-@@ -2161,6 +2161,10 @@ options:
- block_size = sBlk.s.block_size;
- block_log = sBlk.s.block_log;
-
-+ /*
-+ * convert from queue size in Mbytes to queue size in
-+ * blocks
-+ */
- fragment_buffer_size <<= 20 - block_log;
- data_buffer_size <<= 20 - block_log;
- initialise_threads(fragment_buffer_size, data_buffer_size);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch
deleted file mode 100644
index c60f7b42af..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-Upstream-Status: Backport
-
-unsquashfs: fix open file limit
-
-Previously Unsquashfs relied on the to_writer queue being
-set to 1000 to limit the amount of open file read-ahead to a
-maximum of 500. For the default process limit of 1024 open files
-this was perhaps acceptable, but it obviously breaks if ulimit has
-been used to set the open file limit to below 504 (this includes
-stdin, stdout, stderr and the Squashfs filesystem being unsquashed).
-
-More importantly setting the to_writer queue to 1000 to limit
-the amount of files open has always been an inherent performance
-hit because the to_writer queue queues blocks. It limits the
-block readhead to 1000 blocks, irrespective of how many files
-that represents. A single file containing more than 1000 blocks
-will still be limited to a 1000 block readahead even though the
-data block cache typically can buffer more than this (at the
-default data cache size of 256 Mbytes and the default block size
-of 128 Kbytes, it can buffer 2048 blocks). Obviously the
-caches serve more than just a read-ahead role (they also
-cache decompressed blocks in case they're referenced later e.g.
-by duplicate files), but the artificial limit imposed on
-the read-ahead due to setting the to_writer queue to 1000 is
-unnecessary.
-
-This commit does away with the need to limit the to_writer queue,
-by introducing open_wait() and close_wake() calls which correctly
-track the amount of open files.
-
-Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-30 15:31:29.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 15:32:03.000000000 +0800
-@@ -31,6 +31,8 @@
-
- #include <sys/sysinfo.h>
- #include <sys/types.h>
-+#include <sys/time.h>
-+#include <sys/resource.h>
-
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_deflate, *to_writer, *from_writer;
-@@ -784,6 +786,46 @@ failure:
- }
-
-
-+pthread_mutex_t open_mutex = PTHREAD_MUTEX_INITIALIZER;
-+pthread_cond_t open_empty = PTHREAD_COND_INITIALIZER;
-+int open_unlimited, open_count;
-+#define OPEN_FILE_MARGIN 10
-+
-+
-+void open_init(int count)
-+{
-+ open_count = count;
-+ open_unlimited = count == -1;
-+}
-+
-+
-+int open_wait(char *pathname, int flags, mode_t mode)
-+{
-+ if (!open_unlimited) {
-+ pthread_mutex_lock(&open_mutex);
-+ while (open_count == 0)
-+ pthread_cond_wait(&open_empty, &open_mutex);
-+ open_count --;
-+ pthread_mutex_unlock(&open_mutex);
-+ }
-+
-+ return open(pathname, flags, mode);
-+}
-+
-+
-+void close_wake(int fd)
-+{
-+ close(fd);
-+
-+ if (!open_unlimited) {
-+ pthread_mutex_lock(&open_mutex);
-+ open_count ++;
-+ pthread_cond_signal(&open_empty);
-+ pthread_mutex_unlock(&open_mutex);
-+ }
-+}
-+
-+
- int write_file(struct inode *inode, char *pathname)
- {
- unsigned int file_fd, i;
-@@ -794,8 +836,8 @@ int write_file(struct inode *inode, char
-
- TRACE("write_file: regular file, blocks %d\n", inode->blocks);
-
-- file_fd = open(pathname, O_CREAT | O_WRONLY | (force ? O_TRUNC : 0),
-- (mode_t) inode->mode & 0777);
-+ file_fd = open_wait(pathname, O_CREAT | O_WRONLY |
-+ (force ? O_TRUNC : 0), (mode_t) inode->mode & 0777);
- if(file_fd == -1) {
- ERROR("write_file: failed to create file %s, because %s\n",
- pathname, strerror(errno));
-@@ -1712,7 +1754,7 @@ void *writer(void *arg)
- }
- }
-
-- close(file_fd);
-+ close_wake(file_fd);
- if(failed == FALSE)
- set_attributes(file->pathname, file->mode, file->uid,
- file->gid, file->time, file->xattr, force);
-@@ -1803,9 +1845,9 @@ void *progress_thread(void *arg)
-
- void initialise_threads(int fragment_buffer_size, int data_buffer_size)
- {
-- int i;
-+ struct rlimit rlim;
-+ int i, max_files, res;
- sigset_t sigmask, old_mask;
-- int all_buffers_size = fragment_buffer_size + data_buffer_size;
-
- sigemptyset(&sigmask);
- sigaddset(&sigmask, SIGINT);
-@@ -1841,10 +1883,86 @@ void initialise_threads(int fragment_buf
- EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
- deflator_thread = &thread[3];
-
-- to_reader = queue_init(all_buffers_size);
-- to_deflate = queue_init(all_buffers_size);
-- to_writer = queue_init(1000);
-+ /*
-+ * dimensioning the to_reader and to_deflate queues. The size of
-+ * these queues is directly related to the amount of block
-+ * read-ahead possible. To_reader queues block read requests to
-+ * the reader thread and to_deflate queues block decompression
-+ * requests to the deflate thread(s) (once the block has been read by
-+ * the reader thread). The amount of read-ahead is determined by
-+ * the combined size of the data_block and fragment caches which
-+ * determine the total number of blocks which can be "in flight"
-+ * at any one time (either being read or being decompressed)
-+ *
-+ * The maximum file open limit, however, affects the read-ahead
-+ * possible, in that for normal sizes of the fragment and data block
-+ * caches, where the incoming files have few data blocks or one fragment
-+ * only, the file open limit is likely to be reached before the
-+ * caches are full. This means the worst case sizing of the combined
-+ * sizes of the caches is unlikely to ever be necessary. However, is is
-+ * obvious read-ahead up to the data block cache size is always possible
-+ * irrespective of the file open limit, because a single file could
-+ * contain that number of blocks.
-+ *
-+ * Choosing the size as "file open limit + data block cache size" seems
-+ * to be a reasonable estimate. We can reasonably assume the maximum
-+ * likely read-ahead possible is data block cache size + one fragment
-+ * per open file.
-+ *
-+ * dimensioning the to_writer queue. The size of this queue is
-+ * directly related to the amount of block read-ahead possible.
-+ * However, unlike the to_reader and to_deflate queues, this is
-+ * complicated by the fact the to_writer queue not only contains
-+ * entries for fragments and data_blocks but it also contains
-+ * file entries, one per open file in the read-ahead.
-+ *
-+ * Choosing the size as "2 * (file open limit) +
-+ * data block cache size" seems to be a reasonable estimate.
-+ * We can reasonably assume the maximum likely read-ahead possible
-+ * is data block cache size + one fragment per open file, and then
-+ * we will have a file_entry for each open file.
-+ */
-+ res = getrlimit(RLIMIT_NOFILE, &rlim);
-+ if (res == -1) {
-+ ERROR("failed to get open file limit! Defaulting to 1\n");
-+ rlim.rlim_cur = 1;
-+ }
-+
-+ if (rlim.rlim_cur != RLIM_INFINITY) {
-+ /*
-+ * leave OPEN_FILE_MARGIN free (rlim_cur includes fds used by
-+ * stdin, stdout, stderr and filesystem fd
-+ */
-+ if (rlim.rlim_cur <= OPEN_FILE_MARGIN)
-+ /* no margin, use minimum possible */
-+ max_files = 1;
-+ else
-+ max_files = rlim.rlim_cur - OPEN_FILE_MARGIN;
-+ } else
-+ max_files = -1;
-+
-+ /* set amount of available files for use by open_wait and close_wake */
-+ open_init(max_files);
-+
-+ /*
-+ * allocate to_reader, to_deflate and to_writer queues. Set based on
-+ * open file limit and cache size, unless open file limit is unlimited,
-+ * in which case set purely based on cache limits
-+ */
-+ if (max_files != -1) {
-+ to_reader = queue_init(max_files + data_buffer_size);
-+ to_deflate = queue_init(max_files + data_buffer_size);
-+ to_writer = queue_init(max_files * 2 + data_buffer_size);
-+ } else {
-+ int all_buffers_size = fragment_buffer_size + data_buffer_size;
-+
-+ to_reader = queue_init(all_buffers_size);
-+ to_deflate = queue_init(all_buffers_size);
-+ to_writer = queue_init(all_buffers_size * 2);
-+ }
-+
- from_writer = queue_init(1);
-+
- fragment_cache = cache_init(block_size, fragment_buffer_size);
- data_cache = cache_init(block_size, data_buffer_size);
- pthread_create(&thread[0], NULL, reader, NULL);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb
index 57400cdda0..d36f0fea44 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb
@@ -3,31 +3,28 @@
SUMMARY = "Tools for manipulating SquashFS filesystems"
SECTION = "base"
LICENSE = "GPL-2 & PD"
-LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \
"
-DEPENDS = "attr zlib xz"
-PR = "r2"
+DEPENDS = "attr zlib xz lzo lz4"
SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \
http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
"
-SRC_URI += "file://squashfs-4.2-fix-CVE-2012-4024.patch \
- file://squashfs-add-a-commment-and-fix-some-other-comments.patch \
- file://squashfs-fix-open-file-limit.patch \
- file://squashfs-4.2-fix-CVE-2012-4025.patch \
- "
-SRC_URI[squashfs.md5sum] = "1b7a781fb4cf8938842279bd3e8ee852"
-SRC_URI[squashfs.sha256sum] = "d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96"
+
+SRC_URI[squashfs.md5sum] = "d92ab59aabf5173f2a59089531e30dbf"
+SRC_URI[squashfs.sha256sum] = "0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6"
+
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
S = "${WORKDIR}/squashfs${PV}/squashfs-tools"
+SPDX_S = "${WORKDIR}/squashfs${PV}"
# EXTRA_OEMAKE is typically: -e MAKEFLAGS=
# the -e causes problems as CFLAGS is modified in the Makefile, so
# we redefine EXTRA_OEMAKE here
-EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1"
+EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1"
do_compile() {
oe_runmake mksquashfs
@@ -39,4 +36,4 @@ do_install () {
ARM_INSTRUCTION_SET = "arm"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
deleted file mode 100644
index f5556b23e3..0000000000
--- a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-strace: Add ptest
-
-Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
-Upstream-Status: Pending
-
---- old/tests/Makefile.am 2013-07-23 13:44:24.660481381 +0200
-+++ new/tests/Makefile.am 2013-07-23 16:22:42.937654391 +0200
-@@ -9,3 +9,20 @@
- EXTRA_DIST = init.sh $(TESTS)
-
- CLEANFILES = check.log
-+
-+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
-+
-+install-ptest:
-+ install $(BUILDDIR)/strace $(DESTDIR)
-+ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
-+ install -d $(DESTDIR)/$(TESTDIR)
-+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
-+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
-+ for file in $(check_PROGRAMS); do \
-+ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
-+ done
-+ for file in $(EXTRA_DIST); do \
-+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
-+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
-+ done
-+ sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
diff --git a/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
new file mode 100644
index 0000000000..df013102d7
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
@@ -0,0 +1,53 @@
+strace: Add ptest
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 2 +-
+ tests/Makefile.am | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 054f85b..9aec566 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_INIT([strace],
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_HEADERS([config.h])
+-AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 922452a..b17837f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -37,3 +37,21 @@ TEST_LOG_COMPILER = $(srcdir)/run.sh
+ EXTRA_DIST = init.sh run.sh sigaction.awk $(TESTS)
+
+ CLEANFILES = $(TESTS:=.tmp)
++
++buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
++
++install-ptest:
++ install $(BUILDDIR)/strace $(DESTDIR)
++ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
++ install -d $(DESTDIR)/$(TESTDIR)
++ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
++ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
++ sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
++ for file in $(check_PROGRAMS); do \
++ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
++ done
++ for file in $(EXTRA_DIST); do \
++ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
++ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
++ done
++ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace-4.8/git-version-gen b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
index 8fee74e121..8fee74e121 100755
--- a/meta/recipes-devtools/strace/strace-4.8/git-version-gen
+++ b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
diff --git a/meta/recipes-devtools/strace/strace-4.8/run-ptest b/meta/recipes-devtools/strace/strace-4.9/run-ptest
index 133cf92d02..133cf92d02 100755
--- a/meta/recipes-devtools/strace/strace-4.8/run-ptest
+++ b/meta/recipes-devtools/strace/strace-4.9/run-ptest
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
index 27266d9052..15e37bce03 100644
--- a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch
+++ b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
@@ -3,18 +3,24 @@ Add options "aio" and "acl" to enable/disable libaio and acl support.
Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 27 ++++++++++++++++++++++++++-
+ 1 file changed, 26 insertions(+), 1 deletion(-)
---- strace-4.8/configure.ac.orig 2013-06-21 15:37:52.145892182 +0800
-+++ strace-4.8/configure.ac 2013-06-21 15:45:49.029909004 +0800
-@@ -219,7 +219,6 @@ AC_CHECK_HEADERS(m4_normalize([
- netinet/sctp.h
+diff --git a/configure.ac b/configure.ac
+index 054f85b..8ed49f1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,7 +238,6 @@ AC_CHECK_HEADERS(m4_normalize([
poll.h
+ scsi/sg.h
stropts.h
- sys/acl.h
sys/asynch.h
sys/conf.h
sys/epoll.h
-@@ -231,6 +230,19 @@ AC_CHECK_HEADERS(m4_normalize([
+@@ -250,6 +249,18 @@ AC_CHECK_HEADERS(m4_normalize([
sys/uio.h
sys/vfs.h
]))
@@ -22,30 +28,25 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+AC_ARG_ENABLE([acl],
+ [AS_HELP_STRING([--enable-acl], [turn on acl support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([sys/acl.h])
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
-+
+)
+
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
[], [], [#include <stddef.h>
#include <sys/socket.h>
-@@ -301,10 +313,19 @@ AC_CHECK_SIZEOF([long])
- AC_CHECK_SIZEOF([long long])
- AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
+@@ -649,6 +660,20 @@ if test "x$st_cv_have___builtin_popcount" = xyes; then
+ [Define to 1 if the system provides __builtin_popcount function])
+ fi
--AC_CHECK_HEADERS([libaio.h], [
-- AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-- AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
--])
+AC_ARG_ENABLE([aio],
+ [AS_HELP_STRING([--enable-aio], [turn on libaio support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([libaio.h], [
+ AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
+ AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
@@ -55,6 +56,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
+)
-
++
AC_PATH_PROG([PERL], [perl])
+ dnl stack trace with libunwind
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace_4.8.bb b/meta/recipes-devtools/strace/strace_4.9.bb
index 71563d4a41..cce130d58c 100644
--- a/meta/recipes-devtools/strace/strace_4.8.bb
+++ b/meta/recipes-devtools/strace/strace_4.9.bb
@@ -11,16 +11,17 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://run-ptest \
"
-SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
-SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
+SRC_URI[md5sum] = "885eafadb10f6c60464a266d3929a2a4"
+SRC_URI[sha256sum] = "095bfea5c540b91d297ccac73b21b92fd54a24599fd70395db87ff9eb7fd6f65"
inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
PACKAGECONFIG_class-target ?= "libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind"
export INCLUDES = "-I. -I./linux"
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch
deleted file mode 100644
index e8acb12a21..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Allow neon 0.30 to be usable also
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: subversion-1.7.10/configure.ac
-===================================================================
---- subversion-1.7.10.orig/configure.ac
-+++ subversion-1.7.10/configure.ac
-@@ -118,7 +118,7 @@ AC_PATH_PROG(PKG_CONFIG, pkg-config)
-
- # Either a space-separated list of allowable Neon versions, or "any" to
- # mean allow anything.
--NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29"
-+NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29 0\.30"
- NEON_RECOMMENDED_VER="0.29.6"
- NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz"
- dnl You can skip the neon version check only if you know what you are doing
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch
deleted file mode 100644
index fb79b8cc51..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-install-neon-lib should depend on libsvn_delta's installation
-
-install-neon-lib needs libsvn_delta-1.la which will be regenerated
-during libsvn_delta-1.la's installation, if libsvn_delta-1.la is
-in regenerating and at the same time install-neon-lib links it, the
-error willl happen.
-
-Let install-neon-lib run after libsvn_delta-1.la is installed will fix
-the problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- build-outputs.mk | 2 +-
- build.conf | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
---- subversion-1.7.6.orig/build-outputs.mk
-+++ subversion-1.7.6/build-outputs.mk
-@@ -983,11 +983,11 @@ install-locale: subversion/po/de.mo subv
- $(MKDIR) $(DESTDIR)$(localedir)/zh_CN/LC_MESSAGES
- cd subversion/po ; $(INSTALL_LOCALE) zh_CN.mo $(DESTDIR)$(localedir)/zh_CN/LC_MESSAGES/$(PACKAGE_NAME).mo
- $(MKDIR) $(DESTDIR)$(localedir)/zh_TW/LC_MESSAGES
- cd subversion/po ; $(INSTALL_LOCALE) zh_TW.mo $(DESTDIR)$(localedir)/zh_TW/LC_MESSAGES/$(PACKAGE_NAME).mo
-
--install-neon-lib: subversion/libsvn_ra_neon/libsvn_ra_neon-1.la
-+install-neon-lib: subversion/libsvn_ra_neon/libsvn_ra_neon-1.la $(SVN_FS_LIB_INSTALL_DEPS)
- $(MKDIR) $(DESTDIR)$(neon_libdir)
- cd subversion/libsvn_ra_neon ; $(INSTALL_NEON_LIB) libsvn_ra_neon-1.la $(DESTDIR)$(neon_libdir)/libsvn_ra_neon-1.la
-
- install-ramod-lib: subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_ra_svn/libsvn_ra_svn-1.la subversion/libsvn_repos/libsvn_repos-1.la subversion/libsvn_ra_local/libsvn_ra_local-1.la
- $(MKDIR) $(DESTDIR)$(ramod_libdir)
---- subversion-1.7.6.orig/build.conf
-+++ subversion-1.7.6/build.conf
-@@ -270,10 +270,12 @@ msvc-export = svn_ra.h private\svn_ra_pr
- [libsvn_ra_neon]
- type = ra-module
- path = subversion/libsvn_ra_neon
- install = neon-lib
- libs = libsvn_delta libsvn_subr aprutil apriconv apr neon
-+# conditionally add more dependencies
-+add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
- msvc-static = yes
-
- # Accessing repositories via DAV through serf
- [libsvn_ra_serf]
- type = ra-module
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch
deleted file mode 100644
index 013d0c3649..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix to get correct SVN_NEON_CONFIG and CFLAGS when sysroot path contains '-D' and '-I'
-characters.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
-index f951039..a813145 100644
---- a/build/ac-macros/neon.m4
-+++ b/build/ac-macros/neon.m4
-@@ -105,8 +105,8 @@ AC_DEFUN(SVN_NEON_CONFIG,
- test "$svn_allowed_neon" = "any"; then
- svn_allowed_neon_on_system="yes"
- if test "$NEON_PKG_CONFIG" = "yes"; then
-- SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`]
-- CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"]
-+ SVN_NEON_INCLUDES=["`$PKG_CONFIG neon --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`"]
-+ CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
- old_CFLAGS="$CFLAGS"
- old_LIBS="$LIBS"
- NEON_LIBS=`$PKG_CONFIG neon --libs`
-@@ -126,8 +126,8 @@ int main()
- CFLAGS="$old_CFLAGS"
- LIBS="$old_LIBS"
- else
-- SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`]
-- CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"]
-+ SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`]
-+ CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
- NEON_LIBS=`$neon_config --libs`
- fi
- svn_lib_neon="yes"
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch
deleted file mode 100644
index 88bd25e0d9..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Backport
-
-Index: subversion/mod_dav_svn/repos.c
-===================================================================
---- a/subversion/mod_dav_svn/repos.c (revision 1503527)
-+++ b/subversion/mod_dav_svn/repos.c (revision 1503528)
-@@ -2408,21 +2408,12 @@
- svn_boolean_t is_urlpath,
- apr_pool_t *pool)
- {
-- apr_size_t len;
-- char *tmp = apr_pstrdup(pool, path);
--
-- len = strlen(tmp);
--
-- if (len > 0)
-+ if (*path != '\0') /* not an empty string */
- {
-- /* Remove any trailing slash; else svn_path_dirname() asserts. */
-- if (tmp[len-1] == '/')
-- tmp[len-1] = '\0';
--
- if (is_urlpath)
-- return svn_urlpath__dirname(tmp, pool);
-+ return svn_urlpath__dirname(path, pool);
- else
-- return svn_fspath__dirname(tmp, pool);
-+ return svn_fspath__dirname(path, pool);
- }
-
- return path;
-@@ -2458,7 +2449,9 @@
- parent->versioned = 1;
- parent->hooks = resource->hooks;
- parent->pool = resource->pool;
-- parent->uri = get_parent_path(resource->uri, TRUE, resource->pool);
-+ parent->uri = get_parent_path(svn_urlpath__canonicalize(resource->uri,
-+ resource->pool),
-+ TRUE, resource->pool);
- parent->info = parentinfo;
-
- parentinfo->uri_path =
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch
deleted file mode 100644
index a5900d8b7d..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport
-
---- a/subversion/svnserve/main.c
-+++ b/subversion/svnserve/main.c
-@@ -403,8 +403,9 @@ static svn_error_t *write_pid_file(const
- const char *contents = apr_psprintf(pool, "%" APR_PID_T_FMT "\n",
- getpid());
-
-+ SVN_ERR(svn_io_remove_file2(filename, TRUE, pool));
- SVN_ERR(svn_io_file_open(&file, filename,
-- APR_WRITE | APR_CREATE | APR_TRUNCATE,
-+ APR_WRITE | APR_CREATE | APR_EXCL,
- APR_OS_DEFAULT, pool));
- SVN_ERR(svn_io_file_write_full(file, contents, strlen(contents), NULL,
- pool));
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch
deleted file mode 100644
index a54d6944ed..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Upstream-Status: Backport
-
-Index: tools/server-side/mod_dontdothat/mod_dontdothat.c
-===================================================================
---- a/tools/server-side/mod_dontdothat/mod_dontdothat.c (revision 1239695)
-+++ b/tools/server-side/mod_dontdothat/mod_dontdothat.c (revision 1542078)
-@@ -30,12 +30,15 @@
- #include <util_filter.h>
- #include <ap_config.h>
- #include <apr_strings.h>
-+#include <apr_uri.h>
-
- #include <expat.h>
-
- #include "mod_dav_svn.h"
- #include "svn_string.h"
- #include "svn_config.h"
-+#include "svn_path.h"
-+#include "private/svn_fspath.h"
-
- module AP_MODULE_DECLARE_DATA dontdothat_module;
-
-@@ -161,26 +164,71 @@
- }
- }
-
-+/* duplicate of dav_svn__log_err() from mod_dav_svn/util.c */
-+static void
-+log_dav_err(request_rec *r,
-+ dav_error *err,
-+ int level)
-+{
-+ dav_error *errscan;
-+
-+ /* Log the errors */
-+ /* ### should have a directive to log the first or all */
-+ for (errscan = err; errscan != NULL; errscan = errscan->prev) {
-+ apr_status_t status;
-+
-+ if (errscan->desc == NULL)
-+ continue;
-+
-+#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
-+ status = errscan->aprerr;
-+#else
-+ status = errscan->save_errno;
-+#endif
-+
-+ ap_log_rerror(APLOG_MARK, level, status, r,
-+ "%s [%d, #%d]",
-+ errscan->desc, errscan->status, errscan->error_id);
-+ }
-+}
-+
- static svn_boolean_t
- is_this_legal(dontdothat_filter_ctx *ctx, const char *uri)
- {
- const char *relative_path;
- const char *cleaned_uri;
- const char *repos_name;
-+ const char *uri_path;
- int trailing_slash;
- dav_error *derr;
-
-- /* Ok, so we need to skip past the scheme, host, etc. */
-- uri = ap_strstr_c(uri, "://");
-- if (uri)
-- uri = ap_strchr_c(uri + 3, '/');
-+ /* uri can be an absolute uri or just a path, we only want the path to match
-+ * against */
-+ if (uri && svn_path_is_url(uri))
-+ {
-+ apr_uri_t parsed_uri;
-+ apr_status_t rv = apr_uri_parse(ctx->r->pool, uri, &parsed_uri);
-+ if (APR_SUCCESS != rv)
-+ {
-+ /* Error parsing the URI, log and reject request. */
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, ctx->r,
-+ "mod_dontdothat: blocked request after failing "
-+ "to parse uri: '%s'", uri);
-+ return FALSE;
-+ }
-+ uri_path = parsed_uri.path;
-+ }
-+ else
-+ {
-+ uri_path = uri;
-+ }
-
-- if (uri)
-+ if (uri_path)
- {
- const char *repos_path;
-
- derr = dav_svn_split_uri(ctx->r,
-- uri,
-+ uri_path,
- ctx->cfg->base_path,
- &cleaned_uri,
- &trailing_slash,
-@@ -194,7 +242,7 @@
- if (! repos_path)
- repos_path = "";
-
-- repos_path = apr_psprintf(ctx->r->pool, "/%s", repos_path);
-+ repos_path = svn_fspath__canonicalize(repos_path, ctx->r->pool);
-
- /* First check the special cases that are always legal... */
- for (idx = 0; idx < ctx->allow_recursive_ops->nelts; ++idx)
-@@ -228,7 +276,20 @@
- }
- }
- }
-+ else
-+ {
-+ log_dav_err(ctx->r, derr, APLOG_ERR);
-+ return FALSE;
-+ }
-+
- }
-+ else
-+ {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r,
-+ "mod_dontdothat: empty uri passed to is_this_legal(), "
-+ "module bug?");
-+ return FALSE;
-+ }
-
- return TRUE;
- }
diff --git a/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch b/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch
new file mode 100644
index 0000000000..ec3be496f3
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch
@@ -0,0 +1,68 @@
+These tests don't work in cross compiling, just disable them for now, we don't
+build subversion on OS-X at this time.
+
+RP 1014/7/16
+
+Upstream-Status: Pending [needs a rewrite to support a cache value]
+
+Index: subversion-1.8.9/build/ac-macros/macosx.m4
+===================================================================
+--- subversion-1.8.9.orig/build/ac-macros/macosx.m4 2012-11-26 03:04:27.000000000 +0000
++++ subversion-1.8.9/build/ac-macros/macosx.m4 2014-07-16 12:28:58.357300403 +0000
+@@ -24,21 +24,7 @@
+ AC_DEFUN(SVN_LIB_MACHO_ITERATE,
+ [
+ AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
+- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- #include <mach-o/dyld.h>
+- #include <mach-o/loader.h>
+- ]],[[
+- const struct mach_header *header = _dyld_get_image_header(0);
+- const char *name = _dyld_get_image_name(0);
+- if (name && header) return 0;
+- return 1;
+- ]])],[
+- AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1],
+- [Is Mach-O low-level _dyld API available?])
+- AC_MSG_RESULT([yes])
+- ],[
+ AC_MSG_RESULT([no])
+- ])
+ ])
+
+ dnl SVN_LIB_MACOS_PLIST
+@@ -46,34 +32,7 @@
+ AC_DEFUN(SVN_LIB_MACOS_PLIST,
+ [
+ AC_MSG_CHECKING([for Mac OS property list utilities])
+-
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+- #include <AvailabilityMacros.h>
+- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
+- || !defined(MAC_OS_X_VERSION_10_0) \
+- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0)
+- #error ProperyList API unavailable.
+- #endif
+- ]],[[]])],[
+- dnl ### Hack. We should only need to pass the -framework options when
+- dnl linking libsvn_subr, since it is the only library that uses Keychain.
+- dnl
+- dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
+- dnl OS X frameworks like it does for normal libraries, so we need to
+- dnl explicitly pass the option to all the users of libsvn_subr to allow
+- dnl static builds to link successfully.
+- dnl
+- dnl This does mean that all executables we link will be linked directly
+- dnl to these frameworks - even when building shared libraries - but that
+- dnl shouldn't cause any problems.
+-
+- LIBS="$LIBS -framework CoreFoundation"
+- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
+- [Is Mac OS property list API available?])
+- AC_MSG_RESULT([yes])
+- ],[
+ AC_MSG_RESULT([no])
+- ])
+ ])
+
+ dnl SVN_LIB_MACOS_KEYCHAIN
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch b/meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch
index 5cd572bfc8..5cd572bfc8 100644
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch
+++ b/meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch
diff --git a/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch
new file mode 100644
index 0000000000..03d5b9710f
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch
@@ -0,0 +1,439 @@
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/subversion/libsvn_ra_serf/util.c.old b/subversion/libsvn_ra_serf/util.c
+index b6c0141..8b09770 100644
+--- a/subversion/libsvn_ra_serf/util.c.old
++++ b/subversion/libsvn_ra_serf/util.c
+@@ -21,7 +21,6 @@
+ #define APR_WANT_STRFUNC
+ #include <apr.h>
+ #include <apr_want.h>
+-#include <apr_fnmatch.h>
+
+ #include <serf.h>
+ #include <serf_bucket_types.h>
+@@ -30,6 +29,7 @@
+ #include "svn_private_config.h"
+ #include "svn_xml.h"
+ #include "private/svn_dep_compat.h"
++#include "private/svn_cert.h"
+
+ #include "ra_serf.h"
+
+@@ -113,7 +113,12 @@ ssl_server_cert(void *baton, int failures,
+ apr_uint32_t svn_failures;
+ svn_error_t *err;
+ apr_hash_t *issuer, *subject, *serf_cert;
++ apr_array_header_t *san;
+ void *creds;
++ svn_boolean_t found_matching_hostname = FALSE;
++ svn_boolean_t found_san_entry = FALSE;
++ svn_string_t *actual_hostname =
++ svn_string_create(conn->hostname, scratch_pool);
+
+ /* Implicitly approve any non-server certs. */
+ if (serf_ssl_cert_depth(cert) > 0)
+@@ -129,6 +134,7 @@ ssl_server_cert(void *baton, int failures,
+ serf_cert = serf_ssl_cert_certificate(cert, subpool);
+
+ cert_info.hostname = apr_hash_get(subject, "CN", APR_HASH_KEY_STRING);
++ san = apr_hash_get(serf_cert, "subjectAltName", APR_HASH_KEY_STRING);
+ cert_info.fingerprint = apr_hash_get(serf_cert, "sha1", APR_HASH_KEY_STRING);
+ if (! cert_info.fingerprint)
+ cert_info.fingerprint = apr_pstrdup(subpool, "<unknown>");
+@@ -145,16 +145,43 @@ ssl_server_cert(void *baton, int failures,
+
+ svn_failures = ssl_convert_serf_failures(failures);
+
+- /* Match server certificate CN with the hostname of the server */
+- if (cert_info.hostname)
++ /* Try to find matching server name via subjectAltName first... */
++ if (san)
+ {
+- if (apr_fnmatch(cert_info.hostname, conn->hostinfo,
+- APR_FNM_PERIOD) == APR_FNM_NOMATCH)
++ int i;
++ found_san_entry = san->nelts > 0;
++ for (i = 0; i < san->nelts; i++)
+ {
+- svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
++ char *s = APR_ARRAY_IDX(san, i, char*);
++ svn_string_t *cert_hostname = svn_string_create(s, scratch_pool);
++
++ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
++ {
++ found_matching_hostname = TRUE;
++ cert_info.hostname = s;
++ break;
++ }
+ }
+ }
+
++ /* Match server certificate CN with the hostname of the server iff
++ * we didn't find any subjectAltName fields and try to match them.
++ * Per RFC 2818 they are authoritative if present and CommonName
++ * should be ignored. */
++ if (!found_matching_hostname && !found_san_entry && cert_info.hostname)
++ {
++ svn_string_t *cert_hostname = svn_string_create(cert_info.hostname,
++ scratch_pool);
++
++ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
++ {
++ found_matching_hostname = TRUE;
++ }
++ }
++
++ if (!found_matching_hostname)
++ svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
++
+ svn_auth_set_parameter(conn->session->wc_callbacks->auth_baton,
+ SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
+ &svn_failures);
+@@ -261,6 +293,10 @@ svn_ra_serf__conn_setup(apr_socket_t *sock,
+ if (!conn->ssl_context)
+ {
+ conn->ssl_context = serf_bucket_ssl_encrypt_context_get(rb);
++
++#if SERF_VERSION_AT_LEAST(1,0,0)
++ serf_ssl_set_hostname(conn->ssl_context, conn->hostinfo);
++#endif
+
+ serf_ssl_client_cert_provider_set(conn->ssl_context,
+ svn_ra_serf__handle_client_cert,
+diff --git a/subversion/libsvn_subr/dirent_uri.c.old b/subversion/libsvn_subr/dirent_uri.c
+index eef99ba..a5f9e7e 100644
+--- a/subversion/libsvn_subr/dirent_uri.c.old
++++ b/subversion/libsvn_subr/dirent_uri.c
+@@ -30,6 +30,7 @@
+ #include "svn_path.h"
+
+ #include "private_uri.h"
++#include "private/svn_cert.h"
+
+ /* The canonical empty path. Can this be changed? Well, change the empty
+ test below and the path library will work, not so sure about the fs/wc
+@@ -1194,3 +1195,81 @@ svn_uri_is_canonical(const char *uri, apr_pool_t *pool)
+
+ return TRUE;
+ }
++
++
++/* -------------- The cert API (see private/svn_cert.h) ------------- */
++
++svn_boolean_t
++svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname)
++{
++ apr_size_t pattern_pos = 0, hostname_pos = 0;
++
++ /* support leading wildcards that composed of the only character in the
++ * left-most label. */
++ if (pattern->len >= 2 &&
++ pattern->data[pattern_pos] == '*' &&
++ pattern->data[pattern_pos + 1] == '.')
++ {
++ while (hostname_pos < hostname->len &&
++ hostname->data[hostname_pos] != '.')
++ {
++ hostname_pos++;
++ }
++ /* Assume that the wildcard must match something. Rule 2 says
++ * that *.example.com should not match example.com. If the wildcard
++ * ends up not matching anything then it matches .example.com which
++ * seems to be essentially the same as just example.com */
++ if (hostname_pos == 0)
++ return FALSE;
++
++ pattern_pos++;
++ }
++
++ while (pattern_pos < pattern->len && hostname_pos < hostname->len)
++ {
++ char pattern_c = pattern->data[pattern_pos];
++ char hostname_c = hostname->data[hostname_pos];
++
++ /* fold case as described in RFC 4343.
++ * Note: We actually convert to lowercase, since our URI
++ * canonicalization code converts to lowercase and generally
++ * most certs are issued with lowercase DNS names, meaning
++ * this avoids the fold operation in most cases. The RFC
++ * suggests the opposite transformation, but doesn't require
++ * any specific implementation in any case. It is critical
++ * that this folding be locale independent so you can't use
++ * tolower(). */
++ pattern_c = canonicalize_to_lower(pattern_c);
++ hostname_c = canonicalize_to_lower(hostname_c);
++
++ if (pattern_c != hostname_c)
++ {
++ /* doesn't match */
++ return FALSE;
++ }
++ else
++ {
++ /* characters match so skip both */
++ pattern_pos++;
++ hostname_pos++;
++ }
++ }
++
++ /* ignore a trailing period on the hostname since this has no effect on the
++ * security of the matching. See the following for the long explanation as
++ * to why:
++ * https://bugzilla.mozilla.org/show_bug.cgi?id=134402#c28
++ */
++ if (pattern_pos == pattern->len &&
++ hostname_pos == hostname->len - 1 &&
++ hostname->data[hostname_pos] == '.')
++ hostname_pos++;
++
++ if (pattern_pos != pattern->len || hostname_pos != hostname->len)
++ {
++ /* end didn't match */
++ return FALSE;
++ }
++
++ return TRUE;
++}
+diff --git a/subversion/tests/libsvn_subr/dirent_uri-test.c.old b/subversion/tests/libsvn_subr/dirent_uri-test.c
+index d71d9c1..370b64a 100644
+--- a/subversion/tests/libsvn_subr/dirent_uri-test.c.old
++++ b/subversion/tests/libsvn_subr/dirent_uri-test.c
+@@ -31,6 +31,7 @@
+
+ #include "svn_pools.h"
+ #include "svn_dirent_uri.h"
++#include "private/svn_cert.h"
+
+ #include "../svn_test.h"
+ #include "../../libsvn_subr/private_uri.h"
+@@ -1671,6 +1672,145 @@ test_uri_internal_style(const char **msg,
+ return SVN_NO_ERROR;
+ }
+
++struct cert_match_dns_test {
++ const char *pattern;
++ const char *hostname;
++ svn_boolean_t expected;
++};
++
++static svn_error_t *
++run_cert_match_dns_tests(struct cert_match_dns_test *tests, apr_pool_t *pool)
++{
++ struct cert_match_dns_test *ct;
++ apr_pool_t *iterpool = svn_pool_create(pool);
++
++ for (ct = tests; ct->pattern; ct++)
++ {
++ svn_boolean_t result;
++ svn_string_t *pattern, *hostname;
++
++ svn_pool_clear(iterpool);
++
++ pattern = svn_string_create(ct->pattern, iterpool);
++ hostname = svn_string_create(ct->hostname, iterpool);
++
++ result = svn_cert__match_dns_identity(pattern, hostname);
++ if (result != ct->expected)
++ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
++ "Expected %s but got %s for pattern '%s' on "
++ "hostname '%s'",
++ ct->expected ? "match" : "no match",
++ result ? "match" : "no match",
++ pattern->data, hostname->data);
++
++ }
++
++ svn_pool_destroy(iterpool);
++
++ return SVN_NO_ERROR;
++}
++
++static struct cert_match_dns_test cert_match_dns_tests[] = {
++ { "foo.example.com", "foo.example.com", TRUE }, /* exact match */
++ { "foo.example.com", "FOO.EXAMPLE.COM", TRUE }, /* case differences */
++ { "FOO.EXAMPLE.COM", "foo.example.com", TRUE },
++ { "*.example.com", "FoO.ExAmPlE.CoM", TRUE },
++ { "*.ExAmPlE.CoM", "foo.example.com", TRUE },
++ { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", TRUE },
++ { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TRUE },
++ { "foo.example.com", "bar.example.com", FALSE }, /* difference at start */
++ { "foo.example.com", "foo.example.net", FALSE }, /* difference at end */
++ { "foo.example.com", "foo.example.commercial", FALSE }, /* hostname longer */
++ { "foo.example.commercial", "foo.example.com", FALSE }, /* pattern longer */
++ { "foo.example.comcom", "foo.example.com", FALSE }, /* repeated suffix */
++ { "foo.example.com", "foo.example.comcom", FALSE },
++ { "foo.example.com.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.example.com.com", FALSE },
++ { "foofoo.example.com", "foo.example.com", FALSE }, /* repeated prefix */
++ { "foo.example.com", "foofoo.example.com", FALSE },
++ { "foo.foo.example.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.foo.example.com", FALSE },
++ { "foo.*.example.com", "foo.bar.example.com", FALSE }, /* RFC 6125 s. 6.4.3
++ Rule 1 */
++ { "*.example.com", "foo.example.com", TRUE }, /* RFC 6125 s. 6.4.3 Rule 2 */
++ { "*.example.com", "bar.foo.example.com", FALSE }, /* Rule 2 */
++ { "*.example.com", "example.com", FALSE }, /* Rule 2 */
++ { "*.example.com", ".example.com", FALSE }, /* RFC doesn't say what to do
++ here and a leading period on
++ a hostname doesn't make sense
++ so we'll just reject this. */
++ { "*", "foo.example.com", FALSE }, /* wildcard must be left-most label,
++ implies that there must be more than
++ one label. */
++ { "*", "example.com", FALSE },
++ { "*", "com", FALSE },
++ { "*.example.com", "foo.example.net", FALSE }, /* difference in literal text
++ with a wildcard. */
++ { "*.com", "example.com", TRUE }, /* See Errata ID 3090 for RFC 6125,
++ probably shouldn't allow this but
++ we do for now. */
++ { "*.", "example.com", FALSE }, /* test some dubious 2 character wildcard
++ patterns */
++ { "*.", "example.", TRUE }, /* This one feels questionable */
++ { "*.", "example", FALSE },
++ { "*.", ".", FALSE },
++ { "a", "a", TRUE }, /* check that single letter exact matches work */
++ { "a", "b", FALSE }, /* and single letter not matches shouldn't */
++ { "*.*.com", "foo.example.com", FALSE }, /* unsupported wildcards */
++ { "*.*.com", "example.com", FALSE },
++ { "**.example.com", "foo.example.com", FALSE },
++ { "**.example.com", "example.com", FALSE },
++ { "f*.example.com", "foo.example.com", FALSE },
++ { "f*.example.com", "bar.example.com", FALSE },
++ { "*o.example.com", "foo.example.com", FALSE },
++ { "*o.example.com", "bar.example.com", FALSE },
++ { "f*o.example.com", "foo.example.com", FALSE },
++ { "f*o.example.com", "bar.example.com", FALSE },
++ { "foo.e*.com", "foo.example.com", FALSE },
++ { "foo.*e.com", "foo.example.com", FALSE },
++ { "foo.e*e.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.example.com.", TRUE }, /* trailing dot */
++ { "*.example.com", "foo.example.com.", TRUE },
++ { "foo", "foo.", TRUE },
++ { "foo.example.com.", "foo.example.com", FALSE },
++ { "*.example.com.", "foo.example.com", FALSE },
++ { "foo.", "foo", FALSE },
++ { "foo.example.com", "foo.example.com..", FALSE },
++ { "*.example.com", "foo.example.com..", FALSE },
++ { "foo", "foo..", FALSE },
++ { "foo.example.com..", "foo.example.com", FALSE },
++ { "*.example.com..", "foo.example.com", FALSE },
++ { "foo..", "foo", FALSE },
++ { NULL }
++};
++
++static svn_error_t *
++test_cert_match_dns_identity(apr_pool_t *pool)
++{
++ return run_cert_match_dns_tests(cert_match_dns_tests, pool);
++}
++
++/* This test table implements results that should happen if we supported
++ * RFC 6125 s. 6.4.3 Rule 3. We don't so it's expected to fail for now. */
++static struct cert_match_dns_test rule3_tests[] = {
++ { "baz*.example.net", "baz1.example.net", TRUE },
++ { "*baz.example.net", "foobaz.example.net", TRUE },
++ { "b*z.example.net", "buuz.example.net", TRUE },
++ { "b*z.example.net", "bz.example.net", FALSE }, /* presume wildcard can't
++ match nothing */
++ { "baz*.example.net", "baz.example.net", FALSE },
++ { "*baz.example.net", "baz.example.net", FALSE },
++ { "b*z.example.net", "buuzuuz.example.net", TRUE }, /* presume wildcard
++ should be greedy */
++ { NULL }
++};
++
++static svn_error_t *
++test_rule3(apr_pool_t *pool)
++{
++ return run_cert_match_dns_tests(rule3_tests, pool);
++}
++
+
+ /* The test table. */
+
+@@ -1699,5 +1839,7 @@ struct svn_test_descriptor_t test_funcs[] =
+ SVN_TEST_PASS(test_uri_local_style),
+ SVN_TEST_PASS(test_dirent_internal_style),
+ SVN_TEST_PASS(test_uri_internal_style),
++ SVN_TEST_PASS(test_cert_match_dns_identity),
++ SVN_TEST_XFAIL(test_rule3),
+ SVN_TEST_NULL
+ };
+diff --git a/subversion/include/private/svn_cert.h b/subversion/include/private/svn_cert.h
+new file mode 100644
+index 0000000..32e32a0
+--- /dev/null
++++ b/subversion/include/private/svn_cert.h
+@@ -0,0 +1,68 @@
++/**
++ * @copyright
++ * ====================================================================
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements. See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership. The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied. See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ * ====================================================================
++ * @endcopyright
++ *
++ * @file svn_cert.h
++ * @brief Implementation of certificate validation functions
++ */
++
++#ifndef SVN_CERT_H
++#define SVN_CERT_H
++
++#include <apr.h>
++
++#include "svn_types.h"
++#include "svn_string.h"
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++
++/* Return TRUE iff @a pattern matches @a hostname as defined
++ * by the matching rules of RFC 6125. In the context of RFC
++ * 6125 the pattern is the domain name portion of the presented
++ * identifier (which comes from the Common Name or a DNSName
++ * portion of the subjectAltName of an X.509 certificate) and
++ * the hostname is the source domain (i.e. the host portion
++ * of the URI the user entered).
++ *
++ * @note With respect to wildcards we only support matching
++ * wildcards in the left-most label and as the only character
++ * in the left-most label (i.e. we support RFC 6125 § 6.4.3
++ * Rule 1 and 2 but not the optional Rule 3). This may change
++ * in the future.
++ *
++ * @note Subversion does not at current support internationalized
++ * domain names. Both values are presumed to be in NR-LDH label
++ * or A-label form (see RFC 5890 for the definition).
++ *
++ * @since New in 1.9.
++ */
++svn_boolean_t
++svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname);
++
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* SVN_CERT_H */
diff --git a/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch
new file mode 100644
index 0000000000..23e738e985
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/subversion/libsvn_subr/config_auth.c.old b/subversion/libsvn_subr/config_auth.c
+index ff50270..c511d04 100644
+--- a/subversion/libsvn_subr/config_auth.c.old
++++ b/subversion/libsvn_subr/config_auth.c
+@@ -85,6 +85,7 @@ svn_config_read_auth_data(apr_hash_t **hash,
+ if (kind == svn_node_file)
+ {
+ svn_stream_t *stream;
++ svn_string_t *stored_realm;
+
+ SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
+ _("Unable to open auth file for reading"));
+@@ -95,6 +96,12 @@ svn_config_read_auth_data(apr_hash_t **hash,
+ apr_psprintf(pool, _("Error parsing '%s'"),
+ svn_path_local_style(auth_path, pool)));
+
++ stored_realm = apr_hash_get(*hash, SVN_CONFIG_REALMSTRING_KEY,
++ APR_HASH_KEY_STRING);
++
++ if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0)
++ *hash = NULL; /* Hash collision, or somebody tampering with storage */
++
+ SVN_ERR(svn_stream_close(stream));
+ }
+
diff --git a/meta/recipes-devtools/subversion/subversion_1.6.15.bb b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
index 1bc637473b..b135bb7a3f 100644
--- a/meta/recipes-devtools/subversion/subversion_1.6.15.bb
+++ b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
@@ -17,7 +17,10 @@ SRC_URI = "http://subversion.tigris.org/downloads/${BPN}-${PV}.tar.bz2 \
file://subversion-CVE-2013-4505.patch \
file://subversion-CVE-2013-1845.patch \
file://subversion-CVE-2013-1847-CVE-2013-1846.patch \
- file://subversion-CVE-2013-4277.patch"
+ file://subversion-CVE-2013-4277.patch \
+ file://subversion-CVE-2014-3522.patch \
+ file://subversion-CVE-2014-3528.patch \
+"
SRC_URI[md5sum] = "113fca1d9e4aa389d7dc2b210010fa69"
SRC_URI[sha256sum] = "b2919d603a5f3c19f42e3265c4b930e2376c43b3969b90ef9c42b2f72d5aaa45"
diff --git a/meta/recipes-devtools/subversion/subversion_1.7.10.bb b/meta/recipes-devtools/subversion/subversion_1.7.10.bb
deleted file mode 100644
index e745ce764e..0000000000
--- a/meta/recipes-devtools/subversion/subversion_1.7.10.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util neon sqlite3 file"
-RDEPENDS_${PN} = "neon"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://libtool2.patch \
- file://fix-install-depends.patch \
- file://allow-updated-neon.patch \
- file://neon.m4-fix-includes-and-cflags.patch \
- file://subversion-CVE-2013-4505.patch \
- file://subversion-CVE-2013-4131.patch \
- file://subversion-CVE-2013-4277.patch \
-"
-SRC_URI[md5sum] = "4088a77e14232876c9b4ff1541e6e200"
-SRC_URI[sha256sum] = "c1df222bec83d014d17785e2ceba6bc80962f64b280967de0285836d8d77a8e7"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4a14fd2da3134e40a087eb4326a4ecd4"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-
-EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs \
- --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
- --with-apr-util=${STAGING_BINDIR_CROSS} \
- ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
- rm -f ${S}/libtool
- rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
- rm -f ${S}/aclocal.m4
- sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
diff --git a/meta/recipes-devtools/subversion/subversion_1.8.10.bb b/meta/recipes-devtools/subversion/subversion_1.8.10.bb
new file mode 100644
index 0000000000..b223d26b3d
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion_1.8.10.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+RDEPENDS_${PN} = "serf"
+LICENSE = "Apache-2"
+HOMEPAGE = "http://subversion.tigris.org"
+
+BBCLASSEXTEND = "native"
+
+inherit gettext
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://libtool2.patch \
+ file://disable_macos.patch \
+"
+SRC_URI[md5sum] = "3068256761b40863df96128834d6b71b"
+SRC_URI[sha256sum] = "1cc900c8a7974337c3ed389dc6b5c59012ec48c7d4107ae31fd7c929ded47dcc"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2f0119e478700b5428e26386cff923"
+
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+ --without-berkeley-db --without-apxs \
+ --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+ --with-apr-util=${STAGING_BINDIR_CROSS} \
+ --disable-keychain \
+ ac_cv_path_RUBY=none"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+ rm -f ${S}/libtool
+ rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+ rm -f ${S}/aclocal.m4
+ sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
diff --git a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch b/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
deleted file mode 100644
index fb03bbfe2c..0000000000
--- a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Upstream-Status: Backport [ba638fd9bf72b0c786c88909014136cfa641a147]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From b663fd7257481438256f8267831dc10b06363b22 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Tue, 16 Jul 2013 22:16:11 +0100
-Subject: [PATCH 1/4] movebits: Add SMT_TERMINAL - a last resort region type
-
-Some memory regions are usable, but only as a last resort just before we
-hand over control to a kernel image. Add the necessary movebits
-infrastructure to use these regions when all other options have been
-exhausted.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/lib/syslinux/zonelist.c
----
- com32/include/syslinux/movebits.h | 1 +
- com32/lib/syslinux/movebits.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/com32/include/syslinux/movebits.h b/com32/include/syslinux/movebits.h
-index 8bcdf3e..114a896 100644
---- a/com32/include/syslinux/movebits.h
-+++ b/com32/include/syslinux/movebits.h
-@@ -34,6 +34,7 @@ enum syslinux_memmap_types {
- SMT_RESERVED, /* Unusable memory */
- SMT_ALLOC, /* Memory allocated by user */
- SMT_ZERO, /* Memory that should be zeroed */
-+ SMT_TERMINAL, /* Memory to be used as a last resort */
- };
-
- struct syslinux_memmap {
-diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c
-index 7a05f3c..8ffdc63 100644
---- a/com32/lib/syslinux/movebits.c
-+++ b/com32/lib/syslinux/movebits.c
-@@ -160,7 +160,7 @@ static const struct syslinux_memmap *is_free_zone(const struct syslinux_memmap
- if (list->start <= start) {
- if (llast >= last) {
- /* Chunk has a single, well-defined type */
-- if (list->type == SMT_FREE) {
-+ if (list->type == SMT_FREE || list->type == SMT_TERMINAL) {
- dprintf("F: 0x%08x bytes at 0x%08x\n",
- list->next->start, list->start);
- return list; /* It's free */
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch b/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
deleted file mode 100644
index 48d3955910..0000000000
--- a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
+++ /dev/null
@@ -1,450 +0,0 @@
-Upstream-Status: Backport [787d7e568fe08d7080d2cd03cd9ee27c327eca67]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 2e05f34c0c5bc0144bb203a169009dfb6837b4e3 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 12:15:16 +0100
-Subject: [PATCH 2/4] memscan: build a linked list of memory scanners
-
-By registering memory scanners at runtime we can support multiple memory
-scanner functions, which helps us to isolate them and keep things
-modular, only registering them for specific platform/derivative
-combinations. This is preparation for adding a memory scanner that is
-specific to PXELINUX on bios and understands when the memory region
-occupied by the PXE stack can be reused.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/include/syslinux/memscan.h
- com32/lib/syslinux/memscan.c
----
- com32/include/syslinux/firmware.h | 4 +-
- com32/include/syslinux/memscan.h | 14 +++-
- com32/lib/syslinux/memscan.c | 143 +++++++-------------------------------
- core/bios.c | 125 ++++++++++++++++++++++++++++++++-
- efi/main.c | 14 ++--
- 5 files changed, 173 insertions(+), 127 deletions(-)
-
-diff --git a/com32/include/syslinux/firmware.h b/com32/include/syslinux/firmware.h
-index 4a43c86..6cc06a0 100644
---- a/com32/include/syslinux/firmware.h
-+++ b/com32/include/syslinux/firmware.h
-@@ -1,7 +1,8 @@
- #ifndef _SYSLINUX_FIRMWARE_H
- #define _SYSLINUX_FIRMWARE_H
-
--#include <syslinux/memscan.h>
-+#include <inttypes.h>
-+#include <stdbool.h>
-
- struct term_state;
-
-@@ -42,7 +43,6 @@ struct mem_ops {
- void *(*malloc)(size_t, enum heap, size_t);
- void *(*realloc)(void *, size_t);
- void (*free)(void *);
-- int (*scan_memory)(scan_memory_callback_t, void *);
- };
-
- struct initramfs;
-diff --git a/com32/include/syslinux/memscan.h b/com32/include/syslinux/memscan.h
-index c3ebf84..ab78e28 100644
---- a/com32/include/syslinux/memscan.h
-+++ b/com32/include/syslinux/memscan.h
-@@ -29,11 +29,19 @@
- #ifndef _SYSLINUX_MEMSCAN_H
- #define _SYSLINUX_MEMSCAN_H
-
--#include <stdbool.h>
-+#include <linux/list.h>
- #include <syslinux/movebits.h> /* addr_t */
-
--typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t, bool);
-+typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t,
-+ enum syslinux_memmap_types type);
-+
-+struct syslinux_memscan {
-+ int (*func)(scan_memory_callback_t callback, void *data);
-+ struct list_head next;
-+};
-+
-+void syslinux_memscan_add(struct syslinux_memscan *entry);
-+int syslinux_memscan_new(int (*func)(scan_memory_callback_t cb, void *data));
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data);
--int bios_scan_memory(scan_memory_callback_t callback, void *data);
-
- #endif /* _SYSLINUX_MEMSCAN_H */
-diff --git a/com32/lib/syslinux/memscan.c b/com32/lib/syslinux/memscan.c
-index 0ff25d7..fdb7274 100644
---- a/com32/lib/syslinux/memscan.c
-+++ b/com32/lib/syslinux/memscan.c
-@@ -32,133 +32,44 @@
- * Query the system for free memory
- */
-
--#include <assert.h>
--#include <stdbool.h>
--#include <stdlib.h>
--#include <string.h>
--#include <inttypes.h>
--#include <com32.h>
--
- #include <syslinux/memscan.h>
--#include <syslinux/firmware.h>
-
--struct e820_entry {
-- uint64_t start;
-- uint64_t len;
-- uint32_t type;
--};
-+static LIST_HEAD(syslinux_memscan_head);
-
--int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+/*
-+ * Add a memscan entry to the list.
-+ */
-+void syslinux_memscan_add(struct syslinux_memscan *entry)
- {
-- static com32sys_t ireg;
-- com32sys_t oreg;
-- struct e820_entry *e820buf;
-- uint64_t start, len, maxlen;
-- int memfound = 0;
-- int rv;
-- addr_t dosmem;
-- const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+ list_add(&entry->next, &syslinux_memscan_head);
-+}
-
-- /* Use INT 12h to get DOS memory */
-- __intcall(0x12, &__com32_zero_regs, &oreg);
-- dosmem = oreg.eax.w[0] << 10;
-- if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-- /* INT 12h reports nonsense... now what? */
-- uint16_t ebda_seg = *(uint16_t *) 0x40e;
-- if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-- dosmem = ebda_seg << 4;
-- else
-- dosmem = 640 * 1024; /* Hope for the best... */
-- }
-- rv = callback(data, bios_data, dosmem - bios_data, true);
-- if (rv)
-- return rv;
-+/*
-+ * Build a new memscan entry and add it to the list.
-+ */
-+int syslinux_memscan_new(int func(scan_memory_callback_t, void *data))
-+{
-+ struct syslinux_memscan *entry;
-
-- /* First try INT 15h AX=E820h */
-- e820buf = lzalloc(sizeof *e820buf);
-- if (!e820buf)
-+ entry = malloc(sizeof *entry);
-+ if (!entry)
- return -1;
-
-- ireg.eax.l = 0xe820;
-- ireg.edx.l = 0x534d4150;
-- ireg.ebx.l = 0;
-- ireg.ecx.l = sizeof(*e820buf);
-- ireg.es = SEG(e820buf);
-- ireg.edi.w[0] = OFFS(e820buf);
--
-- do {
-- __intcall(0x15, &ireg, &oreg);
--
-- if ((oreg.eflags.l & EFLAGS_CF) ||
-- (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-- break;
--
-- start = e820buf->start;
-- len = e820buf->len;
--
-- if (start < 0x100000000ULL) {
-- /* Don't rely on E820 being valid for low memory. Doing so
-- could mean stuff like overwriting the PXE stack even when
-- using "keeppxe", etc. */
-- if (start < 0x100000ULL) {
-- if (len > 0x100000ULL - start)
-- len -= 0x100000ULL - start;
-- else
-- len = 0;
-- start = 0x100000ULL;
-- }
--
-- maxlen = 0x100000000ULL - start;
-- if (len > maxlen)
-- len = maxlen;
--
-- if (len) {
-- rv = callback(data, (addr_t) start, (addr_t) len,
-- e820buf->type == 1);
-- if (rv)
-- return rv;
-- memfound = 1;
-- }
-- }
--
-- ireg.ebx.l = oreg.ebx.l;
-- } while (oreg.ebx.l);
--
-- lfree(e820buf);
--
-- if (memfound)
-- return 0;
--
-- /* Next try INT 15h AX=E801h */
-- ireg.eax.w[0] = 0xe801;
-- __intcall(0x15, &ireg, &oreg);
--
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
--
-- if (oreg.edx.w[0]) {
-- rv = callback(data, (addr_t) 16 << 20, oreg.edx.w[0] << 16, true);
-- if (rv)
-- return rv;
-- }
--
-- return 0;
-- }
--
-- /* Finally try INT 15h AH=88h */
-- ireg.eax.w[0] = 0x8800;
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
-- }
--
-+ entry->func = func;
-+ syslinux_memscan_add(entry);
- return 0;
- }
-
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-- return firmware->mem->scan_memory(callback, data);
-+ struct syslinux_memscan *entry;
-+ int rv = 0;
-+
-+ list_for_each_entry(entry, &syslinux_memscan_head, next) {
-+ rv = entry->func(callback, data);
-+ if (rv)
-+ break;
-+ }
-+
-+ return rv;
- }
-diff --git a/core/bios.c b/core/bios.c
-index 53223e8..5344833 100644
---- a/core/bios.c
-+++ b/core/bios.c
-@@ -501,6 +501,129 @@ static inline void bios_timer_init(void)
-
- extern uint16_t *bios_free_mem;
-
-+struct e820_entry {
-+ uint64_t start;
-+ uint64_t len;
-+ uint32_t type;
-+};
-+
-+static int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ static com32sys_t ireg;
-+ com32sys_t oreg;
-+ struct e820_entry *e820buf;
-+ uint64_t start, len, maxlen;
-+ int memfound = 0;
-+ int rv;
-+ addr_t dosmem;
-+ const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+
-+ /* Use INT 12h to get DOS memory */
-+ __intcall(0x12, &__com32_zero_regs, &oreg);
-+ dosmem = oreg.eax.w[0] << 10;
-+ if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-+ /* INT 12h reports nonsense... now what? */
-+ uint16_t ebda_seg = *(uint16_t *) 0x40e;
-+ if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-+ dosmem = ebda_seg << 4;
-+ else
-+ dosmem = 640 * 1024; /* Hope for the best... */
-+ }
-+ rv = callback(data, bios_data, dosmem - bios_data, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ /* First try INT 15h AX=E820h */
-+ e820buf = lzalloc(sizeof *e820buf);
-+ if (!e820buf)
-+ return -1;
-+
-+ ireg.eax.l = 0xe820;
-+ ireg.edx.l = 0x534d4150;
-+ ireg.ebx.l = 0;
-+ ireg.ecx.l = sizeof(*e820buf);
-+ ireg.es = SEG(e820buf);
-+ ireg.edi.w[0] = OFFS(e820buf);
-+
-+ do {
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if ((oreg.eflags.l & EFLAGS_CF) ||
-+ (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-+ break;
-+
-+ start = e820buf->start;
-+ len = e820buf->len;
-+
-+ if (start < 0x100000000ULL) {
-+ /* Don't rely on E820 being valid for low memory. Doing so
-+ could mean stuff like overwriting the PXE stack even when
-+ using "keeppxe", etc. */
-+ if (start < 0x100000ULL) {
-+ if (len > 0x100000ULL - start)
-+ len -= 0x100000ULL - start;
-+ else
-+ len = 0;
-+ start = 0x100000ULL;
-+ }
-+
-+ maxlen = 0x100000000ULL - start;
-+ if (len > maxlen)
-+ len = maxlen;
-+
-+ if (len) {
-+ enum syslinux_memmap_types type;
-+
-+ type = e820buf->type == 1 ? SMT_FREE : SMT_RESERVED;
-+ rv = callback(data, (addr_t) start, (addr_t) len, type);
-+ if (rv)
-+ return rv;
-+ memfound = 1;
-+ }
-+ }
-+
-+ ireg.ebx.l = oreg.ebx.l;
-+ } while (oreg.ebx.l);
-+
-+ lfree(e820buf);
-+
-+ if (memfound)
-+ return 0;
-+
-+ /* Next try INT 15h AX=E801h */
-+ ireg.eax.w[0] = 0xe801;
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ if (oreg.edx.w[0]) {
-+ rv = callback(data, (addr_t) 16 << 20,
-+ oreg.edx.w[0] << 16, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+ }
-+
-+ /* Finally try INT 15h AH=88h */
-+ ireg.eax.w[0] = 0x8800;
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+}
-+
-+static struct syslinux_memscan bios_memscan = {
-+ .func = bios_scan_memory,
-+};
-+
- void bios_init(void)
- {
- int i;
-@@ -515,6 +638,7 @@ void bios_init(void)
-
- /* Init the memory subsystem */
- bios_free_mem = (uint16_t *)0x413;
-+ syslinux_memscan_add(&bios_memscan);
- mem_init();
-
- /* CPU-dependent initialization and related checks. */
-@@ -534,7 +658,6 @@ struct mem_ops bios_mem_ops = {
- .malloc = bios_malloc,
- .realloc = bios_realloc,
- .free = bios_free,
-- .scan_memory = bios_scan_memory,
- };
-
- struct firmware bios_fw = {
-diff --git a/efi/main.c b/efi/main.c
-index 13b9403..fb8cf05 100644
---- a/efi/main.c
-+++ b/efi/main.c
-@@ -296,21 +296,21 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- for (i = 0; i < nr_entries; bufpos += desc_sz, i++) {
- EFI_MEMORY_DESCRIPTOR *m;
- UINT64 region_sz;
-- int valid;
-+ enum syslinux_memmap_types type;
-
- m = (EFI_MEMORY_DESCRIPTOR *)bufpos;
- region_sz = m->NumberOfPages * EFI_PAGE_SIZE;
-
- switch (m->Type) {
- case EfiConventionalMemory:
-- valid = 1;
-+ type = SMT_FREE;
- break;
- default:
-- valid = 0;
-+ type = SMT_RESERVED;
- break;
- }
-
-- rv = callback(data, m->PhysicalStart, region_sz, valid);
-+ rv = callback(data, m->PhysicalStart, region_sz, type);
- if (rv)
- break;
- }
-@@ -319,11 +319,16 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- return rv;
- }
-
-+static struct syslinux_memscan efi_memscan = {
-+ .func = efi_scan_memory,
-+};
-+
- extern uint16_t *bios_free_mem;
- void efi_init(void)
- {
- /* XXX timer */
- *bios_free_mem = 0;
-+ syslinux_memscan_add(&efi_memscan);
- mem_init();
- }
-
-@@ -1103,7 +1108,6 @@ struct mem_ops efi_mem_ops = {
- .malloc = efi_malloc,
- .realloc = efi_realloc,
- .free = efi_free,
-- .scan_memory = efi_scan_memory,
- };
-
- struct firmware efi_fw = {
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch b/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
deleted file mode 100644
index 70d65fd71d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-Status: Backport [d2f94e74fbd60bf491753895d2474105efb3dedf]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 5d57e8eb46f209481069d70eaa778481f6fa3edb Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 13:04:30 +0100
-Subject: [PATCH 3/4] PXELINUX: Add bios memscan function
-
-We can mark the memory region occupied by the PXE stack as SMT_TERMINAL
-provided that KeepPXE isn't set. Historically some very old
-non-relocatable kernel images (memtest86+) have a load address that
-falls within the PXE stack region, so we need to attempt to load into
-that region if at all possible.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
----
- core/fs/pxe/bios.c | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 81aa715..5f61824 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -1,4 +1,5 @@
- #include <syslinux/firmware.h>
-+#include <syslinux/memscan.h>
- #include <core.h>
- #include "pxe.h"
- #include <net.h>
-@@ -10,6 +11,9 @@ static uint16_t real_base_mem; /* Amount of DOS memory after freeing */
- static bool has_gpxe;
- static uint32_t gpxe_funcs;
-
-+static addr_t pxe_code_start, pxe_code_size;
-+static addr_t pxe_data_start, pxe_data_size;
-+
- /*
- * Validity check on possible !PXE structure in buf
- * return 1 for success, 0 for failure.
-@@ -88,6 +92,29 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
- return memory_scan(0x10000, is_pxenv);
- }
-
-+static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ int rv = 0;
-+
-+ /*
-+ * If we are planning on calling unload_pxe() and unmapping the PXE
-+ * region before we transfer control away from PXELINUX we can mark
-+ * that region as SMT_TERMINAL to indicate that the region will
-+ * become free at some point in the future.
-+ */
-+ if (!KeepPXE) {
-+ dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_code_start, pxe_code_start + pxe_code_size);
-+ rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
-+
-+ dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_data_start, pxe_data_start + pxe_data_size);
-+ rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-+ }
-+
-+ return rv;
-+}
-+
- /*
- * Find the !PXE structure; we search for the following, in order:
- *
-@@ -204,6 +231,14 @@ int pxe_init(bool quiet)
- printf("UNDI data segment at %04X len %04X\n", data_seg, data_len);
- }
-
-+ pxe_code_start = code_seg << 4;
-+ pxe_code_size = code_len;
-+
-+ pxe_data_start = data_seg << 4;
-+ pxe_data_size = data_len;
-+
-+ syslinux_memscan_new(pxelinux_scan_memory);
-+
- code_seg = code_seg + ((code_len + 15) >> 4);
- data_seg = data_seg + ((data_len + 15) >> 4);
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch b/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
deleted file mode 100644
index ee0a77237d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-Status: Backport [c0ea15936de8378d1da6843d3dbddd8dddba1011]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From f3347f9b09135d71a4effae1614b22dcdf16a7e2 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 24 Jul 2013 18:33:14 +0100
-Subject: [PATCH 4/4] pxe: use bios_fbm() and real_base_mem to calculate free
- space
-
-We don't need to individually add the PXE regions, we already have two
-symbols that denote the memory region that will be freed when calling
-unload_pxe().
-
-This essentially reverts commit 03dda0f1 ("pxe: mark all PXE regions as
-SMT_TERMINAL").
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- core/fs/pxe/bios.c
----
- core/fs/pxe/bios.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 5f61824..ffdffaf 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -94,24 +94,24 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
-
- static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-+ addr_t start, size;
- int rv = 0;
-
-+ if (KeepPXE)
-+ return 0;
-+
- /*
- * If we are planning on calling unload_pxe() and unmapping the PXE
- * region before we transfer control away from PXELINUX we can mark
- * that region as SMT_TERMINAL to indicate that the region will
- * become free at some point in the future.
- */
-- if (!KeepPXE) {
-- dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_code_start, pxe_code_start + pxe_code_size);
-- rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
--
-- dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_data_start, pxe_data_start + pxe_data_size);
-- rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-- }
-+ start = bios_fbm() << 10;
-+ size = (real_base_mem - bios_fbm()) << 10;
-+ dprintf("Marking PXE region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ start, start + size);
-
-+ callback(data, start, size, SMT_TERMINAL);
- return rv;
- }
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch b/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
deleted file mode 100644
index 09a6945ba9..0000000000
--- a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1 Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Fri, 20 Jun 2014 11:32:11 +0800
-Subject: [PATCH 1/2] isohybrid: fix overflow on 32 bit system
-
-When call isohybrid with option '-u', it overflows on a 32 bits host. It
-seeks to 512 bytes before the end of the image to install gpt header. If
-the size of image is larger than LONG_MAX, it overflows fseek() and
-cause error:
-
-isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
-
-Replace fseek with fseeko to fix this issue.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- utils/isohybrid.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/isohybrid.c b/utils/isohybrid.c
-index 410bb60..23fc6c0 100644
---- a/utils/isohybrid.c
-+++ b/utils/isohybrid.c
-@@ -1126,7 +1126,7 @@ main(int argc, char *argv[])
- * end of the image
- */
-
-- if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
-+ if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
- SEEK_SET))
- err(1, "%s: seek error - 8", argv[0]);
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
index 6b695791cd..312b1e8aed 100644
--- a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
@@ -24,15 +24,12 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
com32/Makefile | 1 +
1 file changed, 1 insertion(+)
-diff --git a/com32/Makefile b/com32/Makefile
-index 7ea1b01..9a1721b 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -20,3 +20,4 @@ modules: lib libutil gpllib
- rosh: lib libutil
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -21,3 +21,4 @@ rosh: lib libutil
samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
+gpllib: lib
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
new file mode 100644
index 0000000000..c0714b5175
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
@@ -0,0 +1,34 @@
+From 490fc3bbd65c2c252c1fdf3da0fac9898aa9eea6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 15 Aug 2014 21:09:16 -0700
+Subject: [PATCH] com32/Makefile: fix parallel issue
+
+Fixed:
+cp -r syslinux-6.01/com32/libupload/*.h image/usr/share/syslinux/com32/include/
+[snip]
+rm -rf image/usr/share/syslinux/com32/include
+[snip]
+cp: cannot create regular file `image/usr/share/syslinux/com32/include/serial.h': No such file or directory
+
+The cp is happened in the "libupload" dir, while "rm -fr" is happend in
+"lib" dir, let "libupload" depend "lib" will fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ com32/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/com32/Makefile b/com32/Makefile
+index 9a1721b..f172db2 100644
+--- a/com32/Makefile
++++ b/com32/Makefile
+@@ -21,3 +21,4 @@ rosh: lib libutil
+ samples: libutil elflink/ldlinux
+ sysdump: libupload gpllib
+ gpllib: lib
++libupload: lib
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
new file mode 100644
index 0000000000..7c003e165b
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
@@ -0,0 +1,17 @@
+This script try to call git submodule, since we are downloading
+the tarball it seems in-correct to do this.
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: syslinux-6.03/efi/Makefile
+===================================================================
+--- syslinux-6.03.orig/efi/Makefile
++++ syslinux-6.03/efi/Makefile
+@@ -101,7 +101,6 @@ tidy dist:
+ rm -f *.so *.o wrapper
+ find . \( -name \*.o -o -name \*.a -o -name .\*.d -o -name \*.tmp \) -print0 | \
+ xargs -0r rm -f
+- $(topdir)/efi/clean-gnu-efi.sh $(EFI_SUBARCH) $(objdir)
+
+ clean: tidy
+
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.01.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index e8a1fd4ffe..7e3176e84e 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.01.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -8,17 +8,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
# ldlinux.* stuff for now, so skip mtools-native
DEPENDS = "nasm-native util-linux"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.bz2 \
- file://0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch \
- file://0002-memscan-build-a-linked-list-of-memory-scanners.patch \
- file://0003-PXELINUX-Add-bios-memscan-function.patch \
- file://0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.xz \
file://syslinux-fix-parallel-building-issue.patch \
- file://isohybrid-fix-overflow-on-32-bit-system.patch \
+ file://syslinux-libupload-depend-lib.patch \
+ file://syslinux-remove-clean-script.patch \
"
-SRC_URI[md5sum] = "6945ee89e29119d459baed4937bbc534"
-SRC_URI[sha256sum] = "83a04cf81e6a46b80ee5a321926eea095af3498b04317e3674b46c125c7a5b43"
+SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
+SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
@@ -45,6 +42,10 @@ do_configure() {
}
do_compile() {
+ # Make sure the recompile is OK.
+ # Though the ${B} should always exist, still check it before find and rm.
+ [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \;
+
# Rebuild only the installer; keep precompiled bootloaders
# as per author's request (doc/distrib.txt)
oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
@@ -61,6 +62,7 @@ do_install() {
PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
RDEPENDS_${PN} += "mtools"
+RDEPENDS_${PN}-misc += "perl"
FILES_${PN} = "${bindir}/syslinux"
FILES_${PN}-extlinux = "${sbindir}/extlinux"
diff --git a/meta/recipes-devtools/tcltk/tcl/run-ptest b/meta/recipes-devtools/tcltk/tcl/run-ptest
index a5d6548d2a..dadba655f2 100644
--- a/meta/recipes-devtools/tcltk/tcl/run-ptest
+++ b/meta/recipes-devtools/tcltk/tcl/run-ptest
@@ -1,8 +1,8 @@
#!/bin/sh
for i in `ls tests/*.test |awk -F/ '{print $2}'`; \
- do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i &>$i.tmp; \
+ do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.tmp 2>&1; \
grep -q "^Files with failing tests:" $i.tmp; \
- if [ $? == 0 ]; then echo "FAIL: $i"; \
+ if [ $? -eq 0 ]; then echo "FAIL: $i"; \
else echo "PASS: $i"; rm -f $i.tmp; fi; \
done
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
index 27f73f2ce2..73c0d25567 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
@@ -24,8 +24,8 @@ SRC_URI = "${BASE_SRC_URI} \
file://alter-includedir.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "aae4b701ee527c6e4e1a6f9c7399882e"
-SRC_URI[sha256sum] = "16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514"
+SRC_URI[md5sum] = "db382feca91754b7f93da16dc4cdad1f"
+SRC_URI[sha256sum] = "6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005"
SRC_URI_class-native = "${BASE_SRC_URI}"
@@ -81,6 +81,7 @@ FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
# isn't getting picked up by shlibs code
RDEPENDS_${PN} += "tcl-lib"
RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/ubootchart/files/sysvinit.patch b/meta/recipes-devtools/ubootchart/files/sysvinit.patch
deleted file mode 100644
index fc82ed8e78..0000000000
--- a/meta/recipes-devtools/ubootchart/files/sysvinit.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [distribution]
-
-Index: ubootchart.conf
-===================================================================
---- ubootchart.conf (revision 9)
-+++ ubootchart.conf (working copy)
-@@ -1,6 +1,6 @@
-
- # If you want to chain on and run somthing other than /sbin/init...
--export init_prog=/sbin/init
-+export init_prog=/sbin/init.sysvinit
-
- # On startup ubootchart will mount a tmpfs filesystem at this
- # location and chdir here. This is only used for the logging of
diff --git a/meta/recipes-devtools/ubootchart/files/ubootchart-stop b/meta/recipes-devtools/ubootchart/files/ubootchart-stop
deleted file mode 100644
index 3444069c9a..0000000000
--- a/meta/recipes-devtools/ubootchart/files/ubootchart-stop
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-kill -USR1 $(pidof ubootchartd_bin)
diff --git a/meta/recipes-devtools/ubootchart/files/ubootchart.desktop b/meta/recipes-devtools/ubootchart/files/ubootchart.desktop
deleted file mode 100644
index 5552b3bc6f..0000000000
--- a/meta/recipes-devtools/ubootchart/files/ubootchart.desktop
+++ /dev/null
@@ -1,6 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Exec=/sbin/ubootchart-stop
-Name=Stop Bootchart
-Type=Application
-Categories=Programming;
diff --git a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb b/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
deleted file mode 100644
index b13755e855..0000000000
--- a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "A boot profiling tool"
-HOMEPAGE = "http://code.google.com/p/ubootchart/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-SRCREV = "12"
-PV = "0.0+r${SRCPV}"
-PR = "r6"
-
-#RRECOMMENDS_${PN} = "acct"
-
-SRC_URI = "svn://ubootchart.googlecode.com/svn/;protocol=http;module=trunk \
- file://sysvinit.patch;striplevel=0 \
- file://ubootchart-stop \
- file://ubootchart.desktop"
-
-S = "${WORKDIR}/trunk"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "init"
-ALTERNATIVE_TARGET[init] = "${base_sbindir}/ubootchartd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY = "70"
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${INCLUDES} ${S}/ubootchartd_bin.c -o ubootchartd_bin
-}
-
-do_install() {
- install -m 0755 -d ${D}${base_sbindir} ${D}${sysconfdir}/ubootchart ${D}${datadir}/applications
- install -m 0755 ${S}/ubootchartd_bin ${D}${base_sbindir}
- install -m 0755 ${S}/ubootchartd ${D}${base_sbindir}
- install -m 0644 ${S}/ubootchart.conf ${D}${sysconfdir}/ubootchart
- install -m 0755 ${S}/start.sh ${D}${sysconfdir}/ubootchart
- install -m 0755 ${S}/finish.sh ${D}${sysconfdir}/ubootchart
-
- install -m 0755 ${WORKDIR}/ubootchart-stop ${D}${base_sbindir}
- install -m 0644 ${WORKDIR}/ubootchart.desktop ${D}${datadir}/applications
-}
diff --git a/meta/recipes-devtools/unifdef/files/unifdef.c b/meta/recipes-devtools/unifdef/files/unifdef.c
deleted file mode 100644
index 5cbac15608..0000000000
--- a/meta/recipes-devtools/unifdef/files/unifdef.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/*
- * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by Dave Yost.
- * It was rewritten to support ANSI C by Tony Finch. The original version of
- * unifdef carried the following copyright notice. None of its code remains
- * in this version (though some of the names remain).
- *
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-#ifndef lint
-#if 0
-static const char copyright[] =
-"@(#) Copyright (c) 1985, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif
-#ifdef __IDSTRING
-__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
-__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
-#endif
-#endif /* not lint */
-#ifdef __FBSDID
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
-#endif
-
-/*
- * unifdef - remove ifdef'ed lines
- *
- * Wishlist:
- * provide an option which will append the name of the
- * appropriate symbol after #else's and #endif's
- * provide an option which will check symbols after
- * #else's and #endif's to see that they match their
- * corresponding #ifdef or #ifndef
- *
- * The first two items above require better buffer handling, which would
- * also make it possible to handle all "dodgy" directives correctly.
- */
-
-#include <ctype.h>
-#include <err.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-size_t strlcpy(char *dst, const char *src, size_t siz);
-
-/* types of input lines: */
-typedef enum {
- LT_TRUEI, /* a true #if with ignore flag */
- LT_FALSEI, /* a false #if with ignore flag */
- LT_IF, /* an unknown #if */
- LT_TRUE, /* a true #if */
- LT_FALSE, /* a false #if */
- LT_ELIF, /* an unknown #elif */
- LT_ELTRUE, /* a true #elif */
- LT_ELFALSE, /* a false #elif */
- LT_ELSE, /* #else */
- LT_ENDIF, /* #endif */
- LT_DODGY, /* flag: directive is not on one line */
- LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
- LT_PLAIN, /* ordinary line */
- LT_EOF, /* end of file */
- LT_COUNT
-} Linetype;
-
-static char const * const linetype_name[] = {
- "TRUEI", "FALSEI", "IF", "TRUE", "FALSE",
- "ELIF", "ELTRUE", "ELFALSE", "ELSE", "ENDIF",
- "DODGY TRUEI", "DODGY FALSEI",
- "DODGY IF", "DODGY TRUE", "DODGY FALSE",
- "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
- "DODGY ELSE", "DODGY ENDIF",
- "PLAIN", "EOF"
-};
-
-/* state of #if processing */
-typedef enum {
- IS_OUTSIDE,
- IS_FALSE_PREFIX, /* false #if followed by false #elifs */
- IS_TRUE_PREFIX, /* first non-false #(el)if is true */
- IS_PASS_MIDDLE, /* first non-false #(el)if is unknown */
- IS_FALSE_MIDDLE, /* a false #elif after a pass state */
- IS_TRUE_MIDDLE, /* a true #elif after a pass state */
- IS_PASS_ELSE, /* an else after a pass state */
- IS_FALSE_ELSE, /* an else after a true state */
- IS_TRUE_ELSE, /* an else after only false states */
- IS_FALSE_TRAILER, /* #elifs after a true are false */
- IS_COUNT
-} Ifstate;
-
-static char const * const ifstate_name[] = {
- "OUTSIDE", "FALSE_PREFIX", "TRUE_PREFIX",
- "PASS_MIDDLE", "FALSE_MIDDLE", "TRUE_MIDDLE",
- "PASS_ELSE", "FALSE_ELSE", "TRUE_ELSE",
- "FALSE_TRAILER"
-};
-
-/* state of comment parser */
-typedef enum {
- NO_COMMENT = false, /* outside a comment */
- C_COMMENT, /* in a comment like this one */
- CXX_COMMENT, /* between // and end of line */
- STARTING_COMMENT, /* just after slash-backslash-newline */
- FINISHING_COMMENT, /* star-backslash-newline in a C comment */
- CHAR_LITERAL, /* inside '' */
- STRING_LITERAL /* inside "" */
-} Comment_state;
-
-static char const * const comment_name[] = {
- "NO", "C", "CXX", "STARTING", "FINISHING", "CHAR", "STRING"
-};
-
-/* state of preprocessor line parser */
-typedef enum {
- LS_START, /* only space and comments on this line */
- LS_HASH, /* only space, comments, and a hash */
- LS_DIRTY /* this line can't be a preprocessor line */
-} Line_state;
-
-static char const * const linestate_name[] = {
- "START", "HASH", "DIRTY"
-};
-
-/*
- * Minimum translation limits from ISO/IEC 9899:1999 5.2.4.1
- */
-#define MAXDEPTH 64 /* maximum #if nesting */
-#define MAXLINE 4096 /* maximum length of line */
-#define MAXSYMS 4096 /* maximum number of symbols */
-
-/*
- * Sometimes when editing a keyword the replacement text is longer, so
- * we leave some space at the end of the tline buffer to accommodate this.
- */
-#define EDITSLOP 10
-
-/*
- * Globals.
- */
-
-static bool complement; /* -c: do the complement */
-static bool debugging; /* -d: debugging reports */
-static bool iocccok; /* -e: fewer IOCCC errors */
-static bool killconsts; /* -k: eval constant #ifs */
-static bool lnblank; /* -l: blank deleted lines */
-static bool lnnum; /* -n: add #line directives */
-static bool symlist; /* -s: output symbol list */
-static bool text; /* -t: this is a text file */
-
-static const char *symname[MAXSYMS]; /* symbol name */
-static const char *value[MAXSYMS]; /* -Dsym=value */
-static bool ignore[MAXSYMS]; /* -iDsym or -iUsym */
-static int nsyms; /* number of symbols */
-
-static FILE *input; /* input file pointer */
-static const char *filename; /* input file name */
-static int linenum; /* current line number */
-
-static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
-static char *keyword; /* used for editing #elif's */
-
-static Comment_state incomment; /* comment parser state */
-static Line_state linestate; /* #if line parser state */
-static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
-static bool ignoring[MAXDEPTH]; /* ignore comments state */
-static int stifline[MAXDEPTH]; /* start of current #if */
-static int depth; /* current #if nesting */
-static int delcount; /* count of deleted lines */
-static bool keepthis; /* don't delete constant #if */
-
-static int exitstat; /* program exit status */
-
-static void addsym(bool, bool, char *);
-static void debug(const char *, ...);
-static void done(void);
-static void error(const char *);
-static int findsym(const char *);
-static void flushline(bool);
-static Linetype getline34(void);
-static Linetype ifeval(const char **);
-static void ignoreoff(void);
-static void ignoreon(void);
-static void keywordedit(const char *);
-static void nest(void);
-static void process(void);
-static const char *skipcomment(const char *);
-static const char *skipsym(const char *);
-static void state(Ifstate);
-static int strlcmp(const char *, const char *, size_t);
-static void unnest(void);
-static void usage(void);
-
-#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
-
-/*
- * The main program.
- */
-int
-main(int argc, char *argv[])
-{
- int opt;
-
- while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
- switch (opt) {
- case 'i': /* treat stuff controlled by these symbols as text */
- /*
- * For strict backwards-compatibility the U or D
- * should be immediately after the -i but it doesn't
- * matter much if we relax that requirement.
- */
- opt = *optarg++;
- if (opt == 'D')
- addsym(true, true, optarg);
- else if (opt == 'U')
- addsym(true, false, optarg);
- else
- usage();
- break;
- case 'D': /* define a symbol */
- addsym(false, true, optarg);
- break;
- case 'U': /* undef a symbol */
- addsym(false, false, optarg);
- break;
- case 'I':
- /* no-op for compatibility with cpp */
- break;
- case 'c': /* treat -D as -U and vice versa */
- complement = true;
- break;
- case 'd':
- debugging = true;
- break;
- case 'e': /* fewer errors from dodgy lines */
- iocccok = true;
- break;
- case 'k': /* process constant #ifs */
- killconsts = true;
- break;
- case 'l': /* blank deleted lines instead of omitting them */
- lnblank = true;
- break;
- case 'n': /* add #line directive after deleted lines */
- lnnum = true;
- break;
- case 's': /* only output list of symbols that control #ifs */
- symlist = true;
- break;
- case 't': /* don't parse C comments */
- text = true;
- break;
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
- if (argc > 1) {
- errx(2, "can only do one file");
- } else if (argc == 1 && strcmp(*argv, "-") != 0) {
- filename = *argv;
- input = fopen(filename, "r");
- if (input == NULL)
- err(2, "can't open %s", filename);
- } else {
- filename = "[stdin]";
- input = stdin;
- }
- process();
- abort(); /* bug */
-}
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
- " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
- exit(2);
-}
-
-/*
- * A state transition function alters the global #if processing state
- * in a particular way. The table below is indexed by the current
- * processing state and the type of the current line.
- *
- * Nesting is handled by keeping a stack of states; some transition
- * functions increase or decrease the depth. They also maintain the
- * ignore state on a stack. In some complicated cases they have to
- * alter the preprocessor directive, as follows.
- *
- * When we have processed a group that starts off with a known-false
- * #if/#elif sequence (which has therefore been deleted) followed by a
- * #elif that we don't understand and therefore must keep, we edit the
- * latter into a #if to keep the nesting correct.
- *
- * When we find a true #elif in a group, the following block will
- * always be kept and the rest of the sequence after the next #elif or
- * #else will be discarded. We edit the #elif into a #else and the
- * following directive to #endif since this has the desired behaviour.
- *
- * "Dodgy" directives are split across multiple lines, the most common
- * example being a multi-line comment hanging off the right of the
- * directive. We can handle them correctly only if there is no change
- * from printing to dropping (or vice versa) caused by that directive.
- * If the directive is the first of a group we have a choice between
- * failing with an error, or passing it through unchanged instead of
- * evaluating it. The latter is not the default to avoid questions from
- * users about unifdef unexpectedly leaving behind preprocessor directives.
- */
-typedef void state_fn(void);
-
-/* report an error */
-static void Eelif (void) { error("Inappropriate #elif"); }
-static void Eelse (void) { error("Inappropriate #else"); }
-static void Eendif(void) { error("Inappropriate #endif"); }
-static void Eeof (void) { error("Premature EOF"); }
-static void Eioccc(void) { error("Obfuscated preprocessor control line"); }
-/* plain line handling */
-static void print (void) { flushline(true); }
-static void drop (void) { flushline(false); }
-/* output lacks group's start line */
-static void Strue (void) { drop(); ignoreoff(); state(IS_TRUE_PREFIX); }
-static void Sfalse(void) { drop(); ignoreoff(); state(IS_FALSE_PREFIX); }
-static void Selse (void) { drop(); state(IS_TRUE_ELSE); }
-/* print/pass this block */
-static void Pelif (void) { print(); ignoreoff(); state(IS_PASS_MIDDLE); }
-static void Pelse (void) { print(); state(IS_PASS_ELSE); }
-static void Pendif(void) { print(); unnest(); }
-/* discard this block */
-static void Dfalse(void) { drop(); ignoreoff(); state(IS_FALSE_TRAILER); }
-static void Delif (void) { drop(); ignoreoff(); state(IS_FALSE_MIDDLE); }
-static void Delse (void) { drop(); state(IS_FALSE_ELSE); }
-static void Dendif(void) { drop(); unnest(); }
-/* first line of group */
-static void Fdrop (void) { nest(); Dfalse(); }
-static void Fpass (void) { nest(); Pelif(); }
-static void Ftrue (void) { nest(); Strue(); }
-static void Ffalse(void) { nest(); Sfalse(); }
-/* variable pedantry for obfuscated lines */
-static void Oiffy (void) { if (!iocccok) Eioccc(); Fpass(); ignoreon(); }
-static void Oif (void) { if (!iocccok) Eioccc(); Fpass(); }
-static void Oelif (void) { if (!iocccok) Eioccc(); Pelif(); }
-/* ignore comments in this block */
-static void Idrop (void) { Fdrop(); ignoreon(); }
-static void Itrue (void) { Ftrue(); ignoreon(); }
-static void Ifalse(void) { Ffalse(); ignoreon(); }
-/* edit this line */
-static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
-static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
-static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
-static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
-
-static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
-/* IS_OUTSIDE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
- print, done },
-/* IS_FALSE_PREFIX */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_PREFIX */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- print, Eeof },
-/* IS_PASS_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
- print, Eeof },
-/* IS_FALSE_MIDDLE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
- print, Eeof },
-/* IS_PASS_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
- print, Eeof },
-/* IS_FALSE_ELSE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
- drop, Eeof },
-/* IS_TRUE_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
- print, Eeof },
-/* IS_FALSE_TRAILER */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
- drop, Eeof }
-/*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
- TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
- PLAIN EOF */
-};
-
-/*
- * State machine utility functions
- */
-static void
-done(void)
-{
- if (incomment)
- error("EOF in comment");
- exit(exitstat);
-}
-static void
-ignoreoff(void)
-{
- if (depth == 0)
- abort(); /* bug */
- ignoring[depth] = ignoring[depth-1];
-}
-static void
-ignoreon(void)
-{
- ignoring[depth] = true;
-}
-static void
-keywordedit(const char *replacement)
-{
- size_t size = tline + sizeof(tline) - keyword;
- char *dst = keyword;
- const char *src = replacement;
- if (size != 0) {
- while ((--size != 0) && (*src != '\0'))
- *dst++ = *src++;
- *dst = '\0';
- }
- print();
-}
-static void
-nest(void)
-{
- depth += 1;
- if (depth >= MAXDEPTH)
- error("Too many levels of nesting");
- stifline[depth] = linenum;
-}
-static void
-unnest(void)
-{
- if (depth == 0)
- abort(); /* bug */
- depth -= 1;
-}
-static void
-state(Ifstate is)
-{
- ifstate[depth] = is;
-}
-
-/*
- * Write a line to the output or not, according to command line options.
- */
-static void
-flushline(bool keep)
-{
- if (symlist)
- return;
- if (keep ^ complement) {
- if (lnnum && delcount > 0)
- printf("#line %d\n", linenum);
- fputs(tline, stdout);
- delcount = 0;
- } else {
- if (lnblank)
- putc('\n', stdout);
- exitstat = 1;
- delcount += 1;
- }
-}
-
-/*
- * The driver for the state machine.
- */
-static void
-process(void)
-{
- Linetype lineval;
-
- for (;;) {
- linenum++;
- lineval = getline34();
- trans_table[ifstate[depth]][lineval]();
- debug("process %s -> %s depth %d",
- linetype_name[lineval],
- ifstate_name[ifstate[depth]], depth);
- }
-}
-
-/*
- * Parse a line and determine its type. We keep the preprocessor line
- * parser state between calls in the global variable linestate, with
- * help from skipcomment().
- */
-static Linetype
-getline34(void)
-{
- const char *cp;
- int cursym;
- int kwlen;
- Linetype retval;
- Comment_state wascomment;
-
- if (fgets(tline, MAXLINE, input) == NULL)
- return (LT_EOF);
- retval = LT_PLAIN;
- wascomment = incomment;
- cp = skipcomment(tline);
- if (linestate == LS_START) {
- if (*cp == '#') {
- linestate = LS_HASH;
- cp = skipcomment(cp + 1);
- } else if (*cp != '\0')
- linestate = LS_DIRTY;
- }
- if (!incomment && linestate == LS_HASH) {
- keyword = tline + (cp - tline);
- cp = skipsym(cp);
- kwlen = cp - keyword;
- /* no way can we deal with a continuation inside a keyword */
- if (strncmp(cp, "\\\n", 2) == 0)
- Eioccc();
- if (strlcmp("ifdef", keyword, kwlen) == 0 ||
- strlcmp("ifndef", keyword, kwlen) == 0) {
- cp = skipcomment(cp);
- if ((cursym = findsym(cp)) < 0)
- retval = LT_IF;
- else {
- retval = (keyword[2] == 'n')
- ? LT_FALSE : LT_TRUE;
- if (value[cursym] == NULL)
- retval = (retval == LT_TRUE)
- ? LT_FALSE : LT_TRUE;
- if (ignore[cursym])
- retval = (retval == LT_TRUE)
- ? LT_TRUEI : LT_FALSEI;
- }
- cp = skipsym(cp);
- } else if (strlcmp("if", keyword, kwlen) == 0)
- retval = ifeval(&cp);
- else if (strlcmp("elif", keyword, kwlen) == 0)
- retval = ifeval(&cp) - LT_IF + LT_ELIF;
- else if (strlcmp("else", keyword, kwlen) == 0)
- retval = LT_ELSE;
- else if (strlcmp("endif", keyword, kwlen) == 0)
- retval = LT_ENDIF;
- else {
- linestate = LS_DIRTY;
- retval = LT_PLAIN;
- }
- cp = skipcomment(cp);
- if (*cp != '\0') {
- linestate = LS_DIRTY;
- if (retval == LT_TRUE || retval == LT_FALSE ||
- retval == LT_TRUEI || retval == LT_FALSEI)
- retval = LT_IF;
- if (retval == LT_ELTRUE || retval == LT_ELFALSE)
- retval = LT_ELIF;
- }
- if (retval != LT_PLAIN && (wascomment || incomment)) {
- retval += LT_DODGY;
- if (incomment)
- linestate = LS_DIRTY;
- }
- /* skipcomment should have changed the state */
- if (linestate == LS_HASH)
- abort(); /* bug */
- }
- if (linestate == LS_DIRTY) {
- while (*cp != '\0')
- cp = skipcomment(cp + 1);
- }
- debug("parser %s comment %s line",
- comment_name[incomment], linestate_name[linestate]);
- return (retval);
-}
-
-/*
- * These are the binary operators that are supported by the expression
- * evaluator. Note that if support for division is added then we also
- * need short-circuiting booleans because of divide-by-zero.
- */
-static int op_lt(int a, int b) { return (a < b); }
-static int op_gt(int a, int b) { return (a > b); }
-static int op_le(int a, int b) { return (a <= b); }
-static int op_ge(int a, int b) { return (a >= b); }
-static int op_eq(int a, int b) { return (a == b); }
-static int op_ne(int a, int b) { return (a != b); }
-static int op_or(int a, int b) { return (a || b); }
-static int op_and(int a, int b) { return (a && b); }
-
-/*
- * An evaluation function takes three arguments, as follows: (1) a pointer to
- * an element of the precedence table which lists the operators at the current
- * level of precedence; (2) a pointer to an integer which will receive the
- * value of the expression; and (3) a pointer to a char* that points to the
- * expression to be evaluated and that is updated to the end of the expression
- * when evaluation is complete. The function returns LT_FALSE if the value of
- * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
- * expression could not be evaluated.
- */
-struct ops;
-
-typedef Linetype eval_fn(const struct ops *, int *, const char **);
-
-static eval_fn eval_table, eval_unary;
-
-/*
- * The precedence table. Expressions involving binary operators are evaluated
- * in a table-driven way by eval_table. When it evaluates a subexpression it
- * calls the inner function with its first argument pointing to the next
- * element of the table. Innermost expressions have special non-table-driven
- * handling.
- */
-static const struct ops {
- eval_fn *inner;
- struct op {
- const char *str;
- int (*fn)(int, int);
- } op[5];
-} eval_ops[] = {
- { eval_table, { { "||", op_or } } },
- { eval_table, { { "&&", op_and } } },
- { eval_table, { { "==", op_eq },
- { "!=", op_ne } } },
- { eval_unary, { { "<=", op_le },
- { ">=", op_ge },
- { "<", op_lt },
- { ">", op_gt } } }
-};
-
-/*
- * Function for evaluating the innermost parts of expressions,
- * viz. !expr (expr) defined(symbol) symbol number
- * We reset the keepthis flag when we find a non-constant subexpression.
- */
-static Linetype
-eval_unary(const struct ops *ops, int *valp, const char **cpp)
-{
- const char *cp;
- char *ep;
- int sym;
-
- cp = skipcomment(*cpp);
- if (*cp == '!') {
- debug("eval%d !", ops - eval_ops);
- cp++;
- if (eval_unary(ops, valp, &cp) == LT_IF)
- return (LT_IF);
- *valp = !*valp;
- } else if (*cp == '(') {
- cp++;
- debug("eval%d (", ops - eval_ops);
- if (eval_table(eval_ops, valp, &cp) == LT_IF)
- return (LT_IF);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- } else if (isdigit((unsigned char)*cp)) {
- debug("eval%d number", ops - eval_ops);
- *valp = strtol(cp, &ep, 0);
- cp = skipsym(cp);
- } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
- cp = skipcomment(cp+7);
- debug("eval%d defined", ops - eval_ops);
- if (*cp++ != '(')
- return (LT_IF);
- cp = skipcomment(cp);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- *valp = (value[sym] != NULL);
- cp = skipsym(cp);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- keepthis = false;
- } else if (!endsym(*cp)) {
- debug("eval%d symbol", ops - eval_ops);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- if (value[sym] == NULL)
- *valp = 0;
- else {
- *valp = strtol(value[sym], &ep, 0);
- if (*ep != '\0' || ep == value[sym])
- return (LT_IF);
- }
- cp = skipsym(cp);
- keepthis = false;
- } else {
- debug("eval%d bad expr", ops - eval_ops);
- return (LT_IF);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Table-driven evaluation of binary operators.
- */
-static Linetype
-eval_table(const struct ops *ops, int *valp, const char **cpp)
-{
- const struct op *op;
- const char *cp;
- int val;
-
- debug("eval%d", ops - eval_ops);
- cp = *cpp;
- if (ops->inner(ops+1, valp, &cp) == LT_IF)
- return (LT_IF);
- for (;;) {
- cp = skipcomment(cp);
- for (op = ops->op; op->str != NULL; op++)
- if (strncmp(cp, op->str, strlen(op->str)) == 0)
- break;
- if (op->str == NULL)
- break;
- cp += strlen(op->str);
- debug("eval%d %s", ops - eval_ops, op->str);
- if (ops->inner(ops+1, &val, &cp) == LT_IF)
- return (LT_IF);
- *valp = op->fn(*valp, val);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Evaluate the expression on a #if or #elif line. If we can work out
- * the result we return LT_TRUE or LT_FALSE accordingly, otherwise we
- * return just a generic LT_IF.
- */
-static Linetype
-ifeval(const char **cpp)
-{
- int ret;
- int val;
-
- debug("eval %s", *cpp);
- keepthis = killconsts ? false : true;
- ret = eval_table(eval_ops, &val, cpp);
- debug("eval = %d", val);
- return (keepthis ? LT_IF : ret);
-}
-
-/*
- * Skip over comments, strings, and character literals and stop at the
- * next character position that is not whitespace. Between calls we keep
- * the comment state in the global variable incomment, and we also adjust
- * the global variable linestate when we see a newline.
- * XXX: doesn't cope with the buffer splitting inside a state transition.
- */
-static const char *
-skipcomment(const char *cp)
-{
- if (text || ignoring[depth]) {
- for (; isspace((unsigned char)*cp); cp++)
- if (*cp == '\n')
- linestate = LS_START;
- return (cp);
- }
- while (*cp != '\0')
- /* don't reset to LS_START after a line continuation */
- if (strncmp(cp, "\\\n", 2) == 0)
- cp += 2;
- else switch (incomment) {
- case NO_COMMENT:
- if (strncmp(cp, "/\\\n", 3) == 0) {
- incomment = STARTING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "/*", 2) == 0) {
- incomment = C_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "//", 2) == 0) {
- incomment = CXX_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "\'", 1) == 0) {
- incomment = CHAR_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\"", 1) == 0) {
- incomment = STRING_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\n", 1) == 0) {
- linestate = LS_START;
- cp += 1;
- } else if (strchr(" \t", *cp) != NULL) {
- cp += 1;
- } else
- return (cp);
- continue;
- case CXX_COMMENT:
- if (strncmp(cp, "\n", 1) == 0) {
- incomment = NO_COMMENT;
- linestate = LS_START;
- }
- cp += 1;
- continue;
- case CHAR_LITERAL:
- case STRING_LITERAL:
- if ((incomment == CHAR_LITERAL && cp[0] == '\'') ||
- (incomment == STRING_LITERAL && cp[0] == '\"')) {
- incomment = NO_COMMENT;
- cp += 1;
- } else if (cp[0] == '\\') {
- if (cp[1] == '\0')
- cp += 1;
- else
- cp += 2;
- } else if (strncmp(cp, "\n", 1) == 0) {
- if (incomment == CHAR_LITERAL)
- error("unterminated char literal");
- else
- error("unterminated string literal");
- } else
- cp += 1;
- continue;
- case C_COMMENT:
- if (strncmp(cp, "*\\\n", 3) == 0) {
- incomment = FINISHING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "*/", 2) == 0) {
- incomment = NO_COMMENT;
- cp += 2;
- } else
- cp += 1;
- continue;
- case STARTING_COMMENT:
- if (*cp == '*') {
- incomment = C_COMMENT;
- cp += 1;
- } else if (*cp == '/') {
- incomment = CXX_COMMENT;
- cp += 1;
- } else {
- incomment = NO_COMMENT;
- linestate = LS_DIRTY;
- }
- continue;
- case FINISHING_COMMENT:
- if (*cp == '/') {
- incomment = NO_COMMENT;
- cp += 1;
- } else
- incomment = C_COMMENT;
- continue;
- default:
- abort(); /* bug */
- }
- return (cp);
-}
-
-/*
- * Skip over an identifier.
- */
-static const char *
-skipsym(const char *cp)
-{
- while (!endsym(*cp))
- ++cp;
- return (cp);
-}
-
-/*
- * Look for the symbol in the symbol table. If is is found, we return
- * the symbol table index, else we return -1.
- */
-static int
-findsym(const char *str)
-{
- const char *cp;
- int symind;
-
- cp = skipsym(str);
- if (cp == str)
- return (-1);
- if (symlist) {
- printf("%.*s\n", (int)(cp-str), str);
- /* we don't care about the value of the symbol */
- return (0);
- }
- for (symind = 0; symind < nsyms; ++symind) {
- if (strlcmp(symname[symind], str, cp-str) == 0) {
- debug("findsym %s %s", symname[symind],
- value[symind] ? value[symind] : "");
- return (symind);
- }
- }
- return (-1);
-}
-
-/*
- * Add a symbol to the symbol table.
- */
-static void
-addsym(bool ignorethis, bool definethis, char *sym)
-{
- int symind;
- char *val;
-
- symind = findsym(sym);
- if (symind < 0) {
- if (nsyms >= MAXSYMS)
- errx(2, "too many symbols");
- symind = nsyms++;
- }
- symname[symind] = sym;
- ignore[symind] = ignorethis;
- val = sym + (skipsym(sym) - sym);
- if (definethis) {
- if (*val == '=') {
- value[symind] = val+1;
- *val = '\0';
- } else if (*val == '\0')
- value[symind] = "";
- else
- usage();
- } else {
- if (*val != '\0')
- usage();
- value[symind] = NULL;
- }
-}
-
-/*
- * Compare s with n characters of t.
- * The same as strncmp() except that it checks that s[n] == '\0'.
- */
-static int
-strlcmp(const char *s, const char *t, size_t n)
-{
- while (n-- && *t != '\0')
- if (*s != *t)
- return ((unsigned char)*s - (unsigned char)*t);
- else
- ++s, ++t;
- return ((unsigned char)*s);
-}
-
-/*
- * Diagnostics.
- */
-static void
-debug(const char *msg, ...)
-{
- va_list ap;
-
- if (debugging) {
- va_start(ap, msg);
- vwarnx(msg, ap);
- va_end(ap);
- }
-}
-
-static void
-error(const char *msg)
-{
- if (depth == 0)
- warnx("%s: %d: %s", filename, linenum, msg);
- else
- warnx("%s: %d: %s (#if line %d depth %d)",
- filename, linenum, msg, stifline[depth], depth);
- errx(2, "output may be truncated");
-}
diff --git a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
deleted file mode 100644
index 9a28684236..0000000000
--- a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Kernel header preprocessor"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-
-PR = "r1"
-
-LIC_FILES_CHKSUM = "file://${WORKDIR}/unifdef.c;endline=32;md5=1a33f5c39aa718a89058721df61979bd"
-
-SRC_URI = "file://unifdef.c"
-
-inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef ${WORKDIR}/unifdef.c
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 unifdef ${D}${bindir}
-}
-
diff --git a/meta/recipes-devtools/unifdef/unifdef_2.10.bb b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
new file mode 100644
index 0000000000..b8a0079840
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Selectively remove #ifdef statements from sources"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+
+LIC_FILES_CHKSUM = "file://unifdef.c;endline=32;md5=2cc23f0382a6f560f6a9ecf4e040c0da"
+
+SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "bb5d895e5ebbba5c5cc0c2771cf97ebe"
+SRC_URI[sha256sum] = "3b9b2b6b1952e9b9c1b9f734edec270689a35bdbf33ae66b50e19b2ed0d2df06"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} prefix=${prefix}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 64e7daffe1..63056fde4c 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -7,14 +7,12 @@ BBCLASSEXTEND = "native"
HOMEPAGE = "http://vala-project.org"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-INC_PR = "r1"
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF = "--disable-vapigen"
+inherit autotools pkgconfig
+FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
FILES_${PN}-doc += "${datadir}/devhelp"
-FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi"
+FILES_${PN}-dbg += "${libdir}/${BPN}-${SHRT_VER}/.debug"
diff --git a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
index e6c7941a77..ac9dc8c83a 100644
--- a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
+++ b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
@@ -7,6 +7,8 @@ Subject: [PATCH] git-version-gen: don't append -dirty if we're not in git
* for example if we have some dirty directory and we unpack clean vala tarball in it, then it will append -dirty
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Inappropriate [OE-Specific]
---
build-aux/git-version-gen | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/meta/recipes-devtools/vala/vala_0.16.0.bb b/meta/recipes-devtools/vala/vala_0.16.0.bb
deleted file mode 100644
index 92120b4a36..0000000000
--- a/meta/recipes-devtools/vala/vala_0.16.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-PR = "${INC_PR}.1"
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
-
-SRC_URI[md5sum] = "84b742e9cca4c90fde3026c3793c03c1"
-SRC_URI[sha256sum] = "3adb37aa2b35e2e2daed47552e85dbcbf752c0f7768b269d856993620073a657"
diff --git a/meta/recipes-devtools/vala/vala_0.26.1.bb b/meta/recipes-devtools/vala/vala_0.26.1.bb
new file mode 100644
index 0000000000..3df9cd4bae
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.26.1.bb
@@ -0,0 +1,6 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
+
+SRC_URI[md5sum] = "723a03b822d4cc47abc4019685970a3e"
+SRC_URI[sha256sum] = "8407abb19ab3a58bbfc0d288abb47666ef81f76d0540258c03965e7545f59e6b"
diff --git a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch b/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
index fdc9cc0e83..225f84305f 100644
--- a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
@@ -1,6 +1,6 @@
Modify vg_test wrapper to support PTEST formats
-This commit changes the valgrind regression test script vg_regtest to
+Change the valgrind regression test script vg_regtest to
support the yocto ptest stdout reporting format. The commit adds
'--yocto-ptest' as an optional argument to vg_regtest, which alters
the output to use the ptest infrastructure reporting format:
@@ -8,12 +8,16 @@ the output to use the ptest infrastructure reporting format:
instead of valgrind's internal test reporting format. Without the added
option, --yocto-ptest, the valgrind regression test output is unchanged.
+Enforce 30 seconds limit for the test.
+This resume execution of the remaining tests when valgrind hangs.
+
Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index 224385f..dbbd23d 100755
+index 224385f..3e0383b 100755
--- a/tests/vg_regtest.in
+++ b/tests/vg_regtest.in
@@ -39,11 +39,11 @@
@@ -55,7 +59,41 @@ index 224385f..dbbd23d 100755
} else {
die $usage;
}
-@@ -394,19 +397,21 @@ sub do_diffs($$$$)
+@@ -340,13 +343,28 @@ sub read_vgtest_file($)
+ #----------------------------------------------------------------------------
+ # Since most of the program time is spent in system() calls, need this to
+ # propagate a Ctrl-C enabling us to quit.
+-sub mysystem($)
++# Enforce 30 seconds limit for the test.
++# This resume execution of the remaining tests if valgrind hangs.
++sub mysystem($)
+ {
+- my $exit_code = system($_[0]);
+- ($exit_code == 2) and exit 1; # 2 is SIGINT
+- return $exit_code;
++ my $exit_code=0;
++ eval {
++ local $SIG{'ALRM'} = sub { die "timed out\n" };
++ alarm(30);
++ $exit_code = system($_[0]);
++ alarm (0);
++ ($exit_code == 2) and die "SIGINT\n"; # 2 is SIGINT
++ };
++ if ($@) {
++ if ($@ eq "timed out\n") {
++ print "timed out\n";
++ return 1;
++ }
++ if ($@ eq "SIGINT\n") {
++ exit 1;
++ }
++ }
+ }
+-
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+ sub filtered_rename($$)
+@@ -394,19 +412,21 @@ sub do_diffs($$$$)
# A match; remove .out and any previously created .diff files.
unlink("$name.$mid.out");
unlink(<$name.$mid.diff*>);
@@ -79,7 +117,7 @@ index 224385f..dbbd23d 100755
$vgtest =~ /^(.*)\.vgtest/;
my $name = $1;
my $fullname = "$dir/$name";
-@@ -425,7 +430,11 @@ sub do_one_test($$)
+@@ -425,7 +445,11 @@ sub do_one_test($$)
} elsif (256 == $prereq_res) {
# Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
# Prereq failed, skip.
@@ -92,7 +130,7 @@ index 224385f..dbbd23d 100755
return;
} else {
# Bad prereq; abort.
-@@ -438,7 +447,7 @@ sub do_one_test($$)
+@@ -438,7 +462,7 @@ sub do_one_test($$)
if (defined $progB) {
# If there is a progB, let's start it in background:
printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
@@ -101,7 +139,7 @@ index 224385f..dbbd23d 100755
# progB.done used to detect child has finished. See below.
# Note: redirection of stdout and stderr is before $progB to allow argsB
# to e.g. redirect stdoutB to stderrB
-@@ -452,7 +461,8 @@ sub do_one_test($$)
+@@ -452,7 +476,8 @@ sub do_one_test($$)
. "touch progB.done) &");
}
} else {
@@ -111,7 +149,7 @@ index 224385f..dbbd23d 100755
}
# Pass the appropriate --tool option for the directory (can be overridden
-@@ -487,7 +497,7 @@ sub do_one_test($$)
+@@ -487,7 +512,7 @@ sub do_one_test($$)
# Find all the .stdout.exp files. If none, use /dev/null.
my @stdout_exps = <$name.stdout.exp*>;
@stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
@@ -120,7 +158,7 @@ index 224385f..dbbd23d 100755
# Filter stderr
$stderr_filter_args = $name if (! defined $stderr_filter_args);
-@@ -496,7 +506,7 @@ sub do_one_test($$)
+@@ -496,7 +521,7 @@ sub do_one_test($$)
# Find all the .stderr.exp files. At least one must exist.
my @stderr_exps = <$name.stderr.exp*>;
(0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
@@ -129,7 +167,7 @@ index 224385f..dbbd23d 100755
if (defined $progB) {
# wait for the child to be finished
-@@ -520,7 +530,7 @@ sub do_one_test($$)
+@@ -520,7 +545,7 @@ sub do_one_test($$)
# Find all the .stdoutB.exp files. If none, use /dev/null.
my @stdoutB_exps = <$name.stdoutB.exp*>;
@stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
@@ -138,7 +176,7 @@ index 224385f..dbbd23d 100755
# Filter stderr
$stderrB_filter_args = $name if (! defined $stderrB_filter_args);
-@@ -529,7 +539,7 @@ sub do_one_test($$)
+@@ -529,7 +554,7 @@ sub do_one_test($$)
# Find all the .stderrB.exp files. At least one must exist.
my @stderrB_exps = <$name.stderrB.exp*>;
(0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
@@ -147,7 +185,7 @@ index 224385f..dbbd23d 100755
}
# Maybe do post-test check
-@@ -541,7 +551,7 @@ sub do_one_test($$)
+@@ -541,7 +566,7 @@ sub do_one_test($$)
# Find all the .post.exp files. If none, use /dev/null.
my @post_exps = <$name.post.exp*>;
@post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
@@ -156,7 +194,7 @@ index 224385f..dbbd23d 100755
}
}
-@@ -550,6 +560,13 @@ sub do_one_test($$)
+@@ -550,6 +575,13 @@ sub do_one_test($$)
print("(cleanup operation failed: $cleanup)\n");
}
@@ -170,7 +208,7 @@ index 224385f..dbbd23d 100755
$num_tests_done++;
}
-@@ -589,7 +606,7 @@ sub test_one_dir($$)
+@@ -589,7 +621,7 @@ sub test_one_dir($$)
my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
if ($found_tests) {
@@ -179,7 +217,7 @@ index 224385f..dbbd23d 100755
}
foreach my $f (@fs) {
if (-d $f) {
-@@ -599,7 +616,7 @@ sub test_one_dir($$)
+@@ -599,7 +631,7 @@ sub test_one_dir($$)
}
}
if ($found_tests) {
@@ -188,7 +226,7 @@ index 224385f..dbbd23d 100755
}
chdir("..");
-@@ -625,10 +642,12 @@ sub summarise_results
+@@ -625,10 +657,12 @@ sub summarise_results
$num_failures{"stdout"}, plural($num_failures{"stdout"}),
$num_failures{"stderrB"}, plural($num_failures{"stderrB"}),
$num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}),
diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch b/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch
deleted file mode 100644
index 7714b997fe..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Add support for compiling with glibc 2.19
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: valgrind-3.9.0/configure.ac
-===================================================================
---- valgrind-3.9.0.orig/configure.ac 2014-02-12 09:03:07.879873700 -0800
-+++ valgrind-3.9.0/configure.ac 2014-02-12 09:07:35.099871774 -0800
-@@ -918,6 +918,13 @@
- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- ;;
-+ 2.19)
-+ AC_MSG_RESULT(2.19 family)
-+ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
-+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ ;;
- darwin)
- AC_MSG_RESULT(Darwin)
- AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch b/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch
new file mode 100644
index 0000000000..fab4044d17
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch
@@ -0,0 +1,30 @@
+Backport of glibc 2.19 and 2.20 support.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 229ab98..1c18108 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -918,6 +918,20 @@ case "${GLIBC_VERSION}" in
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ AC_MSG_RESULT(2.19 family)
++ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
++ 2.20)
++ AC_MSG_RESULT(2.20 family)
++ AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
index 46dea60eb3..f84bf9ae9a 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
@@ -8,13 +8,13 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
-index 2a19f5b..ccdeb77 100644
---- a/none/tests/arm/Makefile.am
-+++ b/none/tests/arm/Makefile.am
-@@ -16,15 +16,16 @@ EXTRA_DIST = \
- vcvt_fixed_float_VFP.vgtest \
- vfp.stdout.exp vfp.stderr.exp vfp.vgtest
+Index: valgrind-3.10.0/none/tests/arm/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/arm/Makefile.am
++++ valgrind-3.10.0/none/tests/arm/Makefile.am
+@@ -17,15 +17,16 @@ EXTRA_DIST = \
+ vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
+ vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
+# For yocto:
+# Only include tests that don't require Thumb.
@@ -31,8 +31,8 @@ index 2a19f5b..ccdeb77 100644
- v6intThumb \
v6media \
vcvt_fixed_float_VFP \
- vfp
-@@ -34,32 +35,3 @@ AM_CXXFLAGS += @FLAG_M32@
+ vfp \
+@@ -36,34 +37,3 @@ AM_CXXFLAGS += @FLAG_M32@
AM_CCASFLAGS += @FLAG_M32@
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
@@ -65,3 +65,5 @@ index 2a19f5b..ccdeb77 100644
-intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+-
+-vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
index 2a14e1852c..1c640ffb71 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
@@ -36,10 +36,10 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
-index bd70eea..1436e8e 100644
---- a/memcheck/tests/ppc32/Makefile.am
-+++ b/memcheck/tests/ppc32/Makefile.am
+Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
@@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \
power_ISA2_05.stdout.exp_Without_FPPO
@@ -50,11 +50,11 @@ index bd70eea..1436e8e 100644
power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
-I$(top_srcdir)/include @FLAG_M32@
-diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am
-index 4f581b6..91ce7e7 100644
---- a/none/tests/ppc32/Makefile.am
-+++ b/none/tests/ppc32/Makefile.am
-@@ -50,16 +50,8 @@ check_PROGRAMS = \
+Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/none/tests/ppc32/Makefile.am
+@@ -52,16 +52,8 @@ check_PROGRAMS = \
allexec \
bug129390-ppc32 \
bug139050-ppc32 \
@@ -67,9 +67,9 @@ index 4f581b6..91ce7e7 100644
- test_isa_2_07_part1 \
- test_isa_2_07_part2 \
- test_tm \
-- test_touch_tm
+- test_touch_tm \
+ ldstrev lsw mftocrf mcrfs test_fx test_gx \
-+ twi tw xlc_dbl_u32 power6_bcmp
++ twi tw xlc_dbl_u32 power6_bcmp \
+ ldst_multiple \
+ data-cache-instructions
- AM_CFLAGS += @FLAG_M32@
- AM_CXXFLAGS += @FLAG_M32@
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest
index 7d0584ada9..f9a72ec4a9 100755
--- a/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
# run-ptest - 'ptest' test infrastructure shell script that
# wraps the valgrind regression script vg_regtest.
# Must be run in the /usr/lib/valgrind/ptest directory.
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
new file mode 100644
index 0000000000..07a272633e
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
@@ -0,0 +1,25 @@
+
+Upstream-Status: Inapporpiate [embedded config]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: valgrind-3.10.0/none/tests/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/Makefile.am
++++ valgrind-3.10.0/none/tests/Makefile.am
+@@ -280,7 +280,6 @@ threaded_fork_LDADD = -lpthread
+ threadederrno_LDADD = -lpthread
+ tls_SOURCES = tls.c tls2.c
+ tls_DEPENDENCIES = tls.so tls2.so
+-tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
+ tls_LDADD = tls.so tls2.so -lpthread
+ tls_so_SOURCES = tls_so.c
+ tls_so_DEPENDENCIES = tls2.so
+@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN
+ tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
+ tls_so_LDADD = `pwd`/tls2.so
+ else
+- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
++ tls_so_LDFLAGS = -shared -fPIC
+ tls_so_LDADD = tls2.so
+ endif
+ tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
index 3c6aa13364..a25922ae09 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
@@ -9,22 +9,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
X11DEPENDS = "virtual/libx11"
DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
-PR = "r8"
SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://sepbuildfix.patch \
- file://glibc-2.19.patch \
+ file://glibc-2.20.patch \
file://force-nostabs.patch \
file://remove-arm-variant-specific.patch \
file://remove-ppc-tests-failing-build.patch \
+ file://valgrind-remove-rpath.patch \
file://add-ptest.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2"
-SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0"
+SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"
+SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997"
COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
COMPATIBLE_HOST_armv7a = 'arm.*-linux'
@@ -48,7 +48,7 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " sed perl eglibc-utils"
+RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
do_compile_ptest() {
oe_runmake check
diff --git a/meta/recipes-devtools/xmlto/files/catalog.xml b/meta/recipes-devtools/xmlto/files/catalog.xml
new file mode 100644
index 0000000000..6b8833d871
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/files/catalog.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<delegateSystem systemIdStartString="http://docbook.org/xml/" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Norman Walsh//DTD CALS Table Model XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBk XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBook XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBk XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBk XML" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//Normal Walsh//Exchange Table Model 19960430" catalog="./docbook-xml.xml"/>
+<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/" catalog="./docbook-xml.xml"/>
+<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model" catalog="./docbook-xml.xml"/>
+<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="./docbook-xsl.xml"/>
+<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="./docbook-xsl.xml"/>
+</catalog>
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
new file mode 100644
index 0000000000..69ca43221c
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
@@ -0,0 +1,30 @@
+configure.in: drop the test of xmllint and xsltproc
+
+The test is unnecessary, the xmllint and xsltproc were explicitly
+added to RDEPENDS.
+
+Upstream-Status: oe-specific
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -42,10 +42,10 @@ AC_ARG_VAR([LOCALE], [Name and path of the `locale' program.])
+ AC_PATH_PROG([LOCALE], [locale], [locale])
+
+ AC_ARG_VAR([XMLLINT], [Name and path of the `xmllint' program.])
+-AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
++dnl AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
+
+ AC_ARG_VAR([XSLTPROC], [Name and path of the `xsltproc' program.])
+-AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
++dnl AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
+
+ dnl
+ dnl toolchains
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
new file mode 100644
index 0000000000..a7a01830ae
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
@@ -0,0 +1,38 @@
+SUMMARY = "A shell-script tool for converting XML files to various formats"
+HOMEPAGE = "https://fedorahosted.org/xmlto/"
+SECTION = "docs/xmlto"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+SRC_URI = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-${PV}.tar.gz \
+ file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
+ file://catalog.xml \
+"
+SRC_URI[md5sum] = "0cca8be787ba01e00c618cb390c988b9"
+SRC_URI[sha256sum] = "cfd8d2a26077be1d5566dfe22dd66099ae4f4600dea97d6e113a2cc5b8708977"
+
+inherit autotools
+
+# xmlto needs getopt/xmllint/xsltproc/bash at runtime
+RDEPENDS_${PN} = "docbook-xml-dtd4 \
+ docbook-xsl-stylesheets \
+ util-linux \
+ libxml2 \
+ bash \
+"
+RDEPENDS_${PN}_append_class-target = " \
+ libxslt-bin \
+"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF_append = " XMLLINT=xmllint XSLTPROC=xsltproc"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/xml/
+ install -m 755 ${WORKDIR}/catalog.xml ${D}${sysconfdir}/xml/catalog.xml
+ create_wrapper ${D}/${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+do_populate_sysroot[rdeptask] = "do_populate_sysroot"
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/at/atd.init
index eca379b3cd..eca379b3cd 100644
--- a/meta/recipes-extended/at/files/S99at
+++ b/meta/recipes-extended/at/at/atd.init
diff --git a/meta/recipes-extended/at/files/atd.service b/meta/recipes-extended/at/at/atd.service
index 6dc844504a..6dc844504a 100644
--- a/meta/recipes-extended/at/files/atd.service
+++ b/meta/recipes-extended/at/at/atd.service
diff --git a/meta/recipes-extended/at/files/configure-add-enable-pam.patch b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
index 1e5efef128..1e5efef128 100644
--- a/meta/recipes-extended/at/files/configure-add-enable-pam.patch
+++ b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
diff --git a/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
index d5ef0032be..d5ef0032be 100644
--- a/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch
+++ b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
diff --git a/meta/recipes-extended/at/files/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
index 66ff3e1c11..66ff3e1c11 100644
--- a/meta/recipes-extended/at/files/fix_parallel_build_error.patch
+++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
diff --git a/meta/recipes-extended/at/files/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch
index dfe76d7487..b5ceb9ae82 100644
--- a/meta/recipes-extended/at/files/pam.conf.patch
+++ b/meta/recipes-extended/at/at/pam.conf.patch
@@ -3,19 +3,25 @@ oe doesn't support "@include", use the concrete directive instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---- at-3.1.12/pam.conf.orig 2009-11-23 23:11:52.000000000 +0800
-+++ at-3.1.12/pam.conf 2011-07-15 11:14:04.132818950 +0800
-@@ -2,8 +2,8 @@
+Index: at-3.1.15/pam.conf
+===================================================================
+--- at-3.1.15.orig/pam.conf
++++ at-3.1.15/pam.conf
+@@ -1,10 +1,11 @@
+ #
# The PAM configuration file for the at daemon
#
-
--auth required pam_env.so
--@include common-auth
--@include common-account
--@include common-session-noninteractive
--session required pam_limits.so
++
+auth required pam_env.so
+auth include common-auth
+account include common-account
+session include common-session-noninteractive
+session required pam_limits.so
++session required pam_loginuid.so
+
+-auth required pam_env.so
+-@include common-auth
+-@include common-account
+-session required pam_loginuid.so
+-@include common-session-noninteractive
+-session required pam_limits.so
diff --git a/meta/recipes-extended/at/files/posixtm.c b/meta/recipes-extended/at/at/posixtm.c
index 5514ba4fe2..5514ba4fe2 100644
--- a/meta/recipes-extended/at/files/posixtm.c
+++ b/meta/recipes-extended/at/at/posixtm.c
diff --git a/meta/recipes-extended/at/files/posixtm.h b/meta/recipes-extended/at/at/posixtm.h
index e91749d736..e91749d736 100644
--- a/meta/recipes-extended/at/files/posixtm.h
+++ b/meta/recipes-extended/at/at/posixtm.h
diff --git a/meta/recipes-extended/at/at_3.1.14.bb b/meta/recipes-extended/at/at_3.1.16.bb
index 68a24b8cd0..f16edba5eb 100644
--- a/meta/recipes-extended/at/at_3.1.14.bb
+++ b/meta/recipes-extended/at/at_3.1.16.bb
@@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
DEPENDS = "flex flex-native \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
- ${VIRTUAL-RUNTIME_initscripts} \
"
PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
@@ -22,15 +20,15 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
file://posixtm.c \
file://posixtm.h \
file://file_replacement_with_gplv2.patch \
- file://S99at \
+ file://atd.init \
file://atd.service \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
PAM_SRC_URI = "file://pam.conf.patch \
file://configure-add-enable-pam.patch"
-SRC_URI[md5sum] = "d41cfd79033b6e49a8838add59a42ac6"
-SRC_URI[sha256sum] = "cd092bf05d29c25b286f55a960ce8b8c3c5beb571d86ed8eb1dfb3b61291b3ae"
+SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19"
+SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1"
EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-daemon_username=root \
@@ -39,7 +37,10 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-atspool=/var/spool/at/spool \
ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-inherit autotools-brokensep systemd
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE_${PN} = "atd.service"
@@ -53,9 +54,7 @@ do_install () {
oe_runmake -e "IROOT=${D}" install
install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/rcS.d
- install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
- ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
+ install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
# install systemd unit files
install -d ${D}${systemd_unitdir}/system
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 2fe0c6b574..0fd5af9797 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -4,10 +4,11 @@ SECTION = "base/shell"
DEPENDS = "ncurses bison-native"
-inherit autotools-brokensep gettext texinfo update-alternatives ptest
+inherit autotools gettext texinfo update-alternatives ptest
PARALLEL_MAKE = ""
+EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "--enable-job-control"
ALTERNATIVE_${PN} = "sh"
@@ -15,8 +16,6 @@ ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
ALTERNATIVE_PRIORITY = "100"
-export AUTOHEADER = "true"
-
RDEPENDS_${PN} += "base-files"
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-ptest += "make"
@@ -38,6 +37,10 @@ do_install_append () {
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
}
+do_install_append_class-target () {
+ # Clean host path in bashbug
+ sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
+}
do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
index fe04b28e7c..35e624bb8b 100644
--- a/meta/recipes-extended/bash/bash_3.2.48.bb
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -6,9 +6,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
PR = "r11"
SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch001 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
file://test-output.patch \
@@ -17,12 +23,21 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
-SRC_URI[patch001.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
-SRC_URI[patch001.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
-SRC_URI[patch002.md5sum] = "8443d4385d73ec835abe401d90591377"
-SRC_URI[patch002.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
-SRC_URI[patch003.md5sum] = "15c6653042e9814aa87120098fc7a849"
-SRC_URI[patch003.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
-
-SRC_URI[md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
-SRC_URI[sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
+SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
+SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
+SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377"
+SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
+SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849"
+SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
+SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1"
+SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61"
+SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46"
+SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e"
+SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6"
+SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359"
+SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05"
+SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a"
+SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a"
+SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4"
+SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913"
+SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0"
diff --git a/meta/recipes-extended/bash/bash_4.3.bb b/meta/recipes-extended/bash/bash_4.3.bb
index 25b7410c52..23d31976bb 100644
--- a/meta/recipes-extended/bash/bash_4.3.bb
+++ b/meta/recipes-extended/bash/bash_4.3.bb
@@ -1,10 +1,42 @@
require bash.inc
+PR = "r1"
+
# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-001;apply=yes;striplevel=0;name=patch001 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-002;apply=yes;striplevel=0;name=patch002 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-003;apply=yes;striplevel=0;name=patch003 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-004;apply=yes;striplevel=0;name=patch004 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-005;apply=yes;striplevel=0;name=patch005 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-006;apply=yes;striplevel=0;name=patch006 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-007;apply=yes;striplevel=0;name=patch007 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-008;apply=yes;striplevel=0;name=patch008 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-009;apply=yes;striplevel=0;name=patch009 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-010;apply=yes;striplevel=0;name=patch010 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-011;apply=yes;striplevel=0;name=patch011 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-012;apply=yes;striplevel=0;name=patch012 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-013;apply=yes;striplevel=0;name=patch013 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-014;apply=yes;striplevel=0;name=patch014 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-015;apply=yes;striplevel=0;name=patch015 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-016;apply=yes;striplevel=0;name=patch016 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-017;apply=yes;striplevel=0;name=patch017 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-018;apply=yes;striplevel=0;name=patch018 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-019;apply=yes;striplevel=0;name=patch019 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-020;apply=yes;striplevel=0;name=patch020 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-021;apply=yes;striplevel=0;name=patch021 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-022;apply=yes;striplevel=0;name=patch022 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-023;apply=yes;striplevel=0;name=patch023 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-024;apply=yes;striplevel=0;name=patch024 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-025;apply=yes;striplevel=0;name=patch025 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-026;apply=yes;striplevel=0;name=patch026 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-027;apply=yes;striplevel=0;name=patch027 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-028;apply=yes;striplevel=0;name=patch028 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-029;apply=yes;striplevel=0;name=patch029 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-030;apply=yes;striplevel=0;name=patch030 \
file://execute_cmd.patch;striplevel=0 \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
@@ -15,4 +47,65 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1"
SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4"
+SRC_URI[patch001.md5sum] = "1ab682b4e36afa4cf1b426aa7ac81c0d"
+SRC_URI[patch001.sha256sum] = "ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742"
+SRC_URI[patch002.md5sum] = "8fc22cf50ec85da00f6af3d66f7ddc1b"
+SRC_URI[patch002.sha256sum] = "eee7cd7062ab29a9e4f02924d9c367264dcb8b162703f74ff6eb8f175a91502b"
+SRC_URI[patch003.md5sum] = "a41728eca78858758e26b5dea64ae506"
+SRC_URI[patch003.sha256sum] = "000e6eac50cd9053ce0630db01239dcdead04a2c2c351c47e2b51dac1ac1087d"
+SRC_URI[patch004.md5sum] = "bf8d53d227829d67235927689a03cc7a"
+SRC_URI[patch004.sha256sum] = "5ea0a42c6506720d26e6d3c5c358e9a0d49f6f189d69a8ed34d5935964821338"
+SRC_URI[patch005.md5sum] = "c0c00935c8b8ffff76e8ab77e7be7d15"
+SRC_URI[patch005.sha256sum] = "1ac83044032b9f5f11aeca8a344ae3c524ec2156185d3adbb8ad3e7a165aa3fa"
+SRC_URI[patch006.md5sum] = "6f01e364cd092faa28dd7119f47ddb5f"
+SRC_URI[patch006.sha256sum] = "a0648ee72d15e4a90c8b77a5c6b19f8d89e28c1bc881657d22fe26825f040213"
+SRC_URI[patch007.md5sum] = "dcf471d222bcd83283d3094e6ceeb6f8"
+SRC_URI[patch007.sha256sum] = "1113e321c59cf6a8648a36245bbe4217cf8acf948d71e67886dad7d486f8f3a3"
+SRC_URI[patch008.md5sum] = "f7553416646dc26c266454c78a916d36"
+SRC_URI[patch008.sha256sum] = "9941a98a4987192cc5ce3d45afe879983cad2f0bec96d441a4edd9033767f95e"
+SRC_URI[patch009.md5sum] = "7e73d2151f4064b484a4ba2c4b09960e"
+SRC_URI[patch009.sha256sum] = "c0226d6728946b2f53cdebf090bcd1c01627f01fee03295768605caa80bb40a5"
+SRC_URI[patch010.md5sum] = "a275463d21735bb6d7161f9fbd320d8f"
+SRC_URI[patch010.sha256sum] = "ce05799c0137314c70c7b6ea0477c90e1ac1d52e113344be8e32fa5a55c9f0b7"
+SRC_URI[patch011.md5sum] = "c17103ee20420d77e46b224c8d3fceda"
+SRC_URI[patch011.sha256sum] = "7c63402cdbc004a210f6c1c527b63b13d8bb9ec9c5a43d5c464a9010ff6f7f3b"
+SRC_URI[patch012.md5sum] = "3e2a057a19d02b3f92a3a09eacbc03ae"
+SRC_URI[patch012.sha256sum] = "3e1379030b35fbcf314e9e7954538cf4b43be1507142b29efae39eef997b8c12"
+SRC_URI[patch013.md5sum] = "fb377143a996d4ff087a2771bc8332f9"
+SRC_URI[patch013.sha256sum] = "bfa8ca5336ab1f5ef988434a4bdedf71604aa8a3659636afa2ce7c7446c42c79"
+SRC_URI[patch014.md5sum] = "1a1aaecc99a9d0cbc310e8e247dcc8b6"
+SRC_URI[patch014.sha256sum] = "5a4d6fa2365b6eb725a9d4966248b5edf7630a4aeb3fa8d526b877972658ac13"
+SRC_URI[patch015.md5sum] = "4f04387458a3c1b4d460d199f49991a8"
+SRC_URI[patch015.sha256sum] = "13293e8a24e003a44d7fe928c6b1e07b444511bed2d9406407e006df28355e8d"
+SRC_URI[patch016.md5sum] = "90e759709720c4f877525bebc9d5dc06"
+SRC_URI[patch016.sha256sum] = "92d60bcf49f61bd7f1ccb9602bead6f2c9946d79dea0e5ec0589bb3bfa5e0773"
+SRC_URI[patch017.md5sum] = "11e4046e1b86070f6adbb7ffc89641be"
+SRC_URI[patch017.sha256sum] = "1267c25c6b5ba57042a7bb6c569a6de02ffd0d29530489a16666c3b8a23e7780"
+SRC_URI[patch018.md5sum] = "cd5a9b46f5bea0dc0248c93c7dfac011"
+SRC_URI[patch018.sha256sum] = "7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58"
+SRC_URI[patch019.md5sum] = "cff4dc024d9d3456888aaaf8a36ca774"
+SRC_URI[patch019.sha256sum] = "a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23"
+SRC_URI[patch020.md5sum] = "167839c5f147347f4a03d88ab97ff787"
+SRC_URI[patch020.sha256sum] = "ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98"
+SRC_URI[patch021.md5sum] = "1d350671c48dec30b34d8b81f09cd79d"
+SRC_URI[patch021.sha256sum] = "41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9"
+SRC_URI[patch022.md5sum] = "11c349af66a55481a3215ef2520bec36"
+SRC_URI[patch022.sha256sum] = "fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88"
+SRC_URI[patch023.md5sum] = "b3cb0d80fd0c47728264405cbb3b23c7"
+SRC_URI[patch023.sha256sum] = "9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4"
+SRC_URI[patch024.md5sum] = "b5ea5600942acceb4b6f07313d2de74e"
+SRC_URI[patch024.sha256sum] = "3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c"
+SRC_URI[patch025.md5sum] = "193c06f578d38ffdbaebae9c51a7551f"
+SRC_URI[patch025.sha256sum] = "1e5186f5c4a619bb134a1177d9e9de879f3bb85d9c5726832b03a762a2499251"
+SRC_URI[patch026.md5sum] = "922578e2be7ed03729454e92ee8d3f3a"
+SRC_URI[patch026.sha256sum] = "2ecc12201b3ba4273b63af4e9aad2305168cf9babf6d11152796db08724c214d"
+SRC_URI[patch027.md5sum] = "8ff6948b16f2db5c29b1b9ae1085bbe7"
+SRC_URI[patch027.sha256sum] = "1eb76ad28561d27f7403ff3c76a36e932928a4b58a01b868d663c165f076dabe"
+SRC_URI[patch028.md5sum] = "dd51fa67913b5dca45a702b672b3323f"
+SRC_URI[patch028.sha256sum] = "e8b0dbed4724fa7b9bd8ff77d12c7f03da0fbfc5f8251ef5cb8511eb082b469d"
+SRC_URI[patch029.md5sum] = "0729364c977ef4271e9f8dfafadacf67"
+SRC_URI[patch029.sha256sum] = "4cc4a397fe6bc63ecb97d030a4e44258ef2d4e076d0e90c77782968cc43d6292"
+SRC_URI[patch030.md5sum] = "efb709fdb1368945513de23ccbfae053"
+SRC_URI[patch030.sha256sum] = "85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a58385b"
+
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
index b116052c7d..d8c8a860f8 100644
--- a/meta/recipes-extended/bc/bc_1.06.bb
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
SECTION = "base"
DEPENDS = "flex"
-PR = "r2"
+PR = "r3"
SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
file://fix-segment-fault.patch "
@@ -18,7 +18,7 @@ SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
-inherit autotools-brokensep texinfo update-alternatives
+inherit autotools texinfo update-alternatives
ALTERNATIVE_${PN} = "dc"
ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/byacc/byacc_20140422.bb b/meta/recipes-extended/byacc/byacc_20141128.bb
index cf57738bea..15c14c9733 100644
--- a/meta/recipes-extended/byacc/byacc_20140422.bb
+++ b/meta/recipes-extended/byacc/byacc_20141128.bb
@@ -7,5 +7,5 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3"
require byacc.inc
-SRC_URI[md5sum] = "e7c13c5e207dc05eab9145cc9972397b"
-SRC_URI[sha256sum] = "2f104c7e200dd86844d5f3521e12cb55fc48a9c3da3480a65fde2ca8c053bdcc"
+SRC_URI[md5sum] = "acb0ff0fb6cc414a6b50c799794b2425"
+SRC_URI[sha256sum] = "f517fc21f08c1a1f010177357df58fc64eb1131011e5dcd48c19fe44c47198d0"
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
index 14b1d1809d..47ee576a8e 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ([2.57])
AC_INIT(bzip2, 2.0.5, , libXrender)
-AM_INIT_AUTOMAKE()
+AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE
#AM_CONFIG_HEADER(config.h)
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 9dd9e6a1f9..ed12277566 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -8,10 +8,10 @@ LICENSE = "bzip2"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
PR = "r5"
-SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
- file://configure.ac \
- file://run-ptest \
- file://Makefile.am"
+SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
+ file://configure.ac;subdir=${BP} \
+ file://Makefile.am;subdir=${BP} \
+ file://run-ptest"
SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
@@ -27,12 +27,6 @@ ALTERNATIVE_${PN} = "bunzip2 bzcat"
#install binaries to bzip2-native under sysroot for replacement-native
EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
-do_extraunpack () {
- cp ${WORKDIR}/configure.ac ${S}/
- cp ${WORKDIR}/Makefile.am ${S}/
-}
-
-addtask extraunpack after do_unpack before do_patch
do_install_ptest () {
cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
new file mode 100644
index 0000000000..89cd3cfa50
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
@@ -0,0 +1,220 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
+
+ * src/copyin.c (get_link_name): New function.
+ (list_file, copyin_link): use get_link_name
+
+ * tests/symlink-bad-length.at: New file.
+ * tests/symlink-long.at: New file.
+ * tests/Makefile.am: Add new files.
+ * tests/testsuite.at: Likewise.
+
+ See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
+
+diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c
+--- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800
+@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_
+ }
+
+
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++ off_t n = file_hdr->c_filesize + 1;
++ char *link_name;
++
++ if (n == 0 || n > SIZE_MAX)
++ {
++ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
++ link_name = NULL;
++ }
++ else
++ {
++ link_name = xmalloc (n);
++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++ link_name[file_hdr->c_filesize] = '\0';
++ tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ }
++ return link_name;
++}
++
++
+ static void
+ list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
+ {
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- char *link_name = NULL; /* Name of hard and symbolic links. */
+-
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- long_format (file_hdr, link_name);
+- free (link_name);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+- return;
++ char *link_name = get_link_name (file_hdr, in_file_des);
++ if (link_name)
++ {
++ long_format (file_hdr, link_name);
++ free (link_name);
++ }
+ }
+ else
+- {
+ long_format (file_hdr, file_hdr->c_tar_linkname);
+- return;
+- }
++ return;
+ }
+ else
+ #endif
+@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_
+
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ link_name = get_link_name (file_hdr, in_file_des);
+ }
+ else
+ {
+diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am
+--- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800
+@@ -52,6 +52,8 @@ TESTSUITE_AT = \
+ setstat04.at\
+ setstat05.at\
+ symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+ version.at
+
+ TESTSUITE = $(srcdir)/testsuite
+diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
+--- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800
+@@ -0,0 +1,49 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++cpio -ntv < ARCHIVE
++test $? -eq 2
++],
++[0],
++[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
++],[cpio: LINK: stored filename length too big
++cpio: premature end of file
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
+--- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++ dirname="xxxxxxxxx/$dirname"
++ mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at
+--- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800
+@@ -31,6 +31,8 @@ m4_include([version.at])
+
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
+ m4_include([interdir.at])
+
+ m4_include([setstat01.at])
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
new file mode 100644
index 0000000000..0148e70797
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
@@ -0,0 +1,217 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
+
+ * src/copyin.c (get_link_name): New function.
+ (list_file, copyin_link): use get_link_name
+
+ * tests/symlink-bad-length.at: New file.
+ * tests/symlink-long.at: New file.
+ * tests/Makefile.am: Add new files.
+ * tests/testsuite.at: Likewise.
+
+ See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
+
+diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c
+--- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800
++++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800
+@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int
+ }
+
+
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++ off_t n = file_hdr->c_filesize + 1;
++ char *link_name;
++
++ if (n == 0 || n > SIZE_MAX)
++ {
++ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
++ link_name = NULL;
++ }
++ else
++ {
++ link_name = xmalloc (n);
++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++ link_name[file_hdr->c_filesize] = '\0';
++ tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ }
++ return link_name;
++}
++
++
+ static void
+ list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
+ {
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- char *link_name = NULL; /* Name of hard and symbolic links. */
+-
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- long_format (file_hdr, link_name);
+- free (link_name);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+- return;
++ char *link_name = get_link_name (file_hdr, in_file_des);
++ if (link_name)
++ {
++ long_format (file_hdr, link_name);
++ free (link_name);
++ }
+ }
+ else
+- {
+ long_format (file_hdr, file_hdr->c_tar_linkname);
+- return;
+- }
++ return;
+ }
+ else
+ #endif
+@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_
+
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ link_name = get_link_name (file_hdr, in_file_des);
+ }
+ else
+ {
+diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am
+--- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800
++++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800
+@@ -45,6 +45,8 @@ TESTSUITE_AT = \
+ testsuite.at\
+ inout.at\
+ symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+ version.at
+
+ TESTSUITE = $(srcdir)/testsuite
+diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at
+--- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800
+@@ -0,0 +1,49 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++cpio -ntv < ARCHIVE
++test $? -eq 2
++],
++[0],
++[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
++],[cpio: LINK: stored filename length too big
++cpio: premature end of file
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at
+--- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++ dirname="xxxxxxxxx/$dirname"
++ mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at
+--- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800
++++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800
+@@ -31,3 +31,5 @@ m4_include([version.at])
+
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
index 5f88b30f1e..c42db6f352 100644
--- a/meta/recipes-extended/cpio/cpio_2.11.bb
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -3,9 +3,10 @@ include cpio_v2.inc
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-PR = "r4"
+PR = "r5"
SRC_URI += "file://remove-gets.patch \
+ file://fix-memory-overrun.patch \
"
SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
index b6da207b92..3f97dbe2ce 100644
--- a/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -3,11 +3,12 @@ require cpio_v2.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
-PR = "r3"
+PR = "r4"
SRC_URI += "file://m4extensions.patch \
- file://avoid_heap_overflow.patch \
- "
+ file://avoid_heap_overflow.patch \
+ file://fix-memory-overrun.patch \
+ "
SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb b/meta/recipes-extended/cracklib/cracklib_2.9.2.bb
index d70e76f43f..177ab27a2b 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.9.2.bb
@@ -13,13 +13,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
file://0002-craklib-fix-testnum-and-teststr-failed.patch"
-SRC_URI[md5sum] = "90536219c520add2ceb3c26f0d7da404"
-SRC_URI[sha256sum] = "408905c2539a97dc8cbbb6d7cd2046cb5647a345b4bda399220d9471be16d156"
+SRC_URI[md5sum] = "559072fdfc095cdb763c4de3471a889e"
+SRC_URI[sha256sum] = "c1c899291d443e99d1aecfbc879e4ac9c0cbc265574f47b487842da11e9759f5"
-inherit autotools-brokensep gettext
+PR = "r1"
-BBCLASSEXTEND = "native"
+inherit autotools gettext
do_install_append_class-target() {
create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab
index cc9169eda9..22c4feb2dc 100644
--- a/meta/recipes-extended/cronie/cronie/crontab
+++ b/meta/recipes-extended/cronie/cronie/crontab
@@ -7,4 +7,8 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-# m h dom mon dow user command
+# m h dom mon dow user command
+# 1 * * * * root cd / && run-parts /etc/cron.hourly
+# 30 7 * * * root cd / && run-parts /etc/cron.daily
+# 42 7 * * 7 root cd / && run-parts /etc/cron.weekly
+# 55 7 1 * * root cd / && run-parts /etc/cron.monthly
diff --git a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
deleted file mode 100644
index 7384a0bad4..0000000000
--- a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-For an out of tree build, the cronie-common.h file was not being
-found correctly, so point it to the top_srcdir
-
-Upstream-Status: Submitted
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: cronie-1.4.11/anacron/Makefile.am
-===================================================================
---- cronie-1.4.11.orig/anacron/Makefile.am
-+++ cronie-1.4.11/anacron/Makefile.am
-@@ -9,6 +9,7 @@ common_nodist = anacron-paths.h
- nodist_anacron_SOURCES = $(common_nodist)
- BUILT_SOURCES = $(common_nodist)
-
-+AM_CFLAGS = -I$(top_srcdir)
-
- LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
-
-Index: cronie-1.4.11/src/Makefile.am
-===================================================================
---- cronie-1.4.11.orig/src/Makefile.am
-+++ cronie-1.4.11/src/Makefile.am
-@@ -15,6 +15,7 @@ nodist_crond_SOURCES = $(common_nodist)
- nodist_crontab_SOURCES = $(common_nodist)
- BUILT_SOURCES = $(common_nodist)
-
-+AM_CFLAGS = -I$(top_srcdir)
-
- LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
-
diff --git a/meta/recipes-extended/cronie/cronie_1.4.11.bb b/meta/recipes-extended/cronie/cronie_1.4.12.bb
index 02234f6a36..977332b3fc 100644
--- a/meta/recipes-extended/cronie/cronie_1.4.11.bb
+++ b/meta/recipes-extended/cronie/cronie_1.4.12.bb
@@ -7,16 +7,14 @@ HOMEPAGE = "https://fedorahosted.org/cronie/"
BUGTRACKER = "mmaslano@redhat.com"
# Internet Systems Consortium License
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
+LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
SECTION = "utils"
-
SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
- file://fix-out-of-tree-build.patch \
file://crond.init \
file://crontab \
file://crond.service \
@@ -25,18 +23,16 @@ SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
PAM_SRC_URI = "file://crond_pam_config.patch"
PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
-SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f"
-SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be"
+SRC_URI[md5sum] = "199db91e514a4d75e3222d69874b132f"
+SRC_URI[sha256sum] = "0f5c9bf32f352599451c4ca0d6bc076d19e73ecfa5a90b34ecfe47c918c8bafd"
inherit autotools update-rc.d useradd systemd
-
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
-
INITSCRIPT_NAME = "crond"
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
@@ -67,7 +63,7 @@ do_install_append () {
mkdir -p ${D}${sysconfdir}/cron.weekly
mkdir -p ${D}${sysconfdir}/cron.monthly
touch ${D}${sysconfdir}/cron.deny
-
+
# below setting is necessary to allow normal user using crontab
# setgid for crontab binary
@@ -82,4 +78,4 @@ do_install_append () {
}
FILES_${PN} += "${sysconfdir}/cron*"
-
+CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index c083501de2..cfcd19c0f1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -2,19 +2,27 @@ SUMMARY = "An Internet printing system for Unix"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2"
DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
-PROVIDES = "cups14"
SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
- file://cups-no-gcrypt.patch \
- file://cups-str4402.patch \
+ file://cups.socket \
+ file://cups.path \
+ file://cups.service \
+ file://0001-test-ippserver.c-check-avahi-before-use.patch \
"
LEAD_SONAME = "libcupsdriver.so"
-inherit autotools-brokensep binconfig
+CLEANBROKEN = "1"
+
+inherit autotools-brokensep binconfig useradd systemd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system lpadmin"
+
+SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
@@ -26,7 +34,6 @@ EXTRA_OECONF = " \
--enable-gnutls \
--enable-dbus \
--enable-browsing \
- --disable-openssl \
--disable-gssapi \
--enable-debug \
--disable-relro \
@@ -41,6 +48,7 @@ EXTRA_OECONF = " \
do_configure() {
gnu-configize
libtoolize --force
+ autoconf --force
DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
}
@@ -63,12 +71,25 @@ do_compile () {
"-I."
}
-fakeroot do_install () {
+do_install () {
oe_runmake "DSTROOT=${D}" install
# Remove /var/run from package as cupsd will populate it on startup
rm -fr ${D}/${localstatedir}/run
rmdir ${D}/${libdir}/${BPN}/driver
+
+ # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
+ rm -rf ${D}${sysconfdir}/init.d/
+ rm -rf ${D}${sysconfdir}/rc*
+ fi
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
}
python do_package_append() {
@@ -80,6 +101,7 @@ python do_package_append() {
PACKAGES =+ "${PN}-lib ${PN}-libimage"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
FILES_${PN} += "${libdir}/cups/backend \
${libdir}/cups/cgi-bin \
${libdir}/cups/filter \
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
index e6544b5607..5379eb6aa2 100644
--- a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
+++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -10,13 +10,13 @@ Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
ppdc/Makefile | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
-diff --git a/ppdc/Makefile b/ppdc/Makefile
-index 0288d47..fc87f1b 100644
---- a/ppdc/Makefile
-+++ b/ppdc/Makefile
-@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
+Index: cups-2.0.0/ppdc/Makefile
+===================================================================
+--- cups-2.0.0.orig/ppdc/Makefile
++++ cups-2.0.0/ppdc/Makefile
+@@ -242,8 +242,8 @@ genstrings: genstrings.o libcupsppdc.a
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
- libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
+ libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
- echo Generating localization strings...
- ./genstrings >sample.c
@@ -25,9 +25,9 @@ index 0288d47..fc87f1b 100644
#
-@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
+@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
- ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD compiler...
- ./ppdc-static -l en,fr -I ../data foo.drv
@@ -38,24 +38,26 @@ index 0288d47..fc87f1b 100644
#
-@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
- ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD importer...
+- echo Testing PPD importer...
- $(RM) -r ppd ppd2 sample-import.drv
-- ./ppdc-static -I ../data sample.drv
+- ./ppdc-static -l en -I ../data sample.drv
- ./ppdi-static -I ../data -o sample-import.drv ppd/*
-- ./ppdc-static -I ../data -d ppd2 sample-import.drv
+- ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
- if diff -r ppd ppd2 >/dev/null; then \
- echo PPD import OK; \
- else \
- echo PPD import FAILED; \
- exit 1; \
- fi
++# echo Testing PPD importer...
+# $(RM) -r ppd ppd2 sample-import.drv
-+# ./ppdc-static -I ../data sample.drv
++# ./ppdc-static -l en -I ../data sample.drv
+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
-+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
++# ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
+# if diff -r ppd ppd2 >/dev/null; then \
+# echo PPD import OK; \
+# else \
@@ -65,6 +67,3 @@ index 0288d47..fc87f1b 100644
#
---
-1.6.6.1
-
diff --git a/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
new file mode 100644
index 0000000000..4bcff69b77
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
@@ -0,0 +1,34 @@
+From fba92768324e76fa60d9c5f709e045bd4f7aee89 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 3 Jan 2015 05:56:24 +0000
+Subject: [PATCH] test/ippserver.c: check avahi before use it
+
+Fixed the error when --disable-avahi:
+ippserver.c:425:8: error: unknown type name 'AvahiThreadedPoll'
+
+The avahi is optional, we need check whether it is enabled before use as
+other code does.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ test/ippserver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/ippserver.c b/test/ippserver.c
+index c785e5f..26c8a66 100644
+--- a/test/ippserver.c
++++ b/test/ippserver.c
+@@ -421,7 +421,7 @@ static int valid_job_attributes(_ipp_client_t *client);
+
+ # ifdef HAVE_DNSSD
+ static DNSServiceRef DNSSDMaster = NULL;
+-# else /* HAVE_AVAHI */
++# elif defined(HAVE_AVAHI) /* HAVE_AVAHI */
+ static AvahiThreadedPoll *DNSSDMaster = NULL;
+ static AvahiClient *DNSSDClient = NULL;
+ # endif /* HAVE_DNSSD */
+--
+2.0.1
+
diff --git a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch
deleted file mode 100644
index 8bbcf39497..0000000000
--- a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Description: Don't build-depend on libgcrypt, as nothing is used from it
-Author: Didier Raboud <odyx@debian.org>
-Bug-Debian: https://bugs.debian.org/638416
-Bug: http://www.cups.org/str.php?L????
-
-[CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399
-
-Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
-
-Upstream-Status: Backport
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Last-Update: 2014-04-07
---- a/config-scripts/cups-ssl.m4
-+++ b/config-scripts/cups-ssl.m4
-@@ -66,7 +66,6 @@
- dnl Then look for GNU TLS...
- if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
- AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
-- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
- if $PKGCONFIG --exists gnutls; then
- have_ssl=1
- SSLLIBS=`$PKGCONFIG --libs gnutls`
-@@ -84,14 +83,6 @@
- if test $have_ssl = 1; then
- CUPS_SERVERCERT="ssl/server.crt"
- CUPS_SERVERKEY="ssl/server.key"
--
-- if $PKGCONFIG --exists gcrypt; then
-- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
-- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
-- elif test "x$LIBGCRYPTCONFIG" != x; then
-- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
-- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
-- fi
- fi
- fi
-
---- a/cups/http-private.h
-+++ b/cups/http-private.h
-@@ -80,7 +80,6 @@
- # elif defined HAVE_GNUTLS
- # include <gnutls/gnutls.h>
- # include <gnutls/x509.h>
--# include <gcrypt.h>
- # elif defined(HAVE_CDSASSL)
- # include <CoreFoundation/CoreFoundation.h>
- # include <Security/Security.h>
diff --git a/meta/recipes-extended/cups/cups/cups-str4402.patch b/meta/recipes-extended/cups/cups/cups-str4402.patch
deleted file mode 100644
index 69d349cab1..0000000000
--- a/meta/recipes-extended/cups/cups/cups-str4402.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-Upstream CUPS issue when building with out dnssd/avahi
-
-https://www.cups.org/str.php?L4408+P-1+S-2+C0+I0+E0+Q
-
-Upstream-Status: Backport [STR #4402]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
---- a/scheduler/dirsvc.c 2014-03-05 13:11:32.000000000 -0800
-+++ b/shceduler/dirsvc.c 2014-05-19 11:33:51.743124614 -0700
-@@ -50,6 +50,9 @@
- static void update_lpd(int onoff);
- static void update_smb(int onoff);
-
-+static void deregister_all_printers(int from_callback);
-+static void register_all_printers(int from_callback);
-+
-
- #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
- # ifdef __APPLE__
-@@ -60,12 +63,10 @@
- # ifdef HAVE_AVAHI
- static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata);
- # endif /* HAVE_AVAHI */
--static void dnssdDeregisterAllPrinters(int from_callback);
- static void dnssdDeregisterInstance(cupsd_srv_t *srv, int from_callback);
- static void dnssdDeregisterPrinter(cupsd_printer_t *p, int clear_name, int from_callback);
- static const char *dnssdErrorString(int error);
- static void dnssdFreeTxtRecord(cupsd_txt_t *txt);
--static void dnssdRegisterAllPrinters(int from_callback);
- # ifdef HAVE_DNSSD
- static void dnssdRegisterCallback(DNSServiceRef sdRef,
- DNSServiceFlags flags,
-@@ -241,7 +242,7 @@
- * Register the individual printers
- */
-
-- dnssdRegisterAllPrinters(0);
-+ register_all_printers(0);
- }
-
-
-@@ -259,7 +260,7 @@
- * De-register the individual printers
- */
-
-- dnssdDeregisterAllPrinters(0);
-+ deregister_all_printers(0);
-
- /*
- * Shut down browsing sockets...
-@@ -579,7 +580,7 @@
- * Register the individual printers
- */
-
-- dnssdRegisterAllPrinters(1);
-+ register_all_printers(1);
- break;
-
- case AVAHI_CLIENT_FAILURE:
-@@ -591,7 +592,7 @@
- * Unregister everything and close the client...
- */
-
-- dnssdDeregisterAllPrinters(1);
-+ deregister_all_printers(1);
- dnssdDeregisterInstance(&WebIFSrv, 1);
- avahi_client_free(DNSSDClient);
- DNSSDClient = NULL;
-@@ -631,28 +632,6 @@
-
-
- /*
-- * 'dnssdDeregisterAllPrinters()' - Deregister all printers.
-- */
--
--static void
--dnssdDeregisterAllPrinters(
-- int from_callback) /* I - Deregistering because of callback? */
--{
-- cupsd_printer_t *p; /* Current printer */
--
--
-- if (!DNSSDMaster)
-- return;
--
-- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-- p;
-- p = (cupsd_printer_t *)cupsArrayNext(Printers))
-- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-- dnssdDeregisterPrinter(p, 1, from_callback);
--}
--
--
--/*
- * 'dnssdDeregisterInstance()' - Deregister a DNS-SD service instance.
- */
-
-@@ -858,27 +837,6 @@
-
-
- /*
-- * 'dnssdRegisterAllPrinters()' - Register all printers.
-- */
--
--static void
--dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */
--{
-- cupsd_printer_t *p; /* Current printer */
--
--
-- if (!DNSSDMaster)
-- return;
--
-- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-- p;
-- p = (cupsd_printer_t *)cupsArrayNext(Printers))
-- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-- dnssdRegisterPrinter(p, from_callback);
--}
--
--
--/*
- * 'dnssdRegisterCallback()' - DNSServiceRegister callback.
- */
-
-@@ -1813,6 +1771,61 @@
- }
-
-
-+/*
-+ * 'deregister_all_printers()' - Deregister all printers.
-+ */
-+
-+static void
-+deregister_all_printers(
-+ int from_callback) /* I - Deregistering because of callback? */
-+{
-+ cupsd_printer_t *p; /* Current printer */
-+
-+
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ if (!DNSSDMaster)
-+ return;
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+
-+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-+ p;
-+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
-+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ dnssdDeregisterPrinter(p, 1, from_callback);
-+#else
-+ cupsdDeregisterPrinter(p, 1);
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+}
-+
-+
-+/*
-+ * 'register_all_printers()' - Register all printers.
-+ */
-+
-+static void
-+register_all_printers(int from_callback) /* I - Called from callback? */
-+{
-+ cupsd_printer_t *p; /* Current printer */
-+
-+
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ if (!DNSSDMaster)
-+ return;
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+
-+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-+ p;
-+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
-+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ dnssdRegisterPrinter(p, from_callback);
-+#else
-+ cupsdRegisterPrinter(p);
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+}
-+
-+
- /*
- * End of "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $".
- */
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
new file mode 100644
index 0000000000..de8cc57c27
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
+
+[Path]
+PathExistsGlob=/var/spool/cups/d*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
new file mode 100644
index 0000000000..7d3e839867
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@SBINDIR@/cupsd -f
+PrivateTmp=true
+
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
new file mode 100644
index 0000000000..33148705d6
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printing Service Sockets
+
+[Socket]
+ListenStream=/var/run/cups/cups.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/cups/cups_1.7.3.bb b/meta/recipes-extended/cups/cups_1.7.3.bb
deleted file mode 100644
index 2175ba71a2..0000000000
--- a/meta/recipes-extended/cups/cups_1.7.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"
-
-SRC_URI[md5sum] = "d498c3020acda0904ab0c13b6389a1ec"
-SRC_URI[sha256sum] = "fa989f856d1499169dc442fb2311053ea42fe455ca2721693ba5a9fe4b333e31"
diff --git a/meta/recipes-extended/cups/cups_2.0.1.bb b/meta/recipes-extended/cups/cups_2.0.1.bb
new file mode 100644
index 0000000000..c78b44d71f
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.0.1.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "7f7c33071035fb20d0879929a42da711"
+SRC_URI[sha256sum] = "60f7f2cca69f3b761a029fb314ee4299e3ea0fc02350f06d192cf31d58215525"
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
index ee4b8900bb..43ea3ce382 100644
--- a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
+++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
@@ -1,15 +1,17 @@
SUMMARY = "Collection of autoconf m4 macros"
SECTION = "base"
-HOMEPAGE = "http://cwautomacros.berlios.de/"
+HOMEPAGE = "http://sourceforge.net/projects/cwautomacros.berlios/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
-SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2"
-
-
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}.berlios/${BP}.tar.bz2"
SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
+do_configure() {
+ :
+}
+
do_install() {
oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb
index a467f20aa4..b708962447 100644
--- a/meta/recipes-extended/diffutils/diffutils_3.3.bb
+++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb
@@ -7,6 +7,8 @@ SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
file://run-ptest \
"
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
do_configure_prepend () {
# Need to remove gettext macros with weird mix of versions
for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
diff --git a/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch
new file mode 100644
index 0000000000..bb96a18d82
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch
@@ -0,0 +1,50 @@
+Fix build with musl by using correct uint type names.
+
+This patch is taken from Sabotage Linux, the license statement for patches and
+build scripts in Sabotage Linux says:
+
+ To the extent possible under law, Christian Neukirchen has waived
+ all copyright and related or neighboring rights to this work.
+
+ http://creativecommons.org/publicdomain/zero/1.0/
+
+Therefore this should be good to include in OpenEmbedded.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Pending
+
+diff -u ethtool-3.14.org/internal.h ethtool-3.14/internal.h
+--- ethtool-3.14.org/internal.h
++++ ethtool-3.14/internal.h
+@@ -7,6 +7,7 @@
+ #include "ethtool-config.h"
+ #endif
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -17,16 +18,16 @@
+
+ /* ethtool.h expects these to be defined by <linux/types.h> */
+ #ifndef HAVE_BE_TYPES
+-typedef __uint16_t __be16;
+-typedef __uint32_t __be32;
++typedef uint16_t __be16;
++typedef uint32_t __be32;
+ typedef unsigned long long __be64;
+ #endif
+
+ typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
+-typedef __int32_t s32;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
++typedef int32_t s32;
+
+ #include "ethtool-copy.h"
+ #include "net_tstamp-copy.h"
diff --git a/meta/recipes-extended/ethtool/ethtool_3.14.bb b/meta/recipes-extended/ethtool/ethtool_3.16.bb
index 49c79b68d7..92a0704800 100644
--- a/meta/recipes-extended/ethtool/ethtool_3.14.bb
+++ b/meta/recipes-extended/ethtool/ethtool_3.16.bb
@@ -9,10 +9,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
file://run-ptest \
file://avoid_parallel_tests.patch \
+ file://ethtool-uint.patch \
"
-SRC_URI[md5sum] = "997e20c25c43ad5800f8ae3204455a8a"
-SRC_URI[sha256sum] = "b1a988d6e397bd9d5d73cfd64329f85121936a050174bbfe90f8701fd893a1df"
+SRC_URI[md5sum] = "3806bae34c153e2b9e2859e85c54788d"
+SRC_URI[sha256sum] = "a6f1433824af7b390ed4e66dfc7cee047d6d1f56dbb8ceef9fe905d63aef5275"
inherit autotools ptest
RDEPENDS_${PN}-ptest += "make"
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
deleted file mode 100644
index 69c1486cf7..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
+++ /dev/null
@@ -1,781 +0,0 @@
-Upstream-Status: Backport
-
-commit af974034b68bf59337c7a384e488a518a77dfecd
-Author: James Youngman <jay@gnu.org>
-Date: Sat Jul 11 19:55:27 2009 +0100
-
- Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
-
- Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
- coredumps.
- * find/tree.c (set_new_parent): Initialise struct
- predicate->arg_text to NULL (instead of leaving it uninitialised).
- (get_new_pred_noarg): Likewise.
- (get_new_pred): Initialise predicate->arg_text to
- "ThisShouldBeSetToSomethingElse" to make it easier to notice
- bugs.
- (get_new_pred_chk_op): Use get_new_pred_noarg.
- (print_predicate): Use an if statement instead of
- two ternary operators.
- * find/util.c (insert_primary_withpred): Accept new argument, arg,
- being the argument (if any) of this predicate. Pass it to
- get_new_pred_chk_op.
- (insert_primary): Likewise (pass arg to insert_primary_withpred).
- (insert_primary_noarg): New function; calls insert_primary with
- arg=NULL.
- * find/parser.c (collect_arg_stat_info): Add an output parameter;
- the filename from which we collected the stat information.
- (parse_closeparen, parse_delete, parse_and, parse_or,
- parse_comma): Use get_new_pred_noarg.
- (parse_cnewer, parse_newer, parse_anewer): Use new
- collect_arg_stat_info and insert_primary interface.
- (parse_print, parse_prune, parse_nouser, parse_empty): Use
- insert_primary_noarg.
- (parse_accesscheck, parse_false): Use insert_primary_noarg.
- (parse_used, parse_iname, parse_fprint, insert_fprint,
- parse_fstype, parse_ilname): Use new collect_arg and
- insert_primary interfaces.
- (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
- parse_perm, parse_size, parse_user, parse_time): Use new
- collect_arg and insert_primary_withpred interface.
- (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
- (parse_newerXY, parse_nogroup): Use new insert_primary interface.
- (insert_regex, parse_samefile): Use new insert_primary_withpred
- interface.
- (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
- new insert_primary_withpred interface.
- * find/defs.h (struct predicate.arg_text): make const.
- Add declarations for new function get_new_pred_noarg and
- insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
- and insert_primary_withpred.
-
-diff --git a/ChangeLog b/ChangeLog
-index 6e346b8..e8ba0f8 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,0 +1,45 @@
-+2009-07-11 James Youngman <jay@gnu.org>
-+
-+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
-+ coredumps.
-+ * find/tree.c (set_new_parent): Initialise struct
-+ predicate->arg_text to NULL (instead of leaving it uninitialised).
-+ (get_new_pred_noarg): Likewise.
-+ (get_new_pred): Initialise predicate->arg_text to
-+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
-+ bugs.
-+ (get_new_pred_chk_op): Use get_new_pred_noarg.
-+ (print_predicate): Use an if statement instead of
-+ two ternary operators.
-+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
-+ being the argument (if any) of this predicate. Pass it to
-+ get_new_pred_chk_op.
-+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
-+ (insert_primary_noarg): New function; calls insert_primary with
-+ arg=NULL.
-+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
-+ the filename from which we collected the stat information.
-+ (parse_closeparen, parse_delete, parse_and, parse_or,
-+ parse_comma): Use get_new_pred_noarg.
-+ (parse_cnewer, parse_newer, parse_anewer): Use new
-+ collect_arg_stat_info and insert_primary interface.
-+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
-+ insert_primary_noarg.
-+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
-+ (parse_used, parse_iname, parse_fprint, insert_fprint,
-+ parse_fstype, parse_ilname): Use new collect_arg and
-+ insert_primary interfaces.
-+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
-+ parse_perm, parse_size, parse_user, parse_time): Use new
-+ collect_arg and insert_primary_withpred interface.
-+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
-+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
-+ (insert_regex, parse_samefile): Use new insert_primary_withpred
-+ interface.
-+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
-+ new insert_primary_withpred interface.
-+ * find/defs.h (struct predicate.arg_text): make const.
-+ Add declarations for new function get_new_pred_noarg and
-+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
-+ and insert_primary_withpred.
-+
-diff --git a/find/defs.h b/find/defs.h
-index 1708d83..4539fd9 100644
---- a/find/defs.h
-+++ b/find/defs.h
-@@ -297,7 +297,7 @@ struct predicate
- boolean artificial;
-
- /* The raw text of the argument of this predicate. */
-- char *arg_text;
-+ const char *arg_text;
-
- /* Information needed by the predicate processor.
- Next to each member are listed the predicates that use it. */
-@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
- /* tree.c */
- struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
- struct predicate * get_eval_tree PARAMS((void));
-+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
- struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
--struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
-+struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
-+ const char *arg));
- float calculate_derived_rates PARAMS((struct predicate *p));
-
- /* util.c */
--struct predicate *insert_primary PARAMS((const struct parser_table *entry));
--struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
-+struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
-+struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
-+struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
- void usage PARAMS((FILE *fp, int status, char *msg));
- extern boolean check_nofollow(void);
- void complete_pending_execs(struct predicate *p);
-diff --git a/find/parser.c b/find/parser.c
-index 534b670..2e6b989 100644
---- a/find/parser.c
-+++ b/find/parser.c
-@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
- }
-
- static boolean
--collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
-+collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
-+ const char **argument)
- {
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
- {
-+ *argument = filename;
- if (0 == (options.xstat)(filename, p))
- {
- return true;
-@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
- }
- else
- {
-+ *argument = NULL;
- return false;
- }
- }
-@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_and;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = AND_PREC;
-@@ -691,11 +694,12 @@ static boolean
- parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.xval = XVAL_ATIME;
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.kind = COMP_GT;
-@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_closeparen;
- our_pred->p_type = CLOSE_PAREN;
- our_pred->p_prec = NO_PREC;
-@@ -725,11 +729,12 @@ static boolean
- parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.kind = COMP_GT;
-@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_comma;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = COMMA_PREC;
-@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->side_effects = our_pred->no_default_print = true;
- /* -delete implies -depth */
- options.do_dir_first = false;
-@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
- return true;
- }
-@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->side_effects = our_pred->no_default_print = false;
- our_pred->est_success_rate = 0.0f;
-@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- insert_fls (const struct parser_table* entry, const char *filename)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary_noarg (entry);
- if (filename)
- open_output_file (filename, &our_pred->args.printf_vec);
- else
-@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, filename);
- open_output_file (filename, &our_pred->args.printf_vec);
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->need_stat = our_pred->need_type = false;
-@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- insert_fprint(const struct parser_table* entry, const char *filename)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, filename);
- if (filename)
- open_output_file (filename, &our_pred->args.printf_vec);
- else
-@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *typename;
- if (collect_arg(argv, arg_ptr, &typename))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, typename);
- our_pred->args.str = typename;
-
- /* This is an expensive operation, so although there are
-@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- return false;
- }
- }
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, groupname);
- our_pred->args.gid = gid;
- our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
- return true;
-@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *name;
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->args.str = name;
- /* Use the generic glob pattern estimator to figure out how many
- * links will match, but bear in mind that most files won't be links.
-@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- if (check_name_arg("-iname", name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
-@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck ();
- if (collect_arg (argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
-@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck();
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->args.str = name;
- our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
- return true;
-@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
- "arithmetic overflow while converting %s "
- "minutes to a number of seconds"))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, minutes);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
- return true;
-@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck();
- if (check_name_arg("-name", name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
-@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) &argv;
- (void) &arg_ptr;
-
-- our_pred = get_new_pred_chk_op (entry);
-+ our_pred = get_new_pred_chk_op (entry, NULL);
- our_pred->pred_func = pred_negate;
- our_pred->p_type = UNI_OP;
- our_pred->p_prec = NEGATE_PREC;
-@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct predicate *our_pred;
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.xval = XVAL_MTIME;
- our_pred->args.reftime.kind = COMP_GT;
-@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
- (*arg_ptr)++;
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, argv[*arg_ptr]);
-
-
- switch (x)
-@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) &argv;
- (void) &arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, NULL);
- our_pred->est_success_rate = 1e-4;
- #ifdef CACHE_IDS
- if (gid_unused == NULL)
-@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) arg_ptr;
-
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->est_success_rate = 1e-3;
- #ifdef CACHE_IDS
- if (uid_unused == NULL)
-@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred_chk_op (entry);
-+ our_pred = get_new_pred_chk_op (entry, NULL);
- our_pred->pred_func = pred_openparen;
- our_pred->p_type = OPEN_PAREN;
- our_pred->p_prec = NO_PREC;
-@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_or;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = OR_PREC;
-@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *name;
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
-@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
- rate = 0.9986; /* probably matches anything but a broken symlink */
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, perm_expr);
- our_pred->est_success_rate = rate;
- if (havekind)
- {
-@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- /* -print has the side effect of printing. This prevents us
- from doing undesired multiple printing when the user has
- already specified -print. */
-@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- if (options.do_dir_first == false)
- our_pred->need_stat = our_pred->need_type = false;
- /* -prune has a side effect that it does not descend into
-@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary_noarg (entry);
- (void) argv;
- (void) arg_ptr;
- our_pred->need_stat = our_pred->need_type = false;
-@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
- {
- struct re_pattern_buffer *re;
- const char *error_message;
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
- our_pred->need_stat = our_pred->need_type = false;
- re = xmalloc (sizeof (struct re_pattern_buffer));
- our_pred->args.regex = re;
-@@ -2061,6 +2067,7 @@ static boolean
- parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct predicate *our_pred;
-+ char *arg;
- uintmax_t num;
- char suffix;
- enum comparison_type c_type;
-@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- */
- if ((argv == NULL) || (argv[*arg_ptr] == NULL))
- return false;
-+ arg = argv[*arg_ptr];
-
-- len = strlen (argv[*arg_ptr]);
-+ len = strlen (arg);
- if (len == 0)
- error (1, 0, _("invalid null argument to -size"));
-
-- suffix = argv[*arg_ptr][len - 1];
-+ suffix = arg[len - 1];
- switch (suffix)
- {
- case 'b':
- blksize = 512;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'c':
- blksize = 1;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'k':
- blksize = 1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'M': /* Megabytes */
- blksize = 1024*1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'G': /* Gigabytes */
- blksize = 1024*1024*1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'w':
- blksize = 2;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case '0':
-@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
- }
- /* TODO: accept fractional megabytes etc. ? */
-- if (!get_num (argv[*arg_ptr], &num, &c_type))
-+ if (!get_num (arg, &num, &c_type))
- {
- error(1, 0,
- _("Invalid argument `%s%c' to -size"),
-- argv[*arg_ptr], (int)suffix);
-+ arg, (int)suffix);
- return false;
- }
-- our_pred = insert_primary (entry);
-+our_pred = insert_primary (entry, arg);
- our_pred->args.size.kind = c_type;
- our_pred->args.size.blocksize = blksize;
- our_pred->args.size.size = num;
-@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct predicate *our_pred;
- struct stat st, fst;
- int fd, openflags;
-+ const char *filename;
-
- set_stat_placeholders(&st);
-- if (!collect_arg_stat_info(argv, arg_ptr, &st))
-+ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
- return false;
-
- set_stat_placeholders(&fst);
-@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, filename);
- our_pred->args.samefileid.ino = st.st_ino;
- our_pred->args.samefileid.dev = st.st_dev;
- our_pred->args.samefileid.fd = fd;
-@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->est_success_rate = 1.0f;
- return true;
-@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct predicate *our_pred;
- (void) argv;
- (void) arg_ptr;
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->side_effects = our_pred->no_default_print = false;
- if (pred_is(our_pred, pred_executable))
-@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct timespec zero = {0,0};
- if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, offset_str);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
- return true;
-@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
- return false;
- }
- }
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, username);
- our_pred->args.uid = uid;
- our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
- return true;
-@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
- error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
- return false;
- }
-- our_pred = insert_primary_withpred (entry, which_pred);
-+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
- our_pred->est_success_rate = rate;
-
- /* Figure out if we will need to stat the file, because if we don't
-@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
- struct segment **segmentp; /* Address of current segment. */
- struct predicate *our_pred;
-
-- our_pred = insert_primary_withpred (entry, func);
-+ our_pred = insert_primary_withpred (entry, func, format_const);
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->args.printf_vec = *vec;
- our_pred->need_type = false;
-@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
- if ((argv == NULL) || (argv[*arg_ptr] == NULL))
- return false;
-
-- our_pred = insert_primary_withpred (entry, func);
-+ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->need_type = our_pred->need_stat = false;
-
-@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
- return false;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, orig_timearg);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
-
-@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
-
- if (get_num (numstr, &num, &c_type))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, numstr);
- our_pred->args.numinfo.kind = c_type;
- our_pred->args.numinfo.l_val = num;
-
-diff --git a/find/tree.c b/find/tree.c
-index 7420c60..60a0601 100644
---- a/find/tree.c
-+++ b/find/tree.c
-@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
- /* Prints a predicate */
- void print_predicate(FILE *fp, const struct predicate *p)
- {
-- fprintf (fp, "%s%s%s",
-- p->p_name,
-- p->arg_text ? " " : "",
-- p->arg_text ? p->arg_text : "");
-+ if (p->arg_text)
-+ {
-+ fprintf (fp, "%s %s", p->p_name, p->arg_text);
-+ }
-+ else
-+ {
-+ fprintf (fp, "%s", p->p_name);
-+ }
- }
-
-
-@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
- new_parent->need_stat = false;
- new_parent->need_type = false;
- new_parent->p_cost = NeedsNothing;
--
-+ new_parent->arg_text = NULL;
-+
- switch (high_prec)
- {
- case COMMA_PREC:
-@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
- p->visits = p->successes = 0;
- }
-
-+
-+struct predicate *
-+get_new_pred_noarg (const struct parser_table *entry)
-+{
-+ struct predicate *p = get_new_pred(entry);
-+ if (p)
-+ {
-+ p->arg_text = NULL;
-+ }
-+ return p;
-+}
-+
-
- /* Return a pointer to a new predicate structure, which has been
- linked in as the last one in the predicates list.
-@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
- last_pred->no_default_print = false;
- last_pred->need_stat = true;
- last_pred->need_type = true;
-+ last_pred->p_cost = NeedsUnknown;
-+ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
- last_pred->args.str = NULL;
- last_pred->pred_next = NULL;
- last_pred->pred_left = NULL;
-@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
- predicate is an operator. If it isn't, the AND operator is inserted. */
-
- struct predicate *
--get_new_pred_chk_op (const struct parser_table *entry)
-+get_new_pred_chk_op (const struct parser_table *entry,
-+ const char *arg)
- {
- struct predicate *new_pred;
- static const struct parser_table *entry_and = NULL;
-@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
- case PRIMARY_TYPE:
- case CLOSE_PAREN:
- /* We need to interpose the and operator. */
-- new_pred = get_new_pred (entry_and);
-+ new_pred = get_new_pred_noarg (entry_and);
- new_pred->pred_func = pred_and;
- new_pred->p_name = "-a";
- new_pred->p_type = BI_OP;
- new_pred->p_prec = AND_PREC;
- new_pred->need_stat = false;
- new_pred->need_type = false;
-+ new_pred->arg_text = NULL;
- new_pred->args.str = NULL;
- new_pred->side_effects = false;
- new_pred->no_default_print = false;
-@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
- }
-
- new_pred = get_new_pred (entry);
-+ new_pred->arg_text = arg;
- new_pred->parser_entry = entry;
- return new_pred;
- }
-diff --git a/find/util.c b/find/util.c
-index a06eada..cc9a3eb 100644
---- a/find/util.c
-+++ b/find/util.c
-@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
- operator. */
-
- struct predicate *
--insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
-+insert_primary_withpred (const struct parser_table *entry,
-+ PRED_FUNC pred_func,
-+ const char *arg)
- {
- struct predicate *new_pred;
-
-- new_pred = get_new_pred_chk_op (entry);
-+ new_pred = get_new_pred_chk_op (entry, arg);
- new_pred->pred_func = pred_func;
- new_pred->p_name = entry->parser_name;
- new_pred->args.str = NULL;
-@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
- either not there at all (we are the very first node) or is an
- operator. */
- struct predicate *
--insert_primary (const struct parser_table *entry)
-+insert_primary (const struct parser_table *entry, const char *arg)
- {
- assert (entry->pred_func != NULL);
-- return insert_primary_withpred(entry, entry->pred_func);
-+ return insert_primary_withpred(entry, entry->pred_func, arg);
-+}
-+
-+struct predicate *
-+insert_primary_noarg (const struct parser_table *entry)
-+{
-+ return insert_primary(entry, NULL);
- }
-
-
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
deleted file mode 100644
index c0ff3ff1c0..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-Upstream-Status: Backport
-
-commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
-Author: James Youngman <jay@gnu.org>
-Date: Sat Feb 20 13:11:45 2010 +0000
-
- Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
-
- * find/parser.c (parse_fls): If the argument is invalid, reverse
- the change that collect_arg() made to *arg_ptr (that is, don't
- consume the argument).
- (parse_fprint0): Likewise.
- (parse_gid): Likewise.
- (parse_group): Likewise.
- (parse_inum): Likewise.
- (parse_links): Likewise.
- (do_parse_xmin): Likewise.
- (parse_name): Likewise.
- (parse_printf): Likewise.
- (parse_uid): Likewise.
- (parse_used): Likewise.
- (parse_time): Likewise.
-
- Signed-off-by: James Youngman <jay@gnu.org>
-
-diff --git a/ChangeLog b/ChangeLog
-index d0ce1fe..13539a4 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,0 +1,19 @@
-+2010-02-20 James Youngman <jay@gnu.org>
-+
-+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
-+ `-ctime'".
-+ * find/parser.c (parse_fls): If the argument is invalid, reverse
-+ the change that collect_arg() made to *arg_ptr (that is, don't
-+ consume the argument).
-+ (parse_fprint0): Likewise.
-+ (parse_gid): Likewise.
-+ (parse_group): Likewise.
-+ (parse_inum): Likewise.
-+ (parse_links): Likewise.
-+ (do_parse_xmin): Likewise.
-+ (parse_name): Likewise.
-+ (parse_printf): Likewise.
-+ (parse_uid): Likewise.
-+ (parse_used): Likewise.
-+ (parse_time): Likewise.
-+
-diff --git a/NEWS b/NEWS
-index 5394311..4e910df 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
-
- ** Bug Fixes
-
-+#28824: Corrected error message for "-ctime x".
-+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
-+ -uid, -used, -atime, -mtime, -ctime.
- #26537: find -prune now makes sure it has valid stat() information.
-
-diff --git a/find/parser.c b/find/parser.c
-index 2e6b989..08758ee 100644
---- a/find/parser.c
-+++ b/find/parser.c
-@@ -886,8 +886,14 @@ static boolean
- parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *filename;
-- return collect_arg(argv, arg_ptr, &filename)
-- && insert_fls(entry, filename);
-+ if (collect_arg(argv, arg_ptr, &filename))
-+ {
-+ if (insert_fls(entry, filename))
-+ return true;
-+ else
-+ --*arg_ptr; /* don't consume the invalid arg. */
-+ }
-+ return false;
- }
-
- static boolean
-@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
-- return insert_fprint(entry, filename);
-- else
-- return false;
-+ {
-+ if (insert_fprint(entry, filename))
-+ return true;
-+ else
-+ --*arg_ptr; /* don't consume the bad arg. */
-+ }
-+ return false;
- }
-
- static float estimate_fstype_success_rate(const char *fsname)
-@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1049,6 +1060,7 @@ static boolean
- parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *groupname;
-+ const int saved_argc = *arg_ptr;
-
- if (collect_arg(argv, arg_ptr, &groupname))
- {
-@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- "because it has the unexpected suffix %s"),
- quotearg_n_style(0, options.err_quoting_style, groupname),
- quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- error(1, 0, _("argument to -group is empty, but should be a group name"));
- }
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
- error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
- predicate,
- quotearg_n_style(0, options.err_quoting_style, depthstr));
-+ /* NOTREACHED */
- return false;
- }
- /* missing argument */
-@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
- enum xval xv)
- {
- const char *minutes;
-+ const int saved_argc = *arg_ptr;
-
- if (collect_arg(argv, arg_ptr, &minutes))
- {
-@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
- return true;
- }
-+ else
-+ {
-+ /* Don't consume the invalid argument. */
-+ *arg_ptr = saved_argc;
-+ }
- }
- return false;
- }
-@@ -1427,6 +1450,8 @@ static boolean
- parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *name;
-+ const int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &name))
- {
- fnmatch_sanitycheck();
-@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
- return true;
- }
-+ else
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
-+ }
- }
- return false;
- }
-@@ -1954,11 +1983,21 @@ static boolean
- parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *format;
-+ const int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &format))
- {
- struct format_val fmt;
- open_stdout(&fmt);
-- return insert_fprintf (&fmt, entry, pred_fprintf, format);
-+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
-+ {
-+ return true;
-+ }
-+ else
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
-+ return false;
-+ }
- }
- return false;
- }
-@@ -1967,15 +2006,21 @@ static boolean
- parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *format, *filename;
-+ int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &filename))
- {
- if (collect_arg(argv, arg_ptr, &format))
- {
- struct format_val fmt;
- open_output_file (filename, &fmt);
-- return insert_fprintf (&fmt, entry, pred_fprintf, format);
-+ saved_argc = *arg_ptr;
-+
-+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
-+ return true;
- }
- }
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
-
-@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
- else
- {
- error(1, 0, _("Invalid argument %s to -used"), offset_str);
-+ /*NOTREACHED*/
- return false;
- }
- }
-@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
- if (strlen(typeletter) != 1u)
- {
- error(1, 0, _("Arguments to -type should contain only one letter"));
-+ /*NOTREACHED*/
- return false;
- }
-
-@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
- #endif
- default: /* None of the above ... nuke 'em. */
- error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
-+ /*NOTREACHED*/
- return false;
- }
- our_pred = insert_primary_withpred (entry, which_pred, typeletter);
-@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- const char *errmsg = "arithmetic overflow while converting %s "
- "days to a number of seconds";
- struct timespec origin;
-+ const int saved_argc = *arg_ptr;
-
- if (!collect_arg(argv, arg_ptr, &timearg))
- return false;
-@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- timearg = orig_timearg;
-
- if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
-- return false;
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument */
-+ return false;
-+ }
-
- our_pred = insert_primary (entry, orig_timearg);
- our_pred->args.reftime = tval;
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
deleted file mode 100644
index 940aaf6ff5..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Upstream-Status: Backport
-
-commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
-Author: James Youngman <jay@gnu.org>
-Date: Sat Feb 20 19:53:13 2010 +0000
-
- Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
-
- * doc/find.texi (Problems with -exec and filenames): Add missing
- $0 argument in example for sh -c 'something "$@" sh ...
- * NEWS: Mention this change.
-
- Signed-off-by: James Youngman <jay@gnu.org>
-
-diff --git a/ChangeLog b/ChangeLog
-index 13539a4..e94ba96 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,5 +1,10 @@
- 2010-02-20 James Youngman <jay@gnu.org>
-
-+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
-+ * doc/find.texi (Problems with -exec and filenames): Add missing
-+ $0 argument in example for sh -c 'something "$@" sh ...
-+ * NEWS: Mention this change.
-+
- Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
- `-ctime'".
- * find/parser.c (parse_fls): If the argument is invalid, reverse
-diff --git a/NEWS b/NEWS
-index 4e910df..4c97be9 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
-
- ** Bug Fixes
-
-+#28872: Mistake in "#safer" example in "Problems with -exec and
-+ filenames" section of the Texinfo manual.
-+
- #28824: Corrected error message for "-ctime x".
- Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
- -uid, -used, -atime, -mtime, -ctime.
-diff --git a/doc/find.texi b/doc/find.texi
-index 2e5958d..391ffa0 100644
---- a/doc/find.texi
-+++ b/doc/find.texi
-@@ -4830,8 +4830,8 @@ problem:
-
- @example
- # safer
--find -exec sh -c 'something "$@@"' @{@} \;
--find -execdir sh -c 'something "$@@"' @{@}\;
-+find -exec sh -c 'something "$@@"' sh @{@} \;
-+find -execdir sh -c 'something "$@@"' sh @{@}\;
- @end example
-
- This approach is not guaranteed to avoid every problem, but it is much
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
deleted file mode 100644
index a48cdc221c..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Fix documentation build errors
-
-This fixes the following errors building the findutils documentation:
-find-maint.texi:45: misplaced {
-find-maint.texi:45: misplaced }
-find-maint.texi:236: warning: node next `Make the Compiler Find the Bugs' in menu `The File System Is Being Modified' and in sectioning `Factor Out Repeated Code' differ
-find-maint.texi:335: warning: node `Debugging is For Users Too' is next for `Factor Out Repeated Code' in sectioning but not in menu
-find-maint.texi:335: warning: node prev `Factor Out Repeated Code' in menu `Debugging is For Users Too' and in sectioning `Make the Compiler Find the Bugs' differ
-find-maint.texi:378: warning: node next `Debugging is For Users Too' in menu `Factor Out Repeated Code' and in sectioning `Don't Trust the File System Contents' differ
-find-maint.texi:378: warning: node prev `Debugging is For Users Too' in menu `Don't Trust the File System Contents' and in sectioning `Factor Out Repeated Code' differ
-find-maint.texi:392: warning: node next `Don't Trust the File System Contents' in menu `Debugging is For Users Too' and in sectioning `The File System Is Being Modified' differ
-find-maint.texi:392: warning: node prev `Don't Trust the File System Contents' in menu `The File System Is Being Modified' and in sectioning `Debugging is For Users Too' differ
-find-maint.texi:417: warning: node `Don't Trust the File System Contents' is next for `The File System Is Being Modified' in menu but not in sectioning
-find-maint.texi:417: warning: node prev `The File System Is Being Modified' in menu `Make the Compiler Find the Bugs' and in sectioning `Don't Trust the File System Contents' differ
-find.texi:53: misplaced {
-find.texi:53: misplaced }
-find.texi:1862: warning: node `Formatting Flags' is next for `Time Directives' in menu but not in sectioning
-find.texi:1975: warning: node `Formatting Flags' is next for `Combined Time Formats' in sectioning but not in menu
-find.texi:2004: warning: node prev `Formatting Flags' in menu `Time Directives' and in sectioning `Combined Time Formats' differ
-find.texi:2004: warning: node up `Formatting Flags' in menu `Format Directives' and in sectioning `Time Formats' differ
-find.texi:1893: node `Time Formats' lacks menu item for `Formatting Flags' despite being its Up target
-
-Upstream-Status: Backport
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
---- a/doc/find-maint.texi
-+++ b/doc/find-maint.texi
-@@ -42,7 +42,7 @@ Free Documentation License''.
-
- @page
- @vskip 0pt plus 1filll
--@insertcopying{}
-+@insertcopying
- @end titlepage
-
- @contents
-@@ -227,10 +227,10 @@ circumstances.
-
- @menu
- * Make the Compiler Find the Bugs::
-+* Factor Out Repeated Code::
- * The File System Is Being Modified::
- * Don't Trust the File System Contents::
- * Debugging is For Users Too::
--* Factor Out Repeated Code::
- @end menu
-
- @node Make the Compiler Find the Bugs
---- a/doc/find.texi
-+++ b/doc/find.texi
-@@ -50,7 +50,7 @@ Texts. A copy of the license is included in the section entitled
-
- @page
- @vskip 0pt plus 1filll
--@insertcopying{}
-+@insertcopying
- @end titlepage
-
- @contents
-@@ -1665,6 +1665,7 @@ no output is ever sent to it.
- * Escapes::
- * Format Directives::
- * Time Formats::
-+* Formatting Flags::
- @end menu
-
- @node Escapes
-@@ -1733,7 +1734,6 @@ from the novel you are reading.
- * Size Directives::
- * Location Directives::
- * Time Directives::
--* Formatting Flags::
- @end menu
-
- @node Name Directives
-@@ -2002,7 +2002,7 @@ seconds field includes a fractional part.
- @end table
-
- @node Formatting Flags
--@subsubsection Formatting Flags
-+@subsection Formatting Flags
-
- The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
- and @samp{+} flags, but the other directives do not, even if they
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
deleted file mode 100644
index d4a7e95728..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes following issue with automake 1.12
-
-| configure.ac:80: error: automatic de-ANSI-fication support has been removed
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/03
-
-Index: findutils-4.4.2/configure.ac
-===================================================================
---- findutils-4.4.2.orig/configure.ac
-+++ findutils-4.4.2/configure.ac
-@@ -77,8 +77,6 @@ AC_PROG_CPP
- dnl for gnulib
- gl_EARLY
-
--AM_C_PROTOTYPES
--
- AC_PROG_INSTALL
- AC_PROG_RANLIB
- dnl AC_PROG_LIBTOOL
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
deleted file mode 100644
index b78cc7539c..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Pending
-
-Author: H.J. Lu <hjl.tools@gmail.com>
-
-Work around gnulib time_t assumption in findutils for x32
-
-time_t is 64bit and long int is 32bit on x32. But gnulib used in
-findutils assumes time_t values fit into long int. Such assumption is
-invalid for x32 and should be removed.
-
-This patch is a workaround to compile gnulib for x32.
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
-
-
-Index: findutils-4.4.2/gnulib/lib/getdate.y
-===================================================================
---- findutils-4.4.2.orig/gnulib/lib/getdate.y
-+++ findutils-4.4.2/gnulib/lib/getdate.y
-@@ -114,7 +114,6 @@
- wraps around, but there's no portable way to check for that at
- compile-time. */
- verify (TYPE_IS_INTEGER (time_t));
--verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
-
- /* An integer value, and the number of digits in its textual
- representation. */
-Index: findutils-4.4.2/gnulib/lib/mktime.c
-===================================================================
---- findutils-4.4.2.orig/gnulib/lib/mktime.c
-+++ findutils-4.4.2/gnulib/lib/mktime.c
-@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
- {
- verify (C99_integer_division, -1 / 2 == 0);
- verify (long_int_year_and_yday_are_wide_enough,
-- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
-+ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
-
- /* Compute intervening leap days correctly even if year is negative.
- Take care to avoid integer overflow here. */
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
index 4f4068a091..37c84cc59b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -7,7 +7,7 @@ BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
SECTION = "console/utils"
-SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
+SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz"
inherit autotools gettext texinfo update-alternatives
diff --git a/meta/recipes-extended/findutils/findutils_4.4.2.bb b/meta/recipes-extended/findutils/findutils_4.4.2.bb
deleted file mode 100644
index faf2ebe462..0000000000
--- a/meta/recipes-extended/findutils/findutils_4.4.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require findutils.inc
-
-# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-PR = "r6"
-
-SRC_URI += "file://01-27017.patch \
- file://02-28824.patch \
- file://03-28872.patch \
- file://findutils_fix_for_x32.patch \
- file://findutils_fix_for_automake-1.12.patch \
- file://findutils_fix_doc.patch \
- "
-
-SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
-SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"
-
-DEPENDS = "bison-native"
-
-# http://savannah.gnu.org/bugs/?27299
-CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
-
-EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/findutils/findutils_4.5.14.bb b/meta/recipes-extended/findutils/findutils_4.5.14.bb
new file mode 100644
index 0000000000..9253637fc1
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.5.14.bb
@@ -0,0 +1,15 @@
+require findutils.inc
+
+# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
+SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
+
+# http://savannah.gnu.org/bugs/?27299
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+
+EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
index 7d214eafbe..d23f0bf6d7 100644
--- a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
+++ b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
@@ -3,8 +3,8 @@
cd test
for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \
do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \
- make -f Maketests $i &>$i.tmp; \
+ make -f Maketests $i >$i.tmp 2>&1; \
grep -q "Error" $i.tmp; \
- if [ $? == 0 ]; then echo "FAIL: $i"; \
+ if [ $? -eq 0 ]; then echo "FAIL: $i"; \
else echo "PASS: $i"; rm -f $i.tmp; fi; \
done
diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
new file mode 100644
index 0000000000..a1c9368cc9
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it
+
+Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
+
+This addresses the cryto dependency seen during build.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Rebase the patch to ghostscript-9.15
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cups/libs/cups/http-private.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h
+index 99a85c3..a674852 100644
+--- a/cups/libs/cups/http-private.h
++++ b/cups/libs/cups/http-private.h
+@@ -80,7 +80,6 @@ typedef int socklen_t;
+ # elif defined HAVE_GNUTLS
+ # include <gnutls/gnutls.h>
+ # include <gnutls/x509.h>
+-# include <gcrypt.h>
+ # elif defined(HAVE_CDSASSL)
+ # include <CoreFoundation/CoreFoundation.h>
+ # include <Security/Security.h>
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
index 601f5f127e..ae9da6e08e 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
@@ -12,6 +12,9 @@ RP: Extended || true to all CP_ operations, they all can race e.g.:
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Rebase the patch to ghostscript-9.15
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
diff --git a/base/expat.mak b/base/expat.mak
index 4ee9c8c..2e16a9d 100644
--- a/base/expat.mak
@@ -39,10 +42,10 @@ index 16f2b95..409f75b 100644
# Define the shared version.
$(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE)
diff --git a/base/gs.mak b/base/gs.mak
-index 7d75fb0..2a9596c 100644
+index 3fc67df..1fc3e26 100644
--- a/base/gs.mak
+++ b/base/gs.mak
-@@ -433,7 +433,7 @@ $(gconfxx_h) : $(ld_tr)
+@@ -434,7 +434,7 @@ $(gconfxx_h) : $(ld_tr)
$(gconfig_h) : $(gconfxx_h)
$(RM_) $(gconfig_h)
@@ -78,7 +81,7 @@ index bb74630..44617a0 100644
# dev file for shared (separately built) jbig2dec library
$(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE)
diff --git a/base/jpeg.mak b/base/jpeg.mak
-index 5310a20..43cee63 100644
+index e300a04..9fdad5a 100644
--- a/base/jpeg.mak
+++ b/base/jpeg.mak
@@ -96,7 +96,7 @@ jconfig_h=$(GLGEN)jconfig.h
@@ -148,7 +151,7 @@ index 5310a20..43cee63 100644
# In order to avoid having to keep the dependency lists for the IJG code
# accurate, we simply make all of them depend on the only files that
-@@ -174,40 +174,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_)
+@@ -181,40 +181,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_)
$(SETMOD) $(JGEN)jpegc0 $(jpegc0_)
$(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP)
@@ -196,7 +199,7 @@ index 5310a20..43cee63 100644
jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ)
-@@ -223,90 +223,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege
+@@ -230,90 +230,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege
$(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3)
$(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP)
@@ -304,7 +307,7 @@ index 5310a20..43cee63 100644
jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ)
-@@ -322,76 +322,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd
+@@ -329,76 +329,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd
$(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3)
$(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP)
@@ -436,10 +439,10 @@ index 52f750c..33a9c16 100644
# dev file for shared (separately built) lcms library
$(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE)
diff --git a/base/lcups.mak b/base/lcups.mak
-index 0bfb3ac..fcdb170 100644
+index 7504c44..7b9b979 100644
--- a/base/lcups.mak
+++ b/base/lcups.mak
-@@ -114,7 +114,7 @@ libcups.config-clean :
+@@ -116,7 +116,7 @@ libcups.config-clean :
# instantiate the requested build option (shared or compiled in)
$(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev
@@ -448,7 +451,7 @@ index 0bfb3ac..fcdb170 100644
# Define the shared version.
$(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE)
-@@ -131,7 +131,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \
+@@ -133,7 +133,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \
# for simplicity we have every source file depend on all headers
$(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h
@@ -457,7 +460,7 @@ index 0bfb3ac..fcdb170 100644
$(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h
$(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c
-@@ -218,7 +218,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS)
+@@ -220,7 +220,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS)
$(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c
$(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS)
@@ -466,7 +469,7 @@ index 0bfb3ac..fcdb170 100644
$(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c
$(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS)
-@@ -255,7 +255,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS)
+@@ -257,7 +257,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS)
$(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c
$(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS)
@@ -475,18 +478,18 @@ index 0bfb3ac..fcdb170 100644
$(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c
$(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS)
-@@ -271,5 +271,5 @@ $(LIBCUPSOBJ)usersys.$(OBJ) : $(LIBCUPSSRC)usersys.c $(LIBSCUPSHEADERS)
- $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c
+@@ -279,5 +279,5 @@ $(LIBCUPSOBJ)thread.$(OBJ) : $(LIBCUPSSRC)thread.c $(LIBSCUPSHEADERS)
+ $(LCUPS_CC) $(LCUPSO_)thread.$(OBJ) $(C_) $(LIBCUPSSRC)thread.c
$(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS)
- $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c
+ $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true
$(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c
diff --git a/base/lcupsi.mak b/base/lcupsi.mak
-index ea4047f..0102d93 100644
+index da47da5..fa7d74c 100644
--- a/base/lcupsi.mak
+++ b/base/lcupsi.mak
-@@ -73,7 +73,7 @@ libcupsi.config-clean :
+@@ -59,7 +59,7 @@ libcupsi.config-clean :
# instantiate the requested build option (shared or compiled in)
$(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev
@@ -509,10 +512,10 @@ index 3f50892..97c76a0 100644
# external link .dev
$(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE)
diff --git a/base/lib.mak b/base/lib.mak
-index 3ad7db3..87b4f01 100644
+index 90c9249..fb11aba 100644
--- a/base/lib.mak
+++ b/base/lib.mak
-@@ -343,7 +343,7 @@ md5_=$(GLOBJ)md5.$(OBJ)
+@@ -350,7 +350,7 @@ md5_=$(GLOBJ)md5.$(OBJ)
$(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE)
$(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22
$(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h
@@ -521,7 +524,7 @@ index 3ad7db3..87b4f01 100644
$(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c
$(RM_) $(GLGEN)md5.c $(GLGEN)md5.h
-@@ -624,19 +624,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\
+@@ -631,19 +631,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\
$(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\
$(MAKEDDIRS)
$(RM_) $(GLGEN)gconfig.c
@@ -544,7 +547,7 @@ index 3ad7db3..87b4f01 100644
$(GLCCAUX) $(C_) $(AUXO_)gscdefs.$(OBJ) $(AUX)gscdefs.c
$(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\
-@@ -1527,7 +1527,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\
+@@ -1535,7 +1535,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\
$(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c
$(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ)
@@ -553,7 +556,7 @@ index 3ad7db3..87b4f01 100644
# sdcparam is used by the filter operator and the PS/PDF writer.
# It is not included automatically in sdcte/d.
-@@ -1555,7 +1555,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\
+@@ -1563,7 +1563,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\
$(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c
$(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -562,7 +565,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
-@@ -1571,7 +1571,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
+@@ -1579,7 +1579,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
$(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c
$(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -571,7 +574,7 @@ index 3ad7db3..87b4f01 100644
# sdeparam is used by the filter operator and the PS/PDF writer.
# It is not included automatically in sdcte.
-@@ -1603,7 +1603,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\
+@@ -1611,7 +1611,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\
$(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c
$(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -580,7 +583,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
-@@ -1620,7 +1620,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
+@@ -1628,7 +1628,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
$(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -589,7 +592,7 @@ index 3ad7db3..87b4f01 100644
# sddparam is used by the filter operator.
# It is not included automatically in sdctd.
-@@ -1643,7 +1643,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_)
+@@ -1651,7 +1651,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_)
# We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory.
$(GLD)slzwe.dev : $(GLD)lzwe.dev
@@ -598,7 +601,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\
$(slzwx_h) $(strimpl_h) $(MAKEDIRS)
-@@ -1659,7 +1659,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_)
+@@ -1667,7 +1667,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_)
# We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory.
$(GLD)slzwd.dev : $(GLD)lzwd.dev
@@ -607,7 +610,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\
$(slzwx_h) $(strimpl_h) $(MAKEDIRS)
-@@ -1709,7 +1709,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\
+@@ -1717,7 +1717,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\
# ---------------- JBIG2 compression filter ---------------- #
$(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev
@@ -616,7 +619,7 @@ index 3ad7db3..87b4f01 100644
# jbig2dec version
sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ)
-@@ -1745,7 +1745,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \
+@@ -1753,7 +1753,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \
# ---------------- JPEG 2000 compression filter ---------------- #
$(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev
@@ -625,7 +628,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
$(memory__h) $(gsmalloc_h) \
-@@ -1874,7 +1874,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\
+@@ -1882,7 +1882,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\
$(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c
$(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -634,7 +637,7 @@ index 3ad7db3..87b4f01 100644
szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ)
$(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_)
-@@ -1890,7 +1890,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\
+@@ -1898,7 +1898,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\
$(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c
$(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -643,7 +646,7 @@ index 3ad7db3..87b4f01 100644
szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ)
$(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_)
-@@ -1906,7 +1906,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\
+@@ -1914,7 +1914,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\
$(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c
$(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -652,7 +655,7 @@ index 3ad7db3..87b4f01 100644
# ---------------- Page devices ---------------- #
# We include this here, rather than in devs.mak, because it is more like
-@@ -2796,7 +2796,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\
+@@ -2804,7 +2804,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\
$(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c
$(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(gp_h)
@@ -661,16 +664,16 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
-@@ -2808,7 +2808,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
- $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c
+@@ -2817,7 +2817,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
- $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h)
+ $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h) \
+ $(gxsync_h)
- $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ)
+ $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true
# Note that gsicc_create requires compile with lcms to obtain icc34.h
# header file that is used for creating ICC structures from PS objects.
-@@ -2828,7 +2828,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\
+@@ -2837,7 +2837,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\
$(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
$(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS)
@@ -679,7 +682,7 @@ index 3ad7db3..87b4f01 100644
#include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */
-@@ -3132,7 +3132,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS)
+@@ -3141,7 +3141,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS)
$(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS)
$(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS)
@@ -688,7 +691,7 @@ index 3ad7db3..87b4f01 100644
# the following module is only included if the romfs.dev FEATURE is enabled
$(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
-@@ -3148,7 +3148,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
+@@ -3157,7 +3157,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
$(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c
$(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -711,7 +714,7 @@ index ca1b7cc..ad6446d 100644
# external link .dev
$(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE)
diff --git a/base/macos-mcp.mak b/base/macos-mcp.mak
-index 4ded7f3..3599ed9 100644
+index 38a2937..2ab7cae 100644
--- a/base/macos-mcp.mak
+++ b/base/macos-mcp.mak
@@ -383,11 +383,11 @@ CWPROJ_XML=./ghostscript.mcp.xml
@@ -731,7 +734,7 @@ index 4ded7f3..3599ed9 100644
$(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
diff --git a/base/openjpeg.mak b/base/openjpeg.mak
-index 32be240..4a6b429 100644
+index b194709..dac7901 100644
--- a/base/openjpeg.mak
+++ b/base/openjpeg.mak
@@ -99,7 +99,7 @@ open_jpeg_HDRS = \
@@ -744,7 +747,7 @@ index 32be240..4a6b429 100644
# external link .dev
$(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE)
diff --git a/base/openvms.mak b/base/openvms.mak
-index e5ae40b..286ee84 100644
+index 1ea06fe..84378a4 100644
--- a/base/openvms.mak
+++ b/base/openvms.mak
@@ -365,7 +365,7 @@ SH=
@@ -757,7 +760,7 @@ index e5ae40b..286ee84 100644
# Define the command for deleting (a) file(s) (including wild cards)
diff --git a/base/png.mak b/base/png.mak
-index f01c426..8a89884 100644
+index 1725ddb..0d54b80 100644
--- a/base/png.mak
+++ b/base/png.mak
@@ -79,7 +79,7 @@ png.config-clean :
@@ -772,7 +775,7 @@ index f01c426..8a89884 100644
@@ -134,7 +134,7 @@ $(PNGOBJ)pngget.$(OBJ) : $(PNGSRC)pngget.c $(PDEP)
# Define the version of libpng.dev that we are actually using.
- $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev
+ $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(MAKEDIRS)
- $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev
+ $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true
@@ -841,7 +844,7 @@ index 6aa3599..70a61f8 100644
RMN_=rm -f
diff --git a/base/zlib.mak b/base/zlib.mak
-index 6c50605..7fb8c9b 100644
+index 78d398a..3d48145 100644
--- a/base/zlib.mak
+++ b/base/zlib.mak
@@ -83,7 +83,7 @@ $(ZOBJ)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP)
@@ -865,17 +868,17 @@ index 6c50605..7fb8c9b 100644
@@ -127,7 +127,7 @@ $(ZOBJ)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP)
# Decoding (decompression) code.
- $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev
+ $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(MAKEDIRS)
- $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev
+ $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true
$(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
$(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME)
diff --git a/devices/devs.mak b/devices/devs.mak
-index bc22594..4bd0a11 100644
+index 0a668d4..a19082e 100644
--- a/devices/devs.mak
+++ b/devices/devs.mak
-@@ -1555,7 +1555,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev
+@@ -1547,7 +1547,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev
png_i_=-include $(PNGGENDIR)$(D)libpng
$(DEVOBJ)gdevpng.$(OBJ) : $(DEVSRC)gdevpng.c\
@@ -885,7 +888,7 @@ index bc22594..4bd0a11 100644
$(DD)pngmono.dev : $(DEVS_MAK) $(libpng_dev) $(png_) $(GLD)page.dev $(GDEV)
diff --git a/psi/int.mak b/psi/int.mak
-index 62cba0e..a1e963a 100644
+index 7d36e66..71b88f5 100644
--- a/psi/int.mak
+++ b/psi/int.mak
@@ -274,7 +274,7 @@ $(PSOBJ)iconfig.$(OBJ) : $(gconfig_h) $(PSSRC)iconf.c $(stdio__h)\
@@ -925,5 +928,5 @@ index 62cba0e..a1e963a 100644
fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
--
-1.8.1.2
+1.9.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
new file mode 100644
index 0000000000..a05de29def
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
new file mode 100644
index 0000000000..0d0a16bfa3
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb b/meta/recipes-extended/ghostscript/ghostscript_9.15.bb
index e14e656b93..850ed81705 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.15.bb
@@ -6,8 +6,6 @@ documents in an X11 environment. \
Furthermore, it can render PostScript and PDF files as graphics to be printed \
on non-PostScript printers. Supported printers include common \
dot-matrix, inkjet and laser models. \
-\
-Package gsfonts contains a set of standard fonts for Ghostscript. \
"
HOMEPAGE = "http://www.ghostscript.com"
SECTION = "console/utils"
@@ -25,6 +23,7 @@ SRC_URI = "${SRC_URI_BASE} \
file://ghostscript-9.02-genarch.patch \
file://objarch.h \
file://ghostscript-9.02-parallel-make.patch \
+ file://cups-no-gcrypt.patch \
"
SRC_URI_class-native = "${SRC_URI_BASE} \
@@ -32,8 +31,10 @@ SRC_URI_class-native = "${SRC_URI_BASE} \
file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
"
-SRC_URI[md5sum] = "586494befb443363338c1b6379f13973"
-SRC_URI[sha256sum] = "ab2ba5ce11c8db396c9acf774a497182d7686d04670976cc3e690ada7db9f0d4"
+SRC_URI[md5sum] = "5a78ab0990ff6ec3a103576bc8777c46"
+SRC_URI[sha256sum] = "27f11e4fe5b89857ae745687281d1e4daf9681edc858a3f7e8e77ef09609777a"
+
+PR = "r1"
EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
--with-fontpath=${datadir}/fonts \
@@ -59,7 +60,7 @@ EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
CFLAGS += "-DHAVE_SYS_TIME_H=1"
BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
-inherit autotools-brokensep
+inherit autotools
do_configure_prepend () {
mkdir -p obj
@@ -81,8 +82,8 @@ do_configure_append () {
do_install_append () {
mkdir -p ${D}${datadir}/ghostscript/${PV}/
- cp -r Resource ${D}${datadir}/ghostscript/${PV}/
- cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
}
do_compile_class-native () {
diff --git a/meta/recipes-extended/grep/grep_2.19.bb b/meta/recipes-extended/grep/grep_2.21.bb
index f38a9a6171..2c378d8442 100644
--- a/meta/recipes-extended/grep/grep_2.19.bb
+++ b/meta/recipes-extended/grep/grep_2.21.bb
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
-SRC_URI[md5sum] = "ac732142227d9fe9567d71301e127979"
-SRC_URI[sha256sum] = "6388295be48cfcaf7665d9cd3914e6625ea000e9414132bfefd45cf1d8eec34d"
+SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
+SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
inherit autotools gettext texinfo
@@ -36,3 +36,4 @@ ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
index 79842baac8..1ce112e43d 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -47,3 +47,5 @@ ALTERNATIVE_${PN} = "grep egrep fgrep"
ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
index 38e1d36b83..7fbce9bc4a 100644
--- a/meta/recipes-extended/groff/groff_1.18.1.4.bb
+++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -32,7 +32,7 @@ do_install_append() {
# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
for i in afmtodit mmroff; do
if [ -f ${D}${bindir}/$i ]; then
- sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/$i
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
fi
done
diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
new file mode 100644
index 0000000000..92863d6c4b
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
@@ -0,0 +1,31 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+Index: gzip-1.3.12/Makefile.am
+===================================================================
+diff -urpN a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800
++++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800
+@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
+ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+ -e 's|[@]bindir@|'\''$(bindir)'\''|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a+x $@-t \
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index eeeafe02c3..b90856e796 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
inherit autotools texinfo
@@ -30,3 +31,5 @@ ALTERNATIVE_${PN} = "gunzip gzip zcat"
ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/hdparm/hdparm_9.43.bb b/meta/recipes-extended/hdparm/hdparm_9.45.bb
index 805f76a6b3..d11412d40c 100644
--- a/meta/recipes-extended/hdparm/hdparm_9.43.bb
+++ b/meta/recipes-extended/hdparm/hdparm_9.45.bb
@@ -18,8 +18,8 @@ RDEPENDS_wiper = "bash gawk stat"
SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
-SRC_URI[md5sum] = "f73233be118d86c779a8463d8b6a3cdb"
-SRC_URI[sha256sum] = "2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a"
+SRC_URI[md5sum] = "1c75d0751a44928b6c4bc81fb16d7fe8"
+SRC_URI[sha256sum] = "23b01caa56a995cf0897877b6aff98ea622a5df255bc2894b1a7693387f38669"
EXTRA_OEMAKE += 'STRIP="echo"'
diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb
new file mode 100644
index 0000000000..d14f658726
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "A development image that builds the kernel and packages that are \
+sensitive to kernel updates and version changes"
+
+# Could also be core-image-basic, but we'll keep this small for now
+require recipes-core/images/core-image-minimal.bb
+
+KERNEL_DEV_UTILS ?= "dropbear"
+KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
+KERNEL_DEV_MODULE ?= ""
+
+CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
+ ${KERNEL_DEV_UTILS} \
+ ${KERNEL_DEV_TOOLS} \
+ "
+
+# We need extra space for things like kernel builds, etc.
+IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
diff --git a/meta/recipes-extended/less/less_458.bb b/meta/recipes-extended/less/less_471.bb
index 3e4518a339..81d354ccf0 100644
--- a/meta/recipes-extended/less/less_458.bb
+++ b/meta/recipes-extended/less/less_471.bb
@@ -26,8 +26,8 @@ DEPENDS = "ncurses"
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "935b38aa2e73c888c210dedf8fd94f49"
-SRC_URI[sha256sum] = "e536c7819ede54b3d487f0ffc4c14b3620bed83734d92a81e89f62346db0fcac"
+SRC_URI[md5sum] = "9a40d29a2d84b41f9f36d7dd90b4f950"
+SRC_URI[sha256sum] = "37f613fa9a526378788d790a92217d59b523574cf7159f6538da8564b3fb27f8"
inherit autotools update-alternatives
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
index 91f4588cc5..9d6447d98a 100644
--- a/meta/recipes-extended/libaio/libaio/00_arches.patch
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -2,10 +2,10 @@ Upstream-Status: Inappropriate [embedded specific]
from openembedded, added by Qing He <qing.he@intel.com>
-Index: libaio-0.3.109/src/syscall-m68k.h
+Index: libaio-0.3.110/src/syscall-m68k.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-m68k.h
++++ libaio-0.3.110/src/syscall-m68k.h
@@ -0,0 +1,78 @@
+#define __NR_io_setup 241
+#define __NR_io_destroy 242
@@ -85,164 +85,27 @@ Index: libaio-0.3.109/src/syscall-m68k.h
+return (type) __res; \
+}
+
-Index: libaio-0.3.109/src/syscall-sparc.h
+Index: libaio-0.3.110/src/syscall.h
===================================================================
---- /dev/null
-+++ libaio-0.3.109/src/syscall-sparc.h
-@@ -0,0 +1,130 @@
-+/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
-+
-+/*
-+ * System calls under the Sparc.
-+ *
-+ * Don't be scared by the ugly clobbers, it is the only way I can
-+ * think of right now to force the arguments into fixed registers
-+ * before the trap into the system call with gcc 'asm' statements.
-+ *
-+ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
-+ *
-+ * SunOS compatibility based upon preliminary work which is:
-+ *
-+ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
-+ */
-+
-+
-+#define __NR_io_setup 268
-+#define __NR_io_destroy 269
-+#define __NR_io_submit 270
-+#define __NR_io_cancel 271
-+#define __NR_io_getevents 272
-+
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1,type2 arg2) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1,type2 arg2,type3 arg3) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+register long __o3 __asm__ ("o3") = (long)(arg4); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
-+ type5,arg5) \
-+type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+register long __o3 __asm__ ("o3") = (long)(arg4); \
-+register long __o4 __asm__ ("o4") = (long)(arg5); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-Index: libaio-0.3.109/src/syscall.h
-===================================================================
---- libaio-0.3.109.orig/src/syscall.h
-+++ libaio-0.3.109/src/syscall.h
-@@ -24,6 +24,14 @@
- #include "syscall-alpha.h"
- #elif defined(__arm__)
- #include "syscall-arm.h"
+--- libaio-0.3.110.orig/src/syscall.h
++++ libaio-0.3.110/src/syscall.h
+@@ -28,6 +28,12 @@
+ #include "syscall-sparc.h"
+ #elif defined(__aarch64__)
+ #include "syscall-arm64.h"
+#elif defined(__m68k__)
+#include "syscall-m68k.h"
-+#elif defined(__sparc__)
-+#include "syscall-sparc.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
+#elif defined(__mips__)
+#include "syscall-mips.h"
#else
- #error "add syscall-arch.h"
- #endif
-Index: libaio-0.3.109/src/syscall-mips.h
+ #warning "using generic syscall method"
+ #include "syscall-generic.h"
+Index: libaio-0.3.110/src/syscall-mips.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-mips.h
++++ libaio-0.3.110/src/syscall-mips.h
@@ -0,0 +1,223 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
@@ -467,45 +330,10 @@ Index: libaio-0.3.109/src/syscall-mips.h
+
+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
+
-Index: libaio-0.3.109/src/libaio.h
-===================================================================
---- libaio-0.3.109.orig/src/libaio.h
-+++ libaio-0.3.109/src/libaio.h
-@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd {
- #define PADDEDptr(x, y) x; unsigned y
- #define PADDEDul(x, y) unsigned long x; unsigned y
- # endif
-+#elif defined(__m68k__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__sparc__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__hppa__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__mips__)
-+# if defined (__MIPSEB__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+# elif defined(__MIPSEL__) /* little endian, 32 bits */
-+#define PADDED(x, y) x; unsigned y
-+#define PADDEDptr(x, y) x; unsigned y
-+#define PADDEDul(x, y) unsigned long x; unsigned y
-+# else
-+# error "neither mipseb nor mipsel?"
-+# endif
- #else
- #error endian?
- #endif
-Index: libaio-0.3.109/src/syscall-parisc.h
+Index: libaio-0.3.110/src/syscall-parisc.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-parisc.h
++++ libaio-0.3.110/src/syscall-parisc.h
@@ -0,0 +1,146 @@
+/*
+ * Linux system call numbers.
@@ -653,10 +481,10 @@ Index: libaio-0.3.109/src/syscall-parisc.h
+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
+}
+
-Index: libaio-0.3.109/src/syscall-arm.h
+Index: libaio-0.3.110/src/syscall-arm.h
===================================================================
---- libaio-0.3.109.orig/src/syscall-arm.h
-+++ libaio-0.3.109/src/syscall-arm.h
+--- libaio-0.3.110.orig/src/syscall-arm.h
++++ libaio-0.3.110/src/syscall-arm.h
@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3
return (type) __res_r0; \
}
diff --git a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
deleted file mode 100644
index e3d10585de..0000000000
--- a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Submitted
-
-Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-
----
- harness/cases/16.t | 2 ++
- src/libaio.h | 10 ++++++++++
- 2 files changed, 12 insertions(+)
-
---- a/src/libaio.h
-+++ b/src/libaio.h
-@@ -107,6 +107,16 @@
- # else
- # error "neither mipseb nor mipsel?"
- # endif
-+#elif defined(__aarch64__)
-+# if defined (__AARCH64EB__) /* big endian, 64 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x,y) x
-+#define PADDEDul(x, y) unsigned long x
-+# elif defined(__AARCH64EL__) /* little endian, 64 bits */
-+#define PADDED(x, y) x, y
-+#define PADDEDptr(x, y) x
-+#define PADDEDul(x, y) unsigned long x
-+# endif
- #else
- #error endian?
- #endif
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
new file mode 100644
index 0000000000..9d4bb46aaf
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
@@ -0,0 +1,58 @@
+From 62fd97fbc5c53835baa18f210fca593fc8b5c636 Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <jianchuan.wang@windriver.com>
+Date: Wed, 15 Oct 2014 07:04:02 +0800
+Subject: [PATCH] libaio: fix for mips64
+
+Add mips64 support in the libaio.h
+ - add macro PADDED/PADDEDptr/PADDEDul in the mips64 for structure iocb
+ to be matched userland with kernel
+
+Upstream-Status: Backport
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+---
+ src/libaio.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+Index: libaio-0.3.110/src/libaio.h
+===================================================================
+--- libaio-0.3.110.orig/src/libaio.h
++++ libaio-0.3.110/src/libaio.h
+@@ -51,7 +51,7 @@ typedef enum io_iocb_cmd {
+
+ /* little endian, 32 bits */
+ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
+- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
++ defined(__sh__) || defined(__bfin__) || (defined(__mips__) && defined(__MIPSEL__)) || \
+ defined(__cris__)
+ #define PADDED(x, y) x; unsigned y
+ #define PADDEDptr(x, y) x; unsigned y
+@@ -59,7 +59,8 @@ typedef enum io_iocb_cmd {
+
+ /* little endian, 64 bits */
+ #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
+- (defined(__aarch64__) && defined(__AARCH64EL__))
++ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
++ (defined(__mips64) && defined(__MIPSEL__))
+ #define PADDED(x, y) x, y
+ #define PADDEDptr(x, y) x
+ #define PADDEDul(x, y) unsigned long x
+@@ -67,7 +68,8 @@ typedef enum io_iocb_cmd {
+ /* big endian, 64 bits */
+ #elif defined(__powerpc64__) || defined(__s390x__) || \
+ (defined(__sparc__) && defined(__arch64__)) || \
+- (defined(__aarch64__) && defined(__AARCH64EB__))
++ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
++ (defined(__mips64) && defined(__MIPSEL__))
+ #define PADDED(x, y) unsigned y; x
+ #define PADDEDptr(x,y) x
+ #define PADDEDul(x, y) unsigned long x
+@@ -75,7 +77,7 @@ typedef enum io_iocb_cmd {
+ /* big endian, 32 bits */
+ #elif defined(__PPC__) || defined(__s390__) || \
+ (defined(__arm__) && defined(__ARMEB__)) || \
+- defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
++ defined(__sparc__) || (defined(__mips__) && defined(__MIPSEB__)) || defined(__m68k__) || \
+ defined(__hppa__) || defined(__frv__) || defined(__avr32__)
+ #define PADDED(x, y) unsigned y; x
+ #define PADDEDptr(x, y) unsigned y; x
diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch
deleted file mode 100644
index 4d88ec167b..0000000000
--- a/meta/recipes-extended/libaio/libaio/toolchain.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-8/27/2010 - created by Qing He <qing.he@intel.com>
-
-diff --git a/src/Makefile b/src/Makefile
-index 8d134cc..df8e5b6 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -2,7 +2,6 @@ prefix=/usr
- includedir=$(prefix)/include
- libdir=$(prefix)/lib
-
--ARCH := $(shell uname -m | sed -e s/i.86/i386/)
- CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
- SO_CFLAGS=-shared $(CFLAGS)
- L_CFLAGS=$(CFLAGS)
-@@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
-
- libaio.a: $(libaio_objs)
- rm -f libaio.a
-- ar r libaio.a $^
-- ranlib libaio.a
-+ $(AR) r libaio.a $^
-+ $(RANLIB) libaio.a
-
- $(libname): $(libaio_sobjs) libaio.map
- $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.110.bb
index 978f5f5fb5..9e364149d2 100644
--- a/meta/recipes-extended/libaio/libaio_0.3.109.bb
+++ b/meta/recipes-extended/libaio/libaio_0.3.110.bb
@@ -5,22 +5,20 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-PR = "r2"
-
SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
file://00_arches.patch \
- file://toolchain.patch \
file://destdir.patch \
file://libaio_fix_for_x32.patch \
- file://libaio-generic.patch \
- file://libaio-aarch64.patch \
file://libaio_fix_for_mips_syscalls.patch \
+ file://libaio_fix_for_mips64.patch \
"
-SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756"
-SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d"
+SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
+SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
+# Need libc for stack-protector's __stack_chk_fail_local() bounce function
+LDFLAGS_append_x86 = " -lc"
do_configure () {
sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile
diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
index 2a2d0f90f9..96e2d500ed 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -27,6 +27,7 @@ PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
+PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://libarchive-CVE-2013-0211.patch \
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb
index ff8d345ccb..4df1d08d8f 100644
--- a/meta/recipes-extended/libidn/libidn_0.6.14.bb
+++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -29,4 +29,5 @@ do_configure_prepend() {
do_install_append() {
rm -rf ${D}${libdir}/Libidn.dll
+ rm -rf ${D}${datadir}/emacs
}
diff --git a/meta/recipes-extended/libidn/libidn_1.28.bb b/meta/recipes-extended/libidn/libidn_1.29.bb
index bd079c1fe2..04b534474d 100644
--- a/meta/recipes-extended/libidn/libidn_1.28.bb
+++ b/meta/recipes-extended/libidn/libidn_1.29.bb
@@ -3,13 +3,13 @@ DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specification
HOMEPAGE = "http://www.gnu.org/software/libidn/"
SECTION = "libs"
LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3231f57e8fce0f62f81b03107e788888 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=b35f8839295dd730a55f1a19ec086217 \
file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://lib/idna.h;endline=21;md5=f73089b7f52dd2cb3540e274bd76106d \
- file://src/idn.c;endline=20;md5=d7797e6cc3a7b48e6050fc0d27104595"
+ file://lib/idna.h;endline=21;md5=61a0e126c0c5552290d9bfa57e407dd6 \
+ file://src/idn.c;endline=20;md5=3f55c28bede16bd7b1244be73067d195"
inherit pkgconfig autotools gettext texinfo
@@ -19,8 +19,8 @@ SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
file://dont-depend-on-help2man.patch \
"
-SRC_URI[md5sum] = "43a6f14b16559e10a492acc65c4b0acc"
-SRC_URI[sha256sum] = "dd357a968449abc97c7e5fa088a4a384de57cb36564f9d4e0d898ecc6373abfb"
+SRC_URI[md5sum] = "2b67bb507207af379f9461e1307dc84b"
+SRC_URI[sha256sum] = "fb82747dbbf9b36f703ed27293317d818d7e851d4f5773dedf3efa4db32a7c7c"
# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
# so package command into a separate package
diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
index 88e2d820ee..3edf002497 100644
--- a/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb
+++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
@@ -10,15 +10,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
DEPENDS += "xz-native"
PROVIDES = "virtual/librpc"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2;name=libtirpc \
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
file://libtirpc-0.2.1-fortify.patch \
"
SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch"
-SRC_URI[libtirpc.md5sum] = "847995e8d002cbf1387bda05947be086"
-SRC_URI[libtirpc.sha256sum] = "45c3e21dfc23a5ba501f9dfc6671678316fdfdb8355a1ec404ae2aa2f81943a1"
+SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368"
+SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db"
SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
index 0acc37d94f..0cf5aa2df2 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
@@ -29,6 +29,9 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
SRC_URI[md5sum] = "f7a88130ee9984b421ad8aa80629750a"
SRC_URI[sha256sum] = "4a71c1f6d8af41ed894b507720c4c17184dc320590013881d5170ca7f15c5bf7"
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+
EXTRA_OECONF = " \
--without-bzip2 \
--without-ldap \
@@ -37,7 +40,6 @@ EXTRA_OECONF = " \
--with-pcre \
--without-webdav-props \
--without-webdav-locks \
- --without-openssl \
--disable-static \
"
@@ -51,7 +53,7 @@ SYSTEMD_SERVICE_${PN} = "lighttpd.service"
do_install_append() {
install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
install -d ${D}${systemd_unitdir}/system
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
index 43068bdbd7..43ebcffbae 100644
--- a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
+++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -7,19 +7,20 @@ Upstream-Status: Submitted
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- config.c | 8 --------
- 1 files changed, 0 insertions(+), 8 deletions(-)
+ config.c | 9 ---------
+ 1 file changed, 9 deletions(-)
diff --git a/config.c b/config.c
-index a85d1df..24575b3 100644
+index e0eadb7..c23092f 100644
--- a/config.c
+++ b/config.c
-@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+@@ -1515,15 +1515,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
dirName, strerror(errno));
goto error;
}
-
-- if (sb.st_dev != sb2.st_dev) {
+- if (sb.st_dev != sb2.st_dev
+- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY))) {
- message(MESS_ERROR,
- "%s:%d olddir %s and log file %s "
- "are on different devices\n", configFile,
@@ -30,5 +31,4 @@ index a85d1df..24575b3 100644
}
--
-1.7.4.1
-
+1.7.9.5
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
deleted file mode 100644
index b386b85bf6..0000000000
--- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Rotates, compresses, removes and mails system log files"
-SECTION = "console/utils"
-HOMEPAGE = "https://fedorahosted.org/logrotate/"
-LICENSE = "GPLv2"
-
-DEPENDS="coreutils popt"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
- file://act-as-mv-when-rotate.patch \
- file://disable-check-different-filesystems.patch \
- file://update-the-manual.patch \
- "
-
-SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213"
-SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64"
-
-EXTRA_OEMAKE = ""
-
-do_install(){
- oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
- mkdir -p ${D}${sysconfdir}/logrotate.d
- mkdir -p ${D}${sysconfdir}/cron.daily
- mkdir -p ${D}${localstatedir}/lib
- install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
- install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
- touch ${D}${localstatedir}/lib/logrotate.status
-}
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
new file mode 100644
index 0000000000..00432dede2
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
@@ -0,0 +1,62 @@
+SUMMARY = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://fedorahosted.org/logrotate/"
+LICENSE = "GPLv2"
+
+# TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it.
+# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
+ file://act-as-mv-when-rotate.patch \
+ file://update-the-manual.patch \
+ file://disable-check-different-filesystems.patch \
+ "
+
+SRC_URI[md5sum] = "49846e873dddea15964cd0355b9943ca"
+SRC_URI[sha256sum] = "46a1510ef4a1f4359edd5f361112cfd1523942e85ff28e6cbb0c81bad1829d0f"
+
+PACKAGECONFIG ?= "\
+ ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+ LFS= \
+ OS_NAME='${OS_NAME}' \
+ \
+ 'CC=${CC}' \
+ 'RPM_OPT_FLAGS=${CFLAGS}' \
+ 'EXTRA_LDFLAGS=${LDFLAGS}' \
+ \
+ ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+ ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
+do_install(){
+ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir}
+ mkdir -p ${D}${sysconfdir}/logrotate.d
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${localstatedir}/lib
+ install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+ install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+ touch ${D}${localstatedir}/lib/logrotate.status
+}
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index d265731e04..b4ef98eea7 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
PR = "r2"
# lsb_release needs getopt
-RDEPENDS_${PN} += "util-linux"
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}"
LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
@@ -21,6 +21,8 @@ SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
S = "${WORKDIR}/lsb-release-1.4"
+CLEANBROKEN = "1"
+
do_install(){
oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
@@ -119,3 +121,11 @@ FILES_${PN} += "/lib64 \
${base_libdir}/lsb/* \
${libdir}/sendmail \
"
+
+# The sysroot/${libdir}/sendmail conflicts with esmtp's, and it's a
+# symlink to ${sbindir}/sendmail which is meaningless for sysroot, so
+# remove it.
+SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_sendmail"
+remove_sysroot_sendmail() {
+ rm -r "${SYSROOT_DESTDIR}${libdir}/sendmail"
+}
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.54.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.60.bb
index 29ec7024d2..f67eff7271 100644
--- a/meta/recipes-extended/lsb/lsbinitscripts_9.54.bb
+++ b/meta/recipes-extended/lsb/lsbinitscripts_9.60.bb
@@ -6,12 +6,12 @@ DEPENDS = "popt glib-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.54.tar.bz2/cf63862785d224394053f081865eb853/initscripts-9.54.tar.bz2 \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.60.tar.bz2/5c9cd83e4e04257fef3ffd8e549b7f81/initscripts-9.60.tar.bz2 \
file://functions.patch \
"
-SRC_URI[md5sum] = "cf63862785d224394053f081865eb853"
-SRC_URI[sha256sum] = "686a9aa4d265fc26f134163b2ceb02d421b72c49d97197c285f39087753b0b19"
+SRC_URI[md5sum] = "5c9cd83e4e04257fef3ffd8e549b7f81"
+SRC_URI[sha256sum] = "254508884ceeef22e24f4e8b051bb51958ae8252bd7b02cd2b7bcce3fb453dc2"
inherit update-alternatives
@@ -27,4 +27,5 @@ do_compile[noexec] = "1"
do_install(){
install -d ${D}${sysconfdir}/init.d/
install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
+ sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${D}${sysconfdir}/init.d/functions
}
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
index ab79985b1b..b9971a17d1 100644
--- a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2012 Wind River Systems, Inc.
#
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.88.bb
index 5676cd9822..0e49f9217c 100644
--- a/meta/recipes-extended/lsof/lsof_4.87.bb
+++ b/meta/recipes-extended/lsof/lsof_4.88.bb
@@ -6,8 +6,8 @@ LICENSE = "BSD"
SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
-SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
-SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
+SRC_URI[md5sum] = "1b29c10db4aa88afcaeeaabeef6790db"
+SRC_URI[sha256sum] = "fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b"
LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
S = "${WORKDIR}/lsof_${PV}_src"
@@ -15,9 +15,16 @@ S = "${WORKDIR}/lsof_${PV}_src"
LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
python do_unpack () {
+ # temporarily change S for unpack
+ # of lsof_${PV}
+ s = d.getVar('S')
+ d.setVar('S', '${WORKDIR}/lsof_${PV}')
bb.build.exec_func('base_do_unpack', d)
+ # temporarily change SRC_URI for unpack
+ # of lsof_${PV}_src
src_uri = d.getVar('SRC_URI')
d.setVar('SRC_URI', '${LOCALSRC}')
+ d.setVar('S', s)
bb.build.exec_func('base_do_unpack', d)
d.setVar('SRC_URI', src_uri)
}
@@ -30,8 +37,8 @@ export LSOF_INCLUDE = "${STAGING_INCDIR}"
do_configure () {
export LSOF_AR="${AR} cr"
export LSOF_RANLIB="${RANLIB}"
- if [ "x${EGLIBCVERSION}" != "x" ];then
- LINUX_CLIB=`echo ${EGLIBCVERSION} |sed -e 's,\.,,g'`
+ if [ "x${GLIBCVERSION}" != "x" ];then
+ LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
export LINUX_CLIB
fi
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
new file mode 100644
index 0000000000..064f00ae3d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
@@ -0,0 +1,39 @@
+[PATCH] add knob to control whether numa support should be checked
+
+Upstream-Status: Pending
+
+otherwise the random dependency will be generated
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure.ac | 10 +-
+diff --git a/configure.ac b/configure.ac
+index 9f397e7..1357256 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -142,6 +142,12 @@ else
+ AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
+ fi
+
++AC_ARG_WITH([numa],
++ AC_HELP_STRING([--without-numa],
++ [without the numa support]),
++ [],[with_numa=yes],
++)
++
+ AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
+
+ # END testsuites knobs
+@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
+ LTP_CHECK_SYSCALL_EVENTFD
+ LTP_CHECK_SYSCALL_KEYCTL
+ LTP_CHECK_SYSCALL_MODIFY_LDT
++if test "x$with_numa" = xyes; then
+ LTP_CHECK_SYSCALL_NUMA
++fi
+ LTP_CHECK_SYSCALL_QUOTACTL
+ LTP_CHECK_SYSCALL_SIGNALFD
+ LTP_CHECK_SYSCALL_UNSHARE
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
new file mode 100644
index 0000000000..36ff4c775d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
@@ -0,0 +1,37 @@
+[PATCH] add knob to control whether tirpc support should be checked
+
+Upstream-Status: Pending
+
+tirpc support is broken upstream. in the meantime, allow to disable tirpc.
+
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+---
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
+ else
+ AC_SUBST([WITH_PYTHON],["no"])
+ fi
++
++# TI RPC
++AC_ARG_WITH([tirpc],
++ AC_HELP_STRING([--without-tirpc],
++ [without libtirpc support]),
++ [],[with_tirpc=yes],
++)
+ # END tools knobs
+
+ # Testsuites knobs
+@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT
+ LTP_CHECK_FALLOCATE
+ LTP_CHECK_SYSCALL_FCNTL
+ LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
++if test "x$with_tirpc" = xyes; then
+ LTP_CHECK_TIRPC
++fi
+ LTP_CHECK_TEE
+ LTP_CHECK_SPLICE
+ LTP_CHECK_VMSPLICE
diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
new file mode 100644
index 0000000000..4836010bdf
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
+[PATCH] make setregid02 work
+
+Upstream-Status: Inappropriate [configuration]
+
+there is no "nobody" group in oe-core, the user "nobody" belongs to
+"nogroup" group, so replace nobody with nogroup to make the test pass
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
+index 8058627..866bee4 100644
+--- a/testcases/kernel/syscalls/setregid/setregid02.c
++++ b/testcases/kernel/syscalls/setregid/setregid02.c
+@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
+
+ static struct passwd *ltpuser;
+
+-static struct group nobody, root, bin;
++static struct group nogroup, root, bin;
+
+ /*
+ * The following structure contains all test data. Each structure in the array
+@@ -57,17 +57,17 @@ struct test_data_t {
+ char *test_msg;
+ } test_data[] = {
+ {
+- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
++ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(-1, root),"}, {
+- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
++ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(-1, bin)"}, {
+- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ "After setregid(root,-1),"}, {
+- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ "After setregid(bin, -1),"}, {
+- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
++ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(root, bin)"}, {
+- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
++ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(bin, root),"}
+ };
+
+@@ -165,7 +165,7 @@ static void setup(void)
+ } while (0)
+
+ GET_GID(root);
+- GET_GID(nobody);
++ GET_GID(nogroup);
+ GET_GID(bin);
+
+ TEST_PAUSE;
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20150119.bb
index 995d6170ee..b422646903 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20150119.bb
@@ -19,12 +19,15 @@ LIC_FILES_CHKSUM = "\
file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
"
-DEPENDS = "attr libaio libcap acl openssl"
-SRCREV = "f4c3bfe1eab51eb72caeb0f3336d2790c9a8bd1b"
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+SRCREV = "b6ab85d764339b025526bdaf0b5026a67b3a677a"
SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
file://ltp-Do-not-link-against-libfl.patch \
+ file://make-setregid02-work.patch \
+ file://add-knob-for-numa.patch \
+ file://add-knob-for-tirpc.patch \
"
S = "${WORKDIR}/git"
@@ -36,13 +39,11 @@ TARGET_CC_ARCH += "${LDFLAGS}"
export prefix = "/opt/ltp"
export exec_prefix = "/opt/ltp"
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-
-# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
-# we explicitly force regeneration of that directory and pass configure options.
-do_configure_append() {
- (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
-}
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
# The makefiles make excessive use of make -C and several include testcases.mk
# which triggers a build of the syscall header. To reproduce, build ltp,
@@ -58,13 +59,9 @@ do_install(){
# Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-
- # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core
- # We will add expect for enhancement in future
- find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f
}
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs"
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect"
FILES_${PN}-dbg += "\
/opt/ltp/runtest/.debug \
diff --git a/meta/recipes-extended/man-pages/man-pages_3.69.bb b/meta/recipes-extended/man-pages/man-pages_3.76.bb
index 6ddae51ed0..ed8a15f51d 100644
--- a/meta/recipes-extended/man-pages/man-pages_3.69.bb
+++ b/meta/recipes-extended/man-pages/man-pages_3.76.bb
@@ -7,8 +7,8 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-SRC_URI[md5sum] = "6ba05c9633edba4da64160b95ab7299d"
-SRC_URI[sha256sum] = "933ecb86ac9cce6736540d2556c49f362e34c8417fb708a3b1fe3eb3072b2217"
+SRC_URI[md5sum] = "d00cf09677caefc3e827737afc565583"
+SRC_URI[sha256sum] = "eff558c13b61a46136994514b3ec00a74dcf00414d3bde4f0edca80a36d36359"
RDEPENDS_${PN} = "man"
@@ -27,3 +27,10 @@ do_install() {
# Only deliveres man-pages so FILES_${PN} gets everything
FILES_${PN}-doc = ""
FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf
index bb3c69720e..fc10be2758 100644
--- a/meta/recipes-extended/man/man/man.conf
+++ b/meta/recipes-extended/man/man/man.conf
@@ -133,7 +133,8 @@ MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
# The command given must act as a filter.
#
.gz /bin/gunzip -c
-.bz2 /bin/bzip2 -c -d
+.bz2 /usr/bin/bunzip2 -c
+.xz /usr/bin/unxz -c
.z
.Z /bin/zcat
.F
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
index a66e01cb9a..cd9edbed89 100644
--- a/meta/recipes-extended/man/man_1.6g.bb
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -9,7 +9,20 @@ PR = "r1"
DEPENDS = "groff less"
-SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
+def compress_pkg(d):
+ if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+ compress = d.getVar("DOC_COMPRESS", True)
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
+
+SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \
file://man-1.5k-confpath.patch;striplevel=0 \
file://man-1.5h1-make.patch \
file://man-1.5k-nonascii.patch \
@@ -47,7 +60,7 @@ do_configure () {
}
-fakeroot do_install() {
+do_install() {
oe_runmake install DESTDIR=${D}
}
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch
new file mode 100644
index 0000000000..e23d9dd81c
--- /dev/null
+++ b/meta/recipes-extended/mc/mc/mc-CTRL.patch
@@ -0,0 +1,31 @@
+Fix build with musl by ensuring CTRL is defined.
+
+musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h>
+explicitly but it's easier just to ensure CTRL is defined.
+
+This patch is taken from Sabotage Linux, the license statement for patches and
+build scripts in Sabotage Linux says:
+
+ To the extent possible under law, Christian Neukirchen has waived
+ all copyright and related or neighboring rights to this work.
+
+ http://creativecommons.org/publicdomain/zero/1.0/
+
+Therefore this should be good to include in OpenEmbedded.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Accepted (should be included in v4.8.14)
+
+diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c
+--- mc-4.8.1.7.org/lib/tty/tty-ncurses.c
++++ mc-4.8.1.7/lib/tty/tty-ncurses.c
+@@ -65,7 +65,7 @@
+
+ /*** file scope macro definitions ****************************************************************/
+
+-#if defined(_AIX) && !defined(CTRL)
++#if !defined(CTRL)
+ #define CTRL(x) ((x) & 0x1f)
+ #endif
+
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb
index 0e4434c7d9..b47eb02323 100644
--- a/meta/recipes-extended/mc/mc_4.7.5.2.bb
+++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -8,7 +8,9 @@ RDEPENDS_${PN} = "ncurses-terminfo"
PR = "r3"
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ file://mc-CTRL.patch \
+ "
SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
diff --git a/meta/recipes-extended/mc/mc_4.8.12.bb b/meta/recipes-extended/mc/mc_4.8.13.bb
index b8971931d9..ef5b1a23e2 100644
--- a/meta/recipes-extended/mc/mc_4.8.12.bb
+++ b/meta/recipes-extended/mc/mc_4.8.13.bb
@@ -6,10 +6,12 @@ SECTION = "console/utils"
DEPENDS = "ncurses glib-2.0"
RDEPENDS_${PN} = "ncurses-terminfo"
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ file://mc-CTRL.patch \
+ "
-SRC_URI[md5sum] = "a64c426364bfaee56b628f6c0738aade"
-SRC_URI[sha256sum] = "1054fcc27a488771cbe5b85d7c10135fa1cd1b7682a19930d44b51a023e39396"
+SRC_URI[md5sum] = "12a521a50da6a86852177591b9623d5e"
+SRC_URI[sha256sum] = "22e1b809edba957eb9a392138bf87fea3877f7ca0b7463b7cc2eb94afa6f3e49"
inherit autotools gettext pkgconfig
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
index 40d68d6664..7140990396 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
@@ -8,13 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://mdadm-3.2.2_fix_for_x32.patch \
file://gcc-4.9.patch \
"
-SRC_URI[md5sum] = "8ac04259cdd74b4566c3b6dea9414b57"
-SRC_URI[sha256sum] = "9c07e518bdf3392ebac8874eb686258e10ea3ae0ff7a8acb6d014718a9c3ed45"
+SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220"
+SRC_URI[sha256sum] = "0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c"
CFLAGS += "-fno-strict-aliasing"
@@ -32,6 +32,7 @@ EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
# int-ll64.h included
EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
do_compile() {
oe_runmake
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb
index f1936afd23..3c16228b0d 100644
--- a/meta/recipes-extended/mingetty/mingetty_1.08.bb
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
PR = "r3"
LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
-SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990"
SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
index 4b7024ba85..c9ad1da253 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
@@ -9,15 +9,15 @@ DEPENDS = "zlib gnutls"
#COPYING or Licence
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
"
-SRC_URI[md5sum] = "aa60e22211118f222470439cea60f795"
-SRC_URI[sha256sum] = "2bf0c5c7e78f9905f48de235a75111a1a88238793043bbeae00360b22f1a5f88"
+SRC_URI[md5sum] = "6ebba4809bbc665b8a665a018d1a5ee1"
+SRC_URI[sha256sum] = "c45d47f2dc77484e3f74c0f66aef0d5d95de6c47ed71d9f926d86d546f8346f3"
inherit gettext autotools update-alternatives pkgconfig
-EXTRA_OECONF += "--without-gnome-keyring --without-libidn"
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
ALTERNATIVE_${PN} = "sendmail"
ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
new file mode 100644
index 0000000000..06f81420e9
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
@@ -0,0 +1,32 @@
+From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Wed, 7 Dec 2011 19:14:09 +0100
+Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64
+
+Upstream-Status: Backport
+
+commit 81814dc2b14843009193efd307d814c26baa61f0 from
+git://git.code.sf.net/p/net-tools/code
+
+---
+ ifconfig.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ifconfig.c b/ifconfig.c
+index bc405c6..dae8922 100644
+--- a/ifconfig.c
++++ b/ifconfig.c
+@@ -890,7 +890,9 @@ int main(int argc, char **argv)
+ continue;
+ }
+
+- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
++ /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
++ ip = 0;
++ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
+
+ if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
+ fprintf(stderr, _("Interface %s not initialized\n"),
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
index 5a7b3070c8..0e4ee754a4 100644
--- a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
file://net-tools-config.h \
- file://net-tools-config.make"
+ file://net-tools-config.make \
+ file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
+ "
S = "${WORKDIR}/net-tools-1.60"
@@ -32,6 +34,7 @@ nettools_do_patch() {
cd ${S}
quilt pop -a || true
if [ -d ${S}/.pc-nettools ]; then
+ rm -rf ${S}/.pc
mv ${S}/.pc-nettools ${S}/.pc
QUILT_PATCHES=${S}/debian/patches quilt pop -a
rm -rf ${S}/.pc ${S}/debian
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
index d591fbd3d2..d591fbd3d2 100644
--- a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb
+++ b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
diff --git a/meta/recipes-extended/newt/libnewt_0.52.17.bb b/meta/recipes-extended/newt/libnewt_0.52.18.bb
index 09b017e24e..fa2493b554 100644
--- a/meta/recipes-extended/newt/libnewt_0.52.17.bb
+++ b/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -17,16 +17,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
# slang needs to be >= 2.2
DEPENDS = "slang popt"
-PR = "r2"
-
SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
file://remove_slang_include.patch \
file://fix_SHAREDDIR.patch \
file://cross_ar.patch \
"
-SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b"
-SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b"
+SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
+SRC_URI[sha256sum] = "771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e"
S = "${WORKDIR}/newt-${PV}"
@@ -34,6 +32,8 @@ EXTRA_OECONF = "--without-tcl --without-python"
inherit autotools-brokensep
+CLEANBROKEN = "1"
+
export STAGING_INCDIR
export STAGING_LIBDIR
@@ -46,4 +46,9 @@ do_configure_prepend() {
sh autogen.sh
}
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
FILES_whiptail = "${bindir}/whiptail"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index 0c9d4dc952..e0f32e0a1d 100644
--- a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -25,7 +25,6 @@ PACKAGES = "\
"
-RPROVIDES_packagegroup-core-lsb = "task-core-lsb"
RDEPENDS_packagegroup-core-lsb = "\
packagegroup-core-sys-extended \
packagegroup-core-db \
@@ -129,7 +128,7 @@ RDEPENDS_packagegroup-core-lsb-core = "\
cups \
diffutils \
ed \
- eglibc-utils \
+ glibc-utils \
elfutils \
file \
findutils \
@@ -159,7 +158,7 @@ RDEPENDS_packagegroup-core-lsb-core = "\
util-linux \
xdg-utils \
\
- eglibc \
+ glibc \
libgcc \
libpam \
libxml2 \
@@ -212,6 +211,7 @@ QT4PKGS = " \
${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
"
QT4PKGS_mips64 = ""
+QT4PKGS_mips64n32 = ""
SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
@@ -246,13 +246,13 @@ RDEPENDS_packagegroup-core-lsb-runtime-add = "\
libxml-parser-perl \
libxml-perl \
libxml-sax-perl \
- eglibc-localedatas \
- eglibc-gconvs \
- eglibc-charmaps \
- eglibc-binaries \
- eglibc-localedata-posix \
- eglibc-extra-nss \
- eglibc-pcprofile \
+ glibc-localedatas \
+ glibc-gconvs \
+ glibc-charmaps \
+ glibc-binaries \
+ glibc-localedata-posix \
+ glibc-extra-nss \
+ glibc-pcprofile \
libclass-isa-perl \
libenv-perl \
libdumpvalue-perl \
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
new file mode 100644
index 0000000000..680029ae0d
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
@@ -0,0 +1,226 @@
+From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 12 Sep 2014 05:35:05 -0400
+Subject: [PATCH] libpam/xtests: remove bash dependency
+
+There's not bash specific syntax in the xtest scripts:
+
+ # after below patches applied:
+ $ cd Linux-PAM-1.1.6/xtests
+ $ checkbashisms *.sh
+ No output
+
+Just remove the runtime dependency to bash.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ xtests/run-xtests.sh | 2 +-
+ xtests/tst-pam_access1.sh | 2 +-
+ xtests/tst-pam_access2.sh | 2 +-
+ xtests/tst-pam_access3.sh | 2 +-
+ xtests/tst-pam_access4.sh | 2 +-
+ xtests/tst-pam_assemble_line1.sh | 2 +-
+ xtests/tst-pam_group1.sh | 2 +-
+ xtests/tst-pam_limits1.sh | 2 +-
+ xtests/tst-pam_pwhistory1.sh | 2 +-
+ xtests/tst-pam_substack1.sh | 2 +-
+ xtests/tst-pam_substack2.sh | 2 +-
+ xtests/tst-pam_substack3.sh | 2 +-
+ xtests/tst-pam_substack4.sh | 2 +-
+ xtests/tst-pam_substack5.sh | 2 +-
+ xtests/tst-pam_succeed_if1.sh | 2 +-
+ xtests/tst-pam_unix1.sh | 2 +-
+ xtests/tst-pam_unix2.sh | 2 +-
+ xtests/tst-pam_unix3.sh | 2 +-
+ xtests/tst-pam_unix4.sh | 2 +-
+ 19 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh
+index 3a89057..1cf8684 100755
+--- a/xtests/run-xtests.sh
++++ b/xtests/run-xtests.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ SRCDIR=$1
+ shift 1
+diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh
+index 180d256..70521d2 100755
+--- a/xtests/tst-pam_access1.sh
++++ b/xtests/tst-pam_access1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/groupadd tstpamaccess
+ /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1
+diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh
+index 0a30275..7e3e60f 100755
+--- a/xtests/tst-pam_access2.sh
++++ b/xtests/tst-pam_access2.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/groupadd tstpamaccess
+ /usr/sbin/useradd -p '!!' tstpamaccess2
+diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh
+index 348e0c3..3630e2e 100755
+--- a/xtests/tst-pam_access3.sh
++++ b/xtests/tst-pam_access3.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd -p '!!' tstpamaccess3
+ ./tst-pam_access3
+diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh
+index 61e7b44..4538df4 100755
+--- a/xtests/tst-pam_access4.sh
++++ b/xtests/tst-pam_access4.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd -p '!!' tstpamaccess4
+ ./tst-pam_access4
+diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh
+index 248d47e..dc2a675 100755
+--- a/xtests/tst-pam_assemble_line1.sh
++++ b/xtests/tst-pam_assemble_line1.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authfail tst-pam_assemble_line1
+diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh
+index b76377f..44faca9 100755
+--- a/xtests/tst-pam_group1.sh
++++ b/xtests/tst-pam_group1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/groupadd tstpamgrpg
+ /usr/sbin/useradd -p '!!' tstpamgrp
+diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh
+index 4faa822..32c021d 100755
+--- a/xtests/tst-pam_limits1.sh
++++ b/xtests/tst-pam_limits1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd -p '!!' tstpamlimits
+ ./tst-pam_limits1
+diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh
+index ddb3b8b..0f212e2 100644
+--- a/xtests/tst-pam_pwhistory1.sh
++++ b/xtests/tst-pam_pwhistory1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd tstpampwhistory
+ ./tst-pam_pwhistory1
+diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh
+index 5260175..f1b72a7 100755
+--- a/xtests/tst-pam_substack1.sh
++++ b/xtests/tst-pam_substack1.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authfail tst-pam_substack1
+diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh
+index c02f597..3804fa7 100755
+--- a/xtests/tst-pam_substack2.sh
++++ b/xtests/tst-pam_substack2.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authsucceed tst-pam_substack2
+diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh
+index 0e572aa..aa48e8e 100755
+--- a/xtests/tst-pam_substack3.sh
++++ b/xtests/tst-pam_substack3.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authsucceed tst-pam_substack3
+diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh
+index a3ef08a..958a07a 100755
+--- a/xtests/tst-pam_substack4.sh
++++ b/xtests/tst-pam_substack4.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authsucceed tst-pam_substack4
+diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh
+index e2714fd..7e0da74 100755
+--- a/xtests/tst-pam_substack5.sh
++++ b/xtests/tst-pam_substack5.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+
+ exec ./tst-pam_authfail tst-pam_substack5
+diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh
+index a643b2e..58e57b4 100755
+--- a/xtests/tst-pam_succeed_if1.sh
++++ b/xtests/tst-pam_succeed_if1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd -p '!!' tstpamtest
+ /usr/sbin/useradd -p '!!' pamtest
+diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh
+index f75bd84..72deac0 100755
+--- a/xtests/tst-pam_unix1.sh
++++ b/xtests/tst-pam_unix1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ /usr/sbin/useradd -p '!!' tstpamunix
+ ./tst-pam_unix1
+diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh
+index 7093155..c04d6e6 100755
+--- a/xtests/tst-pam_unix2.sh
++++ b/xtests/tst-pam_unix2.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # pamunix0 = 0aXKZztA.d1KY
+ /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix
+diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh
+index ef4a07c..b52db2b 100755
+--- a/xtests/tst-pam_unix3.sh
++++ b/xtests/tst-pam_unix3.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
+ /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh
+index 787c2f9..e7976fd 100755
+--- a/xtests/tst-pam_unix4.sh
++++ b/xtests/tst-pam_unix4.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
+ /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 3190aaf0d1..b3b39da864 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -26,6 +26,7 @@ SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
file://pam-security-abstract-securetty-handling.patch \
file://pam-unix-nullok-secure.patch \
file://pam_timestamp-fix-potential-directory-traversal-issu.patch \
+ file://libpam-xtests-remove-bash-dependency.patch \
"
SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
@@ -61,7 +62,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libd
FILES_${PN}-runtime = "${sysconfdir}"
FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
-PACKAGES_DYNAMIC += "^pam-plugin-.*"
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
def get_multilib_bit(d):
baselib = d.getVar('baselib', True) or ''
@@ -69,12 +70,27 @@ def get_multilib_bit(d):
libpam_suffix = "suffix${@get_multilib_bit(d)}"
-RPROVIDES_${PN} += "libpam-${libpam_suffix}"
-RPROVIDES_${PN}-runtime += "libpam-runtime-${libpam_suffix}"
-
-RDEPENDS_${PN}-runtime = "libpam-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
-RDEPENDS_${PN}-xtests = "libpam-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
-RRECOMMENDS_${PN} = "libpam-runtime-${libpam_suffix}"
+RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
+RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
+
+RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
+ "
+RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
+ coreutils"
+
+# FIXME: Native suffix breaks here, disable it for now
+RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
+RRECOMMENDS_${PN}_class-native = ""
python populate_packages_prepend () {
def pam_plugin_append_file(pn, dir, file):
@@ -85,14 +101,14 @@ python populate_packages_prepend () {
d.setVar('FILES_' + pn, nf)
def pam_plugin_hook(file, pkg, pattern, format, basename):
+ pn = d.getVar('PN', True)
libpam_suffix = d.getVar('libpam_suffix', True)
- mlprefix = d.getVar('MLPREFIX', True) or ''
rdeps = d.getVar('RDEPENDS_' + pkg, True)
if rdeps:
- rdeps = rdeps + " " + mlprefix + "libpam-" + libpam_suffix
+ rdeps = rdeps + " " + pn + "-" + libpam_suffix
else:
- rdeps = mlprefix + "libpam-" + libpam_suffix
+ rdeps = pn + "-" + libpam_suffix
d.setVar('RDEPENDS_' + pkg, rdeps)
provides = d.getVar('RPROVIDES_' + pkg, True)
@@ -102,19 +118,22 @@ python populate_packages_prepend () {
provides = pkg + "-" + libpam_suffix
d.setVar('RPROVIDES_' + pkg, provides)
+ mlprefix = d.getVar('MLPREFIX', True) or ''
dvar = bb.data.expand('${WORKDIR}/package', d, True)
pam_libdir = d.expand('${base_libdir}/security')
pam_sbindir = d.expand('${sbindir}')
pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
+ pam_pkgname = mlprefix + 'pam-plugin%s'
- do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
- mlprefix = d.getVar('MLPREFIX', True) or ''
+ do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
+ 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
+ pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
}
@@ -142,3 +161,11 @@ python do_pam_sanity () {
bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
}
addtask pam_sanity before do_configure
+
+BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
diff --git a/meta/recipes-extended/parted/parted-3.1/Makefile b/meta/recipes-extended/parted/files/Makefile
index ee90be0814..ee90be0814 100644
--- a/meta/recipes-extended/parted/parted-3.1/Makefile
+++ b/meta/recipes-extended/parted/files/Makefile
diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
new file mode 100644
index 0000000000..68ab715f32
--- /dev/null
+++ b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
@@ -0,0 +1,57 @@
+From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 13 Nov 2014 11:29:33 +0800
+Subject: [PATCH] libparted/arch/linux.c: fix compile failure while
+ --disable-device-mapper
+
+While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is
+undef, but it missed to scope some device mapper functions.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libparted/arch/linux.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
+index 6fd73c5..2afa479 100644
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...)
+ static char *
+ dm_canonical_path (PedDevice const *dev)
+ {
++#ifdef ENABLE_DEVICE_MAPPER
+ LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
+
+ /* Get map name from devicemapper */
+@@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev)
+ dm_task_destroy (task);
+ return dev_name;
+ err:
++#endif
+ return NULL;
+ }
+
+@@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk)
+ unsigned long long *start,
+ unsigned long long *length);
+
+-
++#ifdef ENABLE_DEVICE_MAPPER
+ if (disk->dev->type == PED_DEVICE_DM) {
+ add_partition = _dm_add_partition;
+ remove_partition = _dm_remove_partition;
+ resize_partition = _dm_resize_partition;
+ get_partition_start_and_length = _dm_get_partition_start_and_length;
+- } else {
++ } else
++#endif
++ {
+ add_partition = _blkpg_add_partition;
+ remove_partition = _blkpg_remove_partition;
+ #ifdef BLKPG_RESIZE_PARTITION
+--
+1.9.1
+
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
index 0711d4e297..0711d4e297 100644
--- a/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch
+++ b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/no_check.patch b/meta/recipes-extended/parted/files/no_check.patch
index 58d8db4426..58d8db4426 100644
--- a/meta/recipes-extended/parted/parted-3.1/no_check.patch
+++ b/meta/recipes-extended/parted/files/no_check.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/run-ptest b/meta/recipes-extended/parted/files/run-ptest
index 695c5e8a7b..695c5e8a7b 100644
--- a/meta/recipes-extended/parted/parted-3.1/run-ptest
+++ b/meta/recipes-extended/parted/files/run-ptest
diff --git a/meta/recipes-extended/parted/parted-3.1/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch
index e9bbe9a956..e9bbe9a956 100644
--- a/meta/recipes-extended/parted/parted-3.1/syscalls.patch
+++ b/meta/recipes-extended/parted/files/syscalls.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
deleted file mode 100644
index c4ca06d407..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-
-From: Gustavo Zacarias
-Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef
-Date: Mon, 3 Mar 2014 10:40:08 -0300
-
-The CPPFunction typedef (among others) have been deprecated in favour of
-specific prototyped typedefs since readline 4.2 (circa 2001).
-It's been working since because compatibility typedefs have been in
-place until they where removed in the recent readline 6.3 release.
-Switch to the new style to avoid build breakage.
-
-Signed-off-by: Gustavo Zacarias <address@hidden>
-
-Upstream-Status: Backport
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
----
- parted/ui.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/parted/ui.c b/parted/ui.c
-index 786deed..b33f6fc 100644
---- a/parted/ui.c
-+++ b/parted/ui.c
-@@ -1470,7 +1470,7 @@ init_readline (void)
- #ifdef HAVE_LIBREADLINE
- if (!opt_script_mode) {
- rl_initialize ();
-- rl_attempted_completion_function = (CPPFunction*) complete_function;
-+ rl_attempted_completion_function = (rl_completion_func_t *) complete_function;
- readline_state.in_readline = 0;
- }
- #endif
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
deleted file mode 100644
index b1eae97988..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- dvh.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-Index: parted-3.1/libparted/labels/dvh.h
-===================================================================
---- parted-3.1.orig/libparted/labels/dvh.h 2013-02-25 10:46:13.204477586 +0800
-+++ parted-3.1/libparted/labels/dvh.h 2013-02-25 10:47:20.954477065 +0800
-@@ -112,8 +112,8 @@ struct device_parameters {
-
- struct volume_directory {
- char vd_name[VDNAMESIZE]; /* name */
-- int vd_lbn; /* logical block number */
-- int vd_nbytes; /* file length in bytes */
-+ unsigned int vd_lbn; /* logical block number */
-+ unsigned int vd_nbytes; /* file length in bytes */
- };
-
- /*
-@@ -125,9 +125,9 @@ struct volume_directory {
- * NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED
- */
- struct partition_table { /* one per logical partition */
-- int pt_nblks; /* # of logical blks in partition */
-- int pt_firstlbn; /* first lbn of partition */
-- int pt_type; /* use of partition */
-+ unsigned int pt_nblks; /* # of logical blks in partition */
-+ unsigned int pt_firstlbn; /* first lbn of partition */
-+ int pt_type; /* use of partition */
- };
-
- #define PTYPE_VOLHDR 0 /* partition is volume header */
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
deleted file mode 100644
index a9f26e9781..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Accepted [Expected to be included in parted versions > 3.1]
-Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9
-
-From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001
-From: Andreas Oberritter <obi@opendreambox.org>
-Date: Sun, 18 Mar 2012 17:39:14 +0000
-Subject: git-version-gen: don't let "prefix" envvar cause trouble
-
-* build-aux/git-version-gen (prefix): Initialize properly,
-so as not to use a value specified via the environment.
-Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
----
-diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
-index d5542a2..0fa9063 100755
---- a/build-aux/git-version-gen
-+++ b/build-aux/git-version-gen
-@@ -1,6 +1,6 @@
- #!/bin/sh
- # Print a version string.
--scriptversion=2012-01-06.07; # UTC
-+scriptversion=2012-03-18.17; # UTC
-
- # Copyright (C) 2007-2012 Free Software Foundation, Inc.
- #
-@@ -92,6 +92,8 @@ Options:
-
- Running without arguments will suffice in most cases."
-
-+prefix=v
-+
- while test $# -gt 0; do
- case $1 in
- --help) echo "$usage"; exit 0;;
-@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then
- fi
-
- tag_sed_script="${tag_sed_script:-s/x/x/}"
--prefix="${prefix:-v}"
-
- nl='
- '
---
-cgit v0.9.0.2
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.2.bb
index 9057463c7e..e2257696d7 100644
--- a/meta/recipes-extended/parted/parted_3.1.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -9,16 +9,14 @@ PR = "r1"
SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
file://no_check.patch \
file://syscalls.patch \
- file://fix-git-version-gen.patch \
file://fix-doc-mandir.patch \
- file://fix-dvh-overflows.patch \
- file://fix-deprecated-readline.patch \
+ file://fix-compile-failure-while-dis.patch \
file://run-ptest \
file://Makefile \
"
-SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb"
-SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15"
+SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
+SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
EXTRA_OECONF = "--disable-device-mapper"
@@ -42,4 +40,4 @@ do_install_ptest() {
sed -e 's| ../parted||' -i $t/tests/*.sh
}
-RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup"
+RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python"
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
index 0c10688feb..ad04871a8e 100644
--- a/meta/recipes-extended/pax/pax_3.4.bb
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -1,6 +1,6 @@
SUMMARY = "Portable Archive eXchange"
DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
-HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
BUGTRACKER = "http://www.openbsd.org/query-pr.html"
LICENSE = "BSD"
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
SECTION = "base"
PR = "r2"
-SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
file://fix_for_compile_with_gcc-4.6.0.patch \
file://pax-3.4_fix_for_x32.patch"
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
index 9c2c9d5584..ebe042238f 100644
--- a/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8
SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz"
-SRC_URI[md5sum] = "1c846c8c1125e6a075444abe65d99b63"
-SRC_URI[sha256sum] = "5db8b62fa0d036bd0cabc869ffe17941ad587d9a2af1ff030d554872adbc1ca1"
+SRC_URI[md5sum] = "68723e96be0b258a9e20480276e8a62c"
+SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814d3d58a"
S = "${WORKDIR}/Convert-ASN1-${PV}"
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
index 355fb2a4ec..b5caa95184 100644
--- a/meta/recipes-extended/pigz/pigz.inc
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -5,25 +5,25 @@ multiple cores to the hilt when compressing data. pigz was written by Mark \
Adler, and uses the zlib and pthread libraries."
HOMEPAGE = "http://zlib.net/pigz/"
SECTION = "console/utils"
-LICENSE = "Zlib"
+LICENSE = "Zlib & Apache-2.0"
-SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz"
+SRC_URI = "http://zlib.net/${BPN}/${BP}.tar.gz"
PROVIDES_class-native += "gzip-native"
DEPENDS = "zlib"
-do_install () {
- if [ "${CLASSOVERRIDE}" = "class-target" ] ; then
- # Install files into /bin (FHS), which is typical place for gzip
- install -d ${D}${base_bindir}
- install ${B}/pigz ${D}${base_bindir}/gzip
- install ${B}/unpigz ${D}${base_bindir}/gunzip
- else
- install -d ${D}${bindir}
- install ${B}/pigz ${D}${bindir}/gzip
- install ${B}/unpigz ${D}${bindir}/gunzip
- fi
+do_install_class-target() {
+ # Install files into /bin (FHS), which is typical place for gzip
+ install -d ${D}${base_bindir}
+ install ${B}/pigz ${D}${base_bindir}/gzip
+ install ${B}/unpigz ${D}${base_bindir}/gunzip
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ install ${B}/unpigz ${D}${bindir}/gunzip
}
ALTERNATIVE_${PN} = "gzip gunzip"
diff --git a/meta/recipes-extended/pigz/pigz/link-order.patch b/meta/recipes-extended/pigz/pigz/link-order.patch
new file mode 100644
index 0000000000..4becc0e3fe
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz/link-order.patch
@@ -0,0 +1,38 @@
+This patch avoids underlinking issues since we pass -lz via LDFLAGS but it appears
+before pigz.o which needs symbols from libz however due to order linker happily discards libz
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: pigz-2.3.3/Makefile
+===================================================================
+--- pigz-2.3.3.orig/Makefile 2015-01-19 20:12:31.000000000 -0800
++++ pigz-2.3.3/Makefile 2015-01-28 09:11:50.266669184 -0800
+@@ -5,7 +5,7 @@
+ # use gcc and gmake on Solaris
+
+ pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm
++ $(CC) -o pigz $^ $(LDFLAGS) -lz -lpthread -lm
+ ln -f pigz unpigz
+
+ pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h
+@@ -35,7 +35,7 @@
+ dev: pigz pigzt pigzn
+
+ pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm
++ $(CC) -o pigzt $^ $(LDFLAGS) -lz -lpthread -lm
+
+ pigzt.o: pigz.c yarn.h try.h
+ $(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
+@@ -44,7 +44,7 @@
+ $(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
+
+ pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+- $(CC) $(LDFLAGS) -o pigzn $^ -lm
++ $(CC) -o pigzn $^ $(LDFLAGS) -lz -lm
+
+ pigzn.o: pigz.c try.h
+ $(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
diff --git a/meta/recipes-extended/pigz/pigz_2.3.1.bb b/meta/recipes-extended/pigz/pigz_2.3.3.bb
index cd5508d63e..080be2bbc9 100644
--- a/meta/recipes-extended/pigz/pigz_2.3.1.bb
+++ b/meta/recipes-extended/pigz/pigz_2.3.3.bb
@@ -1,8 +1,10 @@
require pigz.inc
LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
-SRC_URI[md5sum] = "e803f8bc0770c7a5e96dccb1d2dd2aab"
-SRC_URI[sha256sum] = "629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54"
+SRC_URI += "file://link-order.patch"
+
+SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb"
+SRC_URI[sha256sum] = "4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c"
NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
diff --git a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
deleted file mode 100644
index 203ccb3347..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-## 60_linux_init.dpatch by <david.sugar@canonical.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix Linux version detection which relied on elf loader side-effect.
-## DP: This patch also depends on 40_gnu-kbsd-version, which modified
-## DP: init_Linux_version().
-
-@DPATCH@
-
-Upstream-Status: inappropriate [upstream unmaintained]
----
- proc/sysinfo.c | 1 +
- proc/version.c | 5 +++--
- proc/version.h | 1 +
- 3 files changed, 5 insertions(+), 2 deletions(-)
-
-Index: procps-3.2.8/proc/sysinfo.c
-===================================================================
---- procps-3.2.8.orig/proc/sysinfo.c
-+++ procps-3.2.8/proc/sysinfo.c
-@@ -212,6 +212,7 @@ static int check_for_privs(void){
- static void init_libproc(void) __attribute__((constructor));
- static void init_libproc(void){
- have_privs = check_for_privs();
-+ init_Linux_version(); // make sure we have version before continuing...
- // ought to count CPUs in /proc/stat instead of relying
- // on glibc, which foolishly tries to parse /proc/cpuinfo
- //
-Index: procps-3.2.8/proc/version.c
-===================================================================
---- procps-3.2.8.orig/proc/version.c
-+++ procps-3.2.8/proc/version.c
-@@ -33,8 +33,7 @@ void display_version(void) {
-
- int linux_version_code;
-
--static void init_Linux_version(void) __attribute__((constructor));
--static void init_Linux_version(void) {
-+void init_Linux_version(void) {
- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
- FILE *fp;
- char buf[256];
-Index: procps-3.2.8/proc/version.h
-===================================================================
---- procps-3.2.8.orig/proc/version.h
-+++ procps-3.2.8/proc/version.h
-@@ -14,6 +14,7 @@
-
- EXTERN_C_BEGIN
-
-+extern void init_Linux_version(void); /* initialize linux version */
- extern void display_version(void); /* display suite version */
- extern const char procps_version[]; /* global buf for suite version */
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
deleted file mode 100644
index 1523c3dfb2..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Do not try to detect 64bit/32bit system
-we already feed that information via compiler
-defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate [OE specific]
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile 2014-05-03 01:00:01.707387583 -0700
-+++ procps-3.2.8/Makefile 2014-05-03 08:53:08.087175369 -0700
-@@ -118,15 +118,6 @@
- # until you go looking for a 64-bit curses library.
- check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
-
--# Be 64-bit if at all possible. In a cross-compiling situation, one may
--# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT
--# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST
--# produce separate executables for ppc and ppc64, s390 and s390x,
--# i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
--# Failure to do so will cause data corruption.
--m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
--ALL_CFLAGS += $(m64)
--
- ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
- ALL_CFLAGS += $(call check_gcc,-Wpadded,)
- ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,)
diff --git a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
deleted file mode 100644
index 2582857e25..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Upstream-Status: Inappropriate [not author, no upstream]
-
-Imported from Debian.
-Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50
-Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749
-
-Stops procps utilities from printing a warning when used with
-kernels having only two digit versions, e.g. 3.0.
-
-Author: <csmall@debian.org>
-Description: Rework version parsing so its ok with other OSes
---- a/proc/version.c
-+++ b/proc/version.c
-@@ -35,15 +35,23 @@
-
- static void init_Linux_version(void) __attribute__((constructor));
- static void init_Linux_version(void) {
-- static struct utsname uts;
-- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
-+ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
-+ FILE *fp;
-+ char buf[256];
-
-- if (uname(&uts) == -1) /* failure implies impending death */
-- exit(1);
-- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
-+ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
-+ exit(1);
-+ if (fgets(buf, 256, fp) == NULL) {
-+ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
-+ fclose(fp);
-+ exit(1);
-+ }
-+ fclose(fp);
-+ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
- fprintf(stderr, /* *very* unlikely to happen by accident */
- "Non-standard uts for running kernel:\n"
-- "release %s=%d.%d.%d gives version code %d\n",
-- uts.release, x, y, z, LINUX_VERSION(x,y,z));
-+ "release %s=%d.%d.%d gives version code %d\n",
-+ buf,
-+ x, y, z, LINUX_VERSION(x,y,z));
- linux_version_code = LINUX_VERSION(x, y, z);
- }
diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch
deleted file mode 100644
index 2a59a5ff68..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/install.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile
---- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800
-+++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800
-@@ -29,9 +29,6 @@
- ln_sf := ln -sf
- install := install -D --owner 0 --group 0
-
--# Lame x86-64 /lib64 and /usr/lib64 abomination:
--lib64 := lib$(shell [ -d /lib64 ] && echo 64)
--
- usr/bin := $(DESTDIR)/usr/bin/
- bin := $(DESTDIR)/bin/
- sbin := $(DESTDIR)/sbin/
-@@ -39,8 +36,8 @@
- man1 := $(DESTDIR)/usr/share/man/man1/
- man5 := $(DESTDIR)/usr/share/man/man5/
- man8 := $(DESTDIR)/usr/share/man/man8/
--lib := $(DESTDIR)/$(lib64)/
--usr/lib := $(DESTDIR)/usr/$(lib64)/
-+lib := $(DESTDIR)/$(base_libdir)/
-+usr/lib := $(DESTDIR)/$(libdir)/
- usr/include := $(DESTDIR)/usr/include/
-
- #SKIP := $(bin)kill $(man1)kill.1
-@@ -222,10 +219,10 @@
- ###### install
-
- $(BINFILES) : all
-- $(install) --mode a=rx $(notdir $@) $@
-+ $(install) -m 555 $(notdir $@) $@
-
- $(MANFILES) : all
-- $(install) --mode a=r $(notdir $@) $@
-+ $(install) -m 444 $(notdir $@) $@
-
- install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
- cd $(usr/bin) && $(ln_f) skill snice
diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
deleted file mode 100644
index 2ca972482d..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-diff --git a/pwdx.c b/pwdx.c
-index cb96a52..29ebce2 100644
---- a/pwdx.c
-+++ b/pwdx.c
-@@ -13,7 +13,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <regex.h>
--#include <limits.h>
-+#include <linux/limits.h>
- #include <unistd.h>
- #include <errno.h>
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
deleted file mode 100644
index 2a65c3509f..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Pending
-
-*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005
---- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005
-***************
-*** 96,102 ****
- #################### install rules ###########################
-
- $(lib)$(SOFILE) : proc/$(SONAME)
-! $(install) --mode a=rx $< $@
-
- ifneq ($(SOLINK),$(SOFILE))
- .PHONY: $(lib)$(SOLINK)
---- 96,102 ----
- #################### install rules ###########################
-
- $(lib)$(SOFILE) : proc/$(SONAME)
-! $(install) -m 555 $< $@
-
- ifneq ($(SOLINK),$(SOFILE))
- .PHONY: $(lib)$(SOLINK)
-***************
-*** 115,121 ****
- $(ldconfig)
-
- $(usr/lib)$(ANAME) : proc/$(ANAME)
-! $(install) --mode a=r $< $@
-
- # Junk anyway... supposed to go in /usr/include/$(NAME)
- #INSTALL += $(addprefix $(include),$(HDRFILES))
---- 115,121 ----
- $(ldconfig)
-
- $(usr/lib)$(ANAME) : proc/$(ANAME)
-! $(install) -m 444 $< $@
-
- # Junk anyway... supposed to go in /usr/include/$(NAME)
- #INSTALL += $(addprefix $(include),$(HDRFILES))
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
deleted file mode 100644
index 0306c8d639..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-Upstream-Status: Pending
-
-fix that top will quit after cpu offline
-
-top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot
-is still the original cpu numbers when calling cpus_refresh, in which
-it is trying to read and sscanf Cpu_tot times /proc/stat.
-
-The patch is from procps-3.2.8-2.fc12.src.rpm
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
----
---- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
-+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
-@@ -912,6 +912,7 @@
- static CPU_t *cpus_refresh (CPU_t *cpus)
- {
- static FILE *fp = NULL;
-+ static int cpu_max;
- int i;
- int num;
- // enough for a /proc/stat CPU line (not the intr line)
-@@ -926,24 +927,29 @@
- can hold tics representing the /proc/stat cpu summary (the first
- line read) -- that slot supports our View_CPUSUM toggle */
- cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
-+ cpu_max = Cpu_tot;
- }
-+ else if (cpu_max > Cpu_tot)
-+ /* move saved CUPs summary to cpu_max possition */
-+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
-+
- rewind(fp);
- fflush(fp);
-
- // first value the last slot with the cpu summary line
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
-- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
- num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
-- &cpus[Cpu_tot].u,
-- &cpus[Cpu_tot].n,
-- &cpus[Cpu_tot].s,
-- &cpus[Cpu_tot].i,
-- &cpus[Cpu_tot].w,
-- &cpus[Cpu_tot].x,
-- &cpus[Cpu_tot].y,
-- &cpus[Cpu_tot].z
-+ &cpus[cpu_max].u,
-+ &cpus[cpu_max].n,
-+ &cpus[cpu_max].s,
-+ &cpus[cpu_max].i,
-+ &cpus[cpu_max].w,
-+ &cpus[cpu_max].x,
-+ &cpus[cpu_max].y,
-+ &cpus[cpu_max].z
- );
- if (num < 4)
- std_err("failed /proc/stat read");
-@@ -955,7 +961,7 @@
- }
-
- // now value each separate cpu's tics
-- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
-+ for (i = 0; ; i++) {
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
- cpus[i].x = 0; // FIXME: can't tell by kernel version number
- cpus[i].y = 0; // FIXME: can't tell by kernel version number
-@@ -964,9 +970,35 @@
- &cpus[i].id,
- &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
- );
-- if (num < 4)
-- std_err("failed /proc/stat read");
-+ if (num < 4) {
-+ Cpu_tot = i;
-+ break;
-+ }
-+ if (i == cpu_max - 1) {
-+ // Bump cpu_max and extend cpus
-+ cpu_max++;
-+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
-+ if (!cpus) std_err("realloc failed");
-+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
-+ }
-+ }
-+
-+ if (cpu_max > Cpu_tot)
-+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
-+
-+ // and just in case we're 2.2.xx compiled without SMP support...
-+ if (Cpu_tot == 1) {
-+ cpus[0].id = cpus[1].id = 0;
-+ cpus[0].u = cpus[1].u;
-+ cpus[0].n = cpus[1].n;
-+ cpus[0].s = cpus[1].s;
-+ cpus[0].i = cpus[1].i;
-+ cpus[0].w = cpus[1].w;
-+ cpus[0].x = cpus[1].x;
-+ cpus[0].y = cpus[1].y;
-+ cpus[0].z = cpus[1].z;
- }
-+
- return cpus;
- }
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
deleted file mode 100644
index c8cee26eac..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Backport
-
-Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla:
-http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1
-
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile
-+++ procps-3.2.8/Makefile
-@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
- # want this rule first, use := on ALL, and ALL not filled in yet
- all: do_all
-
---include */module.mk
-+-include proc/module.mk
-+-include ps/module.mk
-
- do_all: $(ALL)
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
deleted file mode 100644
index 1a294142f5..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001
-From: Daniel Novotny <dnovotny@fedoraproject.org>
-Date: Mon, 16 Feb 2009 12:22:20 +0000
-Subject: add cgroup support
-
-Rebased for 3.2.8: Andrei Gherzan <andrei.gherzan@windriver.com>
-
-Upstream-Status: Pending
-
-The patch was imported from the meta-ivi repository
-(git://git.yoctoproject.org/meta-ivi) as of commit id
-74b9624fe94b2b90810717a13d481b0db9d2d95a
-
-Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
-
-Index: procps-3.2.8/ps/output.c
-===================================================================
---- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200
-+++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200
-@@ -1099,6 +1099,39 @@
- return snprintf(outbuf, COLWID, "*");
- }
-
-+static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){
-+ char filename[48];
-+ FILE *fd;
-+ int counter = 0;
-+ int c;
-+ int is_cgroup = 0;
-+
-+ outbuf[0]='\0';
-+ snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid);
-+ fd = fopen(filename, "r");
-+ if (likely(fd == NULL)) goto fail;
-+ while (( (c = fgetc(fd)) != EOF) && (counter<665)) {
-+ if (is_cgroup == 0) {
-+ if (c == ':') {
-+ is_cgroup = 1;
-+ if (counter>0)
-+ outbuf[counter++]=';';
-+ }
-+ }else
-+ if ((c == '\n') || (c == '\0'))
-+ is_cgroup = 0;
-+ else
-+ outbuf[counter++]=c;
-+ }
-+ outbuf[counter]='\0';
-+ close(fd);
-+ if (counter>0)
-+ return counter;
-+fail:
-+ outbuf[0] = '-';
-+ outbuf[1] = '\0';
-+ return 1;
-+}
-
- /****************** FLASK & seLinux security stuff **********************/
- // move the bulk of this to libproc sometime
-@@ -1293,6 +1326,7 @@
- {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT},
- {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT},
- {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/
-+{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/
- {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT},
- {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/
- {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT},
-Index: procps-3.2.8/ps/ps.1
-===================================================================
---- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200
-+++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200
-@@ -904,6 +904,10 @@
- displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
- T}
-
-+cgroup CGROUP T{
-+display control groups to which the process belonges.
-+t}
-+
- class CLS T{
- scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).
- Field's possible values are:
diff --git a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
deleted file mode 100644
index 0775eaba26..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005
---- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005
-***************
-*** 33,40 ****
-
-
- $(bin)ps: ps/ps
-! $(install) --mode a=rx $< $@
-
- $(man1)ps.1 : ps/ps.1
-! $(install) --mode a=r $< $@
- -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
---- 33,40 ----
-
-
- $(bin)ps: ps/ps
-! $(install) -m 555 $< $@
-
- $(man1)ps.1 : ps/ps.1
-! $(install) -m 444 $< $@
- -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc
deleted file mode 100644
index da91da232d..0000000000
--- a/meta/recipes-extended/procps/procps.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "System and process monitoring utilities"
-DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
-the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "http://procps.sf.net"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \
- file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
- file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://install.patch"
-
-inherit autotools-brokensep update-alternatives
-
-do_install_append() {
- mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN}
-}
-
-FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-FILES_SOLIBSDEV = ""
-
-ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch"
-ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
-ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl"
-ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps"
-ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch"
-ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}"
-ALTERNATIVE_PRIORITY = "110"
diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch
new file mode 100644
index 0000000000..934ae80954
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/fix-configure.patch
@@ -0,0 +1,19 @@
+
+exec_prefix is /usr default in OE-Core
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: procps-ng-3.3.10/configure.ac
+===================================================================
+--- procps-ng-3.3.10.orig/configure.ac
++++ procps-ng-3.3.10/configure.ac
+@@ -70,7 +70,7 @@ AC_FUNC_MMAP
+ AC_FUNC_REALLOC
+ AC_FUNC_STRTOD
+
+-usrbin_execdir='${exec_prefix}/usr/bin'
++usrbin_execdir='${exec_prefix}/bin'
+ AC_SUBST([usrbin_execdir])
+
+ AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf
index 34e7488bf7..34e7488bf7 100644
--- a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
+++ b/meta/recipes-extended/procps/procps/sysctl.conf
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
deleted file mode 100644
index b314bfe33c..0000000000
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-require procps.inc
-
-PR = "r12"
-
-SRC_URI += "file://procmodule.patch \
- file://psmodule.patch \
- file://linux-limits.patch \
- file://sysctl.conf \
- file://procps-3.2.8+gmake-3.82.patch \
- file://gnu-kbsd-version.patch \
- file://60_linux_version_init.patch \
- file://procps-3.2.7-top-remcpu.patch \
- file://procps-3.2.8-ps-cgroup.patch \
- file://detect_bitness.patch \
- "
-
-SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"
-SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535"
-
-EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \
- CPPFLAGS=-I${STAGING_INCDIR} \
- LDFLAGS="${LDFLAGS}" \
- CURSES=-lncurses \
- install="install -D" \
- ldconfig=echo'
-
-do_install_append () {
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
diff --git a/meta/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.10.bb
new file mode 100644
index 0000000000..d8b04dc204
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.3.10.bb
@@ -0,0 +1,62 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "https://gitorious.org/procps"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
+ "
+
+DEPENDS = "ncurses"
+
+inherit autotools gettext pkgconfig update-alternatives
+
+SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
+ file://fix-configure.patch \
+ file://sysctl.conf \
+ "
+
+SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
+SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill"
+
+CPPFLAGS += "-I${S}"
+
+do_install_append () {
+ install -d ${D}${base_bindir}
+ [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
+ install -d ${D}${base_sbindir}
+ [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
+ # Remove now empty dir
+ rmdir ${D}/${sbindir}
+
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${sysconfdir}/sysctl.d
+ ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
+ fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
+
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+base_bindir_progs += "kill pidof ps watch"
+base_sbindir_progs += "sysctl"
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs', True).split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+
+ for prog in d.getVar('base_sbindir_progs', True).split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
+}
+
diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
new file mode 100644
index 0000000000..e57d60f6a3
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
@@ -0,0 +1,46 @@
+From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
+From: Brad Jorsch <anomie@users.sourceforge.net>
+Date: Fri, 28 Feb 2014 21:55:02 +1100
+Subject: [PATCH] Typo in fuser makes -M on all the time
+
+Brad found that fuser had the -M option on all the time.
+A simple but significant typo caused this, thanks the the patch.
+
+Bug-Debian: http://bugs.debian.org/740275
+
+Upstream-Status: Backport
+
+Signed-off-by: Craig Small <csmall@enc.com.au>
+---
+ ChangeLog | 4 ++++
+ src/fuser.c | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index fd1cccf..e5f784c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++Changes in 22.22
++================
++ * Fixed typo in fuser which has -M on Debian #740275
++
+ Changes in 22.21
+ ================
+ * Missing comma in fuser(1) added Debian #702391
+diff --git a/src/fuser.c b/src/fuser.c
+index b485f65..389b302 100644
+--- a/src/fuser.c
++++ b/src/fuser.c
+@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
+ usage(_("No process specification given"));
+
+ /* Check if -M flag was used and if so check mounts */
+- if (opts * OPT_ISMOUNTPOINT) {
++ if (opts & OPT_ISMOUNTPOINT) {
+ check_mountpoints(&mounts, &names_head, &names_tail);
+ }
+
+--
+1.8.4.2
+
diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
new file mode 100644
index 0000000000..c0835e041e
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
+From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Wed, 20 Aug 2014 10:31:37 +0000
+Subject: [PATCH] Include <limits.h> for PATH_MAX
+
+When building against musl libc, PATH_MAX is defined in <limits.h>.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Accepted (Should be in next release after 22.21)
+---
+ src/pstree.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pstree.c b/src/pstree.c
+index 071e6c4..0d28260 100644
+--- a/src/pstree.c
++++ b/src/pstree.c
+@@ -41,6 +41,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <limits.h>
+
+ #include "i18n.h"
+ #include "comm.h"
+--
+2.0.4
+
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb
index 22f65c52be..66aba9ec57 100644
--- a/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -4,3 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
+
+SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
+ file://0002-Include-limits.h-for-PATH_MAX.patch \
+ "
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
deleted file mode 100644
index b556a46347..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001
-From: Steve Dickson <steved@redhat.com>
-Date: Wed, 21 Aug 2013 14:40:22 -0400
-Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am
-
-Upstream-Status: backport
-
-Commit 8d7a0708 cause a regression where the rpcuser id was not
-being set, which in turn cause rpcbind to immediately exit.
-This patch removes the extra ',' that was in the AC_ARG_WITH
-statement in the configure.ac file.
-
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2b67720..1cf42d3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
- AC_SUBST([statedir], [$with_statedir])
-
- AC_ARG_WITH([rpcuser],
-- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
-+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
- ,, [with_rpcuser=root])
- AC_SUBST([rpcuser], [$with_rpcuser])
-
---
-1.8.3.2
-
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index 4de28d4ae1..b3ae2541a0 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -1,14 +1,12 @@
[Unit]
-Description=RPC Bind
-After=network.target
-Wants=rpcbind.target
-Before=rpcbind.target
+Description=RPC Bind Service
+Requires=rpcbind.socket
[Service]
Type=forking
EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
-Restart=always
+SuccessExitStatus=2
[Install]
-WantedBy=multi-user.target
+Also=rpcbind.socket
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
new file mode 100644
index 0000000000..d63c1d9720
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+
+[Socket]
+ListenStream=/var/run/rpcbind.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb
index 89e567bfb2..fd4b2b5b07 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb
@@ -11,10 +11,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
- file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \
file://init.d \
${UCLIBCPATCHES} \
file://rpcbind.conf \
+ file://rpcbind.socket \
file://rpcbind.service \
"
@@ -23,8 +23,8 @@ UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
"
UCLIBCPATCHES ?= ""
-SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68"
-SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e"
+SRC_URI[md5sum] = "8acf839bfef2364a05fbd6be5f8edf9a"
+SRC_URI[sha256sum] = "13dbc8c796dbe0ce8df873007bea0490c8460b56202d918c9eb6fa0358a08f29"
inherit autotools update-rc.d systemd pkgconfig
@@ -34,15 +34,20 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
INITSCRIPT_NAME = "rpcbind"
INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
-SYSTEMD_SERVICE_${PN} = "rpcbind.service"
-SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket"
inherit useradd
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home \
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
--shell /bin/false --user-group rpc"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
+ --without-systemdsystemunitdir, \
+ systemd \
+"
+
EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
do_install_append () {
@@ -56,6 +61,7 @@ do_install_append () {
install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index c5218ec1db..962a4993a9 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -34,6 +34,9 @@ SRC_URI[patch.sha256sum] = "10acb274b2fb0bb7137a0d66e52fa0f18125bc5198c7a8d5af38
inherit autotools texinfo
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
index fe242e16bd..4c0f3452ac 100644
--- a/meta/recipes-extended/sed/sed_4.1.2.bb
+++ b/meta/recipes-extended/sed/sed_4.1.2.bb
@@ -31,4 +31,3 @@ ALTERNATIVE_${PN} = "sed"
ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
ALTERNATIVE_PRIORITY = "100"
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
index 74ac16bea9..72976deb64 100644
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -14,7 +14,7 @@ SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
inherit autotools texinfo update-alternatives gettext ptest
-RDEPENDS_${PN}-ptest += "make locale-base-ru-ru"
+RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
EXTRA_OECONF = "--disable-acl \
${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
@@ -40,4 +40,3 @@ do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
}
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
new file mode 100644
index 0000000000..828b95a572
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
@@ -0,0 +1,46 @@
+From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Thu, 11 Sep 2014 15:11:23 +0200
+Subject: [PATCH] Do not read login.defs before doing chroot()
+
+If "useradd --root <root> ..." was used, the login.defs file would still
+be read from /etc/login.defs instead of <root>/etc/login.defs. This was
+due to getdef_ulong() being called before process_root_flag().
+
+Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html]
+
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ src/useradd.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index a8a1f76..e1ebf50 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1993,9 +1993,11 @@ int main (int argc, char **argv)
+ #endif /* USE_PAM */
+ #endif /* ACCT_TOOLS_SETUID */
+
++#ifdef ENABLE_SUBIDS
+ /* Needed for userns check */
+- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
+- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
++ uid_t uid_min;
++ uid_t uid_max;
++#endif
+
+ /*
+ * Get my name so that I can use it to report errors.
+@@ -2026,6 +2028,8 @@ int main (int argc, char **argv)
+ is_shadow_grp = sgr_file_present ();
+ #endif
+ #ifdef ENABLE_SUBIDS
++ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
++ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
+ is_sub_uid = sub_uid_file_present () && !rflg &&
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
+ is_sub_gid = sub_gid_file_present () && !rflg &&
+--
+1.9.0
+
diff --git a/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch
new file mode 100644
index 0000000000..31337de362
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+Subject: su.c: fix to exec command correctly
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/su.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/su.c b/src/su.c
+index 3704217..bc4f2ac 100644
+--- a/src/su.c
++++ b/src/su.c
+@@ -1156,7 +1156,7 @@ int main (int argc, char **argv)
+ * Use the shell and create an argv
+ * with the rest of the command line included.
+ */
+- argv[-1] = cp;
++ argv[-1] = shellstr;
+ execve_shell (shellstr, &argv[-1], environ);
+ err = errno;
+ (void) fprintf (stderr,
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
new file mode 100644
index 0000000000..85dde8e1bb
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
@@ -0,0 +1,109 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: useradd.c: create parent directories when necessary
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 49 insertions(+), 23 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index 4bd969d..cb5dd6c 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1893,6 +1893,35 @@ static void usr_update (void)
+ }
+
+ /*
++ * mkdir_p - create directories, including parent directories when needed
++ *
++ * similar to `mkdir -p'
++ */
++void mkdir_p(const char *path) {
++ int len = strlen(path);
++ char newdir[len + 1];
++ mode_t mode = 0755;
++ int i = 0;
++
++ if (path[i] == '\0') {
++ return;
++ }
++
++ /* skip the leading '/' */
++ i++;
++
++ while(path[i] != '\0') {
++ if (path[i] == '/') {
++ strncpy(newdir, path, i);
++ newdir[i] = '\0';
++ mkdir(newdir, mode);
++ }
++ i++;
++ }
++ mkdir(path, mode);
++}
++
++/*
+ * create_home - create the user's home directory
+ *
+ * create_home() creates the user's home directory if it does not
+@@ -1907,36 +1936,33 @@ static void create_home (void)
+ fail_exit (E_HOMEDIR);
+ }
+ #endif
+- /* XXX - create missing parent directories. --marekm */
+- if (mkdir (user_home, 0) != 0) {
+- fprintf (stderr,
+- _("%s: cannot create directory %s\n"),
+- Prog, user_home);
+-#ifdef WITH_AUDIT
+- audit_logger (AUDIT_ADD_USER, Prog,
+- "adding home directory",
+- user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_FAILURE);
+-#endif
+- fail_exit (E_HOMEDIR);
+- }
+- chown (user_home, user_id, user_gid);
+- chmod (user_home,
+- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+- home_added = true;
++ mkdir_p(user_home);
++ }
++ if (access (user_home, F_OK) != 0) {
+ #ifdef WITH_AUDIT
+ audit_logger (AUDIT_ADD_USER, Prog,
+ "adding home directory",
+ user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_SUCCESS);
++ SHADOW_AUDIT_FAILURE);
+ #endif
+-#ifdef WITH_SELINUX
+- /* Reset SELinux to create files with default contexts */
+- if (reset_selinux_file_context () != 0) {
+- fail_exit (E_HOMEDIR);
+- }
++ fail_exit (E_HOMEDIR);
++ }
++ chown (user_home, user_id, user_gid);
++ chmod (user_home,
++ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
++ home_added = true;
++#ifdef WITH_AUDIT
++ audit_logger (AUDIT_ADD_USER, Prog,
++ "adding home directory",
++ user_name, (unsigned int) user_id,
++ SHADOW_AUDIT_SUCCESS);
+ #endif
++#ifdef WITH_SELINUX
++ /* Reset SELinux to create files with default contexts */
++ if (reset_selinux_file_context () != 0) {
++ fail_exit (E_HOMEDIR);
+ }
++#endif
+ }
+
+ /*
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch b/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
deleted file mode 100644
index 40444967ab..0000000000
--- a/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Add a --root command option to groupmems utility.
-
-This option allows the utility to be chrooted when run under pseudo.
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-diff -Naur old/src/groupmems.c new/src/groupmems.c
---- old/src/groupmems.c 2011-02-13 11:58:16.000000000 -0600
-+++ new/src/groupmems.c 2013-05-30 04:45:38.000000000 -0500
-@@ -60,6 +60,7 @@
- #define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
- #define EXIT_INVALID_USER 8 /* specified user does not exist */
- #define EXIT_INVALID_GROUP 9 /* specified group does not exist */
-+#define EXIT_BAD_ARG 10 /* invalid argument to option */
-
- /*
- * Global variables
-@@ -79,6 +80,7 @@
- static bool is_shadowgrp;
- static bool sgr_locked = false;
- #endif
-+static const char *newroot = "";
-
- /* local function prototypes */
- static char *whoami (void);
-@@ -368,6 +370,7 @@
- "Options:\n"
- " -g, --group groupname change groupname instead of the user's group\n"
- " (root only)\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- "\n"
- "Actions:\n"
- " -a, --add username add username to the members of the group\n"
-@@ -391,10 +394,11 @@
- {"group", required_argument, NULL, 'g'},
- {"list", no_argument, NULL, 'l'},
- {"purge", no_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((arg = getopt_long (argc, argv, "a:d:g:lp", long_options,
-+ while ((arg = getopt_long (argc, argv, "a:d:g:lpR:", long_options,
- &option_index)) != EOF) {
- switch (arg) {
- case 'a':
-@@ -416,6 +420,28 @@
- purge = true;
- ++exclusive;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ break;
- default:
- usage ();
- }
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
deleted file mode 100644
index ab87e35535..0000000000
--- a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
+++ /dev/null
@@ -1,1384 +0,0 @@
-Add a --root command option to the following utilties:
-
-* useradd
-* groupadd
-* usermod
-* groupmod
-* userdel
-* groupdel
-* passwd
-* gpasswd
-* pwconv
-* pwunconv
-* grpconv
-* grpunconv
-
-This option allows the utilities to be chrooted when run under pseudo.
-They can then be used to manipulate user and group account information
-in target sysroots.
-
-The useradd utility was also modified to create home directories
-recursively when necessary.
-
-Upstream-Status: Inappropriate [Other]
-Workaround is specific to our build system.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-2011-09-29 Fix the parsing of the --root option in gpasswd, useradd, usermod:
-
-In programs which need to scan the command line in two passes to handle
---root option separately from the rest of the arguments, replace the first
-calls to getopt_long with a simple iteration over the argument list since
-getopt_long has the bad habit of reordering arguments on the command line.
-
-Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
-
-diff -urN shadow-4.1.4.3.orig//src/gpasswd.c shadow-4.1.4.3//src/gpasswd.c
---- shadow-4.1.4.3.orig//src/gpasswd.c 2011-09-29 12:00:45.211000091 +0100
-+++ shadow-4.1.4.3//src/gpasswd.c 2011-09-29 12:09:54.590000090 +0100
-@@ -63,6 +63,7 @@
- * (/etc/gshadow present) */
- static bool is_shadowgrp;
- #endif
-+static const char *newroot = "";
-
- /* Flags set by options */
- static bool aflg = false;
-@@ -97,6 +98,7 @@
- static void usage (void);
- static RETSIGTYPE catch_signals (int killed);
- static bool is_valid_user_list (const char *users);
-+static void process_root_flag (int argc, char **argv);
- static void process_flags (int argc, char **argv);
- static void check_flags (int argc, int opt_index);
- static void open_files (void);
-@@ -136,6 +138,7 @@
- "Options:\n"
- " -a, --add USER add USER to GROUP\n"
- " -d, --delete USER remove USER from GROUP\n"
-+ " -Q --root CHROOT_DIR directory to chroot into\n"
- " -r, --remove-password remove the GROUP's password\n"
- " -R, --restrict restrict access to GROUP to its members\n"
- " -M, --members USER,... set the list of members of GROUP\n"
-@@ -226,6 +229,57 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-Q")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ('/' != root[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - process the command line options and arguments
- */
- static void process_flags (int argc, char **argv)
-@@ -235,6 +289,7 @@
- static struct option long_options[] = {
- {"add", required_argument, NULL, 'a'},
- {"delete", required_argument, NULL, 'd'},
-+ {"root", required_argument, NULL, 'Q'},
- {"remove-password", no_argument, NULL, 'r'},
- {"restrict", no_argument, NULL, 'R'},
- {"administrators", required_argument, NULL, 'A'},
-@@ -242,7 +297,7 @@
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((flag = getopt_long (argc, argv, "a:A:d:gM:rR", long_options, &option_index)) != -1) {
-+ while ((flag = getopt_long (argc, argv, "a:A:d:gM:Q:rR", long_options, &option_index)) != -1) {
- switch (flag) {
- case 'a': /* add a user */
- aflg = true;
-@@ -283,6 +338,9 @@
- }
- Mflg = true;
- break;
-+ case 'Q':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 'r': /* remove group password */
- rflg = true;
- break;
-@@ -995,6 +1053,8 @@
- setbuf (stdout, NULL);
- setbuf (stderr, NULL);
-
-+ process_root_flag (argc, argv);
-+
- #ifdef SHADOWGRP
- is_shadowgrp = sgr_file_present ();
- #endif
-diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3//src/groupadd.c
---- shadow-4.1.4.3.orig//src/groupadd.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupadd.c 2011-09-29 11:59:28.386000092 +0100
-@@ -76,6 +76,7 @@
- static gid_t group_id;
- static /*@null@*/char *group_passwd;
- static /*@null@*/char *empty_list = NULL;
-+static const char *newroot = "";
-
- static bool oflg = false; /* permit non-unique group ID to be specified with -g */
- static bool gflg = false; /* ID value for the new group */
-@@ -120,6 +121,7 @@
- (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
- " (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
-@@ -383,12 +385,13 @@
- {"key", required_argument, NULL, 'K'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {NULL, 0, NULL, '\0'}
- };
-
- while ((c =
-- getopt_long (argc, argv, "fg:hK:op:r", long_options,
-+ getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
- &option_index)) != -1) {
- switch (c) {
- case 'f':
-@@ -440,6 +443,28 @@
- pflg = true;
- group_passwd = optarg;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r':
- rflg = true;
- break;
-diff -urN shadow-4.1.4.3.orig//src/groupdel.c shadow-4.1.4.3//src/groupdel.c
---- shadow-4.1.4.3.orig//src/groupdel.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupdel.c 2011-09-29 11:59:28.386000092 +0100
-@@ -36,6 +36,7 @@
-
- #include <ctype.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <grp.h>
- #include <pwd.h>
- #ifdef ACCT_TOOLS_SETUID
-@@ -59,6 +60,7 @@
-
- static char *group_name;
- static gid_t group_id = -1;
-+static const char *newroot = "";
-
- #ifdef SHADOWGRP
- static bool is_shadow_grp;
-@@ -70,12 +72,14 @@
- /*@-exitarg@*/
- #define E_SUCCESS 0 /* success */
- #define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
- #define E_NOTFOUND 6 /* specified group doesn't exist */
- #define E_GROUP_BUSY 8 /* can't remove user's primary group */
- #define E_GRP_UPDATE 10 /* can't update group file */
-
- /* local function prototypes */
- static void usage (void);
-+static void process_flags (int argc, char **argv);
- static void grp_update (void);
- static void close_files (void);
- static void open_files (void);
-@@ -86,11 +90,78 @@
- */
- static void usage (void)
- {
-- fputs (_("Usage: groupdel group\n"), stderr);
-+ (void) fprintf (stderr,
-+ _("Usage: groupdel [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -g, --group GROUP group name to delete\n"), stderr);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
- exit (E_USAGE);
- }
-
- /*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"group", required_argument, NULL, 'g'},
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "g:R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'g':
-+ group_name = optarg;
-+ break;
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
-+/*
- * grp_update - update group file entries
- *
- * grp_update() writes the new records to the group files.
-@@ -328,14 +399,14 @@
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
- (void) textdomain (PACKAGE);
-
-- if (argc != 2) {
-+ if (argc == 1) {
- usage ();
- }
-
-- group_name = argv[1];
--
- OPENLOG ("groupdel");
-
-+ process_flags (argc, argv);
-+
- #ifdef ACCT_TOOLS_SETUID
- #ifdef USE_PAM
- {
-diff -urN shadow-4.1.4.3.orig//src/groupmod.c shadow-4.1.4.3//src/groupmod.c
---- shadow-4.1.4.3.orig//src/groupmod.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupmod.c 2011-09-29 11:59:28.387000092 +0100
-@@ -79,6 +79,7 @@
- static char *group_passwd;
- static gid_t group_id;
- static gid_t group_newid;
-+static char *newroot = "";
-
- struct cleanup_info_mod info_passwd;
- struct cleanup_info_mod info_group;
-@@ -126,6 +127,7 @@
- (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
- " PASSWORD\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
- }
-@@ -346,10 +348,11 @@
- {"new-name", required_argument, NULL, 'n'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {NULL, 0, NULL, '\0'}
- };
- while ((c =
-- getopt_long (argc, argv, "g:hn:op:",
-+ getopt_long (argc, argv, "g:hn:op:R:",
- long_options, &option_index)) != -1) {
- switch (c) {
- case 'g':
-@@ -373,6 +376,28 @@
- group_passwd = optarg;
- pflg = true;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- default:
- usage ();
- }
-diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
---- shadow-4.1.4.3.orig//src/grpconv.c 2011-09-29 12:00:45.213000091 +0100
-+++ shadow-4.1.4.3//src/grpconv.c 2011-09-29 11:59:28.387000092 +0100
-@@ -39,6 +39,7 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <grp.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -50,6 +51,14 @@
- #ifdef SHADOWGRP
- #include "groupio.h"
- #include "sgroupio.h"
-+
-+/*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+
- /*
- * Global variables
- */
-@@ -57,9 +66,12 @@
-
- static bool gr_locked = false;
- static bool sgr_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -82,6 +94,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: grpconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct group *gr;
-@@ -89,9 +172,6 @@
- const struct sgrp *sg;
- struct sgrp sgent;
-
-- if (1 != argc) {
-- (void) fputs (_("Usage: grpconv\n"), stderr);
-- }
- Prog = Basename (argv[0]);
-
- (void) setlocale (LC_ALL, "");
-@@ -100,6 +180,8 @@
-
- OPENLOG ("grpconv");
-
-+ process_flags (argc, argv);
-+
- if (gr_lock () == 0) {
- fprintf (stderr,
- _("%s: cannot lock %s; try again later.\n"),
-diff -urN shadow-4.1.4.3.orig//src/grpunconv.c shadow-4.1.4.3//src/grpunconv.c
---- shadow-4.1.4.3.orig//src/grpunconv.c 2011-09-29 12:00:45.213000091 +0100
-+++ shadow-4.1.4.3//src/grpunconv.c 2011-09-29 11:59:28.387000092 +0100
-@@ -43,6 +43,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <time.h>
- #include <unistd.h>
- #include <grp.h>
-@@ -51,6 +52,14 @@
- #ifdef SHADOWGRP
- #include "groupio.h"
- #include "sgroupio.h"
-+
-+/*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+
- /*
- * Global variables
- */
-@@ -58,9 +67,12 @@
-
- static bool gr_locked = false;
- static bool sgr_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -83,6 +95,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: grpunconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct group *gr;
-@@ -100,6 +183,8 @@
-
- OPENLOG ("grpunconv");
-
-+ process_flags (argc, argv);
-+
- if (sgr_file_present () == 0) {
- exit (0); /* no /etc/gshadow, nothing to do */
- }
-diff -urN shadow-4.1.4.3.orig//src/passwd.c shadow-4.1.4.3//src/passwd.c
---- shadow-4.1.4.3.orig//src/passwd.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/passwd.c 2011-09-29 11:59:28.388000092 +0100
-@@ -75,6 +75,7 @@
- static char *name; /* The name of user whose password is being changed */
- static char *myname; /* The current user's name */
- static bool amroot; /* The caller's real UID was 0 */
-+static const char *newroot = "";
-
- static bool
- aflg = false, /* -a - show status for all users */
-@@ -174,6 +175,7 @@
- " -n, --mindays MIN_DAYS set minimum number of days before password\n"
- " change to MIN_DAYS\n"
- " -q, --quiet quiet mode\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- " -r, --repository REPOSITORY change password in REPOSITORY repository\n"
- " -S, --status report password status on the named account\n"
- " -u, --unlock unlock the password of the named account\n"
-@@ -803,6 +805,7 @@
- {"lock", no_argument, NULL, 'l'},
- {"mindays", required_argument, NULL, 'n'},
- {"quiet", no_argument, NULL, 'q'},
-+ {"root", required_argument, NULL, 'R'},
- {"repository", required_argument, NULL, 'r'},
- {"status", no_argument, NULL, 'S'},
- {"unlock", no_argument, NULL, 'u'},
-@@ -811,7 +814,7 @@
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((c = getopt_long (argc, argv, "adei:kln:qr:Suw:x:",
-+ while ((c = getopt_long (argc, argv, "adei:kln:qR:r:Suw:x:",
- long_options, &option_index)) != -1) {
- switch (c) {
- case 'a':
-@@ -858,6 +861,28 @@
- case 'q':
- qflg = true; /* ok for users */
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r':
- /* -r repository (files|nis|nisplus) */
- /* only "files" supported for now */
-diff -urN shadow-4.1.4.3.orig//src/pwconv.c shadow-4.1.4.3//src/pwconv.c
---- shadow-4.1.4.3.orig//src/pwconv.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/pwconv.c 2011-09-29 11:59:28.388000092 +0100
-@@ -59,6 +59,7 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <pwd.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -79,6 +80,7 @@
- #define E_SUCCESS 0 /* success */
- #define E_NOPERM 1 /* permission denied */
- #define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
- #define E_FAILURE 3 /* unexpected failure, nothing done */
- #define E_MISSING 4 /* unexpected failure, passwd file missing */
- #define E_PWDBUSY 5 /* passwd file(s) busy */
-@@ -90,9 +92,12 @@
-
- static bool spw_locked = false;
- static bool pw_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -115,6 +120,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: pwconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct passwd *pw;
-@@ -122,9 +198,6 @@
- const struct spwd *sp;
- struct spwd spent;
-
-- if (1 != argc) {
-- (void) fputs (_("Usage: pwconv\n"), stderr);
-- }
- Prog = Basename (argv[0]);
-
- (void) setlocale (LC_ALL, "");
-@@ -133,6 +206,8 @@
-
- OPENLOG ("pwconv");
-
-+ process_flags (argc, argv);
-+
- if (pw_lock () == 0) {
- fprintf (stderr,
- _("%s: cannot lock %s; try again later.\n"),
-diff -urN shadow-4.1.4.3.orig//src/pwunconv.c shadow-4.1.4.3//src/pwunconv.c
---- shadow-4.1.4.3.orig//src/pwunconv.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/pwunconv.c 2011-09-29 11:59:28.388000092 +0100
-@@ -35,6 +35,7 @@
- #ident "$Id: pwunconv.c 2852 2009-04-30 21:44:35Z nekral-guest $"
-
- #include <fcntl.h>
-+#include <getopt.h>
- #include <pwd.h>
- #include <stdio.h>
- #include <sys/types.h>
-@@ -46,15 +47,24 @@
- #include "shadowio.h"
-
- /*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+/*
- * Global variables
- */
- char *Prog;
-
- static bool spw_locked = false;
- static bool pw_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -75,6 +85,76 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: pwunconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-
- int main (int argc, char **argv)
- {
-@@ -93,6 +173,8 @@
-
- OPENLOG ("pwunconv");
-
-+ process_flags (argc, argv);
-+
- if (!spw_file_present ()) {
- /* shadow not installed, do nothing */
- exit (0);
-diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3//src/useradd.c
---- shadow-4.1.4.3.orig//src/useradd.c 2011-09-29 12:00:45.215000091 +0100
-+++ shadow-4.1.4.3//src/useradd.c 2011-09-29 11:59:28.520000092 +0100
-@@ -112,6 +112,7 @@
- #ifdef WITH_SELINUX
- static const char *user_selinux = "";
- #endif
-+static const char *newroot = "";
-
- static long user_expire = -1;
- static bool is_shadow_pwd;
-@@ -189,6 +190,7 @@
- static void new_spent (struct spwd *);
- static void grp_update (void);
-
-+static void process_root_flag (int argc, char **argv);
- static void process_flags (int argc, char **argv);
- static void close_files (void);
- static void open_files (void);
-@@ -711,6 +713,7 @@
- (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
- " (non-unique) UID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
- (void) fputs (_(" -u, --uid UID user ID of the new account\n"), stderr);
-@@ -943,6 +946,57 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ('/' != root[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - perform command line argument setting
- *
- * process_flags() interprets the command line arguments and sets
-@@ -978,6 +1032,7 @@
- {"no-user-group", no_argument, NULL, 'N'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {"shell", required_argument, NULL, 's'},
- #ifdef WITH_SELINUX
-@@ -989,9 +1044,9 @@
- };
- while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
- #else
-- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -1156,6 +1211,9 @@
- }
- user_pass = optarg;
- break;
-+ case 'R':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 'r':
- rflg = true;
- break;
-@@ -1735,6 +1793,36 @@
- }
- }
- #endif
-+
-+/*
-+ * mkdir_p - create directories, including parent directories when needed
-+ *
-+ * similar to mkdir -p
-+ */
-+void mkdir_p(const char *path) {
-+ int len = strlen(path);
-+ char newdir[len + 1];
-+ mode_t mode = 0755;
-+ int i = 0;
-+
-+ if (path[i] == '\0') {
-+ return;
-+ }
-+
-+ /* skip the leading '/' */
-+ i++;
-+
-+ while(path[i] != '\0') {
-+ if (path[i] == '/') {
-+ strncpy(newdir, path, i);
-+ newdir[i] = '\0';
-+ mkdir(newdir, mode);
-+ }
-+ i++;
-+ }
-+ mkdir(path, mode);
-+}
-+
- /*
- * create_home - create the user's home directory
- *
-@@ -1748,34 +1836,31 @@
- #ifdef WITH_SELINUX
- selinux_file_context (user_home);
- #endif
-- /* XXX - create missing parent directories. --marekm */
-- if (mkdir (user_home, 0) != 0) {
-- fprintf (stderr,
-- _("%s: cannot create directory %s\n"),
-- Prog, user_home);
--#ifdef WITH_AUDIT
-- audit_logger (AUDIT_ADD_USER, Prog,
-- "adding home directory",
-- user_name, (unsigned int) user_id,
-- SHADOW_AUDIT_FAILURE);
--#endif
-- fail_exit (E_HOMEDIR);
-- }
-- chown (user_home, user_id, user_gid);
-- chmod (user_home,
-- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
-- home_added = true;
-+ mkdir_p(user_home);
-+ }
-+ if (access (user_home, F_OK) != 0) {
- #ifdef WITH_AUDIT
- audit_logger (AUDIT_ADD_USER, Prog,
- "adding home directory",
- user_name, (unsigned int) user_id,
-- SHADOW_AUDIT_SUCCESS);
-+ SHADOW_AUDIT_FAILURE);
-+#endif
-+ fail_exit (E_HOMEDIR);
-+ }
-+ chown (user_home, user_id, user_gid);
-+ chmod (user_home,
-+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
-+ home_added = true;
-+#ifdef WITH_AUDIT
-+ audit_logger (AUDIT_ADD_USER, Prog,
-+ "adding home directory",
-+ user_name, (unsigned int) user_id,
-+ SHADOW_AUDIT_SUCCESS);
- #endif
- #ifdef WITH_SELINUX
-- /* Reset SELinux to create files with default contexts */
-- setfscreatecon (NULL);
-+ /* Reset SELinux to create files with default contexts */
-+ setfscreatecon (NULL);
- #endif
-- }
- }
-
- /*
-@@ -1861,6 +1946,7 @@
- */
- user_groups[0] = (char *) 0;
-
-+ process_root_flag (argc, argv);
-
- is_shadow_pwd = spw_file_present ();
- #ifdef SHADOWGRP
-diff -urN shadow-4.1.4.3.orig//src/userdel.c shadow-4.1.4.3//src/userdel.c
---- shadow-4.1.4.3.orig//src/userdel.c 2011-09-29 12:00:45.216000091 +0100
-+++ shadow-4.1.4.3//src/userdel.c 2011-09-29 11:59:28.389000092 +0100
-@@ -79,6 +79,7 @@
- static char *user_name;
- static uid_t user_id;
- static char *user_home;
-+static const char *newroot = "";
-
- static bool fflg = false;
- static bool rflg = false;
-@@ -119,6 +120,7 @@
- " -f, --force force removal of files,\n"
- " even if not owned by user\n"
- " -h, --help display this help message and exit\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- " -r, --remove remove home directory and mail spool\n"
- "\n"), stderr);
- exit (E_USAGE);
-@@ -768,12 +770,34 @@
- {"remove", no_argument, NULL, 'r'},
- {NULL, 0, NULL, '\0'}
- };
-- while ((c = getopt_long (argc, argv, "fhr",
-+ while ((c = getopt_long (argc, argv, "fhR:r",
- long_options, NULL)) != -1) {
- switch (c) {
- case 'f': /* force remove even if not owned by user */
- fflg = true;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r': /* remove home dir and mailbox */
- rflg = true;
- break;
-diff -urN shadow-4.1.4.3.orig//src/usermod.c shadow-4.1.4.3//src/usermod.c
---- shadow-4.1.4.3.orig//src/usermod.c 2011-09-29 12:00:45.216000091 +0100
-+++ shadow-4.1.4.3//src/usermod.c 2011-09-29 11:59:28.390000092 +0100
-@@ -110,6 +110,7 @@
- static long user_newinactive;
- static long sys_ngroups;
- static char **user_groups; /* NULL-terminated list */
-+static const char *newroot = "";
-
- static bool
- aflg = false, /* append to existing secondary group set */
-@@ -164,6 +165,7 @@
- #endif
- static void grp_update (void);
-
-+static void process_root_flag (int, char **);
- static void process_flags (int, char **);
- static void close_files (void);
- static void open_files (void);
-@@ -323,6 +325,7 @@
- " new location (use only with -d)\n"
- " -o, --non-unique allow using duplicate (non-unique) UID\n"
- " -p, --password PASSWORD use encrypted password for the new password\n"
-+ " -R --root CHROOT_DIR directory to chroot into\n"
- " -s, --shell SHELL new login shell for the user account\n"
- " -u, --uid UID new UID for the user account\n"
- " -U, --unlock unlock the user account\n"
-@@ -802,6 +805,58 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ( (!VALID (root) )
-+ || ( ('/' != root[0]) ) ) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - perform command line argument setting
- *
- * process_flags() interprets the command line arguments and sets the
-@@ -895,6 +950,7 @@
- {"move-home", no_argument, NULL, 'm'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- #ifdef WITH_SELINUX
- {"selinux-user", required_argument, NULL, 'Z'},
- #endif
-@@ -905,9 +961,9 @@
- };
- while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "ac:d:e:f:g:G:hl:Lmop:s:u:UZ:",
-+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
- #else
-- "ac:d:e:f:g:G:hl:Lmop:s:u:U",
-+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -999,6 +1055,9 @@
- user_pass = optarg;
- pflg = true;
- break;
-+ case 'R':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 's':
- if (!VALID (optarg)) {
- fprintf (stderr,
-@@ -1715,6 +1774,8 @@
-
- OPENLOG ("usermod");
-
-+ process_root_flag (argc, argv);
-+
- is_shadow_pwd = spw_file_present ();
- #ifdef SHADOWGRP
- is_shadow_grp = sgr_file_present ();
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
index eafb935a3a..68da25f406 100644
--- a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
+++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
@@ -3,20 +3,19 @@ Upstream-Status: Inappropriate [OE specific]
Allow for setting password in clear text.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
---
src/Makefile.am | 8 ++++----
src/groupadd.c | 8 +++++++-
- src/groupmod.c | 9 ++++++++-
+ src/groupmod.c | 8 +++++++-
src/useradd.c | 9 +++++++--
- src/usermod.c | 10 ++++++++--
- 5 files changed, 34 insertions(+), 10 deletions(-)
+ src/usermod.c | 8 +++++++-
+ 5 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 6a3b4c5..1ffdbc6 100644
+index 25e288d..856b087 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -76,10 +76,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
+@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
@@ -29,47 +28,46 @@ index 6a3b4c5..1ffdbc6 100644
grpck_LDADD = $(LDADD) $(LIBSELINUX)
grpconv_LDADD = $(LDADD) $(LIBSELINUX)
grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
-@@ -99,9 +99,9 @@ su_SOURCES = \
+@@ -111,9 +111,9 @@ su_SOURCES = \
suauth.c
su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
sulogin_LDADD = $(LDADD) $(LIBCRYPT)
--useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
- userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
--usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
+ userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE)
+-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
vipw_LDADD = $(LDADD) $(LIBSELINUX)
install-am: all-am
diff --git a/src/groupadd.c b/src/groupadd.c
-index 66b38de..3157486 100644
+index f716f57..4e28c26 100644
--- a/src/groupadd.c
+++ b/src/groupadd.c
-@@ -124,6 +124,7 @@ static void usage (void)
+@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
- " (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear text password for the new group\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs ("\n", stderr);
-@@ -388,13 +389,14 @@ static void process_flags (int argc, char **argv)
- {"key", required_argument, NULL, 'K'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " (non-unique) GID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
+ {"key", required_argument, NULL, 'K'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
-+ getopt_long (argc, argv, "fg:hK:op:P:R:r", long_options,
- &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'f':
-@@ -446,6 +448,10 @@ static void process_flags (int argc, char **argv)
+@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
pflg = true;
group_passwd = optarg;
break;
@@ -77,37 +75,35 @@ index 66b38de..3157486 100644
+ pflg = true;
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'r':
+ rflg = true;
+ break;
diff --git a/src/groupmod.c b/src/groupmod.c
-index 27eb159..17acbc3 100644
+index d9d3807..68f49d1 100644
--- a/src/groupmod.c
+++ b/src/groupmod.c
-@@ -127,6 +127,8 @@ static void usage (void)
- (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
+@@ -127,6 +127,7 @@ static void usage (int status)
+ (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
- " PASSWORD\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this (clear text)\n"
-+ " PASSWORD\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
-@@ -348,11 +350,12 @@ static void process_flags (int argc, char **argv)
- {"new-name", required_argument, NULL, 'n'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " PASSWORD\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+ exit (status);
+@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
+ {"new-name", required_argument, NULL, 'n'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "g:hn:op:R:",
-+ getopt_long (argc, argv, "g:hn:op:P:R:",
- long_options, &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "g:hn:op:R:",
++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'g':
-@@ -376,6 +379,10 @@ static void process_flags (int argc, char **argv)
+@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
group_passwd = optarg;
pflg = true;
break;
@@ -115,84 +111,81 @@ index 27eb159..17acbc3 100644
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
+ default:
diff --git a/src/useradd.c b/src/useradd.c
-index 2102630..390909c 100644
+index b3bd451..4416f90 100644
--- a/src/useradd.c
+++ b/src/useradd.c
-@@ -716,6 +716,7 @@ static void usage (void)
+@@ -773,6 +773,7 @@ static void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
- " (non-unique) UID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD clear text password of the new account\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
-@@ -1035,6 +1036,7 @@ static void process_flags (int argc, char **argv)
- {"no-user-group", no_argument, NULL, 'N'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout);
+@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
+ {"no-user-group", no_argument, NULL, 'N'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {"shell", required_argument, NULL, 's'},
-@@ -1047,9 +1049,9 @@ static void process_flags (int argc, char **argv)
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:UZ:",
- #else
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:U",
- #endif
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
+ #else /* !WITH_SELINUX */
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
+ #endif /* !WITH_SELINUX */
long_options, NULL)) != -1) {
switch (c) {
-@@ -1214,6 +1216,9 @@ static void process_flags (int argc, char **argv)
+@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
}
user_pass = optarg;
break;
-+ case 'P': /* set clear text password */
++ case 'P': /* set clear text password */
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'r':
+ rflg = true;
break;
diff --git a/src/usermod.c b/src/usermod.c
-index 8363597..f4c1cee 100644
+index e7d4351..b79f7a3 100644
--- a/src/usermod.c
+++ b/src/usermod.c
-@@ -325,6 +325,7 @@ static void usage (void)
- " new location (use only with -d)\n"
- " -o, --non-unique allow using duplicate (non-unique) UID\n"
- " -p, --password PASSWORD use encrypted password for the new password\n"
-+ " -P, --clear-password PASSWORD use clear text password for the new password\n"
- " -R --root CHROOT_DIR directory to chroot into\n"
- " -s, --shell SHELL new login shell for the user account\n"
- " -u, --uid UID new UID for the user account\n"
-@@ -950,6 +951,7 @@ static void process_flags (int argc, char **argv)
- {"move-home", no_argument, NULL, 'm'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
+ " new location (use only with -d)\n"), usageout);
+ (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
+ (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout);
+@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
+ {"move-home", no_argument, NULL, 'm'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- #ifdef WITH_SELINUX
- {"selinux-user", required_argument, NULL, 'Z'},
-@@ -961,9 +963,9 @@ static void process_flags (int argc, char **argv)
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+ {"uid", required_argument, NULL, 'u'},
+@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
+ {NULL, 0, NULL, '\0'}
};
while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UZ:",
- #else
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -1055,6 +1057,10 @@ static void process_flags (int argc, char **argv)
+- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
+ #ifdef ENABLE_SUBIDS
+ "v:w:V:W:"
+ #endif /* ENABLE_SUBIDS */
+@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
user_pass = optarg;
pflg = true;
break;
@@ -200,9 +193,9 @@ index 8363597..f4c1cee 100644
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'R': /* no-op, handled in process_root_flag () */
break;
+ case 's':
--
1.7.9.5
diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
new file mode 100644
index 0000000000..185590cabd
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
@@ -0,0 +1,41 @@
+From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@aura-online.co.uk>
+Date: Sat, 23 Aug 2014 09:46:39 +0100
+Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
+
+This built-in check is simpler than the previous method and, most
+importantly, works when cross-compiling.
+
+Upstream-Status: Accepted
+[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f]
+
+Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
+---
+ configure.in | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 1a3f841..4a4d6d0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
+ dnl
+ dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
+ dnl
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
+-#include <sys/types.h>
+-int main(void) {
+- uid_t u;
+- gid_t g;
+- return (sizeof u < 4) || (sizeof g < 4);
+-}
+- ])], [id32bit="yes"], [id32bit="no"])
+-
+- if test "x$id32bit" = "xyes"; then
++ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
++ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
++
++ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
+ AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
+ enable_subids="yes"
+ else
diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
new file mode 100644
index 0000000000..4fa3d184ed
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Inappropriate [OE specific]
+
+commonio.c: fix unexpected open failure in chroot environment
+
+When using commands with '-R <newroot>' option in our pseudo environment,
+we would usually get the 'Pemission Denied' error. This patch serves as
+a workaround to this problem.
+
+Note that this patch doesn't change the logic in the code, it just expands
+the codes.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lib/commonio.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/lib/commonio.c b/lib/commonio.c
+index cc536bf..51cafd9 100644
+--- a/lib/commonio.c
++++ b/lib/commonio.c
+@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode)
+ db->cursor = NULL;
+ db->changed = false;
+
+- fd = open (db->filename,
+- (db->readonly ? O_RDONLY : O_RDWR)
+- | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
+- saved_errno = errno;
++ if (db->readonly) {
++ fd = open (db->filename,
++ (true ? O_RDONLY : O_RDWR)
++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++ saved_errno = errno;
++ } else {
++ fd = open (db->filename,
++ (false ? O_RDONLY : O_RDWR)
++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++ saved_errno = errno;
++ }
++
+ db->fp = NULL;
+ if (fd >= 0) {
+ #ifdef WITH_TCB
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
deleted file mode 100644
index 80ebdc22a4..0000000000
--- a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-shadow: Fix parsing of gshadow entries
-
-Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096]
-
-newgrp command does not function properly.
-Even with the valid password, it outputs: "'Invalid password'"
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
-2010-02-14 Michael Bunk <mb@computer-leipzig.com>
-
- * NEWS, lib/gshadow.c: Fix parsing of gshadow entries.
-
-diff -urpN a/lib/gshadow.c b/lib/gshadow.c
---- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800
-+++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800
-@@ -222,6 +222,7 @@ void endsgent (void)
- if (NULL == buf) {
- return NULL;
- }
-+ buflen = BUFSIZ;
- }
-
- if (NULL == fp) {
-@@ -229,9 +230,9 @@ void endsgent (void)
- }
-
- #ifdef USE_NIS
-- while (fgetsx (buf, (int) sizeof buf, fp) == buf)
-+ while (fgetsx (buf, (int) buflen, fp) == buf)
- #else
-- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
-+ if (fgetsx (buf, (int) buflen, fp) == buf)
- #endif
- {
- while ( ((cp = strrchr (buf, '\n')) == NULL)
diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000000..02cb91aafd
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Subject: fix installation failure with subids disabled
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/Makefile.am | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 25e288d..076f8ef 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -52,7 +52,10 @@ usbin_PROGRAMS = \
+ noinst_PROGRAMS = id sulogin
+
+ suidbins = su
+-suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap
++suidubins = chage chfn chsh expiry gpasswd newgrp passwd
++if ENABLE_SUBIDS
++suidubins += newgidmap newuidmap
++endif
+ if ACCT_TOOLS_SETUID
+ suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod
+ endif
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
index 0b1629f143..2be341a216 100644
--- a/meta/recipes-extended/shadow/files/securetty
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -9,23 +9,46 @@ ttyS2
ttyS3
# ARM AMBA SoCs
+ttyAM0
+ttyAM1
+ttyAM2
+ttyAM3
ttyAMA0
ttyAMA1
ttyAMA2
ttyAMA3
+# QCOM Socs
+ttyHSL0
+ttyHSL1
+ttyHSL2
+ttyHSL3
+ttyMSM0
+ttyMSM1
+ttyMSM2
+
# Samsung ARM SoCs
ttySAC0
ttySAC1
ttySAC2
ttySAC3
+# STM SoCs
+ttyAS0
+ttyAS1
+ttyAS2
+ttyAS3
+
# TI OMAP SoCs
ttyO0
ttyO1
ttyO2
ttyO3
+# Xilinx Zynq SoC
+ttyPS0
+ttyPS1
+
# USB dongles
ttyUSB0
ttyUSB1
@@ -137,6 +160,14 @@ ttymxc3
ttymxc4
ttymxc5
+# Freescale lpuart ports
+ttyLP0
+ttyLP1
+ttyLP2
+ttyLP3
+ttyLP4
+ttyLP5
+
# Standard serial ports, with devfs
tts/0
tts/1
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
deleted file mode 100644
index 651474674b..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/283725
-https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/libmisc/env.c
-===================================================================
---- shadow-4.1.4.2.orig/libmisc/env.c 2009-04-27 13:07:56.000000000 -0700
-+++ shadow-4.1.4.2/libmisc/env.c 2010-06-03 17:44:51.456408474 -0700
-@@ -251,7 +251,7 @@ void sanitize_env (void)
- if (strncmp (*cur, *bad, strlen (*bad)) != 0) {
- continue;
- }
-- if (strchr (*cur, '/') != NULL) {
-+ if (strchr (*cur, '/') == NULL) {
- continue; /* OK */
- }
- for (move = cur; NULL != *move; move++) {
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
deleted file mode 100644
index 640200b796..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/300790
-http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html
-
-2009-11-05 Nicolas François <nicolas.francois@centraliens.net>
-
- * NEWS, src/groupmod.c: Fixed groupmod when configured with
- --enable-account-tools-setuid.
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/src/groupmod.c
-===================================================================
---- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700
-+++ shadow-4.1.4.2/src/groupmod.c 2010-06-03 17:45:43.828952613 -0700
-@@ -720,7 +720,7 @@ int main (int argc, char **argv)
- {
- struct passwd *pampw;
- pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
-- if (NULL == pamh) {
-+ if (NULL == pampw) {
- fprintf (stderr,
- _("%s: Cannot determine your user name.\n"),
- Prog);
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
deleted file mode 100644
index 0dc4d75b97..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/show_bug.cgi?id=301957
-https://alioth.debian.org/scm/browser.php?group_id=30580
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/src/su.c
-===================================================================
---- shadow-4.1.4.2.orig/src/su.c 2009-07-23 13:38:56.000000000 -0700
-+++ shadow-4.1.4.2/src/su.c 2010-06-03 17:46:47.718944010 -0700
-@@ -378,7 +378,7 @@ int main (int argc, char **argv)
- #endif
- #endif /* !USE_PAM */
-
-- sanitize_env ();
-+ /* sanitize_env (); */
-
- (void) setlocale (LC_ALL, "");
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
diff --git a/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch b/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
deleted file mode 100644
index a793f09a4e..0000000000
--- a/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-# patch is from openembedded:
-# commit 2db61370333f7a2fc1dbb86385734883387e0217
-# Author: Martin Jansa <Martin.Jansa@gmail.com>
-# Date: Fri Apr 2 07:34:46 2010 +0200
-#
-# shadow: fix do_install with automake-1.11
-#
-# Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>
-
-man_nopan is for !USE_PAM already included in man_MANS and automake-1.11 hates to install some file twice
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -uNr shadow-4.1.4.2.orig/man/Makefile.am shadow-4.1.4.2/man/Makefile.am
---- shadow-4.1.4.2.orig/man/Makefile.am 2009-03-14 15:40:10.000000000 +0100
-+++ shadow-4.1.4.2/man/Makefile.am 2010-04-02 07:31:17.000000000 +0200
-@@ -163,7 +163,6 @@
- $(man_MANS) \
- $(man_XMANS) \
- $(addprefix login.defs.d/,$(login_defs_v)) \
-- $(man_nopam) \
- id.1 \
- id.1.xml \
- sulogin.8 \
-diff -uNr shadow-4.1.4.2.orig/man/fr/Makefile.am shadow-4.1.4.2/man/fr/Makefile.am
---- shadow-4.1.4.2.orig/man/fr/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/fr/Makefile.am 2010-04-02 07:42:11.000000000 +0200
-@@ -52,7 +52,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1
-
- include ../generate_translations.mak
-diff -uNr shadow-4.1.4.2.orig/man/it/Makefile.am shadow-4.1.4.2/man/it/Makefile.am
---- shadow-4.1.4.2.orig/man/it/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/it/Makefile.am 2010-04-02 07:42:20.000000000 +0200
-@@ -46,7 +46,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- logoutd.8
-
-diff -uNr shadow-4.1.4.2.orig/man/ja/Makefile.am shadow-4.1.4.2/man/ja/Makefile.am
---- shadow-4.1.4.2.orig/man/ja/Makefile.am 2007-12-31 17:48:28.000000000 +0100
-+++ shadow-4.1.4.2/man/ja/Makefile.am 2010-04-02 07:42:17.000000000 +0200
-@@ -49,7 +49,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- shadow.3 \
- sulogin.8
-diff -uNr shadow-4.1.4.2.orig/man/pl/Makefile.am shadow-4.1.4.2/man/pl/Makefile.am
---- shadow-4.1.4.2.orig/man/pl/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/pl/Makefile.am 2010-04-02 07:42:07.000000000 +0200
-@@ -49,7 +49,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- getspnam.3 \
- id.1 \
- shadow.3 \
-diff -uNr shadow-4.1.4.2.orig/man/ru/Makefile.am shadow-4.1.4.2/man/ru/Makefile.am
---- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:39:00.000000000 +0200
-+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:42:01.000000000 +0200
-@@ -54,7 +54,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- sulogin.8
-
-diff -uNr shadow-4.1.4.2.orig/man/sv/Makefile.am shadow-4.1.4.2/man/sv/Makefile.am
---- shadow-4.1.4.2.orig/man/sv/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/sv/Makefile.am 2010-04-02 07:42:24.000000000 +0200
-@@ -53,8 +53,7 @@
- endif
-
- EXTRA_DIST = \
-- $(man_MANS) \
-- $(man_nopam)
-+ $(man_MANS)
-
- include ../generate_translations.mak
-
---- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:54:09.000000000 +0200
-+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:51:57.000000000 +0200
-@@ -1,7 +1,6 @@
- mandir = @mandir@/ru
-
- man_MANS = \
-- $(man_nopam) \
- chage.1 \
- chfn.1 \
- chgpasswd.8 \
diff --git a/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch b/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
deleted file mode 100644
index 6a27ed387d..0000000000
--- a/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: pending
-
-Automake 1.12 has deprecated automatic de-ANSI-fication support
-
-This patch avoids this issue with automake 1.12:
-
-| configure.in:22: error: automatic de-ANSI-fication support has been removed
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/02
-
-Index: shadow-4.1.4.3/configure.in
-===================================================================
---- shadow-4.1.4.3.orig/configure.in
-+++ shadow-4.1.4.3/configure.in
-@@ -19,7 +19,6 @@ AC_PROG_CC
- AC_ISC_POSIX
- AC_PROG_LN_S
- AC_PROG_YACC
--AM_C_PROTOTYPES
- AM_PROG_LIBTOOL
-
- dnl Checks for libraries.
diff --git a/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch b/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
deleted file mode 100644
index 7cd45afebb..0000000000
--- a/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-
-This patch is from Slackware, I tried to find the actual
-author to add that attribution. The comment below is the
-best summary, I will not repeat it here.
-
-Upstream-Status: Backport from slackware
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: shadow-4.1.4.3/lib/encrypt.c
-===================================================================
---- shadow-4.1.4.3.orig/lib/encrypt.c
-+++ shadow-4.1.4.3/lib/encrypt.c
-@@ -45,15 +45,40 @@ char *pw_encrypt (const char *clear, con
- static char cipher[128];
- char *cp;
-
-- cp = crypt (clear, salt);
-- if (!cp) {
-- /*
-- * Single Unix Spec: crypt() may return a null pointer,
-- * and set errno to indicate an error. The caller doesn't
-- * expect us to return NULL, so...
-- */
-- perror ("crypt");
-- exit (EXIT_FAILURE);
-+ cp = crypt (clear, salt);
-+ if (!cp) {
-+ /*
-+ * In glibc-2.17 and newer, crypt() will return NULL if
-+ * it was called using an invalid salt format. Previous
-+ * versions of glibc would go ahead and compute a DES hash
-+ * using the invalid salt. The salt value in this case was
-+ * always '!'. We might arrive at this place if either the
-+ * user does not exist, or if the hash in /etc/shadow doesn't
-+ * have the proper magic for one of the supported hash
-+ * formats (for example, if the account was locked using
-+ * "passwd -l". To handle this situation, we will recompute
-+ * the hash using a hardcoded salt as was previously done
-+ * by glibc. The hash returned by the old glibc function
-+ * always began with "!!", which would ensure that it could
-+ * never match an otherwise valid hash in /etc/shadow that
-+ * was disabled with a "!" at the beginning (since the second
-+ * character would never be "!" as well), so we will also
-+ * prepend the resulting hash with "!!". Finally, in case
-+ * crypt() failed for some other reason we will check to see
-+ * if we still get NULL from crypt even with the valid salt
-+ * and will fail if that's the case.
-+ */
-+
-+ /* Recalculate hash using a hardcoded, valid SHA512 salt: */
-+ cp = crypt (clear, "$6$8IIcy/1EPOk/");
-+
-+ if (!cp) {
-+ perror ("crypt");
-+ exit (EXIT_FAILURE);
-+ } else {
-+ sprintf (cipher, "!!%s", cp);
-+ return cipher;
-+ }
- }
-
- /* The GNU crypt does not return NULL if the algorithm is not
diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch
deleted file mode 100644
index ff5016c0bf..0000000000
--- a/meta/recipes-extended/shadow/files/useradd.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Work around a bug introduced with the --root option which was causing
-all other arguments to be ignored.
-
-Upstream-Status: inappropriate
-Signed-off-by: Phil Blundell <philb@gnu.org>
-
---- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100
-+++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100
-@@ -1957,6 +1957,8 @@
-
- get_defaults ();
-
-+ optind = 1;
-+
- process_flags (argc, argv);
-
- #ifdef ACCT_TOOLS_SETUID
diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000000..37dc153fca
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+usermod: fix compilation failure with subids disabled
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/usermod.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/usermod.c b/src/usermod.c
+index e7d4351..685b50a 100644
+--- a/src/usermod.c
++++ b/src/usermod.c
+@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv)
+ Prog, (unsigned long) user_newid);
+ exit (E_UID_IN_USE);
+ }
+-
++#ifdef ENABLE_SUBIDS
+ if ( (vflg || Vflg)
+ && !is_sub_uid) {
+ fprintf (stderr,
+@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv)
+ Prog, sub_gid_dbname (), "-w", "-W");
+ exit (E_USAGE);
+ }
++#endif
+ }
+
+ /*
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
index 0e0410043b..c78f888cf4 100644
--- a/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
@@ -9,6 +9,8 @@ PR = "r3"
SRC_URI = "file://securetty"
+S = "${WORKDIR}"
+
# Since SERIAL_CONSOLES is likely to be set from the machine configuration
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
index 697569c47e..697569c47e 100644
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 6848e054b3..bb3a927c17 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -1,50 +1,42 @@
SUMMARY = "Tools to change and administer password and group data"
HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
-SECTION = "base utils"
+SECTION = "base/utils"
LICENSE = "BSD | Artistic-1.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
+LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
DEPENDS = "shadow-native"
DEPENDS_class-native = ""
DEPENDS_class-nativesdk = ""
-SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
- file://shadow.automake-1.11.patch \
- file://shadow_fix_for_automake-1.12.patch \
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
file://shadow-4.1.3-dots-in-usernames.patch \
- file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+ file://usermod-fix-compilation-failure-with-subids-disabled.patch \
+ file://fix-installation-failure-with-subids-disabled.patch \
+ file://0001-su.c-fix-to-exec-command-correctly.patch \
+ file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
+ file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
"
SRC_URI_append_class-target = " \
file://login_defs_pam.sed \
- file://shadow-4.1.4.2-groupmod-pam-check.patch \
- file://shadow-4.1.4.2-su_no_sanitize_env.patch \
file://shadow-update-pam-conf.patch \
- file://slackware_fix_for_glib-2.17_crypt.patch \
- file://fix-etc-gshadow-reading.patch \
"
SRC_URI_append_class-native = " \
- file://add_root_cmd_options.patch \
file://disable-syslog.patch \
- file://useradd.patch \
- file://add_root_cmd_groupmems.patch \
file://allow-for-setting-password-in-clear-text.patch \
+ file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
+ file://0001-useradd.c-create-parent-directories-when-necessary.patch \
"
SRC_URI_append_class-nativesdk = " \
- file://add_root_cmd_options.patch \
file://disable-syslog.patch \
- file://useradd.patch \
- file://add_root_cmd_groupmems.patch \
"
-SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
-SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
-
-PR = "r14"
+SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
+SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41"
# Additional Policy files for PAM
PAM_SRC_URI = "file://pam.d/chfn \
@@ -61,12 +53,14 @@ EXTRA_OECONF += "--without-audit \
--without-libcrack \
--without-selinux \
--with-group-name-max-length=24 \
+ --enable-subordinate-ids=yes \
${NSCDOPT}"
NSCDOPT = ""
NSCDOPT_class-native = "--without-nscd"
NSCDOPT_class-nativesdk = "--without-nscd"
NSCDOPT_libc-uclibc = " --without-nscd"
+NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}"
PAM_PLUGINS = "libpam-runtime \
pam-plugin-faildelay \
@@ -85,6 +79,8 @@ PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG_class-native = ""
PACKAGECONFIG_class-nativesdk = ""
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
RDEPENDS_${PN} = "shadow-securetty \
base-passwd"
@@ -164,13 +160,17 @@ ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
+
pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
- rootarg="--root=$D"
+ rootarg="--root $D"
else
rootarg=""
fi
- pwconv $rootarg
- grpconv $rootarg
+ pwconv $rootarg || exit 1
+ grpconv $rootarg || exit 1
}
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb
index 5675cb8cc9..5675cb8cc9 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.2.1.bb
diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
new file mode 100644
index 0000000000..958fe983c5
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
@@ -0,0 +1,116 @@
+From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001
+From: Zheng Junling <zhengjunling@huawei.com>
+Date: Mon, 16 Jun 2014 12:51:25 +0000
+Subject: [PATCH] slang: fix the iconv existence checking
+
+When checking whether there is iconv, the configure file always check
+the host env.
+
+Now we make it working properly by adding correct prefix for cross-
+compiling environment.
+
+When enabling iconv-module, we see a QA warning because rpaths hardcoded
+into the build. And rpaths are not needed, so let's turn this off.
+
+This patch is generated by referencing the existing "fix-check-pcre"
+patch.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Zheng Junling <zhengjunling@huawei.com>
+---
+ configure | 60 ++++++------------------------------------------------------
+ 1 file changed, 6 insertions(+), 54 deletions(-)
+
+diff --git a/configure b/configure
+index 7a96256..91632f3 100755
+--- a/configure
++++ b/configure
+@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+ /usr/include/iconv,/usr/lib \
+ /usr/iconv/include,/usr/iconv/lib \
+ /usr/include,/usr/lib \
++ /usr/include,/usr/lib64 \
+ /opt/include/iconv,/opt/lib \
+ /opt/iconv/include,/opt/iconv/lib \
+ /opt/include,/opt/lib"
+@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+ xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
+ xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
+ found=0
+- if test -r $xincdir/$xincfile
++ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
+ then
+ for E in $exts
+ do
+- if test -r "$xlibdir/$xlibfile.$E"
++ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
+ then
+- jd_iconv_include_dir="$xincdir"
+- jd_iconv_library_dir="$xlibdir"
++ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
++ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
+ jd_with_iconv_library="yes"
+ found=1
+ break
+@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
+ then
+ ICONV_LIB=""
+ else
+-
+-if test "X$jd_iconv_library_dir" != "X"
+-then
+- if test "X$RPATH" = "X"
+- then
+-
+-case "$host_os" in
+- *linux*|*solaris* )
+- if test "X$GCC" = Xyes
+- then
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-Wl,-R,"
+- else
+- RPATH="-Wl,-R"
+- fi
+- else
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-R "
+- else
+- RPATH="-R"
+- fi
+- fi
+- ;;
+- *osf*|*openbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-rpath,"
+- else
+- RPATH="-rpath "
+- fi
+- ;;
+- *netbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-R"
+- fi
+- ;;
+-esac
+-
+- if test "X$RPATH" != "X"
+- then
+- RPATH="$RPATH$jd_iconv_library_dir"
+- fi
+- else
+- RPATH="$RPATH:$jd_iconv_library_dir"
+- fi
+-fi
+-
++ RPATH=""
+ fi
+
+ ICONV_INC=-I$jd_iconv_include_dir
+--
+1.8.3.4
+
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
index 90ed2d0a47..ed1190ad69 100644
--- a/meta/recipes-extended/slang/slang_2.2.4.bb
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -21,10 +21,13 @@ SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
file://fix-check-pcre.patch \
file://change-char-type-to-signed-char-in-macros.patch \
file://sprintf-bug-concerning-8-bit-characters.patch \
+ file://slang-fix-the-iconv-existence-checking.patch \
"
inherit autotools-brokensep
+CLEANBROKEN = "1"
+
SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
diff --git a/meta/recipes-extended/sudo/files/volatiles.99_sudo b/meta/recipes-extended/sudo/files/volatiles.99_sudo
deleted file mode 100644
index ecb576eaa3..0000000000
--- a/meta/recipes-extended/sudo/files/volatiles.99_sudo
+++ /dev/null
@@ -1 +0,0 @@
-d root root 0755 /var/run/sudo none
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 6de984a9f5..6e9aec824b 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -6,18 +6,20 @@ SECTION = "admin"
LICENSE = "ISC & BSD & Zlib"
LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=69e337d679950e304953813158595256 \
file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \
- file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
- file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
- file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \
- file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://compat/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
+ file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
+ file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
+ file://lib/util/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \
+ file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
inherit autotools
PACKAGECONFIG ??= ""
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+CONFFILES_${PN} = "${sysconfdir}/sudoers"
+
EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
do_configure_prepend () {
@@ -28,7 +30,7 @@ do_configure_prepend () {
# mksigname/mksiglist are used on build host to generate source files
do_compile_prepend () {
- oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C compat mksigname mksiglist
+ oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist
}
# Explicitly create ${localstatedir}/lib before do_install to ensure
diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.11p2.bb
index 46d47817e5..c5e2545c18 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.11p2.bb
@@ -2,12 +2,12 @@ require sudo.inc
SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://volatiles.99_sudo"
+ "
PAM_SRC_URI = "file://sudo.pam"
-SRC_URI[md5sum] = "fcd8d0d9f9f0397d076ee901e242ed39"
-SRC_URI[sha256sum] = "6eda135fa68163108f1c24de6975de5ddb09d75730bb62d6390bda7b04345400"
+SRC_URI[md5sum] = "84012b4871b6c775c957cd310d5bad87"
+SRC_URI[sha256sum] = "8133849418fa18cf6b6bb6893d1855ff7afe21db8923234a00bf045c90fba1ad"
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
@@ -22,9 +22,8 @@ do_install_append () {
chmod 4111 ${D}${bindir}/sudo
chmod 0440 ${D}${sysconfdir}/sudoers
- # Explicitly remove the ${localstatedir}/run directory as we can
- # manage it by a configuration file under ${sysconfdir}/default/volatiles/
+ # Explicitly remove the ${localstatedir}/run directory to avoid QA error
rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
- install -d ${D}/${sysconfdir}/default/volatiles
- install -m 644 ${WORKDIR}/volatiles.99_sudo ${D}/${sysconfdir}/default/volatiles/99_sudo
}
+
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
new file mode 100644
index 0000000000..975ecc2b63
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
@@ -0,0 +1,4 @@
+require sysklogd.inc
+
+SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8"
+SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
deleted file mode 100644
index 5c9588945d..0000000000
--- a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require sysklogd.inc
-PR = "r7"
-
-SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
-SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 09a5d28d4a..566cb08fc2 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -4,7 +4,7 @@ HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
LICENSE = "GPLv2+"
SECTION = "console/utils"
-SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \
+SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
file://99_sysstat \
"
diff --git a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
deleted file mode 100644
index 654457dbe1..0000000000
--- a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-SRC_URI[md5sum] = "039dcd235dfcfb3d4acc0a05730f9512"
-SRC_URI[sha256sum] = "3bfd1b4c5b99314585709c092096234b6e181741729f601d18d0ed7f0612612a"
diff --git a/meta/recipes-extended/sysstat/sysstat_11.0.2.bb b/meta/recipes-extended/sysstat/sysstat_11.0.2.bb
new file mode 100644
index 0000000000..ce83f4f0f9
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_11.0.2.bb
@@ -0,0 +1,6 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI[md5sum] = "27d4ca66869dce132ace3194dd7d7539"
+SRC_URI[sha256sum] = "acd87fdfbe7c796480f14fc26119d8f785d26827d74a0f5bced6c492a91f1b96"
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb b/meta/recipes-extended/tar/tar-replacement-native_1.28.bb
index 071ede765b..071ede765b 100644
--- a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb
+++ b/meta/recipes-extended/tar/tar-replacement-native_1.28.bb
diff --git a/meta/recipes-extended/tar/tar_1.27.1.bb b/meta/recipes-extended/tar/tar_1.28.bb
index 439bb500b9..a15b4b60e3 100644
--- a/meta/recipes-extended/tar/tar_1.27.1.bb
+++ b/meta/recipes-extended/tar/tar_1.28.bb
@@ -5,6 +5,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI += "file://remove-gets.patch \
"
-
-SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf"
-SRC_URI[sha256sum] = "9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6"
+SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
+SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index c7954e7ccd..4d6430634e 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -87,10 +87,12 @@ do_install () {
oe_libinstall -a libwrap ${D}${libdir}
oe_libinstall -C shared -so libwrap ${D}${base_libdir}
- rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
- libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
- ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
- rm -f ${D}${base_libdir}/libwrap.so
+ if [ "${libdir}" != "${base_libdir}" ] ; then
+ rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+ libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
+ ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
+ rm -f ${D}${base_libdir}/libwrap.so
+ fi
install -d ${D}${sbindir}
for b in ${BINS}; do
@@ -117,5 +119,10 @@ do_install () {
install -d ${D}${includedir}
install -m 0644 tcpd.h ${D}${includedir}/
+
+ install -d ${D}${sysconfdir}
+ touch ${D}${sysconfdir}/hosts.allow
+ touch ${D}${sysconfdir}/hosts.deny
}
+FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny"
diff --git a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
deleted file mode 100644
index d1c9fe5746..0000000000
--- a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: texi2html-5.0/po_document/Makefile.in.in
-===================================================================
---- texi2html-5.0.orig/po_document/Makefile.in.in
-+++ texi2html-5.0/po_document/Makefile.in.in
-@@ -9,7 +9,7 @@
- # General Public License and is *not* in the public domain.
- #
- # Origin: gettext-0.17
--GETTEXT_MACRO_VERSION = 0.17
-+GETTEXT_MACRO_VERSION = 0.18
-
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
-Index: texi2html-5.0/po_messages/Makefile.in.in
-===================================================================
---- texi2html-5.0.orig/po_messages/Makefile.in.in
-+++ texi2html-5.0/po_messages/Makefile.in.in
-@@ -9,7 +9,7 @@
- # General Public License and is *not* in the public domain.
- #
- # Origin: gettext-0.17
--GETTEXT_MACRO_VERSION = 0.17
-+GETTEXT_MACRO_VERSION = 0.18
-
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb
index aa5f1fddaf..eac289e3b5 100644
--- a/meta/recipes-extended/texi2html/texi2html_5.0.bb
+++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PR = "r2"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \
- file://fix_gettext_version.patch"
+ "
SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
@@ -15,15 +15,10 @@ SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89
inherit autotools gettext texinfo
do_configure_prepend() {
- # Make a directory for the old gettext setup
- if [ ! -d ${S}/po ]; then
- mkdir ${S}/po
- fi
-}
-
-do_configure_append() {
- # Clean up the phony po directory
- rm -rf ${S}/po
+ # autotools_do_configure updates po/Makefile.in.in, we also need
+ # update po_document.
+ cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+ cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_messages/
}
do_install_append () {
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
index b0ebf75a15..8b7033eccc 100644
--- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
@@ -44,7 +44,7 @@ with details on the recipe that failed.
""" % this_binary
# Autotools setups query the version, so this is actually necessary. Some of
-# them (lookin' at you, eglibc) actually look for the substring "GNU texinfo,"
+# them (lookin' at you, glibc) actually look for the substring "GNU texinfo,"
# so we put that substring in there without actually telling a lie.
version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
new file mode 100644
index 0000000000..4a8cc57a56
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
@@ -0,0 +1,28 @@
+fix the macro check
+
+Upstream-status: Pending
+
+configure does not check if locale.h exists, but check setlocale,
+if setlocale exist, the locale.h should exist.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ lib/system.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/system.h b/lib/system.h
+index 946eb3c..c70037b 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -42,7 +42,7 @@ extern char *substring (const char *, const char *);
+ #include <ctype.h>
+
+ /* All systems nowadays probably have these functions, but ... */
+-#ifdef HAVE_LOCALE_H
++#ifdef HAVE_SETLOCALE
+ #include <locale.h>
+ #endif
+ #ifndef HAVE_SETLOCALE
+--
+1.7.10.4
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
new file mode 100644
index 0000000000..2cc5fbb1fc
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
@@ -0,0 +1,49 @@
+From 458e9450cecf703f55536e609365162719585900 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Wed, 10 Sep 2014 17:03:29 +0800
+Subject: [PATCH] do not compile host tools, since we have native
+
+Upstream-status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure.ac | 23 +----------------------
+ 1 file changed, 1 insertion(+), 22 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b46130d..cf58654 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,28 +90,7 @@ AC_CANONICAL_BUILD
+ # $native_tools is also added to SUBDIRS in the main Makefile.am,
+ # so that make compiles the native tools first.
+ #
+-if test "$cross_compiling" = no; then
+- native_tools=
+-else
+- native_tools=tools
+- test -d "$native_tools" || mkdir "$native_tools"
+- confdir=`(cd "$srcdir";pwd)`
+- # Make sure the secondary configure won't fail with
+- # "error: source directory already configured".
+- rm -f config.status
+- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
+- cd "$native_tools" || exit 1
+- # Run secondary configure in alternate environment or
+- # it gets the wrong CC etc. env -i gives this build host configure
+- # a clean environment.
+- env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \
+- PATH="${PATH}" \
+- tools_only=1 \
+- ${confdir}/configure --build=${build} --host=${build} \
+- --disable-rpath --disable-nls
+- cd .. || exit 1
+- AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
+-fi
++native_tools=
+ AC_SUBST(native_tools)
+ AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
+
+--
+1.9.1
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
new file mode 100644
index 0000000000..d9bed6933d
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
@@ -0,0 +1,24 @@
+From 9b0df7d6d3c18cfac82c291d60a5357d1bc8d9d0 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Wed, 10 Sep 2014 17:10:03 +0800
+Subject: [PATCH] using native makeinfo
+
+Upstream-status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ doc/Makefile.am | 2 +-
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 63df818..b6ceb34 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -19,7 +19,7 @@ man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1 texi2dvi.1 \
+
+ # Use the programs built in our distribution, taking account of possible
+ # cross-compiling.
+-MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo
++MAKEINFO = makeinfo
+ INSTALL_INFO = $(top_builddir)/$(native_tools)/util/install-info
+
+ TXI_XLATE = txi-cs.tex txi-de.tex txi-en.tex txi-es.tex txi-fr.tex \
diff --git a/meta/recipes-extended/texinfo/texinfo_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb
new file mode 100644
index 0000000000..6b36b97603
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_4.8.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+PROVIDES_append_class-native = " texinfo-4.8-replacement-native"
+
+DEPENDS = "zlib ncurses texinfo-4.8-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch \
+ file://using-native-makeinfo.patch \
+"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+ file://check-locale-h.patch \
+ file://do-compile-native-tools.patch \
+ ${TARGET_PATCH} \
+ "
+
+SRC_URI[md5sum] = "4e9a1a591ed236003d0d4b008bf07eef"
+SRC_URI[sha256sum] = "1f3cdeebe65fdf510f55d765ab1031b54416aa5bc2635b6a54ef9bcb2367c917"
+
+S = "${WORKDIR}/${BP}"
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+do_install_append() {
+ mkdir -p ${D}${datadir}/${tex_texinfo}
+ install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+}
+
+do_install_append_class-native() {
+ install -m 755 info/makedoc ${D}${bindir}
+ install -m 755 makeinfo/makeinfo ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
+ ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+ ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+ ${datadir}/${tex_texinfo} \
+ ${mandir}/man1 ${mandir}/man5"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/texinfo/texinfo_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb
index be90aba1d2..d50a86e781 100644
--- a/meta/recipes-extended/texinfo/texinfo_5.2.bb
+++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb
@@ -9,6 +9,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PROVIDES_append_class-native = " texinfo-replacement-native"
+def compress_pkg(d):
+ if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+ compress = d.getVar("DOC_COMPRESS", True)
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
DEPENDS = "zlib ncurses texinfo-replacement-native"
DEPENDS_class-native = "zlib-native ncurses-native"
@@ -32,6 +45,12 @@ tex_texinfo = "texmf/tex/texinfo"
inherit gettext autotools
+do_configure_prepend () {
+ # autotools_do_configure updates po/Makefile.in.in, we also need
+ # update po_document.
+ cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+}
+
do_compile_prepend() {
if [ -d tools ];then
oe_runmake -C tools/gnulib/lib
@@ -51,7 +70,7 @@ do_install_append_class-native() {
PACKAGES += "info info-doc"
FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
+FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
${mandir}/man1/info.1* ${mandir}/man5/info.5* \
${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
diff --git a/meta/recipes-extended/tzcode/tzcode-native.inc b/meta/recipes-extended/tzcode/tzcode-native.inc
index f0343332ae..4af1e20739 100644
--- a/meta/recipes-extended/tzcode/tzcode-native.inc
+++ b/meta/recipes-extended/tzcode/tzcode-native.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
LICENSE = "PD & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=0b7570113550eb5d30aa4bd220964b8f"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6"
S = "${WORKDIR}"
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2014e.bb b/meta/recipes-extended/tzcode/tzcode-native_2014e.bb
deleted file mode 100644
index 405ed60f86..0000000000
--- a/meta/recipes-extended/tzcode/tzcode-native_2014e.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
- ftp://ftp.iana.org/tz/releases/tzdata2014e.tar.gz;name=tzdata"
-
-SRC_URI[tzcode.md5sum] = "552251600ee3571c244d33c7196ec2ed"
-SRC_URI[tzcode.sha256sum] = "43ebc426ab4911e222a4487f24289adfd2bc5eb09363a5e77cdabf56374a8c1c"
-SRC_URI[tzdata.md5sum] = "8a49fdedd4e832da8e85f7f9bcaedc33"
-SRC_URI[tzdata.sha256sum] = "08e243a79051f838d86ac1311a78b74047951302d448024e823b5b7aa71f86c5"
-
-require tzcode-native.inc
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015a.bb b/meta/recipes-extended/tzcode/tzcode-native_2015a.bb
new file mode 100644
index 0000000000..a0a31d6cfb
--- /dev/null
+++ b/meta/recipes-extended/tzcode/tzcode-native_2015a.bb
@@ -0,0 +1,10 @@
+# note that we allow for us to use data later than our code version
+#
+SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
+ ftp://ftp.iana.org/tz/releases/tzdata2015a.tar.gz;name=tzdata"
+
+SRC_URI[tzcode.md5sum] = "8f375ede46ae137fbac047ac431bda37"
+SRC_URI[tzcode.sha256sum] = "885bab11f286852f34030d7a86ede7d4126319ca74b8ee22be8ca7c17d72dd19"
+SRC_URI[tzdata.md5sum] = "4ed11c894a74a5ea64201b1c6dbb8831"
+SRC_URI[tzdata.sha256sum] = "c52490917d00a8e7fc9b5f0b1b65ef6ec76d612b5b20c81bf86a04147af18e4c"
+require tzcode-native.inc
diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc
index 06a6bea4f1..f13a4fe910 100644
--- a/meta/recipes-extended/tzdata/tzdata.inc
+++ b/meta/recipes-extended/tzdata/tzdata.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Timezone data"
HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
SECTION = "base"
LICENSE = "PD & BSD"
-LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
+LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1"
DEPENDS = "tzcode-native"
inherit allarch
diff --git a/meta/recipes-extended/tzdata/tzdata_2014e.bb b/meta/recipes-extended/tzdata/tzdata_2014e.bb
deleted file mode 100644
index b53d32331b..0000000000
--- a/meta/recipes-extended/tzdata/tzdata_2014e.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzdata.md5sum] = "8a49fdedd4e832da8e85f7f9bcaedc33"
-SRC_URI[tzdata.sha256sum] = "08e243a79051f838d86ac1311a78b74047951302d448024e823b5b7aa71f86c5"
-
-require tzdata.inc
diff --git a/meta/recipes-extended/tzdata/tzdata_2015a.bb b/meta/recipes-extended/tzdata/tzdata_2015a.bb
new file mode 100644
index 0000000000..6151aee115
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2015a.bb
@@ -0,0 +1,6 @@
+SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzdata.md5sum] = "4ed11c894a74a5ea64201b1c6dbb8831"
+SRC_URI[tzdata.sha256sum] = "c52490917d00a8e7fc9b5f0b1b65ef6ec76d612b5b20c81bf86a04147af18e4c"
+
+require tzdata.inc
diff --git a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
index f5976eb5cf..14ab9c56ab 100644
--- a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch
+++ b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
@@ -33,11 +33,11 @@ Signed-off-by: Roy.Li <rongqing.li@windriver.com>
src/watchdog.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
-Index: watchdog-5.13/src/watchdog.c
+Index: watchdog-5.14/src/watchdog.c
===================================================================
---- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800
-+++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700
-@@ -28,6 +28,7 @@
+--- watchdog-5.14.orig/src/watchdog.c
++++ watchdog-5.14/src/watchdog.c
+@@ -24,6 +24,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <linux/oom.h>
@@ -45,21 +45,35 @@ Index: watchdog-5.13/src/watchdog.c
#include <linux/watchdog.h>
#include <string.h>
-@@ -567,6 +568,8 @@
- pid_t child_pid;
- int oom_adjusted = 0;
- struct stat s;
-+ struct icmp_filter filt;
-+ filt.data = ~(1<<ICMP_ECHOREPLY);
+Index: watchdog-5.14/src/net.c
+===================================================================
+--- watchdog-5.14.orig/src/net.c
++++ watchdog-5.14/src/net.c
+@@ -11,7 +11,8 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <netinet/ip.h>
+-#include <netinet/ip_icmp.h>
++#include <linux/icmp.h>
++//#include <netinet/ip_icmp.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h> /* for gethostname() etc */
+@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist)
+ {
+ struct list *act;
+ int hold = 0;
++ struct icmp_filter filt;
++ filt.data = ~(1<<ICMP_ECHOREPLY);
++
+
+ if (tlist != NULL) {
+ for (act = tlist; act != NULL; act = act->next) {
+@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist)
+ fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno));
+ }
+
++ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
+ /* this is necessary for broadcast pings to work */
+ (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
- #if USE_SYSLOG
- char *opts = "d:i:n:Ffsvbql:p:t:c:r:m:a:";
-@@ -703,7 +706,7 @@
- perror(progname);
- exit(1);
- }
--
-+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
- /* this is necessary for broadcast pings to work */
- (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
-
diff --git a/meta/recipes-extended/watchdog/files/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
index 2fad3a112f..2fad3a112f 100644
--- a/meta/recipes-extended/watchdog/files/fixsepbuild.patch
+++ b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
diff --git a/meta/recipes-extended/watchdog/watchdog_5.13.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
index b9e29d22fc..c77d91dcdd 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.13.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://fixsepbuild.patch \
file://fix-ping-failure.patch"
-SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1"
-SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0"
+
+SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
+SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
inherit autotools
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
index 642d502a50..049b898d39 100644
--- a/meta/recipes-extended/wget/wget.inc
+++ b/meta/recipes-extended/wget/wget.inc
@@ -7,12 +7,18 @@ DEPENDS = "gnutls zlib libpcre"
INC_PR = "r16"
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives pkgconfig
EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
- ac_cv_header_uuid_uuid_h=no"
+ --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
ALTERNATIVE_${PN} = "wget"
+ALTERNATIVE_${PN}_class-nativesdk = ""
ALTERNATIVE_PRIORITY = "100"
RRECOMMENDS_${PN} += "ca-certificates"
+
+BBCLASSEXTEND += "nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
diff --git a/meta/recipes-extended/wget/wget_1.15.bb b/meta/recipes-extended/wget/wget_1.15.bb
deleted file mode 100644
index c2fcca740c..0000000000
--- a/meta/recipes-extended/wget/wget_1.15.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://fix_makefile.patch \
- "
-SRC_URI[md5sum] = "506df41295afc6486662cc47470b4618"
-SRC_URI[sha256sum] = "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
-
-require wget.inc
diff --git a/meta/recipes-extended/wget/wget_1.16.1.bb b/meta/recipes-extended/wget/wget_1.16.1.bb
new file mode 100644
index 0000000000..ca6f0fee25
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.16.1.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://fix_makefile.patch \
+ "
+
+SRC_URI[md5sum] = "5d12410a398ec9907e105e8734561ba0"
+SRC_URI[sha256sum] = "3b834ce69366d4681f295307fce36ee14e122c4ee68a4d1291b62b0b26755a77"
+
+require wget.inc
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
new file mode 100644
index 0000000000..495cdc6cf4
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
@@ -0,0 +1,28 @@
+Subject: [PATCH] automake foreign strictness
+
+Use foreign strictness to avoid automake errors.
+
+Upstream-Status: Inappropriate [upstream no longer active]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b30b6f5..bd3222c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,6 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(which.c)
+-AM_INIT_AUTOMAKE(which, 2.18)
++AC_INIT([which],[2.18])
++AC_CONFIG_SRCDIR(which.c)
++AM_INIT_AUTOMAKE([foreign])
+ AM_CONFIG_HEADER(config.h)
+ AM_MAINTAINER_MODE
+
+--
+1.7.1
+
diff --git a/meta/recipes-extended/which/which-2.20/automake.patch b/meta/recipes-extended/which/which-2.20/automake.patch
new file mode 100644
index 0000000000..ef00bc9f23
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/automake.patch
@@ -0,0 +1,15 @@
+Update autoconf prologue to use "foreign" strictness.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index d974461..a20dfa8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(which.c)
+-AM_INIT_AUTOMAKE(which, 2.20)
++AC_INIT([which],[2.20])
++AC_CONFIG_SRCDIR(which.c)
++AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
index 5fa5d9e8eb..fd68520d97 100644
--- a/meta/recipes-extended/which/which_2.18.bb
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r2"
SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
- file://fix_name_conflict_group_member.patch"
+ file://fix_name_conflict_group_member.patch \
+ file://automake-foreign.patch \
+"
SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb
index f3c6037786..74835543de 100644
--- a/meta/recipes-extended/which/which_2.20.bb
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -18,6 +18,7 @@ PR = "r3"
EXTRA_OECONF = "--disable-iberty"
SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
+ file://automake.patch \
file://remove-declaration.patch"
SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744"
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service
new file mode 100644
index 0000000000..d5fdc5bc29
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Xinetd A Powerful Replacement For Inetd
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/xinetd.pid
+EnvironmentFile=-/etc/sysconfig/xinetd
+ExecStart=@SBINDIR@/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
index 1928949e94..288186e1ba 100644
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -17,12 +17,15 @@ SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
file://xinetd-CVE-2013-4342.patch \
+ file://xinetd.service \
"
SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c"
SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3"
-inherit autotools update-rc.d
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "xinetd.service"
INITSCRIPT_NAME = "xinetd"
INITSCRIPT_PARAMS = "defaults"
@@ -52,6 +55,13 @@ do_install() {
install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/xinetd.service
}
CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.2.0.bb
index b8501a5a39..3439ec911f 100644
--- a/meta/recipes-extended/xz/xz_5.1.3alpha.bb
+++ b/meta/recipes-extended/xz/xz_5.2.0.bb
@@ -25,8 +25,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[md5sum] = "bbb2daa876c87fb2cf9fe4590af9694e"
-SRC_URI[sha256sum] = "9f94506e301d5b6863921bba861a99ba00de384dafb4e5f409679a93e41613d4"
+SRC_URI[md5sum] = "be585bdf8672e4406632eda3d819e284"
+SRC_URI[sha256sum] = "231ef369982240bb20ed7cffa52bb12a4a297ce6871f480ab85e8a7ba98bf3d6"
inherit autotools gettext
@@ -38,3 +38,5 @@ FILES_liblzma-staticdev = "${libdir}/liblzma.a"
FILES_liblzma-dbg = "${libdir}/.debug/liblzma*"
BBCLASSEXTEND = "native nativesdk"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
index 7bdd723ffc..a63d4546f6 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
@@ -20,10 +20,10 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
file://fatal-loader.patch \
"
-SRC_URI[md5sum] = "1195d26f14adfe99ff0878d37678a70a"
-SRC_URI[sha256sum] = "0aafc365eab1083a53f15e4828333b968219ffcb1a995ac6289c0147c9ffad06"
+SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542"
+SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be"
-inherit autotools pkgconfig gettext pixbufcache ptest
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome
LIBV = "2.10.0"
@@ -42,10 +42,7 @@ PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-EXTRA_OECONF = "\
- --disable-introspection \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '--enable-installed-tests', '--disable-installed-tests', d)} \
-"
+EXTRA_OECONF = "--disable-introspection"
PACKAGES =+ "${PN}-xlib"
@@ -67,11 +64,6 @@ FILES_${PN}-dbg += " \
${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
"
-FILES_${PN}-ptest += "${libexecdir}/installed-tests \
- ${datadir}/installed-tests/gdk-pixbuf"
-
-RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
-
PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
PACKAGES_DYNAMIC_class-native = ""
diff --git a/meta/recipes-gnome/gnome/gnome-common_3.7.4.bb b/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
index 1fd2d83b2f..1f9fe8bf5c 100644
--- a/meta/recipes-gnome/gnome/gnome-common_3.7.4.bb
+++ b/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
@@ -10,8 +10,8 @@ inherit gnomebase allarch
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "974cd54626f1d1787481288ef26bd4ba"
-SRC_URI[archive.sha256sum] = "2af2d97010d2a9aeb3b99dd2ce07d1ef023e15a27b412ffe4f067f016ff7117b"
+SRC_URI[archive.md5sum] = "ba58c61d0d81b7c3ff8452c620513a9d"
+SRC_URI[archive.sha256sum] = "4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c"
EXTRA_AUTORECONF = ""
DEPENDS = ""
diff --git a/meta/recipes-gnome/gnome/gnome-desktop.inc b/meta/recipes-gnome/gnome/gnome-desktop.inc
deleted file mode 100644
index 3853022710..0000000000
--- a/meta/recipes-gnome/gnome/gnome-desktop.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-DEPENDS = "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils startup-notification"
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs"
-
-do_configure_prepend () {
- cp ${STAGING_DATADIR_NATIVE}/gnome-common/data/omf.make ${S}
-}
-
-FILES_${PN} += "${datadir}/gnome-about ${datadir}/libgnome-desktop/pnp.ids"
-
-PR = "r6"
-
-inherit gnomebase
-
-do_install_append () {
- sed -i -e's,${STAGING_BINDIR_NATIVE},${bindir},g' ${D}${bindir}/gnome-about
- sed -i -e '1s,#!.*python,#! ${USRBINPATH}/env python,' ${D}${bindir}/gnome-about
-}
-
-
diff --git a/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb b/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb
deleted file mode 100644
index 424eafeaf0..0000000000
--- a/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gnome-desktop.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SRC_URI[archive.md5sum] = "5c80d628a240eb9d9ff78913b31f2f67"
-SRC_URI[archive.sha256sum] = "55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d"
diff --git a/meta/recipes-gnome/gnome/gnome-doc-utils.inc b/meta/recipes-gnome/gnome/gnome-doc-utils.inc
index e148ce3350..958750690a 100644
--- a/meta/recipes-gnome/gnome/gnome-doc-utils.inc
+++ b/meta/recipes-gnome/gnome/gnome-doc-utils.inc
@@ -10,6 +10,8 @@ DEPENDS_class-native = "libxml2-native libxslt-native intltool-native glib-2.0-n
inherit gnomebase gettext python-dir pythonnative autotools-brokensep
+CLEANBROKEN = "1"
+
EXTRA_OECONF += "--disable-scrollkeeper"
do_install_append() {
diff --git a/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb b/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb
deleted file mode 100644
index a0123d9005..0000000000
--- a/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "GNOME desktop-wide GSettings schemas"
-HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-PR = "r1"
-
-DEPENDS = "glib-2.0 intltool-native gobject-introspection-stub-native"
-
-inherit gnomebase gsettings gettext
-
-GNOME_COMPRESS_TYPE = "xz"
-
-SRC_URI[archive.md5sum] = "f9ffca591a984f19a1dd9caeb96b5f23"
-SRC_URI[archive.sha256sum] = "452378c4960a145747ec69f8c6a874e5b7715454df3e2452d1ff1a0a82e76811"
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
deleted file mode 100644
index 71e334d897..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 16 Nov 2012 22:07:28 +0100
-Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Code was copied from GtkToggleButton.
-
-Upstream-Status: submitted [1]
-
-[1] https://bugzilla.gnome.org/show_bug.cgi?id=689138
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- gtk/gtkbutton.c | 8 ++++++--
- 1 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
-index f472007..1beb1b6 100644
---- a/gtk/gtkbutton.c
-+++ b/gtk/gtkbutton.c
-@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
- static void
- gtk_button_update_state (GtkButton *button)
- {
-- gboolean depressed;
-+ gboolean depressed, touchscreen;
- GtkStateType new_state;
-
-+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
-+ "gtk-touchscreen-mode", &touchscreen,
-+ NULL);
-+
- if (button->activate_timeout)
- depressed = button->depress_on_activate;
- else
- depressed = button->in_button && button->button_down;
-
-- if (button->in_button && (!button->button_down || !depressed))
-+ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
- new_state = GTK_STATE_PRELIGHT;
- else
- new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
---
-1.7.6.5
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
deleted file mode 100644
index 354f0ab376..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 69b9441eab2a7215509687dc22b48b6f212d22aa Mon Sep 17 00:00:00 2001
-From: Rob Bradford <rob@linux.intel.com>
-Date: Thu, 4 Jun 2009 15:43:20 +0100
-Subject: [PATCH] =?utf-8?q?bgo#584832=20=E2=80=93=20Duplicate=20the=20exec=20string=20returned=20by=20gtk=5Frecent=5Finfo=5Fget=5Fapplication=5Finfo?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf-8
-Content-Transfer-Encoding: 8bit
-
-This function states that the caller is responsible for freeing the string
-passed returned by reference. Unfortunately if you do this you get a crash
-since the internal value is returned without being duplicated.
----
- gtk/gtkrecentmanager.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-Upstream-Status: Pending
-
-Index: gtk+-2.21.2/gtk/gtkrecentmanager.c
-===================================================================
---- gtk+-2.21.2.orig/gtk/gtkrecentmanager.c 2010-06-22 18:11:30.000000000 +0800
-+++ gtk+-2.21.2/gtk/gtkrecentmanager.c 2010-06-22 18:11:53.000000000 +0800
-@@ -1766,7 +1766,7 @@
- }
-
- if (app_exec)
-- *app_exec = ai->exec;
-+ *app_exec = g_strdup (ai->exec);
-
- if (count)
- *count = ai->count;
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
deleted file mode 100644
index ba893292d6..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkcellrenderer.c
-===================================================================
---- gtk/gtkcellrenderer.c.orig 2010-06-22 17:21:22.000000000 +0800
-+++ gtk/gtkcellrenderer.c 2010-06-22 17:21:25.000000000 +0800
-@@ -566,6 +566,7 @@
-
- if (cell->cell_background_set && !selected)
- {
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_t *cr = gdk_cairo_create (window);
-
- gdk_cairo_rectangle (cr, background_area);
-@@ -573,6 +574,16 @@
- cairo_fill (cr);
-
- cairo_destroy (cr);
-+#else
-+ GdkGC *gc;
-+
-+ gc = gdk_gc_new (window);
-+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
-+ gdk_draw_rectangle (window, gc, TRUE,
-+ background_area->x, background_area->y,
-+ background_area->width, background_area->height);
-+ g_object_unref (gc);
-+#endif
- }
-
- GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
deleted file mode 100644
index d67b797852..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Pending
-https://bugzilla.gnome.org/show_bug.cgi?id=671515
-
-Signed-Off-By: Xiaofeng Yan <xiaofeng.yan@windriver.com>
-# Pick up ${NM} from the environment
-
-Updated to apply to gtk+-2.24.15
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
---- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
-+++ gtk+-2.24.15/configure.ac 2013-02-12 21:25:06.073937041 +0200
-@@ -190,7 +190,7 @@
- AC_SYS_LARGEFILE
-
- AM_PROG_AS
--AC_PATH_PROG(NM, nm, nm)
-+AC_CHECK_TOOLS(NM, [$NM nm], nm)
-
- dnl Initialize maintainer mode
- AM_MAINTAINER_MODE([enable])
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
deleted file mode 100644
index 2803691246..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gtk+-2.21.2/docs/faq/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/docs/faq/Makefile.am 2010-04-09 10:29:53.000000000 +0800
-+++ gtk+-2.21.2/docs/faq/Makefile.am 2010-06-22 17:39:24.000000000 +0800
-@@ -3,34 +3,36 @@
- EXTRA_DIST += \
- gtk-faq.sgml
-
--if HAVE_DOCBOOK
-+
- html:
-+if HAVE_DOCBOOK
- if test -w $(srcdir); then \
- (cd $(srcdir); \
- db2html gtk-faq.sgml; \
- test -d html && rm -r html; \
- mv gtk-faq html); \
- fi
--
--pdf:
-- if test -w $(srcdir); then \
-- (cd $(srcdir); db2pdf gtk-faq.sgml); \
-- fi
--
--dist-hook: html
-- cp -Rp $(srcdir)/html $(distdir)
- else
--html:
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "***"
-+endif
-
- pdf:
-+if HAVE_DOCBOOK
-+ if test -w $(srcdir); then \
-+ (cd $(srcdir); db2pdf gtk-faq.sgml); \
-+ fi
-+else
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "***"
-+endif
-
--dist-hook:
-+dist-hook: html
-+if HAVE_DOCBOOK
-+ cp -Rp $(srcdir)/html $(distdir)
-+else
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "*** DISTRIBUTION IS INCOMPLETE"
-Index: gtk+-2.21.2/gtk-doc.make
-===================================================================
---- gtk+-2.21.2.orig/gtk-doc.make 2010-05-28 00:01:48.000000000 +0800
-+++ gtk+-2.21.2/gtk-doc.make 2010-06-22 17:39:24.000000000 +0800
-@@ -23,7 +23,7 @@
-
- TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
--EXTRA_DIST = \
-+EXTRA_DIST += \
- $(content_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
-Index: gtk+-2.21.2/gtk/tests/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/gtk/tests/Makefile.am 2010-06-10 20:53:46.000000000 +0800
-+++ gtk+-2.21.2/gtk/tests/Makefile.am 2010-06-22 17:39:24.000000000 +0800
-@@ -58,13 +58,13 @@
- # this doesn't work in make distcheck, since running
- # on a naked X server creates slightly different event
- # sequences than running on a normal desktop
--# TEST_PROGS += crossingevents
-+#TEST_PROGS += crossingevents
- crossingevents_SOURCES = crossingevents.c
- crossingevents_LDADD = $(progs_ldadd)
-
- # this doesn't work in make distcheck, since it doesn't
- # find file-chooser-test-dir
--# TEST_PROGS += filechooser
-+#TEST_PROGS += filechooser
- filechooser_SOURCES = filechooser.c pixbuf-init.c
- filechooser_LDADD = $(progs_ldadd)
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
deleted file mode 100644
index 3083b77830..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkentry.c
-===================================================================
-RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
-retrieving revision 1.317
-diff -u -r1.317 gtkentry.c
---- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
-+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
-@@ -3337,7 +3337,9 @@
- if (GTK_WIDGET_DRAWABLE (entry))
- {
- PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_t *cr;
-+#endif
- gint x, y;
- gint start_pos, end_pos;
-
-@@ -3345,23 +3347,35 @@
-
- get_layout_position (entry, &x, &y);
-
-+#ifdef USE_CAIRO_INTERNALLY
- cr = gdk_cairo_create (entry->text_area);
-
- cairo_move_to (cr, x, y);
- gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
- pango_cairo_show_layout (cr, layout);
-+#else
-+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
-+ x, y,
-+ layout);
-+#endif
-
- if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
- {
- gint *ranges;
- gint n_ranges, i;
- PangoRectangle logical_rect;
-- GdkColor *selection_color, *text_color;
- GtkBorder inner_border;
-+#ifdef USE_CAIRO_INTERNALLY
-+ GdkColor *selection_color, *text_color;
-+#else
-+ GdkGC *selection_gc, *text_gc;
-+ GdkRegion *clip_region;
-+#endif
-
- pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
- gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
-
-+#ifdef USE_CAIRO_INTERNALLY
- if (GTK_WIDGET_HAS_FOCUS (entry))
- {
- selection_color = &widget->style->base [GTK_STATE_SELECTED];
-@@ -3390,11 +3404,46 @@
- cairo_move_to (cr, x, y);
- gdk_cairo_set_source_color (cr, text_color);
- pango_cairo_show_layout (cr, layout);
--
-+#else
-+ if (GTK_WIDGET_HAS_FOCUS (entry))
-+ {
-+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
-+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
-+ }
-+ else
-+ {
-+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
-+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
-+ }
-+
-+ clip_region = gdk_region_new ();
-+ for (i = 0; i < n_ranges; ++i)
-+ {
-+ GdkRectangle rect;
-+
-+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
-+ rect.y = y;
-+ rect.width = ranges[2 * i + 1];
-+ rect.height = logical_rect.height;
-+
-+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
-+ rect.x, rect.y, rect.width, rect.height);
-+
-+ gdk_region_union_with_rect (clip_region, &rect);
-+ }
-+
-+ gdk_gc_set_clip_region (text_gc, clip_region);
-+ gdk_draw_layout (entry->text_area, text_gc,
-+ x, y,
-+ layout);
-+ gdk_gc_set_clip_region (text_gc, NULL);
-+ gdk_region_destroy (clip_region);
-+#endif
- g_free (ranges);
- }
--
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_destroy (cr);
-+#endif
- }
- }
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
deleted file mode 100644
index 13ff318768..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
+++ /dev/null
@@ -1,1814 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Updated to apply to gtk+-2.24.15
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
---- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
-+++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
-@@ -415,7 +415,7 @@
- case $enable_explicit_deps in
- auto)
- export SED
-- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
- if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
- enable_explicit_deps=yes
- else
-@@ -774,7 +774,7 @@
- dnl Now we check to see if our libtool supports shared lib deps
- dnl (in a rather ugly way even)
- if $dynworks; then
-- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
- module_deplibs_check=`$module_libtool_config | \
- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1574,7 +1574,7 @@
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
- GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
- GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
-diff -Nurd gtk+-2.24.15/configure.ac.orig gtk+-2.24.15/configure.ac.orig
---- gtk+-2.24.15/configure.ac.orig 1970-01-01 02:00:00.000000000 +0200
-+++ gtk+-2.24.15/configure.ac.orig 2013-02-12 21:33:21.821926163 +0200
-@@ -0,0 +1,1775 @@
-+# Process this file with autoconf to produce a configure script.
-+# Process this file with autoconf to produce a configure script.
-+# require autoconf 2.54
-+AC_PREREQ(2.62)
-+
-+# Making releases:
-+# GTK_MICRO_VERSION += 1;
-+# GTK_INTERFACE_AGE += 1;
-+# GTK_BINARY_AGE += 1;
-+# if any functions have been added, set GTK_INTERFACE_AGE to 0.
-+# if backwards compatibility has been broken,
-+# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
-+
-+m4_define([gtk_major_version], [2])
-+m4_define([gtk_minor_version], [24])
-+m4_define([gtk_micro_version], [15])
-+m4_define([gtk_interface_age], [15])
-+m4_define([gtk_binary_age],
-+ [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
-+m4_define([gtk_version],
-+ [gtk_major_version.gtk_minor_version.gtk_micro_version])
-+# This is the X.Y used in -lgtk-FOO-X.Y
-+m4_define([gtk_api_version], [2.0])
-+
-+# Define a string for the earliest version that this release has
-+# backwards binary compatibility with for all interfaces a module
-+# might. Unless we add module-only API with lower stability
-+# guarantees, this should be unchanged until we break binary compat
-+# for GTK+.
-+#
-+#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
-+m4_define([gtk_binary_version], [2.10.0])
-+
-+# required versions of other packages
-+m4_define([glib_required_version], [2.28.0])
-+m4_define([pango_required_version], [1.20])
-+m4_define([atk_required_version], [1.29.2])
-+m4_define([cairo_required_version], [1.6])
-+m4_define([gdk_pixbuf_required_version], [2.21.0])
-+
-+
-+AC_INIT([gtk+], [gtk_version],
-+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
-+ [gtk+])
-+
-+AC_CONFIG_SRCDIR([gdk/gdktypes.h])
-+AC_CONFIG_HEADERS([config.h])
-+AC_CONFIG_MACRO_DIR([m4])
-+
-+# Save this value here, since automake will set cflags later
-+cflags_set=${CFLAGS+set}
-+
-+AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
-+
-+# Support silent build rules, requires at least automake-1.11. Enable
-+# by either passing --enable-silent-rules to configure or passing V=0
-+# to make
-+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
-+
-+#
-+# For each of the libraries we build, we define the following
-+
-+# substituted variables:
-+#
-+# foo_PACKAGES: pkg-config packages this library requires
-+# foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
-+# foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
-+# foo_DEP_LIBS: All libraries this module requires
-+# foo_DEP_CFLAGS: All cflags this module requires
-+
-+
-+GTK_MAJOR_VERSION=gtk_major_version
-+GTK_MINOR_VERSION=gtk_minor_version
-+GTK_MICRO_VERSION=gtk_micro_version
-+GTK_INTERFACE_AGE=gtk_interface_age
-+GTK_BINARY_AGE=gtk_binary_age
-+GTK_VERSION=gtk_version
-+GTK_API_VERSION=gtk_api_version
-+GTK_BINARY_VERSION=gtk_binary_version
-+AC_SUBST(GTK_MAJOR_VERSION)
-+AC_SUBST(GTK_MINOR_VERSION)
-+AC_SUBST(GTK_MICRO_VERSION)
-+AC_SUBST(GTK_INTERFACE_AGE)
-+AC_SUBST(GTK_BINARY_AGE)
-+AC_SUBST(GTK_API_VERSION)
-+AC_SUBST(GTK_VERSION)
-+AC_SUBST(GTK_BINARY_VERSION)
-+
-+# libtool versioning
-+#LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
-+#LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
-+#LT_REVISION=$GTK_INTERFACE_AGE
-+#LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
-+#LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
-+
-+m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
-+m4_define([lt_revision], [gtk_interface_age])
-+m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
-+LT_VERSION_INFO="lt_current:lt_revision:lt_age"
-+LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
-+AC_SUBST(LT_VERSION_INFO)
-+AC_SUBST(LT_CURRENT_MINUS_AGE)
-+
-+m4_define([gail_lt_current],[18])
-+m4_define([gail_lt_revision],[1])
-+m4_define([gail_lt_age],[0])
-+m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
-+m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
-+AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
-+AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
-+
-+GETTEXT_PACKAGE=gtk20
-+AC_SUBST(GETTEXT_PACKAGE)
-+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
-+ [The prefix for our gettext translation domains.])
-+
-+AC_CANONICAL_HOST
-+
-+MATH_LIB=-lm
-+AC_MSG_CHECKING([for native Win32])
-+LIB_EXE_MACHINE_FLAG=X86
-+EXE_MANIFEST_ARCHITECTURE=X86
-+case "$host" in
-+ *-*-mingw*)
-+ os_win32=yes
-+ gio_can_sniff=no
-+ MATH_LIB=
-+ case "$host" in
-+ x86_64-*-*)
-+ LIB_EXE_MACHINE_FLAG=X64
-+ EXE_MANIFEST_ARCHITECTURE=AMD64
-+ ;;
-+ esac
-+ ;;
-+ *)
-+ os_win32=no
-+ ;;
-+esac
-+AC_MSG_RESULT([$os_win32])
-+
-+AC_SUBST(LIB_EXE_MACHINE_FLAG)
-+AC_SUBST(EXE_MANIFEST_ARCHITECTURE)
-+
-+case $host in
-+ *-*-linux*)
-+ os_linux=yes
-+ ;;
-+esac
-+
-+dnl Initialize libtool
-+AC_PROG_CC
-+AM_DISABLE_STATIC
-+
-+dnl
-+dnl Check for a working C++ compiler, but do not bail out, if none is found.
-+dnl We use this for an automated test for C++ header correctness.
-+dnl
-+AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
-+AC_LANG_SAVE
-+AC_LANG_CPLUSPLUS
-+
-+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
-+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
-+
-+gtk_save_cxxflags="$CXXFLAGS"
-+CXXFLAGS="$CXXFLAGS -x objective-c++"
-+AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
-+AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
-+CXXFLAGS="$gtk_save_cxxflags"
-+AC_LANG_RESTORE
-+
-+if test "$os_win32" = "yes"; then
-+ if test x$enable_static = xyes -o x$enable_static = x; then
-+ AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
-+ enable_static=no
-+ fi
-+ if test x$enable_shared = xno; then
-+ AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
-+ fi
-+ enable_shared=yes
-+fi
-+
-+AC_LIBTOOL_WIN32_DLL
-+AM_PROG_LIBTOOL
-+dnl when using libtool 2.x create libtool early, because it's used in configure
-+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
-+
-+
-+# Make sure we use 64-bit versions of various file stuff.
-+AC_SYS_LARGEFILE
-+
-+AM_PROG_AS
-+AC_PATH_PROG(NM, nm, nm)
-+
-+dnl Initialize maintainer mode
-+AM_MAINTAINER_MODE([enable])
-+
-+AC_MSG_CHECKING([for some Win32 platform])
-+case "$host" in
-+ *-*-mingw*|*-*-cygwin*)
-+ platform_win32=yes
-+ ;;
-+ *)
-+ platform_win32=no
-+ ;;
-+esac
-+AC_MSG_RESULT([$platform_win32])
-+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-+
-+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
-+AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
-+AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
-+
-+if test "$os_win32" = "yes"; then
-+ AC_CHECK_TOOL(WINDRES, windres, no)
-+ if test "$WINDRES" = no; then
-+ AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
-+ fi
-+ AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
-+fi
-+AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
-+
-+m4_define([debug_default],
-+ m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
-+
-+dnl declare --enable-* args and collect ac_help strings
-+AC_ARG_ENABLE(debug,
-+ AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
-+ [turn on debugging @<:@default=debug_default@:>@]),,
-+ enable_debug=debug_default)
-+AC_ARG_ENABLE(shm,
-+ [AC_HELP_STRING([--enable-shm],
-+ [support shared memory if available [default=yes]])],,
-+ [enable_shm="yes"])
-+AC_ARG_ENABLE(xkb,
-+ [AC_HELP_STRING([--enable-xkb],
-+ [support XKB [default=maybe]])],,
-+ [enable_xkb="maybe"])
-+AC_ARG_ENABLE(xinerama,
-+ [AC_HELP_STRING([--enable-xinerama],
-+ [support xinerama extension if available [default=yes]])],,
-+ [enable_xinerama="yes"])
-+AC_ARG_ENABLE(rebuilds,
-+ [AC_HELP_STRING([--disable-rebuilds],
-+ [disable all source autogeneration rules])],,
-+ [enable_rebuilds=yes])
-+AC_ARG_ENABLE(visibility,
-+ [AC_HELP_STRING([--disable-visibility],
-+ [don't use ELF visibility attributes])],,
-+ [enable_visibility=yes])
-+
-+AC_ARG_WITH(xinput,
-+ [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
-+
-+if test "$platform_win32" = yes; then
-+ gdktarget=win32
-+else
-+ gdktarget=x11
-+fi
-+
-+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
-+ gdktarget=$with_gdktarget)
-+
-+AC_SUBST(gdktarget)
-+case $gdktarget in
-+ x11|win32|quartz|directfb) ;;
-+ *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
-+esac
-+
-+gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
-+gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
-+
-+AC_SUBST(gdktargetlib)
-+AC_SUBST(gtktargetlib)
-+
-+if test "x$enable_debug" = "xyes"; then
-+ test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
-+ GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
-+else
-+ if test "x$enable_debug" = "xno"; then
-+ GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
-+ else
-+ GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
-+ fi
-+fi
-+
-+
-+if test "x$enable_visibility" = "xno"; then
-+ GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
-+fi
-+
-+
-+AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
-+ [Define if debugging is enabled])
-+
-+
-+# Build time sanity check...
-+AM_SANITY_CHECK
-+
-+# Checks for programs.
-+AC_ISC_POSIX
-+AM_PROG_CC_C_O
-+AC_PROG_INSTALL
-+AC_PROG_MAKE_SET
-+
-+changequote(,)dnl
-+if test "x$GCC" = "xyes"; then
-+ case " $CFLAGS " in
-+ *[\ \ ]-Wall[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -Wall" ;;
-+ esac
-+
-+ if test "x$enable_ansi" = "xyes"; then
-+ case " $CFLAGS " in
-+ *[\ \ ]-ansi[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -ansi" ;;
-+ esac
-+
-+ case " $CFLAGS " in
-+ *[\ \ ]-pedantic[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -pedantic" ;;
-+ esac
-+ fi
-+fi
-+changequote([,])dnl
-+
-+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
-+
-+# Ensure MSVC-compatible struct packing convention is used when
-+# compiling for Win32 with gcc.
-+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
-+# gcc2 uses "-fnative-struct".
-+if test x"$os_win32" = xyes; then
-+ if test x"$GCC" = xyes; then
-+ msnative_struct=''
-+ AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
-+ if test -z "$ac_cv_prog_CC"; then
-+ our_gcc="$CC"
-+ else
-+ our_gcc="$ac_cv_prog_CC"
-+ fi
-+ case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
-+ 2.)
-+ if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
-+ msnative_struct='-fnative-struct'
-+ fi
-+ ;;
-+ *)
-+ if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
-+ msnative_struct='-mms-bitfields'
-+ fi
-+ ;;
-+ esac
-+ if test x"$msnative_struct" = x ; then
-+ AC_MSG_RESULT([no way])
-+ AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
-+ else
-+ CFLAGS="$CFLAGS $msnative_struct"
-+ AC_MSG_RESULT([${msnative_struct}])
-+ fi
-+ fi
-+fi
-+
-+# Honor aclocal flags
-+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-+
-+## Initial sanity check, done here so that users get told they
-+## have the wrong dependencies as early in the process as possible.
-+## Later on we actually use the cflags/libs from separate pkg-config
-+## calls. Oh, also the later pkg-config calls don't include
-+## the version requirements since those make the module lists
-+## annoying to construct
-+PKG_CHECK_MODULES(BASE_DEPENDENCIES,
-+ [glib-2.0 >= glib_required_version dnl
-+ atk >= atk_required_version dnl
-+ pango >= pango_required_version dnl
-+ cairo >= cairo_required_version dnl
-+ gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
-+
-+## In addition to checking that cairo is present, we also need to
-+## check that the correct cairo backend is there. E.g. if the GDK
-+## target is win32 we need the cairo-win32 backend and so on.
-+cairo_backend=$gdktarget
-+
-+# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
-+# backend names are identical.
-+if test "x$cairo_backend" = "xx11"; then
-+ cairo_backend=xlib
-+fi
-+PKG_CHECK_MODULES(CAIRO_BACKEND,
-+ [cairo-$cairo_backend >= cairo_required_version])
-+
-+PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
-+
-+if test "$os_win32" != yes; then
-+ # libtool option to control which symbols are exported
-+ # right now, symbols starting with _ are not exported
-+ LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
-+else
-+ # We currently use .def files on Windows (for gdk and gtk)
-+ LIBTOOL_EXPORT_OPTIONS=
-+fi
-+AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
-+
-+dnl ******************************************************
-+dnl * See whether to include shared library dependencies *
-+dnl ******************************************************
-+
-+AC_ARG_ENABLE(explicit-deps,
-+ [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
-+ [use explicit dependencies in .pc files [default=auto]])],,
-+ [enable_explicit_deps=auto])
-+
-+AC_MSG_CHECKING([Whether to write dependencies into .pc files])
-+case $enable_explicit_deps in
-+ auto)
-+ export SED
-+ deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+ if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
-+ enable_explicit_deps=yes
-+ else
-+ enable_explicit_deps=no
-+ fi
-+ ;;
-+ yes|no)
-+ ;;
-+ *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
-+ ;;
-+esac
-+AC_MSG_RESULT($enable_explicit_deps)
-+
-+AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
-+
-+# define a MAINT-like variable REBUILD which is set if Perl
-+# and awk are found, so autogenerated sources can be rebuilt
-+
-+AC_PATH_PROGS(PERL, perl5 perl)
-+
-+# We would like indent, but don't require it.
-+AC_CHECK_PROG(INDENT, indent, indent)
-+
-+REBUILD=\#
-+if test "x$enable_rebuilds" = "xyes" && \
-+ test -n "$PERL" && \
-+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
-+ REBUILD=
-+fi
-+AC_SUBST(REBUILD)
-+
-+AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
-+AC_CHECK_FUNCS(localtime_r)
-+
-+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
-+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
-+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
-+fi
-+
-+# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
-+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
-+ [Define if _NL_MEASUREMENT_MEASUREMENT is available])
-+fi
-+
-+# _NL_PAPER_HEIGHT is an enum and not a define
-+AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
-+ [Define if _NL_PAPER_HEIGHT is available])
-+fi
-+
-+# _NL_PAPER_WIDTH is an enum and not a define
-+AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
-+ [Define if _NL_PAPER_WIDTH is available])
-+fi
-+
-+# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
-+AC_MSG_CHECKING(for sigsetjmp)
-+AC_TRY_LINK([#include <setjmp.h>], [
-+sigjmp_buf env;
-+sigsetjmp(env, 0);
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE(HAVE_SIGSETJMP, 1,
-+ [Define to 1 if sigsetjmp is available])
-+fi
-+
-+# i18n stuff
-+ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
-+AM_GLIB_GNU_GETTEXT
-+LIBS="$LIBS $INTLLIBS"
-+AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
-+ sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
-+ esac])
-+
-+dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
-+dnl po-properties/POTFILES during configure; see GNOME #573515.
-+dnl
-+dnl Generate list of files to be processed by xgettext which will
-+dnl be included in po-properties/Makefile.
-+test -d po-properties || mkdir po-properties
-+if test "x$srcdir" != "x."; then
-+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-+ popropsrcprefix="$srcdir/"
-+ else
-+ popropsrcprefix="../$srcdir/"
-+ fi
-+else
-+ popropsrcprefix="../"
-+fi
-+rm -f po-properties/POTFILES
-+sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-+< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
-+dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
-+
-+AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
-+
-+dnl The DU4 header files don't provide library prototypes unless
-+dnl -std1 is given to the native cc.
-+AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
-+
-+gtk_save_LIBS=$LIBS
-+LIBS="$LIBS -lm"
-+AC_TRY_RUN([#include <math.h>
-+ int main (void) { return (log(1) != log(1.)); }],
-+ AC_MSG_RESULT(none needed),
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -std1"
-+ AC_TRY_RUN([#include <math.h>
-+ int main (void) { return (log(1) != log(1.)); }],
-+ AC_MSG_RESULT(-std1),
-+ AC_MSG_RESULT()
-+ CFLAGS="$gtk_save_CFLAGS"
-+ AC_MSG_WARN(
-+ [No ANSI prototypes found in library. (-std1 didn't work.)]),
-+ true
-+ ),
-+ AC_MSG_RESULT(none needed)
-+)
-+LIBS=$gtk_save_LIBS
-+
-+AC_MSG_CHECKING(for the BeOS)
-+case $host in
-+ *-*-beos*)
-+ AC_MSG_RESULT(yes)
-+ MATH_LIB=
-+ ;;
-+ *)
-+ AC_MSG_RESULT(no)
-+ ;;
-+esac
-+
-+AC_SUBST(MATH_LIB)
-+#
-+# see bug 162979
-+#
-+AC_MSG_CHECKING(for HP-UX)
-+case $host_os in
-+ hpux9* | hpux10* | hpux11*)
-+ AC_MSG_RESULT(yes)
-+ CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
-+ ;;
-+ *)
-+ AC_MSG_RESULT(no)
-+ ;;
-+esac
-+
-+dnl NeXTStep cc seems to need this
-+AC_MSG_CHECKING([for extra flags for POSIX compliance])
-+AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
-+ AC_MSG_RESULT(none needed),
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -posix"
-+ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
-+ AC_MSG_RESULT(-posix),
-+ AC_MSG_RESULT()
-+ CFLAGS="$gtk_save_CFLAGS"
-+ AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
-+
-+#
-+# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
-+#
-+
-+GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
-+
-+AM_PATH_GLIB_2_0(glib_required_version, :,
-+ AC_MSG_ERROR([
-+*** GLIB glib_required_version or better is required. The latest version of
-+*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
-+ gobject gmodule-no-export gthread)
-+
-+# See if it's safe to turn G_DISABLE_DEPRECATED on.
-+GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
-+GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
-+if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
-+ CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
-+fi
-+
-+CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
-+
-+
-+dnl
-+dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-+dnl
-+gtk_save_LIBS=$LIBS
-+LIBS="$LIBS $GLIB_LIBS"
-+AC_CHECK_FUNCS(bind_textdomain_codeset)
-+LIBS=$gtk_save_LIBS
-+
-+AC_CHECK_HEADERS(pwd.h,
-+ AC_DEFINE(HAVE_PWD_H, 1,
-+ [Define to 1 if pwd.h is available]))
-+AC_CHECK_HEADERS(sys/time.h,
-+ AC_DEFINE(HAVE_SYS_TIME_H, 1,
-+ [Define to 1 if time.h is available]))
-+AC_CHECK_HEADERS(unistd.h,
-+ AC_DEFINE(HAVE_UNISTD_H, 1,
-+ [Define to 1 if unistd.h is available]))
-+AC_CHECK_HEADERS(ftw.h,
-+ AC_DEFINE(HAVE_FTW_H, 1,
-+ [Define to 1 if ftw.h is available]))
-+
-+AC_MSG_CHECKING([for GNU ftw extensions])
-+AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
-+#define _GNU_SOURCE
-+#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
-+if test $gtk_ok = yes; then
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
-+else
-+ AC_MSG_RESULT([no])
-+fi
-+
-+saved_cflags="$CFLAGS"
-+saved_ldflags="$LDFLAGS"
-+
-+
-+# Checks for header files.
-+AC_HEADER_STDC
-+
-+# Checks for typedefs, structures, and compiler characteristics.
-+AC_C_CONST
-+
-+# Checks for library functions.
-+AC_TYPE_SIGNAL
-+AC_FUNC_MMAP
-+
-+AC_CHECK_FUNCS(mallinfo)
-+AC_CHECK_FUNCS(getresuid)
-+AC_TYPE_UID_T
-+
-+# Check if <sys/select.h> needs to be included for fd_set
-+AC_MSG_CHECKING([for fd_set])
-+AC_TRY_COMPILE([#include <sys/types.h>],
-+ [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
-+if test $gtk_ok = yes; then
-+ AC_MSG_RESULT([yes, found in sys/types.h])
-+else
-+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
-+ if test $gtk_ok = yes; then
-+ AC_DEFINE(HAVE_SYS_SELECT_H, 1,
-+ [Define to 1 if sys/select.h is available])
-+ AC_MSG_RESULT([yes, found in sys/select.h])
-+ else
-+ AC_DEFINE(NO_FD_SET, 1,
-+ [Define to 1 if fd_set is not available])
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+# `widechar' tests for gdki18n.h
-+AC_MSG_CHECKING(for wchar.h)
-+AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
-+if test $gdk_wchar_h = yes; then
-+ AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
-+fi
-+AC_MSG_RESULT($gdk_wchar_h)
-+
-+# Check for wctype.h (for iswalnum)
-+AC_MSG_CHECKING(for wctype.h)
-+AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
-+if test $gdk_wctype_h = yes; then
-+ AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
-+fi
-+AC_MSG_RESULT($gdk_wctype_h)
-+
-+# in Solaris 2.5, `iswalnum' is in -lw
-+GDK_WLIBS=
-+AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
-+
-+oLIBS="$LIBS"
-+LIBS="$LIBS $GDK_WLIBS"
-+# The following is necessary for Linux libc-5.4.38
-+AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
-+AC_TRY_LINK([#include <stdlib.h>],[
-+#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
-+# ifdef HAVE_WCTYPE_H
-+# include <wctype.h>
-+# else
-+# ifdef HAVE_WCHAR_H
-+# include <wchar.h>
-+# endif
-+# endif
-+#else
-+# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
-+#endif
-+iswalnum((wchar_t) 0);
-+], gdk_working_wctype=yes, gdk_working_wctype=no)
-+LIBS="$oLIBS"
-+
-+if test $gdk_working_wctype = no; then
-+ AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
-+ GDK_WLIBS=
-+fi
-+AC_MSG_RESULT($gdk_working_wctype)
-+AC_SUBST(GDK_WLIBS)
-+
-+# Check for uxtheme.h (for MS-Windows Engine)
-+AC_MSG_CHECKING(for uxtheme.h)
-+AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
-+if test $gtk_uxtheme_h = yes; then
-+ AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
-+fi
-+AC_MSG_RESULT($gtk_uxtheme_h)
-+
-+# Checks for gdkspawn
-+AC_CHECK_HEADERS(crt_externs.h)
-+AC_CHECK_FUNCS(_NSGetEnviron)
-+
-+AC_MSG_CHECKING(whether to build dynamic modules)
-+
-+AC_ARG_ENABLE(modules,
-+ [AC_HELP_STRING([--disable-modules],
-+ [disable dynamic module loading])])
-+
-+dynworks=false
-+deps=
-+if test x$enable_modules = xno; then
-+ AC_MSG_RESULT(no)
-+else
-+ AC_MSG_RESULT(yes)
-+ AC_MSG_CHECKING(whether dynamic modules work)
-+ ## for loop is to strip newline
-+ tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
-+ for I in $tmp; do
-+ dynworks=$I
-+ done
-+
-+ dnl Now we check to see if our libtool supports shared lib deps
-+ dnl (in a rather ugly way even)
-+ if $dynworks; then
-+ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ module_deplibs_check=`$module_libtool_config | \
-+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
-+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-+ if test "x$module_deplibs_check" = "xnone" || \
-+ test "x$module_deplibs_check" = "xunknown" || \
-+ test "x$module_deplibs_check" = "x"; then
-+ dynworks=false
-+ fi
-+ fi
-+
-+ if $dynworks; then
-+ AC_DEFINE(USE_GMODULE, 1,
-+ [Define to 1 if gmodule works and should be used])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
-+
-+#
-+# Allow building some or all immodules included
-+#
-+AC_MSG_CHECKING(immodules to build)
-+
-+dnl due to an autoconf bug, commas in the first arg to
-+dnl AC_HELP_STRING cause problems.
-+dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
-+dnl [build the specified input method modules into gtk])
-+AC_ARG_WITH(included_immodules,
-+[ --with-included-immodules=MODULE1,MODULE2,...
-+ build the specified input methods into gtk])
-+
-+if $dynworks; then
-+ :
-+else
-+ ## if the option was specified, leave it; otherwise disable included immodules
-+ if test x$with_included_immodules = xno; then
-+ with_included_immodules=yes
-+ fi
-+fi
-+
-+all_immodules="am-et,cedilla,cyrillic-translit"
-+if test "$gdktarget" = "win32"; then
-+ all_immodules="${all_immodules},ime"
-+fi
-+all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
-+if test "$gdktarget" = "x11"; then
-+ all_immodules="${all_immodules},xim"
-+fi
-+
-+included_immodules=""
-+# If the switch specified without listing any specific ones, include all
-+if test "x$with_included_immodules" = xyes ; then
-+ included_immodules="$all_immodules"
-+else
-+ included_immodules="$with_included_immodules"
-+fi
-+
-+AC_MSG_RESULT($included_immodules)
-+AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
-+
-+INCLUDED_IMMODULE_OBJ=
-+INCLUDED_IMMODULE_DEFINE=
-+
-+IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
-+for immodule in $included_immodules; do
-+ immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
-+ if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
-+ :
-+ else
-+ AC_MSG_ERROR([the specified input method $immodule does not exist])
-+ fi
-+
-+ INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
-+ INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
-+ eval INCLUDE_$immodule_underscores=yes
-+done
-+IFS="$gtk_save_ifs"
-+AC_SUBST(INCLUDED_IMMODULE_OBJ)
-+AC_SUBST(INCLUDED_IMMODULE_DEFINE)
-+
-+AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
-+
-+AC_HEADER_SYS_WAIT
-+
-+AC_TYPE_SIGNAL
-+
-+# Checks to see whether we should include mediaLib
-+# support.
-+#
-+AC_CHECK_HEADER(sys/systeminfo.h,
-+ AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
-+ [Define to 1 if sys/systeminfo.h is available]))
-+AC_CHECK_HEADER(sys/sysinfo.h,
-+ AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
-+ [Define to 1 if sys/sysinfo.h is available]))
-+
-+AC_MSG_CHECKING(for mediaLib 2.3)
-+use_mlib25=no
-+# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
-+# patch requires.
-+AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
-+if test $use_mlib = yes; then
-+ AC_DEFINE(USE_MEDIALIB, 1,
-+ [Define to 1 if medialib is available and should be used])
-+ MEDIA_LIB=-lmlib
-+
-+ AC_MSG_CHECKING(for mediaLib 2.5)
-+ # Check for a mediaLib 2.5 function since that is what is needed for
-+ # gdk_rgb_convert integration.
-+ AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
-+ if test $use_mlib25 = yes; then
-+ AC_DEFINE(USE_MEDIALIB25, 1,
-+ [Define to 1 if medialib 2.5 is available])
-+ fi
-+fi
-+AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
-+AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
-+
-+dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
-+
-+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-+
-+if test $cross_compiling = yes; then
-+ AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
-+ if test x$GTK_UPDATE_ICON_CACHE = xno; then
-+ REBUILD_PNGS=#
-+ fi
-+fi
-+
-+AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
-+
-+if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
-+ test "x$REBUILD_PNGS" = "x#" ; then
-+ AC_MSG_ERROR([
-+*** gtkbuiltincache.h is not in the tree, and cannot be built
-+*** because you don't have libpng, or (when cross-compiling) you
-+*** don't have a prebuilt gtk-update-icon-cache on the build system.])
-+fi
-+
-+########################################
-+# Windowing system checks
-+########################################
-+
-+GDK_EXTRA_LIBS="$GDK_WLIBS"
-+GDK_EXTRA_CFLAGS=
-+
-+# GTK+ uses some X calls, so needs to link against X directly
-+GTK_DEP_PACKAGES_FOR_X=
-+GTK_DEP_LIBS_FOR_X=
-+
-+if test "x$gdktarget" = "xx11"; then
-+ X_PACKAGES=fontconfig
-+
-+ #
-+ # We use fontconfig very peripherally when decoding the default
-+ # settings.
-+ #
-+ if $PKG_CONFIG --exists fontconfig; then : ; else
-+ AC_MSG_ERROR([
-+*** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
-+ fi
-+
-+ #
-+ # Check for basic X packages; we use pkg-config if available
-+ #
-+ if $PKG_CONFIG --exists x11 xext xrender; then
-+ have_base_x_pc=true
-+ X_PACKAGES="$X_PACKAGES x11 xext xrender"
-+ x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
-+ X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
-+
-+ # Strip out any .la files that pkg-config might give us (this happens
-+ # with -uninstalled.pc files)
-+ x_libs_for_checks=
-+ for I in $x_libs ; do
-+ case $I in
-+ *.la) ;;
-+ *) x_libs_for_checks="$x_libs_for_checks $I" ;;
-+ esac
-+ done
-+
-+ GTK_PACKAGES_FOR_X="x11"
-+ else
-+ have_base_x_pc=false
-+ AC_PATH_XTRA
-+ if test x$no_x = xyes ; then
-+ AC_MSG_ERROR([X development libraries not found])
-+ fi
-+
-+ x_cflags="$X_CFLAGS"
-+ x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
-+
-+ GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
-+ fi
-+
-+ # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
-+ x_extra_libs=
-+
-+ gtk_save_cppflags="$CPPFLAGS"
-+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-+
-+ gtk_save_LIBS=$LIBS
-+ LIBS="$x_libs_for_checks $LIBS"
-+
-+ # Sanity check for the X11 and Xext libraries. While everything we need from
-+ # Xext is optional, the chances a system has *none* of these things is so
-+ # small that we just unconditionally require it.
-+ AC_CHECK_FUNC(XOpenDisplay, :,
-+ AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
-+ AC_CHECK_FUNC(XextFindDisplay, :,
-+ AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
-+ AC_CHECK_FUNC(XRenderQueryExtension, :,
-+ AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
-+
-+ # Check for xReply
-+
-+ AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
-+ AC_TRY_COMPILE([#include <X11/Xlibint.h>],
-+ [xReply *rep;],
-+ [AC_MSG_RESULT([no])],
-+ [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
-+#include <X11/Xlibint.h>],
-+ [xReply *rep;],
-+ [AC_MSG_RESULT([yes])
-+ AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
-+ [Define if <X11/extensions/XIproto.h> needed for xReply])],
-+ [AC_MSG_RESULT([unknown])
-+ AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
-+
-+ # Check for XConvertCase, XInternAtoms (X11R6 specific)
-+
-+ AC_CHECK_FUNCS(XConvertCase XInternAtoms)
-+
-+ # Generic X11R6 check needed for XIM support; we could
-+ # probably use this to replace the above, but we'll
-+ # leave the separate checks for XConvertCase and XInternAtoms
-+ # for clarity
-+
-+ have_x11r6=false
-+ AC_CHECK_FUNC(XAddConnectionWatch,
-+ have_x11r6=true)
-+
-+ if $have_x11r6; then
-+ AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
-+ fi
-+ AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
-+
-+ # Check for XKB support.
-+
-+ if test "x$enable_xkb" = "xyes"; then
-+ AC_MSG_WARN(XKB support explicitly enabled)
-+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
-+ elif test "x$enable_xkb" = "xmaybe"; then
-+ AC_CHECK_FUNC(XkbQueryExtension,
-+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
-+ else
-+ AC_MSG_WARN(XKB support explicitly disabled)
-+ fi
-+
-+ # Check for shaped window extension
-+
-+ AC_CHECK_FUNC(XShapeCombineMask, :,
-+ [AC_MSG_ERROR([Shape extension not found, check your development headers])])
-+
-+ # X SYNC check
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $x_cflags"
-+
-+ AC_CHECK_FUNC(XSyncQueryExtension,
-+ [AC_CHECK_HEADER(X11/extensions/sync.h,
-+ AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
-+ :, [#include <X11/Xlib.h>])])
-+
-+ CFLAGS="$gtk_save_CFLAGS"
-+
-+ # Xshm checks
-+
-+ if test "x$enable_shm" = "xyes"; then
-+ # Check for the XShm extension, normally in Xext
-+ AC_CHECK_FUNC(XShmAttach,
-+ :,
-+ # On AIX, it is in XextSam instead
-+ [AC_CHECK_LIB(XextSam, XShmAttach,
-+ [GTK_ADD_LIB(x_extra_libs,XextSam)])])
-+ fi
-+
-+ if test "x$enable_shm" = "xyes"; then
-+ # Check for shared memory
-+ AC_CHECK_HEADER(sys/ipc.h,
-+ AC_DEFINE(HAVE_IPC_H, 1,
-+ [Define to 1 if ipc.h is available]),
-+ no_sys_ipc=yes)
-+ AC_CHECK_HEADER(sys/shm.h,
-+ AC_DEFINE(HAVE_SHM_H, 1,
-+ [Define to 1 if shm.h is available]),
-+ no_sys_shm=yes)
-+
-+ # Check for the X shared memory extension header file
-+ have_xshm=no
-+ AC_MSG_CHECKING(X11/extensions/XShm.h)
-+ if test "x$no_xext_lib" = "xyes"; then
-+ :
-+ else
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $x_cflags"
-+ AC_TRY_COMPILE([
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+#include <X11/extensions/XShm.h>
-+], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
-+ CFLAGS="$gtk_save_CFLAGS"
-+ fi
-+ AC_MSG_RESULT($have_xshm)
-+ if test $have_xshm = yes ; then
-+ AC_DEFINE(HAVE_XSHM_H, 1,
-+ [Define to 1 if xshm.h is available])
-+ fi
-+ fi
-+
-+ if test "x$enable_xinerama" = "xyes"; then
-+ # Check for Xinerama extension (Solaris impl or Xfree impl)
-+ gtk_save_cppflags="$CPPFLAGS"
-+ CPPFLAGS="$CPPFLAGS $x_cflags"
-+
-+ # Check for XFree
-+ AC_MSG_CHECKING(for Xinerama support on XFree86)
-+
-+ have_xfree_xinerama=false
-+ if $PKG_CONFIG --exists xinerama ; then
-+ have_xfree_xinerama=true
-+ X_PACKAGES="$X_PACKAGES xinerama"
-+ else
-+ AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
-+ [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
-+ [GTK_ADD_LIB(x_extra_libs,Xinerama)
-+ have_xfree_xinerama=true], :,
-+ [#include <X11/Xlib.h>])])
-+ fi
-+
-+ if $have_xfree_xinerama ; then
-+ AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
-+ [Define to 1 if XFree Xinerama is available])
-+ AC_DEFINE(HAVE_XINERAMA, 1,
-+ [Define to 1 is Xinerama is available])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+
-+ case "$host" in
-+ *-*-solaris*)
-+ # Check for solaris
-+ AC_MSG_CHECKING(for Xinerama support on Solaris)
-+
-+ have_solaris_xinerama=false
-+ AC_CHECK_FUNC(XineramaGetInfo,
-+ [AC_CHECK_HEADER(X11/extensions/xinerama.h,
-+ [have_solaris_xinerama=true], :,
-+ [#include <X11/Xlib.h>])])
-+
-+ if $have_solaris_xinerama ; then
-+ AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
-+ [Define to 1 if solaris xinerama is available])
-+ AC_DEFINE(HAVE_XINERAMA, 1,
-+ [Define to 1 if xinerama is available])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+ ;;
-+ *)
-+ ;;
-+ esac
-+ fi
-+ fi
-+
-+ # set up things for XInput
-+
-+ if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
-+ AC_DEFINE(XINPUT_XFREE, 1,
-+ [Define to 1 if XFree XInput should be used])
-+
-+ if $PKG_CONFIG --exists xi ; then
-+ X_PACKAGES="$X_PACKAGES xi"
-+ else
-+ GTK_ADD_LIB(x_extra_libs, Xi)
-+ fi
-+ else
-+ AC_DEFINE(XINPUT_NONE, 1,
-+ [Define to 1 if no XInput should be used])
-+ fi
-+
-+ AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
-+
-+ # Check for the RANDR extension
-+ if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
-+ AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
-+
-+ X_PACKAGES="$X_PACKAGES xrandr"
-+ fi
-+
-+ # Checks for Xcursor library
-+
-+ if $PKG_CONFIG --exists xcursor ; then
-+ AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
-+
-+ X_PACKAGES="$X_PACKAGES xcursor"
-+ fi
-+
-+ # Checks for XFixes extension
-+
-+ if $PKG_CONFIG --exists xfixes ; then
-+ AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xfixes"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
-+ fi
-+
-+ # Checks for Xcomposite extension
-+
-+ if $PKG_CONFIG --exists xcomposite ; then
-+ AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xcomposite"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
-+ fi
-+
-+ # Checks for Xdamage extension
-+
-+ if $PKG_CONFIG --exists xdamage ; then
-+ AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xdamage"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
-+ fi
-+
-+ if $have_base_x_pc ; then
-+ GDK_EXTRA_LIBS="$x_extra_libs"
-+ else
-+ GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
-+ fi
-+
-+ CPPFLAGS="$gtk_save_cppflags"
-+ LIBS="$gtk_save_libs"
-+
-+ AM_CONDITIONAL(USE_X11, true)
-+else
-+ XPACKAGES=
-+
-+ AM_CONDITIONAL(XINPUT_XFREE, false)
-+ AM_CONDITIONAL(USE_X11, false)
-+ AM_CONDITIONAL(HAVE_X11R6, false)
-+fi
-+
-+if test "x$gdktarget" = "xwin32"; then
-+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
-+ AM_CONDITIONAL(USE_WIN32, true)
-+else
-+ AM_CONDITIONAL(USE_WIN32, false)
-+fi
-+
-+AC_ARG_ENABLE(quartz-relocation,
-+ [AS_HELP_STRING([--enable-quartz-relocation],
-+ [enable bundle-based relocation functions])],
-+ [quartz_relocation=yes])
-+
-+if test "x$gdktarget" = "xquartz"; then
-+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
-+ AM_CONDITIONAL(USE_QUARTZ, true)
-+ if test "x$quartz_relocation" = xyes; then
-+ AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
-+ fi
-+
-+else
-+ AM_CONDITIONAL(USE_QUARTZ, false)
-+fi
-+
-+if test "x$gdktarget" = "xdirectfb"; then
-+ DIRECTFB_REQUIRED_VERSION=1.0.0
-+ AC_MSG_CHECKING(for DirectFB)
-+
-+ PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
-+ AM_CONDITIONAL(USE_DIRECTFB, true)
-+else
-+ AM_CONDITIONAL(USE_DIRECTFB, false)
-+fi
-+
-+
-+# Check for Pango flags
-+
-+if test "x$gdktarget" = "xwin32"; then
-+ PANGO_PACKAGES="pangowin32 pangocairo"
-+else
-+ PANGO_PACKAGES="pango pangocairo"
-+fi
-+
-+AC_MSG_CHECKING(Pango flags)
-+if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
-+ PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
-+ PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
-+
-+ AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
-+else
-+ AC_MSG_ERROR([
-+*** Pango not found. Pango built with Cairo support is required
-+*** to build GTK+. See http://www.pango.org for Pango information.
-+])
-+fi
-+
-+CFLAGS="$CFLAGS $PANGO_CFLAGS"
-+
-+if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
-+ :
-+else
-+ gtk_save_LIBS="$LIBS"
-+ LIBS="$PANGO_LIBS $LIBS"
-+ AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
-+*** Can't link to Pango. Pango is required to build
-+*** GTK+. For more information see http://www.pango.org]))
-+ LIBS="$gtk_save_LIBS"
-+fi
-+
-+CFLAGS="$saved_cflags"
-+LDFLAGS="$saved_ldflags"
-+
-+# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
-+if test "x$gdktarget" = "xx11"; then
-+ GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
-+else
-+ GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
-+fi
-+
-+GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB"
-+GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
-+#
-+# If we aren't writing explicit dependencies, then don't put the extra libraries we need
-+# into the pkg-config files
-+#
-+if test $enable_explicit_deps != yes ; then
-+ GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
-+ GDK_EXTRA_LIBS=
-+fi
-+
-+AC_SUBST(GDK_PACKAGES)
-+AC_SUBST(GDK_EXTRA_LIBS)
-+AC_SUBST(GDK_EXTRA_CFLAGS)
-+AC_SUBST(GDK_DEP_LIBS)
-+AC_SUBST(GDK_DEP_CFLAGS)
-+
-+
-+########################################
-+# Check for Accessibility Toolkit flags
-+########################################
-+
-+ATK_PACKAGES=atk
-+AC_MSG_CHECKING(ATK flags)
-+if $PKG_CONFIG --exists $ATK_PACKAGES ; then
-+ ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
-+ ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
-+
-+ AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
-+else
-+ AC_MSG_ERROR([
-+*** Accessibility Toolkit not found. Accessibility Toolkit is required
-+*** to build GTK+.
-+])
-+fi
-+
-+if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
-+ :
-+else
-+ gtk_save_LIBS="$LIBS"
-+ LIBS="$ATK_LIBS $LIBS"
-+ AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
-+ *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
-+ *** to build GTK+]))
-+ LIBS="$gtk_save_LIBS"
-+fi
-+
-+GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
-+if test "x$gdktarget" = "xx11"; then
-+ GTK_PACKAGES="$GTK_PACKAGES pangoft2"
-+fi
-+GTK_EXTRA_LIBS=
-+GTK_EXTRA_CFLAGS=
-+GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB"
-+GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
-+
-+if test x"$os_win32" = xyes; then
-+ GTK_EXTRA_CFLAGS="$msnative_struct"
-+fi
-+
-+GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
-+ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
-+PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
-+CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
-+
-+AC_SUBST(GTK_PACKAGES)
-+AC_SUBST(GTK_EXTRA_LIBS)
-+AC_SUBST(GTK_EXTRA_CFLAGS)
-+AC_SUBST(GTK_DEP_LIBS)
-+AC_SUBST(GTK_DEP_CFLAGS)
-+
-+AC_SUBST(GLIB_PREFIX)
-+AC_SUBST(ATK_PREFIX)
-+AC_SUBST(PANGO_PREFIX)
-+AC_SUBST(CAIRO_PREFIX)
-+
-+AC_SUBST(GTK_DEBUG_FLAGS)
-+AC_SUBST(GTK_XIM_FLAGS)
-+
-+GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
-+AC_SUBST(GDK_PIXBUF_LIBS)
-+
-+########################
-+# Checks needed for gail
-+########################
-+
-+old_LIBS="$LIBS"
-+dnl Checks for inet libraries:
-+AC_SEARCH_LIBS(gethostent, nsl)
-+AC_SEARCH_LIBS(setsockopt, socket)
-+AC_SEARCH_LIBS(connect, inet)
-+
-+dnl check for the sockaddr_un.sun_len member
-+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
-+ [struct_sockaddr_un_sun_len=true],
-+ [struct_sockaddr_un_suin_len=false],
-+ [#include <sys/types.h>
-+ #include <sys/un.h>]
-+ )
-+case $struct_sockaddr_un_sun_len in
-+ true)
-+ AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
-+ [Have the sockaddr_un.sun_len member])
-+ ;;
-+ *)
-+ ;;
-+esac
-+
-+GAIL_INET_LIBS="$LIBS"
-+AC_SUBST([GAIL_INET_LIBS])
-+
-+LIBS="$old_LIBS"
-+
-+################################################################
-+# Printing system checks
-+################################################################
-+
-+AC_ARG_ENABLE(cups,
-+ [AC_HELP_STRING([--disable-cups]
-+ [disable cups print backend])],,
-+ [enable_cups=auto])
-+
-+if test "x$enable_cups" = "xno"; then
-+ AM_CONDITIONAL(HAVE_CUPS, false)
-+else
-+ AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
-+ if test "x$CUPS_CONFIG" = "xno"; then
-+ if test "x$enable_cups" = "xauto"; then
-+ AM_CONDITIONAL(HAVE_CUPS, false)
-+ else
-+ AC_MSG_ERROR([
-+*** cups not found.
-+])
-+ fi
-+ else
-+ CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
-+ CUPS_LIBS=`$CUPS_CONFIG --libs`
-+
-+ CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
-+ CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
-+ CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
-+
-+ if test $CUPS_API_MAJOR -gt 1 -o \
-+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
-+ AC_DEFINE(HAVE_CUPS_API_1_2, 1,
-+ [Define to 1 if CUPS 1.2 API is available])
-+ fi
-+ if test $CUPS_API_MAJOR -gt 1 -o \
-+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
-+ AC_DEFINE(HAVE_CUPS_API_1_6, 1,
-+ [Define to 1 if CUPS 1.6 API is available])
-+
-+ fi
-+
-+ AC_SUBST(CUPS_API_MAJOR)
-+ AC_SUBST(CUPS_API_MINOR)
-+ AC_SUBST(CUPS_CFLAGS)
-+ AC_SUBST(CUPS_LIBS)
-+
-+ AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
-+
-+ AM_CONDITIONAL(HAVE_CUPS, true)
-+
-+ gtk_save_cflags="$CFLAGS"
-+ CFLAGS="$CUPS_CFLAGS"
-+ AC_TRY_COMPILE([#include <cups/http.h>],
-+ [http_t http; char *s = http.authstring;],
-+ [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
-+ [Define if cups http_t authstring field is accessible])],)
-+ CFLAGS="$gtk_save_cflags"
-+
-+ AC_SUBST(HAVE_HTTP_AUTHSTRING)
-+
-+ gtk_save_libs="$LIBS"
-+ LIBS="$CUPS_LIBS"
-+ AC_CHECK_FUNCS(httpGetAuthString)
-+ LIBS="$gtk_save_libs"
-+ fi
-+fi
-+
-+# Checks to see if we should compile with PAPI backend for GTK+
-+#
-+
-+AC_ARG_ENABLE(papi,
-+ [AC_HELP_STRING([--disable-papi]
-+ [disable papi print backend])],,
-+ [enable_papi=auto])
-+
-+if test "x$enable_papi" = "xno"; then
-+ AM_CONDITIONAL(HAVE_PAPI, false)
-+else
-+ AC_MSG_CHECKING(libpapi)
-+ AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
-+ if test $have_papi = yes; then
-+ AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
-+ fi
-+ AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
-+ if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
-+ AC_MSG_ERROR([
-+*** papi not found.
-+])
-+ fi
-+fi
-+
-+AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
-+
-+gtk_save_cppflags="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
-+
-+AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
-+*** Can't find cairo-pdf.h. You must build Cairo with the pdf
-+*** backend enabled.]))
-+
-+if test "$os_win32" != "yes"; then
-+ AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
-+*** Can't find cairo-ps.h. You must build Cairo with the
-+*** postscript backend enabled.]))
-+
-+ AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
-+*** Can't find cairo-svg.h. You must build Cairo with the
-+*** svg backend enabled.]))
-+fi
-+
-+CPPFLAGS="$gtk_save_cppflags"
-+
-+
-+AC_ARG_ENABLE(test-print-backend,
-+ [AC_HELP_STRING([--enable-test-print-backend],
-+ [build test print backend])],,
-+ [enable_test_print_backend=no])
-+AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
-+
-+if test "$os_win32" = "yes"; then
-+ AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]])
-+fi
-+
-+################################################################
-+# Strip -export-dynamic from the link lines of various libraries
-+################################################################
-+
-+#
-+# pkg-config --libs gmodule includes the "export_dynamic" flag,
-+# but this flag is only meaningful for executables. For libraries
-+# the effect is undefined; what it causes on Linux is that the
-+# export list from -export-symbols-regex is ignored and everything
-+# is exported
-+#
-+# We are using gmodule-no-export now, but I'm leaving the stripping
-+# code in place for now, since pango and atk still require gmodule.
-+export SED
-+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+if test -n "$export_dynamic"; then
-+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
-+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
-+fi
-+
-+##################################################
-+# GObject introspection
-+##################################################
-+
-+GOBJECT_INTROSPECTION_CHECK([0.9.3])
-+
-+##################################################
-+# Checks for gtk-doc and docbook-tools
-+##################################################
-+
-+GTK_DOC_CHECK([1.11])
-+
-+AC_CHECK_PROG(DB2HTML, db2html, true, false)
-+AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
-+
-+AC_ARG_ENABLE(man,
-+ [AC_HELP_STRING([--enable-man],
-+ [regenerate man pages from Docbook [default=no]])],enable_man=yes,
-+ enable_man=no)
-+
-+if test "${enable_man}" != no; then
-+ dnl
-+ dnl Check for xsltproc
-+ dnl
-+ AC_PATH_PROG([XSLTPROC], [xsltproc])
-+ if test -z "$XSLTPROC"; then
-+ enable_man=no
-+ fi
-+
-+ dnl check for DocBook DTD and stylesheets in the local catalog.
-+ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
-+ [DocBook XML DTD V4.1.2],,enable_man=no)
-+ JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
-+ [DocBook XSL Stylesheets],,enable_man=no)
-+fi
-+
-+AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
-+
-+
-+##################################################
-+# Output commands
-+##################################################
-+
-+AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
-+ outfile=gdkconfig.h-tmp
-+ cat > $outfile <<\_______EOF
-+/* gdkconfig.h
-+ *
-+ * This is a generated file. Please modify `configure.in'
-+ */
-+
-+#ifndef GDKCONFIG_H
-+#define GDKCONFIG_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif /* __cplusplus */
-+
-+#ifndef GSEAL
-+/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
-+# ifdef GSEAL_ENABLE
-+# define GSEAL(ident) _g_sealed__ ## ident
-+# else
-+# define GSEAL(ident) ident
-+# endif
-+#endif /* !GSEAL */
-+
-+_______EOF
-+
-+ cat >>$outfile <<_______EOF
-+$gdk_windowing
-+$gdk_wc
-+_______EOF
-+
-+ cat >>$outfile <<_______EOF
-+
-+#ifdef __cplusplus
-+}
-+#endif /* __cplusplus */
-+
-+#endif /* GDKCONFIG_H */
-+_______EOF
-+
-+
-+ if cmp -s $outfile gdk/gdkconfig.h; then
-+ AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
-+ rm -f $outfile
-+ else
-+ mv $outfile gdk/gdkconfig.h
-+ fi
-+],[
-+if test "x$gdktarget" = "xx11" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_X11'
-+elif test "x$gdktarget" = "xwin32" ; then
-+ gdk_windowing='
-+#define GDK_NATIVE_WINDOW_POINTER
-+
-+#define GDK_WINDOWING_WIN32'
-+elif test "x$gdktarget" = "xquartz" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_QUARTZ'
-+elif test "x$gdktarget" = "xdirectfb" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_DIRECTFB'
-+fi
-+
-+if test x$gdk_wchar_h = xyes; then
-+ gdk_wc='
-+#define GDK_HAVE_WCHAR_H 1'
-+fi
-+if test x$gdk_wctype_h = xyes; then
-+ gdk_wc="\$gdk_wc
-+#define GDK_HAVE_WCTYPE_H 1"
-+fi
-+if test x$gdk_working_wctype = xno; then
-+ gdk_wc="\$gdk_wc
-+#define GDK_HAVE_BROKEN_WCTYPE 1"
-+fi
-+
-+
-+])
-+
-+AC_CONFIG_FILES([
-+config.h.win32
-+gtk-zip.sh
-+Makefile
-+gdk-2.0.pc
-+gtk+-2.0.pc
-+gtk+-unix-print-2.0.pc
-+gail.pc
-+gdk-2.0-uninstalled.pc
-+gtk+-2.0-uninstalled.pc
-+gail-uninstalled.pc
-+m4macros/Makefile
-+po/Makefile.in
-+po-properties/Makefile.in
-+demos/Makefile
-+demos/gtk-demo/Makefile
-+demos/gtk-demo/geninclude.pl
-+tests/Makefile
-+docs/Makefile
-+docs/reference/Makefile
-+docs/reference/gdk/Makefile
-+docs/reference/gdk/version.xml
-+docs/reference/gtk/Makefile
-+docs/reference/gtk/version.xml
-+docs/reference/libgail-util/Makefile
-+docs/faq/Makefile
-+docs/tools/Makefile
-+docs/tutorial/Makefile
-+build/Makefile
-+build/win32/Makefile
-+build/win32/vs9/Makefile
-+build/win32/vs10/Makefile
-+gdk/Makefile
-+gdk/x11/Makefile
-+gdk/win32/Makefile
-+gdk/win32/rc/Makefile
-+gdk/win32/rc/gdk.rc
-+gdk/quartz/Makefile
-+gdk/directfb/Makefile
-+gdk/tests/Makefile
-+gtk/Makefile
-+gtk/makefile.msc
-+gtk/gtkversion.h
-+gtk/gtk-win32.rc
-+gtk/theme-bits/Makefile
-+gtk/tests/Makefile
-+modules/Makefile
-+modules/other/Makefile
-+modules/other/gail/Makefile
-+modules/other/gail/libgail-util/Makefile
-+modules/other/gail/tests/Makefile
-+modules/engines/Makefile
-+modules/engines/pixbuf/Makefile
-+modules/engines/ms-windows/Makefile
-+modules/engines/ms-windows/Theme/Makefile
-+modules/engines/ms-windows/Theme/gtk-2.0/Makefile
-+modules/input/Makefile
-+modules/printbackends/Makefile
-+modules/printbackends/cups/Makefile
-+modules/printbackends/lpr/Makefile
-+modules/printbackends/file/Makefile
-+modules/printbackends/papi/Makefile
-+modules/printbackends/test/Makefile
-+perf/Makefile
-+])
-+
-+AC_OUTPUT
-+
-+echo "configuration:
-+ target: $gdktarget"
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
deleted file mode 100644
index 597ba32470..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gtk+-2.21.2/gtk/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/gtk/Makefile.am 2010-06-22 17:21:41.000000000 +0800
-+++ gtk+-2.21.2/gtk/Makefile.am 2010-06-22 17:28:12.000000000 +0800
-@@ -1376,11 +1376,11 @@
- ./gtk-update-icon-cache
- endif
-
--gtkbuiltincache.h: @REBUILD@ stamp-icons
-- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
-- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
-- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
-- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
-+#gtkbuiltincache.h: @REBUILD@ stamp-icons
-+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
-+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
-+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
-+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
-
- EXTRA_DIST += \
- $(STOCK_ICONS) \
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch b/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
index 74e479fd1b..74e479fd1b 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch
+++ b/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
diff --git a/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
new file mode 100644
index 0000000000..1ae728e70d
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Updated to apply to gtk+-2.24.15
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
+--- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
++++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
+@@ -415,7 +415,7 @@
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -774,7 +774,7 @@
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
+ module_deplibs_check=`$module_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1574,7 +1574,7 @@
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff b/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
index 340d12008b..340d12008b 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff
+++ b/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch b/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
index d0a970ad4d..d0a970ad4d 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch
+++ b/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 9e96275554..3e36676ac4 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -49,7 +49,11 @@ LIBV = "3.0.0"
FILES_${PN}-demo = "${bindir}/gtk3-demo \
${bindir}/gtk3-demo-application \
${bindir}/gtk3-widget-factory \
- ${datadir}/gtk-3.0/demo"
+ ${datadir}/gtk-3.0/demo \
+ ${datadir}/applications/gtk3-demo.desktop \
+ ${datadir}/applications/gtk3-widget-factory.desktop \
+ ${datadir}/icons/hicolor/*/apps/gtk3-demo.png \
+ ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory.png"
# The demo uses PNG files and mime type sniffing, so ensure that these
# dependencies are present.
@@ -101,6 +105,6 @@ python populate_packages_prepend () {
do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
if (d.getVar('DEBIAN_NAMES', 1)):
- d.setVar('PKG_${PN}', 'libgtk-3.0')
+ d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
}
diff --git a/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch b/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
deleted file mode 100644
index b4b1a09455..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Fix build when wayland backend enabled
-
-Upstream-Status: Submitted
-https://bugzilla.gnome.org/show_bug.cgi?id=710584
-
-Author: Emilio Pozuelo Monfort
-
---- gtk+-3.10.7/gtk/gtkapplication.c
-+++ gtk+-3.10.7/gtk/gtkapplication.c
-@@ -144,7 +144,6 @@
-
- gboolean register_session;
-
--#ifdef GDK_WINDOWING_X11
- guint next_id;
-
- GDBusConnection *session_bus;
-@@ -161,7 +160,6 @@
- GDBusProxy *client_proxy;
- gchar *app_id;
- gchar *client_path;
--#endif
-
- #ifdef GDK_WINDOWING_QUARTZ
- GMenu *combined;
-@@ -299,6 +297,8 @@
- g_free (application->priv->client_path);
- }
-
-+#endif
-+
- const gchar *
- gtk_application_get_app_menu_object_path (GtkApplication *application)
- {
-@@ -311,8 +311,6 @@
- return application->priv->menubar_path;
- }
-
--#endif
--
- #ifdef GDK_WINDOWING_QUARTZ
-
- typedef struct {
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb b/meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb
index d0174f6093..f4f197131b 100644
--- a/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb
+++ b/meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb
@@ -4,12 +4,11 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
file://hardcoded_libtool.patch \
- file://fix-build-when-wayland-backend-enabled.patch \
file://fix-flags-for-native.patch \
"
-SRC_URI[md5sum] = "18a81944a8506231529a76bf2b68372b"
-SRC_URI[sha256sum] = "b7e9de15385031cff43897e7e59f6692eaabf500f36eef80e6b9d6486ad49427"
+SRC_URI[md5sum] = "0d6d8f9f79132b3b47475d047b369b1c"
+SRC_URI[sha256sum] = "61d74eea74231b1ea4b53084a9d6fc9917ab0e1d71b69d92cbf60a4b4fb385d0"
S = "${WORKDIR}/gtk+-${PV}"
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.25.bb
index 98c65a56c6..ada79567e7 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.25.bb
@@ -6,30 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
file://xsettings.patch \
- file://run-iconcache.patch \
- file://configure-nm.patch \
file://hardcoded_libtool.patch \
- file://cellrenderer-cairo.patch;striplevel=0 \
file://toggle-font.diff;striplevel=0 \
- file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
file://doc-fixes.patch \
- file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
"
-# TO MERGE
-# file://entry-cairo.patch;striplevel=0
-# file://filesystem-volumes.patch
-# file://filechooser-props.patch
-# file://filechooser-default.patch
-# file://filechooser-sizefix.patch
-# temporary
-# file://gtklabel-resize-patch
-# file://menu-deactivate.patch
-# file://combo-arrow-size.patch;striplevel=0
-# file://configurefix.patch
-
-SRC_URI[md5sum] = "5fbbfb7637bbd571a572a2dae0e736d2"
-SRC_URI[sha256sum] = "b114b6e9fb389bf3aa8a6d09576538f58dce740779653084046852fb4140ae7f"
+SRC_URI[md5sum] = "612350704dd3aacb95355a4981930c6f"
+SRC_URI[sha256sum] = "38af1020cb8ff3d10dda2c8807f11e92af9d2fa4045de61c62eedb7fbc7ea5b3"
EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
diff --git a/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb b/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
index 9ceeeff1fe..40f324352f 100644
--- a/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
+++ b/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PROVIDES = "gtk-doc gobject-introspection-stub"
-SRCREV = "3dfd0a09de696ec8c544762747f8a0f77153622e"
-PV = "0.0+git${SRCPV}"
+SRCREV = "1dea266593edb766d6d898c79451ef193eb17cfa"
+PV = "1.1+git${SRCPV}"
SRC_URI = "git://git.gnome.org/${BPN}"
diff --git a/meta/recipes-gnome/hicolor-icon-theme/files/index.theme b/meta/recipes-gnome/hicolor-icon-theme/files/index.theme
deleted file mode 100644
index 0471bd53f2..0000000000
--- a/meta/recipes-gnome/hicolor-icon-theme/files/index.theme
+++ /dev/null
@@ -1,1731 +0,0 @@
-[Icon Theme]
-Name=Hicolor
-Comment=Fallback icon theme
-Hidden=true
-Directories=16x16/actions,16x16/animations,16x16/apps,16x16/categories,16x16/devices,16x16/emblems,16x16/emotes,16x16/filesystems,16x16/intl,16x16/mimetypes,16x16/places,16x16/status,16x16/stock,16x16/stock/chart,16x16/stock/code,16x16/stock/data,16x16/stock/form,16x16/stock/image,16x16/stock/io,16x16/stock/media,16x16/stock/navigation,16x16/stock/net,16x16/stock/object,16x16/stock/table,16x16/stock/text,22x22/actions,22x22/animations,22x22/apps,22x22/categories,22x22/devices,22x22/emblems,22x22/emotes,22x22/filesystems,22x22/intl,22x22/mimetypes,22x22/places,22x22/status,22x22/stock,22x22/stock/chart,22x22/stock/code,22x22/stock/data,22x22/stock/form,22x22/stock/image,22x22/stock/io,22x22/stock/media,22x22/stock/navigation,22x22/stock/net,22x22/stock/object,22x22/stock/table,22x22/stock/text,24x24/actions,24x24/animations,24x24/apps,24x24/categories,24x24/devices,24x24/emblems,24x24/emotes,24x24/filesystems,24x24/intl,24x24/mimetypes,24x24/places,24x24/status,24x24/stock,24x24/stock/chart,24x24/stock/code,24x24/stock/data,24x24/stock/form,24x24/stock/image,24x24/stock/io,24x24/stock/media,24x24/stock/navigation,24x24/stock/net,24x24/stock/object,24x24/stock/table,24x24/stock/text,32x32/actions,32x32/animations,32x32/apps,32x32/categories,32x32/devices,32x32/emblems,32x32/emotes,32x32/filesystems,32x32/intl,32x32/mimetypes,32x32/places,32x32/status,32x32/stock,32x32/stock/chart,32x32/stock/code,32x32/stock/data,32x32/stock/form,32x32/stock/image,32x32/stock/io,32x32/stock/media,32x32/stock/navigation,32x32/stock/net,32x32/stock/object,32x32/stock/table,32x32/stock/text,36x36/actions,36x36/animations,36x36/apps,36x36/categories,36x36/devices,36x36/emblems,36x36/emotes,36x36/filesystems,36x36/intl,36x36/mimetypes,36x36/places,36x36/status,36x36/stock,36x36/stock/chart,36x36/stock/code,36x36/stock/data,36x36/stock/form,36x36/stock/image,36x36/stock/io,36x36/stock/media,36x36/stock/navigation,36x36/stock/net,36x36/stock/object,36x36/stock/table,36x36/stock/text,48x48/actions,48x48/animations,48x48/apps,48x48/categories,48x48/devices,48x48/emblems,48x48/emotes,48x48/filesystems,48x48/intl,48x48/mimetypes,48x48/places,48x48/status,48x48/stock,48x48/stock/chart,48x48/stock/code,48x48/stock/data,48x48/stock/form,48x48/stock/image,48x48/stock/io,48x48/stock/media,48x48/stock/navigation,48x48/stock/net,48x48/stock/object,48x48/stock/table,48x48/stock/text,64x64/actions,64x64/animations,64x64/apps,64x64/categories,64x64/devices,64x64/emblems,64x64/emotes,64x64/filesystems,64x64/intl,64x64/mimetypes,64x64/places,64x64/status,64x64/stock,64x64/stock/chart,64x64/stock/code,64x64/stock/data,64x64/stock/form,64x64/stock/image,64x64/stock/io,64x64/stock/media,64x64/stock/navigation,64x64/stock/net,64x64/stock/object,64x64/stock/table,64x64/stock/text,72x72/actions,72x72/animations,72x72/apps,72x72/categories,72x72/devices,72x72/emblems,72x72/emotes,72x72/filesystems,72x72/intl,72x72/mimetypes,72x72/places,72x72/status,72x72/stock,72x72/stock/chart,72x72/stock/code,72x72/stock/data,72x72/stock/form,72x72/stock/image,72x72/stock/io,72x72/stock/media,72x72/stock/navigation,72x72/stock/net,72x72/stock/object,72x72/stock/table,72x72/stock/text,96x96/actions,96x96/animations,96x96/apps,96x96/categories,96x96/devices,96x96/emblems,96x96/emotes,96x96/filesystems,96x96/intl,96x96/mimetypes,96x96/places,96x96/status,96x96/stock,96x96/stock/chart,96x96/stock/code,96x96/stock/data,96x96/stock/form,96x96/stock/image,96x96/stock/io,96x96/stock/media,96x96/stock/navigation,96x96/stock/net,96x96/stock/object,96x96/stock/table,96x96/stock/text,128x128/actions,128x128/animations,128x128/apps,128x128/categories,128x128/devices,128x128/emblems,128x128/emotes,128x128/filesystems,128x128/intl,128x128/mimetypes,128x128/places,128x128/status,128x128/stock,128x128/stock/chart,128x128/stock/code,128x128/stock/data,128x128/stock/form,128x128/stock/image,128x128/stock/io,128x128/stock/media,128x128/stock/navigation,128x128/stock/net,128x128/stock/object,128x128/stock/table,128x128/stock/text,192x192/actions,192x192/animations,192x192/apps,192x192/categories,192x192/devices,192x192/emblems,192x192/emotes,192x192/filesystems,192x192/intl,192x192/mimetypes,192x192/places,192x192/status,192x192/stock,192x192/stock/chart,192x192/stock/code,192x192/stock/data,192x192/stock/form,192x192/stock/image,192x192/stock/io,192x192/stock/media,192x192/stock/navigation,192x192/stock/net,192x192/stock/object,192x192/stock/table,192x192/stock/text,scalable/actions,scalable/animations,scalable/apps,scalable/categories,scalable/devices,scalable/emblems,scalable/emotes,scalable/filesystems,scalable/intl,scalable/mimetypes,scalable/places,scalable/status,scalable/stock,scalable/stock/chart,scalable/stock/code,scalable/stock/data,scalable/stock/form,scalable/stock/image,scalable/stock/io,scalable/stock/media,scalable/stock/navigation,scalable/stock/net,scalable/stock/object,scalable/stock/table,scalable/stock/text,12x12/apps,12x12/devices,12x12/filesystems,12x12/hildon,12x12/mimetypes,16x16/hildon,26x26/apps,26x26/devices,26x26/filesystems,26x26/hildon,26x26/mimetypes,34x34/apps,34x34/devices,34x34/filesystems,34x34/hildon,34x34/mimetypes,40x40/apps,40x40/devices,40x40/filesystems,40x40/hildon,40x40/mimetypes,50x50/apps,50x50/devices,50x50/filesystems,50x50/hildon,50x50/mimetypes,250x250/apps,250x250/devices,250x250/filesystems,250x250/hildon,250x250/mimetypes,scalable/hildon
-
-[12x12/apps]
-Size=12
-Context=Applications
-Type=Threshold
-
-[12x12/devices]
-Size=12
-Context=Devices
-Type=Threshold
-
-[12x12/filesystems]
-Size=12
-Context=FileSystems
-Type=Threshold
-
-[12x12/hildon]
-Size=12
-Context=hildon
-Type=Threshold
-
-[12x12/mimetypes]
-Size=12
-Context=MimeTypes
-Type=Threshold
-
-[16x16/actions]
-Size=16
-Context=Actions
-Type=Threshold
-
-[16x16/animations]
-Size=16
-Context=Animations
-Type=Threshold
-
-[16x16/apps]
-Size=16
-Context=Applications
-Type=Threshold
-
-[16x16/categories]
-Size=16
-Context=Categories
-Type=Threshold
-
-[16x16/devices]
-Size=16
-Context=Devices
-Type=Threshold
-
-[16x16/emblems]
-Size=16
-Context=Emblems
-Type=Threshold
-
-[16x16/emotes]
-Size=16
-Context=Emotes
-Type=Threshold
-
-[16x16/filesystems]
-Size=16
-Context=FileSystems
-Type=Threshold
-
-[16x16/hildon]
-Size=16
-Context=hildon
-Type=Threshold
-
-[16x16/intl]
-Size=16
-Context=International
-Type=Threshold
-
-[16x16/mimetypes]
-Size=16
-Context=MimeTypes
-Type=Threshold
-
-[16x16/places]
-Size=16
-Context=Places
-Type=Threshold
-
-[16x16/status]
-Size=16
-Context=Status
-Type=Threshold
-
-[16x16/stock/chart]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/code]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/data]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/form]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/image]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/io]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/media]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/navigation]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/net]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/object]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/table]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/text]
-Size=16
-Context=Stock
-Type=Threshold
-
-[22x22/actions]
-Size=22
-Context=Actions
-Type=Threshold
-
-[22x22/animations]
-Size=22
-Context=Animations
-Type=Threshold
-
-[22x22/apps]
-Size=22
-Context=Applications
-Type=Fixed
-
-[22x22/categories]
-Size=22
-Context=Categories
-Type=Threshold
-
-[22x22/devices]
-Size=22
-Context=Devices
-Type=Threshold
-
-[22x22/emblems]
-Size=22
-Context=Emblems
-Type=Threshold
-
-[22x22/emotes]
-Size=22
-Context=Emotes
-Type=Threshold
-
-[22x22/filesystems]
-Size=22
-Context=FileSystems
-Type=Threshold
-
-[22x22/intl]
-Size=22
-Context=International
-Type=Threshold
-
-[22x22/mimetypes]
-Size=22
-Context=MimeTypes
-Type=Threshold
-
-[22x22/places]
-Size=22
-Context=Places
-Type=Threshold
-
-[22x22/status]
-Size=22
-Context=Status
-Type=Threshold
-
-[22x22/stock/chart]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/code]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/data]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/form]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/image]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/io]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/media]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/navigation]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/net]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/object]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/table]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/text]
-Size=22
-Context=Stock
-Type=Threshold
-
-[24x24/actions]
-Size=24
-Context=Actions
-Type=Threshold
-
-[24x24/animations]
-Size=24
-Context=Animations
-Type=Threshold
-
-[24x24/apps]
-Size=24
-Context=Applications
-Type=Threshold
-
-[24x24/categories]
-Size=24
-Context=Categories
-Type=Threshold
-
-[24x24/devices]
-Size=24
-Context=Devices
-Type=Threshold
-
-[24x24/emblems]
-Size=24
-Context=Emblems
-Type=Threshold
-
-[24x24/emotes]
-Size=24
-Context=Emotes
-Type=Threshold
-
-[24x24/filesystems]
-Size=24
-Context=FileSystems
-Type=Threshold
-
-[24x24/intl]
-Size=24
-Context=International
-Type=Threshold
-
-[24x24/mimetypes]
-Size=24
-Context=MimeTypes
-Type=Threshold
-
-[24x24/places]
-Size=24
-Context=Places
-Type=Threshold
-
-[24x24/status]
-Size=24
-Context=Status
-Type=Threshold
-
-[24x24/stock/chart]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/code]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/data]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/form]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/image]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/io]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/media]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/navigation]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/net]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/object]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/table]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/text]
-Size=24
-Context=Stock
-Type=Threshold
-
-[26x26/apps]
-Size=26
-Context=Applications
-Type=Threshold
-
-[26x26/devices]
-Size=26
-Context=Devices
-Type=Threshold
-
-[26x26/filesystems]
-Size=26
-Context=FileSystems
-Type=Threshold
-
-[26x26/hildon]
-Size=26
-Context=hildon
-Type=Threshold
-
-[26x26/mimetypes]
-Size=26
-Context=MimeTypes
-Type=Threshold
-
-[32x32/actions]
-Size=32
-Context=Actions
-Type=Threshold
-
-[32x32/animations]
-Size=32
-Context=Animations
-Type=Threshold
-
-[32x32/apps]
-Size=32
-Context=Applications
-Type=Threshold
-
-[32x32/categories]
-Size=32
-Context=Categories
-Type=Threshold
-
-[32x32/devices]
-Size=32
-Context=Devices
-Type=Threshold
-
-[32x32/emblems]
-Size=32
-Context=Emblems
-Type=Threshold
-
-[32x32/emotes]
-Size=32
-Context=Emotes
-Type=Threshold
-
-[32x32/filesystems]
-Size=32
-Context=FileSystems
-Type=Threshold
-
-[32x32/intl]
-Size=32
-Context=International
-Type=Threshold
-
-[32x32/mimetypes]
-Size=32
-Context=MimeTypes
-Type=Threshold
-
-[32x32/places]
-Size=32
-Context=Places
-Type=Threshold
-
-[32x32/status]
-Size=32
-Context=Status
-Type=Threshold
-
-[32x32/stock/chart]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/code]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/data]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/form]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/image]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/io]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/media]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/navigation]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/net]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/object]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/table]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/text]
-Size=32
-Context=Stock
-Type=Threshold
-
-[34x34/apps]
-Size=34
-Context=Applications
-Type=Threshold
-
-[34x34/devices]
-Size=34
-Context=Devices
-Type=Threshold
-
-[34x34/filesystems]
-Size=34
-Context=FileSystems
-Type=Threshold
-
-[34x34/hildon]
-Size=34
-Context=hildon
-Type=Threshold
-
-[34x34/mimetypes]
-Size=34
-Context=MimeTypes
-Type=Threshold
-
-[36x36/actions]
-Size=36
-Context=Actions
-Type=Threshold
-
-[36x36/animations]
-Size=36
-Context=Animations
-Type=Threshold
-
-[36x36/apps]
-Size=36
-Context=Applications
-Type=Threshold
-
-[36x36/categories]
-Size=36
-Context=Categories
-Type=Threshold
-
-[36x36/devices]
-Size=36
-Context=Devices
-Type=Threshold
-
-[36x36/emblems]
-Size=36
-Context=Emblems
-Type=Threshold
-
-[36x36/emotes]
-Size=36
-Context=Emotes
-Type=Threshold
-
-[36x36/filesystems]
-Size=36
-Context=FileSystems
-Type=Threshold
-
-[36x36/intl]
-Size=36
-Context=International
-Type=Threshold
-
-[36x36/mimetypes]
-Size=36
-Context=MimeTypes
-Type=Threshold
-
-[36x36/places]
-Size=36
-Context=Places
-Type=Threshold
-
-[36x36/status]
-Size=36
-Context=Status
-Type=Threshold
-
-[36x36/stock/chart]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/code]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/data]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/form]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/image]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/io]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/media]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/navigation]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/net]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/object]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/table]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/text]
-Size=36
-Context=Stock
-Type=Threshold
-
-[40x40/apps]
-Size=40
-Context=Applications
-Type=Threshold
-
-[40x40/devices]
-Size=40
-Context=Devices
-Type=Threshold
-
-[40x40/filesystems]
-Size=40
-Context=FileSystems
-Type=Threshold
-
-[40x40/hildon]
-Size=40
-Context=hildon
-Type=Threshold
-
-[40x40/mimetypes]
-Size=40
-Context=MimeTypes
-Type=Threshold
-
-[48x48/actions]
-Size=48
-Context=Actions
-Type=Threshold
-
-[48x48/animations]
-Size=48
-Context=Animations
-Type=Threshold
-
-[48x48/apps]
-Size=48
-Context=Applications
-Type=Threshold
-
-[48x48/categories]
-Size=48
-Context=Categories
-Type=Threshold
-
-[48x48/devices]
-Size=48
-Context=Devices
-Type=Threshold
-
-[48x48/emblems]
-Size=48
-Context=Emblems
-Type=Threshold
-
-[48x48/emotes]
-Size=48
-Context=Emotes
-Type=Threshold
-
-[48x48/filesystems]
-Size=48
-Context=FileSystems
-Type=Threshold
-
-[48x48/intl]
-Size=48
-Context=International
-Type=Threshold
-
-[48x48/mimetypes]
-Size=48
-Context=MimeTypes
-Type=Threshold
-
-[48x48/places]
-Size=48
-Context=Places
-Type=Threshold
-
-[48x48/status]
-Size=48
-Context=Status
-Type=Threshold
-
-[48x48/stock/chart]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/code]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/data]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/form]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/image]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/io]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/media]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/navigation]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/net]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/object]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/table]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/text]
-Size=48
-Context=Stock
-Type=Threshold
-
-[50x50/apps]
-Size=50
-Context=Applications
-Type=Threshold
-
-[50x50/devices]
-Size=50
-Context=Devices
-Type=Threshold
-
-[50x50/filesystems]
-Size=50
-Context=FileSystems
-Type=Threshold
-
-[50x50/hildon]
-Size=50
-Context=hildon
-Type=Threshold
-
-[50x50/mimetypes]
-Size=50
-Context=MimeTypes
-Type=Threshold
-
-[64x64/actions]
-Size=64
-Context=Actions
-Type=Threshold
-
-[64x64/animations]
-Size=64
-Context=Animations
-Type=Threshold
-
-[64x64/apps]
-Size=64
-Context=Applications
-Type=Threshold
-
-[64x64/categories]
-Size=64
-Context=Categories
-Type=Threshold
-
-[64x64/devices]
-Size=64
-Context=Devices
-Type=Threshold
-
-[64x64/emblems]
-Size=64
-Context=Emblems
-Type=Threshold
-
-[64x64/emotes]
-Size=64
-Context=Emotes
-Type=Threshold
-
-[64x64/filesystems]
-Size=64
-Context=FileSystems
-Type=Threshold
-
-[64x64/intl]
-Size=64
-Context=International
-Type=Threshold
-
-[64x64/mimetypes]
-Size=64
-Context=MimeTypes
-Type=Threshold
-
-[64x64/places]
-Size=64
-Context=Places
-Type=Threshold
-
-[64x64/status]
-Size=64
-Context=Status
-Type=Threshold
-
-[64x64/stock/chart]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/code]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/data]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/form]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/image]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/io]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/media]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/navigation]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/net]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/object]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/table]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/text]
-Size=64
-Context=Stock
-Type=Threshold
-[72x72/actions]
-Size=72
-Context=Actions
-Type=Threshold
-
-[72x72/animations]
-Size=72
-Context=Animations
-Type=Threshold
-
-[72x72/apps]
-Size=72
-Context=Applications
-Type=Threshold
-
-[72x72/categories]
-Size=72
-Context=Categories
-Type=Threshold
-
-[72x72/devices]
-Size=72
-Context=Devices
-Type=Threshold
-
-[72x72/emblems]
-Size=72
-Context=Emblems
-Type=Threshold
-
-[72x72/emotes]
-Size=72
-Context=Emotes
-Type=Threshold
-
-[72x72/filesystems]
-Size=72
-Context=FileSystems
-Type=Threshold
-
-[72x72/intl]
-Size=72
-Context=International
-Type=Threshold
-
-[72x72/mimetypes]
-Size=72
-Context=MimeTypes
-Type=Threshold
-
-[72x72/places]
-Size=72
-Context=Places
-Type=Threshold
-
-[72x72/status]
-Size=72
-Context=Status
-Type=Threshold
-
-[72x72/stock/chart]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/code]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/data]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/form]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/image]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/io]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/media]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/navigation]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/net]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/object]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/table]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/text]
-Size=72
-Context=Stock
-Type=Threshold
-
-[96x96/actions]
-Size=96
-Context=Actions
-Type=Threshold
-
-[96x96/animations]
-Size=96
-Context=Animations
-Type=Threshold
-
-[96x96/apps]
-Size=96
-Context=Applications
-Type=Threshold
-
-[96x96/categories]
-Size=96
-Context=Categories
-Type=Threshold
-
-[96x96/devices]
-Size=96
-Context=Devices
-Type=Threshold
-
-[96x96/emblems]
-Size=96
-Context=Emblems
-Type=Threshold
-
-[96x96/emotes]
-Size=96
-Context=Emotes
-Type=Threshold
-
-[96x96/filesystems]
-Size=96
-Context=FileSystems
-Type=Threshold
-
-[96x96/intl]
-Size=96
-Context=International
-Type=Threshold
-
-[96x96/mimetypes]
-Size=96
-Context=MimeTypes
-Type=Threshold
-
-[96x96/places]
-Size=96
-Context=Places
-Type=Threshold
-
-[96x96/status]
-Size=96
-Context=Status
-Type=Threshold
-
-[96x96/stock/chart]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/code]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/data]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/form]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/image]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/io]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/media]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/navigation]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/net]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/object]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/table]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/text]
-Size=96
-Context=Stock
-Type=Threshold
-
-[128x128/actions]
-Size=128
-Context=Actions
-Type=Threshold
-
-[128x128/animations]
-Size=128
-Context=Animations
-Type=Threshold
-
-[128x128/apps]
-Size=128
-Context=Applications
-Type=Threshold
-
-[128x128/categories]
-Size=128
-Context=Categories
-Type=Threshold
-
-[128x128/devices]
-Size=128
-Context=Devices
-Type=Threshold
-
-[128x128/emblems]
-Size=128
-Context=Emblems
-Type=Threshold
-
-[128x128/emotes]
-Size=128
-Context=Emotes
-Type=Threshold
-
-[128x128/filesystems]
-Size=128
-Context=FileSystems
-Type=Threshold
-
-[128x128/intl]
-Size=128
-Context=International
-Type=Threshold
-
-[128x128/mimetypes]
-Size=128
-Context=MimeTypes
-Type=Threshold
-
-[128x128/places]
-Size=128
-Context=Places
-Type=Threshold
-
-[128x128/status]
-Size=128
-Context=Status
-Type=Threshold
-
-[128x128/stock/chart]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/code]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/data]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/form]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/image]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/io]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/media]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/navigation]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/net]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/object]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/table]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/text]
-Size=128
-Context=Stock
-Type=Threshold
-
-[192x192/actions]
-Size=192
-Context=Actions
-Type=Threshold
-
-[192x192/animations]
-Size=192
-Context=Animations
-Type=Threshold
-
-[192x192/apps]
-Size=192
-Context=Applications
-Type=Threshold
-
-[192x192/categories]
-Size=192
-Context=Categories
-Type=Threshold
-
-[192x192/devices]
-Size=192
-Context=Devices
-Type=Threshold
-
-[192x192/emblems]
-Size=192
-Context=Emblems
-Type=Threshold
-
-[192x192/emotes]
-Size=192
-Context=Emotes
-Type=Threshold
-
-[192x192/filesystems]
-Size=192
-Context=FileSystems
-Type=Threshold
-
-[192x192/intl]
-Size=192
-Context=International
-Type=Threshold
-
-[192x192/mimetypes]
-Size=192
-Context=MimeTypes
-Type=Threshold
-
-[192x192/places]
-Size=192
-Context=Places
-Type=Threshold
-
-[192x192/status]
-Size=192
-Context=Status
-Type=Threshold
-
-[192x192/stock/chart]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/code]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/data]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/form]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/image]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/io]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/media]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/navigation]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/net]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/object]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/table]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/text]
-Size=192
-Context=Stock
-Type=Threshold
-
-[250x250/apps]
-Size=250
-Context=Applications
-Type=Threshold
-
-[250x250/devices]
-Size=250
-Context=Devices
-Type=Threshold
-
-[250x250/filesystems]
-Size=250
-Context=FileSystems
-Type=Threshold
-
-[250x250/hildon]
-Size=250
-Context=hildon
-Type=Threshold
-
-[250x250/mimetypes]
-Size=250
-Context=MimeTypes
-Type=Threshold
-
-[scalable/actions]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Actions
-Type=Scalable
-
-[scalable/animations]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Animations
-Type=Scalable
-
-[scalable/apps]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Applications
-Type=Scalable
-
-[scalable/categories]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Categories
-Type=Scalable
-
-[scalable/devices]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Devices
-Type=Scalable
-
-[scalable/emblems]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Emblems
-Type=Scalable
-
-[scalable/emotes]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Emotes
-Type=Scalable
-
-[scalable/filesystems]
-MinSize=1
-Size=128
-MaxSize=256
-Context=FileSystems
-Type=Scalable
-
-[scalable/hildon]
-MinSize=1
-Size=128
-MaxSize=256
-Context=hildon
-Type=Scalable
-
-[scalable/intl]
-MinSize=1
-Size=128
-MaxSize=256
-Context=International
-Type=Scalable
-
-[scalable/mimetypes]
-MinSize=1
-Size=128
-MaxSize=256
-Context=MimeTypes
-Type=Scalable
-
-[scalable/places]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Places
-Type=Scalable
-
-[scalable/status]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Status
-Type=Scalable
-
-[scalable/stock/chart]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/code]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/data]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/form]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/image]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/io]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/media]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/navigation]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/net]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/object]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/table]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/text]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[12x12/stock]
-Size=12
-Context=Stock
-Type=Threshold
-
-[16x16/stock]
-Size=16
-Context=Stock
-Type=Threshold
-
-[22x22/stock]
-Size=22
-Context=Stock
-Type=Threshold
-
-[24x24/stock]
-Size=24
-Context=Stock
-Type=Threshold
-
-[26x26/stock]
-Size=26
-Context=Stock
-Type=Threshold
-
-[32x32/stock]
-Size=32
-Context=Stock
-Type=Threshold
-
-[34x34/stock]
-Size=34
-Context=Stock
-Type=Threshold
-
-[36x36/stock]
-Size=36
-Context=Stock
-Type=Threshold
-
-[48x48/stock]
-Size=48
-Context=Stock
-Type=Threshold
-
-[64x64/stock]
-Size=64
-Context=Stock
-Type=Threshold
-
-[72x72/stock]
-Size=72
-Context=Stock
-Type=Threshold
-
-[96x96/stock]
-Size=96
-Context=Stock
-Type=Threshold
-
-[128x128/stock]
-Size=128
-Context=Stock
-Type=Threshold
-
-[192x192/stock]
-Size=192
-Context=Stock
-Type=Threshold
-
-[scalable/stock]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
diff --git a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb
index 4441e04f58..9cb8056655 100644
--- a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb
+++ b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb
@@ -5,19 +5,10 @@ BUGTRACKER = "https://bugs.freedesktop.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
-SECTION = "unknown"
-inherit gnomebase allarch autotools-brokensep
+SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "56d2c6c3a9df5a0acd332430e3f3ae3e"
+SRC_URI[sha256sum] = "7bed06e6ef316318274bda0fdaf39fce960e4222a0165c968d84acb428902ecd"
-PR = "r1"
-
-SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.gz \
- file://index.theme"
-
-SRC_URI[md5sum] = "55cafbcef8bcf7107f6d502149eb4d87"
-SRC_URI[sha256sum] = "9edca690617eaa19054951ca53501c802180262be8880ed84754ac46c93bec73"
+inherit allarch autotools
FILES_${PN} += "${datadir}/icons"
-
-do_install_append () {
- install -m 0644 ${WORKDIR}/index.theme ${D}/${datadir}/icons/hicolor
-}
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.0.0.bb b/meta/recipes-gnome/json-glib/json-glib_1.0.2.bb
index ce007094b4..0c25deca74 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.0.0.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.0.2.bb
@@ -12,8 +12,8 @@ DEPENDS = "glib-2.0"
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "d13485f5aa3b93227bbeb689ccfb596c"
-SRC_URI[archive.sha256sum] = "dbf558d2da989ab84a27e4e13daa51ceaa97eb959c2c2f80976c9322a8f4cdde"
+SRC_URI[archive.md5sum] = "e43efaf6852958207982e79141bf371e"
+SRC_URI[archive.sha256sum] = "887bd192da8f5edc53b490ec51bf3ffebd958a671f5963e4f3af32c22e35660a"
inherit gnome gettext lib_package
diff --git a/meta/recipes-gnome/libffi/libffi_3.1.bb b/meta/recipes-gnome/libffi/libffi_3.2.1.bb
index bc97aba20b..23028109cc 100644
--- a/meta/recipes-gnome/libffi/libffi_3.1.bb
+++ b/meta/recipes-gnome/libffi/libffi_3.2.1.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
file://fix-libffi.la-location.patch"
-SRC_URI[md5sum] = "f5898b29bbfd70502831a212d9249d10"
-SRC_URI[sha256sum] = "97feeeadca5e21870fa4433bc953d1b3af3f698d5df8a428f68b73cd60aef6eb"
+SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
+SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
EXTRA_OECONF += "--disable-builddir"
diff --git a/meta/recipes-gnome/librsvg/librsvg/vapigen.m4 b/meta/recipes-gnome/librsvg/librsvg/vapigen.m4
deleted file mode 100644
index f2df12f23f..0000000000
--- a/meta/recipes-gnome/librsvg/librsvg/vapigen.m4
+++ /dev/null
@@ -1,96 +0,0 @@
-dnl vapigen.m4
-dnl
-dnl Copyright 2012 Evan Nemerson
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
-# --------------------------------------
-# Check vapigen existence and version
-#
-# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
-AC_DEFUN([VAPIGEN_CHECK],
-[
- AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
- AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
-
- AC_ARG_ENABLE([vala],
- [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
- AS_IF([test "x$4" = "x"], [
- enable_vala=auto
- ], [
- enable_vala=$4
- ])
- ])
-
- AS_CASE([$enable_vala], [no], [enable_vala=no],
- [yes], [
- AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
- AC_MSG_ERROR([Vala bindings require GObject Introspection])
- ])
- ], [auto], [
- AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
- enable_vala=no
- ])
- ], [
- AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
- ])
-
- AS_IF([test "x$2" = "x"], [
- vapigen_pkg_name=vapigen
- ], [
- vapigen_pkg_name=vapigen-$2
- ])
- AS_IF([test "x$1" = "x"], [
- vapigen_pkg="$vapigen_pkg_name"
- ], [
- vapigen_pkg="$vapigen_pkg_name >= $1"
- ])
-
- PKG_PROG_PKG_CONFIG
-
- PKG_CHECK_EXISTS([$vapigen_pkg], [
- AS_IF([test "$enable_vala" = "auto"], [
- enable_vala=yes
- ])
- ], [
- AS_CASE([$enable_vala], [yes], [
- AC_MSG_ERROR([$vapigen_pkg not found])
- ], [auto], [
- enable_vala=no
- ])
- ])
-
- AC_MSG_CHECKING([for vala])
-
- AS_CASE([$enable_vala],
- [yes], [
- VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
- VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
- AS_IF([test "x$2" = "x"], [
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
- ], [
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
- ])
- ])
-
- AC_MSG_RESULT([$enable_vala])
-
- AC_SUBST([VAPIGEN])
- AC_SUBST([VAPIGEN_VAPIDIR])
- AC_SUBST([VAPIGEN_MAKEFILE])
-
- AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
-])
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb b/meta/recipes-gnome/librsvg/librsvg_2.40.6.bb
index 34d8ca1bf8..483d30980f 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.40.6.bb
@@ -14,29 +14,23 @@ inherit autotools pkgconfig gnomebase gtk-doc pixbufcache
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI += "file://gtk-option.patch \
- file://vapigen.m4"
+SRC_URI += "file://gtk-option.patch"
-SRC_URI[archive.md5sum] = "acdecdb9f08f3bf662a68bf7dafb8b82"
-SRC_URI[archive.sha256sum] = "48049b643294636df7de1a4b997414d699666f5dc44776945c218a257d2a291c"
+SRC_URI[archive.md5sum] = "259fd160b47ec11f3c27d7e18e507c99"
+SRC_URI[archive.sha256sum] = "8af349f241677b04b7a1ea6b9b33a6343e781bcccc8a09d00208a47342584f06"
EXTRA_OECONF = "--disable-introspection --disable-vala"
+# The older ld (2.22) on the host (Centos 6.5) doesn't have the
+# -Bsymbolic-functions option, we can disable it for native.
+EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
+
PACKAGECONFIG ??= "gdkpixbuf"
# The gdk-pixbuf loader
PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
# GTK+ test application (rsvg-view)
PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-# The tarball doesn't ship with macros, so drop a vapigen in there so we don't
-# need to build vala to configure.
-do_configure_prepend() {
- if test ! -e ${S}/m4/vapigen.m4; then
- mkdir --parents ${S}/m4
- mv ${WORKDIR}/vapigen.m4 ${S}/m4/
- fi
-}
-
do_install_append() {
# Loadable modules don't need .a or .la on Linux
rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
diff --git a/meta/recipes-graphics/builder/files/builder_hob_start.sh b/meta/recipes-graphics/builder/files/builder_hob_start.sh
index 42c93ddbc0..65a68eec42 100644
--- a/meta/recipes-graphics/builder/files/builder_hob_start.sh
+++ b/meta/recipes-graphics/builder/files/builder_hob_start.sh
@@ -30,10 +30,6 @@ fi
cd /home/builder/poky
. ./oe-init-build-env
-#uncomment the settings for BB_NUMBER_THREADS and PARALLEL_MAKE
-sed -i 's/^#BB_NUMBER_THREADS =/BB_NUMBER_THREADS =/g' conf/local.conf
-sed -i 's/^#PARALLEL_MAKE =/PARALLEL_MAKE =/g' conf/local.conf
-
hob &
matchbox-terminal&
diff --git a/meta/recipes-graphics/cairo/cairo_1.12.16.bb b/meta/recipes-graphics/cairo/cairo_1.12.18.bb
index 246bd0be64..fd0bd8c36d 100644
--- a/meta/recipes-graphics/cairo/cairo_1.12.16.bb
+++ b/meta/recipes-graphics/cairo/cairo_1.12.18.bb
@@ -4,8 +4,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
-SRC_URI[md5sum] = "a1304edcdc99282f478b995ee5f8f854"
-SRC_URI[sha256sum] = "2505959eb3f1de3e1841023b61585bfd35684b9733c7b6a3643f4f4cbde6d846"
+SRC_URI[md5sum] = "8e4ff32b82c3b39387eb6f5c59ef848e"
+SRC_URI[sha256sum] = "dc59f0b7ac945ce4e138a03c227a29260915a8b05a4226c1f6f1be586ba7f5b6"
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0.inc b/meta/recipes-graphics/clutter/clutter-1.0.inc
index 77035d746f..da21cee8b5 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -2,7 +2,7 @@ SUMMARY = "Graphics library for creating hardware-accelerated user interfaces"
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPLv2.1+"
-inherit clutter
+inherit clutter ptest-gnome
DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0"
PACKAGE_BEFORE_PN += "${PN}-examples"
@@ -33,12 +33,15 @@ PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,${E
PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayland-compositor,wayland"
# Default configuration, distros might want to override
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+PACKAGECONFIG ??= "egl \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}"
FILES_${PN}-dbg += "${libdir}/clutter/examples/.debug"
FILES_${PN}-examples = "${libdir}/clutter/examples"
+FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
+
do_configure_prepend() {
# see https://bugzilla.gnome.org/show_bug.cgi?id=661128 for this
touch -t 200001010000 ${S}/po/clutter-1.0.pot
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
new file mode 100644
index 0000000000..80acab867c
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
@@ -0,0 +1,20 @@
+Configure output from installed-tests to be TAP compliant, such that gnome-desktop-testing-runner properly interprets the results.
+
+Upstream-status: Pending
+
+Signed-off-by: Tim Orling <TicoTimo@gmail.com>
+
+Index: clutter-1.20.0/build/autotools/glib-tap.mk
+===================================================================
+--- clutter-1.20.0.orig/build/autotools/glib-tap.mk
++++ clutter-1.20.0/build/autotools/glib-tap.mk
+@@ -128,7 +128,8 @@ installed_test_meta_DATA = $(installed_t
+ $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
+ echo 'Type=session' >> $@.tmp; \
+ echo 'TestEnvironment=G_ENABLE_DIAGNOSTIC=0;CLUTTER_ENABLE_DIAGNOSTIC=0;' >> $@.tmp; \
+- echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
++ echo 'Exec=$(installed_testdir)/$< --tap' >> $@.tmp; \
++ echo 'Output=TAP' >> $@.tmp; \
+ mv $@.tmp $@)
+
+ CLEANFILES += $(installed_test_meta_DATA)
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-ptest b/meta/recipes-graphics/clutter/clutter-1.0/run-ptest
new file mode 100644
index 0000000000..98877e5226
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner clutter
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb
deleted file mode 100644
index 452e7eefd0..0000000000
--- a/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require clutter-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI[archive.md5sum] = "471f5ea423e20d4140c7771873daef29"
-SRC_URI[archive.sha256sum] = "f9fe12e6148426063c90e67dfaeb56013bf1aea224ef502223d13eab6c1add63"
-
-SRC_URI += "file://install-examples.patch"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb
new file mode 100644
index 0000000000..5f39a3a8ac
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "a8a33a57a944c6d7c7c013ce9aa3222b"
+SRC_URI[archive.sha256sum] = "cc940809e6e1469ce349c4bddb0cbcc2c13c087d4fc15cda9278d855ee2d1293"
+
+SRC_URI += "file://install-examples.patch \
+ file://run-installed-tests-with-tap-output.patch \
+ file://run-ptest"
diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc
index e25968e468..af06484903 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -8,7 +8,8 @@ DEPENDS = "glib-2.0 gdk-pixbuf"
PACKAGES =+ "${PN}-examples \
libcogl libcogl-dev \
libcogl-gles2 libcogl-gles2-dev \
- libcogl-pango libcogl-pango-dev"
+ libcogl-pango libcogl-pango-dev \
+ libcogl-path libcogl-path-dev"
AUTOTOOLS_AUXDIR = "${S}/build"
# Extra DEPENDS for PACKAGECONFIG
@@ -41,7 +42,7 @@ PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDE
# EGL backends
PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
-PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11}"
+PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
# Wayland (server-side)
@@ -54,7 +55,9 @@ PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
# default.
PACKAGECONFIG ??= "cogl-pango gles2 \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx', '', d)}"
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
+ "
+
FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
FILES_libcogl = "${libdir}/libcogl${SOLIBS}"
@@ -68,12 +71,18 @@ FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
FILES_libcogl-gles2-dev = "${includedir}/cogl/cogl-gles2 \
${libdir}/libcogl-gles2${SOLIBSDEV} \
${libdir}/libcogl-gles2.la \
- ${libdir}/pkgconfig/cogl-gles2-experimental.pc"
+ ${libdir}/pkgconfig/cogl-gles2-*.pc"
FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS}"
FILES_libcogl-pango-dev = "${includedir}/cogl/cogl-pango \
${libdir}/libcogl-pango${SOLIBSDEV} \
${libdir}/libcogl-pango.la \
- ${libdir}/pkgconfig/cogl-pango-1.0.pc"
+ ${libdir}/pkgconfig/cogl-pango-*.pc"
+
+FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
+FILES_libcogl-path-dev = "${includedir}/cogl/cogl-path \
+ ${libdir}/libcogl-path${SOLIBSDEV} \
+ ${libdir}/libcogl-path.la \
+ ${libdir}/pkgconfig/cogl-path-*.pc"
# For backwards compatibility after Debian-renaming
RPROVIDES_libcogl = "cogl-1.0"
diff --git a/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch b/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
new file mode 100644
index 0000000000..0717ea6f88
--- /dev/null
+++ b/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
@@ -0,0 +1,28 @@
+From 88077ed156a714f32bb408f422278d61611ffd41 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Sat, 26 Jul 2014 16:57:46 -0300
+Subject: [PATCH] configure.in: Fix string argument syntax
+
+Upstream-Status: Submitted
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index bfe1b82..e939bbd 100644
+--- a/configure.in
++++ b/configure.in
+@@ -65,7 +65,7 @@ fi)
+
+ DIRECTFB_REQUIRED_VERSION=1.4.14
+
+-PKG_CHECK_MODULES(DIRECTFB, directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
++PKG_CHECK_MODULES([DIRECTFB], directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
+ AC_MSG_ERROR([$DIRECTFB_PKG_ERRORS
+ *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest version
+ *** of DirectFB is available from http://www.directfb.org/.]))
+--
+1.7.10.4
+
diff --git a/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb b/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
index 6057596071..9c3e8bf3d3 100644
--- a/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
+++ b/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
@@ -8,6 +8,7 @@ LICENSE = "MIT"
SRC_URI = " \
http://www.directfb.org/downloads/Extras/DirectFB-examples-${PV}.tar.gz \
+ file://configure.in-Fix-string-argument-syntax.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=ecf6fd2b19915afc4da56043926ca18f"
diff --git a/meta/recipes-graphics/directfb/directfb.inc b/meta/recipes-graphics/directfb/directfb.inc
index 51dc09bc10..669c0ffd9d 100644
--- a/meta/recipes-graphics/directfb/directfb.inc
+++ b/meta/recipes-graphics/directfb/directfb.inc
@@ -25,6 +25,9 @@ inherit autotools binconfig-disabled pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper"
+PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
EXTRA_OECONF = "\
--with-gfxdrivers=none \
diff --git a/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch b/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch
deleted file mode 100644
index 94a9ba5f02..0000000000
--- a/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix out of tree builds
-
-Upstream-Status: Pending
-
-RP 2013/03/21
-
-Index: DirectFB-1.6.1/configure.in
-===================================================================
---- DirectFB-1.6.1.orig/configure.in 2013-03-19 01:38:28.174004720 +0000
-+++ DirectFB-1.6.1/configure.in 2013-03-21 12:18:10.253113675 +0000
-@@ -111,7 +111,7 @@
- AC_PATH_TOOL(FLUXCOMP, fluxcomp)
- AC_SUBST(FLUXCOMP)
- if test -z "$FLUXCOMP"; then
-- if ! test -e src/core/CoreDFB.cpp; then
-+ if ! test -e $srcdir/src/core/CoreDFB.cpp; then
- AC_MSG_ERROR([
- *** DirectFB compilation requires fluxcomp ***
-
diff --git a/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch b/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch
deleted file mode 100644
index 443df5a9da..0000000000
--- a/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch
+++ /dev/null
@@ -1,345 +0,0 @@
-Rename __no_instrument_function__ macro to avoid conficting redefinitions
-of the same symbol.
-
-Upstream-Status: Pending
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: DirectFB-1.6.1/lib/direct/clock.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/clock.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/clock.c 2013-01-05 18:03:24.000000000 +0200
-@@ -36,28 +36,28 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_micros( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_SESSION );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_millis( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_SESSION ) / 1000LL;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_abs_micros( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_REALTIME );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_abs_millis( void )
- {
-Index: DirectFB-1.6.1/lib/direct/debug.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/debug.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/debug.c 2013-01-05 18:03:49.000000000 +0200
-@@ -48,7 +48,7 @@
-
- #if DIRECT_BUILD_DEBUGS /* Build with debug support? */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_log( DirectLogDomain *domain,
- unsigned int debug_level, /* 1-9, 0 = info */
-@@ -63,7 +63,7 @@
- va_end( ap );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_at( DirectLogDomain *domain,
- const char *format, ... )
-@@ -77,7 +77,7 @@
-
- #endif /* DIRECT_BUILD_DEBUGS */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_at_always( DirectLogDomain *domain,
- const char *format, ... )
-@@ -93,7 +93,7 @@
-
- #if DIRECT_BUILD_DEBUGS /* Build with debug support? */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_break( const char *func,
- const char *file,
-@@ -123,7 +123,7 @@
- direct_trap( "Break", SIGABRT );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_assertion( const char *exp,
- const char *func,
-@@ -144,7 +144,7 @@
- direct_trap( "Assertion", SIGTRAP );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_assumption( const char *exp,
- const char *func,
-Index: DirectFB-1.6.1/lib/direct/interface.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/interface.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/interface.c 2013-01-05 18:04:56.000000000 +0200
-@@ -522,7 +522,7 @@
-
- /**************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static InterfaceDesc *
- allocate_interface_desc( void )
- {
-@@ -543,7 +543,7 @@
- return &alloc_list[alloc_count++];
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ void
- fill_interface_desc( InterfaceDesc *desc,
- const void *interface_ptr,
-@@ -565,7 +565,7 @@
-
- /**************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_dbg_interface_add( const char *func,
- const char *file,
-@@ -586,7 +586,7 @@
- direct_mutex_unlock( &alloc_lock );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_dbg_interface_remove( const char *func,
- const char *file,
-Index: DirectFB-1.6.1/lib/direct/log.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/log.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/log.c 2013-01-05 18:04:18.000000000 +0200
-@@ -128,7 +128,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_printf( DirectLog *log,
- const char *format, ... )
-@@ -197,7 +197,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_log_lock( DirectLog *log )
- {
-@@ -211,7 +211,7 @@
- direct_mutex_lock( &log->lock );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_log_unlock( DirectLog *log )
- {
-@@ -262,7 +262,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectLog *
- direct_log_default( void )
- {
-Index: DirectFB-1.6.1/lib/direct/log_domain.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/log_domain.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/log_domain.c 2013-01-05 18:04:38.000000000 +0200
-@@ -69,7 +69,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ LogDomainEntry *
- lookup_domain( const char *name, bool sub );
-
-@@ -104,7 +104,7 @@
- return NULL;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static DirectLogLevel
- check_domain( DirectLogDomain *domain );
-
-@@ -207,7 +207,7 @@
- /* FIXME: merge following */
-
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_domain_vprintf( DirectLogDomain *domain,
- DirectLogLevel level,
-@@ -268,7 +268,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_domain_log( DirectLogDomain *domain,
- DirectLogLevel level,
-Index: DirectFB-1.6.1/lib/direct/mem.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/mem.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/mem.c 2013-01-05 18:03:08.000000000 +0200
-@@ -121,7 +121,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ MemDesc *
- fill_mem_desc( MemDesc *desc, int bytes, const char *func, const char *file, int line, DirectTraceBuffer *trace )
- {
-Index: DirectFB-1.6.1/lib/direct/messages.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/messages.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/messages.c 2013-01-05 18:02:57.000000000 +0200
-@@ -40,7 +40,7 @@
-
- #if DIRECT_BUILD_TEXT
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_info( const char *format, ... )
- {
-@@ -57,7 +57,7 @@
- direct_log_printf( NULL, "(*) %s", buf );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_error( const char *format, ... )
- {
-@@ -76,7 +76,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_derror( DirectResult result, const char *format, ... )
- {
-@@ -95,7 +95,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_perror( int erno, const char *format, ... )
- {
-@@ -114,7 +114,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_dlerror( const char *dlerr, const char *format, ... )
- {
-@@ -133,7 +133,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_once( const char *func,
- const char *file,
-@@ -155,7 +155,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_unimplemented( const char *func,
- const char *file,
-@@ -166,7 +166,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_bug( const char *func,
- const char *file,
-@@ -188,7 +188,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_warn( const char *func,
- const char *file,
-Index: DirectFB-1.6.1/lib/direct/os/linux/glibc/types.h
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/os/linux/glibc/types.h 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/os/linux/glibc/types.h 2013-01-05 18:06:04.000000000 +0200
-@@ -74,7 +74,7 @@
-
- #define __inline__ inline
- #define D_UNUSED __attribute__((unused))
--#define __no_instrument_function__ __attribute__((no_instrument_function))
-+#define __dfb_no_instrument_function__ __attribute__((no_instrument_function))
- #define __constructor__ __attribute__((constructor))
- #define __destructor__ __attribute__((destructor))
- #define __typeof__(x) typeof(x)
-Index: DirectFB-1.6.1/lib/direct/util.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/util.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/util.c 2013-01-05 18:03:59.000000000 +0200
-@@ -110,7 +110,7 @@
- /*
- * translates errno to DirectResult
- */
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- errno2result( int erno )
- {
diff --git a/meta/recipes-graphics/directfb/directfb_1.7.4.bb b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
index 39b006e8b3..d25d98746f 100644
--- a/meta/recipes-graphics/directfb/directfb_1.7.4.bb
+++ b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
@@ -1,11 +1,9 @@
require directfb.inc
-RV = "1.7-4"
+RV = "1.7-6"
DEPENDS += "sysfsutils"
-SRC_URI += "file://fixsepbuild.patch"
-
EXTRA_OECONF = "\
--enable-freetype=yes \
--enable-zlib \
@@ -19,5 +17,5 @@ EXTRA_OECONF = "\
LEAD_SONAME = "libdirectfb-1.7.so.0"
-SRC_URI[md5sum] = "f5bdacde77fc653279819796ae11341e"
-SRC_URI[sha256sum] = "20ccd60011c788e50c940ab566943d050679067bc84dc37ca447f1b4af08481b"
+SRC_URI[md5sum] = "8a7bb06b3f58599b230b4cf314004512"
+SRC_URI[sha256sum] = "44f32bacfb842ea234599532f8481fe41b5bd2310d2bd101508eb3a5df26c9e1"
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index 1b2ffeb8e7..cfac9e2a2b 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -21,14 +21,16 @@ inherit autotools pkgconfig
EXTRA_OECONF += "--disable-cairo-tests \
--enable-omap-experimental-api \
+ --enable-freedreno-experimental-api \
--enable-install-test-programs \
+ --disable-manpages \
"
ALLOW_EMPTY_${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
- ${PN}-intel ${PN}-exynos ${PN}-kms"
+ ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno"
RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
- ${PN}-exynos"
+ ${PN}-exynos ${PN}-freedreno"
FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode* ${bindir}/*test"
FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
@@ -37,3 +39,4 @@ FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
FILES_${PN}-kms = "${libdir}/libkms*.so.*"
+FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
diff --git a/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch b/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch
deleted file mode 100644
index 8eb1d5e1ea..0000000000
--- a/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-uclibc headers need to know if _GNU_SOURCE is defined or not and its defined
-in config.h so include it first to get the definition if its there fixed build
-problems on uclibc
-
-test_decode.c:107:2: error: implicit declaration of function 'open_memstream' [-Werror=implicit-function-declaration]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: libdrm-2.4.30/intel/test_decode.c
-===================================================================
---- libdrm-2.4.30.orig/intel/test_decode.c 2012-02-03 14:28:46.409355918 -0800
-+++ libdrm-2.4.30/intel/test_decode.c 2012-02-03 14:29:02.357356689 -0800
-@@ -21,6 +21,8 @@
- * IN THE SOFTWARE.
- */
-
-+#include "config.h"
-+
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
-@@ -31,7 +33,6 @@
- #include <sys/mman.h>
- #include <err.h>
-
--#include "config.h"
- #include "intel_bufmgr.h"
- #include "intel_chipset.h"
-
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.53.bb b/meta/recipes-graphics/drm/libdrm_2.4.53.bb
deleted file mode 100644
index 323bef5d57..0000000000
--- a/meta/recipes-graphics/drm/libdrm_2.4.53.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require libdrm.inc
-
-SRC_URI += "file://installtests.patch \
- file://GNU_SOURCE_definition.patch \
- "
-SRC_URI[md5sum] = "342886a137ddd9ed4341675d132388ad"
-SRC_URI[sha256sum] = "1b0c28fd2f2b92d2df0a73d1aed88f43cb0dee1267aea6bc52ccb5fca5757a08"
-
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.58.bb b/meta/recipes-graphics/drm/libdrm_2.4.58.bb
new file mode 100644
index 0000000000..7b1207e27e
--- /dev/null
+++ b/meta/recipes-graphics/drm/libdrm_2.4.58.bb
@@ -0,0 +1,6 @@
+require libdrm.inc
+
+SRC_URI += "file://installtests.patch "
+
+SRC_URI[md5sum] = "24213913333d72b36c16463ed92e522a"
+SRC_URI[sha256sum] = "b155fae6b9c9a3b02ef8b77f58c7c219194c996a4018dc55ba66c03996a365dd"
diff --git a/meta/recipes-graphics/freetype/freetype_2.5.3.bb b/meta/recipes-graphics/freetype/freetype_2.5.4.bb
index 2c861de63a..b5f0362eb3 100644
--- a/meta/recipes-graphics/freetype/freetype_2.5.3.bb
+++ b/meta/recipes-graphics/freetype/freetype_2.5.4.bb
@@ -14,8 +14,8 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=c017ff17fc6f0794adf93db5559ccd56
SECTION = "libs"
SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2"
-SRC_URI[md5sum] = "d6b60f06bfc046e43ab2a6cbfd171d65"
-SRC_URI[sha256sum] = "c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358e65f75e"
+SRC_URI[md5sum] = "438585445a2f1f71c77590155fd96616"
+SRC_URI[sha256sum] = "3b4e2c666b33b32ad29ff0fe5c6538e757d3c73368e5dfa88bd59b4bc95cbabb"
BINCONFIG = "${bindir}/freetype-config"
diff --git a/meta/recipes-graphics/glew/files/autotools.patch b/meta/recipes-graphics/glew/glew/autotools.patch
index 7dfe087d52..7dfe087d52 100644
--- a/meta/recipes-graphics/glew/files/autotools.patch
+++ b/meta/recipes-graphics/glew/glew/autotools.patch
diff --git a/meta/recipes-graphics/glew/files/fix-glew.pc-install.patch b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
index 9cbc0a95aa..70a99aeeee 100644
--- a/meta/recipes-graphics/glew/files/fix-glew.pc-install.patch
+++ b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
@@ -6,20 +6,20 @@ Upstream-Status: Inappropriate
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: glew-1.10.0/Makefile.am
+Index: glew-1.11.0/Makefile.am
===================================================================
---- glew-1.10.0.orig/Makefile.am
-+++ glew-1.10.0/Makefile.am
+--- glew-1.11.0.orig/Makefile.am
++++ glew-1.11.0/Makefile.am
@@ -3,3 +3,5 @@ ACLOCAL_AMFLAGS = -I m4 --install
SUBDIRS = include src
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glew.pc
-Index: glew-1.10.0/configure.ac
+Index: glew-1.11.0/configure.ac
===================================================================
---- glew-1.10.0.orig/configure.ac
-+++ glew-1.10.0/configure.ac
+--- glew-1.11.0.orig/configure.ac
++++ glew-1.11.0/configure.ac
@@ -66,5 +66,6 @@ AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
AC_CONFIG_FILES([Makefile
@@ -28,18 +28,19 @@ Index: glew-1.10.0/configure.ac
+ src/Makefile
+ glew.pc])
AC_OUTPUT
-Index: glew-1.10.0/glew.pc.in
+Index: glew-1.11.0/glew.pc.in
===================================================================
---- glew-1.10.0.orig/glew.pc.in
-+++ glew-1.10.0/glew.pc.in
-@@ -5,7 +5,7 @@ includedir=@includedir@
+--- glew-1.11.0.orig/glew.pc.in
++++ glew-1.11.0/glew.pc.in
+@@ -5,7 +5,7 @@ includedir=${prefix}/include/GL
Name: glew
Description: The OpenGL Extension Wrangler library
-Version: @version@
-Cflags: -I${includedir} @cflags@
-Libs: -L${libdir} -l@libname@
+-Requires: @requireslib@
+Version: @VERSION@
+Cflags: -I${includedir} @CFLAGS@
+Libs: -L${libdir} -lGLEW
- Requires: glu
++Requires: glu
diff --git a/meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
index 0707efba26..0707efba26 100644
--- a/meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch
+++ b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
diff --git a/meta/recipes-graphics/glew/glew_1.10.0.bb b/meta/recipes-graphics/glew/glew_1.11.0.bb
index 94f1bc1ed6..4231320dbd 100644
--- a/meta/recipes-graphics/glew/glew_1.10.0.bb
+++ b/meta/recipes-graphics/glew/glew_1.11.0.bb
@@ -15,7 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
file://fix-glew.pc-install.patch \
"
-SRC_URI[md5sum] = "2f09e5e6cb1b9f3611bcac79bc9c2d5d"
-SRC_URI[sha256sum] = "99c41320b63f6860869b5fb9af9a1854b15582796c64ee3dfd7096dc0c89f307"
+SRC_URI[md5sum] = "f6d72c7426a5f66580ad09e50816450a"
+SRC_URI[sha256sum] = "69bbce306ac281c4fa806a7a7d02c0596281a2d8f9d70690e98126f23ba513d6"
inherit autotools lib_package pkgconfig
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb
index 96a4932a51..333cf2e841 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
SECTION = "libs"
SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-SRC_URI[md5sum] = "6251eb6d57e8c4e9e855188dbbdf8b6d"
-SRC_URI[sha256sum] = "601cea38c6fa0cf362dd9042c66cf4db711c5f9390de4ca46d6d2fc3f64de390"
+SRC_URI[md5sum] = "bfe733250e34629a188d82e3b971bc1e"
+SRC_URI[sha256sum] = "255f3b3842dead16863d1d0c216643d97b80bfa087aaa8fc5926da24ac120207"
+
inherit autotools pkgconfig lib_package
DEPENDS = "glib-2.0 cairo freetype"
diff --git a/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch b/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch
deleted file mode 100644
index 74a04074ec..0000000000
--- a/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a497ea6aae3994b7f6527ef7599dd95baf2ad841 Mon Sep 17 00:00:00 2001
-From: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Date: Mon, 29 Apr 2013 12:04:20 +0300
-Subject: [PATCH] Fix segfault
-
-Apparently, g_io_channel_unref() was called twice: once in the
-menu-cache's on_client_closed() callback and once from the finalize
-function, g_io_unix_finalize()/g_io_win32_finalize(), which is called
-anyway when the source is removed.
-
-Upstream-Status: Pending
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
----
- menu-cache-daemon/menu-cached.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c
-index e246bb4..a10b6db 100644
---- a/menu-cache-daemon/menu-cached.c
-+++ b/menu-cache-daemon/menu-cached.c
-@@ -579,7 +579,6 @@ static void on_client_closed(gpointer user_data)
- }
- }
- /* DEBUG("client closed"); */
-- g_io_channel_unref(ch);
- }
-
- static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer user_data)
---
-1.7.9.5
-
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb b/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb
deleted file mode 100644
index 98bbe76412..0000000000
--- a/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Library for caching application menus"
-DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
-HOMEPAGE = "http://lxde.sourceforge.net/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libmenu-cache/menu-cache.h;endline=29;md5=26571532593adb17a37eac396260532c \
- file://menu-cache-daemon/menu-cached.c;endline=22;md5=fcecb7d315c57ef804103fa9cdab7111"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 zlib"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.gz \
- file://Fix-segfault.patch \
- "
-
-SRC_URI[md5sum] = "20fed982f5d8e6ec8a56a5b48894ecf0"
-SRC_URI[sha256sum] = "4fa9408e353fedba5b7314cbf6b6cd06d873a1424e281aa050d88bb9c0a0191e"
-
-
-inherit autotools pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
new file mode 100644
index 0000000000..ab909f7361
--- /dev/null
+++ b/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Library for caching application menus"
+DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
+HOMEPAGE = "http://lxde.sourceforge.net/"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 intltool-native libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4a8e6c1a86d5e64ec725d850a4abfbad"
+SRC_URI[sha256sum] = "ff7df437bbfd3119c5f662c6d209b98f15de03a7203308c6b56a4c1e1d419aaf"
+
+inherit autotools gettext pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
index c7851035a8..93ee9c286d 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
@@ -1,7 +1,7 @@
-From 87f9a62329d7c5f4d351fbb63a41f2a1935fb2f1 Mon Sep 17 00:00:00 2001
+From b695c3a3fa3f4cd48c13aa26542110de27075518 Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Mon, 12 May 2014 15:22:32 -0400
-Subject: [PATCH] mesa-demos: Add missing data files.
+Subject: [PATCH 1/9] mesa-demos: Add missing data files.
Add some data files that are present in the git repository:
http://cgit.freedesktop.org/mesa/demos/tree/?id=mesa-demos-8.1.0
@@ -10,20 +10,21 @@ but not in the release tarball
Upstream-Status: Backport
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
- src/fpglsl/depth-read.glsl | 4 +
- src/fpglsl/infinite-loop.glsl | 7 +
- src/glsl/CH11-bumpmaptex.frag | 47 +++++++
- src/glsl/blinking-teapot.frag | 31 +++++
- src/glsl/blinking-teapot.vert | 16 +++
- src/glsl/convolution.frag | 21 +++
- src/glsl/simplex-noise.glsl | 279 +++++++++++++++++++++++++++++++++++++++
- src/glsl/skinning.vert | 24 ++++
- src/perf/glslstateschange1.frag | 19 +++
- src/perf/glslstateschange1.vert | 14 ++
- src/perf/glslstateschange2.frag | 17 +++
- src/perf/glslstateschange2.vert | 14 ++
- src/vpglsl/infinite-loop.glsl | 8 ++
+ src/fpglsl/depth-read.glsl | 4 +
+ src/fpglsl/infinite-loop.glsl | 7 +
+ src/glsl/CH11-bumpmaptex.frag | 47 +++++++
+ src/glsl/blinking-teapot.frag | 31 +++++
+ src/glsl/blinking-teapot.vert | 16 +++
+ src/glsl/convolution.frag | 21 +++
+ src/glsl/simplex-noise.glsl | 279 ++++++++++++++++++++++++++++++++++++++++
+ src/glsl/skinning.vert | 24 ++++
+ src/perf/glslstateschange1.frag | 19 +++
+ src/perf/glslstateschange1.vert | 14 ++
+ src/perf/glslstateschange2.frag | 17 +++
+ src/perf/glslstateschange2.vert | 14 ++
+ src/vpglsl/infinite-loop.glsl | 8 ++
13 files changed, 501 insertions(+)
create mode 100644 src/fpglsl/depth-read.glsl
create mode 100644 src/fpglsl/infinite-loop.glsl
@@ -619,5 +620,5 @@ index 0000000..bc7ae4b
+ gl_FrontColor = sum;
+}
--
-1.7.9.5
+2.0.0
diff --git a/meta/recipes-graphics/mesa/mesa-demos/glut.patch b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
index 84b6d4f7f3..c96af12acf 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/glut.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
@@ -1,13 +1,18 @@
-Correctly implement with AC_WITH(glut) so that --without-glut works.
+From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 9 Jul 2014 14:30:33 +0200
+Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
+ --without-glut works.
-Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57013]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ configure.ac | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
-Index: mesa-demos-8.0.1/configure.ac
-===================================================================
---- mesa-demos-8.0.1.orig/configure.ac 2010-07-13 19:52:41.000000000 +0100
-+++ mesa-demos-8.0.1/configure.ac 2012-11-12 12:49:54.940054571 +0000
-@@ -65,21 +65,25 @@
+diff --git a/configure.ac b/configure.ac
+index c4ee12b..9445424 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
dnl Check for GLUT
@@ -42,5 +47,8 @@ Index: mesa-demos-8.0.1/configure.ac
+ glut_enabled=yes
+])
- GLEW_CFLAGS=""
- GLEW_LIBS="-lGLEW"
+ dnl Check for FreeGLUT 2.6 or later
+ AC_EGREP_HEADER([glutInitContextProfile],
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
new file mode 100644
index 0000000000..4b07193a7f
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -0,0 +1,424 @@
+From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 9 Jul 2014 14:23:41 +0200
+Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
+ GLU
+
+* in some systems without X11 support we don't have GLEW, but
+ mesa-demos are still useful
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 49 ++++++++++++++++++++---------
+ src/Makefile.am | 14 ++++++---
+ src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
+ src/egl/Makefile.am | 8 +++--
+ src/egl/opengles1/Makefile.am | 44 +++++++++++++++-----------
+ src/egl/opengles2/Makefile.am | 33 ++++++++++---------
+ 6 files changed, 135 insertions(+), 86 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9445424..bc4c8d1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
+ [AC_DEFINE(HAVE_FREEGLUT)],
+ [])
+
+-dnl Check for GLEW
+-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
+-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
+-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
++AC_ARG_ENABLE([glew],
++ [AS_HELP_STRING([--enable-glew],
++ [build demos which require glew @<:@default=yes@:>@])],
++ [enable_glew="$enableval"],
++ [enable_glew=yes]
++)
++
++if test "x$enable_glew" = xyes; then
++ dnl Check for GLEW
++ PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4], [glew_enabled=yes], [glew_enabled=no])
++ DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
++ DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
++fi
+
+ # LIBS was set by AC_CHECK_LIB above
+ LIBS=""
+
+-PKG_CHECK_MODULES(GLU, [glu], [],
+- [AC_CHECK_HEADER([GL/glu.h],
+- [],
+- AC_MSG_ERROR([GLU not found]))
+- AC_CHECK_LIB([GLU],
+- [gluBeginCurve],
+- [GLU_LIBS=-lGLU],
+- AC_MSG_ERROR([GLU required])) ])
++AC_ARG_ENABLE([glu],
++ [AS_HELP_STRING([--enable-glu],
++ [build demos which require glu @<:@default=yes@:>@])],
++ [enable_glu="$enableval"],
++ [enable_glu=yes]
++)
+
+-DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
+-DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
++if test "x$enable_glu" = xyes; then
++ PKG_CHECK_MODULES(GLU, [glu], [],
++ [AC_CHECK_HEADER([GL/glu.h],
++ [],
++ AC_MSG_ERROR([GLU not found]))
++ AC_CHECK_LIB([GLU],
++ [gluBeginCurve],
++ [GLU_LIBS=-lGLU
++ glu_enabled=yes],
++ AC_MSG_ERROR([GLU required])) ])
++
++ DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
++ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
++fi
+
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+@@ -304,6 +323,8 @@ AC_SUBST([WAYLAND_CFLAGS])
+ AC_SUBST([WAYLAND_LIBS])
+
+
++AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1647d64..754c47c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -23,14 +23,18 @@
+ # Eric Anholt <eric@anholt.net>
+
++if HAVE_GLEW
++UTIL = util
++endif
++
+ SUBDIRS = \
+- util \
++ $(UTIL) \
+ data \
+ demos \
+ egl \
+ fp \
+ fpglsl \
+ glsl \
+- gs \
++ gs \
+ objviewer \
+ osdemos \
+ perf \
+@@ -40,8 +39,12 @@ SUBDIRS = \
+ slang \
+ tests \
+ tools \
+- trivial \
+- vp \
+- vpglsl \
+ wgl \
+ xdemos
++
++if HAVE_GLEW
++SUBDIRS += \
++ vp \
++ vpglsl \
++ trivial
++endif
+diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am
+index 41603fa..ab1e3ab 100644
+--- a/src/demos/Makefile.am
++++ b/src/demos/Makefile.am
+@@ -30,91 +30,100 @@ AM_LDFLAGS = \
+ $(DEMO_LIBS) \
+ $(GLUT_LIBS)
+
++bin_PROGRAMS =
++
+ if HAVE_GLUT
+-bin_PROGRAMS = \
++if HAVE_GLEW
++bin_PROGRAMS += \
+ arbfplight \
+ arbfslight \
+ arbocclude \
+ arbocclude2 \
+- bounce \
+- clearspd \
+ copypix \
+ cubemap \
+ cuberender \
+ dinoshade \
+- dissolve \
+- drawpix \
+ engine \
+ fbo_firecube \
+ fbotexture \
+- fire \
+ fogcoord \
+ fplight \
+ fslight \
++ gloss \
++ isosurf \
++ multiarb \
++ paltex \
++ pointblast \
++ projtex \
++ shadowtex \
++ spriteblast \
++ stex3d \
++ textures \
++ vao_demo \
++ winpos
++
++copypix_LDADD = ../util/libutil.la
++cubemap_LDADD = ../util/libutil.la
++cuberender_LDADD = ../util/libutil.la
++engine_LDADD = ../util/libutil.la
++fbo_firecube_LDADD = ../util/libutil.la
++gloss_LDADD = ../util/libutil.la
++isosurf_LDADD = ../util/libutil.la
++multiarb_LDADD = ../util/libutil.la
++projtex_LDADD = ../util/libutil.la
++textures_LDADD = ../util/libutil.la
++winpos_LDADD = ../util/libutil.la
++endif
++
++if HAVE_GLU
++bin_PROGRAMS += \
++ bounce \
++ clearspd \
++ dissolve \
++ drawpix \
++ fire \
+ gamma \
+ gearbox \
+ gears \
+ geartrain \
+ glinfo \
+- gloss \
+ gltestperf \
+ ipers \
+- isosurf \
+ lodbias \
+ morph3d \
+- multiarb \
+- paltex \
+ pixeltest \
+- pointblast \
+- projtex \
+ ray \
+ readpix \
+ reflect \
+ renormal \
+- shadowtex \
+ singlebuffer \
+ spectex \
+- spriteblast \
+- stex3d \
+ teapot \
+ terrain \
+ tessdemo \
+ texcyl \
+ texenv \
+- textures \
+ trispd \
+ tunnel2 \
+- tunnel \
+- vao_demo \
+- winpos
+-endif
++ tunnel
+
+ tunnel_SOURCES = \
+ tunnel.c \
+ tunneldat.h
+
+-copypix_LDADD = ../util/libutil.la
+-cubemap_LDADD = ../util/libutil.la
+-cuberender_LDADD = ../util/libutil.la
+-drawpix_LDADD = ../util/libutil.la
+ dissolve_LDADD = ../util/libutil.la
+-engine_LDADD = ../util/libutil.la
+-fbo_firecube_LDADD = ../util/libutil.la
++drawpix_LDADD = ../util/libutil.la
+ fire_LDADD = ../util/libutil.la
+-gloss_LDADD = ../util/libutil.la
+ ipers_LDADD = ../util/libutil.la
+-isosurf_LDADD = ../util/libutil.la
+ lodbias_LDADD = ../util/libutil.la
+-multiarb_LDADD = ../util/libutil.la
+-projtex_LDADD = ../util/libutil.la
+ readpix_LDADD = ../util/libutil.la
+ reflect_LDADD = ../util/libutil.la
+ teapot_LDADD = ../util/libutil.la
+ texcyl_LDADD = ../util/libutil.la
+-textures_LDADD = ../util/libutil.la
+ tunnel_LDADD = ../util/libutil.la
+ tunnel2_LDADD = ../util/libutil.la
+-winpos_LDADD = ../util/libutil.la
++endif
++endif
+
+ EXTRA_DIST = \
+ README
+diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
+index d64a49e..4fe1ca8 100644
+--- a/src/egl/Makefile.am
++++ b/src/egl/Makefile.am
+@@ -24,8 +24,12 @@
+
+ SUBDIRS = \
+ eglut \
+- opengl \
+- openvg \
+ opengles1 \
+ opengles2 \
+ oes_vg
++
++if HAVE_GLU
++SUBDIRS += \
++ opengl \
++ openvg
++endif
+diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
+index 7a9828d..3455e75 100644
+--- a/src/egl/opengles1/Makefile.am
++++ b/src/egl/opengles1/Makefile.am
+@@ -36,28 +36,43 @@ AM_LDFLAGS = \
+ $(EGL_LIBS) \
+ -lm
+
++noinst_PROGRAMS =
++
+ if HAVE_EGL
+ if HAVE_GLESV1
+-noinst_PROGRAMS = \
+- bindtex \
+- clear \
++noinst_PROGRAMS += \
+ drawtex_screen \
++ gears_screen \
++ torus_screen \
++ tri_screen
++
++drawtex_screen_SOURCES = drawtex.c
++gears_screen_SOURCES = gears.c
++torus_screen_SOURCES = torus.c
++tri_screen_SOURCES = tri.c
++
++drawtex_screen_LDADD = ../eglut/libeglut_screen.la
++gears_screen_LDADD = ../eglut/libeglut_screen.la
++torus_screen_LDADD = ../eglut/libeglut_screen.la
++tri_screen_LDADD = ../eglut/libeglut_screen.la
++
++if HAVE_X11
++noinst_PROGRAMS += \
++ clear
++
++bin_PROGRAMS = \
++ bindtex \
+ drawtex_x11 \
+ eglfbdev \
+ es1_info \
+- gears_screen \
+ gears_x11 \
+ msaa \
+ pbuffer\
+ render_tex \
+ texture_from_pixmap \
+- torus_screen \
+ torus_x11 \
+- tri_screen \
+ tri_x11 \
+ two_win
+-endif
+-endif
+
+ bindtex_LDADD = $(X11_LIBS)
+ es1_info_LDADD = $(X11_LIBS)
+@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS)
+ clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
+ clear_LDFLAGS =
+
+-drawtex_screen_SOURCES = drawtex.c
+-gears_screen_SOURCES = gears.c
+-torus_screen_SOURCES = torus.c
+-tri_screen_SOURCES = tri.c
+-
+ drawtex_x11_SOURCES = drawtex.c
+ gears_x11_SOURCES = gears.c
+ torus_x11_SOURCES = torus.c
+ tri_x11_SOURCES = tri.c
+
+-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
+-gears_screen_LDADD = ../eglut/libeglut_screen.la
+-torus_screen_LDADD = ../eglut/libeglut_screen.la
+-tri_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ drawtex_x11_LDADD = ../eglut/libeglut_x11.la
+ gears_x11_LDADD = ../eglut/libeglut_x11.la
+ torus_x11_LDADD = ../eglut/libeglut_x11.la
+ tri_x11_LDADD = ../eglut/libeglut_x11.la
++endif
++endif
++endif
+diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
+index 41c1b80..74af460 100644
+--- a/src/egl/opengles2/Makefile.am
++++ b/src/egl/opengles2/Makefile.am
+@@ -36,26 +36,29 @@ AM_LDFLAGS = \
+ if HAVE_EGL
+ if HAVE_GLESV2
+ bin_PROGRAMS = \
+- es2_info \
+- es2gears_screen \
+- es2gears_x11 \
+- es2tri
++ es2gears_screen
++
++es2gears_screen_SOURCES = es2gears.c
++es2gears_screen_LDADD = ../eglut/libeglut_screen.la
++
+ if HAVE_WAYLAND
+ bin_PROGRAMS += es2gears_wayland
+-endif
+-endif
+-endif
+
+-es2_info_LDADD = $(X11_LIBS)
+-es2tri_LDADD = $(X11_LIBS)
++es2gears_wayland_SOURCES = es2gears.c
++es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
++endif
+
+-es2gears_screen_SOURCES = es2gears.c
++if HAVE_X11
++bin_PROGRAMS += \
++ es2tri \
++ es2_info \
++ es2gears_x11
+
++es2_info_LDADD = $(X11_LIBS)
+ es2gears_x11_SOURCES = es2gears.c
+-
+-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ es2gears_x11_LDADD = ../eglut/libeglut_x11.la
++es2tri_LDADD = $(X11_LIBS)
++endif
++endif
++endif
+
+-es2gears_wayland_SOURCES = es2gears.c
+-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
index c89f87891b..f77b97f3e5 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
@@ -1,24 +1,24 @@
-From bc7fa67d13e8032601df5cf04e15c53a7204dcd7 Mon Sep 17 00:00:00 2001
+From 5e10108d76a59abac21c7e540bcfd2ddaccca2cb Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Fri, 9 May 2014 11:50:24 -0400
-Subject: [PATCH] mesa-demos: Use DEMOS_DATA_DIR to locate data files
+Subject: [PATCH 4/9] Use DEMOS_DATA_DIR to locate data files
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=78496]
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
- src/glsl/bezier.c | 2 +-
- src/glsl/blinking-teapot.c | 4 ++--
- src/glsl/brick.c | 4 ++--
- src/glsl/bump.c | 6 +++---
- src/glsl/convolutions.c | 2 +-
- src/glsl/mandelbrot.c | 4 ++--
- src/glsl/multitex.c | 4 ++--
- src/glsl/simplex-noise.c | 2 +-
- src/glsl/skinning.c | 4 ++--
- src/glsl/texdemo1.c | 8 ++++----
- src/glsl/toyball.c | 4 ++--
- src/objviewer/objview.c | 12 ++++++------
- src/perf/glslstateschange.c | 8 ++++----
+ src/glsl/bezier.c | 2 +-
+ src/glsl/blinking-teapot.c | 4 ++--
+ src/glsl/brick.c | 4 ++--
+ src/glsl/bump.c | 6 +++---
+ src/glsl/convolutions.c | 2 +-
+ src/glsl/mandelbrot.c | 4 ++--
+ src/glsl/multitex.c | 4 ++--
+ src/glsl/simplex-noise.c | 2 +-
+ src/glsl/skinning.c | 4 ++--
+ src/glsl/texdemo1.c | 8 ++++----
+ src/glsl/toyball.c | 4 ++--
+ src/objviewer/objview.c | 12 ++++++------
+ src/perf/glslstateschange.c | 8 ++++----
13 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c
@@ -230,5 +230,5 @@ index 7422b78..dbf8332 100644
{ "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 },
{ "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 },
--
-1.7.9.5
+2.0.0
diff --git a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch b/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
index 46a3e98cfe..aac2a37294 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
@@ -1,11 +1,11 @@
-From ab76f645e29b0a603ff95d88f976bc35ab6301ee Mon Sep 17 00:00:00 2001
+From 453353a221de9c64479f4372565d2cd8591b36cc Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Fri, 29 Jun 2012 11:26:04 +0100
-Subject: [PATCH 1/2] mesa-demos: Fix build when EGL_MESA_screen_surface
- extension isn't present
+Subject: [PATCH 5/9] Fix build when EGL_MESA_screen_surface extension isn't
+ present
-The EGL demos won't build against EGL implementations that don't support
-the EGL_MESA_screen_surface extension. Fix this, in most cases, by
+The EGL demos won't build against EGL implementations that don't support
+the EGL_MESA_screen_surface extension. Fix this, in most cases, by
wrapping relevant bits of code in #ifdef EGL_MESA_screen_surface.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
@@ -15,12 +15,19 @@ Applied and fixed up in Yocto by...
Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Upstream-Status: Pending
+---
+ src/egl/eglut/eglut.c | 9 +++++++--
+ src/egl/eglut/eglut_screen.c | 14 ++++++++++++++
+ src/egl/opengl/demo1.c | 2 ++
+ src/egl/opengl/demo2.c | 7 ++++++-
+ src/egl/opengl/demo3.c | 7 ++++++-
+ 5 files changed, 35 insertions(+), 4 deletions(-)
-Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/eglut/eglut.c
-+++ mesa-demos-8.0.1/src/egl/eglut/eglut.c
-@@ -51,8 +51,9 @@ _eglutNow(void)
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index 2ee6f15..f6a2ad4 100644
+--- a/src/egl/eglut/eglut.c
++++ b/src/egl/eglut/eglut.c
+@@ -76,8 +76,9 @@ _eglutNow(void)
static void
_eglutDestroyWindow(struct eglut_window *win)
{
@@ -32,7 +39,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
eglDestroySurface(_eglut->dpy, win->surface);
_eglutNativeFiniWindow(win);
-@@ -150,7 +151,9 @@ _eglutCreateWindow(const char *title, in
+@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
win->config, win->native.u.pixmap, NULL);
break;
case EGL_PBUFFER_BIT:
@@ -42,7 +49,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
win->surface = win->native.u.surface;
break;
default:
-@@ -264,8 +267,10 @@ eglutDestroyWindow(int win)
+@@ -289,8 +292,10 @@ eglutDestroyWindow(int win)
if (window->index != win)
return;
@@ -53,11 +60,11 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
_eglutDestroyWindow(_eglut->current);
-Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/eglut/eglut_screen.c
-+++ mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
-@@ -10,26 +10,33 @@
+diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
+index 021a8f1..094a4e2 100644
+--- a/src/egl/eglut/eglut_screen.c
++++ b/src/egl/eglut/eglut_screen.c
+@@ -35,26 +35,33 @@
#define MAX_MODES 100
@@ -91,7 +98,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
static void
init_kms(void)
{
-@@ -69,19 +76,23 @@ init_kms(void)
+@@ -94,19 +101,23 @@ init_kms(void)
kms_width = width;
kms_height = height;
}
@@ -115,7 +122,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
init_kms();
i = 0;
-@@ -103,14 +114,17 @@ _eglutNativeInitWindow(struct eglut_wind
+@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title,
win->native.width = kms_width;
win->native.height = kms_height;
@@ -133,10 +140,10 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
}
void
-Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo1.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo1.c
+diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
+index d892734..3a3564c 100644
+--- a/src/egl/opengl/demo1.c
++++ b/src/egl/opengl/demo1.c
@@ -18,6 +18,7 @@
static void
TestScreens(EGLDisplay dpy)
@@ -153,10 +160,10 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
}
/**
-Index: mesa-demos-8.0.1/src/egl/opengl/demo2.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo2.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo2.c
+diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
+index 505b474..bfef59e 100644
+--- a/src/egl/opengl/demo2.c
++++ b/src/egl/opengl/demo2.c
@@ -16,6 +16,7 @@
/*#define FRONTBUFFER*/
@@ -204,10 +211,10 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo2.c
return 0;
}
-Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo3.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo3.c
+diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c
+index f84ca23..31b5d8b 100644
+--- a/src/egl/opengl/demo3.c
++++ b/src/egl/opengl/demo3.c
@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = {
0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
};
@@ -217,7 +224,7 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
static void Init(void)
{
-@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GL
+@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
fclose(f);
}
}
@@ -255,3 +262,6 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
return 0;
}
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch b/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
index 795370819b..12e0805f15 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
@@ -1,11 +1,11 @@
-From cf90a5c0c173d017a80cde057da57c365b3b1a40 Mon Sep 17 00:00:00 2001
+From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Fri, 29 Jun 2012 12:00:26 +0100
-Subject: [PATCH 2/2] mesa-demos: Query display for EGL_MESA_screen_surface
- extension before using it
+Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension
+ before using it
-This code makes heavy use of the EGL_MESA_screen_surface extension so
-check the display to determine if it's supported by the underlying EGL
+This code makes heavy use of the EGL_MESA_screen_surface extension so
+check the display to determine if it's supported by the underlying EGL
implementation. If it doesn't then bail.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
@@ -15,11 +15,14 @@ Applied and fixed up in Yocto by...
Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Upstream-Status: Pending
+---
+ src/egl/opengl/demo1.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
-Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo1.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo1.c
+diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
+index 3a3564c..06e2138 100644
+--- a/src/egl/opengl/demo1.c
++++ b/src/egl/opengl/demo1.c
@@ -110,6 +110,12 @@ main(int argc, char *argv[])
printf("EGL version = %d.%d\n", maj, min);
printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
@@ -33,3 +36,6 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
eglGetConfigs(d, NULL, 0, &numConfigs);
configs = malloc(sizeof(*configs) *numConfigs);
eglGetConfigs(d, configs, numConfigs, &numConfigs);
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
new file mode 100644
index 0000000000..89d2fac4fd
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
@@ -0,0 +1,74 @@
+From d930b2da57f7c9efb80c8cef8f8adad15bbbc0d3 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 10 Jul 2014 14:30:52 +0200
+Subject: [PATCH 7/9] Install few more test programs
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/egl/opengl/Makefile.am | 2 +-
+ src/egl/opengles1/Makefile.am | 10 ++++------
+ src/egl/openvg/Makefile.am | 2 +-
+ 3 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
+index 0c7228f..87b2f1a 100644
+--- a/src/egl/opengl/Makefile.am
++++ b/src/egl/opengl/Makefile.am
+@@ -50,7 +50,7 @@ endif
+ endif
+
+ if HAVE_EGL
+-noinst_PROGRAMS = \
++bin_PROGRAMS = \
+ demo1 \
+ demo2 \
+ demo3 \
+diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
+index 3455e75..516e516 100644
+--- a/src/egl/opengles1/Makefile.am
++++ b/src/egl/opengles1/Makefile.am
+@@ -36,11 +36,11 @@ AM_LDFLAGS = \
+ $(EGL_LIBS) \
+ -lm
+
+-noinst_PROGRAMS =
++bin_PROGRAMS =
+
+ if HAVE_EGL
+ if HAVE_GLESV1
+-noinst_PROGRAMS += \
++bin_PROGRAMS += \
+ drawtex_screen \
+ gears_screen \
+ torus_screen \
+@@ -57,10 +57,8 @@ torus_screen_LDADD = ../eglut/libeglut_screen.la
+ tri_screen_LDADD = ../eglut/libeglut_screen.la
+
+ if HAVE_X11
+-noinst_PROGRAMS += \
+- clear
+-
+-bin_PROGRAMS = \
++bin_PROGRAMS += \
++ clear \
+ bindtex \
+ drawtex_x11 \
+ eglfbdev \
+diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
+index 7318a43..b545225 100644
+--- a/src/egl/openvg/Makefile.am
++++ b/src/egl/openvg/Makefile.am
+@@ -49,7 +49,7 @@ endif
+
+ if HAVE_EGL
+ if HAVE_VG
+-noinst_PROGRAMS = \
++bin_PROGRAMS = \
+ lion_screen \
+ sp_screen \
+ $(EGL_X11_DEMOS)
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
new file mode 100644
index 0000000000..a6085754d2
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
@@ -0,0 +1,101 @@
+From 0b6f95f9b8ece22e9856c150e4be29fd86eaf546 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 10 Jul 2014 14:29:27 +0200
+Subject: [PATCH 8/9] glsl, perf: Add few missing .glsl, .vert, .frag files to
+ EXTRA_DATA
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/fpglsl/Makefile.am | 2 ++
+ src/glsl/Makefile.am | 10 ++++++++--
+ src/perf/Makefile.am | 6 ++++++
+ src/vpglsl/Makefile.am | 1 +
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
+index 47c1039..fd43c91 100644
+--- a/src/fpglsl/Makefile.am
++++ b/src/fpglsl/Makefile.am
+@@ -39,10 +39,12 @@ noinst_PROGRAMS = \
+ endif
+
+ EXTRA_DIST = \
++ depth-read.glsl \
+ dowhile2.glsl \
+ dowhile.glsl \
+ forbreak.glsl \
+ for.glsl \
++ infinite-loop.glsl \
+ mov.glsl \
+ mov-imm.glsl \
+ simpleif.glsl \
+diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
+index 4faa8db..079a29d 100644
+--- a/src/glsl/Makefile.am
++++ b/src/glsl/Makefile.am
+@@ -37,7 +37,7 @@ AM_LDFLAGS = \
+ if HAVE_GLUT
+ bin_PROGRAMS = \
+ array \
+- bezier \
++ bezier \
+ bitmap \
+ brick \
+ bump \
+@@ -123,12 +123,16 @@ EXTRA_DIST = \
+ CH06-brick.vert \
+ CH11-bumpmap.frag \
+ CH11-bumpmap.vert \
++ CH11-bumpmaptex.frag \
+ CH11-toyball.frag \
+ CH11-toyball.vert \
+ CH18-mandel.frag \
+ CH18-mandel.vert \
+- bezier.geom \
++ bezier.geom \
+ brick.shtest \
++ blinking-teapot.frag \
++ blinking-teapot.vert \
++ convolution.frag \
+ convolution.vert \
+ cubemap.frag \
+ mandelbrot.shtest \
+@@ -138,5 +142,7 @@ EXTRA_DIST = \
+ reflect.vert \
+ shadowtex.frag \
+ simple.vert \
++ simplex-noise.glsl \
+ skinning.frag \
++ skinning.vert \
+ toyball.shtest
+diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
+index 5363c58..c5cca8d 100644
+--- a/src/perf/Makefile.am
++++ b/src/perf/Makefile.am
+@@ -57,3 +57,9 @@ bin_PROGRAMS = \
+ endif
+
+ glslstateschange_LDADD = libperf.la ../util/libutil.la
++
++EXTRA_DIST = \
++ glslstateschange1.frag \
++ glslstateschange1.vert \
++ glslstateschange2.frag \
++ glslstateschange2.vert
+diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
+index 4a85ed4..48b08f4 100644
+--- a/src/vpglsl/Makefile.am
++++ b/src/vpglsl/Makefile.am
+@@ -44,6 +44,7 @@ EXTRA_DIST = \
+ func2.glsl \
+ ifelse.glsl \
+ if.glsl \
++ infinite-loop.glsl \
+ mov.glsl \
+ nestedifs.glsl \
+ nestedswizzle.glsl \
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
new file mode 100644
index 0000000000..1262dee237
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
@@ -0,0 +1,73 @@
+From c8c3de5417d6b6c7d7579c528c0cab718f4bfdb6 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 10 Jul 2014 14:48:12 +0200
+Subject: [PATCH 9/9] glsl, perf: Install .glsl, .vert, .frag files
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/fpglsl/Makefile.am | 3 ++-
+ src/glsl/Makefile.am | 3 ++-
+ src/perf/Makefile.am | 3 ++-
+ src/vpglsl/Makefile.am | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
+index fd43c91..2bf51de 100644
+--- a/src/fpglsl/Makefile.am
++++ b/src/fpglsl/Makefile.am
+@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
+ fp-tri
+ endif
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ depth-read.glsl \
+ dowhile2.glsl \
+ dowhile.glsl \
+diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
+index 079a29d..f66ec29 100644
+--- a/src/glsl/Makefile.am
++++ b/src/glsl/Makefile.am
+@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la
+ vert_tex_LDADD = ../util/libutil.la
+ vsraytrace_LDADD = ../util/libutil.la
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ CH06-brick.frag \
+ CH06-brick.vert \
+ CH11-bumpmap.frag \
+diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
+index c5cca8d..140256d 100644
+--- a/src/perf/Makefile.am
++++ b/src/perf/Makefile.am
+@@ -58,7 +58,8 @@ endif
+
+ glslstateschange_LDADD = libperf.la ../util/libutil.la
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ glslstateschange1.frag \
+ glslstateschange1.vert \
+ glslstateschange2.frag \
+diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
+index 48b08f4..5526867 100644
+--- a/src/vpglsl/Makefile.am
++++ b/src/vpglsl/Makefile.am
+@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
+ vp-tris
+ endif
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ for.glsl \
+ func.glsl \
+ func2.glsl \
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index f95b0a33a0..1caa50bc1b 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -9,22 +9,24 @@ LICENSE = "MIT & PD"
LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
-DEPENDS = "virtual/libgl glew"
-
SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
- file://glut.patch \
- file://egl-mesa-screen-surface-build-fix.patch \
- file://egl-mesa-screen-surface-query.patch \
- file://0001-mesa-demos-Add-missing-data-files.patch \
- file://0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch"
-
-SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542"
-SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828"
+ file://0001-mesa-demos-Add-missing-data-files.patch \
+ file://0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch \
+ file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
+ file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
+ file://0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch \
+ file://0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch \
+ file://0007-Install-few-more-test-programs.patch \
+ file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
+ file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
+"
+SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
+SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
inherit autotools pkgconfig
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 glu \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew', '', d)}"
# The Wayland code doesn't work with Wayland 1.0, so disable it for now
#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
@@ -42,12 +44,10 @@ PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg"
PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
+PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
+PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
-do_install_append () {
- install -m 0644 ${S}/src/perf/*.frag \
- ${S}/src/perf/*.vert \
- ${S}/src/glsl/*.frag \
- ${S}/src/glsl/*.vert \
- ${S}/src/glsl/*.geom \
- ${S}/src/glsl/*.glsl ${D}${datadir}/${BPN}
+do_install_append() {
+ # it can be completely empty when all PACKAGECONFIG options are disabled
+ rmdir --ignore-fail-on-non-empty ${D}${bindir}
}
diff --git a/meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb b/meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb
index 2acc21dce5..2acc21dce5 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 3298e00ebe..cb1837ac51 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -65,6 +65,7 @@ MESA_LLVM_RELEASE ?= "3.3"
PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --with-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
+PACKAGECONFIG[xa] = "--enable-xa, --disable-xa"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
@@ -87,6 +88,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libegl-gallium libgbm-gallium \
libopenvg libopenvg-dev \
libxvmcsoftpipe libxvmcsoftpipe-dev \
+ libxatracker libxatracker-dev \
mesa-megadriver \
"
@@ -143,7 +145,7 @@ python mesa_populate_packages() {
for p in dri_pkgs:
m = re.match('^(.*)_dri\.so$', p)
if m:
- pkg_name = " mesa-driver-%s" % legitimize_package_name(m.group(1))
+ pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
@@ -171,6 +173,7 @@ FILES_libegl-gallium = "${libdir}/egl/egl_gallium.so*"
FILES_libgbm-gallium = "${libdir}/gbm/gbm_gallium_drm.so*"
FILES_libopenvg = "${libdir}/libOpenVG.so.*"
FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*"
+FILES_libxatracker = "${libdir}/libxatracker.so.*"
FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
@@ -185,5 +188,8 @@ FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayl
FILES_libopenvg-dev = "${libdir}/libOpenVG.so ${libdir}/libOpenVG.la* \
${includedir}/VG ${libdir}/pkgconfig/vg.pc"
FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la"
+FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
+ ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
+ ${libdir}/pkgconfig/xatracker.pc"
FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/* ${libdir}/gbm/.debug/* ${libdir}/gallium-pipe/.debug"
diff --git a/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch b/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch
deleted file mode 100644
index 2df5e61d21..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From debac5531f7107d239530ff6e29eeda72b9ec1e9 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 29 Jun 2013 11:20:51 +0200
-Subject: [PATCH 2/4] pipe_loader_sw: include xlib_sw_winsys.h only when
- HAVE_PIPE_LOADER_XLIB
-
-* HAVE_WINSYS_XLIB was removed in
- commit b3f1f665b0fef178ae193e6b111f14c9a5ad3b25
- Author: Matt Turner <mattst88@gmail.com>
- Date: Sun Jan 20 15:32:08 2013 -0800
- build: Get rid of GALLIUM_WINSYS_DIRS
-
-* HAVE_PIPE_LOADER_XLIB is set correctly:
- if test "x$NEED_WINSYS_XLIB" = xyes; then
- GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
- GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la"
- fi
-
-* fixes build of pipe_loader_sw without libx11 headers available
-
-Upstream-Status: Submitted https://bugs.freedesktop.org/show_bug.cgi?id=66357
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-index c2b78c6..0da3f4d 100644
---- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-@@ -31,7 +31,9 @@
- #include "util/u_dl.h"
- #include "sw/null/null_sw_winsys.h"
- #include "target-helpers/inline_sw_helper.h"
-+#ifdef HAVE_PIPE_LOADER_XLIB
- #include "state_tracker/xlib_sw_winsys.h"
-+#endif
-
- struct pipe_loader_sw_device {
- struct pipe_loader_device base;
-@@ -44,7 +46,7 @@ struct pipe_loader_sw_device {
- static struct pipe_loader_ops pipe_loader_sw_ops;
-
- static struct sw_winsys *(*backends[])() = {
--#ifdef HAVE_WINSYS_XLIB
-+#ifdef HAVE_PIPE_LOADER_XLIB
- x11_sw_create,
- #endif
- null_sw_create
---
-1.8.2.1
-
diff --git a/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch b/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch
deleted file mode 100644
index 30a3d98758..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch
+++ /dev/null
@@ -1,362 +0,0 @@
-From 06c1ba29de8a26fffb73ee99f0fc54c704e9fee4 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniel@fooishbar.org>
-Date: Fri, 24 May 2013 17:20:27 +0100
-Subject: [PATCH 3/5] EGL: Mutate NativeDisplayType depending on config
-
-If we go through ./configure without enabling X11 anywhere, then set the
-fallback types for EGL NativeDisplay and friends, rather than assuming
-X11/Xlib.
-
-Upstream-Status: Backport (slightly different solution was applied in master
-https://bugs.freedesktop.org/show_bug.cgi?id=64959)
-
-Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 9 +++
- include/EGL/eglplatform.h | 146 -------------------------------------------
- include/EGL/eglplatform.h.in | 146 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 155 insertions(+), 146 deletions(-)
- delete mode 100644 include/EGL/eglplatform.h
- create mode 100644 include/EGL/eglplatform.h.in
-
-diff --git a/configure.ac b/configure.ac
-index 2b4a374..d4c7a95 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1565,12 +1565,20 @@ fi
-
- EGL_PLATFORMS="$egl_platforms"
-
-+if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
-+ MESA_EGL_NO_X11_HEADERS=0
-+else
-+ MESA_EGL_NO_X11_HEADERS=1
-+fi
-+
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_FBDEV, echo "$egl_platforms" | grep 'fbdev' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep 'null' >/dev/null 2>&1)
-
-+AC_SUBST([MESA_EGL_NO_X11_HEADERS])
-+
- AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
- AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x")
-
-@@ -2042,6 +2050,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
-
- dnl Substitute the config
- AC_CONFIG_FILES([Makefile
-+ include/EGL/eglplatform.h
- src/Makefile
- src/egl/Makefile
- src/egl/drivers/Makefile
-diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
-deleted file mode 100644
-index 17fdc61..0000000
---- a/include/EGL/eglplatform.h
-+++ /dev/null
-@@ -1,146 +0,0 @@
--#ifndef __eglplatform_h_
--#define __eglplatform_h_
--
--/*
--** Copyright (c) 2007-2009 The Khronos Group Inc.
--**
--** Permission is hereby granted, free of charge, to any person obtaining a
--** copy of this software and/or associated documentation files (the
--** "Materials"), to deal in the Materials without restriction, including
--** without limitation the rights to use, copy, modify, merge, publish,
--** distribute, sublicense, and/or sell copies of the Materials, and to
--** permit persons to whom the Materials are furnished to do so, subject to
--** the following conditions:
--**
--** The above copyright notice and this permission notice shall be included
--** in all copies or substantial portions of the Materials.
--**
--** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
--** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
--** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
--** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
--** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
--*/
--
--/* Platform-specific types and definitions for egl.h
-- * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
-- *
-- * Adopters may modify khrplatform.h and this file to suit their platform.
-- * You are encouraged to submit all modifications to the Khronos group so that
-- * they can be included in future versions of this file. Please submit changes
-- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
-- * by filing a bug against product "EGL" component "Registry".
-- */
--
--#include <KHR/khrplatform.h>
--
--/* Macros used in EGL function prototype declarations.
-- *
-- * EGL functions should be prototyped as:
-- *
-- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
-- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
-- *
-- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
-- */
--
--#ifndef EGLAPI
--#define EGLAPI KHRONOS_APICALL
--#endif
--
--#ifndef EGLAPIENTRY
--#define EGLAPIENTRY KHRONOS_APIENTRY
--#endif
--#define EGLAPIENTRYP EGLAPIENTRY*
--
--/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
-- * are aliases of window-system-dependent types, such as X Display * or
-- * Windows Device Context. They must be defined in platform-specific
-- * code below. The EGL-prefixed versions of Native*Type are the same
-- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
-- *
-- * Khronos STRONGLY RECOMMENDS that you use the default definitions
-- * provided below, since these changes affect both binary and source
-- * portability of applications using EGL running on different EGL
-- * implementations.
-- */
--
--#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
--#ifndef WIN32_LEAN_AND_MEAN
--#define WIN32_LEAN_AND_MEAN 1
--#endif
--#include <windows.h>
--
--typedef HDC EGLNativeDisplayType;
--typedef HBITMAP EGLNativePixmapType;
--typedef HWND EGLNativeWindowType;
--
--#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
--
--typedef int EGLNativeDisplayType;
--typedef void *EGLNativeWindowType;
--typedef void *EGLNativePixmapType;
--
--#elif defined(WL_EGL_PLATFORM)
--
--typedef struct wl_display *EGLNativeDisplayType;
--typedef struct wl_egl_pixmap *EGLNativePixmapType;
--typedef struct wl_egl_window *EGLNativeWindowType;
--
--#elif defined(__GBM__)
--
--typedef struct gbm_device *EGLNativeDisplayType;
--typedef struct gbm_bo *EGLNativePixmapType;
--typedef void *EGLNativeWindowType;
--
--#elif defined(ANDROID) /* Android */
--
--struct ANativeWindow;
--struct egl_native_pixmap_t;
--
--typedef struct ANativeWindow *EGLNativeWindowType;
--typedef struct egl_native_pixmap_t *EGLNativePixmapType;
--typedef void *EGLNativeDisplayType;
--
--#elif defined(__unix__)
--
--#ifdef MESA_EGL_NO_X11_HEADERS
--
--typedef void *EGLNativeDisplayType;
--typedef khronos_uint32_t EGLNativePixmapType;
--typedef khronos_uint32_t EGLNativeWindowType;
--
--#else
--
--/* X11 (tentative) */
--#include <X11/Xlib.h>
--#include <X11/Xutil.h>
--
--typedef Display *EGLNativeDisplayType;
--typedef Pixmap EGLNativePixmapType;
--typedef Window EGLNativeWindowType;
--
--#endif /* MESA_EGL_NO_X11_HEADERS */
--
--#else
--#error "Platform not recognized"
--#endif
--
--/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
--typedef EGLNativeDisplayType NativeDisplayType;
--typedef EGLNativePixmapType NativePixmapType;
--typedef EGLNativeWindowType NativeWindowType;
--
--
--/* Define EGLint. This must be a signed integral type large enough to contain
-- * all legal attribute names and values passed into and out of EGL, whether
-- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
-- * handle, or other. While in general a 32-bit integer will suffice, if
-- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
-- * integer type.
-- */
--typedef khronos_int32_t EGLint;
--
--#endif /* __eglplatform_h */
-diff --git a/include/EGL/eglplatform.h.in b/include/EGL/eglplatform.h.in
-new file mode 100644
-index 0000000..5126c92
---- /dev/null
-+++ b/include/EGL/eglplatform.h.in
-@@ -0,0 +1,146 @@
-+#ifndef __eglplatform_h_
-+#define __eglplatform_h_
-+
-+/*
-+** Copyright (c) 2007-2009 The Khronos Group Inc.
-+**
-+** Permission is hereby granted, free of charge, to any person obtaining a
-+** copy of this software and/or associated documentation files (the
-+** "Materials"), to deal in the Materials without restriction, including
-+** without limitation the rights to use, copy, modify, merge, publish,
-+** distribute, sublicense, and/or sell copies of the Materials, and to
-+** permit persons to whom the Materials are furnished to do so, subject to
-+** the following conditions:
-+**
-+** The above copyright notice and this permission notice shall be included
-+** in all copies or substantial portions of the Materials.
-+**
-+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-+*/
-+
-+/* Platform-specific types and definitions for egl.h
-+ * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
-+ *
-+ * Adopters may modify khrplatform.h and this file to suit their platform.
-+ * You are encouraged to submit all modifications to the Khronos group so that
-+ * they can be included in future versions of this file. Please submit changes
-+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
-+ * by filing a bug against product "EGL" component "Registry".
-+ */
-+
-+#include <KHR/khrplatform.h>
-+
-+/* Macros used in EGL function prototype declarations.
-+ *
-+ * EGL functions should be prototyped as:
-+ *
-+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
-+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
-+ *
-+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
-+ */
-+
-+#ifndef EGLAPI
-+#define EGLAPI KHRONOS_APICALL
-+#endif
-+
-+#ifndef EGLAPIENTRY
-+#define EGLAPIENTRY KHRONOS_APIENTRY
-+#endif
-+#define EGLAPIENTRYP EGLAPIENTRY*
-+
-+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
-+ * are aliases of window-system-dependent types, such as X Display * or
-+ * Windows Device Context. They must be defined in platform-specific
-+ * code below. The EGL-prefixed versions of Native*Type are the same
-+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
-+ *
-+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
-+ * provided below, since these changes affect both binary and source
-+ * portability of applications using EGL running on different EGL
-+ * implementations.
-+ */
-+
-+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-+#ifndef WIN32_LEAN_AND_MEAN
-+#define WIN32_LEAN_AND_MEAN 1
-+#endif
-+#include <windows.h>
-+
-+typedef HDC EGLNativeDisplayType;
-+typedef HBITMAP EGLNativePixmapType;
-+typedef HWND EGLNativeWindowType;
-+
-+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-+
-+typedef int EGLNativeDisplayType;
-+typedef void *EGLNativeWindowType;
-+typedef void *EGLNativePixmapType;
-+
-+#elif defined(WL_EGL_PLATFORM)
-+
-+typedef struct wl_display *EGLNativeDisplayType;
-+typedef struct wl_egl_pixmap *EGLNativePixmapType;
-+typedef struct wl_egl_window *EGLNativeWindowType;
-+
-+#elif defined(__GBM__)
-+
-+typedef struct gbm_device *EGLNativeDisplayType;
-+typedef struct gbm_bo *EGLNativePixmapType;
-+typedef void *EGLNativeWindowType;
-+
-+#elif defined(ANDROID) /* Android */
-+
-+struct ANativeWindow;
-+struct egl_native_pixmap_t;
-+
-+typedef struct ANativeWindow *EGLNativeWindowType;
-+typedef struct egl_native_pixmap_t *EGLNativePixmapType;
-+typedef void *EGLNativeDisplayType;
-+
-+#elif defined(__unix__)
-+
-+#if @MESA_EGL_NO_X11_HEADERS@
-+
-+typedef void *EGLNativeDisplayType;
-+typedef khronos_uint32_t EGLNativePixmapType;
-+typedef khronos_uint32_t EGLNativeWindowType;
-+
-+#else
-+
-+/* X11 (tentative) */
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+typedef Display *EGLNativeDisplayType;
-+typedef Pixmap EGLNativePixmapType;
-+typedef Window EGLNativeWindowType;
-+
-+#endif /* MESA_EGL_NO_X11_HEADERS */
-+
-+#else
-+#error "Platform not recognized"
-+#endif
-+
-+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-+typedef EGLNativeDisplayType NativeDisplayType;
-+typedef EGLNativePixmapType NativePixmapType;
-+typedef EGLNativeWindowType NativeWindowType;
-+
-+
-+/* Define EGLint. This must be a signed integral type large enough to contain
-+ * all legal attribute names and values passed into and out of EGL, whether
-+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
-+ * handle, or other. While in general a 32-bit integer will suffice, if
-+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
-+ * integer type.
-+ */
-+typedef khronos_int32_t EGLint;
-+
-+#endif /* __eglplatform_h */
---
-1.8.2.1
-
diff --git a/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch b/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch
deleted file mode 100644
index 88a4fb0636..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Fix out of tree compilation failure due to
-0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch.
-
-Upstream-Status: Inappropriate (upstream has different solution to root problem)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
-index 45f7dfa..ed0e777 100644
---- a/src/egl/drivers/dri2/Makefile.am
-+++ b/src/egl/drivers/dri2/Makefile.am
-@@ -21,6 +21,7 @@
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/egl/main \
- -I$(top_srcdir)/src/gbm/main \
- -I$(top_srcdir)/src/gbm/backends/dri \
-diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am
-index 6bf67ea..7b87047 100644
---- a/src/egl/drivers/glx/Makefile.am
-+++ b/src/egl/drivers/glx/Makefile.am
-@@ -21,6 +21,7 @@
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/egl/main \
- $(X11_CFLAGS) \
- $(DEFINES)
-diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
-index ca5257a..13a5734 100644
---- a/src/egl/main/Makefile.am
-+++ b/src/egl/main/Makefile.am
-@@ -27,6 +27,7 @@ endif
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/gbm/main \
- $(DEFINES) \
- $(EGL_CFLAGS) \
-@@ -135,4 +136,4 @@ egl_HEADERS = \
- $(top_srcdir)/include/EGL/eglext.h \
- $(top_srcdir)/include/EGL/egl.h \
- $(top_srcdir)/include/EGL/eglmesaext.h \
-- $(top_srcdir)/include/EGL/eglplatform.h
-+ $(top_builddir)/include/EGL/eglplatform.h
diff --git a/meta/recipes-graphics/mesa/mesa_10.1.3.bb b/meta/recipes-graphics/mesa/mesa_10.3.4.bb
index abc450a9c5..50092c9a5c 100644
--- a/meta/recipes-graphics/mesa/mesa_10.1.3.bb
+++ b/meta/recipes-graphics/mesa/mesa_10.3.4.bb
@@ -1,12 +1,9 @@
require ${BPN}.inc
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
- file://0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch \
- file://0006-fix-out-of-tree-egl.patch \
- "
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
-SRC_URI[md5sum] = "ba6dbe2b9cab0b4de840c996b9b6a3ad"
-SRC_URI[sha256sum] = "b2615e236ef25d0fb94b8420bdd2e2a520b7dd5ca2d4b93306154f7fd4adecc3"
+SRC_URI[md5sum] = "fa0558a3d02c2bb8c208c030ccdc992e"
+SRC_URI[sha256sum] = "e6373913142338d10515daf619d659433bfd2989988198930c13b0945a15e98a"
S = "${WORKDIR}/Mesa-${PV}"
diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb
index 59b0d1cdeb..b046ae2e65 100644
--- a/meta/recipes-graphics/mesa/mesa_git.bb
+++ b/meta/recipes-graphics/mesa/mesa_git.bb
@@ -2,16 +2,12 @@ require ${BPN}.inc
DEFAULT_PREFERENCE = "-1"
-LIC_FILES_CHKSUM = "file://docs/license.html;md5=f69a4626e9efc40fa0d3cc3b02c9eacf"
+LIC_FILES_CHKSUM = "file://docs/license.html;md5=6a23445982a7a972ac198e93cc1cb3de"
-PR = "${INC_PR}.0"
-SRCREV = "0028eb1083e6adc110a23a5f02c993cda217067a"
-PV = "10.1.3+git${SRCPV}"
+SRCREV = "c7b9a2e38a3e471562b50dab8be65db8ac6819f8"
+PV = "10.3.4+git${SRCPV}"
-SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa \
- file://0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch \
- file://0006-fix-out-of-tree-egl.patch \
- "
+SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;branch=10.4"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch b/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
index 3c8a832021..3c8a832021 100644
--- a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch
+++ b/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
diff --git a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch b/meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch
index 82c93dd604..82c93dd604 100644
--- a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch
+++ b/meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
index cb2aba0a5f..7540821c4e 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
@@ -13,11 +13,6 @@ PACKAGES = "\
${PN}-core \
"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-core = "task-core-clutter-core"
-RREPLACES_${PN}-core = "task-core-clutter-core"
-RCONFLICTS_${PN}-core = "task-core-clutter-core"
-
SUMMARY_${PN}-core = "Clutter graphics library"
RDEPENDS_${PN}-core = "\
clutter-1.0 \
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
index 7786133930..53dc0ae19e 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
@@ -1,6 +1,8 @@
SUMMARY = "DirectFB without X11"
LICENSE = "MIT"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
index a5d02ede8e..2eff3713bc 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
@@ -5,11 +5,6 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-x11-mini task-core-x11-base"
-RREPLACES_${PN} = "task-core-x11-mini task-core-x11-base"
-RCONFLICTS_${PN} = "task-core-x11-mini task-core-x11-base"
-
RDEPENDS_${PN} = "\
packagegroup-core-x11-xserver \
packagegroup-core-x11-utils \
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index d58f74384f..2d68e97383 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -6,10 +6,10 @@ SUMMARY = "X11 display server"
LICENSE = "MIT"
PR = "r40"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
+inherit packagegroup
+
XSERVER ?= "xserver-xorg xf86-video-fbdev xf86-input-evdev"
XSERVERCODECS ?= ""
@@ -17,8 +17,3 @@ RDEPENDS_${PN} = "\
${XSERVER} \
${XSERVERCODECS} \
"
-
-# Allow replacing task-x11-server in meta-oe
-RPROVIDES_${PN} = "task-x11-server task-xserver"
-RREPLACES_${PN} = "task-x11-server task-xserver"
-RCONFLICTS_${PN} = "task-x11-server task-xserver"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 1a51428eaf..fde5144b46 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -30,11 +30,3 @@ RDEPENDS_${PN}-utils = "\
xset \
xrandr \
"
-
-# Allow replacing task-x11* in meta-oe
-RPROVIDES_${PN} = "task-x11"
-RREPLACES_${PN} = "task-x11"
-RCONFLICTS_${PN} = "task-x11"
-RPROVIDES_${PN}-utils = "task-x11-utils"
-RREPLACES_${PN}-utils = "task-x11-utils"
-RCONFLICTS_${PN}-utils = "task-x11-utils"
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index c02d8c02d2..b59d33d14f 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -67,7 +67,7 @@ fi
# This binary needs to be compiled for the host architecture. This isn't pretty!
do_compile_prepend () {
if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
- make CC="${BUILD_CC}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
+ make CC="${BUILD_CC}" CFLAGS="" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
fi
}
@@ -90,8 +90,8 @@ FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug"
FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-FILES_${PN}-ptest += "${libexecdir}/pango/installed-tests/* \
+FILES_${PN}-ptest += "${libexecdir}/installed-tests/* \
${datadir}/installed-tests/pango"
-FILES_${PN}-dbg += "${libexecdir}/pango/installed-tests/.debug"
+FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
RDEPENDS_${PN}-ptest += "gnome-desktop-testing liberation-fonts"
diff --git a/meta/recipes-graphics/pango/pango_1.36.3.bb b/meta/recipes-graphics/pango/pango_1.36.8.bb
index 7782f92b89..4605c768a5 100644
--- a/meta/recipes-graphics/pango/pango_1.36.3.bb
+++ b/meta/recipes-graphics/pango/pango_1.36.8.bb
@@ -8,5 +8,5 @@ SRC_URI += "file://run-ptest \
file://multilib-fix-clean.patch \
"
-SRC_URI[archive.md5sum] = "d9532826e95bdb374355deebc42441bb"
-SRC_URI[archive.sha256sum] = "ad48e32917f94aa9d507486d44366e59355fcfd46ef86d119ddcba566ada5d22"
+SRC_URI[archive.md5sum] = "217a9a753006275215fa9fa127760ece"
+SRC_URI[archive.sha256sum] = "18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07"
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 7417cd5364..68ac7e7677 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -11,9 +11,11 @@ PV = "1.0+gitr${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS = "virtual/libx11 waffle virtual/libgl libglu python-mako-native python-numpy-native"
+DEPENDS = "virtual/libx11 libxrender waffle virtual/libgl libglu python-mako-native python-numpy-native"
-inherit cmake pythonnative
+inherit cmake pythonnative distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
# As piglit doesn't install, enforce in-tree builds so that we can easily copy
# contents out of $S and $B.
@@ -45,4 +47,7 @@ do_install() {
FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/"
-RDEPENDS_${PN} = "python waffle python-json python-subprocess python-multiprocessing python-textutils python-netserver python-shell mesa-demos"
+RDEPENDS_${PN} = "python waffle python-json python-subprocess \
+ python-multiprocessing python-textutils python-netserver python-shell \
+ mesa-demos bash \
+ "
diff --git a/meta/recipes-graphics/tslib/tslib_1.1.bb b/meta/recipes-graphics/tslib/tslib_1.1.bb
index 05d58b68d5..6d8c7dd7eb 100644
--- a/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.1.bb
@@ -32,8 +32,6 @@ do_install_append() {
install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
}
-SRC_URI_OVERRIDES_PACKAGE_ARCH = "0"
-
# People should consider using udev's /dev/input/touchscreen0 symlink
# instead of detect-stylus
#RDEPENDS_tslib-conf_weird-machine = "detect-stylus"
diff --git a/meta/recipes-graphics/wayland/libinput_0.7.0.bb b/meta/recipes-graphics/wayland/libinput_0.7.0.bb
new file mode 100644
index 0000000000..98d29426e6
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput_0.7.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=673e626420c7f859fbe2be3a9c13632d"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "381b61396de28c12716ef7a5475fea50"
+SRC_URI[sha256sum] = "129f485afe5e4a9394641293991c97cb99f5f3338340d0d65b704ff463d1579e"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-graphics/wayland/wayland_1.5.0.bb b/meta/recipes-graphics/wayland/wayland_1.6.0.bb
index b1ae59ef13..00713bff3f 100644
--- a/meta/recipes-graphics/wayland/wayland_1.5.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.6.0.bb
@@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \
file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c"
SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "1d882776b27329b91d2d500b6d66dd1d"
-SRC_URI[sha256sum] = "0069e1e9af888b3e05384380ad8cc6c976ea3e81d08ba19b7675ce1d693a41b5"
+SRC_URI[md5sum] = "d34c141c975084e4fb668e77b38f840e"
+SRC_URI[sha256sum] = "a7d5102dcf53d08c059d24bc62de491d7cd482070abeb6737a20d0d86ba6fc7f"
SRC_URI_append_class-native = " \
file://disable-macro-checks-not-used-for-scanner.patch \
"
@@ -23,7 +23,6 @@ inherit autotools pkgconfig
# We need wayland-native for the wayland-scanner utility
BBCLASSEXTEND = "native"
-DEPENDS_class-native = "expat-native libffi-native"
DEPENDS = "expat libffi wayland-native"
EXTRA_OECONF = "--disable-documentation --disable-scanner"
diff --git a/meta/recipes-graphics/wayland/weston_1.5.0.bb b/meta/recipes-graphics/wayland/weston_1.6.0.bb
index 4a8584f79a..d30e48bfa0 100644
--- a/meta/recipes-graphics/wayland/weston_1.5.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.6.0.bb
@@ -12,8 +12,8 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://make-lcms-explicitly-configurable.patch \
file://make-libwebp-explicitly-configurable.patch \
"
-SRC_URI[md5sum] = "8eb40d230efc2411f083c20656534780"
-SRC_URI[sha256sum] = "06388ba04ac79aa72d685cc1a8e646ddb2b8cfe11fcc742294f9addac48b7684"
+SRC_URI[md5sum] = "c60ce9dde99a089db0539d8f6b557827"
+SRC_URI[sha256sum] = "dc3ea5d13bbf025fabc006216c5ddc0d80d5f4ebe778912b8c4d1d4acaaa614d"
inherit autotools pkgconfig useradd
@@ -60,6 +60,8 @@ PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
# Weston with webp support
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+# Weston with libinput backend
+PACKAGECONFIG[libinput] = "--enable-libinput-backend,--disable-libinput-backend,libinput"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
@@ -77,7 +79,7 @@ do_install_append() {
PACKAGES += "${PN}-examples"
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${datadir}"
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libdir}/weston ${datadir}"
FILES_${PN}-examples = "${bindir}/*"
RDEPENDS_${PN} += "xkeyboard-config"
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
index 0a16ff5f83..b68d40e1be 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
@@ -47,6 +47,6 @@ do_install() {
RDEPENDS_${PN} = "${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
INITSCRIPT_NAME = "xserver-nodm"
-INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
SYSTEMD_SERVICE_${PN} = "xserver-nodm.service"
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index f6692a814b..ef6c11c3f2 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -4,8 +4,8 @@
# Provides: xserver
# Required-Start: $local_fs $remote_fs dbus
# Required-Stop: $local_fs $remote_fs
-# Default-Start: 2 5
-# Default-Stop: 0 1 6
+# Default-Start: 5
+# Default-Stop: 0 1 2 3 6
### END INIT INFO
killproc() { # kill the named process(es)
diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
index 65f74c21c5..31cf186767 100644
--- a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb
+++ b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
@@ -14,5 +14,5 @@ BBCLASSEXTEND = "native"
LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f"
-SRC_URI[md5sum] = "03de3f15db678e277f5ef9c013aca1ad"
-SRC_URI[sha256sum] = "244017992477ced2397a44fd0ddcfb0f1d9899128613f5c4db81471163b0b731"
+SRC_URI[md5sum] = "9bdd6ebfa62b1bbd474906ac86a40fd8"
+SRC_URI[sha256sum] = "8c6d5228af885477b9aec60ca6f172578e7d2de42234357af62fb00439453f20"
diff --git a/meta/recipes-graphics/xorg-app/rgb_1.0.5.bb b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
index 26d4f1b5ba..87268046e6 100644
--- a/meta/recipes-graphics/xorg-app/rgb_1.0.5.bb
+++ b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
@@ -9,9 +9,8 @@ format."
DEPENDS += " xproto util-macros"
LIC_FILES_CHKSUM = "file://COPYING;md5=ef598adbe241bd0b0b9113831f6e249a"
PE = "1"
-PR = "${INC_PR}.0"
-SRC_URI[md5sum] = "bcd820d967eaa51bd25b86c0ee682d4e"
-SRC_URI[sha256sum] = "8e936e648ffddce2e7184790efa15e4fa2bcb47f9da5469515d212c61bc8f857"
+SRC_URI[md5sum] = "eab5bbd7642e5c784429307ec210d198"
+SRC_URI[sha256sum] = "bbca7c6aa59939b9f6a0fb9fff15dfd62176420ffd4ae30c8d92a6a125fbe6b0"
FILES_${PN} += "${datadir}/X11"
diff --git a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb b/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
index 96ea030be1..84d0cb8044 100644
--- a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
+++ b/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
@@ -11,4 +11,4 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3ea51b365051ac32d1813a7dbaa4bfc6"
SRC_URI[md5sum] = "a3035dcecdbdb89e864177c080924981"
SRC_URI[sha256sum] = "975e98680cd59e1f9439016386609546ed08c284d0f05a95276f96aca6e8a521"
-DEPENDS += " virtual/libx11 libxau libxt libxext libxmu libxrender"
+DEPENDS += "libxau libxt libxext libxmu libxrender"
diff --git a/meta/recipes-graphics/xorg-app/xinit_1.3.3.bb b/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
index 583ea87eeb..93185188ee 100644
--- a/meta/recipes-graphics/xorg-app/xinit_1.3.3.bb
+++ b/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18f01e7b39807bebe2b8df101a039b68"
PE = "1"
-SRC_URI[md5sum] = "3b8da0e6237aee9828cc809c647510a7"
-SRC_URI[sha256sum] = "74b2878de6e3d5b5948f1562a77e7f53b4e10621e505ddb278050c7f3cae00af"
+SRC_URI[md5sum] = "4e928452dfaf73851413a2d8b8c76388"
+SRC_URI[sha256sum] = "75d88d7397a07e01db253163b7c7a00b249b3d30e99489f2734cac9a0c7902b3"
EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
diff --git a/meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb b/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
index 5c274b133e..efac0699c9 100644
--- a/meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb
+++ b/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
@@ -15,5 +15,5 @@ DEPENDS += "libxkbfile"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "a0fc1ac3fc4fe479ade09674347c5aa0"
-SRC_URI[sha256sum] = "91d0c9ab445d21dfe1892dbae5ae5264f39bae68223dd092ffc547c9450b5a2d"
+SRC_URI[md5sum] = "0012a8e3092cddf7f87b250f96bb38c5"
+SRC_URI[sha256sum] = "cfac973778fabf5216121ad60b7af8ab74ce7513af0f9260cf8c5309e1622b2a"
diff --git a/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch b/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch
deleted file mode 100644
index 40f81f0f74..0000000000
--- a/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 42f99a7a7b836f6f9704a7b1747eb722c93446ec Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date: Mon, 23 Apr 2012 14:28:39 +0000
-Subject: include config.h before stdio.h & other system headers
-
-Ensures definitions like _GNU_SOURCE are visible when needed.
-
-Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
----
-diff --git a/exec.c b/exec.c
-index dbcb669..419b10e 100644
---- a/exec.c
-+++ b/exec.c
-@@ -54,6 +54,10 @@ from The Open Group.
- * original xmodmap, written by David Rosenthal, of Sun Microsystems.
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
-diff --git a/pf.c b/pf.c
-index 0eb0f55..3f0c3f4 100644
---- a/pf.c
-+++ b/pf.c
-@@ -26,6 +26,10 @@ from The Open Group.
-
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
-diff --git a/xmodmap.c b/xmodmap.c
-index 58a8e70..0f89629 100644
---- a/xmodmap.c
-+++ b/xmodmap.c
-@@ -26,6 +26,10 @@ from The Open Group.
-
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
---
-cgit v0.9.0.2-2-gbebe
diff --git a/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb b/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
index 65a55e3560..87efb76022 100644
--- a/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
+++ b/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
@@ -13,7 +13,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=272c17e96370e1e74773fa22d9989621"
PE = "1"
-SRC_URI += "file://gnu-source.patch"
-
SRC_URI[md5sum] = "5511da3361eea4eaa21427652c559e1c"
SRC_URI[sha256sum] = "efe2e3c89858a2db3bdcf969f55f55d0af4f5007789198344de0595249a99fc3"
diff --git a/meta/recipes-graphics/xorg-app/xorg-app-common.inc b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
index 524a2d3077..59a04fa494 100644
--- a/meta/recipes-graphics/xorg-app/xorg-app-common.inc
+++ b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
@@ -5,12 +5,15 @@ SECTION = "x11/apps"
LICENSE = "MIT-X"
DEPENDS = "util-macros-native virtual/libx11"
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
INC_PR = "r8"
SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2"
S = "${WORKDIR}/${BPN}-${PV}"
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
FILES_${PN} += " ${libdir}/X11/${BPN} ${datadir}/X11/app-defaults/"
diff --git a/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb b/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
index efbb1b3f6c..d78bf0451c 100644
--- a/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
+++ b/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
@@ -10,7 +10,7 @@ formatting information."
LIC_FILES_CHKSUM = "file://COPYING;md5=e226ab8db88ac0bc0391673be40c9f91"
-DEPENDS += " libxmu virtual/libx11"
+DEPENDS += "libxmu"
PE = "1"
diff --git a/meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb b/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
index 84f01b02dd..41bd42069c 100644
--- a/meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb
+++ b/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
@@ -11,5 +11,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
DEPENDS += "libxrandr libxrender"
PE = "1"
-SRC_URI[md5sum] = "78fd973d9b532106f8777a3449176148"
-SRC_URI[sha256sum] = "b2e76ee92ff827f1c52ded7c666fe6f2704ca81cdeef882397da4e3e8ab490bc"
+SRC_URI[md5sum] = "441fdb98d2abc6051108b7075d948fc7"
+SRC_URI[sha256sum] = "7154ac3486b86923692f2d6cdb2991a2ee72bc32af2c4379a6f1c068f204be1b"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb
index 6cbe165d93..6d71ba8186 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb
@@ -14,7 +14,7 @@ xorg.conf for each input device that will use this driver. "
LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
-DEPENDS += "mtdev"
+DEPENDS += "mtdev libevdev"
-SRC_URI[md5sum] = "be7f91905c41bb3c3a0eb54063c7e4bf"
-SRC_URI[sha256sum] = "750461749a83bdee7771592aa5c0db5e267b18d847078a4b8622f55b04797eb3"
+SRC_URI[md5sum] = "8f73a98e32dccc9d054b54727cc4093f"
+SRC_URI[sha256sum] = "0ce30328adfeac90a6f4b508d992fb834d8e50b484b29d3d58cf6683fa8502f9"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
index aca958cf64..1f0b78a157 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
@@ -10,6 +10,6 @@ driver."
LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
-SRC_URI[md5sum] = "36b5b92000c4644f648b58a535e4ee73"
-SRC_URI[sha256sum] = "5d601e4bae53d5e9ead4ecd700f1beb5aeaf78b79e634c4aa381a9ce00276488"
+SRC_URI[md5sum] = "77085b649c5c0b333565ba562f573951"
+SRC_URI[sha256sum] = "3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch
new file mode 100644
index 0000000000..f36bb7579d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch
@@ -0,0 +1,60 @@
+From 96e60a4ea242d2decf109835981ae186cc36f642 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 29 Aug 2014 07:57:41 +1000
+Subject: Include xorg-server.h to fix build errors on newest glibc
+
+In file included from /usr/include/string.h:634:0,
+ from /usr/include/xorg/os.h:53,
+ from /usr/include/xorg/misc.h:115,
+ from /usr/include/xorg/xf86str.h:37,
+ from /usr/include/xorg/xf86Xinput.h:54,
+ from synproto.h:36,
+ from synproto.c:24:
+/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+
+See http://lists.freedesktop.org/archives/xorg-devel/2014-July/043070.html
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+Status: Backport
+
+Index: xf86-input-synaptics-1.8.0/src/eventcomm.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/eventcomm.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/eventcomm.h 2014-08-28 18:40:28.620070587 -0700
+@@ -27,6 +27,8 @@
+ #ifndef _EVENTCOMM_H_
+ #define _EVENTCOMM_H_
+
++#include <xorg-server.h>
++
+ #include <linux/input.h>
+ #include <linux/version.h>
+ #include <xf86Xinput.h>
+Index: xf86-input-synaptics-1.8.0/src/ps2comm.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/ps2comm.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/ps2comm.h 2014-08-28 18:40:28.620070587 -0700
+@@ -22,6 +22,8 @@
+ #ifndef _PS2COMM_H_
+ #define _PS2COMM_H_
+
++#include <xorg-server.h>
++
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include "xf86_OSproc.h"
+Index: xf86-input-synaptics-1.8.0/src/synproto.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/synproto.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/synproto.h 2014-08-28 18:40:28.624070587 -0700
+@@ -31,6 +31,8 @@
+ #include "config.h"
+ #endif
+
++#include <xorg-server.h>
++
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <xf86Xinput.h>
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb
index 8045790e9d..435faa6024 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb
@@ -12,9 +12,11 @@ advanced features of the touchpad to become available."
LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
-SRC_URI[md5sum] = "deaa740072c19fef8e2fb1d7787392b7"
-SRC_URI[sha256sum] = "56a2d2df7bd39e29f56102c62f153e023f3e9b2f5e255309d33fab8e81945af7"
+SRC_URI += "file://always_include_xorg_server.h.patch"
-DEPENDS += "libxi mtdev libxtst"
+SRC_URI[md5sum] = "ed70d0cba94262a4008dcef654ab34a9"
+SRC_URI[sha256sum] = "d74fdaf29e9888a2cb494e16d0a9ddb24265c5c765b05392b69c50e84ffbf09a"
+
+DEPENDS += "libxi mtdev libxtst libevdev"
FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch
new file mode 100644
index 0000000000..12fb9df2fd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch
@@ -0,0 +1,81 @@
+From 336f8633837abe4a1e5ba84b53ac8b9dac5d29a2 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Thu, 28 Nov 2013 11:59:53 -0800
+Subject: Always include config.h first
+
+This fixes some build warnings about CSRG_BASED being redefined due to
+incorrect header include ordering.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+Upstream-Status: Backport
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_client.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_client.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_client.c 2014-08-28 18:33:16.152070587 -0700
+@@ -39,6 +39,10 @@
+ #endif
+
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include "vmmouse_client.h"
+ #include "vmmouse_proto.h"
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_proto.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.c 2014-08-28 18:33:16.156070587 -0700
+@@ -33,6 +33,10 @@
+ */
+
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include "vmmouse_proto.h"
+
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.h
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_proto.h 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.h 2014-08-28 18:33:16.156070587 -0700
+@@ -36,11 +36,6 @@
+ #ifndef _VMMOUSE_PROTO_H_
+ #define _VMMOUSE_PROTO_H_
+
+-
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif
+-
+ #include <stdint.h>
+
+ #ifdef HAVE_XORG_SERVER_1_1_0
+Index: xf86-input-vmmouse-13.0.0/tools/vmmouse_detect.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/tools/vmmouse_detect.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/tools/vmmouse_detect.c 2014-08-28 18:33:16.160070587 -0700
+@@ -26,14 +26,14 @@
+ */
+
+
+-#include <stdlib.h>
+-#include <signal.h>
+-#include "vmmouse_client.h"
+-
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
++#include <stdlib.h>
++#include <signal.h>
++#include "vmmouse_client.h"
++
+ void
+ segvCB(int sig)
+ {
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
index 35ef5991c3..83ea960a88 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
@@ -8,6 +8,8 @@ standard 'mouse' driver if a VMware virtual machine is not detected."
PR = "${INC_PR}.0"
+SRC_URI += "file://always_include_config.h.patch"
+
SRC_URI[md5sum] = "34f9f64ee6a1a51fc8266a9af24e1e07"
SRC_URI[sha256sum] = "04cfb60366008d4db815c550d8fb8d0a4270c75fa7a20fa3bddc9ecbd355612c"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb b/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb
new file mode 100644
index 0000000000..01cd37e364
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb
@@ -0,0 +1,13 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- cirrus display driver"
+DESCRIPTION = "cirrus is an Xorg driver for Cirrus Logic VGA adapters. These \
+devices are not so common in the wild anymore, but QEMU can emulate one, so \
+the driver is still useful."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddc7ca860dc5fd014e7f160ea699295"
+
+SRC_URI[md5sum] = "91fd6b677d62027cd3001debb587a6a6"
+SRC_URI[sha256sum] = "3361e1a65d9b84c464752fd612bdf6087622c6dd204121715366a170e5c3ccd7"
+
+DEPENDS += "libpciaccess"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
new file mode 100644
index 0000000000..8a5dd39ae1
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
@@ -0,0 +1,24 @@
+Include xorg-server.h to fix build errors seen with glibc 2.20
+
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-intel/2_2.99.912-r0/xf86-video-intel-2.99.912/src/backlight.c:39:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: xf86-video-intel-2.99.912/src/backlight.c
+===================================================================
+--- xf86-video-intel-2.99.912.orig/src/backlight.c 2014-04-09 10:41:18.000000000 -0700
++++ xf86-video-intel-2.99.912/src/backlight.c 2014-08-28 18:52:25.524070587 -0700
+@@ -29,6 +29,7 @@
+ #include "config.h"
+ #endif
+
++#include <xorg-server.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
new file mode 100644
index 0000000000..dda508dcfd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
@@ -0,0 +1,17 @@
+These modules are only used for tests that don't get installed, and the
+automatic detection without explicit dependencies means that a build can find
+e.g. xshmfence at configure time but then it's been removed from the sysroot by
+the time compile happens.
+
+As the tests don't get installed, just disable the checks.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index bd654f3..78a0e0d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -251 +251 @@ fi
+-PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
++#PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.910.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
index 60eace46d4..26b68b461c 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.910.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
@@ -9,23 +9,30 @@ Infrastructure (DRI)."
LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
-DEPENDS += "virtual/libx11 drm libpciaccess pixman"
-
-SRC_URI += "file://compat-api-Map-changes-of-DamageUnregister-API-in-1..patch \
+SRC_URI += "file://disable-x11-dri3.patch \
+ file://always_include_xorg_server.h.patch \
"
-PACKAGECONFIG ??= "sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri', '', d)}"
+SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
+SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
+
+DEPENDS += "virtual/libx11 drm libpciaccess pixman"
+
+PACKAGECONFIG ??= "sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xf86driproto dri2proto"
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
+PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1,xf86driproto"
+PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
# --enable-kms-only option is required by ROOTLESS_X
EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-SRC_URI[md5sum] = "a9a5c2c15766c06a024381efe0d724bb"
-SRC_URI[sha256sum] = "203d46064449da0e23a111418dfb189422ba96ea08707167c8dee463e2d745b1"
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb b/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb
index 5bb89266cd..b22078792a 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb
@@ -4,5 +4,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5e53d3fcadb1c23d122ad63cb099a918"
SUMMARY = "X.Org X server -- modesetting display driver"
DESCRIPTION = "Provides a generic kernel modesetting display driver for the X.Org X server."
-SRC_URI[md5sum] = "eb275e1ff0031897bcf23e2e5cb8655a"
-SRC_URI[sha256sum] = "3ba8d8d7cb679497abc6486e2e843f8ea1582d830a27448ed4c90413e58312ca"
+SRC_URI[md5sum] = "da588d4f54111c2deae035998058ce10"
+SRC_URI[sha256sum] = "90cf085573203dfadd48ea69bd694c4d04ccbe088b6855e9c85c34bb8a95d75c"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
new file mode 100644
index 0000000000..dc0b9b3f41
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
@@ -0,0 +1,48 @@
+Fix errors with glibc 2.20
+
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-blizzard.c:33:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-generic.c:28:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/src/omapfb-xv-blizzard.c
+===================================================================
+--- git.orig/src/omapfb-xv-blizzard.c 2014-08-28 05:16:25.684070587 -0700
++++ git/src/omapfb-xv-blizzard.c 2014-08-28 19:05:39.440070587 -0700
+@@ -30,6 +30,7 @@
+ * -
+ */
+
++#include <xorg-server.h>
+ #include "xf86.h"
+ #include "xf86_OSlib.h"
+ #include "xf86xv.h"
+Index: git/src/omapfb-xv-generic.c
+===================================================================
+--- git.orig/src/omapfb-xv-generic.c 2014-08-28 05:16:25.684070587 -0700
++++ git/src/omapfb-xv-generic.c 2014-08-28 19:05:51.780070587 -0700
+@@ -25,6 +25,7 @@
+ * Generic functions for the XV driver
+ */
+
++#include <xorg-server.h>
+ #include "xf86.h"
+ #include "xf86_OSlib.h"
+ #include "xf86xv.h"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
index 50ce4c2f9c..4ad25389cd 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
@@ -20,6 +20,7 @@ SRC_URI = "git://git.pingu.fi/xf86-video-omapfb;protocol=http \
file://0004-blacklist-tv-out.patch \
file://0005-Attempt-to-fix-VRFB.patch \
file://0006-omapfb-port-to-new-xserver-video-API.patch \
+ file://0007-always_include_xorg_server.h.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch
new file mode 100644
index 0000000000..cf66403e89
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From bdaa9de44a197ba1297b990422ed9e515289f141 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Tue, 1 Apr 2014 10:11:13 +0200
+Subject: [PATCH 1/2] configure: fix build without xatracker
+
+ACTION-IF-NOT-FOUND is the fourth argument to PKG_CHECK_MODULES, not the
+fifth.
+
+Debian bug#743239 <https://bugs.debian.org/743239>
+
+Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
+Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index dd3ad4e..be40ed7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -126,7 +126,7 @@ if test x$BUILD_VMWGFX = xyes; then
+ [PKG_CHECK_EXISTS([xatracker = 2.0.0],
+ [AC_DEFINE([HAVE_XA_2], 1,
+ [Has version 2 of XA])])],
+- [],[BUILD_VMWGFX=no])
++ [BUILD_VMWGFX=no])
+ #
+ # Check for prime.
+ #
+--
+1.7.10.4
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
new file mode 100644
index 0000000000..6039d089a1
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
@@ -0,0 +1,98 @@
+Upstream-Status:Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From f103d6f570671c649ccd7b225e6d6c9f14371888 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 25 Jun 2014 16:16:44 +0100
+Subject: [PATCH 2/2] add option for vmwgfx
+
+---
+ configure.ac | 49 ++++++++++++++++++++-----------------------------
+ 1 file changed, 20 insertions(+), 29 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be40ed7..8e15307 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,13 @@ AC_ARG_ENABLE(vmwarectrl-client,
+ [VMWARECTRL=$enableval], [VMWARECTRL=no])
+ AM_CONDITIONAL(BUILD_VMWARECTRL, [test "x$VMWARECTRL" = xyes])
+
++# Define a configure option to build the vmwgfx driver
++AC_ARG_ENABLE(vmwgfx,
++ AS_HELP_STRING([--disable-vmwgfx],
++ [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
++ [VMWGFX="$enableval"], [VMWGFX="yes"])
++AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
++
+ # Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+@@ -85,11 +92,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
+ [Has version 1.5.0 or greater of the Xserver])])
+
+-PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
+- [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
+- [Has version 1.7.0 or greater of the Xserver])
+- BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
+-
+ PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
+ [Has version 1.12.0 or greater of the Xserver])])
+@@ -114,39 +116,28 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+ AC_SUBST([moduledir])
+
+-if test x$BUILD_VMWGFX = xyes; then
+- PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
+-fi
+-if test x$BUILD_VMWGFX = xyes; then
+-#
+-# Early versions of mesa 10 forgot to bump the XA major version number in
+-# the xa_tracker.h header
+-#
+- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
+- [PKG_CHECK_EXISTS([xatracker = 2.0.0],
+- [AC_DEFINE([HAVE_XA_2], 1,
+- [Has version 2 of XA])])],
+- [BUILD_VMWGFX=no])
+-#
+-# Check for prime.
+-#
++AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
++if test x$VMWGFX = xyes; then
++ PKG_CHECK_MODULES([LIBDRM], [libdrm])
++ # Check for prime.
+ PKG_CHECK_EXISTS([libdrm >= 2.4.38],
+ [AC_DEFINE([HAVE_LIBDRM_2_4_38], 1,
+ [Has version 2.4.38 or greater of libdrm])])
+-fi
+
+-DRIVER_NAME=vmware
+-AC_SUBST([DRIVER_NAME])
+-
+-AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
+-if test x$BUILD_VMWGFX = xyes; then
+- AC_MSG_RESULT([yes])
++ # Early versions of mesa 10 forgot to bump the XA major version number
++ # in the xa_tracker.h header
++ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
++ [PKG_CHECK_EXISTS([xatracker = 2.0.0],
++ [AC_DEFINE([HAVE_XA_2], 1,
++ [Has version 2 of XA])])])
+ AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
++ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+-AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
++DRIVER_NAME=vmware
++AC_SUBST([DRIVER_NAME])
+
+ AC_CONFIG_FILES([
+ Makefile
+--
+1.7.10.4
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch
deleted file mode 100644
index 4b3a3094d9..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Upstream-Status: Submitted (http://lists.x.org/archives/xorg-devel/2013-September/037762.html)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 5ec0aae666feb88d01256cdebbf94a6b373bf4c4 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 11 Sep 2013 21:40:44 +0100
-Subject: [PATCH] build: add explicit option to enable/disable VMWGFX
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- configure.ac | 31 ++++++++++++++-----------------
- 1 file changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0631bcc..3e14abd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -85,11 +85,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
- [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
- [Has version 1.5.0 or greater of the Xserver])])
-
--PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
-- [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
-- [Has version 1.7.0 or greater of the Xserver])
-- BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
--
- PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
- [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
- [Has version 1.12.0 or greater of the Xserver])])
-@@ -114,25 +109,27 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-
- AC_SUBST([moduledir])
-
--if test x$BUILD_VMWGFX = xyes; then
-- PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
--fi
--if test x$BUILD_VMWGFX = xyes; then
-- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],[],[BUILD_VMWGFX=no])
--fi
--
- DRIVER_NAME=vmware
- AC_SUBST([DRIVER_NAME])
-
-+AC_ARG_ENABLE(vmwgfx,
-+ AS_HELP_STRING([--disable-vmwgfx],
-+ [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
-+ [VMWGFX="$enableval"], [VMWGFX="yes"])
-+
- AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
--if test x$BUILD_VMWGFX = xyes; then
-- AC_MSG_RESULT([yes])
-+if test "x$VMWGFX" = xyes; then
-+ AC_MSG_RESULT([yes])
-+ PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
-+ [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
-+ [Has version 1.7.0 or greater of the Xserver])])
-+ PKG_CHECK_MODULES([LIBDRM], [libdrm])
-+ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0])
- AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
- else
-- AC_MSG_RESULT([no])
-+ AC_MSG_RESULT([no])
- fi
--
--AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
-+AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
-
- AC_CONFIG_FILES([
- Makefile
---
-1.7.10.4
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb
index 7b48e0c101..24041b5cad 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5fcd7d437a959a15fbee8707747c6b53"
DEPENDS += "virtual/libx11 xineramaproto videoproto libpciaccess"
-SRC_URI += "file://vmwgfx-option.patch"
+SRC_URI += "file://0001-configure-fix-build-without-xatracker.patch \
+ file://0002-add-option-for-vmwgfx.patch"
-SRC_URI[md5sum] = "b08e0195ebf3f88a82129322cb93da08"
-SRC_URI[sha256sum] = "802dda415c22412edad6c3df44fe18a06e91d0f8456d9a58bac0d340fdf8fe3d"
+SRC_URI[md5sum] = "91d1d7d33181766714405ab013d31244"
+SRC_URI[sha256sum] = "c8ba3d2cead3620dba2cbf5defb7f1759b2b96f4fe209f4bf6976832b6763c54"
COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index b46974bc2d..7a710dc532 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -16,7 +16,9 @@ S = "${WORKDIR}/${BPN}-${PV}"
FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
FILES_${PN}-dbg += " ${libdir}/xorg/modules/drivers/.debug"
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/xserver
+REQUIRED_DISTRO_FEATURES = "x11"
# FIXME: We don't want to include the libtool archives (*.la) from modules
# directory, as they serve no useful purpose. Upstream should fix Makefile.am
@@ -25,8 +27,8 @@ do_install_append() {
}
# Function to add the relevant ABI dependency to drivers, which should be called
-# from a populate_packages append/prepend.
-def add_abi_depends(d, name):
+# from a PACKAGEFUNC.
+def _add_xorg_abi_depends(d, name):
# Map of ABI names exposed in the dependencies to pkg-config variables
abis = {
"video": "abi_videodrv",
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
index a544d71bf2..fbec0643ff 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -2,9 +2,10 @@ include xorg-driver-common.inc
DEPENDS += "inputproto kbproto "
-python populate_packages_prepend() {
- add_abi_depends(d, "input")
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "input")
}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
FILES_${PN} += " ${libdir}/xorg/modules/input/*.so"
FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug"
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
index 4fe33491b7..38281e0f23 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -2,6 +2,7 @@ include xorg-driver-common.inc
DEPENDS =+ "renderproto videoproto xextproto fontsproto"
-python populate_packages_prepend() {
- add_abi_depends(d, "video")
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "video")
}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
index 8b42991d1c..cc4258ad7b 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
@@ -17,7 +17,7 @@ RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"
PR = "${INC_PR}.0"
do_configure_prepend() {
- sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkg-config\" pkg-config#g" ${S}/fontutil.m4.in
+ sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkgconfig\" pkg-config#g" ${S}/fontutil.m4.in
}
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
index 3688685509..bee500b43a 100644
--- a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
+++ b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
@@ -15,13 +15,15 @@ PR = "r2"
inherit allarch
+S = "${WORKDIR}/misc"
+
PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/X11/ ${datadir}/fonts/X11/"
RDEPENDS_${PN} += "font-alias"
do_install() {
install -d ${D}/${datadir}/fonts/X11/misc
- install -m 0644 ${WORKDIR}/misc/* ${D}/${datadir}/fonts/X11/misc/
+ install -m 0644 ${S}/* ${D}/${datadir}/fonts/X11/misc/
install -d ${D}/${libdir}/X11
ln -sf ${datadir}/fonts/X11/ ${D}/${libdir}/X11/fonts -s
}
diff --git a/meta/recipes-graphics/xorg-lib/libice_1.0.8.bb b/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
index ce6a194eaf..5049b7ee02 100644
--- a/meta/recipes-graphics/xorg-lib/libice_1.0.8.bb
+++ b/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
@@ -20,5 +20,8 @@ XORG_PN = "libICE"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "471b5ca9f5562ac0d6eac7a0bf650738"
-SRC_URI[sha256sum] = "24a991284d02ff0c789bc8d11ad2e4dffe144cb70f24e28f9ce3e8b1ee08b71e"
+SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
+SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
diff --git a/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb b/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
index 180acfae0b..1925136369 100644
--- a/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
@@ -11,7 +11,12 @@ require xorg-lib-common.inc
LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb37f44e02bdbde80546024400728d"
-DEPENDS += "libice xproto xtrans e2fsprogs"
+DEPENDS += "libice xproto xtrans"
+
+# libSM can work without libuuid, we explicitly disable it to break the following circular dependency
+# when DISTRO_FEATURES contains 'systemd' and 'x11'.
+# systemd -> dbus -> libsm -> util-linux -> systemd
+EXTRA_OECONF += "--without-libuuid"
PE = "1"
diff --git a/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch b/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
new file mode 100644
index 0000000000..30686206ab
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
@@ -0,0 +1,72 @@
+From 4d85d5f3bd8afac893738fd88e19d8cb5cf998ff Mon Sep 17 00:00:00 2001
+From: Drew Moseley <drew_moseley@mentor.com>
+Date: Sun, 27 Jul 2014 13:10:07 -0400
+Subject: [PATCH] libX11: Add missing NULL check on im and im->methods
+
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=81822]
+
+Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+---
+ src/xlibi18n/ICWrap.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff -ru libX11-1.6.2-orig/src/xlibi18n/ICWrap.c libX11-1.6.2/src/xlibi18n/ICWrap.c
+--- libX11-1.6.2-orig/src/xlibi18n/ICWrap.c 2014-07-27 13:38:29.586666449 -0400
++++ libX11-1.6.2/src/xlibi18n/ICWrap.c 2014-07-27 13:41:39.671609030 -0400
+@@ -169,7 +169,7 @@
+ va_list var;
+ int total_count;
+ XIMArg *args;
+- char *ret;
++ char *ret = NULL;
+
+ /*
+ * so count the stuff dangling here
+@@ -185,7 +185,8 @@
+ _XIMVaToNestedList(var, total_count, &args);
+ va_end(var);
+
+- ret = (*im->methods->set_values) (im, args);
++ if (im && im->methods)
++ ret = (*im->methods->set_values) (im, args);
+ if (args) Xfree(args);
+ return ret;
+ }
+@@ -196,7 +197,7 @@
+ va_list var;
+ int total_count;
+ XIMArg *args;
+- char *ret;
++ char *ret = NULL;
+
+ /*
+ * so count the stuff dangling here
+@@ -212,7 +213,8 @@
+ _XIMVaToNestedList(var, total_count, &args);
+ va_end(var);
+
+- ret = (*im->methods->get_values) (im, args);
++ if (im && im->methods)
++ ret = (*im->methods->get_values) (im, args);
+ if (args) Xfree(args);
+ return ret;
+ }
+@@ -228,7 +230,7 @@
+ va_list var;
+ int total_count;
+ XIMArg *args;
+- XIC ic;
++ XIC ic = NULL;
+
+ /*
+ * so count the stuff dangling here
+@@ -244,7 +246,8 @@
+ _XIMVaToNestedList(var, total_count, &args);
+ va_end(var);
+
+- ic = (XIC) (*im->methods->create_ic) (im, args);
++ if (im && im->methods)
++ ic = (XIC) (*im->methods->create_ic) (im, args);
+ if (args) Xfree(args);
+ if (ic) {
+ ic->core.next = im->core.ic_chain;
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
index 700bc3680f..a7226480c2 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
@@ -5,6 +5,7 @@ BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://disable_tests.patch \
file://nls-always-use-XCOMM-instead-of-for-comments-in-Comp.patch \
+ file://libX11-Add-missing-NULL-check.patch \
"
SRC_URI[md5sum] = "c35d6ad95b06635a524579e88622fdb5"
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
deleted file mode 100644
index d88b025e1f..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-include libxcb.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
-
-
-DEPENDS += "libxdmcp"
-
-SRC_URI[md5sum] = "074c335cc4453467eeb234e3dadda700"
-SRC_URI[sha256sum] = "98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5"
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
new file mode 100644
index 0000000000..c162702105
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
@@ -0,0 +1,10 @@
+include libxcb.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
+
+
+DEPENDS += "libxdmcp"
+
+SRC_URI[md5sum] = "5a873ebd383d1a60612dd6ec6b42c781"
+SRC_URI[sha256sum] = "03635d70045b9ede90778e67516135828a57de87ac508f987024f43c03620ff7"
diff --git a/meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb b/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
index ec66175684..efa8b65ace 100644
--- a/meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
@@ -22,5 +22,5 @@ XORG_PN = "libXext"
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "4376101e51bb2c6c44d9ab14344e85ad"
-SRC_URI[sha256sum] = "f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0"
+SRC_URI[md5sum] = "52df7c4c1f0badd9f82ab124fb32eb97"
+SRC_URI[sha256sum] = "b518d4d332231f313371fdefac59e3776f4f0823bcb23cf7c7305bfb57b16e35"
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
index d587ba8c54..ef0bde29fb 100644
--- a/meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb
+++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
@@ -18,5 +18,5 @@ XORG_PN = "libXfont"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "b21ee5739d5d2e5028b302fbf9fe630b"
-SRC_URI[sha256sum] = "d16ea3541835d296b19cfb05d7e64fc62173d8e7eb93284402ec761b951d1543"
+SRC_URI[md5sum] = "664629bfa7cdf8b984155019fd395dcb"
+SRC_URI[sha256sum] = "3a3c52c4adf9352b2160f07ff0596af17ab14f91d6509564e606678a1261c25f"
diff --git a/meta/recipes-graphics/xorg-lib/libxft/freetype.patch b/meta/recipes-graphics/xorg-lib/libxft/freetype.patch
deleted file mode 100644
index 9f1aa21bac..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxft/freetype.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From f568fa5a8220fd06659c0f26a93adcc81a42917c Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 2 Dec 2013 13:48:40 +0000
-Subject: [PATCH] xftglyphs: use recommend freetype inclusion
-
-FreeType recommends to use their special macros to include the headers, because
-it gives them the ability to move headers around. They did this in 2.5.1 (yes,
-a point release) and this direct inclusion doesn't work anymore.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- src/xftglyphs.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/xftglyphs.c b/src/xftglyphs.c
-index 2f3dc5a..53302f0 100644
---- a/src/xftglyphs.c
-+++ b/src/xftglyphs.c
-@@ -21,10 +21,10 @@
- */
-
- #include "xftint.h"
--#include <freetype/ftoutln.h>
--#include <freetype/ftlcdfil.h>
--
--#include <freetype/ftsynth.h>
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
-+#include FT_LCD_FILTER_H
-+#include FT_SYNTHESIS_H
-
- /*
- * Validate the memory info for a font
---
-1.8.5
-
diff --git a/meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb b/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
index 16838f0eae..a967cdc585 100644
--- a/meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
@@ -20,10 +20,8 @@ PROVIDES = "xft"
PE = "1"
-SRC_URI += "file://freetype.patch"
-
-SRC_URI[md5sum] = "78d64dece560c9e8699199f3faa521c0"
-SRC_URI[sha256sum] = "7fce32b92dcb7b2869bed567af2abc7bbad0d5d6fcf471b8a3e137964a31bbbd"
+SRC_URI[md5sum] = "331b3a2a3a1a78b5b44cfbd43f86fcfe"
+SRC_URI[sha256sum] = "f5a3c824761df351ca91827ac221090943ef28b248573486050de89f4bfcdc4c"
XORG_PN = "libXft"
diff --git a/meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb b/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
index 0ae98e0810..07033a3e78 100644
--- a/meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
@@ -17,5 +17,5 @@ PE = "1"
XORG_PN = "libXi"
-SRC_URI[md5sum] = "f4df3532b1af1dcc905d804f55b30b4a"
-SRC_URI[sha256sum] = "df24781dc63645e2b561cd0b20bd8a0e7aff02e426a8d2a7641159004d4cb20e"
+SRC_URI[md5sum] = "9c4a69c34b19ec1e4212e849549544cb"
+SRC_URI[sha256sum] = "2cffc2686618dc1803725636cd92b36342c512dc60a7a35cba34bf7192a42244"
diff --git a/meta/recipes-graphics/xorg-lib/libxi_git.bb b/meta/recipes-graphics/xorg-lib/libxi_git.bb
deleted file mode 100644
index c17c1f7510..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxi_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XI: X Input extension library"
-
-DESCRIPTION = "libxi is an extension to the X11 protocol to support \
-input devices other than the core X keyboard and pointer. It allows \
-client programs to select input from these devices independently from \
-each other and independently from the core devices."
-
-DEPENDS += "libxext inputproto"
-SRCREV = "d0326fe8cdbb08d4f52d79fd3fd4e1b2a0951d5e"
-PE = "1"
-PV = "1.2.99.5+gitr${SRCPV}"
-
-XORG_PN = "libXi"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/${XORG_PN}"
-S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
index 2b1806142f..a166b57603 100644
--- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
@@ -2,19 +2,19 @@ SUMMARY = "Generic XKB keymap library"
DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
processes a reduced subset of keymaps as defined by the XKB specification."
HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9c0b824e72a22f9d2c40b9c93b1f0ddc"
+LIC_FILES_CHKSUM = "file://COPYING;md5=09457b156e3155972abebcaaaa0cb434"
LICENSE = "MIT & MIT-style"
DEPENDS = "util-macros flex-native bison-native"
SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "4b717adce41c8305258e99a9b396330a"
-SRC_URI[sha256sum] = "a0fc71b07eeddba4af62bd709e24cec219778bb6871384aa850b2f5798a48957"
+SRC_URI[md5sum] = "2e1faeafcc609c30af3a561a91e84158"
+SRC_URI[sha256sum] = "90bd7824742b9a6f52a6cf80e2cadd6f5349cf600a358d08260772615b89d19c"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-docs"
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch b/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
new file mode 100644
index 0000000000..14a5fd209b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
@@ -0,0 +1,22 @@
+Revert a commit in pixman 0.32.6 which breaks compliation on MIPS machines with
+errors such as:
+
+pixman-0.32.6/pixman/pixman-mips-dspr2-asm.S:4267:
+Error: invalid operands `mflo $14,$ac3'
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- b/pixman/pixman-mips-dspr2-asm.h
++++ a/pixman/pixman-mips-dspr2-asm.h
+@@ -72,10 +72,7 @@
+ #define LEAF_MIPS32R2(symbol) \
+ .globl symbol; \
+ .align 2; \
+-#ifdef __ELF__
+- .hidden symbol; \
+ .type symbol, @function; \
+-#endif
+ .ent symbol, 0; \
+ symbol: .frame sp, 0, ra; \
+ .set push; \
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
index 51cca5d13a..467ba508ee 100644
--- a/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
@@ -29,9 +29,10 @@ EXTRA_OECONF_class-native = "--disable-gtk"
SRC_URI += "\
file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
+ file://mips-export-revert.patch \
"
-SRC_URI[md5sum] = "cdb566504fe9daf6728c7b03cc7ea228"
-SRC_URI[sha256sum] = "ae2bd664057e330d41b40336ed296d3512318ce7f2401cc42601f2613d371e4c"
+SRC_URI[md5sum] = "8a9e8f14743a39cf303803f369c1f344"
+SRC_URI[sha256sum] = "201fc0d7d6bc0017496f2bd27b3ca14224aea0df6b624c5ee2dc0307a4ff14a4"
REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
index 1d36893f93..91464b6c98 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
@@ -6,6 +6,5 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://image/xcb_image.c;endline=24;md5=eafdf965cfb89955fdedf75054223fb4 \
file://image/xcb_image.h;beginline=4;endline=27;md5=48cd25ae55e7de525fe1e1a3a7672e1c"
-SRC_URI[md5sum] = "fabb80b36490b00fc91289e2c7f66770"
-SRC_URI[sha256sum] = "d35a3c0eaae171f5081ec127fb9cec174b716ce5d78196a87f2785376da021df"
-
+SRC_URI[md5sum] = "08fe8ffecc8d4e37c0ade7906b3f4c87"
+SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc" \ No newline at end of file
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb
index 39ead34e92..bca64ed61f 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb
@@ -3,8 +3,7 @@ require xcb-util.inc
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://keysyms/keysyms.c;endline=30;md5=2f8de023ed823bb92f0b47900574ea9e \
"
-
-SRC_URI[md5sum] = "64e4aad2d48cd4a92e2da13b9f35bfd2"
-SRC_URI[sha256sum] = "7be1acf053bd68a1910fc861b2cbcbad7637b5618590dd5484d43a96f7995c6e"
+SRC_URI[md5sum] = "1022293083eec9e62d5659261c29e367"
+SRC_URI[sha256sum] = "0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb
deleted file mode 100644
index 2b4ee703f5..0000000000
--- a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xcb-util.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://ewmh/ewmh.c;endline=27;md5=63fd80552d7dc886f4eb267610d5bb9d \
- file://ewmh/xcb_ewmh.h;beginline=4;endline=30;md5=73b589f90ef90b4a43998955daad5cd8 \
- file://icccm/icccm.c;endline=28;md5=e2b3240a0c197e8977adde2a5cf18d50 \
- file://icccm/xcb_icccm.h;beginline=4;endline=31;md5=393772b7b07b9868d479d538238c1d8a \
- "
-
-SRC_URI[md5sum] = "1b5182b894753de63c9fad1ce6124534"
-SRC_URI[sha256sum] = "66f97c18f7d98d3c873fe5db5842d2fca34519274c31ee668551ab8995a2f51f"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb
new file mode 100644
index 0000000000..39f1383299
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb
@@ -0,0 +1,11 @@
+require xcb-util.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://ewmh/ewmh.c.m4;endline=27;md5=63fd80552d7dc886f4eb267610d5bb9d \
+ file://ewmh/xcb_ewmh.h.m4;beginline=4;endline=30;md5=73b589f90ef90b4a43998955daad5cd8 \
+ file://icccm/icccm.c;endline=28;md5=e2b3240a0c197e8977adde2a5cf18d50 \
+ file://icccm/xcb_icccm.h;beginline=4;endline=31;md5=393772b7b07b9868d479d538238c1d8a \
+ "
+
+SRC_URI[md5sum] = "87b19a1cd7bfcb65a24e36c300e03129"
+SRC_URI[sha256sum] = "28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb
index c5d8858115..206f07a65c 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb
@@ -4,5 +4,5 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://src/xcb_aux.c;endline=30;md5=ae305b9c2a38f9ba27060191046a6460 \
file://src/xcb_event.h;endline=27;md5=627be355aee59e1b8ade80d5bd90fad9"
-SRC_URI[md5sum] = "01dcc7a16d5020530552712710646ea2"
-SRC_URI[sha256sum] = "c611259c0ab20fd76f79f48f4684843c18ea9c967eba78a45e8b3636315c18c4"
+SRC_URI[md5sum] = "2e97feed81919465a04ccc71e4073313"
+SRC_URI[sha256sum] = "46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9"
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb
index b80309d2ac..5536b6217a 100644
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb
@@ -13,8 +13,8 @@ LICENSE = "MIT & MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
SRC_URI="${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "e3defd29cc464cc1a1dfa0eebaca53b1"
-SRC_URI[sha256sum] = "e7125460892c2b5c3a8d843cb18c24b60c46051e925c2888a61fa672a2f76d76"
+SRC_URI[md5sum] = "a415775ca8ecf4dfafc9488b8cbd7114"
+SRC_URI[sha256sum] = "7b5be9f2b9a30102512b15308aec55f7f54289df24ac21de82ebb4bf145f9fce"
SECTION = "x11/libs"
DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
@@ -23,7 +23,7 @@ EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
FILES_${PN} += "${datadir}/X11/xkb"
-inherit autotools pkgconfig
+inherit autotools pkgconfig gettext
do_install_append () {
install -d ${D}${datadir}/X11/xkb/compiled
diff --git a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
index 7231664773..09df0109cb 100644
--- a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
+++ b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
@@ -13,9 +13,14 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
inherit autotools distro_features_check pkgconfig
-EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop --without-xmlto"
+EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
UNKNOWN_CONFIGURE_WHITELIST += "--enable-malloc0returnsnull --disable-malloc0returnsnull \
- --disable-specs --without-groff --without-ps2pdf --without-fop --without-xmlto"
+ --disable-specs --without-groff --without-ps2pdf --without-fop \
+ --without-xmlto --with-xmlto \
+"
REQUIRED_DISTRO_FEATURES ?= "x11"
diff --git a/meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
index f2b89217bb..d5b7f1a2c6 100644
--- a/meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb
+++ b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
@@ -20,5 +20,5 @@ inherit gettext
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "a615e17d9fee6f097fc3b716eacb3dca"
-SRC_URI[sha256sum] = "054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a"
+SRC_URI[md5sum] = "c5ba432dd1514d858053ffe9f4737dd8"
+SRC_URI[sha256sum] = "adbd3b36932ce4c062cd10f57d78a156ba98d618bdb6f50664da327502bc8301"
diff --git a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb b/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
index 4b9101a699..27fc281748 100644
--- a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb
+++ b/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
@@ -14,5 +14,5 @@ PE = "1"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "c5f4f1fb4ba7766eedbc9489e81f3be2"
-SRC_URI[sha256sum] = "869c97e5a536a8f3c9bc8b9923780ff1f062094bab935e26f96df3d6f1aa68a9"
+SRC_URI[md5sum] = "36934d00b00555eaacde9f091f392f97"
+SRC_URI[sha256sum] = "259046b0dd9130825c4a4c479ba3591d6d0f17a33f54e294b56478729a6e5ab8"
diff --git a/meta/recipes-graphics/xorg-proto/inputproto_2.3.bb b/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
index a39ce497aa..7e8e0c155f 100644
--- a/meta/recipes-graphics/xorg-proto/inputproto_2.3.bb
+++ b/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
@@ -16,6 +16,5 @@ inherit gettext
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "94db391e60044e140c9854203d080654"
-SRC_URI[sha256sum] = "7d26b193f6699f8e9c1e28bf026844b7ecea33dd644402523471be109152c32f"
-
+SRC_URI[md5sum] = "6caebead4b779ba031727f66a7ffa358"
+SRC_URI[sha256sum] = "5a47ee62053a6acef3a83f506312494be1461068d0b9269d818839703b95c1d1"
diff --git a/meta/recipes-graphics/xorg-proto/presentproto_git.bb b/meta/recipes-graphics/xorg-proto/presentproto_git.bb
index 7fca51d31e..dbb6f32bc0 100644
--- a/meta/recipes-graphics/xorg-proto/presentproto_git.bb
+++ b/meta/recipes-graphics/xorg-proto/presentproto_git.bb
@@ -17,6 +17,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/presentproto"
S = "${WORKDIR}/git"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
index 0b67b5703e..5bc5a112e5 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
@@ -5,5 +5,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
-SRC_URI[md5sum] = "ade74b8e9c870dc7515adfa209e66063"
-SRC_URI[sha256sum] = "7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05"
+SRC_URI[md5sum] = "6bf2797445dc6d43e9e4707c082eff9c"
+SRC_URI[sha256sum] = "b4aceee6502a0ce45fc39b33c541a2df4715d00b72e660ebe8c5bb444771e32e"
diff --git a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc b/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
index 625a718560..7a417c9742 100644
--- a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
+++ b/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
@@ -14,9 +14,12 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
DEPENDS = "util-macros"
inherit autotools pkgconfig
-EXTRA_OECONF = "--without-fop --without-xmlto"
+EXTRA_OECONF = "--without-fop"
-UNKNOWN_CONFIGURE_WHITELIST += "--without-fop --without-xmlto"
+UNKNOWN_CONFIGURE_WHITELIST += "--without-fop --without-xmlto --with-xmlto"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
RDEPENDS_${PN}-dev = ""
diff --git a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb b/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
index 23cef63ea2..ccf2f4b451 100644
--- a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb
+++ b/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
@@ -13,5 +13,5 @@ RDEPENDS_${PN} = "gcc"
PR = "r3"
PE = "1"
-SRC_URI[md5sum] = "fc49f45251c1336fe1dad5dba1c83fcd"
-SRC_URI[sha256sum] = "fdd3963294e80b27416f902a5c029c033d321f03310d3cafa3afb62b50ddce92"
+SRC_URI[md5sum] = "127ddb6131eb4a56fdf6644a63ade788"
+SRC_URI[sha256sum] = "f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548" \ No newline at end of file
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
index 10a6d9a0bc..bbda9eaa63 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
@@ -30,11 +30,6 @@ Section "InputDevice"
Option "USB" "on"
EndSection
-Section "Device"
- Identifier "Graphics Controller"
- Driver "vmware"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
index 10a6d9a0bc..bbda9eaa63 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
@@ -30,11 +30,6 @@ Section "InputDevice"
Option "USB" "on"
EndSection
-Section "Device"
- Identifier "Graphics Controller"
- Driver "vmware"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index 549c7c89bf..5420b7d23e 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -7,6 +7,8 @@ PR = "r33"
SRC_URI = "file://xorg.conf"
+S = "${WORKDIR}"
+
CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 8b5747e282..61542955a9 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -99,7 +99,6 @@ FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
EXTRA_OECONF += "--with-fop=no \
- --without-xmlto \
--with-pic \
--disable-static \
--disable-xinerama \
@@ -113,10 +112,13 @@ EXTRA_OECONF += "--with-fop=no \
--sysconfdir=/etc/X11 \
--localstatedir=/var \
--with-xkb-output=/var/lib/xkb \
+ --with-sha1=libcrypto \
ac_cv_file__usr_share_sgml_X11_defs_ent=no \
+ --disable-systemd-logind \
"
PACKAGECONFIG ??= "udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri2 glx', '', d)}"
+
PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto"
PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
@@ -125,6 +127,7 @@ PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11"
PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
+PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
do_install_append () {
# Its assumed base-files creates this for us
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch
new file mode 100644
index 0000000000..604d23a376
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch
@@ -0,0 +1,41 @@
+From db424318d0bb29cbcdf3a07fcc2e023586f1219f Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <fourdan@xfce.org>
+Date: Fri, 2 Jan 2015 18:50:17 +0100
+Subject: [PATCH] Fix subwindow in Xi emulated events
+
+Bug: 70790
+Upstream status: Submitted
+ https://bugs.freedesktop.org/show_bug.cgi?id=70790
+
+Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
+---
+ Xi/exevents.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Xi/exevents.c b/Xi/exevents.c
+index b0bc47e..0857bce 100644
+--- a/Xi/exevents.c
++++ b/Xi/exevents.c
+@@ -1403,7 +1403,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+
+ if (grab->ownerEvents) {
+ WindowPtr focus = NullWindow;
+- WindowPtr sprite_win = dev->spriteInfo->sprite->win;
++ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
+
+ deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev);
+ }
+@@ -1429,8 +1429,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+ }
+ else {
+ GrabPtr devgrab = dev->deviceGrab.grab;
++ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
+
+- DeliverDeviceEvents(win, ptrev, grab, win, dev);
++ DeliverDeviceEvents(sprite_win, ptrev, grab, win, dev);
+ /* FIXME: bad hack
+ * Implicit passive grab activated in response to this event. Store
+ * the event.
+--
+2.1.0
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch
deleted file mode 100644
index 045e24a281..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Subject: Add AArch64 support to xserver-xorg
-Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-lnx_video.c parts are not existing in 1.14 branch.
-
-Xserver was checked in AArch64 fastmodel (commercial one with graphics support).
-
-http://patchwork.freedesktop.org/patch/12785/
-
-Upstream-Status: Pending
-
----
- include/servermd.h | 7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
---- xorg-server-1.13.1.orig/include/servermd.h
-+++ xorg-server-1.13.1/include/servermd.h
-@@ -243,10 +243,17 @@ SOFTWARE.
- #define BITMAP_BIT_ORDER LSBFirst
- #define GLYPHPADBYTES 4
- /* ???? */
- #endif /* AMD64 */
-
-+#if defined(__aarch64__) || defined(aarch64) || defined(__aarch64)
-+#define IMAGE_BYTE_ORDER MSBFirst
-+#define BITMAP_BIT_ORDER MSBFirst
-+#define GLYPHPADBYTES 4
-+/* ???? */
-+#endif /* AArch64 */
-+
- #if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
- defined(__alpha__) || defined(__alpha) || \
- defined(__i386__) || \
- defined(__s390x__) || defined(__s390__)
-
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch
deleted file mode 100644
index 2f98bb8c89..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff --git a/configure.ac b/configure.ac
-index b3b752c..600500b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
- dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
- dnl compiling, assume default font path uses standard FONTROOTDIR directories.
- DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
--if test "$cross_compiling" != yes; then
-- AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
-- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
-- [case $host_os in
-+ case $host_os in
- darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
-- esac])
--fi
-+ esac
- AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
- [ FONTPATH="$withval" ],
- [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch
deleted file mode 100644
index 168368e6c3..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-on mips64/n64 pointers are 64bit therefore the pointer conversions to int dont work well
-so we end up with incompatible conversion errors
-
-This patch choses the right values for mips64
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: xorg-server-1.13.0/hw/xfree86/common/compiler.h
-===================================================================
---- xorg-server-1.13.0-orig/hw/xfree86/common/compiler.h 2012-06-14 23:04:29.000000000 +0300
-+++ xorg-server-1.13.0/hw/xfree86/common/compiler.h 2012-11-08 10:06:50.865831783 +0200
-@@ -101,6 +101,7 @@
- #if defined(NO_INLINE) || defined(DO_PROTOTYPES)
- #if !defined(__arm__)
- #if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \
-+ && !defined(__mips64) \
- && !(defined(__alpha__) && defined(linux)) \
- && !(defined(__ia64__) && defined(linux)) \
-
-@@ -721,7 +722,7 @@
- }
-
- #elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
--#ifdef __arm32__
-+#if defined (__arm32__) || defined (__mips64)
- #define PORT_SIZE long
- #else
- #define PORT_SIZE short
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
index 55e09134ce..682ddf7006 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
@@ -1,7 +1,7 @@
Upstream-Status: Submitted
Signed-off-by: Ross Burton <ross.burton@intel.com>
-commit 1affe20d5c82befc3b1626e557409dab5343c47b
+commit ca29a9f3e689f3840426897f58aaa3974932ae78
Author: Ross Burton <ross.burton@intel.com>
Date: Mon Jul 7 12:53:35 2014 +0100
@@ -13,7 +13,7 @@ Date: Mon Jul 7 12:53:35 2014 +0100
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/configure.ac b/configure.ac
-index 2daa6be..fd1cf3f 100644
+index c214638..a1ca9ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -648,6 +648,7 @@ AC_ARG_ENABLE(kdrive-kbd, AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd d
@@ -24,24 +24,18 @@ index 2daa6be..fd1cf3f 100644
dnl chown/chmod to be setuid root as part of build
-@@ -1235,18 +1236,19 @@ esac
+@@ -1235,18 +1236,21 @@ esac
AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes)
-PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
- [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
-+HAVE_XSHMFENCE=no
-+if test "x$WANT_XSHMFENCE" != "xno"; then
-+ PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
-+ [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
-
-+ if test "$WANT_XSHMFENCE,$HAVE_XSHMFENCE" = "yes,no"; then
-+ AC_MSG_ERROR([libxshmfence requested but not found.])
-+ fi
-+ AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
-+ REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+
+-AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
++PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE, [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
++if test "x$WANT_XSHMFENCE" = "xauto"; then
++ WANT_XSHMFENCE="$HAVE_XSHMFENCE"
+fi
- AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
-case x"$HAVE_XSHMFENCE" in
- xyes)
@@ -49,7 +43,15 @@ index 2daa6be..fd1cf3f 100644
- REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
- ;;
-esac
--
++if test "x$WANT_XSHMFENCE" = "xyes"; then
++ if test "x$HAVE_XSHMFENCE" != "xyes"; then
++ AC_MSG_ERROR([xshmfence requested but not installed.])
++ fi
++ AC_DEFINE(HAVE_XSHMFENCE, 1, [Have xshmfence support])
++ REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
++fi
+
++AM_CONDITIONAL(XSHMFENCE, [test "x$WANT_XSHMFENCE" = xyes])
case "$DRI3,$HAVE_XSHMFENCE" in
yes,yes | auto,yes)
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb
index 22ac604433..7d7d83e97b 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb
@@ -1,16 +1,14 @@
require xserver-xorg.inc
# Misc build failure for master HEAD
-SRC_URI += "file://crosscompile.patch \
- file://fix_open_max_preprocessor_error.patch \
- file://mips64-compiler.patch \
- file://aarch64.patch \
+SRC_URI += "file://fix_open_max_preprocessor_error.patch \
file://xorg-CVE-2013-6424.patch \
file://xshmfence-option.patch \
+ file://Fix-subwindow-in-Xi-emulated-events.patch \
"
-SRC_URI[md5sum] = "e4c70262ed89764be8f8f5d699ed9227"
-SRC_URI[sha256sum] = "626db6882602ebe1ff81f7a4231c7ccc6ceb5032f2b5b3954bf749e1567221e2"
+SRC_URI[md5sum] = "89620960b13515db8d0a8dbb92a1378a"
+SRC_URI[sha256sum] = "446e0c3ebd556aced78ec0000ba9ae73f1e5317117d497f827afba48b787ce64"
# These extensions are now integrated into the server, so declare the migration
# path for in-place upgrades.
diff --git a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index b9c7c20c2b..037d161340 100644
--- a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -59,8 +59,12 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
INCS = -I. -I.. -I../btt
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-@@ -35,7 +36,7 @@ btrecord: btrecord.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+@@ -32,10 +33,10 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
btreplay: btreplay.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
index 946faac7d2..6a93a35a39 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
@@ -9,3 +9,5 @@ SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea"
SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f"
S = "${WORKDIR}/cryptodev-linux-${PV}"
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 3eca25fe41..0c409b0c0b 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -4,15 +4,19 @@ SECTION = "bootloader"
LICENSE = "GPLv2 | BSD"
DEPENDS = "flex-native bison-native"
-inherit autotools-brokensep
-
-SRC_URI = "git://www.jdl.com/software/dtc.git \
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
file://make_install.patch \
"
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}"'
+EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
S = "${WORKDIR}/git"
+do_install () {
+ oe_runmake install
+}
+
PACKAGES =+ "${PN}-misc"
FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
+
+RDEPENDS_${PN}-misc += "bash"
diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb
index 0bd3acf6c0..4446142a30 100644
--- a/meta/recipes-kernel/dtc/dtc_git.bb
+++ b/meta/recipes-kernel/dtc/dtc_git.bb
@@ -3,8 +3,8 @@ require dtc.inc
LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-SRCREV = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
-PV = "1.4.0+git${SRCPV}"
+SRCREV = "302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2"
+PV = "1.4.1+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 1a2f881c7a..ce872354f2 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70c
DEPENDS = "git-native"
-SRCREV = "a42509b01ccfe5020a226b23d3a52c07b3fb2051"
+SRCREV = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index 50b448caed..7797a25738 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -10,8 +10,21 @@ DEPENDS = "zlib xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz"
-inherit autotools-brokensep
+PR = "r1"
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+inherit autotools
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
INSANE_SKIP_${PN} = "arch"
+
+do_compile_prepend() {
+ # Remove the '*.d' file to make sure the recompile is OK
+ for dep in `find ${B} -type f -name '*.d'`; do
+ dep_no_d="`echo $dep | sed 's#.d$##'`"
+ # Remove file.d when there is a file.o
+ if [ -f "$dep_no_d.o" ]; then
+ rm -f $dep
+ fi
+ done
+}
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
new file mode 100644
index 0000000000..b697a54b90
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
@@ -0,0 +1,801 @@
+From: Geoff Levand <geoff@infradead.org>
+Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700)
+Subject: Add arm64 support
+X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
+
+Add arm64 support
+
+Signed-off-by: Geoff Levand <geoff@infradead.org>
+
+Get patch from:
+https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+
+Index: kexec-tools-2.0.4/configure.ac
+===================================================================
+--- kexec-tools-2.0.4.orig/configure.ac
++++ kexec-tools-2.0.4/configure.ac
+@@ -30,6 +30,9 @@ case $target_cpu in
+ powerpc64 )
+ ARCH="ppc64"
+ ;;
++ aarch64 )
++ ARCH="arm64"
++ ;;
+ arm* )
+ ARCH="arm"
+ ;;
+Index: kexec-tools-2.0.4/kexec/Makefile
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/Makefile
++++ kexec-tools-2.0.4/kexec/Makefile
+@@ -70,6 +70,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
+
+ include $(srcdir)/kexec/arch/alpha/Makefile
+ include $(srcdir)/kexec/arch/arm/Makefile
++include $(srcdir)/kexec/arch/arm64/Makefile
+ include $(srcdir)/kexec/arch/i386/Makefile
+ include $(srcdir)/kexec/arch/ia64/Makefile
+ include $(srcdir)/kexec/arch/mips/Makefile
+Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/Makefile
+@@ -0,0 +1,13 @@
++
++arm64_KEXEC_SRCS += \
++ kexec/arch/arm64/kexec-arm64.c \
++ kexec/arch/arm64/kexec-elf-arm64.c \
++ kexec/arch/arm64/crashdump-arm64.c
++
++arm64_ARCH_REUSE_INITRD =
++arm64_ADD_SEGMENT =
++arm64_VIRT_TO_PHYS =
++
++dist += $(arm64_KEXEC_SRCS) \
++ kexec/arch/arm64/Makefile \
++ kexec/arch/arm64/kexec-arm64.h
+Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c
+@@ -0,0 +1,305 @@
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation (version 2 of the License).
++ */
++
++#include "../../kexec.h"
++#include "../../kexec-elf.h"
++#include "../../crashdump.h"
++
++int is_crashkernel_mem_reserved(void)
++{
++ return 0;
++}
++
++#if 0
++/*
++ * Used to save various memory ranges/regions needed for the captured
++ * kernel to boot. (lime memmap= option in other archs)
++ */
++static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
++struct memory_ranges usablemem_rgns = {
++ .size = 0,
++ .ranges = crash_memory_ranges,
++};
++
++/* memory range reserved for crashkernel */
++static struct memory_range crash_reserved_mem;
++
++static struct crash_elf_info elf_info = {
++ .class = ELFCLASS32,
++ .data = ELFDATA2LSB,
++ .machine = EM_ARM,
++ .page_offset = PAGE_OFFSET,
++};
++
++unsigned long phys_offset;
++
++/**
++ * crash_range_callback() - callback called for each iomem region
++ * @data: not used
++ * @nr: not used
++ * @str: name of the memory region
++ * @base: start address of the memory region
++ * @length: size of the memory region
++ *
++ * This function is called once for each memory region found in /proc/iomem. It
++ * locates system RAM and crashkernel reserved memory and places these to
++ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory
++ * regions is placed in @crash_memory_nr_ranges.
++ */
++static int crash_range_callback(void *UNUSED(data), int UNUSED(nr),
++ char *str, unsigned long base,
++ unsigned long length)
++{
++ struct memory_range *range;
++
++ if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES)
++ return 1;
++
++ range = usablemem_rgns.ranges + usablemem_rgns.size;
++
++ if (strncmp(str, "System RAM\n", 11) == 0) {
++ range->start = base;
++ range->end = base + length - 1;
++ range->type = RANGE_RAM;
++ usablemem_rgns.size++;
++ } else if (strncmp(str, "Crash kernel\n", 13) == 0) {
++ crash_reserved_mem.start = base;
++ crash_reserved_mem.end = base + length - 1;
++ crash_reserved_mem.type = RANGE_RAM;
++ }
++
++ return 0;
++}
++
++/**
++ * crash_exclude_range() - excludes memory region reserved for crashkernel
++ *
++ * Function locates where crashkernel reserved memory is and removes that region
++ * from the available memory regions.
++ */
++static void crash_exclude_range(void)
++{
++ const struct memory_range *range = &crash_reserved_mem;
++ int i;
++
++ for (i = 0; i < usablemem_rgns.size; i++) {
++ struct memory_range *r = usablemem_rgns.ranges + i;
++
++ /*
++ * We assume that crash area is fully contained in
++ * some larger memory area.
++ */
++ if (r->start <= range->start && r->end >= range->end) {
++ struct memory_range *new;
++ /*
++ * Let's split this area into 2 smaller ones and
++ * remove excluded range from between. First create
++ * new entry for the remaining area.
++ */
++ new = usablemem_rgns.ranges + usablemem_rgns.size;
++ new->start = range->end + 1;
++ new->end = r->end;
++ usablemem_rgns.size++;
++ /*
++ * Next update this area to end before excluded range.
++ */
++ r->end = range->start - 1;
++ break;
++ }
++ }
++}
++
++static int range_cmp(const void *a1, const void *a2)
++{
++ const struct memory_range *r1 = a1;
++ const struct memory_range *r2 = a2;
++
++ if (r1->start > r2->start)
++ return 1;
++ if (r1->start < r2->start)
++ return -1;
++
++ return 0;
++}
++
++/**
++ * crash_get_memory_ranges() - read system physical memory
++ *
++ * Function reads through system physical memory and stores found memory regions
++ * in @crash_memory_ranges. Number of memory regions found is placed in
++ * @crash_memory_nr_ranges. Regions are sorted in ascending order.
++ *
++ * Returns %0 in case of success and %-1 otherwise (errno is set).
++ */
++static int crash_get_memory_ranges(void)
++{
++ /*
++ * First read all memory regions that can be considered as
++ * system memory including the crash area.
++ */
++ kexec_iomem_for_each_line(NULL, crash_range_callback, NULL);
++
++ if (usablemem_rgns.size < 1) {
++ errno = EINVAL;
++ return -1;
++ }
++
++ /*
++ * Exclude memory reserved for crashkernel (this may result a split memory
++ * region).
++ */
++ crash_exclude_range();
++
++ /*
++ * Make sure that the memory regions are sorted.
++ */
++ qsort(usablemem_rgns.ranges, usablemem_rgns.size,
++ sizeof(*usablemem_rgns.ranges), range_cmp);
++
++ return 0;
++}
++
++/**
++ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline
++ * @cmdline: buffer where parameter is placed
++ * @elfcorehdr: physical address of elfcorehdr
++ *
++ * Function appends 'elfcorehdr=start' at the end of the command line given in
++ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
++ * (inclunding %NUL).
++ */
++static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr)
++{
++ char buf[COMMAND_LINE_SIZE];
++ int buflen;
++
++ buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx",
++ cmdline, elfcorehdr);
++ if (buflen < 0)
++ die("Failed to construct elfcorehdr= command line parameter\n");
++ if (buflen >= sizeof(buf))
++ die("Command line overflow\n");
++
++ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
++ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
++}
++
++/**
++ * cmdline_add_mem() - adds mem= parameter to kernel command line
++ * @cmdline: buffer where parameter is placed
++ * @size: size of the kernel reserved memory (in bytes)
++ *
++ * This function appends 'mem=size' at the end of the command line given in
++ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
++ * (including %NUL).
++ */
++static void cmdline_add_mem(char *cmdline, unsigned long size)
++{
++ char buf[COMMAND_LINE_SIZE];
++ int buflen;
++
++ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10);
++ if (buflen < 0)
++ die("Failed to construct mem= command line parameter\n");
++ if (buflen >= sizeof(buf))
++ die("Command line overflow\n");
++
++ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
++ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
++}
++
++static unsigned long long range_size(const struct memory_range *r)
++{
++ return r->end - r->start + 1;
++}
++
++static void dump_memory_ranges(void)
++{
++ int i;
++
++ if (!kexec_debug)
++ return;
++
++ dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
++ crash_reserved_mem.start, crash_reserved_mem.end,
++ (unsigned long)range_size(&crash_reserved_mem) >> 20);
++
++ for (i = 0; i < usablemem_rgns.size; i++) {
++ struct memory_range *r = usablemem_rgns.ranges + i;
++ dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n",
++ r->start, r->end, (unsigned long)range_size(r) >> 20);
++ }
++}
++
++/**
++ * load_crashdump_segments() - loads additional segments needed for kdump
++ * @info: kexec info structure
++ * @mod_cmdline: kernel command line
++ *
++ * This function loads additional segments which are needed for the dump capture
++ * kernel. It also updates kernel command line passed in @mod_cmdline to have
++ * right parameters for the dump capture kernel.
++ *
++ * Return %0 in case of success and %-1 in case of error.
++ */
++int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
++{
++ unsigned long elfcorehdr;
++ unsigned long bufsz;
++ void *buf;
++ int err;
++
++ /*
++ * First fetch all the memory (RAM) ranges that we are going to pass to
++ * the crashdump kernel during panic.
++ */
++ err = crash_get_memory_ranges();
++ if (err)
++ return err;
++
++ /*
++ * Now that we have memory regions sorted, we can use first memory
++ * region as PHYS_OFFSET.
++ */
++ phys_offset = usablemem_rgns.ranges->start;
++ dbgprintf("phys_offset: %#lx\n", phys_offset);
++
++ err = crash_create_elf32_headers(info, &elf_info,
++ usablemem_rgns.ranges,
++ usablemem_rgns.size, &buf, &bufsz,
++ ELF_CORE_HEADER_ALIGN);
++ if (err)
++ return err;
++
++ /*
++ * We allocate ELF core header from the end of the memory area reserved
++ * for the crashkernel. We align the header to SECTION_SIZE (which is
++ * 1MB) so that available memory passed in kernel command line will be
++ * aligned to 1MB. This is because kernel create_mapping() wants memory
++ * regions to be aligned to SECTION_SIZE.
++ */
++ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
++ crash_reserved_mem.start,
++ crash_reserved_mem.end, -1, 0);
++
++ dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
++ cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
++
++ /*
++ * Add 'mem=size' parameter to dump capture kernel command line. This
++ * prevents the dump capture kernel from using any other memory regions
++ * which belong to the primary kernel.
++ */
++ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
++
++ dump_memory_ranges();
++ dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
++
++ return 0;
++}
++
++#endif
++
+Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
+@@ -0,0 +1,26 @@
++#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
++#define KEXEC_ARCH_ARM64_OPTIONS_H
++
++//#define OPT_ARCH_MAX ((OPT_MAX)+0)
++
++#define OPT_APPEND ((OPT_MAX)+0)
++#define OPT_RAMDISK ((OPT_MAX)+1)
++#define OPT_DTB ((OPT_MAX)+2)
++
++#define OPT_ARCH_MAX ((OPT_MAX)+3)
++
++
++#define KEXEC_ARCH_OPTIONS \
++ KEXEC_OPTIONS \
++ { "append", 1, NULL, OPT_APPEND }, \
++ { "command-line", 1, NULL, OPT_APPEND }, \
++ { "dtb", 1, NULL, OPT_DTB }, \
++ { "initrd", 1, NULL, OPT_RAMDISK }, \
++ { "ramdisk", 1, NULL, OPT_RAMDISK }, \
++
++#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */
++
++#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS
++#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
++
++#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
+Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
+@@ -0,0 +1,177 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#define _GNU_SOURCE
++
++#include <errno.h>
++#include <stddef.h>
++
++//#include <linux/kexec.h>
++
++#include "../../kexec.h"
++#include "../../kexec-syscall.h"
++#include "kexec-arm64.h"
++
++
++void arch_usage(void)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ printf(
++" --append=STRING Set the kernel command line to STRING.\n"
++" --command-line=STRING Set the kernel command line to STRING.\n"
++" --dtb=FILE Use FILE as the device tree blob.\n"
++" --initrd=FILE Use FILE as the kernel initial ramdisk.\n"
++" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n");
++
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
++
++int arch_process_options(int UNUSED(argc), char **UNUSED(argv))
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++const struct arch_map_entry arches[] = {
++ { "aarch64", KEXEC_ARCH_ARM64 },
++ { NULL, 0 },
++};
++
++void arch_update_purgatory(struct kexec_info *UNUSED(info))
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++}
++
++unsigned long virt_to_phys(unsigned long addr)
++{
++ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr,
++ addr + 0x080000000UL);
++ return addr + 0x080000000UL;
++}
++
++void add_segment(struct kexec_info *info, const void *buf, size_t bufsz,
++ unsigned long base, size_t memsz)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
++
++static int get_memory_ranges_1(struct memory_range **range, int *ranges,
++ unsigned long kexec_flags)
++{
++ static struct memory_range memory_range[KEXEC_SEGMENT_MAX];
++ const char *iomem;
++ int range_count = 0;
++ char line[MAX_LINE];
++ FILE *fp;
++
++ iomem = proc_iomem();
++ fp = fopen(iomem, "r");
++
++ if (!fp) {
++ fprintf(stderr, "Cannot open %s: %s\n",
++ iomem, strerror(errno));
++ return -1;
++ }
++
++ dbgprintf("memory ranges:\n");
++
++ while(fgets(line, sizeof(line), fp) != 0) {
++ struct memory_range r;
++ char *str;
++ int consumed;
++
++ if (range_count >= KEXEC_SEGMENT_MAX)
++ break;
++
++ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed)
++ != 2)
++ continue;
++
++ str = line + consumed;
++ r.end++;
++
++ if (memcmp(str, "System RAM\n", 11)) {
++ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end,
++ str);
++ continue;
++ }
++
++ r.type = RANGE_RAM;
++ memory_range[range_count] = r;
++ range_count++;
++
++ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str);
++ }
++
++ fclose(fp);
++ *range = memory_range;
++ *ranges = range_count;
++
++ return 0;
++}
++
++static int get_memory_ranges_2(struct memory_range **range, int *ranges,
++ unsigned long UNUSED(kexec_flags))
++{
++ static struct memory_range memory_range[2];
++
++ memory_range[0].start = 0x080000000;
++ memory_range[0].end = 0x100000000;
++ memory_range[0].type = RANGE_RAM;
++
++ memory_range[1].start = 0x900000000;
++ memory_range[1].end = 0x880000000;
++ memory_range[1].type = RANGE_RAM;
++
++ *range = memory_range;
++ *ranges = sizeof(memory_range) / sizeof(memory_range[0]);
++
++ return 0;
++}
++
++int get_memory_ranges(struct memory_range **range, int *ranges,
++ unsigned long kexec_flags)
++{
++ /* FIXME: Should get this info from device tree. */
++
++ return get_memory_ranges_1(range, ranges, kexec_flags);
++}
++
++struct file_type file_type[] = {
++ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage },
++};
++
++int file_types = sizeof(file_type) / sizeof(file_type[0]);
++
++int arch_compat_trampoline(struct kexec_info *info)
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++void arch_reuse_initrd(void)
++{
++}
++
++int machine_verify_elf_rel(struct mem_ehdr *ehdr)
++{
++ (void)ehdr;
++
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
++ void *location, unsigned long address, unsigned long value)
++{
++ (void)ehdr;
++ (void)r_type;
++ (void)location;
++ (void)address;
++ (void)value;
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++}
+Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
+@@ -0,0 +1,20 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#if !defined(KEXEC_ARM64_H)
++#define KEXEC_ARM64_H
++
++/* #include <linux/kexec.h> FIXME: this is broken */
++#include <sys/types.h>
++
++#include "../../kexec.h"
++
++#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */
++
++int elf_arm64_probe(const char *buf, off_t len);
++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info);
++void elf_arm64_usage(void);
++
++#endif
+\ No newline at end of file
+Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
+@@ -0,0 +1,114 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#define _GNU_SOURCE
++
++#include <elf.h>
++#include <getopt.h>
++
++#include "../../kexec-syscall.h"
++
++#include "kexec-arm64.h"
++#include "arch/options.h"
++
++#if !defined(EM_AARCH64)
++# define EM_AARCH64 183
++#endif
++
++int elf_arm64_probe(const char *buf, off_t len)
++{
++ int result;
++ struct mem_ehdr ehdr;
++
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ result = build_elf_exec_info(buf, len, &ehdr, 0);
++
++ if (result < 0) {
++ dbgprintf("Not an ELF executable\n");
++ goto out;
++ }
++
++ if (ehdr.e_machine != EM_AARCH64) {
++ dbgprintf("Not an AARCH64 executable\n");
++ result = -1;
++ goto out;
++ }
++
++ result = 0;
++
++out:
++ free_elf_info(&ehdr);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++ return result;
++}
++
++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info)
++{
++ static const struct option options[] = {
++ KEXEC_ARCH_OPTIONS
++ { 0 }
++ };
++ static const char short_options[] = KEXEC_OPT_STR "";
++ const char *command_line = NULL;
++ unsigned int command_line_len = 0;
++ const char *ramdisk = NULL;
++ const char *dtb = NULL;
++ int opt;
++ struct mem_ehdr ehdr;
++ int result;
++
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ while ((opt = getopt_long(argc, argv, short_options, options, 0))
++ != -1) {
++ switch (opt) {
++ default:
++ if (opt < OPT_MAX) /* Ignore core options */
++ break;
++ case OPT_APPEND:
++ command_line = optarg;
++ command_line_len = strlen(command_line) + 1;
++ break;
++ case OPT_RAMDISK:
++ ramdisk = optarg;
++ break;
++ case OPT_DTB:
++ dtb = optarg;
++ break;
++ }
++ }
++
++ fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line);
++ fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk);
++ fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb);
++
++ if (info->kexec_flags & KEXEC_ON_CRASH) {
++ fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
++ return -1;
++ }
++
++ result = build_elf_exec_info(buf, len, &ehdr, 0);
++
++ if (result < 0) {
++ free_elf_info(&ehdr);
++ fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__,
++ __LINE__);
++ return result;
++ }
++
++ elf_exec_build_load(info, &ehdr, buf, len, 0);
++
++ info->entry = (void*)0x80080000UL; // FIXME
++
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++ return 0;
++}
++
++void elf_arm64_usage(void)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
+Index: kexec-tools-2.0.4/kexec/kexec-syscall.h
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec-syscall.h
++++ kexec-tools-2.0.4/kexec/kexec-syscall.h
+@@ -39,8 +39,8 @@
+ #ifdef __s390__
+ #define __NR_kexec_load 277
+ #endif
+-#ifdef __arm__
+-#define __NR_kexec_load __NR_SYSCALL_BASE + 347
++#if defined(__arm__) || defined(__arm64__)
++#define __NR_kexec_load __NR_SYSCALL_BASE + 347
+ #endif
+ #if defined(__mips__)
+ #define __NR_kexec_load 4311
+@@ -72,6 +72,8 @@ static inline long kexec_load(void *entr
+ #define KEXEC_ARCH_PPC64 (21 << 16)
+ #define KEXEC_ARCH_IA_64 (50 << 16)
+ #define KEXEC_ARCH_ARM (40 << 16)
++#define KEXEC_ARCH_ARM64 (183 << 16)
++/* #define KEXEC_ARCH_AARCH64 (183 << 16) */
+ #define KEXEC_ARCH_S390 (22 << 16)
+ #define KEXEC_ARCH_SH (42 << 16)
+ #define KEXEC_ARCH_MIPS_LE (10 << 16)
+@@ -114,5 +116,8 @@ static inline long kexec_load(void *entr
+ #if defined(__mips__)
+ #define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS
+ #endif
++#if defined(__arm64__)
++#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
++#endif
+
+ #endif /* KEXEC_SYSCALL_H */
+Index: kexec-tools-2.0.4/kexec/kexec.c
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec.c
++++ kexec-tools-2.0.4/kexec/kexec.c
+@@ -659,6 +659,8 @@ static int my_load(const char *type, int
+ info.backup_start = 0;
+ info.kexec_flags = kexec_flags;
+
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++
+ result = 0;
+ if (argc - fileind <= 0) {
+ fprintf(stderr, "No kernel specified\n");
+Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
+@@ -0,0 +1,7 @@
++#
++# Purgatory arm64
++#
++
++arm64_PURGATORY_SRCS =
++
++dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
+Index: kexec-tools-2.0.4/configure
+===================================================================
+--- kexec-tools-2.0.4.orig/configure
++++ kexec-tools-2.0.4/configure
+@@ -2256,6 +2256,9 @@ case $target_cpu in
+ powerpc64 )
+ ARCH="ppc64"
+ ;;
++ aarch64 )
++ ARCH="arm64"
++ ;;
+ arm* )
+ ARCH="arm"
+ ;;
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb
deleted file mode 100644
index a5c1ced494..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch"
-
-SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab"
-SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0"
-
-PACKAGES =+ "kexec kdump"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump"
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb
new file mode 100644
index 0000000000..c478732300
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb
@@ -0,0 +1,19 @@
+require kexec-tools.inc
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
+ file://kexec-aarch64.patch \
+ "
+
+SRC_URI[md5sum] = "45bd2bc676ae202579e4c185563126af"
+SRC_URI[sha256sum] = "95083c707577154a2241c5af0985f1eb3412d1ba208ef91813e9158b0a901179"
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump"
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index ec20bf8d30..44b7650e4e 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -19,21 +19,21 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/kernel-abiversion" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
else
- kernelabi=\$(cat ${STAGING_KERNEL_DIR}/kernel-abiversion)
+ kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
if [ "\$kernelabi" != "\$4" ]; then
echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
exit 1
fi
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/System.map-\$4 ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/System.map-\$4" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
- exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_KERNEL_DIR}/System.map-\$4" "\$4"
+ exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
fi
EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 504a32fcee..899881e1fb 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -11,14 +11,14 @@ SECTION = "base"
DEPENDS += "pkgconfig-native"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
inherit autotools gtk-doc ptest
-SRCREV = "49d8e0b59052999de577ab732b719cfbeb89504d"
+SRCREV = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
# Lookout for PV bump too when SRCREV is changed
-PV = "17+git${SRCPV}"
+PV = "19+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
@@ -31,7 +31,10 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
S = "${WORKDIR}/git"
EXTRA_AUTORECONF += "--install --symlink"
-EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib"
+EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
do_configure_prepend () {
gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make
diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
index 2320b92eba..7c0a27510b 100644
--- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
+++ b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
@@ -1,6 +1,6 @@
-From 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Tue, 10 Sep 2013 13:44:18 +0800
+From 4b68940b1ed46c54a5a0bdf6bb9d4599bc64e6f4 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 24 Dec 2014 10:12:40 +0800
Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh
We can't use htobe* and be*toh functions because they are not
@@ -11,12 +11,13 @@ Change to directly calling bswap_* as defined in+byteswap.h.
Upstream-Status: Inappropriate
Signed-off-by: Ting Liu <b28495@freescale.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- libkmod/libkmod-signature.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
+ libkmod/libkmod-signature.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
-index 6b80caa..3544a36 100644
+index 2b976a5..ffe58c2 100644
--- a/libkmod/libkmod-signature.c
+++ b/libkmod/libkmod-signature.c
@@ -19,6 +19,7 @@
@@ -24,10 +25,10 @@ index 6b80caa..3544a36 100644
#include <endian.h>
+#include <byteswap.h>
- #include <stdint.h>
+ #include <inttypes.h>
+ #include <stdio.h>
#include <stdlib.h>
- #include <string.h>
-@@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
+@@ -124,7 +125,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
modsig->hash >= PKEY_HASH__LAST ||
modsig->id_type >= PKEY_ID_TYPE__LAST)
return false;
@@ -37,5 +38,5 @@ index 6b80caa..3544a36 100644
return false;
--
-1.7.5.4
+1.9.1
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
index 37adec3d2f..598dd2cb5f 100755
--- a/meta/recipes-kernel/kmod/kmod/run-ptest
+++ b/meta/recipes-kernel/kmod/kmod/run-ptest
@@ -1,3 +1,5 @@
#!/bin/sh
touch testsuite/stamp-rootfs
+tar xf testmodule.tar
make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL
+find testsuite -name *.ko -exec rm -f {} \;
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
index d4c21a4387..08dd81569c 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -34,6 +34,10 @@ do_install_append () {
# install depmod.d file for search/ dir
install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
+ if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+ find testsuite -name *.ko -exec tar rf testmodule.tar {} \;
+ find testsuite -name *.ko -exec rm -f {} \;
+ fi
}
do_compile_prepend() {
@@ -44,7 +48,10 @@ do_compile_ptest () {
oe_runmake buildtest-TESTS rootfs
}
-INHIBIT_PACKAGE_STRIP = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
+do_install_ptest () {
+ install testmodule.tar ${D}${PTEST_PATH}
+}
+
INSANE_SKIP_${PN}-ptest = "arch"
inherit update-alternatives
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index 516e2c5267..cb0a3c5ed1 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -4,18 +4,22 @@ HOMEPAGE = "http://www.latencytop.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
-DEPENDS = "virtual/libintl ncurses glib-2.0 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+DEPENDS = "virtual/libintl ncurses glib-2.0"
PR = "r3"
-SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
file://latencytop-makefile.patch \
file://latencytop-fsync.patch"
SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-EXTRA_OEMAKE_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'HAS_GTK_GUI=1', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
+PACKAGECONFIG[x11] = ",,gtk+"
+
+EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
CFLAGS += "${LDFLAGS}"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index a107f804fa..16ebf6ad6b 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
- file://LICENCE.iwlwifi_firmware;md5=8b938534f77ffd453690eb34ed84ae8b \
+ file://LICENCE.iwlwifi_firmware;md5=5106226b2863d00d8ed553221ddf8cd2 \
file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
@@ -24,7 +24,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
"
-SRCREV = "dec41bce44e0dff6a2c3358a958fadf22bf58858"
+SRCREV = "0e5f63771d0df6d7859f7c4100a74d737c62ac88"
PE = "1"
PV = "0.0+git${SRCPV}"
@@ -34,6 +34,8 @@ S = "${WORKDIR}/git"
inherit allarch update-alternatives
+CLEANBROKEN = "1"
+
do_compile() {
:
}
@@ -42,7 +44,7 @@ do_install() {
install -d ${D}/lib/firmware/
cp -r * ${D}/lib/firmware/
- # Avoid Makefile to be deplyed
+ # Avoid Makefile to be deployed
rm ${D}/lib/firmware/Makefile
# Remove unbuild firmware which needs cmake and bash
@@ -67,9 +69,13 @@ PACKAGES =+ "${PN}-ralink \
${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 \
${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \
- ${PN}-iwlwifi-license ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2b-6 ${PN}-iwlwifi-7260-7 \
- ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-135-6"
-
+ ${PN}-iwlwifi-license ${PN}-iwlwifi-135-6 \
+ ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
+ ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
+ ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \
+ ${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9 \
+ ${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9 \
+ "
FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
@@ -208,18 +214,40 @@ RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin"
+RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
-
-FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
+RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-9 = "${PN}-iwlwifi-license"
+
+FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
+FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
+FILES_${PN}-iwlwifi-3160-7 = "/lib/firmware/iwlwifi-3160-7.ucode"
+FILES_${PN}-iwlwifi-3160-8 = "/lib/firmware/iwlwifi-3160-8.ucode"
+FILES_${PN}-iwlwifi-3160-9 = "/lib/firmware/iwlwifi-3160-9.ucode"
+FILES_${PN}-iwlwifi-6000-4 = "/lib/firmware/iwlwifi-6000-4.ucode"
FILES_${PN}-iwlwifi-6000g2a-5 = "/lib/firmware/iwlwifi-6000g2a-5.ucode"
FILES_${PN}-iwlwifi-6000g2a-6 = "/lib/firmware/iwlwifi-6000g2a-6.ucode"
+FILES_${PN}-iwlwifi-6000g2b-5 = "/lib/firmware/iwlwifi-6000g2b-5.ucode"
FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode"
-FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
+FILES_${PN}-iwlwifi-6050-4 = "/lib/firmware/iwlwifi-6050-4.ucode"
+FILES_${PN}-iwlwifi-6050-5 = "/lib/firmware/iwlwifi-6050-5.ucode"
FILES_${PN}-iwlwifi-7260-7 = "/lib/firmware/iwlwifi-7260-7.ucode"
+FILES_${PN}-iwlwifi-7260-8 = "/lib/firmware/iwlwifi-7260-8.ucode"
+FILES_${PN}-iwlwifi-7260-9 = "/lib/firmware/iwlwifi-7260-9.ucode"
+FILES_${PN}-iwlwifi-7265-8 = "/lib/firmware/iwlwifi-7265-8.ucode"
+FILES_${PN}-iwlwifi-7265-9 = "/lib/firmware/iwlwifi-7265-9.ucode"
FILES_${PN} += "/lib/firmware/*"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb
deleted file mode 100644
index 9ac70af942..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-KORG_ARCHIVE_COMPRESSION = "xz"
-
-require linux-libc-headers.inc
-
-SRC_URI[md5sum] = "b621207b3f6ecbb67db18b13258f8ea8"
-SRC_URI[sha256sum] = "61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa"
-
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb
new file mode 100644
index 0000000000..7332597332
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb
@@ -0,0 +1,7 @@
+KORG_ARCHIVE_COMPRESSION = "xz"
+
+require linux-libc-headers.inc
+
+SRC_URI[md5sum] = "59cc7d0a236b08de743d6d9421f0f2c6"
+SRC_URI[sha256sum] = "a3c8e6aee912bfd2e69abf9df5a06058434a8771bcaa1784b5980bf1b5298e1c"
+
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
new file mode 100644
index 0000000000..e36de1b812
--- /dev/null
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Linux kernel Development Source"
+DESCRIPTION = "Development source linux kernel. When built, this recipe packages the \
+source of the preferred virtual/kernel provider and makes it available for full kernel \
+development or external module builds"
+
+SECTION = "kernel"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit linux-kernel-base
+
+# Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
+inherit module-base
+
+# We need the kernel to be staged (unpacked, patched and configured) before
+# we can grab the source and make the source package. We also need the bits from
+# ${B} not to change while we install, so virtual/kernel must finish do_compile.
+do_install[depends] += "virtual/kernel:do_shared_workdir"
+# Need the source, not just the output of populate_sysroot
+do_install[depends] += "virtual/kernel:do_compile"
+
+# There's nothing to do here, except install the source where we can package it
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
+
+# Define where the kernel headers are installed on the target as well as where
+# they are staged.
+KERNEL_SRC_PATH = "/usr/src/kernel"
+S = "${STAGING_KERNEL_DIR}"
+B = "${STAGING_KERNEL_BUILDDIR}"
+
+KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install() {
+ kerneldir=${D}${KERNEL_SRC_PATH}
+ install -d $kerneldir
+
+ #
+ # Copy the staging dir source (and module build support) into the devsrc structure.
+ # We can keep this copy simple and take everything, since a we'll clean up any build
+ # artifacts afterwards, and the extra i/o is not significant
+ #
+ cd ${B}
+ find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
+ cd ${S}
+ find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
+
+ # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not
+ # The main build artifacts. We clean the directory to avoid QA errors on mismatched
+ # architecture (since scripts and helpers are native format).
+ KBUILD_OUTPUT="$kerneldir"
+ oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
+
+ # As of Linux kernel version 3.0.1, the clean target removes
+ # arch/powerpc/lib/crtsavres.o which is present in
+ # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
+ if [ ${ARCH} = "powerpc" ]; then
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ fi
+}
+# Ensure we don't race against "make scripts" during cpio
+do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
+
+PACKAGES = "kernel-devsrc"
+FILES_${PN} = "${KERNEL_SRC_PATH}"
+RDEPENDS_${PN} = "bc"
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 5d29f5cc12..cc0e4e64a9 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -33,6 +33,10 @@ do_compile () {
:
}
+do_shared_workdir () {
+ :
+}
+
do_install() {
:
}
@@ -45,7 +49,6 @@ do_deploy() {
:
}
-do_bundle_initramfs[nostamp] = "1"
-addtask bundle_initramfs after do_compile
+addtask bundle_initramfs after do_install before do_deploy
addtask deploy after do_install
-
+addtask shared_workdir after do_compile before do_install
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 9b49eee876..00feadedd8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -23,7 +23,6 @@ python () {
}
KBRANCH = "standard/base"
-KBRANCH_DEFAULT = "${KBRANCH}"
KMETA = "meta"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
@@ -36,7 +35,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${K
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "3.14+"
+LINUX_VERSION ?= "3.17+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
index 65a74d3ec7..8acbd2e59b 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/preempt-rt/base"
+KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
+require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "c373b342af7bcbeda346df9598a5b1e9784d362f"
-SRCREV_machine_qemuppc ?= "767da5a30782cc1bc6522cef8aa5fd8130ecc06c"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+SRCREV_machine ?= "94a79d98e40b51466600fb3375ad2908c38dd192"
+SRCREV_machine_qemuppc ?= "c1dcbac7751652784f180fdb91f87bc37fba8c52"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
index 6d5096cd85..7dbf82c3e6 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/preempt-rt/base"
+KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
+require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "5c79217cdf1c16a3cacd28968e8c3e417e994c86"
-SRCREV_machine_qemuppc ?= "1ad208565754a1122df5500246f3142e2a3eff39"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+SRCREV_machine ?= "7f0712d10247ffca8e48e944f49707bcf9117ead"
+SRCREV_machine_qemuppc ?= "8bed2a975d491c963cff56496f7e35f5bcff926f"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-LINUX_VERSION ?= "3.14.5"
+LINUX_VERSION ?= "3.14.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
deleted file mode 100644
index e01ffeec7a..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
-
-LINUX_VERSION ?= "3.4.91"
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-KMETA = "meta"
-
-SRCREV_machine ?= "5993b0a650d24f810edb22bab577287d0c6d4f4b"
-SRCREV_machine_qemuppc ?= "765d61e4883bb6db3be516722465f2e8d1fc73cd"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-PR = "${INC_PR}.1"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-# Omit broken machines from COMPATIBLE_MACHINE
-# qemuppc hangs at boot
-# qemumips panics at boot
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm)"
-
-# Functionality flags
-KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc"
-KERNEL_FEATURES_append_qemux86-64 = " cfg/sound.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
index b70d7bc081..9ea81b8874 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
@@ -1,16 +1,16 @@
+KBRANCH ?= "standard/tiny/base"
+
require recipes-kernel/linux/linux-yocto.inc
-KBRANCH_DEFAULT = "standard/tiny/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
KMETA = "meta"
-SRCREV_machine ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+SRCREV_machine ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
index 7eb90a6929..67bf4624f8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH = "standard/tiny/base"
+KBRANCH ?= "standard/tiny/base"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
-LINUX_VERSION ?= "3.14.5"
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "3.14.24"
KMETA = "meta"
-SRCREV_machine ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+SRCREV_machine ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
new file mode 100644
index 0000000000..1a4f9a8145
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
@@ -0,0 +1,21 @@
+KBRANCH ?= "standard/tiny/base"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "3.17.6"
+
+KMETA = "meta"
+
+SRCREV_machine ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_meta ?= "b81030f9ec2de3dc6c048e142dcbff62e305cc40"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+
+COMPATIBLE_MACHINE = "(qemux86)"
+
+# Functionality flags
+KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb
deleted file mode 100644
index fd5c9f7696..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-# We need lzma (as CONFIG_KERNEL_LZMA=y)
-DEPENDS += "xz-native"
-
-KBRANCH_DEFAULT = "standard/tiny/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-LINUX_VERSION ?= "3.4.91"
-
-KMETA = "meta"
-
-SRCREV_machine ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-PR = "${INC_PR}.1"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-COMPATIBLE_MACHINE = "(qemux86)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 4ed318886f..7416af99f5 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
INC_PR = "r4"
DEPENDS += "xz-native bc-native"
+DEPENDS_append_aarch64 = " libgcc"
+KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.10.bb b/meta/recipes-kernel/linux/linux-yocto_3.10.bb
index 57395b4ebb..978775a7d3 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.10.bb
@@ -1,28 +1,27 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/base"
-KBRANCH_DEFAULT = "standard/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
+require recipes-kernel/linux/linux-yocto.inc
# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "db489eed7f5c86037358cc9d0fefa7b90dbbaa86"
-SRCREV_machine_qemumips ?= "780aac11b3f20ed2f5df3f173b0d02b28a6eb96b"
-SRCREV_machine_qemuppc ?= "48a9dec5fc4cc9c19d12866c6ec560a83df21d85"
-SRCREV_machine_qemux86 ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_machine_qemux86-64 ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_machine_qemumips64 ?= "d4b0d6f727167d7946e03dbfb50fef0891207bd1"
-SRCREV_machine ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc/base"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "f6b075991c91b7c2bb641b389757863e2fd34b8c"
+SRCREV_machine_qemumips ?= "48afdc632312b6cc26fe7bca151cfb66b2ebc308"
+SRCREV_machine_qemuppc ?= "cf35ea9ac92153858dadd2f4ab71cccd3a1fa26b"
+SRCREV_machine_qemux86 ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_machine_qemux86-64 ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_machine_qemumips64 ?= "ebdb374ca5130ef456d0baf75b6fe7a242932d0d"
+SRCREV_machine ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
index 1bdf520a92..5f0a09e973 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
@@ -1,33 +1,35 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/base"
-KBRANCH = "standard/base"
+require recipes-kernel/linux/linux-yocto.inc
# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "2489f1f4d7aa27bf0808d7fa80a50399c643516d"
-SRCREV_machine_qemumips ?= "63b4ca3223d9481baa77f527f50d906d15747141"
-SRCREV_machine_qemuppc ?= "e5dfe8f89b45effe445d04e0f9b391948eb108ae"
-SRCREV_machine_qemux86 ?= "41d5fe27dc3d3e769cb6af01770cac3d75a91e1a"
-SRCREV_machine_qemux86-64 ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_machine_qemumips64 ?= "103df748c6e83d5874a8385592f758feeb818324"
-SRCREV_machine ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc/base"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "6166316d47b859aa38bfecc61f4808828af03937"
+SRCREV_machine_qemuarm64 ?= "902f34d36102a4b2008b776ecae686f80d307e12"
+SRCREV_machine_qemumips ?= "4ececcc09c6550a0896728163907e729d817c2fd"
+SRCREV_machine_qemuppc ?= "1cc5b09f8bb7f40b289d149d370c62dcc8109501"
+SRCREV_machine_qemux86 ?= "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
+SRCREV_machine_qemux86-64 ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_machine_qemumips64 ?= "737272b1dfd361d9ea19812a9717e2798e3c4576"
+SRCREV_machine ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-LINUX_VERSION ?= "3.14.5"
+LINUX_VERSION ?= "3.14.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "meta"
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.17.bb b/meta/recipes-kernel/linux/linux-yocto_3.17.bb
new file mode 100644
index 0000000000..973d8aaa84
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_3.17.bb
@@ -0,0 +1,39 @@
+KBRANCH ?= "standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "a1183153c56ace9f9140c73ce730ec181f78dc0f"
+SRCREV_machine_qemuarm64 ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
+SRCREV_machine_qemumips ?= "18c8db2009f25524a29a5258d041e0442c10817d"
+SRCREV_machine_qemuppc ?= "6d2bbdac0e6560542fa2252d91eee9ae0f17f9c7"
+SRCREV_machine_qemux86 ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_machine_qemux86-64 ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_machine_qemumips64 ?= "2306cb2dd019c8b731879331ba314035a7271e7b"
+SRCREV_machine ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_meta ?= "b81030f9ec2de3dc6c048e142dcbff62e305cc40"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+
+LINUX_VERSION ?= "3.17.6"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "meta"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
deleted file mode 100644
index 1eabf764ef..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH_DEFAULT = "standard/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
-
-# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "192b56b2f529af1be014ea85667c9f3fea0afd53"
-SRCREV_machine_qemumips ?= "58fb8b8fb2f9911cac84cd840d63c8a58bada6ca"
-SRCREV_machine_qemuppc ?= "4fe50989bc8bcb3564ca37c2cffd42ac176b428d"
-SRCREV_machine_qemux86 ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_machine_qemux86-64 ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_machine ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-
-LINUX_VERSION ?= "3.4.91"
-
-PR = "${INC_PR}.5"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "meta"
-
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
deleted file mode 100644
index 258eedd3ba..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: backport
-
-babeltrace: Fix support out of tree builds in babeltrace
-
-Signed-off-by: Lars Persson <larper@axis.com>
-
-diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am
-index c834699..2c6b0bd 100644
---- a/formats/lttng-live/Makefile.am
-+++ b/formats/lttng-live/Makefile.am
-@@ -1,4 +1,4 @@
--AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
-+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
-
- lib_LTLIBRARIES = libbabeltrace-lttng-live.la
-
-
diff --git a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
deleted file mode 100644
index 8e81d2d781..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
-Date: Fri, 16 May 2014 10:10:38 +0800
-Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-The buffers from objstack_alloc will store pointers, so they must
-be aligned on a pointer's size, or else it will cause issues on the
-CPUs which do not support unaligned addresses access.
-
-Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
----
- formats/ctf/metadata/objstack.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c
-index 9e264a4..14d9252 100644
---- a/formats/ctf/metadata/objstack.c
-+++ b/formats/ctf/metadata/objstack.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <babeltrace/list.h>
- #include <babeltrace/babeltrace-internal.h>
-+#include <babeltrace/align.h>
-
- #define OBJSTACK_INIT_LEN 128
- #define OBJSTACK_POISON 0xcc
-@@ -39,7 +40,7 @@ struct objstack_node {
- struct bt_list_head node;
- size_t len;
- size_t used_len;
-- char data[];
-+ char __attribute__ ((aligned (sizeof(void *)))) data[];
- };
-
- BT_HIDDEN
-@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len)
- struct objstack_node *last_node;
- void *p;
-
-+ len = ALIGN(len, sizeof(void *));
-+
- /* Get last node */
- last_node = bt_list_entry(objstack->head.prev,
- struct objstack_node, node);
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
index a8ea4cb213..f616146393 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
@@ -8,15 +8,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
inherit autotools pkgconfig
-DEPENDS = "glib-2.0 util-linux popt"
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79"
-PV = "1.2.1+git${SRCPV}"
+SRCREV = "90395824efc007de88787a6b8e400a07c980be1c"
+PV = "1.2.4+git${SRCPV}"
-SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
- file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \
- file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \
-"
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
new file mode 100644
index 0000000000..9c3dc9c1e1
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
@@ -0,0 +1,130 @@
+Upstream-Status: Backport
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Fri, 25 Jul 2014 12:30:43 -0400
+Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event
+ length
+
+A noargs probe could have event fields. noargs just means that the probe
+does not receive any argument as parameter. However, it could very well
+serialize data into fields (global variables, constants, etc).
+
+It just happens that LTTng does not serialize any data in noargs events
+at the moment, but this may very well change.
+
+The if (0) with (void) variable access strategy to stop compiler from
+complaining from unused variables does not seem to work as expected with
+gcc 4.9.1. Use "unused" attribute instead.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 35 insertions(+), 14 deletions(-)
+
+diff --git a/probes/lttng-events.h b/probes/lttng-events.h
+index 596b70608584..ba9563b15cf9 100644
+--- a/probes/lttng-events.h
++++ b/probes/lttng-events.h
+@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
+ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
+ { \
+ size_t __event_len = 0; \
+- unsigned int __dynamic_len_idx = 0; \
++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
++ \
++ _tstruct \
++ return __event_len; \
++}
++
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
++static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \
++{ \
++ size_t __event_len = 0; \
++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
+ \
+- if (0) \
+- (void) __dynamic_len_idx; /* don't warn if unused */ \
+ _tstruct \
+ return __event_len; \
+ }
+@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \
+ return __event_align; \
+ }
+
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
++static inline size_t __event_get_align__##_name(void) \
++{ \
++ size_t __event_align = 1; \
++ _tstruct \
++ return __event_align; \
++}
++
+ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
+
+@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \
+ #undef TP_STRUCT__entry
+ #define TP_STRUCT__entry(args...) args
+
+-#undef DECLARE_EVENT_CLASS
+-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
+ struct __event_typemap__##_name { \
+ _tstruct \
+ };
+
++#undef DECLARE_EVENT_CLASS
++#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
++ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print)
++
+ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
+
+@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \
+ struct lttng_channel *__chan = __event->chan; \
+ struct lib_ring_buffer_ctx __ctx; \
+ size_t __event_len, __event_align; \
+- size_t __dynamic_len_idx = 0; \
+- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \
+- struct __event_typemap__##_name __typemap; \
++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
++ struct __event_typemap__##_name __typemap __attribute__((unused)); \
+ int __ret; \
+ \
+- if (0) { \
+- (void) __dynamic_len_idx; /* don't warn if unused */ \
+- (void) __typemap; /* don't warn if unused */ \
+- } \
+ if (!_TP_SESSION_CHECK(session, __chan->session)) \
+ return; \
+ if (unlikely(!ACCESS_ONCE(__chan->session->active))) \
+@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \
+ struct lttng_channel *__chan = __event->chan; \
+ struct lib_ring_buffer_ctx __ctx; \
+ size_t __event_len, __event_align; \
++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
++ struct __event_typemap__##_name __typemap __attribute__((unused)); \
+ int __ret; \
+ \
+ if (!_TP_SESSION_CHECK(session, __chan->session)) \
+@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \
+ return; \
+ if (unlikely(!ACCESS_ONCE(__event->enabled))) \
+ return; \
+- __event_len = 0; \
+- __event_align = 1; \
++ __event_len = __event_get_size__##_name(__dynamic_len); \
++ __event_align = __event_get_align__##_name(); \
+ lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
+ __event_align, -1); \
+ __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
+--
+1.8.1.2
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
new file mode 100644
index 0000000000..3541b50b79
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Backport
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 21 Aug 2014 11:15:50 -0400
+Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+index 2354884074eb..3c299c58a1cf 100644
+--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
++++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn,
+ tp_memcpy(insn,
+ vcpu->arch.emulate_ctxt.decode.fetch.data,
+ 15)
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
+ tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start)
+ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
+ tp_assign(len, vcpu->arch.emulate_ctxt._eip
+@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn,
+ tp_memcpy(insn,
+ vcpu->arch.emulate_ctxt.fetch.data,
+ 15)
++#else
++ tp_assign(rip, vcpu->arch.emulate_ctxt._eip -
++ (vcpu->arch.emulate_ctxt.fetch.ptr -
++ vcpu->arch.emulate_ctxt.fetch.data))
++ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
++ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr -
++ vcpu->arch.emulate_ctxt.fetch.data)
++ tp_memcpy(insn,
++ vcpu->arch.emulate_ctxt.fetch.data,
++ 15)
+ #endif
+ tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
+ tp_assign(failed, failed)
+--
+1.8.1.2
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb b/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
deleted file mode 100644
index 81a3983c64..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
-DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
-LICENSE = "LGPLv2.1 & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
- file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
- file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
-
-DEPENDS = "virtual/kernel"
-
-inherit module
-
-SRCREV = "eef112db0e63feff6cbf0a98cda9af607cefb377"
-PV = "2.3.3"
-
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.3 \
- file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
- file://bio-bvec-iter.patch \
- "
-
-export INSTALL_MOD_DIR="kernel/lttng-modules"
-export KERNEL_SRC="${STAGING_KERNEL_DIR}"
-
-
-S = "${WORKDIR}/git"
-
-do_install_append() {
- # Delete empty directories to avoid QA failures if no modules were built
- find ${D}/lib -depth -type d -empty -exec rmdir {} \;
-}
-
-python do_package_prepend() {
- if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')):
- bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True))
-}
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.4.1.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb
index 5e05ffc698..6ec83d090a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.4.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb
@@ -1,23 +1,24 @@
SECTION = "devel"
SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
-LICENSE = "LGPLv2.1 & GPLv2"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
DEPENDS = "virtual/kernel"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
inherit module
-SRCREV = "a0383def517e3aebbbcebae61fe2bcfb50d31e71"
-PV = "2.4.1"
+SRCREV = "16d7431c3a78605ea598dbd3f081a2b1a8463f23"
-# lttng currently blacklists arm with gcc-4.8
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux'
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.4 \
+SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
+ file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
+ file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
"
export INSTALL_MOD_DIR="kernel/lttng-modules"
diff --git a/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch b/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch
deleted file mode 100644
index 2c1756e6ed..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 9dc4d3a8dcc7cfb6991e760e78f614afd593bf66 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
-Date: Tue, 1 Apr 2014 17:46:23 +0200
-Subject: [PATCH v2] Fix: alignment problems on targets not supporting unaligned
- access.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Submitted (https://www.mail-archive.com/lttng-dev@lists.lttng.org/msg06012.html)
-
-Accessing floats, doubles and 64 bit int at unaligned addresses is not
-supported on all configurations of arm processors and if it is it's
-emulated and slow. This patch replaces direct assignments with memcpy.
-
-Signed-off-by: Fredrik Markström <fredrik.markstrom@gmail.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-index 762d604..8c6dc96 100644
---- a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-+++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-@@ -222,7 +222,7 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node)
- if (!insn)
- return -ENOMEM;
- insn->op = FILTER_OP_LOAD_S64;
-- *(int64_t *) insn->data = node->u.load.u.num;
-+ memcpy(insn->data, &node->u.load.u.num, sizeof(int64_t));
- ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len);
- free(insn);
- return ret;
-@@ -237,7 +237,7 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node)
- if (!insn)
- return -ENOMEM;
- insn->op = FILTER_OP_LOAD_DOUBLE;
-- *(double *) insn->data = node->u.load.u.flt;
-+ memcpy(insn->data, &node->u.load.u.flt, sizeof(double));
- ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len);
- free(insn);
- return ret;
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb b/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb
deleted file mode 100644
index db8b65b2e7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit Control"
-DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
-to extract program execution details from the Linux operating system \
-and interpret them."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
- file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
-
-DEPENDS = "liburcu popt lttng-ust"
-RDEPENDS_${PN}-ptest += "make"
-
-SRCREV = "5d985544a7ad54afa0514ea7f522a89d8d844860"
-PV = "v2.3.1"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.3 \
- file://runtest.patch \
- file://run-ptest \
- file://Fix-alignment-problems-on-targets-not-supporting-una.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest
-
-export KERNELDIR="${STAGING_KERNEL_DIR}"
-
-FILES_${PN} += "${libdir}/lttng/libexec/*"
-FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug"
-
-# Since files are installed into ${libdir}/lttng/libexec we match
-# the libexec insane test so skip it.
-INSANE_SKIP_${PN} = "libexec"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-
-do_install_ptest () {
- chmod +x ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
- for i in `find ${D}/${libdir}/${PN}/ptest -perm /u+x -type f`; do
- sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -i $i
- done
-
- sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
- -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/regression/run-report.py
- sed -e "s:src/bin:bin:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
-
-}
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb
deleted file mode 100644
index aab9bf6bbf..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit Control"
-DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
-to extract program execution details from the Linux operating system \
-and interpret them."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
- file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
-
-DEPENDS = "liburcu popt lttng-ust"
-RDEPENDS_${PN}-ptest += "make"
-
-SRCREV = "8e3234eea2d81f8a962214c570532f8e096a9a8d"
-PV = "v2.4.0"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.4 \
- file://runtest-2.4.0.patch \
- file://run-ptest \
- file://Fix-alignment-problems-on-targets-not-supporting-una.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest
-
-export KERNELDIR="${STAGING_KERNEL_DIR}"
-
-FILES_${PN} += "${libdir}/lttng/libexec/*"
-FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug"
-
-# Since files are installed into ${libdir}/lttng/libexec we match
-# the libexec insane test so skip it.
-INSANE_SKIP_${PN} = "libexec"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-
-do_install_ptest () {
- chmod +x ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
- for i in `find ${D}/${libdir}/${PN}/ptest -perm /u+x -type f`; do
- sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -i $i
- done
-
- sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
- -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/regression/run-report.py
- sed -e "s:src/bin:bin:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
-
-}
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb b/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb
new file mode 100644
index 0000000000..87052ebb8e
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb
@@ -0,0 +1,76 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit Control"
+DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
+to extract program execution details from the Linux operating system \
+and interpret them."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
+ file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
+
+DEPENDS = "liburcu popt lttng-ust libxml2"
+RDEPENDS_${PN}-ptest += "make perl bash"
+
+SRCREV = "75d966798cf8cbe8ca12773c2bf2822983bd78a3"
+
+PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+ am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
+"
+PACKAGECONFIG ??= "lttng-ust"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
+PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust"
+
+SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \
+ file://runtest-2.4.0.patch \
+ file://run-ptest \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep ptest pkgconfig
+
+export KERNELDIR="${STAGING_KERNEL_DIR}"
+
+FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \
+ ${libdir}/python2.7/site-packages/.debug"
+FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
+FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
+
+# Since files are installed into ${libdir}/lttng/libexec we match
+# the libexec insane test so skip it.
+# Python module needs to keep _lttng.so
+INSANE_SKIP_${PN} = "libexec dev-so"
+INSANE_SKIP_${PN}-dbg = "libexec"
+
+do_configure_prepend () {
+ # Delete a shipped m4 file that overrides our patched one
+ rm -f ${S}/config/libxml.m4
+}
+
+do_install_ptest () {
+ chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
+ for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
+ sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+ -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -i $i
+ done
+
+ sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
+ -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
+ -i ${D}${PTEST_PATH}/tests/regression/run-report.py
+ sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
+ -i ${D}${PTEST_PATH}/tests/utils/utils.sh
+ sed -e "s:ini_config:\.libs\/ini_config:" \
+ -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
+}
diff --git a/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
new file mode 100644
index 0000000000..cec5410369
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
@@ -0,0 +1,19 @@
+lttng-ust: add aarch64 recognition
+
+Treat the same as "arm".
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -230,6 +230,7 @@ changequote([,])dnl
+ s390) NO_UNALIGNED_ACCESS=1 ;;
+ s390x) NO_UNALIGNED_ACCESS=1 ;;
+ arm*) NO_UNALIGNED_ACCESS=1 ;;
++ aarch64) NO_UNALIGNED_ACCESS=1 ;;
+ mips*) NO_UNALIGNED_ACCESS=1 ;;
+ tile*) NO_UNALIGNED_ACCESS=1 ;;
+ *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;;
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb b/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb
deleted file mode 100644
index 44e3e2bc9c..0000000000
--- a/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
-DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
-HOMEPAGE = "http://lttng.org/ust"
-BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
-
-LICENSE = "LGPLv2.1+ & BSD & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
- file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
- file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
-
-inherit autotools lib_package
-
-DEPENDS = "liburcu util-linux"
-RDEPENDS_${PN} = "python"
-
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "lttng2-ust"
-RREPLACES_${PN} = "lttng2-ust"
-RCONFLICTS_${PN} = "lttng2-ust"
-
-SRCREV = "535d0408caee93577c2b4d8ad3cd672fa97eac1d"
-PV = "2.3.1"
-PE = "2"
-
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.3 \
- "
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- ( cd ${S}; ${S}/bootstrap )
-}
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb
index 1629554b09..eda52bb81f 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library t
HOMEPAGE = "http://lttng.org/ust"
BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
-LICENSE = "LGPLv2.1+ & BSD & GPLv2"
+LICENSE = "LGPLv2.1+ & MIT & GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
@@ -11,18 +11,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
inherit autotools lib_package
DEPENDS = "liburcu util-linux"
+RDEPENDS_${PN}-bin = "python-core"
# For backwards compatibility after rename
RPROVIDES_${PN} = "lttng2-ust"
RREPLACES_${PN} = "lttng2-ust"
RCONFLICTS_${PN} = "lttng2-ust"
-SRCREV = "5ba5bf7fba804d2de773ae1c71106a8ed856c56a"
-PV = "2.4.0"
+SRCREV = "85d1d2791f3cebfd741a821261bf2924928a90e7"
PE = "2"
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.4 \
+SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \
file://lttng-ust-doc-examples-disable.patch \
+ file://add-aarch64.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 125f5fb073..db670cfbb4 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -4,8 +4,11 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
SRC_URI = "file://modutils.sh \
file://PD.patch"
+
PR = "r7"
+S = "${WORKDIR}"
+
INITSCRIPT_NAME = "modutils.sh"
INITSCRIPT_PARAMS = "start 05 S ."
@@ -18,3 +21,13 @@ do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask modutils.service
+ fi
+}
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index 76d0b6cbe5..49e6b16c1c 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -18,15 +18,16 @@ FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
-SRC_URI = "file://opstart.patch \
+SRC_URI = "file://filemode-fix.patch \
file://acinclude.m4 \
+ file://automake-foreign.patch \
file://oprofile-cross-compile-tests.patch \
file://run-ptest \
file://root-home-dir.patch"
-inherit autotools-brokensep pkgconfig ptest
+inherit autotools pkgconfig ptest
-EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x"
+EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x ac_cv_prog_XSLTPROC="
do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
autotools_do_configure
@@ -39,7 +40,6 @@ do_compile_ptest() {
do_install_ptest() {
subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
- cd ${S}
for tooltest in ${subdirs}
do
find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
@@ -53,6 +53,6 @@ do_install_ptest() {
cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
# needed by litutil++ file_manip_tests
- cp libutil++/tests/file_manip_tests.cpp \
+ cp ${S}/libutil++/tests/file_manip_tests.cpp \
libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
}
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
deleted file mode 100644
index a2385cd2b2..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-Date: Tue, 15 Jan 2013 07:37:33 +0100
-Subject: [PATCH] Add rmb() definition for AArch64 architecture
-
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-Status: backport
----
- libperf_events/operf_utils.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
-index 815d51d..2df00b7 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -148,6 +148,11 @@ void op_release_resources(void);
- #define cpu_relax() asm volatile("":::"memory")
- #endif
-
-+#ifdef __aarch64__
-+#define rmb() asm volatile("dmb ld" ::: "memory")
-+#define cpu_relax() asm volatile("yield" ::: "memory")
-+#endif
-+
- #ifdef __mips__
- #include <asm/unistd.h>
- #define rmb() asm volatile( \
---
-1.8.0
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
deleted file mode 100644
index 93c62400cf..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-Upstream-Status: Backport
-
-From 63b5692aace5ff6022f892822b4bfdc51ed25bfb Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Fri, 2 May 2014 07:54:08 -0500
-Subject: [PATCH] Tidy powerpc64 bfd target check
-
-Testing for a bfd_target vector might (will!) break. See
-https://sourceware.org/ml/binutils/2014-04/msg00283.html
-
-It's safer to ask BFD for the target name. I left the direct target
-vector checks in configure tests, and updated them, even though the
-target vector is no longer used in oprofile code, because a run-time
-configure test for powerpc64 support in bfd:
- #include <bfd.h>
- int main(void)
- { return !bfd_find_target("elf64-powerpc", (void *)0); }
-unfortunately isn't possible when cross-compiling.
-
-The bfd_target vector tests could be omitted if we aren't bothered by
-the small runtime overhead of a strncmp on targets other than
-powerpc64.
-
- * libutil++/bfd_support.cpp (get_synth_symbols): Don't check for
- ppc64 target vector, use bfd_get_target to return the target
- name instead.
- * m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to
- use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or
- bfd_elf64_powerpc_vec.
-
-Signed-off-by: Alan Modra <amodra@gmail.com>
----
- libutil++/bfd_support.cpp | 10 +++++++--
- m4/binutils.m4 | 50 ++++++++++++++++++++++-----------------------
- 2 files changed, 33 insertions(+), 27 deletions(-)
-
-Index: oprofile-0.9.9/libutil++/bfd_support.cpp
-===================================================================
---- oprofile-0.9.9.orig/libutil++/bfd_support.cpp 2013-07-29 08:55:06.000000000 -0700
-+++ oprofile-0.9.9/libutil++/bfd_support.cpp 2014-05-02 09:12:05.761146347 -0700
-@@ -633,10 +633,16 @@
-
- bool bfd_info::get_synth_symbols()
- {
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec)
-- || (abfd->xvec == &bfd_elf64_powerpcle_vec);
-+ const char* targname = bfd_get_target(abfd);
-+ // Match elf64-powerpc and elf64-powerpc-freebsd, but not
-+ // elf64-powerpcle. elf64-powerpcle is a different ABI without
-+ // function descriptors, so we don't need the synthetic
-+ // symbols to have function code marked by a symbol.
-+ bool is_elf64_powerpc_target = (!strncmp(targname, "elf64-powerpc", 13)
-+ && (targname[13] == 0
-+ || targname[13] == '-'));
-+
-+
-
- if (!is_elf64_powerpc_target)
- return false;
-Index: oprofile-0.9.9/m4/binutils.m4
-===================================================================
---- oprofile-0.9.9.orig/m4/binutils.m4 2013-07-29 08:55:07.000000000 -0700
-+++ oprofile-0.9.9/m4/binutils.m4 2014-05-02 09:07:32.471148147 -0700
-@@ -22,32 +22,32 @@
-
- AC_LANG_PUSH(C)
- # Determine if bfd_get_synthetic_symtab macro is available
--OS="`uname`"
--if test "$OS" = "Linux"; then
-- AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-- rm -f test-for-synth
-- AC_LANG_CONFTEST(
-- [AC_LANG_PROGRAM([[#include <bfd.h>]],
-- [[asymbol * synthsyms; bfd * ibfd = 0;
-- long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- char * ppc_name = bfd_elf64_powerpc_vec.name;
-- char * ppcle_name = bfd_elf64_powerpcle_vec.name;
-- printf("%s %s\n", ppc_name, ppcle_name);]])
-- ])
-- $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS -o test-for-synth > /dev/null 2>&1
-- if test -f test-for-synth; then
-- echo "yes"
-- SYNTHESIZE_SYMBOLS='1'
-- else
-- echo "no"
-- SYNTHESIZE_SYMBOLS='0'
-- fi
-- AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-- rm -f test-for-synth*
-+AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target powerpc_elf64_vec;
-+ char *ppc_name = powerpc_elf64_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=2],
-+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target bfd_elf64_powerpc_vec;
-+ char *ppc_name = bfd_elf64_powerpc_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=1],
-+ [AC_MSG_RESULT([no])
-+ SYNTHESIZE_SYMBOLS=0])
-+ ])
-+AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-
--fi
- AC_LANG_POP(C)
- ]
- )
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
new file mode 100644
index 0000000000..b9bb6c5779
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
@@ -0,0 +1,12 @@
+oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 5740585..cf6c316 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
new file mode 100644
index 0000000000..f7ebe24691
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
@@ -0,0 +1,41 @@
+With security_flags.inc:
+
+| In file included from /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/fcntl.h:302:0,
+| from opjitconv.c:25:
+| In function 'open',
+| inlined from 'copy_dumpfile' at opjitconv.c:219:6:
+| /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
+| __open_missing_mode ();
+| ^
+| Makefile:440: recipe for target 'opjitconv.o' failed
+
+Why does this only happen on mips? mips has:
+
+O_CREAT = 0x100
+and
+S_IRUSR = 0400
+
+and these (in hex and otcal) are equivalent. Most other platforms
+have O_CREAT = 0100.
+
+http://sourceforge.net/p/oprofile/oprofile/ci/4598ca73b0a367ca46d4a2843261e20e1896773b
+
+The file should not be created, only opened if its present, therefore use O_RDONLY instead.
+
+RP 2014/11/6
+
+Upstream-Status: Backport
+
+Index: oprofile-1.0.0/opjitconv/opjitconv.c
+===================================================================
+--- oprofile-1.0.0.orig/opjitconv/opjitconv.c 2014-09-12 14:39:47.000000000 +0000
++++ oprofile-1.0.0/opjitconv/opjitconv.c 2014-11-06 13:14:25.941639003 +0000
+@@ -216,7 +216,7 @@
+ int file_locked = 0;
+ unsigned int usecs_waited = 0;
+ int rc = OP_JIT_CONV_OK;
+- int fd = open(dumpfile, S_IRUSR);
++ int fd = open(dumpfile, O_RDONLY);
+ if (fd < 0) {
+ perror("opjitconv failed to open JIT dumpfile");
+ return OP_JIT_CONV_FAIL;
diff --git a/meta/recipes-kernel/oprofile/oprofile/opstart.patch b/meta/recipes-kernel/oprofile/oprofile/opstart.patch
deleted file mode 100644
index 8696f4ef4d..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/opstart.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-Upstream-Status: Pending
-
-The patch gives a low overhead way of starting/stopping oprofile which
-doesn't involve script exection.
-
-(written by RP in OpenedHand days)
-
-diff --git a/utils/Makefile.am b/utils/Makefile.am
-index d34b060..dff15f9 100644
---- oprofile.orig/utils/Makefile.am
-+++ oprofile/utils/Makefile.am
-@@ -7,7 +7,7 @@ AM_LDFLAGS = @OP_LDFLAGS@
-
- LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
-
--bin_PROGRAMS = ophelp op-check-perfevents
-+bin_PROGRAMS = ophelp op-check-perfevents opstart
- dist_bin_SCRIPTS = opcontrol
-
- op_check_perfevents_SOURCES = op_perf_events_checker.c
-@@ -15,3 +15,10 @@ op_check_perfevents_CPPFLAGS = ${AM_CFLAGS} @PERF_EVENT_FLAGS@
-
- ophelp_SOURCES = ophelp.c
- ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
-+
-+opstart_SOURCES = opstart.c
-+
-+install-exec-local:
-+ cd $(DESTDIR)/$(bindir) && \
-+ rm -f opstop && \
-+ $(LN_S) opstart opstop
-Index: oprofile/utils/opstart.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,110 @@
-+/**
-+ * @file opstart.c
-+ * Start/Stop oprofile
-+ *
-+ * @remark Copyright 2007 Openedhand Ltd.
-+ * @remark Read the file COPYING
-+ *
-+ * @author Richard Purdie
-+ */
-+
-+#include <signal.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
-+int main(const int argc, const char* argv[])
-+{
-+ const char *enable = "/dev/oprofile/enable";
-+ const char *lockfile;
-+ unsigned long dpid;
-+ struct stat sbuf;
-+ FILE *lfile, *efile;
-+ int sig, enb, err;
-+
-+ if (argc >= 2) {
-+ printf("Error: Invalid options.\n");
-+ return 1;
-+ }
-+
-+ lockfile = getenv("LOCK_FILE");
-+ if (!lockfile)
-+ lockfile = "/var/lib/oprofile/lock";
-+
-+ /* Add SESSION_DIR support? */
-+
-+ if (geteuid()) {
-+ printf("Error: This program must be run as root.\n");
-+ return 1;
-+ }
-+
-+ if (stat(enable, &sbuf)) {
-+ printf("Error: Could not find /dev/oprofile/enable, the"
-+ " kernel module probably isn't loaded.\n");
-+ printf("This binary only works with 2.6 kernels and oprofile"
-+ " must have been initialised with 'opcontrol --start-daemon'.\n");
-+ return 1;
-+ }
-+
-+ if (stat(lockfile, &sbuf)) {
-+ printf("Error: Could not find lockfile %s.\n", lockfile);
-+ printf("The oprofile daemon must be running (oprofile must"
-+ " have been initialised with 'opcontrol --start-daemon').\n");
-+ return 1;
-+ }
-+
-+ lfile = fopen(lockfile, "r");
-+ if (!lfile) {
-+ printf("Error opening lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+
-+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
-+ if (err != 1) {
-+ printf("Error reading pid from lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+ fclose(lfile);
-+
-+ efile = fopen(enable, "r");
-+ if (!efile) {
-+ printf("Error opening %s.\n", enable);
-+ return 1;
-+ }
-+
-+ if (strstr(argv[0], "opstart")) {
-+ printf("Starting Profiler\n");
-+ sig = SIGUSR1;
-+ enb = 1;
-+ } else if (strstr(argv[0], "opstop")) {
-+ printf("Stopping Oprofile.\n");
-+ printf("You need to run 'opcontrol --dump' when the session"
-+ " is finished.\n");
-+ sig = SIGUSR2;
-+ enb = 0;
-+ } else {
-+ printf("Error: Please call as 'opstart' or 'opstop'\n");
-+ return 1;
-+ }
-+
-+ err = kill(dpid, 0);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ fprintf(efile, "%d\n", enb);
-+ err = kill(dpid, sig);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-Index: oprofile/configure.ac
-===================================================================
---- oprofile.orig/configure.ac 2008-07-02 15:13:58.000000000 +0100
-+++ oprofile/configure.ac 2008-07-02 15:17:37.000000000 +0100
-@@ -16,6 +16,7 @@
- AM_CONFIG_HEADER(config.h)
-
- AC_PROG_RANLIB
-+AC_PROG_LN_S
- AC_PROG_LIBTOOL
-
- dnl for the man page
-@@ -241,6 +242,8 @@
- doc/xsl/catalog-1.xml \
- doc/oprofile.1 \
- doc/opcontrol.1 \
-+ doc/opstart.1 \
-+ doc/opstop.1 \
- doc/ophelp.1 \
- doc/opreport.1 \
- doc/opannotate.1 \
-Index: oprofile/doc/Makefile.am
-===================================================================
---- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100
-+++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100
-@@ -11,6 +11,8 @@
- man_MANS = \
- oprofile.1 \
- opcontrol.1 \
-+ opstart.1 \
-+ opstop.1 \
- opreport.1 \
- opannotate.1 \
- opgprof.1 \
-Index: oprofile/doc/opstart.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,27 @@
-+.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstart \- start OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstart
-+.SH DESCRIPTION
-+.B opstart
-+is a simple optimised command to start profiling with 2.6 Linux kernels.
-+OProfile should have already been initialised by calling "opcontrol --start-daemon".
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstart.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
-Index: oprofile/doc/opstop.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,28 @@
-+.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstop \- stop OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstop
-+.SH DESCRIPTION
-+.B opstop
-+is a simple optimsed command to stop profiling with 2.6 Linux kernels.
-+You need to run "opcontrol --dump" before being able to view a profile
-+with opreport.
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstop.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
index 45cab7d3d8..20fc5e503b 100644
--- a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
@@ -1,7 +1,7 @@
oprofile: Determine the root home directory dynamically
This commit detects the root home directory dynamically with changes to
-the opcontrol script and the oprofile gui app source.
+the oprofile gui app source.
The commit replaces an earlier fix that detected and adjusted a
'non-standard' root home directory at build time. The advantage of this
@@ -12,109 +12,33 @@ Upstream-Status: inappropriate [OE specific]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/doc/opcontrol.1.in b/doc/opcontrol.1.in
-index c434704..f57eb76 100644
---- a/doc/opcontrol.1.in
-+++ b/doc/opcontrol.1.in
-@@ -171,7 +171,7 @@ No special environment variables are recognised by opcontrol.
-
- .SH FILES
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I /var/lib/oprofile/samples/
-diff --git a/doc/oprofile.1.in b/doc/oprofile.1.in
-index 3d0f0ed..5c623e1 100644
---- a/doc/oprofile.1.in
-+++ b/doc/oprofile.1.in
-@@ -150,7 +150,7 @@ No special environment variables are recognised by oprofile.
- .I $HOME/.oprofile/
- Configuration files
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I @prefix@/share/oprofile/
-diff --git a/doc/oprofile.html b/doc/oprofile.html
-index 128d9f7..d7e4dea 100644
---- a/doc/oprofile.html
-+++ b/doc/oprofile.html
-@@ -1394,7 +1394,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <code class="filename">/root/.oprofile/daemonrc</code>.
-+ saved in <code class="filename">~root/.oprofile/daemonrc</code>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
- </p>
-@@ -1430,7 +1430,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Start data collection with either arguments provided by <code class="option">--setup</code>
-- or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
-+ or information saved in <code class="filename">~root/.oprofile/daemonrc</code>. Specifying
- the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
- whilst it is running.
+Index: oprofile-1.0.0/doc/oprofile.html
+===================================================================
+--- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000
++++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000
+@@ -1563,8 +1563,8 @@
+ <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
+ the profile data it has collected. Use <code class="code">kill -SIGINT &lt;operf-PID&gt;</code>
+ for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
+- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
+- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
++ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
++ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
</p>
-diff --git a/doc/oprofile.xml b/doc/oprofile.xml
-index 6a17c6d..0968d76 100644
---- a/doc/oprofile.xml
-+++ b/doc/oprofile.xml
-@@ -568,7 +568,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--setup</option></term>
- <listitem><para>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <filename>/root/.oprofile/daemonrc</filename>.
-+ saved in <filename>~root/.oprofile/daemonrc</filename>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
- </para></listitem>
-@@ -592,7 +592,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--start</option></term>
- <listitem><para>
- Start data collection with either arguments provided by <option>--setup</option>
-- or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
-+ or information saved in <filename>~root/.oprofile/daemonrc</filename>. Specifying
- the addition <option>--verbose</option> makes the daemon generate lots of debug data
- whilst it is running.
+ </dd>
+ <dt>
+Index: oprofile-1.0.0/doc/oprofile.xml
+===================================================================
+--- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000
++++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000
+@@ -654,8 +654,8 @@
+ <emphasis>must</emphasis> stop it in a controlled manner in order to process
+ the profile data it has collected. Use <code>kill -SIGINT &lt;operf-PID&gt;</code>
+ for this purpose. It is recommended that when running <command>operf</command>
+- with this option, your current working directory should be <filename>/root</filename> or a subdirectory
+- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
++ with this option, your current working directory should be <filename>~root</filename> or a subdirectory
++ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
</para></listitem>
-diff --git a/gui/oprof_start_util.cpp b/gui/oprof_start_util.cpp
-index d293431..d13fa8f 100644
---- a/gui/oprof_start_util.cpp
-+++ b/gui/oprof_start_util.cpp
-@@ -20,6 +20,8 @@
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
-+#include <sys/types.h>
-+#include <pwd.h>
-
- #include <qfiledialog.h>
- #include <qmessagebox.h>
-@@ -39,7 +41,8 @@ namespace {
- // return the ~ expansion suffixed with a '/'
- string const get_config_dir()
- {
-- return "/root";
-+ struct *pw = getpwnam("root");
-+ return pw->pw_dir;
- }
-
- string daemon_pid;
-diff --git a/utils/opcontrol b/utils/opcontrol
-index 09fa5a7..a8acdae 100644
---- a/utils/opcontrol
-+++ b/utils/opcontrol
-@@ -385,7 +385,7 @@ do_init()
- OPROFILED="$OPDIR/oprofiled"
-
- # location for daemon setup information
-- SETUP_DIR="/root/.oprofile"
-+ SETUP_DIR="`grep root /etc/passwd | cut -d: -f6`/.oprofile"
- SETUP_FILE="$SETUP_DIR/daemonrc"
- SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
-
+ </varlistentry>
+ <varlistentry>
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest
index 583ee1b8a8..4814be652a 100644
--- a/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ b/meta/recipes-kernel/oprofile/oprofile/run-ptest
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
saved_dir=$PWD
for dir in */tests ; do
cd $dir
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
deleted file mode 100644
index 6080a3e0e5..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://0001-Add-rmb-definition-for-AArch64-architecture.patch \
- file://0001-Tidy-powerpc64-bfd-target-check.patch \
- "
-SRC_URI[md5sum] = "00aec1287da2dfffda17a9b1c0a01868"
-SRC_URI[sha256sum] = "1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597"
-
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
new file mode 100644
index 0000000000..f4a34b32e6
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
@@ -0,0 +1,13 @@
+require oprofile.inc
+
+DEPENDS += "virtual/kernel"
+DEPENDS_append_powerpc64 = " libpfm4"
+
+SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ba0b340e5c421a93959776c836ed35b3"
+SRC_URI[sha256sum] = "847110b4ecdcf8c8353cd38f94c1b704aad4bfcd9453e38b88d112cfb7e3c45a"
+
+S = "${WORKDIR}/oprofile-${PV}"
+
+PR = "r1"
diff --git a/meta/recipes-kernel/oprofile/oprofile_git.bb b/meta/recipes-kernel/oprofile/oprofile_git.bb
deleted file mode 100644
index ca562db121..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_git.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require oprofile.inc
-
-SRCREV = "88f43190d412d28ebf5c75a76ba20343d0fe4c41"
-PV = "0.9.7+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI += "git://oprofile.git.sourceforge.net/gitroot/${BPN}/${BPN}"
-
-S = "${WORKDIR}/git"
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 20968f98cc..fcfd0ada1f 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -20,15 +20,19 @@ BUILDPERF_libc-uclibc = "no"
# to cover a wide range of kernel we add both dependencies
TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}"
SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
+LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}"
+
+DEPENDS = " \
+ virtual/${MLPREFIX}libc \
+ ${MLPREFIX}elfutils \
+ ${MLPREFIX}binutils \
+ ${TUI_DEPENDS} \
+ ${SCRIPTING_DEPENDS} \
+ ${LIBUNWIND_DEPENDS} \
+ bison flex \
+"
-DEPENDS = "virtual/kernel \
- virtual/${MLPREFIX}libc \
- ${MLPREFIX}elfutils \
- ${MLPREFIX}binutils \
- ${TUI_DEPENDS} \
- ${SCRIPTING_DEPENDS} \
- bison flex \
- "
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
PROVIDES = "virtual/perf"
@@ -44,7 +48,7 @@ export HOST_SYS
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
-do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot"
+do_populate_lic[depends] += "virtual/kernel:do_patch"
# needed for building the tools/perf Perl binding
inherit perlnative cpan-base
@@ -54,51 +58,46 @@ export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}
export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-S = "${STAGING_KERNEL_DIR}"
-# The source should be ready after the do_unpack
-do_unpack[depends] += "virtual/kernel:do_populate_sysroot"
+inherit kernelsrc
B = "${WORKDIR}/${BPN}-${PV}"
SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
+LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}"
+LIBNUMA_DEFINES = "${@perf_feature_enabled('perf-libnuma', '', 'NO_LIBNUMA=1',d)}"
# The LDFLAGS is required or some old kernels fails due missing
# symbols and this is preferred than requiring patches to every old
# supported kernel.
LDFLAGS="-ldl -lutil"
-EXTRA_OEMAKE = \
- '-C ${S}/tools/perf \
- O=${B} \
- CROSS_COMPILE=${TARGET_PREFIX} \
- ARCH=${ARCH} \
- CC="${CC}" \
- AR="${AR}" \
- perfexecdir=${libexecdir} \
- NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
- '
+EXTRA_OEMAKE = '\
+ -C ${S}/tools/perf \
+ O=${B} \
+ CROSS_COMPILE=${TARGET_PREFIX} \
+ ARCH=${ARCH} \
+ CC="${CC}" \
+ AR="${AR}" \
+ EXTRA_CFLAGS="-ldw" \
+ perfexecdir=${libexecdir} \
+ NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
+ ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \
+'
EXTRA_OEMAKE += "\
- 'prefix=${prefix}' \
- 'bindir=${bindir}' \
- 'sharedir=${datadir}' \
- 'sysconfdir=${sysconfdir}' \
- 'perfexecdir=${libexecdir}/perf-core' \
- \
- 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
- 'sharedir=${@os.path.relpath(datadir, prefix)}' \
- 'mandir=${@os.path.relpath(mandir, prefix)}' \
- 'infodir=${@os.path.relpath(infodir, prefix)}' \
+ 'prefix=${prefix}' \
+ 'bindir=${bindir}' \
+ 'sharedir=${datadir}' \
+ 'sysconfdir=${sysconfdir}' \
+ 'perfexecdir=${libexecdir}/perf-core' \
+ \
+ 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
+ 'sharedir=${@os.path.relpath(datadir, prefix)}' \
+ 'mandir=${@os.path.relpath(mandir, prefix)}' \
+ 'infodir=${@os.path.relpath(infodir, prefix)}' \
"
-# PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h
-# prevents 64-bit userland from seeing this definition, instead defaulting
-# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
-# int-ll64.h included. And MIPS64 has the same issue.
-EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-
PARALLEL_MAKE = ""
do_compile() {
@@ -118,6 +117,10 @@ do_install() {
}
do_configure_prepend () {
+ # Fix for rebuilding
+ rm -rf ${B}/
+ mkdir ${B}/
+
#kernels before 3.1 do not support WERROR env variable
sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
if [ -e "${S}/tools/perf/config/Makefile" ]; then
@@ -128,10 +131,13 @@ do_configure_prepend () {
# detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
# build, with a 64 bit multilib, the arch won't match and the detection of a
# 64 bit build (and library) are not exected. To ensure that libraries are
- # installed to the correct location, we can make the substitution in the
- # config/Makefile. For non multilib builds, this has no impact.
+ # installed to the correct location, we can use the weak assignment in the
+ # config/Makefile.
if [ -e "${S}/tools/perf/config/Makefile" ]; then
- sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
+ # Match $(prefix)/$(lib) and $(prefix)/lib
+ sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
+ -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
+ ${S}/tools/perf/config/Makefile
fi
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
@@ -145,10 +151,19 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
fi
+
+ # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
+ if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
+ sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
+ fi
+ if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
+ sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
+ sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
+ fi
}
python do_package_prepend() {
- bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d)
+ d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0])
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -160,6 +175,7 @@ RDEPENDS_${PN} += "elfutils"
RDEPENDS_${PN}-archive =+ "bash"
RDEPENDS_${PN}-python =+ "bash python"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
+RDEPENDS_${PN}-tests =+ "python"
RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
diff --git a/meta/recipes-kernel/powertop/powertop_2.5.bb b/meta/recipes-kernel/powertop/powertop_2.7.bb
index 86a7f604de..5ba07e9ab9 100644
--- a/meta/recipes-kernel/powertop/powertop_2.5.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.7.bb
@@ -6,21 +6,23 @@ DEPENDS = "ncurses libnl pciutils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-SRC_URI = "http://01.org/powertop/sites/default/files/downloads/powertop-${PV}.tar.gz"
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz"
-SRC_URI[md5sum] = "806bbcbd44fcea1f807c9582fc1f7d3e"
-SRC_URI[sha256sum] = "8b2c08a555d79e1c428863470c41cb023971d74ba4801d80a05e35adeec23c0b"
+SRC_URI[md5sum] = "e0d686e47daaf7e9d89031f7763432ef"
+SRC_URI[sha256sum] = "8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca"
inherit autotools gettext pkgconfig
# we need to explicitly link with libintl in uClibc systems
-LDFLAGS += "${EXTRA_LDFLAGS}"
+EXTRA_LDFLAGS ?= ""
EXTRA_LDFLAGS_libc-uclibc = "-lintl"
+LDFLAGS += "${EXTRA_LDFLAGS}"
# we do not want libncursesw if we can
do_configure_prepend() {
# configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
sed -i -e "s/ncursesw//g" ${S}/configure.ac
+ mkdir -p ${B}/src/tuning/
}
inherit update-alternatives
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb
index ef1e270883..e18aebf7bd 100644
--- a/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -14,7 +14,13 @@ SRC_URI = "git://git.gnome.org/sysprof \
SRC_URI_append_arm = " file://rmb-arm.patch"
SRC_URI_append_mips = " file://rmb-mips.patch"
SRC_URI_append_mips64 = " file://rmb-mips.patch"
+SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
+
+# We do not yet work for aarch64.
+#
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 4d2bec4714..758908bff9 100644
--- a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -21,7 +21,7 @@ EXTRA_OEMAKE = ""
# support. Note that staprun expects it in the systemtap/runtime directory,
# not in /lib/modules.
do_compile() {
- if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config
+ if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config
then
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
diff --git a/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
new file mode 100644
index 0000000000..b4f2fbc066
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
@@ -0,0 +1,39 @@
+From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Tue, 23 Sep 2014 04:47:10 -0400
+Subject: [PATCH] systemtap: allow to disable libvirt
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a631ae7..cb4885b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages
+
+ dnl We require libvirt >= 1.0.2 because stapvirt relies on the
+ dnl virDomainOpenChannel function, which was implemented in 1.0.2.
+-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
+- have_libvirt=yes
+- AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
+- ], [have_libvirt=no])
++AC_ARG_ENABLE([libvirt],
++ AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present]))
++
++if test "$enable_libvirt" != no; then
++ PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
++ have_libvirt=yes
++ AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
++ ], [have_libvirt=no])
++fi
+ AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"])
+ PKG_CHECK_MODULES([libxml2], [libxml-2.0], [
+ have_libxml2=yes
+--
+1.7.9.5
+
diff --git a/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
new file mode 100644
index 0000000000..013af5c3a4
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
@@ -0,0 +1,23 @@
+systemtap: Cross compilation fix
+
+This is a cross compilation fix. It allows systemtap to find
+the kernel map file in the right place, i.e. in the kernel build tree.
+Without this fix it takes a map file from the build host, if available.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
+
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function
+ clog << _F("Kernel symbol table %s unavailable, (%s)",
+ system_map_path.c_str(), strerror(errno)) << endl;
+
+- system_map_path = "/boot/System.map-" + kernel_release;
++ system_map_path = kernel_build_tree + "/System.map-" + kernel_release;
+ system_map.clear();
+ system_map.open(system_map_path.c_str(), ifstream::in);
+ if (! system_map.is_open())
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 488d417150..d0dd42a643 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -20,6 +20,9 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
EXTRA_OECONF += "${STAP_DOCS} "
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+
inherit autotools gettext pkgconfig
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 717d66f738..f9a19d964a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,11 +1,13 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d"
-PV = "2.5+git${SRCPV}"
+SRCREV = "7682e51d2e11a35b2977ba9a85ab42f326b8ff8f"
+PV = "2.6+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
+ file://system_map_location.patch \
+ file://configure-allow-to-disable-libvirt.patch \
"
# systemtap doesn't support mips
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
index e64abe2ecc..28412c72d3 100644
--- a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
+++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
@@ -6,15 +6,21 @@ require trace-cmd.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
-DEPENDS = "gtk+"
+DEPENDS = "gtk+ libxml2"
RDEPENDS_${PN} = "trace-cmd"
SRC_URI_append = "file://kernelshark-fix-syntax-error-of-shell.patch"
EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui"
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.*.d
+}
+
do_install() {
oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui
+ rm ${D}${bindir}/trace-cmd
rm -rf ${D}${datadir}/trace-cmd
rmdir ${D}${datadir}
}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
deleted file mode 100644
index 8fdeedb008..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a6e259b2cd43db3c0f69441f627a8cf214f88506 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Thu, 5 Apr 2012 15:19:44 -0400
-Subject: [PATCH] trace-cmd: Add checks for invalid pointers to fix segfaults
-
-Upstream-Status: Backport
-
-Running 'trace-cmd report' after running latency tracers will cause a
-segfault due to invalid pointers. Adding checks to ensure
-pointers/lists are initialized before attempting to use them prevents
-these segfaults.
-
-Link: http://lkml.kernel.org/r/1333653586-3379-2-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-input.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/trace-input.c b/trace-input.c
-index b6af1e6..5151c1e 100644
---- a/trace-input.c
-+++ b/trace-input.c
-@@ -695,7 +695,8 @@ static void __free_page(struct tracecmd_input *handle, struct page *page)
-
- static void free_page(struct tracecmd_input *handle, int cpu)
- {
-- if (!handle->cpu_data[cpu].page)
-+ if (!handle->cpu_data || cpu >= handle->cpus ||
-+ !handle->cpu_data[cpu].page)
- return;
-
- __free_page(handle, handle->cpu_data[cpu].page);
-@@ -746,8 +747,12 @@ void tracecmd_record_ref(struct record *record)
-
- static void free_next(struct tracecmd_input *handle, int cpu)
- {
-- struct record *record = handle->cpu_data[cpu].next;
-+ struct record *record;
-+
-+ if (!handle->cpu_data || cpu >= handle->cpus)
-+ return;
-
-+ record = handle->cpu_data[cpu].next;
- if (!record)
- return;
-
-@@ -2337,7 +2342,8 @@ void tracecmd_close(struct tracecmd_input *handle)
- /* The tracecmd_peek_data may have cached a record */
- free_next(handle, cpu);
- free_page(handle, cpu);
-- if (!list_empty(&handle->cpu_data[cpu].pages))
-+ if (handle->cpu_data &&
-+ !list_empty(&handle->cpu_data[cpu].pages))
- warning("pages still allocated on cpu %d%s",
- cpu, show_records(&handle->cpu_data[cpu].pages));
- }
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
deleted file mode 100644
index 4c00c512bb..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 356dee73d9ced3e019dea2883a7f357fd4664b3e Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Thu, 5 Apr 2012 15:19:45 -0400
-Subject: [PATCH] trace-cmd: Do not call stop_threads() if doing latency
- tracing
-
-Upstream-Status: Backport
-
-If we are using a latency tracer we do not call start_threads() we
-should therefore not call stop_threads() if 'latency'. Attempting
-to call stop_threads() without first calling start_threads() will
-cause a segfault since pids will be uninitialized.
-
-Link: http://lkml.kernel.org/r/1333653586-3379-3-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-record.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/trace-record.c b/trace-record.c
-index fcec28b..1c56fa9 100644
---- a/trace-record.c
-+++ b/trace-record.c
-@@ -2216,7 +2216,8 @@ void trace_record (int argc, char **argv)
- }
-
- disable_tracing();
-- stop_threads();
-+ if (!latency)
-+ stop_threads();
- }
-
- for (cpu = 0; cpu < cpu_count; cpu++) {
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch
deleted file mode 100644
index 724e1e80b1..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From d65740d61e7a4ea6d8d77237954b33dd18e3276c Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Sun, 8 Apr 2012 11:38:45 -0400
-Subject: [PATCH] trace-cmd: Setting plugin to 'nop' clears data before it's
- recorded
-
-Upstream-Status: Backport
-
-commit e09a5db1a929ab668c273b87c4f0a32b81e1c21a
-[trace-cmd: Add trace-cmd record --date option]
-
-moved the call to disable_all() in trace_record() from after record_data()
-to before it. Unfortunately disable_all() sets 'nop' in 'current_tracer'
-which has the side affect of clearing 'trace', thus all the latency tracer
-reports are empty/useless. Here we make disable_all() optionally call
-set_plugin() thus, where we need to, we can delay the disabling of the tracer
-until we have had a chance to capture 'trace'. We have added this delayed
-behavior to trace_record() to fix the latency reports, for all other calls to
-disable_all() we continue to have set_plugin() called.
-
-Link: http://lkml.kernel.org/r/1333899525-6436-1-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-record.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/trace-record.c b/trace-record.c
-index 1c56fa9..95d4a2a 100644
---- a/trace-record.c
-+++ b/trace-record.c
-@@ -897,11 +897,13 @@ static void disable_tracing(void)
- write_tracing_on(0);
- }
-
--static void disable_all(void)
-+static void disable_all(int disable_tracer)
- {
- disable_tracing();
-
-- set_plugin("nop");
-+ if (disable_tracer)
-+ set_plugin("nop");
-+
- reset_events();
-
- /* Force close and reset of ftrace pid file */
-@@ -1573,7 +1575,7 @@ static void set_funcs(void)
- /* make sure we are filtering functions */
- if (func_stack) {
- if (!functions_filtered()) {
-- disable_all();
-+ disable_all(1);
- die("Function stack trace set, but functions not filtered");
- }
- save_option(FUNC_STACK_TRACE);
-@@ -1938,7 +1940,7 @@ void trace_record (int argc, char **argv)
- break;
- }
- }
-- disable_all();
-+ disable_all(1);
- set_buffer_size();
- exit(0);
- } else
-@@ -2147,7 +2149,7 @@ void trace_record (int argc, char **argv)
-
- if (!extract) {
- fset = set_ftrace(!disable);
-- disable_all();
-+ disable_all(1);
-
- /* Record records the date first */
- if (record && date)
-@@ -2227,7 +2229,7 @@ void trace_record (int argc, char **argv)
- }
-
- if (!keep)
-- disable_all();
-+ disable_all(0);
-
- printf("Kernel buffer statistics:\n"
- " Note: \"entries\" are the entries left in the kernel ring buffer and are not\n"
-@@ -2249,6 +2251,8 @@ void trace_record (int argc, char **argv)
- if (keep)
- exit(0);
-
-+ set_plugin("nop");
-+
- /* If tracing_on was enabled before we started, set it on now */
- if (tracing_on_init_val)
- write_tracing_on(tracing_on_init_val);
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
deleted file mode 100644
index 8e7c2a45f9..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-trace-cmd: fix syntax error of shell
-
-Delete "<<<" syntax of bash in Makefile, else we would get following error:
-
- Syntax error: redirection unexpected
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- Makefile | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c1fa906..7973c53 100644
---- a/Makefile
-+++ b/Makefile
-@@ -89,8 +89,7 @@ endif
-
- # $(call test-build, snippet, ret) -> ret if snippet compiles
- # -> empty otherwise
--test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \
-- <<<'$1' && echo y), $2)
-+test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2)
-
- # have udis86 disassembler library?
- udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
deleted file mode 100644
index 6f3319dfd1..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "User interface to Ftrace"
-LICENSE = "GPLv2 & LGPLv2.1"
-
-require trace-cmd.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
- file://trace-input.c;beginline=5;endine=8;md5=6ad47cc2b03385d8456771eec5eeea0b"
-
-SRC_URI_append = "file://trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch \
- file://trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch \
- file://trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch \
- file://trace-cmd-fix-syntax-error-of-shell.patch \
-"
-
-EXTRA_OEMAKE = "'prefix=${prefix}'"
-
-FILES_${PN}-dbg += "${datadir}/trace-cmd/plugins/.debug/"
-
-do_install() {
- oe_runmake prefix="${prefix}" DESTDIR="${D}" install
-}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb
new file mode 100644
index 0000000000..a4d5382aaf
--- /dev/null
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb
@@ -0,0 +1,41 @@
+SUMMARY = "User interface to Ftrace"
+LICENSE = "GPLv2 & LGPLv2.1"
+
+require trace-cmd.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
+ file://trace-input.c;beginline=5;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \
+"
+SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547"
+
+PV = "2.3.2+git${SRCPV}"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \
+"
+
+EXTRA_OEMAKE = "\
+ 'prefix=${prefix}' \
+ 'bindir=${bindir}' \
+ 'man_dir=${mandir}' \
+ 'html_install=${datadir}/kernelshark/html' \
+ 'img_install=${datadir}/kernelshark/html/images' \
+ \
+ 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \
+ 'libdir=${@oe.path.relative(prefix, libdir)}' \
+ \
+ NO_PYTHON=1 \
+"
+
+FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug"
+
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.*.d
+}
+
+do_install() {
+ oe_runmake DESTDIR="${D}" install
+}
+
diff --git a/meta/recipes-lsb4/libpng/libpng12_1.2.51.bb b/meta/recipes-lsb4/libpng/libpng12_1.2.52.bb
index 6b2dcba1f1..5b67fe8b53 100644
--- a/meta/recipes-lsb4/libpng/libpng12_1.2.51.bb
+++ b/meta/recipes-lsb4/libpng/libpng12_1.2.52.bb
@@ -2,8 +2,8 @@ SUMMARY = "PNG image format decoding library"
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=ec135c8490e3b3d4ba2cc21f84c3a294 \
- file://png.h;beginline=314;endline=428;md5=151cf86c4efc2a7400f8a9a61d743d8e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4495b57387451782e5f34c2968c35ed0 \
+ file://png.h;beginline=314;endline=428;md5=0c93e62d39955f2b879c056165cfad43"
DEPENDS = "zlib"
PN = "libpng12"
@@ -11,8 +11,8 @@ S = "${WORKDIR}/libpng-${PV}"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng12/${PV}/libpng-${PV}.tar.xz"
-SRC_URI[md5sum] = "4efba67fa5aa2b785c6fcec2cc3e90c9"
-SRC_URI[sha256sum] = "c7d7b813b022afd70474f78bcc3655c7bb54edbf28dd4652e5521cbb6da56d4a"
+SRC_URI[md5sum] = "49d5c71929bf69a172147c47b9309fbe"
+SRC_URI[sha256sum] = "d4fb0fbf14057ad6d0319034188fc2aecddb493da8e3031b7b072ed28f510ec0"
BINCONFIG_GLOB = "${PN}-config"
diff --git a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb b/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
index 19247d8f12..a3e58f031e 100644
--- a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb
+++ b/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
@@ -9,12 +9,12 @@ HOMEPAGE = "http://search.cpan.org/dist/Pod-Plainer/"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=27;md5=80b4a99d477135bfcd1d0a44a041c63c"
+LIC_FILES_CHKSUM = "file://README;beginline=27;md5=227cf83970fc61264845825d9d2bf6f8"
SRC_URI = "http://search.cpan.org/CPAN/authors/id/R/RM/RMBARKER/Pod-Plainer-${PV}.tar.gz"
-SRC_URI[md5sum] = "15d42071d6bd861cb72daa8cc3111cd3"
-SRC_URI[sha256sum] = "9d153b1d8609606a3424f07a7f4ce955af32131d484cb9602812122bb1ee745b"
+SRC_URI[md5sum] = "f502eacd1a40894b9dfea55fc2cd5e7d"
+SRC_URI[sha256sum] = "1bbfbf7d1d4871e5a83bab2137e22d089078206815190eb1d5c1260a3499456f"
S = "${WORKDIR}/Pod-Plainer-${PV}"
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
new file mode 100755
index 0000000000..06cdcb9894
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
@@ -0,0 +1,32 @@
+From f6b879e7cc87d83343f5004369146881d1d1e335 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@freescale.com>
+Date: Wed, 23 Jul 2014 15:09:58 +0800
+Subject: [PATCH] pcm: pcm_local.h: include <time.h> to enable CLOCK_MONOTONIC
+
+CLOCK_MONITONIC is defined in <bits/time.h>, add <time.h> before <sys/time.h>.
+
+Commit f6b879e7cc87d83343f5004369146881d1d1e335 in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_local.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
+index 2206afe..80bbe59 100644
+--- a/src/pcm/pcm_local.h
++++ b/src/pcm/pcm_local.h
+@@ -24,6 +24,7 @@
+ #include <stdlib.h>
+ #include <limits.h>
+ #include <sys/uio.h>
++#include <time.h>
+ #include <sys/time.h>
+
+ #define _snd_mask sndrv_mask
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
new file mode 100755
index 0000000000..8be3d757a1
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
@@ -0,0 +1,34 @@
+From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@freescale.com>
+Date: Mon, 14 Jul 2014 16:55:48 +0800
+Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary
+
+For long time test case, the hw_ptr will exceed the boundary, then cause
+the avail size wrong.
+
+Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_rate.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
+index 7f667d4..2563d82 100644
+--- a/src/pcm/pcm_rate.c
++++ b/src/pcm/pcm_rate.c
+@@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
+ rate->hw_ptr =
+ (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
+ rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
++
++ rate->hw_ptr %= pcm->boundary;
+ }
+
+ static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
new file mode 100755
index 0000000000..89363d55d2
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
@@ -0,0 +1,345 @@
+From 3f179d6cc7c222dfa42fe094b7ef1e21685a05bc Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 22 Jul 2014 11:55:40 +0200
+Subject: [PATCH] pcm: route: Use get32 for multi-source route calculation
+
+The PCM route plugin can assign the destination value from average of
+multiple sources with attenuation. This requires the read of each
+channel value, sums and writes the resultant value in the requested
+format.
+
+Currently, get_labels is used for reading source values while
+put32_labels is used for writing the dest value. This is, however,
+a buggy implementation; get_labels gives the value as is only with
+endianness and signedness conversions, but put32_labels assumes that
+the value is normalized to 32bit int and it shifts down to the dest
+format. In addition, the current code lacks get_labels entries for
+the 24bit formats, as Shengjiu Wang spotted out.
+
+For fixing these bugs, this patch replaces the read with
+get32_labels and use always 64bit int for sum. This simplifies the
+code a lot and drops many lines.
+
+Commit fd84adc63e307572d05274be44c782a787087cda in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_route.c | 128 +++++++++-----------------------------------------
+ src/pcm/plugin_ops.h | 81 --------------------------------
+ 2 files changed, 23 insertions(+), 186 deletions(-)
+
+diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
+index 2beedf6..1ed9c5f 100644
+--- a/src/pcm/pcm_route.c
++++ b/src/pcm/pcm_route.c
+@@ -60,7 +60,7 @@ typedef struct {
+ typedef struct snd_pcm_route_ttable_dst snd_pcm_route_ttable_dst_t;
+
+ typedef struct {
+- enum {UINT32=0, UINT64=1, FLOAT=2} sum_idx;
++ enum {UINT64, FLOAT} sum_idx;
+ unsigned int get_idx;
+ unsigned int put_idx;
+ unsigned int conv_idx;
+@@ -232,55 +232,34 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_route_ttable_dst_t* ttable,
+ const snd_pcm_route_params_t *params)
+ {
+-#define GETS_LABELS
++#define GET32_LABELS
+ #define PUT32_LABELS
+ #include "plugin_ops.h"
+-#undef GETS_LABELS
++#undef GET32_LABELS
+ #undef PUT32_LABELS
+- static void *const zero_labels[3] = {
+- &&zero_int32, &&zero_int64,
++ static void *const zero_labels[2] = {
++ &&zero_int64,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ &&zero_float
+ #endif
+ };
+ /* sum_type att */
+- static void *const add_labels[3 * 2] = {
+- &&add_int32_noatt, &&add_int32_att,
++ static void *const add_labels[2 * 2] = {
+ &&add_int64_noatt, &&add_int64_att,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ &&add_float_noatt, &&add_float_att
+ #endif
+ };
+- /* sum_type att shift */
+- static void *const norm_labels[3 * 2 * 4] = {
+- 0,
+- &&norm_int32_8_noatt,
+- &&norm_int32_16_noatt,
+- &&norm_int32_24_noatt,
+- 0,
+- &&norm_int32_8_att,
+- &&norm_int32_16_att,
+- &&norm_int32_24_att,
+- &&norm_int64_0_noatt,
+- &&norm_int64_8_noatt,
+- &&norm_int64_16_noatt,
+- &&norm_int64_24_noatt,
+- &&norm_int64_0_att,
+- &&norm_int64_8_att,
+- &&norm_int64_16_att,
+- &&norm_int64_24_att,
++ /* sum_type att */
++ static void *const norm_labels[2 * 2] = {
++ &&norm_int64_noatt,
++ &&norm_int64_att,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+- &&norm_float_0,
+- &&norm_float_8,
+- &&norm_float_16,
+- &&norm_float_24,
+- &&norm_float_0,
+- &&norm_float_8,
+- &&norm_float_16,
+- &&norm_float_24,
++ &&norm_float,
++ &&norm_float,
+ #endif
+ };
+- void *zero, *get, *add, *norm, *put32;
++ void *zero, *get32, *add, *norm, *put32;
+ int nsrcs = ttable->nsrcs;
+ char *dst;
+ int dst_step;
+@@ -322,9 +301,9 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ }
+
+ zero = zero_labels[params->sum_idx];
+- get = gets_labels[params->get_idx];
++ get32 = get32_labels[params->get_idx];
+ add = add_labels[params->sum_idx * 2 + ttable->att];
+- norm = norm_labels[params->sum_idx * 8 + ttable->att * 4 + 4 - params->src_size];
++ norm = norm_labels[params->sum_idx * 2 + ttable->att];
+ put32 = put32_labels[params->put_idx];
+ dst = snd_pcm_channel_area_addr(dst_area, dst_offset);
+ dst_step = snd_pcm_channel_area_step(dst_area);
+@@ -335,9 +314,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+
+ /* Zero sum */
+ goto *zero;
+- zero_int32:
+- sum.as_sint32 = 0;
+- goto zero_end;
+ zero_int64:
+ sum.as_sint64 = 0;
+ goto zero_end;
+@@ -351,21 +327,14 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ const char *src = srcs[srcidx];
+
+ /* Get sample */
+- goto *get;
+-#define GETS_END after_get
++ goto *get32;
++#define GET32_END after_get
+ #include "plugin_ops.h"
+-#undef GETS_END
++#undef GET32_END
+ after_get:
+
+ /* Sum */
+ goto *add;
+- add_int32_att:
+- sum.as_sint32 += sample * ttp->as_int;
+- goto after_sum;
+- add_int32_noatt:
+- if (ttp->as_int)
+- sum.as_sint32 += sample;
+- goto after_sum;
+ add_int64_att:
+ sum.as_sint64 += (int64_t) sample * ttp->as_int;
+ goto after_sum;
+@@ -389,48 +358,10 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+
+ /* Normalization */
+ goto *norm;
+- norm_int32_8_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_8_att:
+- sum.as_sint64 <<= 8;
+- norm_int64_0_att:
+- div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_16_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_16_att:
+- sum.as_sint64 <<= 16;
++ norm_int64_att:
+ div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_24_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_24_att:
+- sum.as_sint64 <<= 24;
+- div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_8_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_8_noatt:
+- sum.as_sint64 <<= 8;
+- goto norm_int;
+-
+- norm_int32_16_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_16_noatt:
+- sum.as_sint64 <<= 16;
+- goto norm_int;
+-
+- norm_int32_24_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_24_noatt:
+- sum.as_sint64 <<= 24;
+- goto norm_int;
+-
+- norm_int64_0_noatt:
+- norm_int:
++ /* fallthru */
++ norm_int64_noatt:
+ if (sum.as_sint64 > (int64_t)0x7fffffff)
+ sample = 0x7fffffff; /* maximum positive value */
+ else if (sum.as_sint64 < -(int64_t)0x80000000)
+@@ -440,16 +371,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ goto after_norm;
+
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+- norm_float_8:
+- sum.as_float *= 1 << 8;
+- goto norm_float;
+- norm_float_16:
+- sum.as_float *= 1 << 16;
+- goto norm_float;
+- norm_float_24:
+- sum.as_float *= 1 << 24;
+- goto norm_float;
+- norm_float_0:
+ norm_float:
+ sum.as_float = rint(sum.as_float);
+ if (sum.as_float > (int64_t)0x7fffffff)
+@@ -644,7 +565,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
+ return err;
+ route->params.use_getput = snd_pcm_format_physical_width(src_format) == 24 ||
+ snd_pcm_format_physical_width(dst_format) == 24;
+- route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S16);
++ route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32);
+ route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format);
+ route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
+ route->params.src_size = snd_pcm_format_width(src_format) / 8;
+@@ -652,10 +573,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ route->params.sum_idx = FLOAT;
+ #else
+- if (snd_pcm_format_width(src_format) == 32)
+- route->params.sum_idx = UINT64;
+- else
+- route->params.sum_idx = UINT32;
++ route->params.sum_idx = UINT64;
+ #endif
+ return 0;
+ }
+diff --git a/src/pcm/plugin_ops.h b/src/pcm/plugin_ops.h
+index 21535c9..eb8c2c4 100644
+--- a/src/pcm/plugin_ops.h
++++ b/src/pcm/plugin_ops.h
+@@ -668,87 +668,6 @@ getu_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GETU_END;
+ }
+ #endif
+
+-#ifdef GETS_LABELS
+-/* width endswap sign_toggle */
+-static void *const gets_labels[4 * 2 * 2] = {
+- &&gets_1_1, /* 8h -> 8h */
+- &&gets_1_9, /* 8h ^> 8h */
+- &&gets_1_1, /* 8s -> 8h */
+- &&gets_1_9, /* 8s ^> 8h */
+- &&gets_12_12, /* 16h -> 16h */
+- &&gets_12_92, /* 16h ^> 16h */
+- &&gets_12_21, /* 16s -> 16h */
+- &&gets_12_A1, /* 16s ^> 16h */
+- &&gets_0123_0123, /* 24h -> 24h */
+- &&gets_0123_0923, /* 24h ^> 24h */
+- &&gets_1230_0321, /* 24s -> 24h */
+- &&gets_1230_0B21, /* 24s ^> 24h */
+- &&gets_1234_1234, /* 32h -> 32h */
+- &&gets_1234_9234, /* 32h ^> 32h */
+- &&gets_1234_4321, /* 32s -> 32h */
+- &&gets_1234_C321, /* 32s ^> 32h */
+-};
+-#endif
+-
+-#ifdef GETS_END
+-while (0) {
+-gets_1_1: sample = as_s8c(src); goto GETS_END;
+-gets_1_9: sample = (int8_t)(as_s8c(src) ^ 0x80); goto GETS_END;
+-gets_12_12: sample = as_s16c(src); goto GETS_END;
+-gets_12_92: sample = (int16_t)(as_s16c(src) ^ 0x8000); goto GETS_END;
+-gets_12_21: sample = (int16_t)bswap_16(as_s16c(src)); goto GETS_END;
+-gets_12_A1: sample = (int16_t)bswap_16(as_s16c(src) ^ 0x80); goto GETS_END;
+-gets_0123_0123: sample = sx24((int32_t)(as_s32c(src) << 8) >> 8); goto GETS_END;
+-gets_0123_0923: sample = sx24((int32_t)((as_s32c(src) ^ 0x800000) << 8) >> 8); goto GETS_END;
+-gets_1230_0321: sample = sx24((int32_t)(bswap_32(as_s32c(src)) << 8) >> 8); goto GETS_END;
+-gets_1230_0B21: sample = sx24((int32_t)(bswap_32(as_s32c(src) ^ 0x8000) << 8) >> 8); goto GETS_END;
+-gets_1234_1234: sample = as_s32c(src); goto GETS_END;
+-gets_1234_9234: sample = (int32_t)(as_s32c(src) ^ 0x80000000); goto GETS_END;
+-gets_1234_4321: sample = (int32_t)bswap_32(as_s32c(src)); goto GETS_END;
+-gets_1234_C321: sample = (int32_t)bswap_32(as_s32c(src) ^ 0x80); goto GETS_END;
+-}
+-#endif
+-
+-#ifdef PUT_LABELS
+-/* width endswap sign_toggle */
+-static void *const put_labels[4 * 2 * 2] = {
+- &&put_1_1, /* 8h -> 8h */
+- &&put_1_9, /* 8h ^> 8h */
+- &&put_1_1, /* 8h -> 8s */
+- &&put_1_9, /* 8h ^> 8s */
+- &&put_12_12, /* 16h -> 16h */
+- &&put_12_92, /* 16h ^> 16h */
+- &&put_12_21, /* 16h -> 16s */
+- &&put_12_29, /* 16h ^> 16s */
+- &&put_0123_0123, /* 24h -> 24h */
+- &&put_0123_0923, /* 24h ^> 24h */
+- &&put_0123_3210, /* 24h -> 24s */
+- &&put_0123_3290, /* 24h ^> 24s */
+- &&put_1234_1234, /* 32h -> 32h */
+- &&put_1234_9234, /* 32h ^> 32h */
+- &&put_1234_4321, /* 32h -> 32s */
+- &&put_1234_4329, /* 32h ^> 32s */
+-};
+-#endif
+-
+-#ifdef PUT_END
+-put_1_1: as_s8(dst) = sample; goto PUT_END;
+-put_1_9: as_u8(dst) = sample ^ 0x80; goto PUT_END;
+-put_12_12: as_s16(dst) = sample; goto PUT_END;
+-put_12_92: as_u16(dst) = sample ^ 0x8000; goto PUT_END;
+-put_12_21: as_s16(dst) = bswap_16(sample); goto PUT_END;
+-put_12_29: as_u16(dst) = bswap_16(sample) ^ 0x80; goto PUT_END;
+-/* this always writes the unused byte in 24-bit formats as 0x00 */
+-put_0123_0123: as_s32(dst) = sx24(sample & 0x00ffffff); goto PUT_END;
+-put_0123_0923: as_u32(dst) = sx24((sample & 0x00ffffff) ^ 0x800000); goto PUT_END;
+-put_0123_3210: as_s32(dst) = sx24s(bswap_32(sample) & 0xffffff00); goto PUT_END;
+-put_0123_3290: as_u32(dst) = sx24s((bswap_32(sample) & 0xffffff00) ^ 0x8000); goto PUT_END;
+-put_1234_1234: as_s32(dst) = sample; goto PUT_END;
+-put_1234_9234: as_u32(dst) = sample ^ 0x80000000; goto PUT_END;
+-put_1234_4321: as_s32(dst) = bswap_32(sample); goto PUT_END;
+-put_1234_4329: as_u32(dst) = bswap_32(sample) ^ 0x80; goto PUT_END;
+-#endif
+-
+ #ifdef PUT32F_LABELS
+ /* type (0 = float, 1 = float64), endswap */
+ static void *const put32float_labels[2 * 2] = {
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
index 41b3c23a40..75a6eb8a3c 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -1,6 +1,6 @@
-From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001
+From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001
From: "Hong H. Pham" <hong.pham@windriver.com>
-Date: Tue, 26 Feb 2013 19:40:04 -0500
+Date: Fri, 29 Aug 2014 17:13:55 +0300
Subject: [PATCH] Check if wordexp function is supported
eglibc could be configured to build without wordexp, so it is not enough
@@ -8,24 +8,25 @@ to check if wordexp.h exists (the header file could be installed, but it's
possible that the wordexp() function is not supported). An additional
check if wordexp() is supported by the system C library is needed.
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [configuration]
Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
- configure.in | 5 ++++-
- src/userfile.c | 2 +-
+ configure.ac | 5 ++++-
+ src/userfile.c | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
-diff --git a/configure.in b/configure.in
-index 4bcb0d6..ba1c2dd 100644
---- a/configure.in
-+++ b/configure.in
-@@ -333,7 +333,10 @@ arm*)
- esac
+diff --git a/configure.ac b/configure.ac
+index b8353a0..773b72f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -311,7 +311,10 @@ fi
+ AC_SUBST(ALSA_DEPLIBS)
- dnl Check for wordexp.h
--AC_CHECK_HEADERS([wordexp.h])
-+AC_CHECK_HEADERS([wordexp.h],
+ dnl Check for headers
+-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h],
+ dnl Make sure wordexp is supported by the C library
+ AC_CHECK_FUNCS([wordexp])
+)
@@ -46,5 +47,5 @@ index 3a73836..b8ce809 100644
#include <assert.h>
int snd_user_file(const char *file, char **result)
--
-1.7.10.4
+1.9.1
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
deleted file mode 100644
index f1a7947c2b..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
-From: Kai Kang <jiashuo.kang at gmail.com>
-Date: Thu, 15 Aug 2013 17:17:19 +0800
-Subject: [PATCH] Update iatomic.h functions definitions for mips
-
-Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
-__inline__' that may cause compile fails when cross compile for mips.
-The error message looks like:
-
-| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
-| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
-
-Replace the 'extern __inline__' with 'static __inline__' to fix this
-issue.
-
-Signed-off-by: Kai Kang <jiashuo.kang at gmail.com>
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- include/iatomic.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/iatomic.h b/include/iatomic.h
-index 5711fe8..2393297 100644
---- a/include/iatomic.h
-+++ b/include/iatomic.h
-@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
- * Atomically adds @i to @v. Note that the guaranteed useful range
- * of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_add(int i, atomic_t * v)
-+static __inline__ void atomic_add(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
- * Atomically subtracts @i from @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_sub(int i, atomic_t * v)
-+static __inline__ void atomic_sub(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
- /*
- * Same as above, but return the result value
- */
--extern __inline__ int atomic_add_return(int i, atomic_t * v)
-+static __inline__ int atomic_add_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
-@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
- return result;
- }
-
--extern __inline__ int atomic_sub_return(int i, atomic_t * v)
-+static __inline__ int atomic_sub_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
---
-1.8.1.2
-
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
index cbe04484a4..9a4aab44d4 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
@@ -14,13 +14,15 @@ BBCLASSEXTEND = "native nativesdk"
#FIXME: remove the following
ARM_INSTRUCTION_SET = "arm"
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
file://Check-if-wordexp-function-is-supported.patch \
file://fix-tstamp-declaration.patch \
- file://Update-iatomic.h-functions-definitions-for-mips.patch \
- "
-SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b"
-SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19"
+ file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \
+ file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \
+ file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \
+"
+SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3"
+SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d"
inherit autotools pkgconfig
@@ -31,14 +33,13 @@ EXTRA_OECONF = "--disable-python"
EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
-PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev"
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug"
FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
FILES_libasound = "${libdir}/libasound.so.*"
FILES_alsa-server = "${bindir}/*"
FILES_alsa-conf = "${datadir}/alsa/"
-FILES_alsa-dev += "${libdir}/pkgconfig/ ${includedir}/alsa ${datadir}/aclocal/*"
FILES_alsa-conf-base = "\
${datadir}/alsa/alsa.conf \
${datadir}/alsa/cards/aliases.conf \
@@ -46,4 +47,8 @@ ${datadir}/alsa/pcm/default.conf \
${datadir}/alsa/pcm/dmix.conf \
${datadir}/alsa/pcm/dsnoop.conf"
-RDEPENDS_libasound = "alsa-conf-base"
+RDEPENDS_libasound = "alsa-conf-base alsa-conf"
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch b/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch
deleted file mode 100644
index 09b10f17e6..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: alsa-tools-1.0.26.1/hda-verb/hda-verb.c
-===================================================================
---- alsa-tools-1.0.26.1.orig/hda-verb/hda-verb.c
-+++ alsa-tools-1.0.26.1/hda-verb/hda-verb.c
-@@ -13,7 +13,7 @@
- #include <ctype.h>
- #include <unistd.h>
- #include <sys/ioctl.h>
--#ifndef __PPC__
-+#if !(__PPC__ || __mips__)
- #include <sys/io.h>
- #endif
- #include <sys/types.h>
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
index 62d71eaacd..4b9509e863 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
@@ -8,20 +8,19 @@ DEPENDS = "alsa-lib ncurses"
LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/alsa-tools-${PV}.tar.bz2 \
- file://mips_has_no_io_h.patch \
+SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
file://autotools.patch \
- ${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 wayland directfb', '', \
- 'file://makefile_no_gtk.patch', d)}"
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
+ 'file://makefile_no_gtk.patch', d)}"
-SRC_URI[md5sum] = "1ea381d00a6069a98613aa7effa4cb51"
-SRC_URI[sha256sum] = "6562611b5a6560712f109e09740a9d4fa47296b07ed9590cb44139c5f154ada2"
+SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6"
+SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761"
inherit autotools-brokensep pkgconfig
EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 wayland directfb', 'gtk+', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
# configure.ac/.in doesn't exist so force copy
diff --git a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
index 968c81ee2b..2d49cc5622 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
@@ -13,5 +13,5 @@ S = "${WORKDIR}/alsa-utils-${PV}"
do_install() {
install -d ${D}${sbindir}
- install -m 0755 ${S}/alsaconf/alsaconf ${D}${sbindir}/
+ install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
}
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
index 477cd11b12..e99dd515f0 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
+++ b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -1,35 +1,44 @@
-From 37c99a3cbff36915b56a5703eeaed3c70796f80f Mon Sep 17 00:00:00 2001
+From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Sun, 9 Oct 2011 20:06:35 +0200
-Subject: [PATCH] alsactl: don't let systemd unit restore the volume when asound.state is missing
+Date: Fri, 29 Aug 2014 18:58:56 +0300
+Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
+ asound.state is missing
This avoids an error on bootup
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
Upstream-Status: Pending
-Index: alsa-utils-1.0.27.2/alsactl/Makefile.am
-===================================================================
---- alsa-utils-1.0.27.2.orig/alsactl/Makefile.am
-+++ alsa-utils-1.0.27.2/alsactl/Makefile.am
-@@ -36,8 +36,8 @@ install-data-hook:
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+---
+ alsactl/Makefile.am | 7 ++++---
+ alsactl/alsa-restore.service.in | 1 +
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
+index 47f06e9..b728c06 100644
+--- a/alsactl/Makefile.am
++++ b/alsactl/Makefile.am
+@@ -43,9 +43,10 @@ install-data-hook:
endif
edit = \
- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
+- -e 's,@mydatadir\@,$(mydatadir),g' \
- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
-+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' -e 's,@sbindir\@,$(sbindir),g' \
++ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
++ -e 's,@sbindir\@,$(sbindir),g' \
++ -e 's,@mydatadir\@,$(mydatadir),g' \
+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
< $< > $@ || rm $@
alsa-state.service: alsa-state.service.in
-Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
-===================================================================
---- alsa-utils-1.0.27.2.orig/alsactl/alsa-restore.service.in
-+++ alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
+diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
+index 245a439..b017854 100644
+--- a/alsactl/alsa-restore.service.in
++++ b/alsactl/alsa-restore.service.in
@@ -10,6 +10,7 @@ DefaultDependencies=no
After=alsa-state.service
Before=shutdown.target
@@ -38,3 +47,6 @@ Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
[Service]
Type=oneshot
+--
+1.9.1
+
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
new file mode 100644
index 0000000000..5df004aeae
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
@@ -0,0 +1,48 @@
+Upstream-Status: Pending
+
+aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming
+via CTRL-C. Fixed the issue by reverting buggy patches and
+properly handling 'in_aborting' flag in appropriate functions.
+
+Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
+Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
+
+--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530
++++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530
+@@ -392,14 +392,22 @@
+ putchar('\n');
+ if (!quiet_mode)
+ fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig));
+- if (handle)
++ if (stream == SND_PCM_STREAM_CAPTURE) {
++ if (fmt_rec_table[file_type].end) {
++ fmt_rec_table[file_type].end(fd);
++ fd = -1;
++ }
++ stream = -1;
++ }
++ if (fd > 1) {
++ close(fd);
++ fd = -1;
++ }
++ if (handle && sig != SIGABRT) {
+ snd_pcm_abort(handle);
+- if (sig == SIGABRT) {
+- /* do not call snd_pcm_close() and abort immediately */
+ handle = NULL;
+- prg_exit(EXIT_FAILURE);
+ }
+- signal(sig, signal_handler);
++ prg_exit(EXIT_FAILURE);
+ }
+
+ /* call on SIGUSR1 signal. */
+@@ -2096,7 +2104,7 @@
+ ssize_t result = count, r;
+ size_t size;
+
+- while (count > 0) {
++ while (count > 0 && !in_aborting) {
+ size = count;
+ if (size > chunk_bytes - buffer_pos)
+ size = chunk_bytes - buffer_pos;
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
index 123926a069..ac5512a7df 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
@@ -9,22 +9,25 @@ DEPENDS = "alsa-lib ncurses libsamplerate0 udev"
PACKAGECONFIG ??= "udev"
PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
+PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
+ file://alsa-utils-aplay-interrupt-signal-handling.patch \
"
-SRC_URI[md5sum] = "b65e9a04181bd7c9db7667a4566f8dc3"
-SRC_URI[sha256sum] = "02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea"
+SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211"
+SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc"
# lazy hack. needs proper fixing in gettext.m4, see
# http://bugs.openembedded.org/show_bug.cgi?id=2348
# please close bug and remove this comment when properly fixed
#
-EXTRA_OECONF = "--disable-xmlto"
EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
-inherit autotools-brokensep gettext pkgconfig
+PR = "r1"
+
+inherit autotools gettext pkgconfig
# This are all packages that we need to make. Also, the now empty alsa-utils
# ipk depends on them.
diff --git a/meta/recipes-multimedia/flac/flac_1.3.0.bb b/meta/recipes-multimedia/flac/flac_1.3.0.bb
index ab37cbe0ad..ba9b62822c 100644
--- a/meta/recipes-multimedia/flac/flac_1.3.0.bb
+++ b/meta/recipes-multimedia/flac/flac_1.3.0.bb
@@ -21,13 +21,16 @@ SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
SRC_URI[md5sum] = "13b5c214cee8373464d3d65dee362cdd"
SRC_URI[sha256sum] = "fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc"
-inherit autotools-brokensep gettext
+PR = "r1"
+
+inherit autotools gettext
EXTRA_OECONF = "--disable-oggtest \
--with-ogg-libraries=${STAGING_LIBDIR} \
--with-ogg-includes=${STAGING_INCDIR} \
--disable-xmms-plugin \
--without-libiconv-prefix \
+ ac_cv_prog_NASM="" \
"
EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}"
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
new file mode 100644
index 0000000000..7da0e14525
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
@@ -0,0 +1,34 @@
+gst-ffmpeg: aacdec: check channel count
+
+Prevent out of array accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/aacdec.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
+index 239153a..6c17c33 100644
+--- a/gst-libs/ext/libav/libavcodec/aacdec.c
++++ b/gst-libs/ext/libav/libavcodec/aacdec.c
+@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
+ }
+ }
+
++ if (avctx->channels > MAX_CHANNELS) {
++ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
++ return AVERROR_INVALIDDATA;
++ }
++
+ AAC_INIT_VLC_STATIC( 0, 304);
+ AAC_INIT_VLC_STATIC( 1, 270);
+ AAC_INIT_VLC_STATIC( 2, 550);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
new file mode 100644
index 0000000000..31fa51a3ea
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
@@ -0,0 +1,40 @@
+From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 30 Aug 2013 23:40:47 +0200
+Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/dsputil.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
+index 53dc2eb..6264832 100644
+--- a/gst-libs/ext/libav/libavcodec/dsputil.c
++++ b/gst-libs/ext/libav/libavcodec/dsputil.c
+@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
+
+ static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
+ long i;
+- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
++ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
+ long a = *(long*)(src+i);
+ long b = *(long*)(dst+i);
+ *(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
+@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
+ }
+ }else
+ #endif
+- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
++ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
+ long a = *(long*)(src1+i);
+ long b = *(long*)(src2+i);
+ *(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
new file mode 100644
index 0000000000..5ff65834e4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
@@ -0,0 +1,50 @@
+gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
+
+Fixes Ticket2982
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/parser.c | 10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/parser.c b/libavcodec/parser.c
+index 2c6de6e..66eca06 100644
+--- a/gst-libs/ext/libav/libavcodec/parser.c
++++ b/gst-libs/ext/libav/libavcodec/parser.c
+@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
+ if(next == END_NOT_FOUND){
+ void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
+
+- if(!new_buffer)
++ if(!new_buffer) {
++ pc->index = 0;
+ return AVERROR(ENOMEM);
++ }
+ pc->buffer = new_buffer;
+ memcpy(&pc->buffer[pc->index], *buf, *buf_size);
+ pc->index += *buf_size;
+@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
+ /* append to buffer */
+ if(pc->index){
+ void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
+-
+- if(!new_buffer)
++ if(!new_buffer) {
++ pc->overread_index =
++ pc->index = 0;
+ return AVERROR(ENOMEM);
++ }
+ pc->buffer = new_buffer;
+ if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
+ memcpy(&pc->buffer[pc->index], *buf,
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
new file mode 100644
index 0000000000..7f6eb48889
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
@@ -0,0 +1,81 @@
+gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
+ using the pointers
+
+Fixes out of array accesses
+Fixes Ticket2850
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Singed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/rpza.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
+index 635b406..f291a95 100644
+--- a/gst-libs/ext/libav/libavcodec/rpza.c
++++ b/gst-libs/ext/libav/libavcodec/rpza.c
+@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ unsigned short *pixels = (unsigned short *)s->frame.data[0];
+
+ int row_ptr = 0;
+- int pixel_ptr = 0;
++ int pixel_ptr = -4;
+ int block_ptr;
+ int pixel_x, pixel_y;
+ int total_blocks;
+@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ colorA = AV_RB16 (&s->buf[stream_ptr]);
+ stream_ptr += 2;
+ while (n_blocks--) {
++ ADVANCE_BLOCK()
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ for (pixel_x = 0; pixel_x < 4; pixel_x++){
+@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ }
+ break;
+
+@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ color4[2] |= ((21 * ta + 11 * tb) >> 5);
+
+ while (n_blocks--) {
++ ADVANCE_BLOCK();
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ index = s->buf[stream_ptr++];
+@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ }
+ break;
+
+ /* Fill block with 16 colors */
+ case 0x00:
++ ADVANCE_BLOCK();
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ for (pixel_x = 0; pixel_x < 4; pixel_x++){
+@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ break;
+
+ /* Unknown opcode */
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
new file mode 100644
index 0000000000..3ca6fc4dc5
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
@@ -0,0 +1,32 @@
+From c17a0ad1df15a94d0b1239adc2afb593bdf0a153 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 3 Oct 2014 22:50:45 +0200
+Subject: [PATCH 1/2] avcodec/smc: fix off by 1 error
+
+Upstream-Status: Backport
+
+Fixes out of array access
+Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/smc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/ext/libav/libavcodec/smc.c b/gst-libs/ext/libav/libavcodec/smc.c
+index 3cd5e53..dec9f71 100644
+--- a/gst-libs/ext/libav/libavcodec/smc.c
++++ b/gst-libs/ext/libav/libavcodec/smc.c
+@@ -69,7 +69,7 @@ typedef struct SmcContext {
+ row_ptr += stride * 4; \
+ } \
+ total_blocks--; \
+- if (total_blocks < 0) \
++ if (total_blocks < 0 + !!n_blocks) \
+ { \
+ av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
+ return; \
+--
+2.1.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
new file mode 100644
index 0000000000..e0e4239c2f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
@@ -0,0 +1,29 @@
+gst-ffmpeg: error concealment: initialize block index.
+
+Fixes CVE-2011-3941 (out of bounds write)
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/error_resilience.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
+index 8bb5d0c..d55c000 100644
+--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
++++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
+@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
+ s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
+ s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
+
++ ff_init_block_index(s);
++ ff_update_block_index(s);
++
+ if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
+ H264Context *h= (void*)s;
+ h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
new file mode 100644
index 0000000000..8eef6e99cc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
@@ -0,0 +1,37 @@
+gst-ffmpeg: error_concealment: Check that the picture is not in a half
+
+Fixes state becoming inconsistent
+Fixes a null pointer dereference
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/error_resilience.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
+index 01f7424..2b6bc42 100644
+--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
++++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
+@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
+ s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
+ s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
+
++ if ( s->picture_structure == PICT_FRAME
++ && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
++ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
++ return;
++ }
++
+ if(s->current_picture.motion_val[0] == NULL){
+ av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
new file mode 100644
index 0000000000..80325db4d6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
@@ -0,0 +1,36 @@
+gst-ffmpeg: ffserver: set oformat
+
+Fix Ticket1986
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
+
+Upstream-Status: Backport
+
+---
+ ffserver.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/ffserver.c b/ffserver.c
+index 4044d0f..8740140 100644
+--- a/gst-libs/ext/libav/ffserver.c
++++ b/gst-libs/ext/libav/ffserver.c
+@@ -2937,12 +2937,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
+ {
+ AVFormatContext *avc;
+ AVStream *avs = NULL;
++ AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
+ int i;
+
+ avc = avformat_alloc_context();
+- if (avc == NULL) {
++ if (avc == NULL || !rtp_format) {
+ return -1;
+ }
++ avc->oformat = rtp_format;
+ av_dict_set(&avc->metadata, "title",
+ stream->title[0] ? stream->title : "No Title", 0);
+ avc->nb_streams = stream->nb_streams;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
new file mode 100644
index 0000000000..05a9de3334
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
@@ -0,0 +1,145 @@
+gst-ffmpeg: h264: set parameters from SPS whenever it changes
+
+Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
+alternating bit depths.
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/gst-libs/ext/libav/libavcodec/h264.c.old b/gst-libs/ext/libav/libavcodec/h264.c
+index 3621f41..718906a 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.c.old
++++ b/gst-libs/ext/libav/libavcodec/h264.c
+@@ -2491,6 +2491,34 @@ int ff_h264_get_profile(SPS *sps)
+ return profile;
+ }
+
++static int h264_set_parameter_from_sps(H264Context *h)
++{
++ MpegEncContext *s = &h->s;
++ AVCodecContext * avctx= s->avctx;
++
++ if (s->flags& CODEC_FLAG_LOW_DELAY ||
++ (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
++ s->low_delay=1;
++
++ if(avctx->has_b_frames < 2)
++ avctx->has_b_frames= !s->low_delay;
++
++ if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
++ if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
++ avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
++ h->pixel_shift = h->sps.bit_depth_luma > 8;
++
++ ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
++ ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
++ dsputil_init(&s->dsp, s->avctx);
++ } else {
++ av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
++ return -1;
++ }
++ }
++ return 0;
++}
++
+ /**
+ * decodes a slice header.
+ * This will also call MPV_common_init() and frame_start() as needed.
+@@ -2505,7 +2533,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
+ MpegEncContext * const s0 = &h0->s;
+ unsigned int first_mb_in_slice;
+ unsigned int pps_id;
+- int num_ref_idx_active_override_flag;
++ int num_ref_idx_active_override_flag, ret;
+ unsigned int slice_type, tmp, i, j;
+ int default_ref_list_done = 0;
+ int last_pic_structure;
+@@ -2569,7 +2597,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
+ av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id);
+ return -1;
+ }
+- h->sps = *h0->sps_buffers[h->pps.sps_id];
++
++ if (h->pps.sps_id != h->current_sps_id ||
++ h0->sps_buffers[h->pps.sps_id]->new) {
++ h0->sps_buffers[h->pps.sps_id]->new = 0;
++
++ h->current_sps_id = h->pps.sps_id;
++ h->sps = *h0->sps_buffers[h->pps.sps_id];
++
++ if ((ret = h264_set_parameter_from_sps(h)) < 0)
++ return ret;
++ }
+
+ s->avctx->profile = ff_h264_get_profile(&h->sps);
+ s->avctx->level = h->sps.level_idc;
+@@ -3811,26 +3811,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
+ case NAL_SPS:
+ init_get_bits(&s->gb, ptr, bit_length);
+ ff_h264_decode_seq_parameter_set(h);
+-
+- if (s->flags& CODEC_FLAG_LOW_DELAY ||
+- (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
+- s->low_delay=1;
+-
+- if(avctx->has_b_frames < 2)
+- avctx->has_b_frames= !s->low_delay;
+-
+- if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
+- if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
+- avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
+- h->pixel_shift = h->sps.bit_depth_luma > 8;
+-
+- ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
+- ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
+- dsputil_init(&s->dsp, s->avctx);
+- } else {
+- av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
+- return -1;
+- }
++ if (h264_set_parameter_from_sps(h) < 0) {
++ return -1;
+ }
+ break;
+ case NAL_PPS:
+diff --git a/gst-libs/ext/libav/libavcodec/h264.h.old b/gst-libs/ext/libav/libavcodec/h264.h
+index e3cc815..b77ad98 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.h.old
++++ b/gst-libs/ext/libav/libavcodec/h264.h
+@@ -202,6 +202,7 @@ typedef struct SPS{
+ int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8
+ int residual_color_transform_flag; ///< residual_colour_transform_flag
+ int constraint_set_flags; ///< constraint_set[0-3]_flag
++ int new; ///< flag to keep track if the decoder context needs re-init due to changed SPS
+ }SPS;
+
+ /**
+@@ -333,6 +334,7 @@ typedef struct H264Context{
+ int emu_edge_width;
+ int emu_edge_height;
+
++ unsigned current_sps_id; ///< id of the current SPS
+ SPS sps; ///< current sps
+
+ /**
+diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c.old b/gst-libs/ext/libav/libavcodec/h264_ps.c
+index 7491807..0929098 100644
+--- a/gst-libs/ext/libav/libavcodec/h264_ps.c.old
++++ b/gst-libs/ext/libav/libavcodec/h264_ps.c
+@@ -438,10 +438,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
+ sps->timing_info_present_flag ? sps->time_scale : 0
+ );
+ }
++ sps->new = 1;
+
+ av_free(h->sps_buffers[sps_id]);
+- h->sps_buffers[sps_id]= sps;
+- h->sps = *sps;
++ h->sps_buffers[sps_id] = sps;
++ h->sps = *sps;
++ h->current_sps_id = sps_id;
++
+ return 0;
+ fail:
+ av_free(sps);
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
new file mode 100644
index 0000000000..5d45c1a96c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
@@ -0,0 +1,33 @@
+gst-ffmpeg: h264: skip error concealment when SPS and slices are
+ mismatching
+
+Fixes out of array accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d)
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/h264.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index da144db..0aab4e7 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.c
++++ b/gst-libs/ext/libav/libavcodec/h264.c
+@@ -2351,7 +2351,7 @@ static int field_end(H264Context *h, int in_setup)
+ * past end by one (callers fault) and resync_mb_y != 0
+ * causes problems for the first MB line, too.
+ */
+- if (!FIELD_PICTURE)
++ if (!FIELD_PICTURE && h->current_slice && !h->sps.new)
+ ff_er_frame_end(s);
+
+ ff_MPV_frame_end(s);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
new file mode 100644
index 0000000000..1e62b50360
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
@@ -0,0 +1,39 @@
+gst-ffmpeg: h264_sei: Fix infinite loop.
+
+Fixsot yet fixed parts of CVE-2011-3946.
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/h264_sei.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+
+diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
+index 374e53d..80d70e5 100644
+--- a/gst-libs/ext/libav/libavcodec/h264_sei.c
++++ b/gst-libs/ext/libav/libavcodec/h264_sei.c
+@@ -169,11 +169,15 @@ int ff_h264_decode_sei(H264Context *h){
+
+ type=0;
+ do{
++ if (get_bits_left(&s->gb) < 8)
++ return -1;
+ type+= show_bits(&s->gb, 8);
+ }while(get_bits(&s->gb, 8) == 255);
+
+ size=0;
+ do{
++ if (get_bits_left(&s->gb) < 8)
++ return -1;
+ size+= show_bits(&s->gb, 8);
+ }while(get_bits(&s->gb, 8) == 255);
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
new file mode 100644
index 0000000000..6b60d163fb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
@@ -0,0 +1,30 @@
+gst-ffmpeg: huffyuvdec: check width more completely, avoid out of array
+ accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/huffyuv.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
+index 6e88114..ca5bcd8 100644
+--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
++++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
+@@ -526,6 +526,10 @@ s->bgr32=1;
+ assert(0);
+ }
+
++ if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && avctx->width%4) {
++ av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 this colorspace and predictor\n");
++ return AVERROR_INVALIDDATA;
++ }
+ alloc_temp(s);
+
+ // av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
new file mode 100644
index 0000000000..ea4aa222b3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
@@ -0,0 +1,45 @@
+gst-ffmpeg: lavf: compute probe buffer size more reliably.
+
+The previous code computes the offset by reversing the growth
+of the allocated buffer size: it is complex and did lead to
+inconsistencies when the size limit is reached.
+
+Fix trac ticket #1991.
+(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)
+
+Conflicts:
+ libavformat/utils.c
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavformat/utils.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 7940037..be73c4a 100644
+--- a/gst-libs/ext/libav/libavformat/utils.c
++++ b/gst-libs/ext/libav/libavformat/utils.c
+@@ -459,7 +459,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
+ {
+ AVProbeData pd = { filename ? filename : "", NULL, -offset };
+ unsigned char *buf = NULL;
+- int ret = 0, probe_size;
++ int ret = 0, probe_size, buf_offset = 0;
+
+ if (!max_probe_size) {
+ max_probe_size = PROBE_BUF_MAX;
+@@ -499,7 +499,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
+ score = 0;
+ ret = 0; /* error was end of file, nothing read */
+ }
+- pd.buf_size += ret;
++ pd.buf_size = buf_offset += ret;
+ pd.buf = &buf[offset];
+
+ memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
new file mode 100644
index 0000000000..1e5fb7deb1
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
@@ -0,0 +1,44 @@
+gst-ffmpeg: pngdec/filter: dont access out of array elements at the end
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/pngdec.c | 12 ++++--------
+ 1 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
+index 97c0ad1..193e35e 100644
+--- a/gst-libs/ext/libav/libavcodec/pngdec.c
++++ b/gst-libs/ext/libav/libavcodec/pngdec.c
+@@ -190,7 +190,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
+ if(bpp >= 2) g = dst[1];\
+ if(bpp >= 3) b = dst[2];\
+ if(bpp >= 4) a = dst[3];\
+- for(; i < size; i+=bpp) {\
++ for(; i <= size - bpp; i+=bpp) {\
+ dst[i+0] = r = op(r, src[i+0], last[i+0]);\
+ if(bpp == 1) continue;\
+ dst[i+1] = g = op(g, src[i+1], last[i+1]);\
+@@ -206,13 +206,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
+ else if(bpp == 2) UNROLL1(2, op)\
+ else if(bpp == 3) UNROLL1(3, op)\
+ else if(bpp == 4) UNROLL1(4, op)\
+- else {\
+- for (; i < size; i += bpp) {\
+- int j;\
+- for (j = 0; j < bpp; j++)\
+- dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
+- }\
+- }
++ for (; i < size; i++) {\
++ dst[i] = op(dst[i-bpp], src[i], last[i]);\
++ }\
+
+ /* NOTE: 'dst' can be equal to 'last' */
+ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
new file mode 100644
index 0000000000..8c94232d6d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
@@ -0,0 +1,30 @@
+gst-ffmpeg: qdm2: check array index before use, fix out of array
+ accesses
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/qdm2.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
+index 4cf4b2f..1dfb8d5 100644
+--- a/gst-libs/ext/libav/libavcodec/qdm2.c
++++ b/gst-libs/ext/libav/libavcodec/qdm2.c
+@@ -1257,6 +1257,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
+ for (i = 0; packet_bytes > 0; i++) {
+ int j;
+
++ if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
++ SAMPLES_NEEDED_2("too many packet bytes");
++ return;
++ }
++
+ q->sub_packet_list_A[i].next = NULL;
+
+ if (i > 0) {
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
new file mode 100644
index 0000000000..43ffc03a69
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
@@ -0,0 +1,58 @@
+gst-ffmpeg: qdm2dec: fix buffer overflow. Fixes NGS00144
+
+This also adds a few lines of code from master that are needed for this fix.
+
+Thanks to Phillip for suggestions to improve the patch.
+Found-by: Phillip Langlois
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/qdm2.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
+index 3aa9e5b..e000df8 100644
+--- a/gst-libs/ext/libav/libavcodec/qdm2.c
++++ b/gst-libs/ext/libav/libavcodec/qdm2.c
+@@ -76,6 +76,7 @@ do { \
+ #define SAMPLES_NEEDED_2(why) \
+ av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
+
++#define QDM2_MAX_FRAME_SIZE 512
+
+ typedef int8_t sb_int8_array[2][30][64];
+
+@@ -168,7 +169,7 @@ typedef struct {
+ /// I/O data
+ const uint8_t *compressed_data;
+ int compressed_size;
+- float output_buffer[1024];
++ float output_buffer[QDM2_MAX_FRAME_SIZE * MPA_MAX_CHANNELS * 2];
+
+ /// Synthesis filter
+ MPADSPContext mpadsp;
+@@ -1819,6 +1820,9 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
+ s->group_order = av_log2(s->group_size) + 1;
+ s->frame_size = s->group_size / 16; // 16 iterations per super block
+
++ if (s->frame_size > QDM2_MAX_FRAME_SIZE)
++ return AVERROR_INVALIDDATA;
++
+ s->sub_sampling = s->fft_order - 7;
+ s->frequency_range = 255 / (1 << (2 - s->sub_sampling));
+
+@@ -1887,6 +1891,9 @@ static int qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
+ int ch, i;
+ const int frame_size = (q->frame_size * q->channels);
+
++ if((unsigned)frame_size > FF_ARRAY_ELEMS(q->output_buffer)/2)
++ return -1;
++
+ /* select input buffer */
+ q->compressed_data = in;
+ q->compressed_size = q->checksum_size;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
new file mode 100644
index 0000000000..15b161469c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
@@ -0,0 +1,32 @@
+gst-ffmpeg: smackerdec: Check that the last indexes are within the
+ table.
+
+Fixes CVE-2011-3944
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/smacker.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
+index 30f99b4..2a8bae8 100644
+--- a/gst-libs/ext/libav/libavcodec/smacker.c
++++ b/gst-libs/ext/libav/libavcodec/smacker.c
+@@ -259,6 +259,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
+ if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
+ if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
+ if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
++ if(huff.current > huff.length){
++ ctx.last[0] = ctx.last[1] = ctx.last[2] = 1;
++ av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
++ return -1;
++ }
+
+ *recodes = huff.values;
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
new file mode 100644
index 0000000000..a1989cfeab
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
@@ -0,0 +1,32 @@
+gst-ffmpeg: vp3: Copy all 3 frames for thread updates.
+
+This fixes a double release of the current frame on deinit.
+Fixes CVE-2011-3934
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue.Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/vp3.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
+index 738ae9f..b5daafc 100644
+--- a/gst-libs/ext/libav/libavcodec/vp3.c
++++ b/gst-libs/ext/libav/libavcodec/vp3.c
+@@ -1859,7 +1859,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ ||s->width != s1->width
+ ||s->height!= s1->height) {
+ if (s != s1)
+- copy_fields(s, s1, golden_frame, current_frame);
++ copy_fields(s, s1, golden_frame, keyframe);
+ return -1;
+ }
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
new file mode 100644
index 0000000000..e83d8f402b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
@@ -0,0 +1,183 @@
+gst-ffmpeg: vp3: fix oob read for negative tokens and memleaks on error.
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue.Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/vp3.c | 59 +++++++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
+index 36715bb..ce14e63 100644
+--- a/gst-libs/ext/libav/libavcodec/vp3.c
++++ b/gst-libs/ext/libav/libavcodec/vp3.c
+@@ -45,6 +45,7 @@
+ #define FRAGMENT_PIXELS 8
+
+ static av_cold int vp3_decode_end(AVCodecContext *avctx);
++static void vp3_decode_flush(AVCodecContext *avctx);
+
+ //FIXME split things out into their own arrays
+ typedef struct Vp3Fragment {
+@@ -890,7 +891,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ /* decode a VLC into a token */
+ token = get_vlc2(gb, vlc_table, 11, 3);
+ /* use the token to get a zero run, a coefficient, and an eob run */
+- if (token <= 6) {
++ if ((unsigned) token <= 6U) {
+ eob_run = eob_run_base[token];
+ if (eob_run_get_bits[token])
+ eob_run += get_bits(gb, eob_run_get_bits[token]);
+@@ -908,7 +909,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ coeff_i += eob_run;
+ eob_run = 0;
+ }
+- } else {
++ } else if (token >= 0) {
+ bits_to_get = coeff_get_bits[token];
+ if (bits_to_get)
+ bits_to_get = get_bits(gb, bits_to_get);
+@@ -942,6 +943,10 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ for (i = coeff_index+1; i <= coeff_index+zero_run; i++)
+ s->num_coded_frags[plane][i]--;
+ coeff_i++;
++ } else {
++ av_log(s->avctx, AV_LOG_ERROR,
++ "Invalid token %d\n", token);
++ return -1;
+ }
+ }
+
+@@ -991,6 +996,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ /* unpack the Y plane DC coefficients */
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
+ 0, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ /* reverse prediction of the Y-plane DC coefficients */
+ reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]);
+@@ -998,8 +1005,12 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ /* unpack the C plane DC coefficients */
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
+ 1, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
+ 2, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ /* reverse prediction of the C-plane DC coefficients */
+ if (!(s->avctx->flags & CODEC_FLAG_GRAY))
+@@ -1036,11 +1047,17 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ for (i = 1; i <= 63; i++) {
+ residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
+ 0, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
+ 1, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
+ 2, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ }
+
+ return 0;
+@@ -1777,10 +1794,15 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data;
+ int qps_changed = 0, i, err;
+
++#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
++
+ if (!s1->current_frame.data[0]
+ ||s->width != s1->width
+- ||s->height!= s1->height)
++ ||s->height!= s1->height) {
++ if (s != s1)
++ copy_fields(s, s1, golden_frame, current_frame);
+ return -1;
++ }
+
+ if (s != s1) {
+ // init tables if the first frame hasn't been decoded
+@@ -1796,8 +1818,6 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1]));
+ }
+
+-#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
+-
+ // copy previous frame data
+ copy_fields(s, s1, golden_frame, dsp);
+
+@@ -1987,9 +2007,6 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
+ Vp3DecodeContext *s = avctx->priv_data;
+ int i;
+
+- if (avctx->is_copy && !s->current_frame.data[0])
+- return 0;
+-
+ av_free(s->superblock_coding);
+ av_free(s->all_fragments);
+ av_free(s->coded_fragment_list[0]);
+@@ -2016,12 +2033,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
+ free_vlc(&s->motion_vector_vlc);
+
+ /* release all frames */
+- if (s->golden_frame.data[0])
+- ff_thread_release_buffer(avctx, &s->golden_frame);
+- if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY)
+- ff_thread_release_buffer(avctx, &s->last_frame);
+- /* no need to release the current_frame since it will always be pointing
+- * to the same frame as either the golden or last frame */
++ vp3_decode_flush(avctx);
+
+ return 0;
+ }
+@@ -2341,6 +2353,23 @@ static void vp3_decode_flush(AVCodecContext *avctx)
+ ff_thread_release_buffer(avctx, &s->current_frame);
+ }
+
++static int vp3_init_thread_copy(AVCodecContext *avctx)
++{
++ Vp3DecodeContext *s = avctx->priv_data;
++
++ s->superblock_coding = NULL;
++ s->all_fragments = NULL;
++ s->coded_fragment_list[0] = NULL;
++ s->dct_tokens_base = NULL;
++ s->superblock_fragments = NULL;
++ s->macroblock_coding = NULL;
++ s->motion_val[0] = NULL;
++ s->motion_val[1] = NULL;
++ s->edge_emu_buffer = NULL;
++
++ return 0;
++}
++
+ AVCodec ff_theora_decoder = {
+ .name = "theora",
+ .type = AVMEDIA_TYPE_VIDEO,
+@@ -2352,6 +2381,7 @@ AVCodec ff_theora_decoder = {
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
+ .flush = vp3_decode_flush,
+ .long_name = NULL_IF_CONFIG_SMALL("Theora"),
++ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
+ .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
+ };
+ #endif
+@@ -2367,5 +2397,6 @@ AVCodec ff_vp3_decoder = {
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
+ .flush = vp3_decode_flush,
+ .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
++ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
+ .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
+ };
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
new file mode 100644
index 0000000000..c8bafd570e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
@@ -0,0 +1,68 @@
+From 6043c431c97d55173f339fafbd033d3c0642e2e9 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 3 Oct 2014 01:50:27 +0200
+Subject: [PATCH 2/2] avcodec/mjpegdec: check bits per pixel for changes
+ similar to dimensions
+
+Upstream-Status: Backport
+
+Fixes out of array accesses
+Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Conflicts:
+ libavcodec/mjpegdec.c
+---
+ libavcodec/mjpegdec.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/gst-libs/ext/libav/libavcodec/mjpegdec.c b/gst-libs/ext/libav/libavcodec/mjpegdec.c
+index 84343c0..c0137d8 100644
+--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
++++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
+@@ -210,16 +210,16 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
+
+ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+ {
+- int len, nb_components, i, width, height, pix_fmt_id;
++ int len, nb_components, i, bits, width, height, pix_fmt_id;
+
+ /* XXX: verify len field validity */
+ len = get_bits(&s->gb, 16);
+- s->bits= get_bits(&s->gb, 8);
++ bits= get_bits(&s->gb, 8);
+
+- if(s->pegasus_rct) s->bits=9;
+- if(s->bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
++ if(s->pegasus_rct) bits=9;
++ if(bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
+
+- if (s->bits != 8 && !s->lossless){
++ if (bits != 8 && !s->lossless){
+ av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
+ return -1;
+ }
+@@ -239,7 +239,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+ if (nb_components <= 0 ||
+ nb_components > MAX_COMPONENTS)
+ return -1;
+- if (s->ls && !(s->bits <= 8 || nb_components == 1)){
++ if (s->ls && !(bits <= 8 || nb_components == 1)){
+ av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n");
+ return -1;
+ }
+@@ -272,10 +272,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+
+ /* if different size, realloc/alloc picture */
+ /* XXX: also check h_count and v_count */
+- if (width != s->width || height != s->height) {
++ if (width != s->width || height != s->height || bits != s->bits) {
+ av_freep(&s->qscale_table);
+
+ s->width = width;
++ s->bits= bits;
+ s->height = height;
+ s->interlaced = 0;
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
new file mode 100644
index 0000000000..3c8d8e353e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
@@ -0,0 +1,100 @@
+gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0855
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/gst-libs/ext/libav/libavcodec/alac.c.old b/gst-libs/ext/libav/libavcodec/alac.c
+index 2a0df8c..bcbd56d 100644
+--- a/gst-libs/ext/libav/libavcodec/alac.c.old
++++ b/gst-libs/ext/libav/libavcodec/alac.c
+@@ -87,18 +87,44 @@ typedef struct {
+ int wasted_bits;
+ } ALACContext;
+
+-static void allocate_buffers(ALACContext *alac)
++static av_cold int alac_decode_close(AVCodecContext *avctx)
++{
++ ALACContext *alac = avctx->priv_data;
++
++ int chan;
++ for (chan = 0; chan < MAX_CHANNELS; chan++) {
++ av_freep(&alac->predicterror_buffer[chan]);
++ av_freep(&alac->outputsamples_buffer[chan]);
++ av_freep(&alac->wasted_bits_buffer[chan]);
++ }
++
++ return 0;
++}
++
++static int allocate_buffers(ALACContext *alac)
+ {
+ int chan;
++ int buf_size;
++
++ if (alac->setinfo_max_samples_per_frame > INT_MAX / sizeof(int32_t))
++ goto buf_alloc_fail;
++ buf_size = alac->setinfo_max_samples_per_frame * sizeof(int32_t);
++
+ for (chan = 0; chan < MAX_CHANNELS; chan++) {
+- alac->predicterror_buffer[chan] =
+- av_malloc(alac->setinfo_max_samples_per_frame * 4);
+
+- alac->outputsamples_buffer[chan] =
+- av_malloc(alac->setinfo_max_samples_per_frame * 4);
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->predicterror_buffer[chan],
++ buf_size, buf_alloc_fail);
+
+- alac->wasted_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4);
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->outputsamples_buffer[chan],
++ buf_size, buf_alloc_fail);
++
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->wasted_bits_buffer[chan],
++ buf_size, buf_alloc_fail);
+ }
++ return 0;
++buf_alloc_fail:
++ alac_decode_close(alac->avctx);
++ return AVERROR(ENOMEM);
+ }
+
+ static int alac_set_info(ALACContext *alac)
+@@ -131,8 +157,6 @@ static int alac_set_info(ALACContext *alac)
+ bytestream_get_be32(&ptr); /* bitrate ? */
+ bytestream_get_be32(&ptr); /* samplerate */
+
+- allocate_buffers(alac);
+-
+ return 0;
+ }
+
+@@ -659,6 +683,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
+
+ static av_cold int alac_decode_init(AVCodecContext * avctx)
+ {
++ int ret;
+ ALACContext *alac = avctx->priv_data;
+ alac->avctx = avctx;
+ alac->numchannels = alac->avctx->channels;
+@@ -674,18 +699,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
+ return -1;
+ }
+
+- return 0;
+-}
+-
+-static av_cold int alac_decode_close(AVCodecContext *avctx)
+-{
+- ALACContext *alac = avctx->priv_data;
+-
+- int chan;
+- for (chan = 0; chan < MAX_CHANNELS; chan++) {
+- av_freep(&alac->predicterror_buffer[chan]);
+- av_freep(&alac->outputsamples_buffer[chan]);
+- av_freep(&alac->wasted_bits_buffer[chan]);
++ if ((ret = allocate_buffers(alac)) < 0) {
++ av_log(avctx, AV_LOG_ERROR, "Error allocating buffers\n");
++ return ret;
+ }
+
+ return 0;
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch
new file mode 100644
index 0000000000..9055b341dc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch
@@ -0,0 +1,9304 @@
+Taken from gentoo patchset:
+http://dev.gentoo.org/~tetromino/distfiles/gst-plugins-ffmpeg/gst-ffmpeg-0.10.13_p2012.11-libav-9-patches.tar.xz
+
+Upstream-Status: Pending
+
+Contains following changes, rebased to apply on top of our changes
+0002-Fix-includes-for-systemwide-build.patch
+0003-libav-Switch-to-non-deprecated-symbols.patch
+0005-av-Update-for-some-constant-changes.patch
+0006-av-Remove-palette-support-for-now.patch
+0007-av-Port-remaining-simple-bits.patch
+0008-av-Use-av_codec_is_-en-de-coder-API-instead-of-priva.patch
+0009-avprotocol-Port-from-the-URL-protocol-handler-to-san.patch
+0010-avdec-don-t-wait-for-keyframe.patch
+
+Following changes were skipped:
+0001-Partially-revert-commit-0300801b.patch
+0004-av-update-to-use-AVOption-variants.patch
+0011-av_get_bits_per_sample_format-was-removed-in-libav-9.patch
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c 2014-08-08 15:26:07.872857555 +0200
+@@ -151,9 +151,6 @@
+ #endif
+ gst_ffmpegaudioresample_register (plugin);
+
+- av_register_protocol2 (&gstreamer_protocol, sizeof (URLProtocol));
+- av_register_protocol2 (&gstpipe_protocol, sizeof (URLProtocol));
+-
+ /* Now we can return the pointer to the newly created Plugin object. */
+ return TRUE;
+ }
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h 2011-05-17 10:53:16.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h 2014-08-08 15:26:07.872857555 +0200
+@@ -58,10 +58,13 @@
+ int gst_ffmpeg_avcodec_close (AVCodecContext *avctx);
+ int gst_ffmpeg_av_find_stream_info(AVFormatContext *ic);
+
+-G_END_DECLS
++int gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context);
++int gst_ffmpegdata_close (AVIOContext * h);
++typedef struct _GstFFMpegPipe GstFFMpegPipe;
++int gst_ffmpeg_pipe_open (GstFFMpegPipe *ffpipe, int flags, AVIOContext ** context);
++int gst_ffmpeg_pipe_close (AVIOContext * h);
+
+-extern URLProtocol gstreamer_protocol;
+-extern URLProtocol gstpipe_protocol;
++G_END_DECLS
+
+ /* use GST_FFMPEG URL_STREAMHEADER with URL_WRONLY if the first
+ * buffer should be used as streamheader property on the pad's caps. */
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c 2011-07-12 16:35:27.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c 2014-08-08 15:24:17.899853612 +0200
+@@ -147,7 +147,6 @@
+ {FF_DCT_FASTINT, "Fast Integer", "fastint"},
+ {FF_DCT_INT, "Accurate Integer", "int"},
+ {FF_DCT_MMX, "MMX", "mmx"},
+- {FF_DCT_MLIB, "MLIB", "mlib"},
+ {FF_DCT_ALTIVEC, "ALTIVEC", "altivec"},
+ {FF_DCT_FAAN, "FAAN", "faan"},
+ {0, NULL, NULL},
+@@ -173,8 +172,6 @@
+ {FF_IDCT_SIMPLE, "Simple", "simple"},
+ {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"},
+ {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"},
+- {FF_IDCT_PS2, "PS2", "ps2"},
+- {FF_IDCT_MLIB, "MLIB", "mlib"},
+ {FF_IDCT_ARM, "ARM", "arm"},
+ {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"},
+ {FF_IDCT_SH4, "SH4", "sh4"},
+@@ -263,16 +260,11 @@
+
+ if (!ffmpeg_flags_type) {
+ static const GFlagsValue ffmpeg_flags[] = {
+- {CODEC_FLAG_OBMC, "Use overlapped block motion compensation (h263+)",
+- "obmc"},
+ {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
+ {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
+- {CODEC_FLAG_H263P_AIV, "H.263 alternative inter VLC", "aiv"},
+ {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
+ {CODEC_FLAG_GMC, "GMC", "gmc"},
+ {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
+- {CODEC_FLAG_PART,
+- "Store MV, DC and AC coefficients in seperate partitions", "part"},
+ {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
+ {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
+ {CODEC_FLAG_NORMALIZE_AQP,
+@@ -282,13 +274,9 @@
+ "global-headers"},
+ {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
+ "aic"},
+- {CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
+ {CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
+ {CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection",
+ "qp-rd"},
+- {CODEC_FLAG_H263P_SLICE_STRUCT, "H263 slice struct", "ss"},
+- {CODEC_FLAG_SVCD_SCAN_OFFSET,
+- "Reserve space for SVCD scan offset user data", "scanoffset"},
+ {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
+ {0, NULL, NULL},
+ };
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c 2014-08-08 15:31:30.968869139 +0200
+@@ -25,8 +25,10 @@
+ #include <gst/gst.h>
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avcodec.h>
++#include <channel_layout.h>>
+ #else
+ #include <libavcodec/avcodec.h>
++#include <libavutil/channel_layout.h>
+ #endif
+ #include <string.h>
+
+@@ -35,43 +37,6 @@
+
+ #include <gst/pbutils/codec-utils.h>
+
+-/*
+- * Read a palette from a caps.
+- */
+-
+-static void
+-gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
+-{
+- GstStructure *str = gst_caps_get_structure (caps, 0);
+- const GValue *palette_v;
+- const GstBuffer *palette;
+-
+- /* do we have a palette? */
+- if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
+- palette = gst_value_get_buffer (palette_v);
+- if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
+- if (context->palctrl)
+- av_free (context->palctrl);
+- context->palctrl = av_malloc (sizeof (AVPaletteControl));
+- context->palctrl->palette_changed = 1;
+- memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
+- AVPALETTE_SIZE);
+- }
+- }
+-}
+-
+-static void
+-gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
+-{
+- if (context->palctrl) {
+- GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
+-
+- memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
+- AVPALETTE_SIZE);
+- gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
+- }
+-}
+-
+ /* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
+ static const struct
+ {
+@@ -79,26 +44,26 @@
+ GstAudioChannelPosition gst;
+ } _ff_to_gst_layout[] = {
+ {
+- CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
+- CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
+- CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
+- CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
+- CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
+- CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
+- CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
+- CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
+- CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
+- CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
+- CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
+- CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
+- CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
++ AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
++ AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
++ AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
++ AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
++ AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
++ AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
++ AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
++ AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
++ AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
++ AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
++ AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
+ };
+
+ static GstAudioChannelPosition *
+@@ -342,8 +307,8 @@
+
+ if (channel_layout == 0) {
+ const guint64 default_channel_set[] = {
+- 0, 0, CH_LAYOUT_SURROUND, CH_LAYOUT_QUAD, CH_LAYOUT_5POINT0,
+- CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
++ 0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
++ AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
+ };
+
+ switch (codec_id) {
+@@ -1267,8 +1232,6 @@
+ case CODEC_ID_FLIC:
+ case CODEC_ID_VMDVIDEO:
+ case CODEC_ID_VMDAUDIO:
+- case CODEC_ID_SONIC:
+- case CODEC_ID_SONIC_LS:
+ case CODEC_ID_SNOW:
+ case CODEC_ID_VIXL:
+ case CODEC_ID_QPEG:
+@@ -1689,11 +1652,6 @@
+ gst_buffer_unref (data);
+ }
+
+- /* palette */
+- if (context) {
+- gst_ffmpeg_set_palette (caps, context);
+- }
+-
+ GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
+
+ } else {
+@@ -1830,9 +1788,6 @@
+ "bpp", G_TYPE_INT, bpp,
+ "depth", G_TYPE_INT, depth,
+ "endianness", G_TYPE_INT, endianness, NULL);
+- if (caps && context) {
+- gst_ffmpeg_set_palette (caps, context);
+- }
+ }
+ } else if (fmt) {
+ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
+@@ -1857,7 +1812,7 @@
+ */
+
+ static GstCaps *
+-gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt,
++gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
+ AVCodecContext * context, enum CodecID codec_id)
+ {
+ GstCaps *caps = NULL;
+@@ -1867,22 +1822,22 @@
+ gboolean signedness = FALSE;
+
+ switch (sample_fmt) {
+- case SAMPLE_FMT_S16:
++ case AV_SAMPLE_FMT_S16:
+ signedness = TRUE;
+ bpp = 16;
+ break;
+
+- case SAMPLE_FMT_S32:
++ case AV_SAMPLE_FMT_S32:
+ signedness = TRUE;
+ bpp = 32;
+ break;
+
+- case SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_FLT:
+ integer = FALSE;
+ bpp = 32;
+ break;
+
+- case SAMPLE_FMT_DBL:
++ case AV_SAMPLE_FMT_DBL:
+ integer = FALSE;
+ bpp = 64;
+ break;
+@@ -1941,12 +1896,12 @@
+ }
+ } else {
+ GstCaps *temp;
+- enum SampleFormat i;
++ enum AVSampleFormat i;
+ AVCodecContext ctx = { 0, };
+
+ ctx.channels = -1;
+ caps = gst_caps_new_empty ();
+- for (i = 0; i <= SAMPLE_FMT_DBL; i++) {
++ for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
+ temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
+ if (temp != NULL) {
+ gst_caps_append (caps, temp);
+@@ -2049,9 +2004,9 @@
+ gst_structure_get_int (structure, "endianness", &endianness)) {
+ if (endianness == G_BYTE_ORDER) {
+ if (width == 32)
+- context->sample_fmt = SAMPLE_FMT_FLT;
++ context->sample_fmt = AV_SAMPLE_FMT_FLT;
+ else if (width == 64)
+- context->sample_fmt = SAMPLE_FMT_DBL;
++ context->sample_fmt = AV_SAMPLE_FMT_DBL;
+ }
+ }
+ } else {
+@@ -2062,9 +2017,9 @@
+ gst_structure_get_int (structure, "endianness", &endianness)) {
+ if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
+ if ((width == 16) && (depth == 16))
+- context->sample_fmt = SAMPLE_FMT_S16;
++ context->sample_fmt = AV_SAMPLE_FMT_S16;
+ else if ((width == 32) && (depth == 32))
+- context->sample_fmt = SAMPLE_FMT_S32;
++ context->sample_fmt = AV_SAMPLE_FMT_S32;
+ }
+ }
+ }
+@@ -2190,7 +2145,6 @@
+ } else {
+ if (bpp == 8) {
+ context->pix_fmt = PIX_FMT_PAL8;
+- gst_ffmpeg_get_palette (caps, context);
+ }
+ }
+ }
+@@ -2576,7 +2530,6 @@
+ switch (codec_type) {
+ case AVMEDIA_TYPE_VIDEO:
+ gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
+- gst_ffmpeg_get_palette (caps, context);
+ break;
+ case AVMEDIA_TYPE_AUDIO:
+ gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig 2014-08-08 15:30:34.006867097 +0200
+@@ -0,0 +1,3447 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ * This file:
++ * Copyright (c) 2002-2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include <gst/gst.h>
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#include <channel_layout.h>>
++#else
++#include <libavcodec/avcodec.h>
++#include <libavutil/channel_layout.h>
++#endif
++#include <string.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++
++#include <gst/pbutils/codec-utils.h>
++
++/*
++ * Read a palette from a caps.
++ */
++
++static void
++gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
++{
++ GstStructure *str = gst_caps_get_structure (caps, 0);
++ const GValue *palette_v;
++ const GstBuffer *palette;
++
++ /* do we have a palette? */
++ if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
++ palette = gst_value_get_buffer (palette_v);
++ if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
++ if (context->palctrl)
++ av_free (context->palctrl);
++ context->palctrl = av_malloc (sizeof (AVPaletteControl));
++ context->palctrl->palette_changed = 1;
++ memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
++ AVPALETTE_SIZE);
++ }
++ }
++}
++
++static void
++gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
++{
++ if (context->palctrl) {
++ GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
++
++ memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
++ AVPALETTE_SIZE);
++ gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
++ }
++}
++
++/* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
++static const struct
++{
++ guint64 ff;
++ GstAudioChannelPosition gst;
++} _ff_to_gst_layout[] = {
++ {
++ AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
++ AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
++ AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
++ AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
++ AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
++ AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
++ AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
++ AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
++ AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
++ AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
++ AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
++};
++
++static GstAudioChannelPosition *
++gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
++{
++ guint nchannels = 0, i, j;
++ GstAudioChannelPosition *pos = NULL;
++ gboolean none_layout = FALSE;
++
++ for (i = 0; i < 64; i++) {
++ if ((channel_layout & (G_GUINT64_CONSTANT (1) << i)) != 0) {
++ nchannels++;
++ }
++ }
++
++ if (channel_layout == 0) {
++ nchannels = channels;
++ none_layout = TRUE;
++ }
++
++ if (nchannels != channels) {
++ GST_ERROR ("Number of channels is different (%u != %u)", channels,
++ nchannels);
++ return NULL;
++ }
++
++ pos = g_new (GstAudioChannelPosition, nchannels);
++
++ for (i = 0, j = 0; i < G_N_ELEMENTS (_ff_to_gst_layout); i++) {
++ if ((channel_layout & _ff_to_gst_layout[i].ff) != 0) {
++ pos[j++] = _ff_to_gst_layout[i].gst;
++
++ if (_ff_to_gst_layout[i].gst == GST_AUDIO_CHANNEL_POSITION_NONE)
++ none_layout = TRUE;
++ }
++ }
++
++ if (j != nchannels) {
++ GST_WARNING ("Unknown channels in channel layout - assuming NONE layout");
++ none_layout = TRUE;
++ }
++
++ if (!none_layout && !gst_audio_check_channel_positions (pos, nchannels)) {
++ GST_ERROR ("Invalid channel layout %" G_GUINT64_FORMAT
++ " - assuming NONE layout", channel_layout);
++ none_layout = TRUE;
++ }
++
++ if (none_layout) {
++ if (nchannels == 1) {
++ pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
++ } else if (nchannels == 2) {
++ pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
++ pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
++ } else if (channel_layout == 0) {
++ g_free (pos);
++ pos = NULL;
++ } else {
++ for (i = 0; i < nchannels; i++)
++ pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
++ }
++ }
++
++ if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER) {
++ GST_DEBUG ("mono common case; won't set channel positions");
++ g_free (pos);
++ pos = NULL;
++ } else if (nchannels == 2 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT
++ && pos[1] == GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT) {
++ GST_DEBUG ("stereo common case; won't set channel positions");
++ g_free (pos);
++ pos = NULL;
++ }
++
++ return pos;
++}
++
++/* this macro makes a caps width fixed or unfixed width/height
++ * properties depending on whether we've got a context.
++ *
++ * See below for why we use this.
++ *
++ * We should actually do this stuff at the end, like in riff-media.c,
++ * but I'm too lazy today. Maybe later.
++ */
++static GstCaps *
++gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id,
++ const char *mimetype, const char *fieldname, ...)
++{
++ GstStructure *structure = NULL;
++ GstCaps *caps = NULL;
++ va_list var_args;
++ gint i;
++
++ GST_LOG ("context:%p, codec_id:%d, mimetype:%s", context, codec_id, mimetype);
++
++ /* fixed, non probing context */
++ if (context != NULL && context->width != -1) {
++ gint num, denom;
++
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, context->width,
++ "height", G_TYPE_INT, context->height, NULL);
++
++ num = context->time_base.den / context->ticks_per_frame;
++ denom = context->time_base.num;
++
++ if (!denom) {
++ GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num);
++ denom = 1;
++ }
++ if (gst_util_fraction_compare (num, denom, 1000, 1) > 0) {
++ GST_LOG ("excessive framerate: %d/%d, -> 0/1", num, denom);
++ num = 0;
++ denom = 1;
++ }
++ GST_LOG ("setting framerate: %d/%d", num, denom);
++ gst_caps_set_simple (caps,
++ "framerate", GST_TYPE_FRACTION, num, denom, NULL);
++ } else {
++ /* so we are after restricted caps in this case */
++ switch (codec_id) {
++ case CODEC_ID_H261:
++ {
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 352,
++ "height", G_TYPE_INT, 288,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ gst_caps_append (caps, gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 176,
++ "height", G_TYPE_INT, 144,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
++ break;
++ }
++ case CODEC_ID_H263:
++ {
++ /* 128x96, 176x144, 352x288, 704x576, and 1408x1152. slightly reordered
++ * because we want automatic negotiation to go as close to 320x240 as
++ * possible. */
++ const static gint widths[] = { 352, 704, 176, 1408, 128 };
++ const static gint heights[] = { 288, 576, 144, 1152, 96 };
++ GstCaps *temp;
++ gint n_sizes = G_N_ELEMENTS (widths);
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < n_sizes; i++) {
++ temp = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, widths[i],
++ "height", G_TYPE_INT, heights[i],
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++
++ gst_caps_append (caps, temp);
++ }
++ break;
++ }
++ case CODEC_ID_DVVIDEO:
++ {
++ static struct
++ {
++ guint32 csp;
++ gint width, height;
++ gint par_n, par_d;
++ gint framerate_n, framerate_d;
++ } profiles[] = {
++ {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 10, 11, 30000, 1001}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 40, 33, 30000, 1001}, {
++ GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 59, 54, 25, 1}, {
++ GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 118, 81, 25, 1}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 59, 54, 25, 1}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 118, 81, 25, 1}
++ };
++ GstCaps *temp;
++ gint n_sizes = G_N_ELEMENTS (profiles);
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < n_sizes; i++) {
++ temp = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, profiles[i].width,
++ "height", G_TYPE_INT, profiles[i].height,
++ "framerate", GST_TYPE_FRACTION, profiles[i].framerate_n,
++ profiles[i].framerate_d, "pixel-aspect-ratio", GST_TYPE_FRACTION,
++ profiles[i].par_n, profiles[i].par_d, NULL);
++
++ gst_caps_append (caps, temp);
++ }
++ break;
++ }
++ case CODEC_ID_DNXHD:
++ {
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 1920,
++ "height", G_TYPE_INT, 1080,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ gst_caps_append (caps, gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 1280,
++ "height", G_TYPE_INT, 720,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
++ break;
++ }
++ default:
++ break;
++ }
++ }
++
++ /* no fixed caps or special restrictions applied;
++ * default unfixed setting */
++ if (!caps) {
++ GST_DEBUG ("Creating default caps");
++ caps = gst_caps_new_simple (mimetype,
++ "width", GST_TYPE_INT_RANGE, 16, 4096,
++ "height", GST_TYPE_INT_RANGE, 16, 4096,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ }
++
++ for (i = 0; i < gst_caps_get_size (caps); i++) {
++ va_start (var_args, fieldname);
++ structure = gst_caps_get_structure (caps, i);
++ gst_structure_set_valist (structure, fieldname, var_args);
++ va_end (var_args);
++ }
++
++ return caps;
++}
++
++/* same for audio - now with channels/sample rate
++ */
++static GstCaps *
++gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
++ const char *mimetype, const char *fieldname, ...)
++{
++ GstCaps *caps = NULL;
++ GstStructure *structure = NULL;
++ gint i;
++ va_list var_args;
++
++ /* fixed, non-probing context */
++ if (context != NULL && context->channels != -1) {
++ GstAudioChannelPosition *pos;
++ guint64 channel_layout = context->channel_layout;
++
++ if (channel_layout == 0) {
++ const guint64 default_channel_set[] = {
++ 0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
++ AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
++ };
++
++ switch (codec_id) {
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ case CODEC_ID_DTS:
++ if (context->channels > 0
++ && context->channels < G_N_ELEMENTS (default_channel_set))
++ channel_layout = default_channel_set[context->channels - 1];
++ break;
++ default:
++ break;
++ }
++ }
++
++ caps = gst_caps_new_simple (mimetype,
++ "rate", G_TYPE_INT, context->sample_rate,
++ "channels", G_TYPE_INT, context->channels, NULL);
++
++ pos = gst_ff_channel_layout_to_gst (channel_layout, context->channels);
++ if (pos != NULL) {
++ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
++ g_free (pos);
++ }
++ } else {
++ gint maxchannels = 2;
++ const gint *rates = NULL;
++ gint n_rates = 0;
++
++ /* so we must be after restricted caps in this case */
++ switch (codec_id) {
++ case CODEC_ID_AAC:
++ case CODEC_ID_AAC_LATM:
++ case CODEC_ID_DTS:
++ maxchannels = 6;
++ break;
++ case CODEC_ID_MP2:
++ {
++ const static gint l_rates[] =
++ { 48000, 44100, 32000, 24000, 22050, 16000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ {
++ const static gint l_rates[] = { 48000, 44100, 32000 };
++ maxchannels = 6;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_ADPCM_G722:
++ {
++ const static gint l_rates[] = { 16000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ maxchannels = 1;
++ break;
++ }
++ case CODEC_ID_ADPCM_G726:
++ {
++ const static gint l_rates[] = { 8000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ maxchannels = 1;
++ break;
++ }
++ case CODEC_ID_ADPCM_SWF:
++ {
++ const static gint l_rates[] = { 11025, 22050, 44100 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_ROQ_DPCM:
++ {
++ const static gint l_rates[] = { 22050 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_AMR_NB:
++ {
++ const static gint l_rates[] = { 8000 };
++ maxchannels = 1;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_AMR_WB:
++ {
++ const static gint l_rates[] = { 16000 };
++ maxchannels = 1;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* TODO: handle context->channel_layouts here to set
++ * the list of channel layouts supported by the encoder.
++ * Unfortunately no encoder uses this yet....
++ */
++ /* regardless of encode/decode, open up channels if applicable */
++ /* Until decoders/encoders expose the maximum number of channels
++ * they support, we whitelist them here. */
++ switch (codec_id) {
++ case CODEC_ID_WMAPRO:
++ case CODEC_ID_TRUEHD:
++ maxchannels = 8;
++ break;
++ default:
++ break;
++ }
++
++ if (maxchannels == 1)
++ caps = gst_caps_new_simple (mimetype,
++ "channels", G_TYPE_INT, maxchannels, NULL);
++ else
++ caps = gst_caps_new_simple (mimetype,
++ "channels", GST_TYPE_INT_RANGE, 1, maxchannels, NULL);
++ if (n_rates) {
++ GValue list = { 0, };
++ GstStructure *structure;
++
++ g_value_init (&list, GST_TYPE_LIST);
++ for (i = 0; i < n_rates; i++) {
++ GValue v = { 0, };
++
++ g_value_init (&v, G_TYPE_INT);
++ g_value_set_int (&v, rates[i]);
++ gst_value_list_append_value (&list, &v);
++ g_value_unset (&v);
++ }
++ structure = gst_caps_get_structure (caps, 0);
++ gst_structure_set_value (structure, "rate", &list);
++ g_value_unset (&list);
++ } else
++ gst_caps_set_simple (caps, "rate", GST_TYPE_INT_RANGE, 4000, 96000, NULL);
++ }
++
++ for (i = 0; i < gst_caps_get_size (caps); i++) {
++ va_start (var_args, fieldname);
++ structure = gst_caps_get_structure (caps, i);
++ gst_structure_set_valist (structure, fieldname, var_args);
++ va_end (var_args);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG codec ID and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * CodecID is primarily meant for compressed data GstCaps!
++ *
++ * encode is a special parameter. gstffmpegdec will say
++ * FALSE, gstffmpegenc will say TRUE. The output caps
++ * depends on this, in such a way that it will be very
++ * specific, defined, fixed and correct caps for encoders,
++ * yet very wide, "forgiving" caps for decoders. Example
++ * for mp3: decode: audio/mpeg,mpegversion=1,layer=[1-3]
++ * but encode: audio/mpeg,mpegversion=1,layer=3,bitrate=x,
++ * rate=x,channels=x.
++ */
++
++GstCaps *
++gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
++ AVCodecContext * context, gboolean encode)
++{
++ GstCaps *caps = NULL;
++ gboolean buildcaps = FALSE;
++
++ GST_LOG ("codec_id:%d, context:%p, encode:%d", codec_id, context, encode);
++
++ switch (codec_id) {
++ case CODEC_ID_MPEG1VIDEO:
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 1,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ break;
++
++ case CODEC_ID_MPEG2VIDEO:
++ if (encode) {
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 2,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ } else {
++ /* decode both MPEG-1 and MPEG-2; width/height/fps are all in
++ * the MPEG video stream headers, so may be omitted from caps. */
++ caps = gst_caps_new_simple ("video/mpeg",
++ "mpegversion", GST_TYPE_INT_RANGE, 1, 2,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ }
++ break;
++
++ case CODEC_ID_MPEG2VIDEO_XVMC:
++ /* this is a special ID - don't need it in GStreamer, I think */
++ break;
++
++ case CODEC_ID_H263:
++ if (encode) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu",
++ "h263version", G_TYPE_STRING, "h263", NULL);
++ } else {
++ /* don't pass codec_id, we can decode other variants with the H263
++ * decoder that don't have specific size requirements
++ */
++ caps = gst_ff_vid_caps_new (context, CODEC_ID_NONE, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu", NULL);
++ }
++ break;
++
++ case CODEC_ID_H263P:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu",
++ "h263version", G_TYPE_STRING, "h263p", NULL);
++ if (encode && context) {
++
++ gst_caps_set_simple (caps,
++ "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV,
++ "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER,
++ "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
++ "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
++ NULL);
++ }
++ break;
++
++ case CODEC_ID_H263I:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-intel-h263",
++ "variant", G_TYPE_STRING, "intel", NULL);
++ break;
++
++ case CODEC_ID_H261:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h261", NULL);
++ break;
++
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ {
++ gint version;
++
++ switch (codec_id) {
++ case CODEC_ID_RV40:
++ version = 4;
++ break;
++ case CODEC_ID_RV30:
++ version = 3;
++ break;
++ case CODEC_ID_RV20:
++ version = 2;
++ break;
++ default:
++ version = 1;
++ break;
++ }
++
++ /* FIXME: context->sub_id must be filled in during decoding */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-pn-realvideo",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "rmversion", G_TYPE_INT, version, NULL);
++ if (context) {
++ gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL);
++ if (context->extradata_size >= 8) {
++ gst_caps_set_simple (caps,
++ "subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata),
++ NULL);
++ }
++ }
++ }
++ break;
++
++ case CODEC_ID_MP1:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_MP2:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_MP3:
++ if (encode) {
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
++ } else {
++ /* Decodes MPEG-1 layer 1/2/3. Samplerate, channels et al are
++ * in the MPEG audio header, so may be omitted from caps. */
++ caps = gst_caps_new_simple ("audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1,
++ "layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
++ }
++ break;
++
++ case CODEC_ID_MUSEPACK7:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id,
++ "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 7,
++ NULL);
++ break;
++
++ case CODEC_ID_MUSEPACK8:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id,
++ "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 8,
++ NULL);
++ break;
++
++ case CODEC_ID_AC3:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL);
++ break;
++
++ case CODEC_ID_EAC3:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-eac3", NULL);
++ break;
++
++ case CODEC_ID_TRUEHD:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-true-hd", NULL);
++ break;
++
++ case CODEC_ID_ATRAC1:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac1",
++ NULL);
++ break;
++
++ case CODEC_ID_ATRAC3:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac3",
++ NULL);
++ break;
++
++ case CODEC_ID_DTS:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dts", NULL);
++ break;
++
++ case CODEC_ID_APE:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-ffmpeg-parsed-ape",
++ NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_MLP:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mlp", NULL);
++ break;
++
++ case CODEC_ID_IMC:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-imc", NULL);
++ break;
++
++ /* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB
++ * is Quicktime's MJPEG-B. LJPEG is lossless JPEG. I don't know what
++ * sp5x is, but it's apparently something JPEG... We don't separate
++ * between those in GStreamer. Should we (at least between MJPEG,
++ * MJPEG-B and sp5x decoding...)? */
++ case CODEC_ID_MJPEG:
++ case CODEC_ID_LJPEG:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/jpeg", NULL);
++ break;
++
++ case CODEC_ID_SP5X:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/sp5x", NULL);
++ break;
++
++ case CODEC_ID_MJPEGB:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mjpeg-b", NULL);
++ break;
++
++ case CODEC_ID_MPEG4:
++ if (encode && context != NULL) {
++ /* I'm not exactly sure what ffmpeg outputs... ffmpeg itself uses
++ * the AVI fourcc 'DIVX', but 'mp4v' for Quicktime... */
++ switch (context->codec_tag) {
++ case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-divx",
++ "divxversion", G_TYPE_INT, 5, NULL);
++ break;
++ case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
++ default:
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "mpegversion", G_TYPE_INT, 4, NULL);
++ break;
++ }
++ } else {
++ /* The trick here is to separate xvid, divx, mpeg4, 3ivx et al */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 4,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ if (encode) {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", G_TYPE_INT, 5, NULL));
++ } else {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", GST_TYPE_INT_RANGE, 4, 5,
++ NULL));
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-xvid", NULL));
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-3ivx", NULL));
++ }
++ }
++ break;
++
++ case CODEC_ID_RAWVIDEO:
++ caps =
++ gst_ffmpeg_codectype_to_caps (AVMEDIA_TYPE_VIDEO, context, codec_id,
++ encode);
++ break;
++
++ case CODEC_ID_MSMPEG4V1:
++ case CODEC_ID_MSMPEG4V2:
++ case CODEC_ID_MSMPEG4V3:
++ {
++ gint version = 41 + codec_id - CODEC_ID_MSMPEG4V1;
++
++ /* encode-FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msmpeg",
++ "msmpegversion", G_TYPE_INT, version, NULL);
++ if (!encode && codec_id == CODEC_ID_MSMPEG4V3) {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", G_TYPE_INT, 3, NULL));
++ }
++ }
++ break;
++
++ case CODEC_ID_WMV1:
++ case CODEC_ID_WMV2:
++ {
++ gint version = (codec_id == CODEC_ID_WMV1) ? 1 : 2;
++
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, version, NULL);
++ }
++ break;
++
++ case CODEC_ID_FLV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-flash-video",
++ "flvversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_SVQ1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
++ "svqversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_SVQ3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
++ "svqversion", G_TYPE_INT, 3, NULL);
++ break;
++
++ case CODEC_ID_DVAUDIO:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dv", NULL);
++ break;
++
++ case CODEC_ID_DVVIDEO:
++ {
++ if (encode && context) {
++ guint32 fourcc;
++
++ switch (context->pix_fmt) {
++ case PIX_FMT_YUYV422:
++ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
++ break;
++ case PIX_FMT_YUV420P:
++ fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ case PIX_FMT_YUVA420P:
++ fourcc = GST_MAKE_FOURCC ('A', '4', '2', '0');
++ break;
++ case PIX_FMT_YUV411P:
++ fourcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
++ break;
++ case PIX_FMT_YUV422P:
++ fourcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
++ break;
++ case PIX_FMT_YUV410P:
++ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
++ break;
++ default:
++ GST_WARNING
++ ("Couldnt' find fourcc for pixfmt %d, defaulting to I420",
++ context->pix_fmt);
++ fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ }
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "format", GST_TYPE_FOURCC, fourcc, NULL);
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_WMAV1:
++ case CODEC_ID_WMAV2:
++ {
++ gint version = (codec_id == CODEC_ID_WMAV1) ? 1 : 2;
++
++ if (context) {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, version,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ } else {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, version,
++ "block_align", GST_TYPE_INT_RANGE, 0, G_MAXINT,
++ "bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
++ }
++ }
++ break;
++ case CODEC_ID_WMAPRO:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, 3, NULL);
++ break;
++ }
++
++ case CODEC_ID_WMAVOICE:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wms", NULL);
++ break;
++ }
++
++ case CODEC_ID_MACE3:
++ case CODEC_ID_MACE6:
++ {
++ gint version = (codec_id == CODEC_ID_MACE3) ? 3 : 6;
++
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mace",
++ "maceversion", G_TYPE_INT, version, NULL);
++ }
++ break;
++
++ case CODEC_ID_HUFFYUV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_CYUV:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-compressed-yuv",
++ NULL);
++ break;
++
++ case CODEC_ID_H264:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h264", NULL);
++ break;
++
++ case CODEC_ID_INDEO5:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 5, NULL);
++ break;
++
++ case CODEC_ID_INDEO3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 3, NULL);
++ break;
++
++ case CODEC_ID_INDEO2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_FLASHSV:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-flash-screen", NULL);
++ break;
++
++ case CODEC_ID_VP3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp3", NULL);
++ break;
++
++ case CODEC_ID_VP5:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp5", NULL);
++ break;
++
++ case CODEC_ID_VP6:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6", NULL);
++ break;
++
++ case CODEC_ID_VP6F:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-flash", NULL);
++ break;
++
++ case CODEC_ID_VP6A:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-alpha", NULL);
++ break;
++
++ case CODEC_ID_VP8:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp8", NULL);
++ break;
++
++ case CODEC_ID_THEORA:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
++ break;
++
++ case CODEC_ID_AAC:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg", NULL);
++
++ if (!encode) {
++ GValue arr = { 0, };
++ GValue item = { 0, };
++
++ g_value_init (&arr, GST_TYPE_LIST);
++ g_value_init (&item, G_TYPE_INT);
++ g_value_set_int (&item, 2);
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_int (&item, 4);
++ gst_value_list_append_value (&arr, &item);
++ g_value_unset (&item);
++
++ gst_caps_set_value (caps, "mpegversion", &arr);
++ g_value_unset (&arr);
++
++ g_value_init (&arr, GST_TYPE_LIST);
++ g_value_init (&item, G_TYPE_STRING);
++ g_value_set_string (&item, "raw");
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_string (&item, "adts");
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_string (&item, "adif");
++ gst_value_list_append_value (&arr, &item);
++ g_value_unset (&item);
++
++ gst_caps_set_value (caps, "stream-format", &arr);
++ g_value_unset (&arr);
++ } else {
++ gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
++ "stream-format", G_TYPE_STRING, "raw",
++ "base-profile", G_TYPE_STRING, "lc", NULL);
++
++ if (context && context->extradata_size > 0)
++ gst_codec_utils_aac_caps_set_level_and_profile (caps,
++ context->extradata, context->extradata_size);
++ }
++
++ break;
++ }
++ case CODEC_ID_AAC_LATM: /* LATM/LOAS AAC syntax */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 4, "stream-format", G_TYPE_STRING, "loas",
++ NULL);
++ break;
++
++ case CODEC_ID_ASV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
++ "asusversion", G_TYPE_INT, 1, NULL);
++ break;
++ case CODEC_ID_ASV2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
++ "asusversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_FFV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ffv",
++ "ffvversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_4XM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-4xm", NULL);
++ break;
++
++ case CODEC_ID_XAN_WC3:
++ case CODEC_ID_XAN_WC4:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-xan",
++ "wcversion", G_TYPE_INT, 3 - CODEC_ID_XAN_WC3 + codec_id, NULL);
++ break;
++
++ case CODEC_ID_CLJR:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id,
++ "video/x-cirrus-logic-accupak", NULL);
++ break;
++
++ case CODEC_ID_FRAPS:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-fraps", NULL);
++ break;
++
++ case CODEC_ID_MDEC:
++ case CODEC_ID_ROQ:
++ case CODEC_ID_INTERPLAY_VIDEO:
++ buildcaps = TRUE;
++ break;
++
++ case CODEC_ID_VCR1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ati-vcr",
++ "vcrversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_RPZA:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-apple-video", NULL);
++ break;
++
++ case CODEC_ID_CINEPAK:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-cinepak", NULL);
++ break;
++
++ /* WS_VQA belogns here (order) */
++
++ case CODEC_ID_MSRLE:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
++ "layout", G_TYPE_STRING, "microsoft", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
++ }
++ break;
++
++ case CODEC_ID_QTRLE:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
++ "layout", G_TYPE_STRING, "quicktime", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
++ }
++ break;
++
++ case CODEC_ID_MSVIDEO1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msvideocodec",
++ "msvideoversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_WMV3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, 3, NULL);
++ break;
++ case CODEC_ID_VC1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
++ GST_MAKE_FOURCC ('W', 'V', 'C', '1'), NULL);
++ break;
++ case CODEC_ID_QDM2:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
++ break;
++
++ case CODEC_ID_MSZH:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mszh", NULL);
++ break;
++
++ case CODEC_ID_ZLIB:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zlib", NULL);
++ break;
++
++ case CODEC_ID_TRUEMOTION1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
++ "trueversion", G_TYPE_INT, 1, NULL);
++ break;
++ case CODEC_ID_TRUEMOTION2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
++ "trueversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_ULTI:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ultimotion",
++ NULL);
++ break;
++
++ case CODEC_ID_TSCC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
++ }
++ break;
++
++ case CODEC_ID_KMVC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-kmvc", NULL);
++ break;
++
++ case CODEC_ID_NUV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-nuv", NULL);
++ break;
++
++ case CODEC_ID_GIF:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/gif", NULL);
++ break;
++
++ case CODEC_ID_PNG:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/png", NULL);
++ break;
++
++ case CODEC_ID_PPM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/ppm", NULL);
++ break;
++
++ case CODEC_ID_PBM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/pbm", NULL);
++ break;
++
++ case CODEC_ID_PAM:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-portable-anymap",
++ NULL);
++ break;
++
++ case CODEC_ID_PGM:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-portable-graymap",
++ NULL);
++ break;
++
++ case CODEC_ID_PCX:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-pcx", NULL);
++ break;
++
++ case CODEC_ID_SGI:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-sgi", NULL);
++ break;
++
++ case CODEC_ID_TARGA:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-tga", NULL);
++ break;
++
++ case CODEC_ID_TIFF:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/tiff", NULL);
++ break;
++
++ case CODEC_ID_SUNRAST:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-sun-raster", NULL);
++ break;
++
++ case CODEC_ID_SMC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-smc", NULL);
++ break;
++
++ case CODEC_ID_QDRAW:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-qdrw", NULL);
++ break;
++
++ case CODEC_ID_DNXHD:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dnxhd", NULL);
++ break;
++
++ case CODEC_ID_MIMIC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mimic", NULL);
++ break;
++
++ case CODEC_ID_VMNC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vmnc", NULL);
++ break;
++
++ case CODEC_ID_TRUESPEECH:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-truespeech", NULL);
++ break;
++
++ case CODEC_ID_QCELP:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/qcelp", NULL);
++ break;
++
++ case CODEC_ID_AMV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-amv", NULL);
++ break;
++
++ case CODEC_ID_AASC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-aasc", NULL);
++ break;
++
++ case CODEC_ID_LOCO:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-loco", NULL);
++ break;
++
++ case CODEC_ID_ZMBV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zmbv", NULL);
++ break;
++
++ case CODEC_ID_LAGARITH:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-lagarith", NULL);
++ break;
++
++ case CODEC_ID_CSCD:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camstudio", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
++ }
++ break;
++
++ case CODEC_ID_WS_VQA:
++ case CODEC_ID_IDCIN:
++ case CODEC_ID_8BPS:
++ case CODEC_ID_FLIC:
++ case CODEC_ID_VMDVIDEO:
++ case CODEC_ID_VMDAUDIO:
++ case CODEC_ID_SNOW:
++ case CODEC_ID_VIXL:
++ case CODEC_ID_QPEG:
++ case CODEC_ID_PGMYUV:
++ case CODEC_ID_FFVHUFF:
++ case CODEC_ID_WNV1:
++ case CODEC_ID_MP3ADU:
++ case CODEC_ID_MP3ON4:
++ case CODEC_ID_WESTWOOD_SND1:
++ case CODEC_ID_MMVIDEO:
++ case CODEC_ID_AVS:
++ case CODEC_ID_CAVS:
++ buildcaps = TRUE;
++ break;
++
++ /* weird quasi-codecs for the demuxers only */
++ case CODEC_ID_PCM_S16LE:
++ case CODEC_ID_PCM_S16BE:
++ case CODEC_ID_PCM_U16LE:
++ case CODEC_ID_PCM_U16BE:
++ case CODEC_ID_PCM_S8:
++ case CODEC_ID_PCM_U8:
++ {
++ gint width = 0, depth = 0, endianness = 0;
++ gboolean signedness = FALSE; /* blabla */
++
++ switch (codec_id) {
++ case CODEC_ID_PCM_S16LE:
++ width = 16;
++ depth = 16;
++ endianness = G_LITTLE_ENDIAN;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_S16BE:
++ width = 16;
++ depth = 16;
++ endianness = G_BIG_ENDIAN;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_U16LE:
++ width = 16;
++ depth = 16;
++ endianness = G_LITTLE_ENDIAN;
++ signedness = FALSE;
++ break;
++ case CODEC_ID_PCM_U16BE:
++ width = 16;
++ depth = 16;
++ endianness = G_BIG_ENDIAN;
++ signedness = FALSE;
++ break;
++ case CODEC_ID_PCM_S8:
++ width = 8;
++ depth = 8;
++ endianness = G_BYTE_ORDER;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_U8:
++ width = 8;
++ depth = 8;
++ endianness = G_BYTE_ORDER;
++ signedness = FALSE;
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
++ "width", G_TYPE_INT, width,
++ "depth", G_TYPE_INT, depth,
++ "endianness", G_TYPE_INT, endianness,
++ "signed", G_TYPE_BOOLEAN, signedness, NULL);
++ }
++ break;
++
++ case CODEC_ID_PCM_MULAW:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mulaw", NULL);
++ break;
++
++ case CODEC_ID_PCM_ALAW:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alaw", NULL);
++ break;
++
++ case CODEC_ID_ADPCM_G722:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/G722", NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ break;
++
++ case CODEC_ID_ADPCM_G726:
++ {
++ /* the G726 decoder can also handle G721 */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
++ "layout", G_TYPE_STRING, "g726", NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++
++ if (!encode) {
++ gst_caps_append (caps, gst_caps_new_simple ("audio/x-adpcm",
++ "layout", G_TYPE_STRING, "g721",
++ "channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL));
++ }
++ break;
++ }
++ case CODEC_ID_ADPCM_IMA_QT:
++ case CODEC_ID_ADPCM_IMA_WAV:
++ case CODEC_ID_ADPCM_IMA_DK3:
++ case CODEC_ID_ADPCM_IMA_DK4:
++ case CODEC_ID_ADPCM_IMA_WS:
++ case CODEC_ID_ADPCM_IMA_SMJPEG:
++ case CODEC_ID_ADPCM_IMA_AMV:
++ case CODEC_ID_ADPCM_IMA_ISS:
++ case CODEC_ID_ADPCM_IMA_EA_EACS:
++ case CODEC_ID_ADPCM_IMA_EA_SEAD:
++ case CODEC_ID_ADPCM_MS:
++ case CODEC_ID_ADPCM_4XM:
++ case CODEC_ID_ADPCM_XA:
++ case CODEC_ID_ADPCM_ADX:
++ case CODEC_ID_ADPCM_EA:
++ case CODEC_ID_ADPCM_CT:
++ case CODEC_ID_ADPCM_SWF:
++ case CODEC_ID_ADPCM_YAMAHA:
++ case CODEC_ID_ADPCM_SBPRO_2:
++ case CODEC_ID_ADPCM_SBPRO_3:
++ case CODEC_ID_ADPCM_SBPRO_4:
++ case CODEC_ID_ADPCM_EA_R1:
++ case CODEC_ID_ADPCM_EA_R2:
++ case CODEC_ID_ADPCM_EA_R3:
++ case CODEC_ID_ADPCM_EA_MAXIS_XA:
++ case CODEC_ID_ADPCM_EA_XAS:
++ case CODEC_ID_ADPCM_THP:
++ {
++ const gchar *layout = NULL;
++
++ switch (codec_id) {
++ case CODEC_ID_ADPCM_IMA_QT:
++ layout = "quicktime";
++ break;
++ case CODEC_ID_ADPCM_IMA_WAV:
++ layout = "dvi";
++ break;
++ case CODEC_ID_ADPCM_IMA_DK3:
++ layout = "dk3";
++ break;
++ case CODEC_ID_ADPCM_IMA_DK4:
++ layout = "dk4";
++ break;
++ case CODEC_ID_ADPCM_IMA_WS:
++ layout = "westwood";
++ break;
++ case CODEC_ID_ADPCM_IMA_SMJPEG:
++ layout = "smjpeg";
++ break;
++ case CODEC_ID_ADPCM_IMA_AMV:
++ layout = "amv";
++ break;
++ case CODEC_ID_ADPCM_IMA_ISS:
++ layout = "iss";
++ break;
++ case CODEC_ID_ADPCM_IMA_EA_EACS:
++ layout = "ea-eacs";
++ break;
++ case CODEC_ID_ADPCM_IMA_EA_SEAD:
++ layout = "ea-sead";
++ break;
++ case CODEC_ID_ADPCM_MS:
++ layout = "microsoft";
++ break;
++ case CODEC_ID_ADPCM_4XM:
++ layout = "4xm";
++ break;
++ case CODEC_ID_ADPCM_XA:
++ layout = "xa";
++ break;
++ case CODEC_ID_ADPCM_ADX:
++ layout = "adx";
++ break;
++ case CODEC_ID_ADPCM_EA:
++ layout = "ea";
++ break;
++ case CODEC_ID_ADPCM_CT:
++ layout = "ct";
++ break;
++ case CODEC_ID_ADPCM_SWF:
++ layout = "swf";
++ break;
++ case CODEC_ID_ADPCM_YAMAHA:
++ layout = "yamaha";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_2:
++ layout = "sbpro2";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_3:
++ layout = "sbpro3";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_4:
++ layout = "sbpro4";
++ break;
++ case CODEC_ID_ADPCM_EA_R1:
++ layout = "ea-r1";
++ break;
++ case CODEC_ID_ADPCM_EA_R2:
++ layout = "ea-r3";
++ break;
++ case CODEC_ID_ADPCM_EA_R3:
++ layout = "ea-r3";
++ break;
++ case CODEC_ID_ADPCM_EA_MAXIS_XA:
++ layout = "ea-maxis-xa";
++ break;
++ case CODEC_ID_ADPCM_EA_XAS:
++ layout = "ea-xas";
++ break;
++ case CODEC_ID_ADPCM_THP:
++ layout = "thp";
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ /* FIXME: someone please check whether we need additional properties
++ * in this caps definition. */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
++ "layout", G_TYPE_STRING, layout, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ break;
++
++ case CODEC_ID_AMR_NB:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR", NULL);
++ break;
++
++ case CODEC_ID_AMR_WB:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR-WB", NULL);
++ break;
++
++ case CODEC_ID_GSM:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-gsm", NULL);
++ break;
++
++ case CODEC_ID_GSM_MS:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/ms-gsm", NULL);
++ break;
++
++ case CODEC_ID_NELLYMOSER:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL);
++ break;
++
++ case CODEC_ID_SIPR:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-sipro", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "leaf_size", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_RA_144:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_COOK:
++ {
++ gint version = 0;
++
++ switch (codec_id) {
++ case CODEC_ID_RA_144:
++ version = 1;
++ break;
++ case CODEC_ID_RA_288:
++ version = 2;
++ break;
++ case CODEC_ID_COOK:
++ version = 8;
++ break;
++ default:
++ break;
++ }
++
++ /* FIXME: properties? */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-pn-realaudio",
++ "raversion", G_TYPE_INT, version, NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "leaf_size", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_ROQ_DPCM:
++ case CODEC_ID_INTERPLAY_DPCM:
++ case CODEC_ID_XAN_DPCM:
++ case CODEC_ID_SOL_DPCM:
++ {
++ const gchar *layout = NULL;
++
++ switch (codec_id) {
++ case CODEC_ID_ROQ_DPCM:
++ layout = "roq";
++ break;
++ case CODEC_ID_INTERPLAY_DPCM:
++ layout = "interplay";
++ break;
++ case CODEC_ID_XAN_DPCM:
++ layout = "xan";
++ break;
++ case CODEC_ID_SOL_DPCM:
++ layout = "sol";
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ /* FIXME: someone please check whether we need additional properties
++ * in this caps definition. */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dpcm",
++ "layout", G_TYPE_STRING, layout, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ break;
++
++ case CODEC_ID_SHORTEN:
++ caps = gst_caps_new_simple ("audio/x-shorten", NULL);
++ break;
++
++ case CODEC_ID_ALAC:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_FLAC:
++ /* Note that ffmpeg has no encoder yet, but just for safety. In the
++ * encoder case, we want to add things like samplerate, channels... */
++ if (!encode) {
++ caps = gst_caps_new_simple ("audio/x-flac", NULL);
++ }
++ break;
++
++ case CODEC_ID_DVD_SUBTITLE:
++ case CODEC_ID_DVB_SUBTITLE:
++ caps = NULL;
++ break;
++ case CODEC_ID_BMP:
++ caps = gst_caps_new_simple ("image/bmp", NULL);
++ break;
++ case CODEC_ID_TTA:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++ case CODEC_ID_TWINVQ:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-twin-vq", NULL);
++ break;
++ default:
++ GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id);
++ break;
++ }
++
++ if (buildcaps) {
++ AVCodec *codec;
++
++ if ((codec = avcodec_find_decoder (codec_id)) ||
++ (codec = avcodec_find_encoder (codec_id))) {
++ gchar *mime = NULL;
++
++ GST_LOG ("Could not create stream format caps for %s", codec->name);
++
++ switch (codec->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ mime = g_strdup_printf ("video/x-gst_ff-%s", codec->name);
++ caps = gst_ff_vid_caps_new (context, codec_id, mime, NULL);
++ g_free (mime);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ mime = g_strdup_printf ("audio/x-gst_ff-%s", codec->name);
++ caps = gst_ff_aud_caps_new (context, codec_id, mime, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ g_free (mime);
++ break;
++ default:
++ break;
++ }
++ }
++ }
++
++ if (caps != NULL) {
++
++ /* set private data */
++ if (context && context->extradata_size > 0) {
++ GstBuffer *data = gst_buffer_new_and_alloc (context->extradata_size);
++
++ memcpy (GST_BUFFER_DATA (data), context->extradata,
++ context->extradata_size);
++ gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, data, NULL);
++ gst_buffer_unref (data);
++ }
++
++ /* palette */
++ if (context) {
++ gst_ffmpeg_set_palette (caps, context);
++ }
++
++ GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
++
++ } else {
++ GST_LOG ("No caps found for codec_id=%d", codec_id);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG Pixel Format and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * See below for usefullness
++ */
++
++GstCaps *
++gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context,
++ enum CodecID codec_id)
++{
++ GstCaps *caps = NULL;
++
++ int bpp = 0, depth = 0, endianness = 0;
++ gulong g_mask = 0, r_mask = 0, b_mask = 0, a_mask = 0;
++ guint32 fmt = 0;
++
++ switch (pix_fmt) {
++ case PIX_FMT_YUVJ420P:
++ case PIX_FMT_YUV420P:
++ fmt = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ case PIX_FMT_YUVA420P:
++ fmt = GST_MAKE_FOURCC ('A', '4', '2', '0');
++ break;
++ case PIX_FMT_YUYV422:
++ fmt = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
++ break;
++ case PIX_FMT_RGB24:
++ bpp = depth = 24;
++ endianness = G_BIG_ENDIAN;
++ r_mask = 0xff0000;
++ g_mask = 0x00ff00;
++ b_mask = 0x0000ff;
++ break;
++ case PIX_FMT_BGR24:
++ bpp = depth = 24;
++ endianness = G_BIG_ENDIAN;
++ r_mask = 0x0000ff;
++ g_mask = 0x00ff00;
++ b_mask = 0xff0000;
++ break;
++ case PIX_FMT_YUVJ422P:
++ case PIX_FMT_YUV422P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
++ break;
++ case PIX_FMT_YUVJ444P:
++ case PIX_FMT_YUV444P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '4', '4');
++ break;
++ case PIX_FMT_RGB32:
++ bpp = 32;
++ depth = 32;
++ endianness = G_BIG_ENDIAN;
++#if (G_BYTE_ORDER == G_BIG_ENDIAN)
++ r_mask = 0x00ff0000;
++ g_mask = 0x0000ff00;
++ b_mask = 0x000000ff;
++ a_mask = 0xff000000;
++#else
++ r_mask = 0x0000ff00;
++ g_mask = 0x00ff0000;
++ b_mask = 0xff000000;
++ a_mask = 0x000000ff;
++#endif
++ break;
++ case PIX_FMT_YUV410P:
++ fmt = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
++ break;
++ case PIX_FMT_YUV411P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
++ break;
++ case PIX_FMT_RGB565:
++ bpp = depth = 16;
++ endianness = G_BYTE_ORDER;
++ r_mask = 0xf800;
++ g_mask = 0x07e0;
++ b_mask = 0x001f;
++ break;
++ case PIX_FMT_RGB555:
++ bpp = 16;
++ depth = 15;
++ endianness = G_BYTE_ORDER;
++ r_mask = 0x7c00;
++ g_mask = 0x03e0;
++ b_mask = 0x001f;
++ break;
++ case PIX_FMT_PAL8:
++ bpp = depth = 8;
++ endianness = G_BYTE_ORDER;
++ break;
++ case PIX_FMT_GRAY8:
++ bpp = depth = 8;
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-gray",
++ "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
++ break;
++ default:
++ /* give up ... */
++ break;
++ }
++
++ if (caps == NULL) {
++ if (bpp != 0) {
++ if (r_mask != 0) {
++ if (a_mask) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "red_mask", G_TYPE_INT, r_mask,
++ "green_mask", G_TYPE_INT, g_mask,
++ "blue_mask", G_TYPE_INT, b_mask,
++ "alpha_mask", G_TYPE_INT, a_mask,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "red_mask", G_TYPE_INT, r_mask,
++ "green_mask", G_TYPE_INT, g_mask,
++ "blue_mask", G_TYPE_INT, b_mask,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ }
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ if (caps && context) {
++ gst_ffmpeg_set_palette (caps, context);
++ }
++ }
++ } else if (fmt) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
++ "format", GST_TYPE_FOURCC, fmt, NULL);
++ }
++ }
++
++ if (caps != NULL) {
++ GST_DEBUG ("caps for pix_fmt=%d: %" GST_PTR_FORMAT, pix_fmt, caps);
++ } else {
++ GST_LOG ("No caps found for pix_fmt=%d", pix_fmt);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG Sample Format and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * See below for usefullness
++ */
++
++static GstCaps *
++gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
++ AVCodecContext * context, enum CodecID codec_id)
++{
++ GstCaps *caps = NULL;
++
++ int bpp = 0;
++ gboolean integer = TRUE;
++ gboolean signedness = FALSE;
++
++ switch (sample_fmt) {
++ case AV_SAMPLE_FMT_S16:
++ signedness = TRUE;
++ bpp = 16;
++ break;
++
++ case AV_SAMPLE_FMT_S32:
++ signedness = TRUE;
++ bpp = 32;
++ break;
++
++ case AV_SAMPLE_FMT_FLT:
++ integer = FALSE;
++ bpp = 32;
++ break;
++
++ case AV_SAMPLE_FMT_DBL:
++ integer = FALSE;
++ bpp = 64;
++ break;
++ default:
++ /* .. */
++ break;
++ }
++
++ if (bpp) {
++ if (integer) {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
++ "signed", G_TYPE_BOOLEAN, signedness,
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
++ } else {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-float",
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "width", G_TYPE_INT, bpp, NULL);
++ }
++ }
++
++ if (caps != NULL) {
++ GST_LOG ("caps for sample_fmt=%d: %" GST_PTR_FORMAT, sample_fmt, caps);
++ } else {
++ GST_LOG ("No caps found for sample_fmt=%d", sample_fmt);
++ }
++
++ return caps;
++}
++
++GstCaps *
++gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context,
++ enum CodecID codec_id, gboolean encode, AVCodec * codec)
++{
++ GstCaps *caps = NULL;
++
++ GST_DEBUG ("context:%p, codec_id:%d, encode:%d, codec:%p",
++ context, codec_id, encode, codec);
++ if (codec)
++ GST_DEBUG ("sample_fmts:%p, samplerates:%p",
++ codec->sample_fmts, codec->supported_samplerates);
++
++ if (context) {
++ /* Specific codec context */
++ caps = gst_ffmpeg_smpfmt_to_caps (context->sample_fmt, context, codec_id);
++ } else if (codec && codec->sample_fmts) {
++ GstCaps *temp;
++ int i;
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; codec->sample_fmts[i] != -1; i++) {
++ temp =
++ gst_ffmpeg_smpfmt_to_caps (codec->sample_fmts[i], context, codec_id);
++ if (temp != NULL)
++ gst_caps_append (caps, temp);
++ }
++ } else {
++ GstCaps *temp;
++ enum AVSampleFormat i;
++ AVCodecContext ctx = { 0, };
++
++ ctx.channels = -1;
++ caps = gst_caps_new_empty ();
++ for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
++ temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
++ if (temp != NULL) {
++ gst_caps_append (caps, temp);
++ }
++ }
++ }
++ return caps;
++}
++
++GstCaps *
++gst_ffmpeg_codectype_to_video_caps (AVCodecContext * context,
++ enum CodecID codec_id, gboolean encode, AVCodec * codec)
++{
++ GstCaps *caps;
++
++ GST_LOG ("context:%p, codec_id:%d, encode:%d, codec:%p",
++ context, codec_id, encode, codec);
++
++ if (context) {
++ caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context, codec_id);
++ } else {
++ GstCaps *temp;
++ enum PixelFormat i;
++ AVCodecContext ctx = { 0, };
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < PIX_FMT_NB; i++) {
++ ctx.width = -1;
++ ctx.pix_fmt = i;
++ temp = gst_ffmpeg_pixfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
++ if (temp != NULL) {
++ gst_caps_append (caps, temp);
++ }
++ }
++ }
++ return caps;
++}
++
++/* Convert a FFMPEG codec Type and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * AVMediaType is primarily meant for uncompressed data GstCaps!
++ */
++
++GstCaps *
++gst_ffmpeg_codectype_to_caps (enum AVMediaType codec_type,
++ AVCodecContext * context, enum CodecID codec_id, gboolean encode)
++{
++ GstCaps *caps;
++
++ switch (codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ caps =
++ gst_ffmpeg_codectype_to_video_caps (context, codec_id, encode, NULL);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ caps =
++ gst_ffmpeg_codectype_to_audio_caps (context, codec_id, encode, NULL);
++ break;
++ default:
++ caps = NULL;
++ break;
++ }
++
++ return caps;
++}
++
++/* Convert a GstCaps (audio/raw) to a FFMPEG SampleFmt
++ * and other audio properties in a AVCodecContext.
++ *
++ * For usefullness, see below
++ */
++
++static void
++gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps,
++ AVCodecContext * context, gboolean raw)
++{
++ GstStructure *structure;
++ gint depth = 0, width = 0, endianness = 0;
++ gboolean signedness = FALSE;
++ const gchar *name;
++
++ g_return_if_fail (gst_caps_get_size (caps) == 1);
++ structure = gst_caps_get_structure (caps, 0);
++
++ gst_structure_get_int (structure, "channels", &context->channels);
++ gst_structure_get_int (structure, "rate", &context->sample_rate);
++ gst_structure_get_int (structure, "block_align", &context->block_align);
++ gst_structure_get_int (structure, "bitrate", &context->bit_rate);
++
++ if (!raw)
++ return;
++
++ name = gst_structure_get_name (structure);
++
++ if (!strcmp (name, "audio/x-raw-float")) {
++ /* FLOAT */
++ if (gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if (endianness == G_BYTE_ORDER) {
++ if (width == 32)
++ context->sample_fmt = AV_SAMPLE_FMT_FLT;
++ else if (width == 64)
++ context->sample_fmt = AV_SAMPLE_FMT_DBL;
++ }
++ }
++ } else {
++ /* INT */
++ if (gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "depth", &depth) &&
++ gst_structure_get_boolean (structure, "signed", &signedness) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
++ if ((width == 16) && (depth == 16))
++ context->sample_fmt = AV_SAMPLE_FMT_S16;
++ else if ((width == 32) && (depth == 32))
++ context->sample_fmt = AV_SAMPLE_FMT_S32;
++ }
++ }
++ }
++}
++
++
++/* Convert a GstCaps (video/raw) to a FFMPEG PixFmt
++ * and other video properties in a AVCodecContext.
++ *
++ * For usefullness, see below
++ */
++
++static void
++gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
++ AVCodecContext * context, gboolean raw)
++{
++ GstStructure *structure;
++ const GValue *fps;
++ const GValue *par = NULL;
++
++ GST_DEBUG ("converting caps %" GST_PTR_FORMAT, caps);
++ g_return_if_fail (gst_caps_get_size (caps) == 1);
++ structure = gst_caps_get_structure (caps, 0);
++
++ gst_structure_get_int (structure, "width", &context->width);
++ gst_structure_get_int (structure, "height", &context->height);
++ gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
++
++ fps = gst_structure_get_value (structure, "framerate");
++ if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
++
++ /* somehow these seem mixed up.. */
++ context->time_base.den = gst_value_get_fraction_numerator (fps);
++ context->time_base.num = gst_value_get_fraction_denominator (fps);
++ context->ticks_per_frame = 1;
++
++ GST_DEBUG ("setting framerate %d/%d = %lf",
++ context->time_base.den, context->time_base.num,
++ 1. * context->time_base.den / context->time_base.num);
++ }
++
++ par = gst_structure_get_value (structure, "pixel-aspect-ratio");
++ if (par && GST_VALUE_HOLDS_FRACTION (par)) {
++
++ context->sample_aspect_ratio.num = gst_value_get_fraction_numerator (par);
++ context->sample_aspect_ratio.den = gst_value_get_fraction_denominator (par);
++
++ GST_DEBUG ("setting pixel-aspect-ratio %d/%d = %lf",
++ context->sample_aspect_ratio.den, context->sample_aspect_ratio.num,
++ 1. * context->sample_aspect_ratio.den /
++ context->sample_aspect_ratio.num);
++ }
++
++ if (!raw)
++ return;
++
++ g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
++
++ if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
++ guint32 fourcc;
++
++ if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
++ switch (fourcc) {
++ case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
++ context->pix_fmt = PIX_FMT_YUYV422;
++ break;
++ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUV420P;
++ break;
++ case GST_MAKE_FOURCC ('A', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUVA420P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
++ context->pix_fmt = PIX_FMT_YUV411P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
++ context->pix_fmt = PIX_FMT_YUV422P;
++ break;
++ case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
++ context->pix_fmt = PIX_FMT_YUV410P;
++ break;
++#if 0
++ case FIXME:
++ context->pix_fmt = PIX_FMT_YUV444P;
++ break;
++#endif
++ }
++ }
++ } else if (strcmp (gst_structure_get_name (structure),
++ "video/x-raw-rgb") == 0) {
++ gint bpp = 0, rmask = 0, endianness = 0;
++
++ if (gst_structure_get_int (structure, "bpp", &bpp) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if (gst_structure_get_int (structure, "red_mask", &rmask)) {
++ switch (bpp) {
++ case 32:
++#if (G_BYTE_ORDER == G_BIG_ENDIAN)
++ if (rmask == 0x00ff0000)
++#else
++ if (rmask == 0x0000ff00)
++#endif
++ context->pix_fmt = PIX_FMT_RGB32;
++ break;
++ case 24:
++ if (rmask == 0x0000FF)
++ context->pix_fmt = PIX_FMT_BGR24;
++ else
++ context->pix_fmt = PIX_FMT_RGB24;
++ break;
++ case 16:
++ if (endianness == G_BYTE_ORDER)
++ context->pix_fmt = PIX_FMT_RGB565;
++ break;
++ case 15:
++ if (endianness == G_BYTE_ORDER)
++ context->pix_fmt = PIX_FMT_RGB555;
++ break;
++ default:
++ /* nothing */
++ break;
++ }
++ } else {
++ if (bpp == 8) {
++ context->pix_fmt = PIX_FMT_PAL8;
++ gst_ffmpeg_get_palette (caps, context);
++ }
++ }
++ }
++ } else if (strcmp (gst_structure_get_name (structure),
++ "video/x-raw-gray") == 0) {
++ gint bpp = 0;
++
++ if (gst_structure_get_int (structure, "bpp", &bpp)) {
++ switch (bpp) {
++ case 8:
++ context->pix_fmt = PIX_FMT_GRAY8;
++ break;
++ }
++ }
++ }
++}
++
++/* Convert a GstCaps and a FFMPEG codec Type to a
++ * AVCodecContext. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the context
++ *
++ * AVMediaType is primarily meant for uncompressed data GstCaps!
++ */
++
++void
++gst_ffmpeg_caps_with_codectype (enum AVMediaType type,
++ const GstCaps * caps, AVCodecContext * context)
++{
++ if (context == NULL)
++ return;
++
++ switch (type) {
++ case AVMEDIA_TYPE_VIDEO:
++ gst_ffmpeg_caps_to_pixfmt (caps, context, TRUE);
++ break;
++
++ case AVMEDIA_TYPE_AUDIO:
++ gst_ffmpeg_caps_to_smpfmt (caps, context, TRUE);
++ break;
++
++ default:
++ /* unknown */
++ break;
++ }
++}
++
++#if 0
++static void
++nal_escape (guint8 * dst, guint8 * src, guint size, guint * destsize)
++{
++ guint8 *dstp = dst;
++ guint8 *srcp = src;
++ guint8 *end = src + size;
++ gint count = 0;
++
++ while (srcp < end) {
++ if (count == 2 && *srcp <= 0x03) {
++ GST_DEBUG ("added escape code");
++ *dstp++ = 0x03;
++ count = 0;
++ }
++ if (*srcp == 0)
++ count++;
++ else
++ count = 0;
++
++ GST_DEBUG ("copy %02x, count %d", *srcp, count);
++ *dstp++ = *srcp++;
++ }
++ *destsize = dstp - dst;
++}
++
++/* copy the config, escaping NAL units as we iterate them, if something fails we
++ * copy everything and hope for the best. */
++static void
++copy_config (guint8 * dst, guint8 * src, guint size, guint * destsize)
++{
++ guint8 *dstp = dst;
++ guint8 *srcp = src;
++ gint cnt, i;
++ guint nalsize, esize;
++
++ /* check size */
++ if (size < 7)
++ goto full_copy;
++
++ /* check version */
++ if (*srcp != 1)
++ goto full_copy;
++
++ cnt = *(srcp + 5) & 0x1f; /* Number of sps */
++
++ GST_DEBUG ("num SPS %d", cnt);
++
++ memcpy (dstp, srcp, 6);
++ srcp += 6;
++ dstp += 6;
++
++ for (i = 0; i < cnt; i++) {
++ GST_DEBUG ("copy SPS %d", i);
++ nalsize = (srcp[0] << 8) | srcp[1];
++ nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
++ dstp[0] = esize >> 8;
++ dstp[1] = esize & 0xff;
++ dstp += esize + 2;
++ srcp += nalsize + 2;
++ }
++
++ cnt = *(dstp++) = *(srcp++); /* Number of pps */
++
++ GST_DEBUG ("num PPS %d", cnt);
++
++ for (i = 0; i < cnt; i++) {
++ GST_DEBUG ("copy PPS %d", i);
++ nalsize = (srcp[0] << 8) | srcp[1];
++ nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
++ dstp[0] = esize >> 8;
++ dstp[1] = esize & 0xff;
++ dstp += esize + 2;
++ srcp += nalsize + 2;
++ }
++ *destsize = dstp - dst;
++
++ return;
++
++full_copy:
++ {
++ GST_DEBUG ("something unexpected, doing full copy");
++ memcpy (dst, src, size);
++ *destsize = size;
++ return;
++ }
++}
++#endif
++
++/*
++ * caps_with_codecid () transforms a GstCaps for a known codec
++ * ID into a filled-in context.
++ * codec_data from caps will override possible extradata already in the context
++ */
++
++void
++gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
++ enum AVMediaType codec_type, const GstCaps * caps, AVCodecContext * context)
++{
++ GstStructure *str;
++ const GValue *value;
++ const GstBuffer *buf;
++
++ GST_LOG ("codec_id:%d, codec_type:%d, caps:%" GST_PTR_FORMAT " context:%p",
++ codec_id, codec_type, caps, context);
++
++ if (!context || !gst_caps_get_size (caps))
++ return;
++
++ str = gst_caps_get_structure (caps, 0);
++
++ /* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
++ if ((value = gst_structure_get_value (str, "codec_data"))) {
++ guint size;
++ guint8 *data;
++
++ buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
++ size = GST_BUFFER_SIZE (buf);
++ data = GST_BUFFER_DATA (buf);
++
++ /* free the old one if it is there */
++ if (context->extradata)
++ av_free (context->extradata);
++
++#if 0
++ if (codec_id == CODEC_ID_H264) {
++ guint extrasize;
++
++ GST_DEBUG ("copy, escaping codec_data %d", size);
++ /* ffmpeg h264 expects the codec_data to be escaped, there is no real
++ * reason for this but let's just escape it for now. Start by allocating
++ * enough space, x2 is more than enough.
++ *
++ * FIXME, we disabled escaping because some file already contain escaped
++ * codec_data and then we escape twice and fail. It's better to leave it
++ * as is, as that is what most players do. */
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (size * 2 +
++ FF_INPUT_BUFFER_PADDING_SIZE));
++ copy_config (context->extradata, data, size, &extrasize);
++ GST_DEBUG ("escaped size: %d", extrasize);
++ context->extradata_size = extrasize;
++ } else
++#endif
++ {
++ /* allocate with enough padding */
++ GST_DEBUG ("copy codec_data");
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (size + FF_INPUT_BUFFER_PADDING_SIZE));
++ memcpy (context->extradata, data, size);
++ context->extradata_size = size;
++ }
++
++ /* Hack for VC1. Sometimes the first (length) byte is 0 for some files */
++ if (codec_id == CODEC_ID_VC1 && size > 0 && data[0] == 0) {
++ context->extradata[0] = (guint8) size;
++ }
++
++ GST_DEBUG ("have codec data of size %d", size);
++ } else if (context->extradata == NULL && codec_id != CODEC_ID_AAC_LATM &&
++ codec_id != CODEC_ID_FLAC) {
++ /* no extradata, alloc dummy with 0 sized, some codecs insist on reading
++ * extradata anyway which makes then segfault. */
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (FF_INPUT_BUFFER_PADDING_SIZE));
++ context->extradata_size = 0;
++ GST_DEBUG ("no codec data");
++ }
++
++ switch (codec_id) {
++ case CODEC_ID_MPEG4:
++ {
++ const gchar *mime = gst_structure_get_name (str);
++
++ if (!strcmp (mime, "video/x-divx"))
++ context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
++ else if (!strcmp (mime, "video/x-xvid"))
++ context->codec_tag = GST_MAKE_FOURCC ('X', 'V', 'I', 'D');
++ else if (!strcmp (mime, "video/x-3ivx"))
++ context->codec_tag = GST_MAKE_FOURCC ('3', 'I', 'V', '1');
++ else if (!strcmp (mime, "video/mpeg"))
++ context->codec_tag = GST_MAKE_FOURCC ('m', 'p', '4', 'v');
++ }
++ break;
++
++ case CODEC_ID_SVQ3:
++ /* FIXME: this is a workaround for older gst-plugins releases
++ * (<= 0.8.9). This should be removed at some point, because
++ * it causes wrong decoded frame order. */
++ if (!context->extradata) {
++ gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag;
++ guint16 flags;
++
++ if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) ||
++ gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) ||
++ gst_structure_get_int (str, "low_delay", &low_delay) ||
++ gst_structure_get_int (str, "unknown_svq3_flag",
++ &unknown_svq3_flag)) {
++ context->extradata = (guint8 *) av_mallocz (0x64);
++ g_stpcpy ((gchar *) context->extradata, "SVQ3");
++ flags = 1 << 3;
++ flags |= low_delay;
++ flags = flags << 2;
++ flags |= unknown_svq3_flag;
++ flags = flags << 6;
++ flags |= halfpel_flag;
++ flags = flags << 1;
++ flags |= thirdpel_flag;
++ flags = flags << 3;
++
++ flags = GUINT16_FROM_LE (flags);
++
++ memcpy ((gchar *) context->extradata + 0x62, &flags, 2);
++ context->extradata_size = 0x64;
++ }
++ }
++ break;
++
++ case CODEC_ID_MSRLE:
++ case CODEC_ID_QTRLE:
++ case CODEC_ID_TSCC:
++ case CODEC_ID_CSCD:
++ case CODEC_ID_APE:
++ {
++ gint depth;
++
++ if (gst_structure_get_int (str, "depth", &depth)) {
++ context->bits_per_coded_sample = depth;
++ } else {
++ GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
++ }
++
++ }
++ break;
++
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ {
++ gint format;
++
++ if (gst_structure_get_int (str, "format", &format))
++ context->sub_id = format;
++
++ break;
++ }
++ case CODEC_ID_COOK:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_RA_144:
++ case CODEC_ID_SIPR:
++ {
++ gint leaf_size;
++ gint bitrate;
++
++ if (gst_structure_get_int (str, "leaf_size", &leaf_size))
++ context->block_align = leaf_size;
++ if (gst_structure_get_int (str, "bitrate", &bitrate))
++ context->bit_rate = bitrate;
++ }
++ case CODEC_ID_ALAC:
++ gst_structure_get_int (str, "samplesize",
++ &context->bits_per_coded_sample);
++ break;
++
++ case CODEC_ID_DVVIDEO:
++ {
++ guint32 fourcc;
++
++ if (gst_structure_get_fourcc (str, "format", &fourcc))
++ switch (fourcc) {
++ case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
++ context->pix_fmt = PIX_FMT_YUYV422;
++ break;
++ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUV420P;
++ break;
++ case GST_MAKE_FOURCC ('A', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUVA420P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
++ context->pix_fmt = PIX_FMT_YUV411P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
++ context->pix_fmt = PIX_FMT_YUV422P;
++ break;
++ case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
++ context->pix_fmt = PIX_FMT_YUV410P;
++ break;
++ default:
++ GST_WARNING ("couldn't convert fourcc %" GST_FOURCC_FORMAT
++ " to a pixel format", GST_FOURCC_ARGS (fourcc));
++ break;
++ }
++ break;
++ }
++ case CODEC_ID_H263P:
++ {
++ gboolean val;
++
++ if (!gst_structure_get_boolean (str, "annex-f", &val) || val)
++ context->flags |= CODEC_FLAG_4MV;
++ else
++ context->flags &= ~CODEC_FLAG_4MV;
++ if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) &&
++ (!gst_structure_get_boolean (str, "annex-t", &val) || val))
++ context->flags |= CODEC_FLAG_AC_PRED;
++ else
++ context->flags &= ~CODEC_FLAG_AC_PRED;
++ if (!gst_structure_get_boolean (str, "annex-j", &val) || val)
++ context->flags |= CODEC_FLAG_LOOP_FILTER;
++ else
++ context->flags &= ~CODEC_FLAG_LOOP_FILTER;
++ break;
++ }
++ case CODEC_ID_ADPCM_G726:
++ {
++ const gchar *layout;
++
++ if ((layout = gst_structure_get_string (str, "layout"))) {
++ if (!strcmp (layout, "g721")) {
++ context->sample_rate = 8000;
++ context->channels = 1;
++ context->bit_rate = 32000;
++ }
++ }
++ break;
++ }
++ default:
++ break;
++ }
++
++ if (!gst_caps_is_fixed (caps))
++ return;
++
++ /* common properties (width, height, fps) */
++ switch (codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
++ gst_ffmpeg_get_palette (caps, context);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
++ break;
++ default:
++ break;
++ }
++
++ /* fixup of default settings */
++ switch (codec_id) {
++ case CODEC_ID_QCELP:
++ /* QCELP is always mono, no matter what the caps say */
++ context->channels = 1;
++ break;
++ default:
++ break;
++ }
++}
++
++/* _formatid_to_caps () is meant for muxers/demuxers, it
++ * transforms a name (ffmpeg way of ID'ing these, why don't
++ * they have unique numerical IDs?) to the corresponding
++ * caps belonging to that mux-format
++ *
++ * Note: we don't need any additional info because the caps
++ * isn't supposed to contain any useful info besides the
++ * media type anyway
++ */
++
++GstCaps *
++gst_ffmpeg_formatid_to_caps (const gchar * format_name)
++{
++ GstCaps *caps = NULL;
++
++ if (!strcmp (format_name, "mpeg")) {
++ caps = gst_caps_new_simple ("video/mpeg",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "mpegts")) {
++ caps = gst_caps_new_simple ("video/mpegts",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "rm")) {
++ caps = gst_caps_new_simple ("application/x-pn-realmedia",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "asf")) {
++ caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
++ } else if (!strcmp (format_name, "avi")) {
++ caps = gst_caps_new_simple ("video/x-msvideo", NULL);
++ } else if (!strcmp (format_name, "wav")) {
++ caps = gst_caps_new_simple ("audio/x-wav", NULL);
++ } else if (!strcmp (format_name, "ape")) {
++ caps = gst_caps_new_simple ("application/x-ape", NULL);
++ } else if (!strcmp (format_name, "swf")) {
++ caps = gst_caps_new_simple ("application/x-shockwave-flash", NULL);
++ } else if (!strcmp (format_name, "au")) {
++ caps = gst_caps_new_simple ("audio/x-au", NULL);
++ } else if (!strcmp (format_name, "dv")) {
++ caps = gst_caps_new_simple ("video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "4xm")) {
++ caps = gst_caps_new_simple ("video/x-4xm", NULL);
++ } else if (!strcmp (format_name, "matroska")) {
++ caps = gst_caps_new_simple ("video/x-matroska", NULL);
++ } else if (!strcmp (format_name, "mp3")) {
++ caps = gst_caps_new_simple ("application/x-id3", NULL);
++ } else if (!strcmp (format_name, "flic")) {
++ caps = gst_caps_new_simple ("video/x-fli", NULL);
++ } else if (!strcmp (format_name, "flv")) {
++ caps = gst_caps_new_simple ("video/x-flv", NULL);
++ } else if (!strcmp (format_name, "tta")) {
++ caps = gst_caps_new_simple ("audio/x-ttafile", NULL);
++ } else if (!strcmp (format_name, "aiff")) {
++ caps = gst_caps_new_simple ("audio/x-aiff", NULL);
++ } else if (!strcmp (format_name, "mov_mp4_m4a_3gp_3g2")) {
++ caps =
++ gst_caps_from_string
++ ("application/x-3gp; video/quicktime; audio/x-m4a");
++ } else if (!strcmp (format_name, "mov")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)apple");
++ } else if (!strcmp (format_name, "mp4")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)iso");
++ } else if (!strcmp (format_name, "3gp")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)3gpp");
++ } else if (!strcmp (format_name, "3g2")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)3g2");
++ } else if (!strcmp (format_name, "psp")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)psp");
++ } else if (!strcmp (format_name, "ipod")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)ipod");
++ } else if (!strcmp (format_name, "aac")) {
++ caps = gst_caps_new_simple ("audio/mpeg",
++ "mpegversion", G_TYPE_INT, 4, NULL);
++ } else if (!strcmp (format_name, "gif")) {
++ caps = gst_caps_from_string ("image/gif");
++ } else if (!strcmp (format_name, "ogg")) {
++ caps = gst_caps_from_string ("application/ogg");
++ } else if (!strcmp (format_name, "mxf") || !strcmp (format_name, "mxf_d10")) {
++ caps = gst_caps_from_string ("application/mxf");
++ } else if (!strcmp (format_name, "gxf")) {
++ caps = gst_caps_from_string ("application/gxf");
++ } else if (!strcmp (format_name, "yuv4mpegpipe")) {
++ caps = gst_caps_new_simple ("application/x-yuv4mpeg",
++ "y4mversion", G_TYPE_INT, 2, NULL);
++ } else if (!strcmp (format_name, "mpc")) {
++ caps = gst_caps_from_string ("audio/x-musepack, streamversion = (int) 7");
++ } else if (!strcmp (format_name, "vqf")) {
++ caps = gst_caps_from_string ("audio/x-vqf");
++ } else if (!strcmp (format_name, "nsv")) {
++ caps = gst_caps_from_string ("video/x-nsv");
++ } else if (!strcmp (format_name, "amr")) {
++ caps = gst_caps_from_string ("audio/x-amr-nb-sh");
++ } else if (!strcmp (format_name, "webm")) {
++ caps = gst_caps_from_string ("video/webm");
++ } else {
++ gchar *name;
++
++ GST_LOG ("Could not create stream format caps for %s", format_name);
++ name = g_strdup_printf ("application/x-gst_ff-%s", format_name);
++ caps = gst_caps_new_simple (name, NULL);
++ g_free (name);
++ }
++
++ return caps;
++}
++
++gboolean
++gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
++ enum CodecID ** video_codec_list, enum CodecID ** audio_codec_list,
++ AVOutputFormat * plugin)
++{
++ static enum CodecID tmp_vlist[] = {
++ CODEC_ID_NONE,
++ CODEC_ID_NONE
++ };
++ static enum CodecID tmp_alist[] = {
++ CODEC_ID_NONE,
++ CODEC_ID_NONE
++ };
++
++ GST_LOG ("format_name : %s", format_name);
++
++ if (!strcmp (format_name, "mp4")) {
++ static enum CodecID mp4_video_list[] = {
++ CODEC_ID_MPEG4, CODEC_ID_H264,
++ CODEC_ID_MJPEG,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mp4_audio_list[] = {
++ CODEC_ID_AAC, CODEC_ID_MP3,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mp4_video_list;
++ *audio_codec_list = mp4_audio_list;
++ } else if (!strcmp (format_name, "mpeg")) {
++ static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG1VIDEO,
++ CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP1,
++ CODEC_ID_MP2,
++ CODEC_ID_MP3,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpeg_video_list;
++ *audio_codec_list = mpeg_audio_list;
++ } else if (!strcmp (format_name, "dvd")) {
++ static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP2,
++ CODEC_ID_AC3,
++ CODEC_ID_DTS,
++ CODEC_ID_PCM_S16BE,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpeg_video_list;
++ *audio_codec_list = mpeg_audio_list;
++ } else if (!strcmp (format_name, "mpegts")) {
++ static enum CodecID mpegts_video_list[] = { CODEC_ID_MPEG1VIDEO,
++ CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpegts_audio_list[] = { CODEC_ID_MP2,
++ CODEC_ID_MP3,
++ CODEC_ID_AC3,
++ CODEC_ID_DTS,
++ CODEC_ID_AAC,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpegts_video_list;
++ *audio_codec_list = mpegts_audio_list;
++ } else if (!strcmp (format_name, "vob")) {
++ static enum CodecID vob_video_list[] =
++ { CODEC_ID_MPEG2VIDEO, CODEC_ID_NONE };
++ static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3,
++ CODEC_ID_DTS, CODEC_ID_NONE
++ };
++
++ *video_codec_list = vob_video_list;
++ *audio_codec_list = vob_audio_list;
++ } else if (!strcmp (format_name, "flv")) {
++ static enum CodecID flv_video_list[] = { CODEC_ID_FLV1, CODEC_ID_NONE };
++ static enum CodecID flv_audio_list[] = { CODEC_ID_MP3, CODEC_ID_NONE };
++
++ *video_codec_list = flv_video_list;
++ *audio_codec_list = flv_audio_list;
++ } else if (!strcmp (format_name, "asf")) {
++ static enum CodecID asf_video_list[] =
++ { CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_MSMPEG4V3, CODEC_ID_NONE };
++ static enum CodecID asf_audio_list[] =
++ { CODEC_ID_WMAV1, CODEC_ID_WMAV2, CODEC_ID_MP3, CODEC_ID_NONE };
++
++ *video_codec_list = asf_video_list;
++ *audio_codec_list = asf_audio_list;
++ } else if (!strcmp (format_name, "dv")) {
++ static enum CodecID dv_video_list[] = { CODEC_ID_DVVIDEO, CODEC_ID_NONE };
++ static enum CodecID dv_audio_list[] = { CODEC_ID_PCM_S16LE, CODEC_ID_NONE };
++
++ *video_codec_list = dv_video_list;
++ *audio_codec_list = dv_audio_list;
++ } else if (!strcmp (format_name, "mov")) {
++ static enum CodecID mov_video_list[] = {
++ CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_MPEG4,
++ CODEC_ID_H263, CODEC_ID_H263P,
++ CODEC_ID_H264, CODEC_ID_DVVIDEO,
++ CODEC_ID_MJPEG,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mov_audio_list[] = {
++ CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_ADPCM_IMA_QT,
++ CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_AAC,
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE,
++ CODEC_ID_MP3, CODEC_ID_NONE
++ };
++
++ *video_codec_list = mov_video_list;
++ *audio_codec_list = mov_audio_list;
++ } else if ((!strcmp (format_name, "3gp") || !strcmp (format_name, "3g2"))) {
++ static enum CodecID tgp_video_list[] = {
++ CODEC_ID_MPEG4, CODEC_ID_H263, CODEC_ID_H263P, CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID tgp_audio_list[] = {
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_AAC,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = tgp_video_list;
++ *audio_codec_list = tgp_audio_list;
++ } else if (!strcmp (format_name, "mmf")) {
++ static enum CodecID mmf_audio_list[] = {
++ CODEC_ID_ADPCM_YAMAHA, CODEC_ID_NONE
++ };
++ *video_codec_list = NULL;
++ *audio_codec_list = mmf_audio_list;
++ } else if (!strcmp (format_name, "amr")) {
++ static enum CodecID amr_audio_list[] = {
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_NONE
++ };
++ *video_codec_list = NULL;
++ *audio_codec_list = amr_audio_list;
++ } else if (!strcmp (format_name, "gif")) {
++ static enum CodecID gif_image_list[] = {
++ CODEC_ID_RAWVIDEO, CODEC_ID_NONE
++ };
++ *video_codec_list = gif_image_list;
++ *audio_codec_list = NULL;
++ } else if ((plugin->audio_codec != CODEC_ID_NONE) ||
++ (plugin->video_codec != CODEC_ID_NONE)) {
++ tmp_vlist[0] = plugin->video_codec;
++ tmp_alist[0] = plugin->audio_codec;
++
++ *video_codec_list = tmp_vlist;
++ *audio_codec_list = tmp_alist;
++ } else {
++ GST_LOG ("Format %s not found", format_name);
++ return FALSE;
++ }
++
++ return TRUE;
++}
++
++/* Convert a GstCaps to a FFMPEG codec ID. Size et all
++ * are omitted, that can be queried by the user itself,
++ * we're not eating the GstCaps or anything
++ * A pointer to an allocated context is also needed for
++ * optional extra info
++ */
++
++enum CodecID
++gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
++{
++ enum CodecID id = CODEC_ID_NONE;
++ const gchar *mimetype;
++ const GstStructure *structure;
++ gboolean video = FALSE, audio = FALSE; /* we want to be sure! */
++
++ g_return_val_if_fail (caps != NULL, CODEC_ID_NONE);
++ g_return_val_if_fail (gst_caps_get_size (caps) == 1, CODEC_ID_NONE);
++ structure = gst_caps_get_structure (caps, 0);
++
++ mimetype = gst_structure_get_name (structure);
++
++ if (!strcmp (mimetype, "video/x-raw-rgb") ||
++ !strcmp (mimetype, "video/x-raw-yuv")) {
++ id = CODEC_ID_RAWVIDEO;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-raw-int")) {
++ gint depth, width, endianness;
++ gboolean signedness;
++
++ if (gst_structure_get_int (structure, "endianness", &endianness) &&
++ gst_structure_get_boolean (structure, "signed", &signedness) &&
++ gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "depth", &depth) && depth == width) {
++ switch (depth) {
++ case 8:
++ if (signedness) {
++ id = CODEC_ID_PCM_S8;
++ } else {
++ id = CODEC_ID_PCM_U8;
++ }
++ break;
++ case 16:
++ switch (endianness) {
++ case G_BIG_ENDIAN:
++ if (signedness) {
++ id = CODEC_ID_PCM_S16BE;
++ } else {
++ id = CODEC_ID_PCM_U16BE;
++ }
++ break;
++ case G_LITTLE_ENDIAN:
++ if (signedness) {
++ id = CODEC_ID_PCM_S16LE;
++ } else {
++ id = CODEC_ID_PCM_U16LE;
++ }
++ break;
++ }
++ break;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-mulaw")) {
++ id = CODEC_ID_PCM_MULAW;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-alaw")) {
++ id = CODEC_ID_PCM_ALAW;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-dv")) {
++ gboolean sys_strm;
++
++ if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
++ !sys_strm) {
++ id = CODEC_ID_DVVIDEO;
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-dv")) { /* ??? */
++ id = CODEC_ID_DVAUDIO;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h263")) {
++ const gchar *h263version =
++ gst_structure_get_string (structure, "h263version");
++ if (h263version && !strcmp (h263version, "h263p"))
++ id = CODEC_ID_H263P;
++ else
++ id = CODEC_ID_H263;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-intel-h263")) {
++ id = CODEC_ID_H263I;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h261")) {
++ id = CODEC_ID_H261;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/mpeg")) {
++ gboolean sys_strm;
++ gint mpegversion;
++
++ if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
++ gst_structure_get_int (structure, "mpegversion", &mpegversion) &&
++ !sys_strm) {
++ switch (mpegversion) {
++ case 1:
++ id = CODEC_ID_MPEG1VIDEO;
++ break;
++ case 2:
++ id = CODEC_ID_MPEG2VIDEO;
++ break;
++ case 4:
++ id = CODEC_ID_MPEG4;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "image/jpeg")) {
++ id = CODEC_ID_MJPEG; /* A... B... */
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-jpeg-b")) {
++ id = CODEC_ID_MJPEGB;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-wmv")) {
++ gint wmvversion = 0;
++
++ if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
++ switch (wmvversion) {
++ case 1:
++ id = CODEC_ID_WMV1;
++ break;
++ case 2:
++ id = CODEC_ID_WMV2;
++ break;
++ case 3:
++ {
++ guint32 fourcc;
++
++ /* WMV3 unless the fourcc exists and says otherwise */
++ id = CODEC_ID_WMV3;
++
++ if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
++ if ((fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1')) ||
++ (fourcc == GST_MAKE_FOURCC ('W', 'M', 'V', 'A'))) {
++ id = CODEC_ID_VC1;
++ }
++ }
++ }
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-vorbis")) {
++ id = CODEC_ID_VORBIS;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-qdm2")) {
++ id = CODEC_ID_QDM2;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/mpeg")) {
++ gint layer = 0;
++ gint mpegversion = 0;
++
++ if (gst_structure_get_int (structure, "mpegversion", &mpegversion)) {
++ switch (mpegversion) {
++ case 2: /* ffmpeg uses faad for both... */
++ case 4:
++ id = CODEC_ID_AAC;
++ break;
++ case 1:
++ if (gst_structure_get_int (structure, "layer", &layer)) {
++ switch (layer) {
++ case 1:
++ id = CODEC_ID_MP1;
++ break;
++ case 2:
++ id = CODEC_ID_MP2;
++ break;
++ case 3:
++ id = CODEC_ID_MP3;
++ break;
++ }
++ }
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-musepack")) {
++ gint streamversion = -1;
++
++ if (gst_structure_get_int (structure, "streamversion", &streamversion)) {
++ if (streamversion == 7)
++ id = CODEC_ID_MUSEPACK7;
++ } else {
++ id = CODEC_ID_MUSEPACK7;
++ }
++ } else if (!strcmp (mimetype, "audio/x-wma")) {
++ gint wmaversion = 0;
++
++ if (gst_structure_get_int (structure, "wmaversion", &wmaversion)) {
++ switch (wmaversion) {
++ case 1:
++ id = CODEC_ID_WMAV1;
++ break;
++ case 2:
++ id = CODEC_ID_WMAV2;
++ break;
++ case 3:
++ id = CODEC_ID_WMAPRO;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-wms")) {
++ id = CODEC_ID_WMAVOICE;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-ac3")) {
++ id = CODEC_ID_AC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-eac3")) {
++ id = CODEC_ID_EAC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-vnd.sony.atrac3") ||
++ !strcmp (mimetype, "audio/atrac3")) {
++ id = CODEC_ID_ATRAC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-dts")) {
++ id = CODEC_ID_DTS;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "application/x-ape")) {
++ id = CODEC_ID_APE;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-msmpeg")) {
++ gint msmpegversion = 0;
++
++ if (gst_structure_get_int (structure, "msmpegversion", &msmpegversion)) {
++ switch (msmpegversion) {
++ case 41:
++ id = CODEC_ID_MSMPEG4V1;
++ break;
++ case 42:
++ id = CODEC_ID_MSMPEG4V2;
++ break;
++ case 43:
++ id = CODEC_ID_MSMPEG4V3;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-svq")) {
++ gint svqversion = 0;
++
++ if (gst_structure_get_int (structure, "svqversion", &svqversion)) {
++ switch (svqversion) {
++ case 1:
++ id = CODEC_ID_SVQ1;
++ break;
++ case 3:
++ id = CODEC_ID_SVQ3;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-huffyuv")) {
++ id = CODEC_ID_HUFFYUV;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-mace")) {
++ gint maceversion = 0;
++
++ if (gst_structure_get_int (structure, "maceversion", &maceversion)) {
++ switch (maceversion) {
++ case 3:
++ id = CODEC_ID_MACE3;
++ break;
++ case 6:
++ id = CODEC_ID_MACE6;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-theora")) {
++ id = CODEC_ID_THEORA;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp3")) {
++ id = CODEC_ID_VP3;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp5")) {
++ id = CODEC_ID_VP5;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6")) {
++ id = CODEC_ID_VP6;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6-flash")) {
++ id = CODEC_ID_VP6F;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6-alpha")) {
++ id = CODEC_ID_VP6A;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp8")) {
++ id = CODEC_ID_VP8;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-flash-screen")) {
++ id = CODEC_ID_FLASHSV;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-indeo")) {
++ gint indeoversion = 0;
++
++ if (gst_structure_get_int (structure, "indeoversion", &indeoversion)) {
++ switch (indeoversion) {
++ case 5:
++ id = CODEC_ID_INDEO5;
++ break;
++ case 3:
++ id = CODEC_ID_INDEO3;
++ break;
++ case 2:
++ id = CODEC_ID_INDEO2;
++ break;
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "video/x-divx")) {
++ gint divxversion = 0;
++
++ if (gst_structure_get_int (structure, "divxversion", &divxversion)) {
++ switch (divxversion) {
++ case 3:
++ id = CODEC_ID_MSMPEG4V3;
++ break;
++ case 4:
++ case 5:
++ id = CODEC_ID_MPEG4;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-3ivx")) {
++ id = CODEC_ID_MPEG4;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-xvid")) {
++ id = CODEC_ID_MPEG4;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-ffv")) {
++ gint ffvversion = 0;
++
++ if (gst_structure_get_int (structure, "ffvversion", &ffvversion) &&
++ ffvversion == 1) {
++ id = CODEC_ID_FFV1;
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-adpcm")) {
++ const gchar *layout;
++
++ layout = gst_structure_get_string (structure, "layout");
++ if (layout == NULL) {
++ /* break */
++ } else if (!strcmp (layout, "quicktime")) {
++ id = CODEC_ID_ADPCM_IMA_QT;
++ } else if (!strcmp (layout, "microsoft")) {
++ id = CODEC_ID_ADPCM_MS;
++ } else if (!strcmp (layout, "dvi")) {
++ id = CODEC_ID_ADPCM_IMA_WAV;
++ } else if (!strcmp (layout, "4xm")) {
++ id = CODEC_ID_ADPCM_4XM;
++ } else if (!strcmp (layout, "smjpeg")) {
++ id = CODEC_ID_ADPCM_IMA_SMJPEG;
++ } else if (!strcmp (layout, "dk3")) {
++ id = CODEC_ID_ADPCM_IMA_DK3;
++ } else if (!strcmp (layout, "dk4")) {
++ id = CODEC_ID_ADPCM_IMA_DK4;
++ } else if (!strcmp (layout, "westwood")) {
++ id = CODEC_ID_ADPCM_IMA_WS;
++ } else if (!strcmp (layout, "iss")) {
++ id = CODEC_ID_ADPCM_IMA_ISS;
++ } else if (!strcmp (layout, "xa")) {
++ id = CODEC_ID_ADPCM_XA;
++ } else if (!strcmp (layout, "adx")) {
++ id = CODEC_ID_ADPCM_ADX;
++ } else if (!strcmp (layout, "ea")) {
++ id = CODEC_ID_ADPCM_EA;
++ } else if (!strcmp (layout, "g726")) {
++ id = CODEC_ID_ADPCM_G726;
++ } else if (!strcmp (layout, "g721")) {
++ id = CODEC_ID_ADPCM_G726;
++ } else if (!strcmp (layout, "ct")) {
++ id = CODEC_ID_ADPCM_CT;
++ } else if (!strcmp (layout, "swf")) {
++ id = CODEC_ID_ADPCM_SWF;
++ } else if (!strcmp (layout, "yamaha")) {
++ id = CODEC_ID_ADPCM_YAMAHA;
++ } else if (!strcmp (layout, "sbpro2")) {
++ id = CODEC_ID_ADPCM_SBPRO_2;
++ } else if (!strcmp (layout, "sbpro3")) {
++ id = CODEC_ID_ADPCM_SBPRO_3;
++ } else if (!strcmp (layout, "sbpro4")) {
++ id = CODEC_ID_ADPCM_SBPRO_4;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-4xm")) {
++ id = CODEC_ID_4XM;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-dpcm")) {
++ const gchar *layout;
++
++ layout = gst_structure_get_string (structure, "layout");
++ if (!layout) {
++ /* .. */
++ } else if (!strcmp (layout, "roq")) {
++ id = CODEC_ID_ROQ_DPCM;
++ } else if (!strcmp (layout, "interplay")) {
++ id = CODEC_ID_INTERPLAY_DPCM;
++ } else if (!strcmp (layout, "xan")) {
++ id = CODEC_ID_XAN_DPCM;
++ } else if (!strcmp (layout, "sol")) {
++ id = CODEC_ID_SOL_DPCM;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-flac")) {
++ id = CODEC_ID_FLAC;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-shorten")) {
++ id = CODEC_ID_SHORTEN;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-alac")) {
++ id = CODEC_ID_ALAC;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-cinepak")) {
++ id = CODEC_ID_CINEPAK;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-pn-realvideo")) {
++ gint rmversion;
++
++ if (gst_structure_get_int (structure, "rmversion", &rmversion)) {
++ switch (rmversion) {
++ case 1:
++ id = CODEC_ID_RV10;
++ break;
++ case 2:
++ id = CODEC_ID_RV20;
++ break;
++ case 3:
++ id = CODEC_ID_RV30;
++ break;
++ case 4:
++ id = CODEC_ID_RV40;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-sipro")) {
++ id = CODEC_ID_SIPR;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-pn-realaudio")) {
++ gint raversion;
++
++ if (gst_structure_get_int (structure, "raversion", &raversion)) {
++ switch (raversion) {
++ case 1:
++ id = CODEC_ID_RA_144;
++ break;
++ case 2:
++ id = CODEC_ID_RA_288;
++ break;
++ case 8:
++ id = CODEC_ID_COOK;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-rle")) {
++ const gchar *layout;
++
++ if ((layout = gst_structure_get_string (structure, "layout"))) {
++ if (!strcmp (layout, "microsoft")) {
++ id = CODEC_ID_MSRLE;
++ video = TRUE;
++ }
++ }
++ } else if (!strcmp (mimetype, "video/x-xan")) {
++ gint wcversion = 0;
++
++ if ((gst_structure_get_int (structure, "wcversion", &wcversion))) {
++ switch (wcversion) {
++ case 3:
++ id = CODEC_ID_XAN_WC3;
++ video = TRUE;
++ break;
++ case 4:
++ id = CODEC_ID_XAN_WC4;
++ video = TRUE;
++ break;
++ default:
++ break;
++ }
++ }
++ } else if (!strcmp (mimetype, "audio/AMR")) {
++ audio = TRUE;
++ id = CODEC_ID_AMR_NB;
++ } else if (!strcmp (mimetype, "audio/AMR-WB")) {
++ id = CODEC_ID_AMR_WB;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/qcelp")) {
++ id = CODEC_ID_QCELP;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h264")) {
++ id = CODEC_ID_H264;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-flash-video")) {
++ gint flvversion = 0;
++
++ if ((gst_structure_get_int (structure, "flvversion", &flvversion))) {
++ switch (flvversion) {
++ case 1:
++ id = CODEC_ID_FLV1;
++ video = TRUE;
++ break;
++ default:
++ break;
++ }
++ }
++
++ } else if (!strcmp (mimetype, "audio/x-nellymoser")) {
++ id = CODEC_ID_NELLYMOSER;
++ audio = TRUE;
++ } else if (!strncmp (mimetype, "audio/x-gst_ff-", 15)) {
++ gchar ext[16];
++ AVCodec *codec;
++
++ if (strlen (mimetype) <= 30 &&
++ sscanf (mimetype, "audio/x-gst_ff-%s", ext) == 1) {
++ if ((codec = avcodec_find_decoder_by_name (ext)) ||
++ (codec = avcodec_find_encoder_by_name (ext))) {
++ id = codec->id;
++ audio = TRUE;
++ }
++ }
++ } else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
++ gchar ext[16];
++ AVCodec *codec;
++
++ if (strlen (mimetype) <= 30 &&
++ sscanf (mimetype, "video/x-gst_ff-%s", ext) == 1) {
++ if ((codec = avcodec_find_decoder_by_name (ext)) ||
++ (codec = avcodec_find_encoder_by_name (ext))) {
++ id = codec->id;
++ video = TRUE;
++ }
++ }
++ }
++
++ if (context != NULL) {
++ if (video == TRUE) {
++ context->codec_type = AVMEDIA_TYPE_VIDEO;
++ } else if (audio == TRUE) {
++ context->codec_type = AVMEDIA_TYPE_AUDIO;
++ } else {
++ context->codec_type = AVMEDIA_TYPE_UNKNOWN;
++ }
++ context->codec_id = id;
++ gst_ffmpeg_caps_with_codecid (id, context->codec_type, caps, context);
++ }
++
++ if (id != CODEC_ID_NONE) {
++ GST_DEBUG ("The id=%d belongs to the caps %" GST_PTR_FORMAT, id, caps);
++ } else {
++ GST_WARNING ("Couldn't figure out the id for caps %" GST_PTR_FORMAT, caps);
++ }
++
++ return id;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej 2014-08-08 15:31:06.055868246 +0200
+@@ -0,0 +1,12 @@
++--- ext/ffmpeg/gstffmpegcodecmap.c
+++++ ext/ffmpeg/gstffmpegcodecmap.c
++@@ -1884,9 +1842,6 @@
++ gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, "endianness",
++ G_TYPE_INT, endianness, NULL);
++- if (caps && context) {
++- gst_ffmpeg_set_palette (caps, context);
++- }
++ }
++ } else if (fmt) {
++ caps = gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-yuv",
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c 2014-08-08 14:46:31.462772351 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c 2014-08-08 15:32:18.608870847 +0200
+@@ -88,7 +88,6 @@
+ gint depth;
+ } audio;
+ } format;
+- gboolean waiting_for_key;
+ gboolean discont;
+ gboolean clear_ts;
+
+@@ -438,7 +437,6 @@
+ ffmpegdec->pcache = NULL;
+ ffmpegdec->par = NULL;
+ ffmpegdec->opened = FALSE;
+- ffmpegdec->waiting_for_key = TRUE;
+ ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
+ ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
+ ffmpegdec->do_padding = DEFAULT_DO_PADDING;
+@@ -608,11 +606,6 @@
+ gst_ffmpeg_avcodec_close (ffmpegdec->context);
+ ffmpegdec->opened = FALSE;
+
+- if (ffmpegdec->context->palctrl) {
+- av_free (ffmpegdec->context->palctrl);
+- ffmpegdec->context->palctrl = NULL;
+- }
+-
+ if (ffmpegdec->context->extradata) {
+ av_free (ffmpegdec->context->extradata);
+ ffmpegdec->context->extradata = NULL;
+@@ -864,7 +857,7 @@
+
+ /* workaround encoder bugs */
+ ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
+- ffmpegdec->context->error_recognition = 1;
++ ffmpegdec->context->err_recognition = 1;
+
+ /* for slow cpus */
+ ffmpegdec->context->lowres = ffmpegdec->lowres;
+@@ -944,7 +937,7 @@
+ fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
+ width, height);
+
+- if (!ffmpegdec->context->palctrl && ffmpegdec->can_allocate_aligned) {
++ if (ffmpegdec->can_allocate_aligned) {
+ GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
+ /* no pallete, we can use the buffer size to alloc */
+ ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
+@@ -1083,7 +1076,6 @@
+ /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
+ * the opaque data. */
+ picture->type = FF_BUFFER_TYPE_USER;
+- picture->age = 256 * 256 * 256 * 64;
+ picture->opaque = buf;
+
+ #ifdef EXTRA_REF
+@@ -1414,10 +1406,6 @@
+ } else {
+ if (diff >= 0) {
+ /* we're too slow, try to speed up */
+- if (ffmpegdec->waiting_for_key) {
+- /* we were waiting for a keyframe, that's ok */
+- goto skipping;
+- }
+ /* switch to skip_frame mode */
+ goto skip_frame;
+ }
+@@ -1427,11 +1415,6 @@
+ ffmpegdec->processed++;
+ return TRUE;
+
+-skipping:
+- {
+- res = FALSE;
+- goto drop_qos;
+- }
+ normal_mode:
+ {
+ if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
+@@ -1528,43 +1511,6 @@
+ }
+
+
+-/* figure out if the current picture is a keyframe, return TRUE if that is
+- * the case. */
+-static gboolean
+-check_keyframe (GstFFMpegDec * ffmpegdec)
+-{
+- GstFFMpegDecClass *oclass;
+- gboolean is_itype = FALSE;
+- gboolean is_reference = FALSE;
+- gboolean iskeyframe;
+-
+- /* figure out if we are dealing with a keyframe */
+- oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
+-
+- /* remember that we have B frames, we need this for the DTS -> PTS conversion
+- * code */
+- if (!ffmpegdec->has_b_frames && ffmpegdec->picture->pict_type == FF_B_TYPE) {
+- GST_DEBUG_OBJECT (ffmpegdec, "we have B frames");
+- ffmpegdec->has_b_frames = TRUE;
+- }
+-
+- is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
+- is_reference = (ffmpegdec->picture->reference == 1);
+-
+- iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
+- || (oclass->in_plugin->id == CODEC_ID_INDEO3)
+- || (oclass->in_plugin->id == CODEC_ID_MSZH)
+- || (oclass->in_plugin->id == CODEC_ID_ZLIB)
+- || (oclass->in_plugin->id == CODEC_ID_VP3)
+- || (oclass->in_plugin->id == CODEC_ID_HUFFYUV);
+-
+- GST_LOG_OBJECT (ffmpegdec,
+- "current picture: type: %d, is_keyframe:%d, is_itype:%d, is_reference:%d",
+- ffmpegdec->picture->pict_type, iskeyframe, is_itype, is_reference);
+-
+- return iskeyframe;
+-}
+-
+ /* get an outbuf buffer with the current picture */
+ static GstFlowReturn
+ get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
+@@ -1694,7 +1640,6 @@
+ {
+ gint len = -1;
+ gint have_data;
+- gboolean iskeyframe;
+ gboolean mode_switch;
+ gboolean decode;
+ gint skip_frame = AVDISCARD_DEFAULT;
+@@ -1809,7 +1754,6 @@
+ gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
+ }
+
+-
+ /* Whether a frame is interlaced or not is unknown at the time of
+ buffer allocation, so caps on the buffer in opaque will have
+ the previous frame's interlaced flag set. So if interlacedness
+@@ -1831,10 +1775,6 @@
+ }
+ }
+
+- /* check if we are dealing with a keyframe here, this will also check if we
+- * are dealing with B frames. */
+- iskeyframe = check_keyframe (ffmpegdec);
+-
+ /* check that the timestamps go upwards */
+ if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
+ /* timestamps go backwards, this means frames were reordered and we must
+@@ -1865,7 +1805,7 @@
+ * timestamps */
+ if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
+ /* PTS and DTS are the same for keyframes */
+- if (!iskeyframe && ffmpegdec->next_out != -1) {
++ if (ffmpegdec->next_out != -1) {
+ /* interpolate all timestamps except for keyframes, FIXME, this is
+ * wrong when QoS is active. */
+ GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
+@@ -1874,16 +1814,6 @@
+ }
+ }
+
+- /* when we're waiting for a keyframe, see if we have one or drop the current
+- * non-keyframe */
+- if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
+- if (G_LIKELY (!iskeyframe))
+- goto drop_non_keyframe;
+-
+- /* we have a keyframe, we can stop waiting for one */
+- ffmpegdec->waiting_for_key = FALSE;
+- }
+-
+ /* get a handle to the output buffer */
+ *ret = get_output_buffer (ffmpegdec, outbuf);
+ if (G_UNLIKELY (*ret != GST_FLOW_OK))
+@@ -2000,20 +1930,11 @@
+ else
+ ffmpegdec->next_out = -1;
+
+- /* palette is not part of raw video frame in gst and the size
+- * of the outgoing buffer needs to be adjusted accordingly */
+- if (ffmpegdec->context->palctrl != NULL)
+- GST_BUFFER_SIZE (*outbuf) -= AVPALETTE_SIZE;
+-
+ /* now see if we need to clip the buffer against the segment boundaries. */
+ if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
+ out_duration)))
+ goto clipped;
+
+- /* mark as keyframe or delta unit */
+- if (!iskeyframe)
+- GST_BUFFER_FLAG_SET (*outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
+-
+ if (ffmpegdec->picture->top_field_first)
+ GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
+
+@@ -2024,11 +1945,6 @@
+ return len;
+
+ /* special cases */
+-drop_non_keyframe:
+- {
+- GST_WARNING_OBJECT (ffmpegdec, "Dropping non-keyframe (seek/init)");
+- goto beach;
+- }
+ no_output:
+ {
+ GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
+@@ -2422,7 +2338,6 @@
+ gst_ffmpegdec_reset_ts (ffmpegdec);
+ gst_ffmpegdec_reset_qos (ffmpegdec);
+ gst_ffmpegdec_flush_pcache (ffmpegdec);
+- ffmpegdec->waiting_for_key = TRUE;
+ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
+ clear_queued (ffmpegdec);
+ break;
+@@ -2560,17 +2475,6 @@
+
+ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
+
+- /* do early keyframe check pretty bad to rely on the keyframe flag in the
+- * source for this as it might not even be parsed (UDP/file/..). */
+- if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
+- GST_DEBUG_OBJECT (ffmpegdec, "waiting for keyframe");
+- if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DELTA_UNIT) &&
+- oclass->in_plugin->type != AVMEDIA_TYPE_AUDIO)
+- goto skip_keyframe;
+-
+- GST_DEBUG_OBJECT (ffmpegdec, "got keyframe");
+- ffmpegdec->waiting_for_key = FALSE;
+- }
+ /* parse cache joining. If there is cached data */
+ if (ffmpegdec->pcache) {
+ /* join with previous data */
+@@ -2805,12 +2709,6 @@
+ gst_buffer_unref (inbuf);
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+-skip_keyframe:
+- {
+- GST_DEBUG_OBJECT (ffmpegdec, "skipping non keyframe");
+- gst_buffer_unref (inbuf);
+- return GST_FLOW_OK;
+- }
+ }
+
+ static GstStateChangeReturn
+@@ -2936,7 +2834,7 @@
+ gchar *plugin_name;
+
+ /* only decoders */
+- if (!in_plugin->decode) {
++ if (!av_codec_is_decoder (in_plugin)) {
+ goto next;
+ }
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig 2014-08-08 15:31:06.057868246 +0200
+@@ -0,0 +1,2973 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <assert.h>
++#include <string.h>
++
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#else
++#include <libavcodec/avcodec.h>
++#endif
++
++#include <gst/gst.h>
++#include <gst/video/video.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++#include "gstffmpegutils.h"
++
++/* define to enable alternative buffer refcounting algorithm */
++#undef EXTRA_REF
++
++typedef struct _GstFFMpegDec GstFFMpegDec;
++
++#define MAX_TS_MASK 0xff
++
++/* for each incomming buffer we keep all timing info in a structure like this.
++ * We keep a circular array of these structures around to store the timing info.
++ * The index in the array is what we pass as opaque data (to pictures) and
++ * pts (to parsers) so that ffmpeg can remember them for us. */
++typedef struct
++{
++ gint idx;
++ GstClockTime timestamp;
++ GstClockTime duration;
++ gint64 offset;
++} GstTSInfo;
++
++struct _GstFFMpegDec
++{
++ GstElement element;
++
++ /* We need to keep track of our pads, so we do so here. */
++ GstPad *srcpad;
++ GstPad *sinkpad;
++
++ /* decoding */
++ AVCodecContext *context;
++ AVFrame *picture;
++ gboolean opened;
++ union
++ {
++ struct
++ {
++ gint width, height;
++ gint clip_width, clip_height;
++ gint par_n, par_d;
++ gint fps_n, fps_d;
++ gint old_fps_n, old_fps_d;
++ gboolean interlaced;
++
++ enum PixelFormat pix_fmt;
++ } video;
++ struct
++ {
++ gint channels;
++ gint samplerate;
++ gint depth;
++ } audio;
++ } format;
++ gboolean discont;
++ gboolean clear_ts;
++
++ /* for tracking DTS/PTS */
++ gboolean has_b_frames;
++ gboolean reordered_in;
++ GstClockTime last_in;
++ GstClockTime last_diff;
++ guint last_frames;
++ gboolean reordered_out;
++ GstClockTime last_out;
++ GstClockTime next_out;
++
++ /* parsing */
++ gboolean turnoff_parser; /* used for turning off aac raw parsing
++ * See bug #566250 */
++ AVCodecParserContext *pctx;
++ GstBuffer *pcache;
++ guint8 *padded;
++ guint padded_size;
++
++ GValue *par; /* pixel aspect ratio of incoming data */
++ gboolean current_dr; /* if direct rendering is enabled */
++ gboolean extra_ref; /* keep extra ref around in get/release */
++
++ /* some properties */
++ enum AVDiscard skip_frame;
++ gint lowres;
++ gboolean direct_rendering;
++ gboolean do_padding;
++ gboolean debug_mv;
++ gboolean crop;
++ int max_threads;
++
++ /* QoS stuff *//* with LOCK */
++ gdouble proportion;
++ GstClockTime earliest_time;
++ gint64 processed;
++ gint64 dropped;
++
++ /* clipping segment */
++ GstSegment segment;
++
++ gboolean is_realvideo;
++
++ GstTSInfo ts_info[MAX_TS_MASK + 1];
++ gint ts_idx;
++
++ /* reverse playback queue */
++ GList *queued;
++
++ /* Can downstream allocate 16bytes aligned data. */
++ gboolean can_allocate_aligned;
++};
++
++typedef struct _GstFFMpegDecClass GstFFMpegDecClass;
++
++struct _GstFFMpegDecClass
++{
++ GstElementClass parent_class;
++
++ AVCodec *in_plugin;
++ GstPadTemplate *srctempl, *sinktempl;
++};
++
++#define GST_TS_INFO_NONE &ts_info_none
++static const GstTSInfo ts_info_none = { -1, -1, -1, -1 };
++
++static const GstTSInfo *
++gst_ts_info_store (GstFFMpegDec * dec, GstClockTime timestamp,
++ GstClockTime duration, gint64 offset)
++{
++ gint idx = dec->ts_idx;
++ dec->ts_info[idx].idx = idx;
++ dec->ts_info[idx].timestamp = timestamp;
++ dec->ts_info[idx].duration = duration;
++ dec->ts_info[idx].offset = offset;
++ dec->ts_idx = (idx + 1) & MAX_TS_MASK;
++
++ return &dec->ts_info[idx];
++}
++
++static const GstTSInfo *
++gst_ts_info_get (GstFFMpegDec * dec, gint idx)
++{
++ if (G_UNLIKELY (idx < 0 || idx > MAX_TS_MASK))
++ return GST_TS_INFO_NONE;
++
++ return &dec->ts_info[idx];
++}
++
++#define GST_TYPE_FFMPEGDEC \
++ (gst_ffmpegdec_get_type())
++#define GST_FFMPEGDEC(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGDEC,GstFFMpegDec))
++#define GST_FFMPEGDEC_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGDEC,GstFFMpegDecClass))
++#define GST_IS_FFMPEGDEC(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGDEC))
++#define GST_IS_FFMPEGDEC_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEC))
++
++#define DEFAULT_LOWRES 0
++#define DEFAULT_SKIPFRAME 0
++#define DEFAULT_DIRECT_RENDERING TRUE
++#define DEFAULT_DO_PADDING TRUE
++#define DEFAULT_DEBUG_MV FALSE
++#define DEFAULT_CROP TRUE
++#define DEFAULT_MAX_THREADS 1
++
++enum
++{
++ PROP_0,
++ PROP_LOWRES,
++ PROP_SKIPFRAME,
++ PROP_DIRECT_RENDERING,
++ PROP_DO_PADDING,
++ PROP_DEBUG_MV,
++ PROP_CROP,
++ PROP_MAX_THREADS,
++ PROP_LAST
++};
++
++/* A number of function prototypes are given so we can refer to them later. */
++static void gst_ffmpegdec_base_init (GstFFMpegDecClass * klass);
++static void gst_ffmpegdec_class_init (GstFFMpegDecClass * klass);
++static void gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec);
++static void gst_ffmpegdec_finalize (GObject * object);
++
++static gboolean gst_ffmpegdec_query (GstPad * pad, GstQuery * query);
++static gboolean gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event);
++
++static gboolean gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps);
++static gboolean gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event);
++static GstFlowReturn gst_ffmpegdec_chain (GstPad * pad, GstBuffer * buf);
++
++static GstStateChangeReturn gst_ffmpegdec_change_state (GstElement * element,
++ GstStateChange transition);
++
++static void gst_ffmpegdec_set_property (GObject * object,
++ guint prop_id, const GValue * value, GParamSpec * pspec);
++static void gst_ffmpegdec_get_property (GObject * object,
++ guint prop_id, GValue * value, GParamSpec * pspec);
++
++static gboolean gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec,
++ gboolean force);
++
++/* some sort of bufferpool handling, but different */
++static int gst_ffmpegdec_get_buffer (AVCodecContext * context,
++ AVFrame * picture);
++static void gst_ffmpegdec_release_buffer (AVCodecContext * context,
++ AVFrame * picture);
++
++static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
++
++#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("ffdec-params")
++
++static GstElementClass *parent_class = NULL;
++
++#define GST_FFMPEGDEC_TYPE_LOWRES (gst_ffmpegdec_lowres_get_type())
++static GType
++gst_ffmpegdec_lowres_get_type (void)
++{
++ static GType ffmpegdec_lowres_type = 0;
++
++ if (!ffmpegdec_lowres_type) {
++ static const GEnumValue ffmpegdec_lowres[] = {
++ {0, "0", "full"},
++ {1, "1", "1/2-size"},
++ {2, "2", "1/4-size"},
++ {0, NULL, NULL},
++ };
++
++ ffmpegdec_lowres_type =
++ g_enum_register_static ("GstFFMpegDecLowres", ffmpegdec_lowres);
++ }
++
++ return ffmpegdec_lowres_type;
++}
++
++#define GST_FFMPEGDEC_TYPE_SKIPFRAME (gst_ffmpegdec_skipframe_get_type())
++static GType
++gst_ffmpegdec_skipframe_get_type (void)
++{
++ static GType ffmpegdec_skipframe_type = 0;
++
++ if (!ffmpegdec_skipframe_type) {
++ static const GEnumValue ffmpegdec_skipframe[] = {
++ {0, "0", "Skip nothing"},
++ {1, "1", "Skip B-frames"},
++ {2, "2", "Skip IDCT/Dequantization"},
++ {5, "5", "Skip everything"},
++ {0, NULL, NULL},
++ };
++
++ ffmpegdec_skipframe_type =
++ g_enum_register_static ("GstFFMpegDecSkipFrame", ffmpegdec_skipframe);
++ }
++
++ return ffmpegdec_skipframe_type;
++}
++
++static void
++gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
++{
++ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
++ GstPadTemplate *sinktempl, *srctempl;
++ GstCaps *sinkcaps, *srccaps;
++ AVCodec *in_plugin;
++ gchar *longname, *classification, *description;
++
++ in_plugin =
++ (AVCodec *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
++ GST_FFDEC_PARAMS_QDATA);
++ g_assert (in_plugin != NULL);
++
++ /* construct the element details struct */
++ longname = g_strdup_printf ("FFmpeg %s decoder", in_plugin->long_name);
++ classification = g_strdup_printf ("Codec/Decoder/%s",
++ (in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
++ description = g_strdup_printf ("FFmpeg %s decoder", in_plugin->name);
++ gst_element_class_set_details_simple (element_class, longname, classification,
++ description,
++ "Wim Taymans <wim.taymans@gmail.com>, "
++ "Ronald Bultje <rbultje@ronald.bitfreak.net>, "
++ "Edward Hervey <bilboed@bilboed.com>");
++ g_free (longname);
++ g_free (classification);
++ g_free (description);
++
++ /* get the caps */
++ sinkcaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, FALSE);
++ if (!sinkcaps) {
++ GST_DEBUG ("Couldn't get sink caps for decoder '%s'", in_plugin->name);
++ sinkcaps = gst_caps_from_string ("unknown/unknown");
++ }
++ if (in_plugin->type == AVMEDIA_TYPE_VIDEO) {
++ srccaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv");
++ } else {
++ srccaps = gst_ffmpeg_codectype_to_audio_caps (NULL,
++ in_plugin->id, FALSE, in_plugin);
++ }
++ if (!srccaps) {
++ GST_DEBUG ("Couldn't get source caps for decoder '%s'", in_plugin->name);
++ srccaps = gst_caps_from_string ("unknown/unknown");
++ }
++
++ /* pad templates */
++ sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK,
++ GST_PAD_ALWAYS, sinkcaps);
++ srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
++
++ gst_element_class_add_pad_template (element_class, srctempl);
++ gst_element_class_add_pad_template (element_class, sinktempl);
++
++ klass->in_plugin = in_plugin;
++ klass->srctempl = srctempl;
++ klass->sinktempl = sinktempl;
++}
++
++static void
++gst_ffmpegdec_class_init (GstFFMpegDecClass * klass)
++{
++ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
++ GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
++
++ parent_class = g_type_class_peek_parent (klass);
++
++ gobject_class->finalize = gst_ffmpegdec_finalize;
++
++ gobject_class->set_property = gst_ffmpegdec_set_property;
++ gobject_class->get_property = gst_ffmpegdec_get_property;
++
++ if (klass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
++ int caps;
++
++ g_object_class_install_property (gobject_class, PROP_SKIPFRAME,
++ g_param_spec_enum ("skip-frame", "Skip frames",
++ "Which types of frames to skip during decoding",
++ GST_FFMPEGDEC_TYPE_SKIPFRAME, 0,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_LOWRES,
++ g_param_spec_enum ("lowres", "Low resolution",
++ "At which resolution to decode images", GST_FFMPEGDEC_TYPE_LOWRES,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DIRECT_RENDERING,
++ g_param_spec_boolean ("direct-rendering", "Direct Rendering",
++ "Enable direct rendering", DEFAULT_DIRECT_RENDERING,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DO_PADDING,
++ g_param_spec_boolean ("do-padding", "Do Padding",
++ "Add 0 padding before decoding data", DEFAULT_DO_PADDING,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DEBUG_MV,
++ g_param_spec_boolean ("debug-mv", "Debug motion vectors",
++ "Whether ffmpeg should print motion vectors on top of the image",
++ DEFAULT_DEBUG_MV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++#if 0
++ g_object_class_install_property (gobject_class, PROP_CROP,
++ g_param_spec_boolean ("crop", "Crop",
++ "Crop images to the display region",
++ DEFAULT_CROP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++#endif
++
++ caps = klass->in_plugin->capabilities;
++ if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
++ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS,
++ g_param_spec_int ("max-threads", "Maximum decode threads",
++ "Maximum number of worker threads to spawn. (0 = auto)",
++ 0, G_MAXINT, DEFAULT_MAX_THREADS,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ }
++ }
++
++ gstelement_class->change_state = gst_ffmpegdec_change_state;
++}
++
++static void
++gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ /* setup pads */
++ ffmpegdec->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
++ gst_pad_set_setcaps_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_setcaps));
++ gst_pad_set_event_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_sink_event));
++ gst_pad_set_chain_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_chain));
++ gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
++
++ ffmpegdec->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
++ gst_pad_use_fixed_caps (ffmpegdec->srcpad);
++ gst_pad_set_event_function (ffmpegdec->srcpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_src_event));
++ gst_pad_set_query_function (ffmpegdec->srcpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_query));
++ gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
++
++ /* some ffmpeg data */
++ ffmpegdec->context = avcodec_alloc_context ();
++ ffmpegdec->picture = avcodec_alloc_frame ();
++ ffmpegdec->pctx = NULL;
++ ffmpegdec->pcache = NULL;
++ ffmpegdec->par = NULL;
++ ffmpegdec->opened = FALSE;
++ ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
++ ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
++ ffmpegdec->do_padding = DEFAULT_DO_PADDING;
++ ffmpegdec->debug_mv = DEFAULT_DEBUG_MV;
++ ffmpegdec->crop = DEFAULT_CROP;
++ ffmpegdec->max_threads = DEFAULT_MAX_THREADS;
++
++ ffmpegdec->format.video.par_n = -1;
++ ffmpegdec->format.video.fps_n = -1;
++ ffmpegdec->format.video.old_fps_n = -1;
++ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
++
++ /* We initially assume downstream can allocate 16 bytes aligned buffers */
++ ffmpegdec->can_allocate_aligned = TRUE;
++}
++
++static void
++gst_ffmpegdec_finalize (GObject * object)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ if (ffmpegdec->context != NULL) {
++ av_free (ffmpegdec->context);
++ ffmpegdec->context = NULL;
++ }
++
++ if (ffmpegdec->picture != NULL) {
++ av_free (ffmpegdec->picture);
++ ffmpegdec->picture = NULL;
++ }
++
++ G_OBJECT_CLASS (parent_class)->finalize (object);
++}
++
++static gboolean
++gst_ffmpegdec_query (GstPad * pad, GstQuery * query)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstPad *peer;
++ gboolean res;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ res = FALSE;
++
++ if ((peer = gst_pad_get_peer (ffmpegdec->sinkpad))) {
++ /* just forward to peer */
++ res = gst_pad_query (peer, query);
++ gst_object_unref (peer);
++ }
++#if 0
++ {
++ GstFormat bfmt;
++
++ bfmt = GST_FORMAT_BYTES;
++
++ /* ok, do bitrate calc... */
++ if ((type != GST_QUERY_POSITION && type != GST_QUERY_TOTAL) ||
++ *fmt != GST_FORMAT_TIME || ffmpegdec->context->bit_rate == 0 ||
++ !gst_pad_query (peer, type, &bfmt, value))
++ return FALSE;
++
++ if (ffmpegdec->pcache && type == GST_QUERY_POSITION)
++ *value -= GST_BUFFER_SIZE (ffmpegdec->pcache);
++ *value *= GST_SECOND / ffmpegdec->context->bit_rate;
++ }
++#endif
++
++ gst_object_unref (ffmpegdec);
++
++ return res;
++}
++
++static void
++gst_ffmpegdec_reset_ts (GstFFMpegDec * ffmpegdec)
++{
++ ffmpegdec->last_in = GST_CLOCK_TIME_NONE;
++ ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
++ ffmpegdec->last_frames = 0;
++ ffmpegdec->last_out = GST_CLOCK_TIME_NONE;
++ ffmpegdec->next_out = GST_CLOCK_TIME_NONE;
++ ffmpegdec->reordered_in = FALSE;
++ ffmpegdec->reordered_out = FALSE;
++}
++
++static void
++gst_ffmpegdec_update_qos (GstFFMpegDec * ffmpegdec, gdouble proportion,
++ GstClockTime timestamp)
++{
++ GST_LOG_OBJECT (ffmpegdec, "update QOS: %f, %" GST_TIME_FORMAT,
++ proportion, GST_TIME_ARGS (timestamp));
++
++ GST_OBJECT_LOCK (ffmpegdec);
++ ffmpegdec->proportion = proportion;
++ ffmpegdec->earliest_time = timestamp;
++ GST_OBJECT_UNLOCK (ffmpegdec);
++}
++
++static void
++gst_ffmpegdec_reset_qos (GstFFMpegDec * ffmpegdec)
++{
++ gst_ffmpegdec_update_qos (ffmpegdec, 0.5, GST_CLOCK_TIME_NONE);
++ ffmpegdec->processed = 0;
++ ffmpegdec->dropped = 0;
++}
++
++static void
++gst_ffmpegdec_read_qos (GstFFMpegDec * ffmpegdec, gdouble * proportion,
++ GstClockTime * timestamp)
++{
++ GST_OBJECT_LOCK (ffmpegdec);
++ *proportion = ffmpegdec->proportion;
++ *timestamp = ffmpegdec->earliest_time;
++ GST_OBJECT_UNLOCK (ffmpegdec);
++}
++
++static gboolean
++gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegDec *ffmpegdec;
++ gboolean res;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_QOS:
++ {
++ gdouble proportion;
++ GstClockTimeDiff diff;
++ GstClockTime timestamp;
++
++ gst_event_parse_qos (event, &proportion, &diff, &timestamp);
++
++ /* update our QoS values */
++ gst_ffmpegdec_update_qos (ffmpegdec, proportion, timestamp + diff);
++
++ /* forward upstream */
++ res = gst_pad_push_event (ffmpegdec->sinkpad, event);
++ break;
++ }
++ default:
++ /* forward upstream */
++ res = gst_pad_push_event (ffmpegdec->sinkpad, event);
++ break;
++ }
++
++ gst_object_unref (ffmpegdec);
++
++ return res;
++}
++
++/* with LOCK */
++static void
++gst_ffmpegdec_close (GstFFMpegDec * ffmpegdec)
++{
++ if (!ffmpegdec->opened)
++ return;
++
++ GST_LOG_OBJECT (ffmpegdec, "closing ffmpeg codec");
++
++ if (ffmpegdec->par) {
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = NULL;
++ }
++
++ if (ffmpegdec->context->priv_data)
++ gst_ffmpeg_avcodec_close (ffmpegdec->context);
++ ffmpegdec->opened = FALSE;
++
++ if (ffmpegdec->context->extradata) {
++ av_free (ffmpegdec->context->extradata);
++ ffmpegdec->context->extradata = NULL;
++ }
++
++ if (ffmpegdec->pctx) {
++ if (ffmpegdec->pcache) {
++ gst_buffer_unref (ffmpegdec->pcache);
++ ffmpegdec->pcache = NULL;
++ }
++ av_parser_close (ffmpegdec->pctx);
++ ffmpegdec->pctx = NULL;
++ }
++
++ ffmpegdec->format.video.par_n = -1;
++ ffmpegdec->format.video.fps_n = -1;
++ ffmpegdec->format.video.old_fps_n = -1;
++ ffmpegdec->format.video.interlaced = FALSE;
++}
++
++/* with LOCK */
++static gboolean
++gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ if (gst_ffmpeg_avcodec_open (ffmpegdec->context, oclass->in_plugin) < 0)
++ goto could_not_open;
++
++ ffmpegdec->opened = TRUE;
++ ffmpegdec->is_realvideo = FALSE;
++
++ GST_LOG_OBJECT (ffmpegdec, "Opened ffmpeg codec %s, id %d",
++ oclass->in_plugin->name, oclass->in_plugin->id);
++
++ /* open a parser if we can */
++ switch (oclass->in_plugin->id) {
++ case CODEC_ID_MPEG4:
++ case CODEC_ID_MJPEG:
++ case CODEC_ID_VC1:
++ GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
++ ffmpegdec->pctx = NULL;
++ break;
++ case CODEC_ID_H264:
++ /* For H264, only use a parser if there is no context data, if there is,
++ * we're talking AVC */
++ if (ffmpegdec->context->extradata_size == 0) {
++ GST_LOG_OBJECT (ffmpegdec, "H264 with no extradata, creating parser");
++ ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
++ } else {
++ GST_LOG_OBJECT (ffmpegdec,
++ "H264 with extradata implies framed data - not using parser");
++ ffmpegdec->pctx = NULL;
++ }
++ break;
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV40:
++ ffmpegdec->is_realvideo = TRUE;
++ break;
++ default:
++ if (!ffmpegdec->turnoff_parser) {
++ ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
++ if (ffmpegdec->pctx)
++ GST_LOG_OBJECT (ffmpegdec, "Using parser %p", ffmpegdec->pctx);
++ else
++ GST_LOG_OBJECT (ffmpegdec, "No parser for codec");
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "Parser deactivated for format");
++ }
++ break;
++ }
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ ffmpegdec->format.video.width = 0;
++ ffmpegdec->format.video.height = 0;
++ ffmpegdec->format.video.clip_width = -1;
++ ffmpegdec->format.video.clip_height = -1;
++ ffmpegdec->format.video.pix_fmt = PIX_FMT_NB;
++ ffmpegdec->format.video.interlaced = FALSE;
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ ffmpegdec->format.audio.samplerate = 0;
++ ffmpegdec->format.audio.channels = 0;
++ ffmpegdec->format.audio.depth = 0;
++ break;
++ default:
++ break;
++ }
++
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ /* FIXME, reset_qos holds the LOCK */
++ ffmpegdec->proportion = 0.0;
++ ffmpegdec->earliest_time = -1;
++
++ return TRUE;
++
++ /* ERRORS */
++could_not_open:
++ {
++ gst_ffmpegdec_close (ffmpegdec);
++ GST_DEBUG_OBJECT (ffmpegdec, "ffdec_%s: Failed to open FFMPEG codec",
++ oclass->in_plugin->name);
++ return FALSE;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstFFMpegDecClass *oclass;
++ GstStructure *structure;
++ const GValue *par;
++ const GValue *fps;
++ gboolean ret = TRUE;
++
++ ffmpegdec = (GstFFMpegDec *) (gst_pad_get_parent (pad));
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ GST_DEBUG_OBJECT (pad, "setcaps called");
++
++ GST_OBJECT_LOCK (ffmpegdec);
++
++ /* stupid check for VC1 */
++ if ((oclass->in_plugin->id == CODEC_ID_WMV3) ||
++ (oclass->in_plugin->id == CODEC_ID_VC1))
++ oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (caps, NULL);
++
++ /* close old session */
++ if (ffmpegdec->opened) {
++ GST_OBJECT_UNLOCK (ffmpegdec);
++ gst_ffmpegdec_drain (ffmpegdec);
++ GST_OBJECT_LOCK (ffmpegdec);
++ gst_ffmpegdec_close (ffmpegdec);
++
++ /* and reset the defaults that were set when a context is created */
++ avcodec_get_context_defaults (ffmpegdec->context);
++ }
++
++ /* set buffer functions */
++ ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
++ ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
++ ffmpegdec->context->draw_horiz_band = NULL;
++
++ /* default is to let format decide if it needs a parser */
++ ffmpegdec->turnoff_parser = FALSE;
++
++ ffmpegdec->has_b_frames = FALSE;
++
++ GST_LOG_OBJECT (ffmpegdec, "size %dx%d", ffmpegdec->context->width,
++ ffmpegdec->context->height);
++
++ /* get size and so */
++ gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
++ oclass->in_plugin->type, caps, ffmpegdec->context);
++
++ GST_LOG_OBJECT (ffmpegdec, "size after %dx%d", ffmpegdec->context->width,
++ ffmpegdec->context->height);
++
++ if (!ffmpegdec->context->time_base.den || !ffmpegdec->context->time_base.num) {
++ GST_DEBUG_OBJECT (ffmpegdec, "forcing 25/1 framerate");
++ ffmpegdec->context->time_base.num = 1;
++ ffmpegdec->context->time_base.den = 25;
++ }
++
++ /* get pixel aspect ratio if it's set */
++ structure = gst_caps_get_structure (caps, 0);
++
++ par = gst_structure_get_value (structure, "pixel-aspect-ratio");
++ if (par) {
++ GST_DEBUG_OBJECT (ffmpegdec, "sink caps have pixel-aspect-ratio of %d:%d",
++ gst_value_get_fraction_numerator (par),
++ gst_value_get_fraction_denominator (par));
++ /* should be NULL */
++ if (ffmpegdec->par)
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = g_new0 (GValue, 1);
++ gst_value_init_and_copy (ffmpegdec->par, par);
++ }
++
++ /* get the framerate from incoming caps. fps_n is set to -1 when
++ * there is no valid framerate */
++ fps = gst_structure_get_value (structure, "framerate");
++ if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
++ ffmpegdec->format.video.fps_n = gst_value_get_fraction_numerator (fps);
++ ffmpegdec->format.video.fps_d = gst_value_get_fraction_denominator (fps);
++ GST_DEBUG_OBJECT (ffmpegdec, "Using framerate %d/%d from incoming caps",
++ ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
++ } else {
++ ffmpegdec->format.video.fps_n = -1;
++ GST_DEBUG_OBJECT (ffmpegdec, "Using framerate from codec");
++ }
++
++ /* figure out if we can use direct rendering */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = FALSE;
++ if (ffmpegdec->direct_rendering) {
++ GST_DEBUG_OBJECT (ffmpegdec, "trying to enable direct rendering");
++ if (oclass->in_plugin->capabilities & CODEC_CAP_DR1) {
++ if (oclass->in_plugin->id == CODEC_ID_H264) {
++ GST_DEBUG_OBJECT (ffmpegdec, "disable direct rendering setup for H264");
++ /* does not work, many stuff reads outside of the planes */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = TRUE;
++ } else if ((oclass->in_plugin->id == CODEC_ID_SVQ1) ||
++ (oclass->in_plugin->id == CODEC_ID_VP5) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6F) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6A)) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "disable direct rendering setup for broken stride support");
++ /* does not work, uses a incompatible stride. See #610613 */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = TRUE;
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "enabled direct rendering");
++ ffmpegdec->current_dr = TRUE;
++ }
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "direct rendering not supported");
++ }
++ }
++ if (ffmpegdec->current_dr) {
++ /* do *not* draw edges when in direct rendering, for some reason it draws
++ * outside of the memory. */
++ ffmpegdec->context->flags |= CODEC_FLAG_EMU_EDGE;
++ }
++
++ /* for AAC we only use av_parse if not on stream-format==raw or ==loas */
++ if (oclass->in_plugin->id == CODEC_ID_AAC
++ || oclass->in_plugin->id == CODEC_ID_AAC_LATM) {
++ const gchar *format = gst_structure_get_string (structure, "stream-format");
++
++ if (format == NULL || strcmp (format, "raw") == 0) {
++ ffmpegdec->turnoff_parser = TRUE;
++ }
++ }
++
++ /* for FLAC, don't parse if it's already parsed */
++ if (oclass->in_plugin->id == CODEC_ID_FLAC) {
++ if (gst_structure_has_field (structure, "streamheader"))
++ ffmpegdec->turnoff_parser = TRUE;
++ }
++
++ /* workaround encoder bugs */
++ ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
++ ffmpegdec->context->err_recognition = 1;
++
++ /* for slow cpus */
++ ffmpegdec->context->lowres = ffmpegdec->lowres;
++ ffmpegdec->context->skip_frame = ffmpegdec->skip_frame;
++
++ /* ffmpeg can draw motion vectors on top of the image (not every decoder
++ * supports it) */
++ ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
++
++ if (ffmpegdec->max_threads == 0)
++ ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
++ else
++ ffmpegdec->context->thread_count = ffmpegdec->max_threads;
++
++ /* open codec - we don't select an output pix_fmt yet,
++ * simply because we don't know! We only get it
++ * during playback... */
++ if (!gst_ffmpegdec_open (ffmpegdec))
++ goto open_failed;
++
++ /* clipping region */
++ gst_structure_get_int (structure, "width",
++ &ffmpegdec->format.video.clip_width);
++ gst_structure_get_int (structure, "height",
++ &ffmpegdec->format.video.clip_height);
++
++ GST_DEBUG_OBJECT (pad, "clipping to %dx%d",
++ ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
++
++ /* take into account the lowres property */
++ if (ffmpegdec->format.video.clip_width != -1)
++ ffmpegdec->format.video.clip_width >>= ffmpegdec->lowres;
++ if (ffmpegdec->format.video.clip_height != -1)
++ ffmpegdec->format.video.clip_height >>= ffmpegdec->lowres;
++
++ GST_DEBUG_OBJECT (pad, "final clipping to %dx%d",
++ ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
++
++done:
++ GST_OBJECT_UNLOCK (ffmpegdec);
++
++ gst_object_unref (ffmpegdec);
++
++ return ret;
++
++ /* ERRORS */
++open_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "Failed to open");
++ if (ffmpegdec->par) {
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = NULL;
++ }
++ ret = FALSE;
++ goto done;
++ }
++}
++
++static GstFlowReturn
++alloc_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf,
++ gint width, gint height)
++{
++ GstFlowReturn ret;
++ gint fsize;
++
++ ret = GST_FLOW_ERROR;
++ *outbuf = NULL;
++
++ GST_LOG_OBJECT (ffmpegdec, "alloc output buffer");
++
++ /* see if we need renegotiation */
++ if (G_UNLIKELY (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)))
++ goto negotiate_failed;
++
++ /* get the size of the gstreamer output buffer given a
++ * width/height/format */
++ fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
++ width, height);
++
++ if (ffmpegdec->can_allocate_aligned) {
++ GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
++ /* no pallete, we can use the buffer size to alloc */
++ ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
++ GST_BUFFER_OFFSET_NONE, fsize,
++ GST_PAD_CAPS (ffmpegdec->srcpad), outbuf);
++ if (G_UNLIKELY (ret != GST_FLOW_OK))
++ goto alloc_failed;
++
++ /* If buffer isn't 128-bit aligned, create a memaligned one ourselves */
++ if (((uintptr_t) GST_BUFFER_DATA (*outbuf)) % 16) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Downstream can't allocate aligned buffers.");
++ ffmpegdec->can_allocate_aligned = FALSE;
++ gst_buffer_unref (*outbuf);
++ *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
++ }
++ } else {
++ GST_LOG_OBJECT (ffmpegdec,
++ "not calling pad_alloc, we have a pallete or downstream can't give 16 byte aligned buffers.");
++ /* for paletted data we can't use pad_alloc_buffer(), because
++ * fsize contains the size of the palette, so the overall size
++ * is bigger than ffmpegcolorspace's unit size, which will
++ * prompt GstBaseTransform to complain endlessly ... */
++ *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
++ ret = GST_FLOW_OK;
++ }
++ /* set caps, we do this here because the buffer is still writable here and we
++ * are sure to be negotiated */
++ gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ return ret;
++
++ /* special cases */
++negotiate_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "negotiate failed");
++ return GST_FLOW_NOT_NEGOTIATED;
++ }
++alloc_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed %d (%s)", ret,
++ gst_flow_get_name (ret));
++ return ret;
++ }
++}
++
++static int
++gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture)
++{
++ GstBuffer *buf = NULL;
++ GstFFMpegDec *ffmpegdec;
++ gint width, height;
++ gint coded_width, coded_height;
++ gint res;
++
++ ffmpegdec = (GstFFMpegDec *) context->opaque;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "getting buffer");
++
++ /* apply the last info we have seen to this picture, when we get the
++ * picture back from ffmpeg we can use this to correctly timestamp the output
++ * buffer */
++ picture->reordered_opaque = context->reordered_opaque;
++ /* make sure we don't free the buffer when it's not ours */
++ picture->opaque = NULL;
++
++ /* take width and height before clipping */
++ width = context->width;
++ height = context->height;
++ coded_width = context->coded_width;
++ coded_height = context->coded_height;
++
++ GST_LOG_OBJECT (ffmpegdec, "dimension %dx%d, coded %dx%d", width, height,
++ coded_width, coded_height);
++ if (!ffmpegdec->current_dr) {
++ GST_LOG_OBJECT (ffmpegdec, "direct rendering disabled, fallback alloc");
++ res = avcodec_default_get_buffer (context, picture);
++
++ GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", picture->linesize[0],
++ picture->linesize[1], picture->linesize[2]);
++ GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
++ (guint) (picture->data[1] - picture->data[0]),
++ (guint) (picture->data[2] - picture->data[0]));
++ return res;
++ }
++
++ switch (context->codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ /* some ffmpeg video plugins don't see the point in setting codec_type ... */
++ case AVMEDIA_TYPE_UNKNOWN:
++ {
++ GstFlowReturn ret;
++ gint clip_width, clip_height;
++
++ /* take final clipped output size */
++ if ((clip_width = ffmpegdec->format.video.clip_width) == -1)
++ clip_width = width;
++ if ((clip_height = ffmpegdec->format.video.clip_height) == -1)
++ clip_height = height;
++
++ GST_LOG_OBJECT (ffmpegdec, "raw outsize %d/%d", width, height);
++
++ /* this is the size ffmpeg needs for the buffer */
++ avcodec_align_dimensions (context, &width, &height);
++
++ GST_LOG_OBJECT (ffmpegdec, "aligned outsize %d/%d, clip %d/%d",
++ width, height, clip_width, clip_height);
++
++ if (width != clip_width || height != clip_height) {
++ /* We can't alloc if we need to clip the output buffer later */
++ GST_LOG_OBJECT (ffmpegdec, "we need clipping, fallback alloc");
++ return avcodec_default_get_buffer (context, picture);
++ }
++
++ /* alloc with aligned dimensions for ffmpeg */
++ ret = alloc_output_buffer (ffmpegdec, &buf, width, height);
++ if (G_UNLIKELY (ret != GST_FLOW_OK)) {
++ /* alloc default buffer when we can't get one from downstream */
++ GST_LOG_OBJECT (ffmpegdec, "alloc failed, fallback alloc");
++ return avcodec_default_get_buffer (context, picture);
++ }
++
++ /* copy the right pointers and strides in the picture object */
++ gst_ffmpeg_avpicture_fill ((AVPicture *) picture,
++ GST_BUFFER_DATA (buf), context->pix_fmt, width, height);
++ break;
++ }
++ case AVMEDIA_TYPE_AUDIO:
++ default:
++ GST_ERROR_OBJECT (ffmpegdec,
++ "_get_buffer() should never get called for non-video buffers !");
++ g_assert_not_reached ();
++ break;
++ }
++
++ /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
++ * the opaque data. */
++ picture->type = FF_BUFFER_TYPE_USER;
++ picture->opaque = buf;
++
++#ifdef EXTRA_REF
++ if (picture->reference != 0 || ffmpegdec->extra_ref) {
++ GST_DEBUG_OBJECT (ffmpegdec, "adding extra ref");
++ gst_buffer_ref (buf);
++ }
++#endif
++
++ GST_LOG_OBJECT (ffmpegdec, "returned buffer %p", buf);
++
++ return 0;
++}
++
++static void
++gst_ffmpegdec_release_buffer (AVCodecContext * context, AVFrame * picture)
++{
++ gint i;
++ GstBuffer *buf;
++ GstFFMpegDec *ffmpegdec;
++
++ ffmpegdec = (GstFFMpegDec *) context->opaque;
++
++ /* check if it was our buffer */
++ if (picture->opaque == NULL) {
++ GST_DEBUG_OBJECT (ffmpegdec, "default release buffer");
++ avcodec_default_release_buffer (context, picture);
++ return;
++ }
++
++ /* we remove the opaque data now */
++ buf = GST_BUFFER_CAST (picture->opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "release buffer %p", buf);
++ picture->opaque = NULL;
++
++#ifdef EXTRA_REF
++ if (picture->reference != 0 || ffmpegdec->extra_ref) {
++ GST_DEBUG_OBJECT (ffmpegdec, "remove extra ref");
++ gst_buffer_unref (buf);
++ }
++#else
++ gst_buffer_unref (buf);
++#endif
++
++ /* zero out the reference in ffmpeg */
++ for (i = 0; i < 4; i++) {
++ picture->data[i] = NULL;
++ picture->linesize[i] = 0;
++ }
++}
++
++static void
++gst_ffmpegdec_add_pixel_aspect_ratio (GstFFMpegDec * ffmpegdec,
++ GstStructure * s)
++{
++ gboolean demuxer_par_set = FALSE;
++ gboolean decoder_par_set = FALSE;
++ gint demuxer_num = 1, demuxer_denom = 1;
++ gint decoder_num = 1, decoder_denom = 1;
++
++ GST_OBJECT_LOCK (ffmpegdec);
++
++ if (ffmpegdec->par) {
++ demuxer_num = gst_value_get_fraction_numerator (ffmpegdec->par);
++ demuxer_denom = gst_value_get_fraction_denominator (ffmpegdec->par);
++ demuxer_par_set = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "Demuxer PAR: %d:%d", demuxer_num,
++ demuxer_denom);
++ }
++
++ if (ffmpegdec->context->sample_aspect_ratio.num &&
++ ffmpegdec->context->sample_aspect_ratio.den) {
++ decoder_num = ffmpegdec->context->sample_aspect_ratio.num;
++ decoder_denom = ffmpegdec->context->sample_aspect_ratio.den;
++ decoder_par_set = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "Decoder PAR: %d:%d", decoder_num,
++ decoder_denom);
++ }
++
++ GST_OBJECT_UNLOCK (ffmpegdec);
++
++ if (!demuxer_par_set && !decoder_par_set)
++ goto no_par;
++
++ if (demuxer_par_set && !decoder_par_set)
++ goto use_demuxer_par;
++
++ if (decoder_par_set && !demuxer_par_set)
++ goto use_decoder_par;
++
++ /* Both the demuxer and the decoder provide a PAR. If one of
++ * the two PARs is 1:1 and the other one is not, use the one
++ * that is not 1:1. */
++ if (demuxer_num == demuxer_denom && decoder_num != decoder_denom)
++ goto use_decoder_par;
++
++ if (decoder_num == decoder_denom && demuxer_num != demuxer_denom)
++ goto use_demuxer_par;
++
++ /* Both PARs are non-1:1, so use the PAR provided by the demuxer */
++ goto use_demuxer_par;
++
++use_decoder_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Setting decoder provided pixel-aspect-ratio of %u:%u", decoder_num,
++ decoder_denom);
++ gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, decoder_num,
++ decoder_denom, NULL);
++ return;
++ }
++
++use_demuxer_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Setting demuxer provided pixel-aspect-ratio of %u:%u", demuxer_num,
++ demuxer_denom);
++ gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, demuxer_num,
++ demuxer_denom, NULL);
++ return;
++ }
++no_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Neither demuxer nor codec provide a pixel-aspect-ratio");
++ return;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
++{
++ GstFFMpegDecClass *oclass;
++ GstCaps *caps;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ if (!force && ffmpegdec->format.video.width == ffmpegdec->context->width
++ && ffmpegdec->format.video.height == ffmpegdec->context->height
++ && ffmpegdec->format.video.fps_n == ffmpegdec->format.video.old_fps_n
++ && ffmpegdec->format.video.fps_d == ffmpegdec->format.video.old_fps_d
++ && ffmpegdec->format.video.pix_fmt == ffmpegdec->context->pix_fmt
++ && ffmpegdec->format.video.par_n ==
++ ffmpegdec->context->sample_aspect_ratio.num
++ && ffmpegdec->format.video.par_d ==
++ ffmpegdec->context->sample_aspect_ratio.den)
++ return TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Renegotiating video from %dx%d@ %d:%d PAR %d/%d fps to %dx%d@ %d:%d PAR %d/%d fps",
++ ffmpegdec->format.video.width, ffmpegdec->format.video.height,
++ ffmpegdec->format.video.par_n, ffmpegdec->format.video.par_d,
++ ffmpegdec->format.video.old_fps_n, ffmpegdec->format.video.old_fps_n,
++ ffmpegdec->context->width, ffmpegdec->context->height,
++ ffmpegdec->context->sample_aspect_ratio.num,
++ ffmpegdec->context->sample_aspect_ratio.den,
++ ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
++ ffmpegdec->format.video.width = ffmpegdec->context->width;
++ ffmpegdec->format.video.height = ffmpegdec->context->height;
++ ffmpegdec->format.video.old_fps_n = ffmpegdec->format.video.fps_n;
++ ffmpegdec->format.video.old_fps_d = ffmpegdec->format.video.fps_d;
++ ffmpegdec->format.video.pix_fmt = ffmpegdec->context->pix_fmt;
++ ffmpegdec->format.video.par_n =
++ ffmpegdec->context->sample_aspect_ratio.num;
++ ffmpegdec->format.video.par_d =
++ ffmpegdec->context->sample_aspect_ratio.den;
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ {
++ gint depth = av_smp_format_depth (ffmpegdec->context->sample_fmt);
++ if (!force && ffmpegdec->format.audio.samplerate ==
++ ffmpegdec->context->sample_rate &&
++ ffmpegdec->format.audio.channels == ffmpegdec->context->channels &&
++ ffmpegdec->format.audio.depth == depth)
++ return TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Renegotiating audio from %dHz@%dchannels (%d) to %dHz@%dchannels (%d)",
++ ffmpegdec->format.audio.samplerate, ffmpegdec->format.audio.channels,
++ ffmpegdec->format.audio.depth,
++ ffmpegdec->context->sample_rate, ffmpegdec->context->channels, depth);
++ ffmpegdec->format.audio.samplerate = ffmpegdec->context->sample_rate;
++ ffmpegdec->format.audio.channels = ffmpegdec->context->channels;
++ ffmpegdec->format.audio.depth = depth;
++ }
++ break;
++ default:
++ break;
++ }
++
++ caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type,
++ ffmpegdec->context, oclass->in_plugin->id, FALSE);
++
++ if (caps == NULL)
++ goto no_caps;
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ {
++ gint width, height;
++ gboolean interlaced;
++
++ width = ffmpegdec->format.video.clip_width;
++ height = ffmpegdec->format.video.clip_height;
++ interlaced = ffmpegdec->format.video.interlaced;
++
++ if (width != -1 && height != -1) {
++ /* overwrite the output size with the dimension of the
++ * clipping region but only if they are smaller. */
++ if (width < ffmpegdec->context->width)
++ gst_caps_set_simple (caps, "width", G_TYPE_INT, width, NULL);
++ if (height < ffmpegdec->context->height)
++ gst_caps_set_simple (caps, "height", G_TYPE_INT, height, NULL);
++ }
++ gst_caps_set_simple (caps, "interlaced", G_TYPE_BOOLEAN, interlaced,
++ NULL);
++
++ /* If a demuxer provided a framerate then use it (#313970) */
++ if (ffmpegdec->format.video.fps_n != -1) {
++ gst_caps_set_simple (caps, "framerate",
++ GST_TYPE_FRACTION, ffmpegdec->format.video.fps_n,
++ ffmpegdec->format.video.fps_d, NULL);
++ }
++ gst_ffmpegdec_add_pixel_aspect_ratio (ffmpegdec,
++ gst_caps_get_structure (caps, 0));
++ break;
++ }
++ case AVMEDIA_TYPE_AUDIO:
++ {
++ break;
++ }
++ default:
++ break;
++ }
++
++ if (!gst_pad_set_caps (ffmpegdec->srcpad, caps))
++ goto caps_failed;
++
++ gst_caps_unref (caps);
++
++ return TRUE;
++
++ /* ERRORS */
++no_caps:
++ {
++#ifdef HAVE_FFMPEG_UNINSTALLED
++ /* using internal ffmpeg snapshot */
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
++ ("Could not find GStreamer caps mapping for FFmpeg codec '%s'.",
++ oclass->in_plugin->name), (NULL));
++#else
++ /* using external ffmpeg */
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
++ ("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
++ "you are using an external libavcodec. This is most likely due to "
++ "a packaging problem and/or libavcodec having been upgraded to a "
++ "version that is not compatible with this version of "
++ "gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
++ "packages come from the same source/repository.",
++ oclass->in_plugin->name), (NULL));
++#endif
++ return FALSE;
++ }
++caps_failed:
++ {
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
++ ("Could not set caps for ffmpeg decoder (%s), not fixed?",
++ oclass->in_plugin->name));
++ gst_caps_unref (caps);
++
++ return FALSE;
++ }
++}
++
++/* perform qos calculations before decoding the next frame.
++ *
++ * Sets the skip_frame flag and if things are really bad, skips to the next
++ * keyframe.
++ *
++ * Returns TRUE if the frame should be decoded, FALSE if the frame can be dropped
++ * entirely.
++ */
++static gboolean
++gst_ffmpegdec_do_qos (GstFFMpegDec * ffmpegdec, GstClockTime timestamp,
++ gboolean * mode_switch)
++{
++ GstClockTimeDiff diff;
++ gdouble proportion;
++ GstClockTime qostime, earliest_time;
++ gboolean res = TRUE;
++
++ *mode_switch = FALSE;
++
++ /* no timestamp, can't do QoS */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (timestamp)))
++ goto no_qos;
++
++ /* get latest QoS observation values */
++ gst_ffmpegdec_read_qos (ffmpegdec, &proportion, &earliest_time);
++
++ /* skip qos if we have no observation (yet) */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (earliest_time))) {
++ /* no skip_frame initialy */
++ ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
++ goto no_qos;
++ }
++
++ /* qos is done on running time of the timestamp */
++ qostime = gst_segment_to_running_time (&ffmpegdec->segment, GST_FORMAT_TIME,
++ timestamp);
++
++ /* timestamp can be out of segment, then we don't do QoS */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (qostime)))
++ goto no_qos;
++
++ /* see how our next timestamp relates to the latest qos timestamp. negative
++ * values mean we are early, positive values mean we are too late. */
++ diff = GST_CLOCK_DIFF (qostime, earliest_time);
++
++ GST_DEBUG_OBJECT (ffmpegdec, "QOS: qostime %" GST_TIME_FORMAT
++ ", earliest %" GST_TIME_FORMAT, GST_TIME_ARGS (qostime),
++ GST_TIME_ARGS (earliest_time));
++
++ /* if we using less than 40% of the available time, we can try to
++ * speed up again when we were slow. */
++ if (proportion < 0.4 && diff < 0) {
++ goto normal_mode;
++ } else {
++ if (diff >= 0) {
++ /* we're too slow, try to speed up */
++ /* switch to skip_frame mode */
++ goto skip_frame;
++ }
++ }
++
++no_qos:
++ ffmpegdec->processed++;
++ return TRUE;
++
++normal_mode:
++ {
++ if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
++ ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
++ *mode_switch = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "QOS: normal mode %g < 0.4", proportion);
++ }
++ ffmpegdec->processed++;
++ return TRUE;
++ }
++skip_frame:
++ {
++ if (ffmpegdec->context->skip_frame != AVDISCARD_NONREF) {
++ ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
++ *mode_switch = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "QOS: hurry up, diff %" G_GINT64_FORMAT " >= 0", diff);
++ }
++ goto drop_qos;
++ }
++drop_qos:
++ {
++ GstClockTime stream_time, jitter;
++ GstMessage *qos_msg;
++
++ ffmpegdec->dropped++;
++ stream_time =
++ gst_segment_to_stream_time (&ffmpegdec->segment, GST_FORMAT_TIME,
++ timestamp);
++ jitter = GST_CLOCK_DIFF (qostime, earliest_time);
++ qos_msg =
++ gst_message_new_qos (GST_OBJECT_CAST (ffmpegdec), FALSE, qostime,
++ stream_time, timestamp, GST_CLOCK_TIME_NONE);
++ gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000);
++ gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS,
++ ffmpegdec->processed, ffmpegdec->dropped);
++ gst_element_post_message (GST_ELEMENT_CAST (ffmpegdec), qos_msg);
++
++ return res;
++ }
++}
++
++/* returns TRUE if buffer is within segment, else FALSE.
++ * if Buffer is on segment border, it's timestamp and duration will be clipped */
++static gboolean
++clip_video_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
++ GstClockTime in_dur)
++{
++ gboolean res = TRUE;
++ gint64 cstart, cstop;
++ GstClockTime stop;
++
++ GST_LOG_OBJECT (dec,
++ "timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
++ GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur));
++
++ /* can't clip without TIME segment */
++ if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
++ goto beach;
++
++ /* we need a start time */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
++ goto beach;
++
++ /* generate valid stop, if duration unknown, we have unknown stop */
++ stop =
++ GST_CLOCK_TIME_IS_VALID (in_dur) ? (in_ts + in_dur) : GST_CLOCK_TIME_NONE;
++
++ /* now clip */
++ res =
++ gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &cstart,
++ &cstop);
++ if (G_UNLIKELY (!res))
++ goto beach;
++
++ /* we're pretty sure the duration of this buffer is not till the end of this
++ * segment (which _clip will assume when the stop is -1) */
++ if (stop == GST_CLOCK_TIME_NONE)
++ cstop = GST_CLOCK_TIME_NONE;
++
++ /* update timestamp and possibly duration if the clipped stop time is
++ * valid */
++ GST_BUFFER_TIMESTAMP (buf) = cstart;
++ if (GST_CLOCK_TIME_IS_VALID (cstop))
++ GST_BUFFER_DURATION (buf) = cstop - cstart;
++
++ GST_LOG_OBJECT (dec,
++ "clipped timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
++ GST_TIME_ARGS (cstart), GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
++
++beach:
++ GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
++ return res;
++}
++
++
++/* get an outbuf buffer with the current picture */
++static GstFlowReturn
++get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
++{
++ GstFlowReturn ret;
++
++ ret = GST_FLOW_OK;
++ *outbuf = NULL;
++
++ if (ffmpegdec->picture->opaque != NULL) {
++ /* we allocated a picture already for ffmpeg to decode into, let's pick it
++ * up and use it now. */
++ *outbuf = (GstBuffer *) ffmpegdec->picture->opaque;
++ GST_LOG_OBJECT (ffmpegdec, "using opaque buffer %p", *outbuf);
++#ifndef EXTRA_REF
++ gst_buffer_ref (*outbuf);
++#endif
++ } else {
++ AVPicture pic, *outpic;
++ gint width, height;
++
++ GST_LOG_OBJECT (ffmpegdec, "get output buffer");
++
++ /* figure out size of output buffer, this is the clipped output size because
++ * we will copy the picture into it but only when the clipping region is
++ * smaller than the actual picture size. */
++ if ((width = ffmpegdec->format.video.clip_width) == -1)
++ width = ffmpegdec->context->width;
++ else if (width > ffmpegdec->context->width)
++ width = ffmpegdec->context->width;
++
++ if ((height = ffmpegdec->format.video.clip_height) == -1)
++ height = ffmpegdec->context->height;
++ else if (height > ffmpegdec->context->height)
++ height = ffmpegdec->context->height;
++
++ GST_LOG_OBJECT (ffmpegdec, "clip width %d/height %d", width, height);
++
++ ret = alloc_output_buffer (ffmpegdec, outbuf, width, height);
++ if (G_UNLIKELY (ret != GST_FLOW_OK))
++ goto alloc_failed;
++
++ /* original ffmpeg code does not handle odd sizes correctly.
++ * This patched up version does */
++ gst_ffmpeg_avpicture_fill (&pic, GST_BUFFER_DATA (*outbuf),
++ ffmpegdec->context->pix_fmt, width, height);
++
++ outpic = (AVPicture *) ffmpegdec->picture;
++
++ GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", outpic->linesize[0],
++ outpic->linesize[1], outpic->linesize[2]);
++ GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
++ (guint) (outpic->data[1] - outpic->data[0]),
++ (guint) (outpic->data[2] - outpic->data[0]));
++
++ av_picture_copy (&pic, outpic, ffmpegdec->context->pix_fmt, width, height);
++ }
++ ffmpegdec->picture->reordered_opaque = -1;
++
++ return ret;
++
++ /* special cases */
++alloc_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed");
++ return ret;
++ }
++}
++
++static void
++clear_queued (GstFFMpegDec * ffmpegdec)
++{
++ g_list_foreach (ffmpegdec->queued, (GFunc) gst_mini_object_unref, NULL);
++ g_list_free (ffmpegdec->queued);
++ ffmpegdec->queued = NULL;
++}
++
++static GstFlowReturn
++flush_queued (GstFFMpegDec * ffmpegdec)
++{
++ GstFlowReturn res = GST_FLOW_OK;
++
++ while (ffmpegdec->queued) {
++ GstBuffer *buf = GST_BUFFER_CAST (ffmpegdec->queued->data);
++
++ GST_LOG_OBJECT (ffmpegdec, "pushing buffer %p, offset %"
++ G_GUINT64_FORMAT ", timestamp %"
++ GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, buf,
++ GST_BUFFER_OFFSET (buf),
++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
++
++ /* iterate ouput queue an push downstream */
++ res = gst_pad_push (ffmpegdec->srcpad, buf);
++
++ ffmpegdec->queued =
++ g_list_delete_link (ffmpegdec->queued, ffmpegdec->queued);
++ }
++ return res;
++}
++
++static void
++gst_avpacket_init (AVPacket * packet, guint8 * data, guint size)
++{
++ memset (packet, 0, sizeof (AVPacket));
++ packet->data = data;
++ packet->size = size;
++}
++
++/* gst_ffmpegdec_[video|audio]_frame:
++ * ffmpegdec:
++ * data: pointer to the data to decode
++ * size: size of data in bytes
++ * in_timestamp: incoming timestamp.
++ * in_duration: incoming duration.
++ * in_offset: incoming offset (frame number).
++ * outbuf: outgoing buffer. Different from NULL ONLY if it contains decoded data.
++ * ret: Return flow.
++ *
++ * Returns: number of bytes used in decoding. The check for successful decode is
++ * outbuf being non-NULL.
++ */
++static gint
++gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
++ guint8 * data, guint size,
++ const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
++{
++ gint len = -1;
++ gint have_data;
++ gboolean mode_switch;
++ gboolean decode;
++ gint skip_frame = AVDISCARD_DEFAULT;
++ GstClockTime out_timestamp, out_duration, out_pts;
++ gint64 out_offset;
++ const GstTSInfo *out_info;
++ AVPacket packet;
++
++ *ret = GST_FLOW_OK;
++ *outbuf = NULL;
++
++ ffmpegdec->context->opaque = ffmpegdec;
++
++ /* in case we skip frames */
++ ffmpegdec->picture->pict_type = -1;
++
++ /* run QoS code, we don't stop decoding the frame when we are late because
++ * else we might skip a reference frame */
++ decode = gst_ffmpegdec_do_qos (ffmpegdec, dec_info->timestamp, &mode_switch);
++
++ if (ffmpegdec->is_realvideo && data != NULL) {
++ gint slice_count;
++ gint i;
++
++ /* setup the slice table for realvideo */
++ if (ffmpegdec->context->slice_offset == NULL)
++ ffmpegdec->context->slice_offset = g_malloc (sizeof (guint32) * 1000);
++
++ slice_count = (*data++) + 1;
++ ffmpegdec->context->slice_count = slice_count;
++
++ for (i = 0; i < slice_count; i++) {
++ data += 4;
++ ffmpegdec->context->slice_offset[i] = GST_READ_UINT32_LE (data);
++ data += 4;
++ }
++ }
++
++ if (!decode) {
++ /* no decoding needed, save previous skip_frame value and brutely skip
++ * decoding everything */
++ skip_frame = ffmpegdec->context->skip_frame;
++ ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
++ }
++
++ /* save reference to the timing info */
++ ffmpegdec->context->reordered_opaque = (gint64) dec_info->idx;
++ ffmpegdec->picture->reordered_opaque = (gint64) dec_info->idx;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "stored opaque values idx %d", dec_info->idx);
++
++ /* now decode the frame */
++ gst_avpacket_init (&packet, data, size);
++ len = avcodec_decode_video2 (ffmpegdec->context,
++ ffmpegdec->picture, &have_data, &packet);
++
++ /* restore previous state */
++ if (!decode)
++ ffmpegdec->context->skip_frame = skip_frame;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "after decode: len %d, have_data %d",
++ len, have_data);
++
++ /* when we are in skip_frame mode, don't complain when ffmpeg returned
++ * no data because we told it to skip stuff. */
++ if (len < 0 && (mode_switch || ffmpegdec->context->skip_frame))
++ len = 0;
++
++ if (len > 0 && have_data <= 0 && (mode_switch
++ || ffmpegdec->context->skip_frame)) {
++ /* we consumed some bytes but nothing decoded and we are skipping frames,
++ * disable the interpollation of DTS timestamps */
++ ffmpegdec->last_out = -1;
++ }
++
++ /* no data, we're done */
++ if (len < 0 || have_data <= 0)
++ goto beach;
++
++ /* get the output picture timing info again */
++ out_info = gst_ts_info_get (ffmpegdec, ffmpegdec->picture->reordered_opaque);
++ out_pts = out_info->timestamp;
++ out_duration = out_info->duration;
++ out_offset = out_info->offset;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "pts %" G_GUINT64_FORMAT " duration %" G_GUINT64_FORMAT " offset %"
++ G_GINT64_FORMAT, out_pts, out_duration, out_offset);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: pts %" G_GUINT64_FORMAT,
++ (guint64) ffmpegdec->picture->pts);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: num %d",
++ ffmpegdec->picture->coded_picture_number);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: ref %d",
++ ffmpegdec->picture->reference);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: display %d",
++ ffmpegdec->picture->display_picture_number);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: opaque %p",
++ ffmpegdec->picture->opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: reordered opaque %" G_GUINT64_FORMAT,
++ (guint64) ffmpegdec->picture->reordered_opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "repeat_pict:%d",
++ ffmpegdec->picture->repeat_pict);
++ GST_DEBUG_OBJECT (ffmpegdec, "interlaced_frame:%d",
++ ffmpegdec->picture->interlaced_frame);
++
++ if (G_UNLIKELY (ffmpegdec->picture->interlaced_frame !=
++ ffmpegdec->format.video.interlaced)) {
++ GST_WARNING ("Change in interlacing ! picture:%d, recorded:%d",
++ ffmpegdec->picture->interlaced_frame,
++ ffmpegdec->format.video.interlaced);
++ ffmpegdec->format.video.interlaced = ffmpegdec->picture->interlaced_frame;
++ gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
++ }
++
++ /* Whether a frame is interlaced or not is unknown at the time of
++ buffer allocation, so caps on the buffer in opaque will have
++ the previous frame's interlaced flag set. So if interlacedness
++ has changed since allocation, we update the buffer (if any)
++ caps now with the correct interlaced flag. */
++ if (ffmpegdec->picture->opaque != NULL) {
++ GstBuffer *buffer = ffmpegdec->picture->opaque;
++ if (GST_BUFFER_CAPS (buffer) && GST_PAD_CAPS (ffmpegdec->srcpad)) {
++ GstStructure *s = gst_caps_get_structure (GST_BUFFER_CAPS (buffer), 0);
++ gboolean interlaced;
++ gboolean found = gst_structure_get_boolean (s, "interlaced", &interlaced);
++ if (!found || (!!interlaced != !!ffmpegdec->format.video.interlaced)) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Buffer interlacing does not match pad, updating");
++ buffer = gst_buffer_make_metadata_writable (buffer);
++ gst_buffer_set_caps (buffer, GST_PAD_CAPS (ffmpegdec->srcpad));
++ ffmpegdec->picture->opaque = buffer;
++ }
++ }
++ }
++
++ /* check that the timestamps go upwards */
++ if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
++ /* timestamps go backwards, this means frames were reordered and we must
++ * be dealing with DTS as the buffer timestamps */
++ if (!ffmpegdec->reordered_out) {
++ GST_DEBUG_OBJECT (ffmpegdec, "detected reordered out timestamps");
++ ffmpegdec->reordered_out = TRUE;
++ }
++ if (ffmpegdec->reordered_in) {
++ /* we reset the input reordering here because we want to recover from an
++ * occasionally wrong reordered input timestamp */
++ GST_DEBUG_OBJECT (ffmpegdec, "assuming DTS input timestamps");
++ ffmpegdec->reordered_in = FALSE;
++ }
++ }
++
++ if (out_pts == 0 && out_pts == ffmpegdec->last_out) {
++ GST_LOG_OBJECT (ffmpegdec, "ffmpeg returns 0 timestamps, ignoring");
++ /* some codecs only output 0 timestamps, when that happens, make us select an
++ * output timestamp based on the input timestamp. We do this by making the
++ * ffmpeg timestamp and the interpollated next timestamp invalid. */
++ out_pts = -1;
++ ffmpegdec->next_out = -1;
++ } else
++ ffmpegdec->last_out = out_pts;
++
++ /* we assume DTS as input timestamps unless we see reordered input
++ * timestamps */
++ if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
++ /* PTS and DTS are the same for keyframes */
++ if (ffmpegdec->next_out != -1) {
++ /* interpolate all timestamps except for keyframes, FIXME, this is
++ * wrong when QoS is active. */
++ GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
++ out_pts = -1;
++ out_offset = -1;
++ }
++ }
++
++ /* get a handle to the output buffer */
++ *ret = get_output_buffer (ffmpegdec, outbuf);
++ if (G_UNLIKELY (*ret != GST_FLOW_OK))
++ goto no_output;
++
++ /*
++ * Timestamps:
++ *
++ * 1) Copy picture timestamp if valid
++ * 2) else interpolate from previous output timestamp
++ * 3) else copy input timestamp
++ */
++ out_timestamp = -1;
++ if (out_pts != -1) {
++ /* Get (interpolated) timestamp from FFMPEG */
++ out_timestamp = (GstClockTime) out_pts;
++ GST_LOG_OBJECT (ffmpegdec, "using timestamp %" GST_TIME_FORMAT
++ " returned by ffmpeg", GST_TIME_ARGS (out_timestamp));
++ }
++ if (!GST_CLOCK_TIME_IS_VALID (out_timestamp) && ffmpegdec->next_out != -1) {
++ out_timestamp = ffmpegdec->next_out;
++ GST_LOG_OBJECT (ffmpegdec, "using next timestamp %" GST_TIME_FORMAT,
++ GST_TIME_ARGS (out_timestamp));
++ }
++ if (!GST_CLOCK_TIME_IS_VALID (out_timestamp)) {
++ out_timestamp = dec_info->timestamp;
++ GST_LOG_OBJECT (ffmpegdec, "using in timestamp %" GST_TIME_FORMAT,
++ GST_TIME_ARGS (out_timestamp));
++ }
++ GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
++
++ /*
++ * Offset:
++ * 0) Use stored input offset (from opaque)
++ * 1) Use value converted from timestamp if valid
++ * 2) Use input offset if valid
++ */
++ if (out_offset != GST_BUFFER_OFFSET_NONE) {
++ /* out_offset already contains the offset from ts_info */
++ GST_LOG_OBJECT (ffmpegdec, "Using offset returned by ffmpeg");
++ } else if (out_timestamp != GST_CLOCK_TIME_NONE) {
++ GstFormat out_fmt = GST_FORMAT_DEFAULT;
++ GST_LOG_OBJECT (ffmpegdec, "Using offset converted from timestamp");
++ /* FIXME, we should really remove this as it's not nice at all to do
++ * upstream queries for each frame to get the frame offset. We also can't
++ * really remove this because it is the only way of setting frame offsets
++ * on outgoing buffers. We should have metadata so that the upstream peer
++ * can set a frame number on the encoded data. */
++ gst_pad_query_peer_convert (ffmpegdec->sinkpad,
++ GST_FORMAT_TIME, out_timestamp, &out_fmt, &out_offset);
++ } else if (dec_info->offset != GST_BUFFER_OFFSET_NONE) {
++ /* FIXME, the input offset is input media specific and might not
++ * be the same for the output media. (byte offset as input, frame number
++ * as output, for example) */
++ GST_LOG_OBJECT (ffmpegdec, "using in_offset %" G_GINT64_FORMAT,
++ dec_info->offset);
++ out_offset = dec_info->offset;
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "no valid offset found");
++ out_offset = GST_BUFFER_OFFSET_NONE;
++ }
++ GST_BUFFER_OFFSET (*outbuf) = out_offset;
++
++ /*
++ * Duration:
++ *
++ * 1) Use reordered input duration if valid
++ * 2) Else use input duration
++ * 3) else use input framerate
++ * 4) else use ffmpeg framerate
++ */
++ if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
++ /* We have a valid (reordered) duration */
++ GST_LOG_OBJECT (ffmpegdec, "Using duration returned by ffmpeg");
++ } else if (GST_CLOCK_TIME_IS_VALID (dec_info->duration)) {
++ GST_LOG_OBJECT (ffmpegdec, "using in_duration");
++ out_duration = dec_info->duration;
++ } else if (GST_CLOCK_TIME_IS_VALID (ffmpegdec->last_diff)) {
++ GST_LOG_OBJECT (ffmpegdec, "using last-diff");
++ out_duration = ffmpegdec->last_diff;
++ } else {
++ /* if we have an input framerate, use that */
++ if (ffmpegdec->format.video.fps_n != -1 &&
++ (ffmpegdec->format.video.fps_n != 1000 &&
++ ffmpegdec->format.video.fps_d != 1)) {
++ GST_LOG_OBJECT (ffmpegdec, "using input framerate for duration");
++ out_duration = gst_util_uint64_scale_int (GST_SECOND,
++ ffmpegdec->format.video.fps_d, ffmpegdec->format.video.fps_n);
++ } else {
++ /* don't try to use the decoder's framerate when it seems a bit abnormal,
++ * which we assume when den >= 1000... */
++ if (ffmpegdec->context->time_base.num != 0 &&
++ (ffmpegdec->context->time_base.den > 0 &&
++ ffmpegdec->context->time_base.den < 1000)) {
++ GST_LOG_OBJECT (ffmpegdec, "using decoder's framerate for duration");
++ out_duration = gst_util_uint64_scale_int (GST_SECOND,
++ ffmpegdec->context->time_base.num *
++ ffmpegdec->context->ticks_per_frame,
++ ffmpegdec->context->time_base.den);
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "no valid duration found");
++ }
++ }
++ }
++
++ /* Take repeat_pict into account */
++ if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
++ out_duration += out_duration * ffmpegdec->picture->repeat_pict / 2;
++ }
++ GST_BUFFER_DURATION (*outbuf) = out_duration;
++
++ if (out_timestamp != -1 && out_duration != -1 && out_duration != 0)
++ ffmpegdec->next_out = out_timestamp + out_duration;
++ else
++ ffmpegdec->next_out = -1;
++
++ /* now see if we need to clip the buffer against the segment boundaries. */
++ if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
++ out_duration)))
++ goto clipped;
++
++ if (ffmpegdec->picture->top_field_first)
++ GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
++
++
++beach:
++ GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
++ *ret, *outbuf, len);
++ return len;
++
++ /* special cases */
++no_output:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
++ len = -1;
++ goto beach;
++ }
++clipped:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ goto beach;
++ }
++}
++
++/* returns TRUE if buffer is within segment, else FALSE.
++ * if Buffer is on segment border, it's timestamp and duration will be clipped */
++static gboolean
++clip_audio_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
++ GstClockTime in_dur)
++{
++ GstClockTime stop;
++ gint64 diff, ctime, cstop;
++ gboolean res = TRUE;
++
++ GST_LOG_OBJECT (dec,
++ "timestamp:%" GST_TIME_FORMAT ", duration:%" GST_TIME_FORMAT
++ ", size %u", GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur),
++ GST_BUFFER_SIZE (buf));
++
++ /* can't clip without TIME segment */
++ if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
++ goto beach;
++
++ /* we need a start time */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
++ goto beach;
++
++ /* trust duration */
++ stop = in_ts + in_dur;
++
++ res = gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &ctime,
++ &cstop);
++ if (G_UNLIKELY (!res))
++ goto out_of_segment;
++
++ /* see if some clipping happened */
++ if (G_UNLIKELY ((diff = ctime - in_ts) > 0)) {
++ /* bring clipped time to bytes */
++ diff =
++ gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
++ GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
++
++ GST_DEBUG_OBJECT (dec, "clipping start to %" GST_TIME_FORMAT " %"
++ G_GINT64_FORMAT " bytes", GST_TIME_ARGS (ctime), diff);
++
++ GST_BUFFER_SIZE (buf) -= diff;
++ GST_BUFFER_DATA (buf) += diff;
++ }
++ if (G_UNLIKELY ((diff = stop - cstop) > 0)) {
++ /* bring clipped time to bytes */
++ diff =
++ gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
++ GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
++
++ GST_DEBUG_OBJECT (dec, "clipping stop to %" GST_TIME_FORMAT " %"
++ G_GINT64_FORMAT " bytes", GST_TIME_ARGS (cstop), diff);
++
++ GST_BUFFER_SIZE (buf) -= diff;
++ }
++ GST_BUFFER_TIMESTAMP (buf) = ctime;
++ GST_BUFFER_DURATION (buf) = cstop - ctime;
++
++beach:
++ GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
++ return res;
++
++ /* ERRORS */
++out_of_segment:
++ {
++ GST_LOG_OBJECT (dec, "out of segment");
++ goto beach;
++ }
++}
++
++static gint
++gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
++ AVCodec * in_plugin, guint8 * data, guint size,
++ const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
++{
++ gint len = -1;
++ gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE;
++ GstClockTime out_timestamp, out_duration;
++ gint64 out_offset;
++ AVPacket packet;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "size:%d, offset:%" G_GINT64_FORMAT ", ts:%" GST_TIME_FORMAT ", dur:%"
++ GST_TIME_FORMAT ", ffmpegdec->next_out:%" GST_TIME_FORMAT, size,
++ dec_info->offset, GST_TIME_ARGS (dec_info->timestamp),
++ GST_TIME_ARGS (dec_info->duration), GST_TIME_ARGS (ffmpegdec->next_out));
++
++ *outbuf =
++ new_aligned_buffer (AVCODEC_MAX_AUDIO_FRAME_SIZE,
++ GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ gst_avpacket_init (&packet, data, size);
++ len = avcodec_decode_audio3 (ffmpegdec->context,
++ (int16_t *) GST_BUFFER_DATA (*outbuf), &have_data, &packet);
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Decode audio: len=%d, have_data=%d", len, have_data);
++
++ if (len >= 0 && have_data > 0) {
++ GST_DEBUG_OBJECT (ffmpegdec, "Creating output buffer");
++ if (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)) {
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ len = -1;
++ goto beach;
++ }
++
++ /* Buffer size */
++ GST_BUFFER_SIZE (*outbuf) = have_data;
++
++ /*
++ * Timestamps:
++ *
++ * 1) Copy input timestamp if valid
++ * 2) else interpolate from previous input timestamp
++ */
++ /* always take timestamps from the input buffer if any */
++ if (GST_CLOCK_TIME_IS_VALID (dec_info->timestamp)) {
++ out_timestamp = dec_info->timestamp;
++ } else {
++ out_timestamp = ffmpegdec->next_out;
++ }
++
++ /*
++ * Duration:
++ *
++ * 1) calculate based on number of samples
++ */
++ out_duration = gst_util_uint64_scale (have_data, GST_SECOND,
++ ffmpegdec->format.audio.depth * ffmpegdec->format.audio.channels *
++ ffmpegdec->format.audio.samplerate);
++
++ /* offset:
++ *
++ * Just copy
++ */
++ out_offset = dec_info->offset;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Buffer created. Size:%d , timestamp:%" GST_TIME_FORMAT " , duration:%"
++ GST_TIME_FORMAT, have_data,
++ GST_TIME_ARGS (out_timestamp), GST_TIME_ARGS (out_duration));
++
++ GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
++ GST_BUFFER_DURATION (*outbuf) = out_duration;
++ GST_BUFFER_OFFSET (*outbuf) = out_offset;
++ gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ /* the next timestamp we'll use when interpolating */
++ if (GST_CLOCK_TIME_IS_VALID (out_timestamp))
++ ffmpegdec->next_out = out_timestamp + out_duration;
++
++ /* now see if we need to clip the buffer against the segment boundaries. */
++ if (G_UNLIKELY (!clip_audio_buffer (ffmpegdec, *outbuf, out_timestamp,
++ out_duration)))
++ goto clipped;
++
++ } else {
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ }
++
++ /* If we don't error out after the first failed read with the AAC decoder,
++ * we must *not* carry on pushing data, else we'll cause segfaults... */
++ if (len == -1 && (in_plugin->id == CODEC_ID_AAC
++ || in_plugin->id == CODEC_ID_AAC_LATM)) {
++ GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
++ ("Decoding of AAC stream by FFMPEG failed."));
++ *ret = GST_FLOW_ERROR;
++ }
++
++beach:
++ GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
++ *ret, *outbuf, len);
++ return len;
++
++ /* ERRORS */
++clipped:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ goto beach;
++ }
++}
++
++/* gst_ffmpegdec_frame:
++ * ffmpegdec:
++ * data: pointer to the data to decode
++ * size: size of data in bytes
++ * got_data: 0 if no data was decoded, != 0 otherwise.
++ * in_time: timestamp of data
++ * in_duration: duration of data
++ * ret: GstFlowReturn to return in the chain function
++ *
++ * Decode the given frame and pushes it downstream.
++ *
++ * Returns: Number of bytes used in decoding, -1 on error/failure.
++ */
++
++static gint
++gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
++ guint8 * data, guint size, gint * got_data, const GstTSInfo * dec_info,
++ GstFlowReturn * ret)
++{
++ GstFFMpegDecClass *oclass;
++ GstBuffer *outbuf = NULL;
++ gint have_data = 0, len = 0;
++
++ if (G_UNLIKELY (ffmpegdec->context->codec == NULL))
++ goto no_codec;
++
++ GST_LOG_OBJECT (ffmpegdec, "data:%p, size:%d, id:%d", data, size,
++ dec_info->idx);
++
++ *ret = GST_FLOW_OK;
++ ffmpegdec->context->frame_number++;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ len =
++ gst_ffmpegdec_video_frame (ffmpegdec, data, size, dec_info, &outbuf,
++ ret);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ len =
++ gst_ffmpegdec_audio_frame (ffmpegdec, oclass->in_plugin, data, size,
++ dec_info, &outbuf, ret);
++
++ /* if we did not get an output buffer and we have a pending discont, don't
++ * clear the input timestamps, we will put them on the next buffer because
++ * else we might create the first buffer with a very big timestamp gap. */
++ if (outbuf == NULL && ffmpegdec->discont) {
++ GST_DEBUG_OBJECT (ffmpegdec, "no buffer but keeping timestamp");
++ ffmpegdec->clear_ts = FALSE;
++ }
++ break;
++ default:
++ GST_ERROR_OBJECT (ffmpegdec, "Asked to decode non-audio/video frame !");
++ g_assert_not_reached ();
++ break;
++ }
++
++ if (outbuf)
++ have_data = 1;
++
++ if (len < 0 || have_data < 0) {
++ GST_WARNING_OBJECT (ffmpegdec,
++ "ffdec_%s: decoding error (len: %d, have_data: %d)",
++ oclass->in_plugin->name, len, have_data);
++ *got_data = 0;
++ goto beach;
++ } else if (len == 0 && have_data == 0) {
++ *got_data = 0;
++ goto beach;
++ } else {
++ /* this is where I lost my last clue on ffmpeg... */
++ *got_data = 1;
++ }
++
++ if (outbuf) {
++ GST_LOG_OBJECT (ffmpegdec,
++ "Decoded data, now pushing buffer %p with offset %" G_GINT64_FORMAT
++ ", timestamp %" GST_TIME_FORMAT " and duration %" GST_TIME_FORMAT,
++ outbuf, GST_BUFFER_OFFSET (outbuf),
++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
++ GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
++
++ /* mark pending discont */
++ if (ffmpegdec->discont) {
++ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
++ ffmpegdec->discont = FALSE;
++ }
++
++ if (ffmpegdec->segment.rate > 0.0) {
++ /* and off we go */
++ *ret = gst_pad_push (ffmpegdec->srcpad, outbuf);
++ } else {
++ /* reverse playback, queue frame till later when we get a discont. */
++ GST_DEBUG_OBJECT (ffmpegdec, "queued frame");
++ ffmpegdec->queued = g_list_prepend (ffmpegdec->queued, outbuf);
++ *ret = GST_FLOW_OK;
++ }
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "We didn't get a decoded buffer");
++ }
++
++beach:
++ return len;
++
++ /* ERRORS */
++no_codec:
++ {
++ GST_ERROR_OBJECT (ffmpegdec, "no codec context");
++ return -1;
++ }
++}
++
++static void
++gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
++ gint have_data, len, try = 0;
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "codec has delay capabilities, calling until ffmpeg has drained everything");
++
++ do {
++ GstFlowReturn ret;
++
++ len =
++ gst_ffmpegdec_frame (ffmpegdec, NULL, 0, &have_data, &ts_info_none,
++ &ret);
++ if (len < 0 || have_data == 0)
++ break;
++ } while (try++ < 10);
++ }
++ if (ffmpegdec->segment.rate < 0.0) {
++ /* if we have some queued frames for reverse playback, flush them now */
++ flush_queued (ffmpegdec);
++ }
++}
++
++static void
++gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
++{
++ if (ffmpegdec->pctx) {
++ gint size, bsize;
++ guint8 *data;
++ guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE];
++
++ bsize = FF_INPUT_BUFFER_PADDING_SIZE;
++ memset (bdata, 0, bsize);
++
++ /* parse some dummy data to work around some ffmpeg weirdness where it keeps
++ * the previous pts around */
++ av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
++ &data, &size, bdata, bsize, -1, -1, -1);
++ ffmpegdec->pctx->pts = -1;
++ ffmpegdec->pctx->dts = -1;
++ }
++
++ if (ffmpegdec->pcache) {
++ gst_buffer_unref (ffmpegdec->pcache);
++ ffmpegdec->pcache = NULL;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegDec *ffmpegdec;
++ gboolean ret = FALSE;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
++ GST_EVENT_TYPE_NAME (event));
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_EOS:
++ {
++ gst_ffmpegdec_drain (ffmpegdec);
++ break;
++ }
++ case GST_EVENT_FLUSH_STOP:
++ {
++ if (ffmpegdec->opened) {
++ avcodec_flush_buffers (ffmpegdec->context);
++ }
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ gst_ffmpegdec_reset_qos (ffmpegdec);
++ gst_ffmpegdec_flush_pcache (ffmpegdec);
++ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
++ clear_queued (ffmpegdec);
++ break;
++ }
++ case GST_EVENT_NEWSEGMENT:
++ {
++ gboolean update;
++ GstFormat fmt;
++ gint64 start, stop, time;
++ gdouble rate, arate;
++
++ gst_event_parse_new_segment_full (event, &update, &rate, &arate, &fmt,
++ &start, &stop, &time);
++
++ switch (fmt) {
++ case GST_FORMAT_TIME:
++ /* fine, our native segment format */
++ break;
++ case GST_FORMAT_BYTES:
++ {
++ gint bit_rate;
++
++ bit_rate = ffmpegdec->context->bit_rate;
++
++ /* convert to time or fail */
++ if (!bit_rate)
++ goto no_bitrate;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "bitrate: %d", bit_rate);
++
++ /* convert values to TIME */
++ if (start != -1)
++ start = gst_util_uint64_scale_int (start, GST_SECOND, bit_rate);
++ if (stop != -1)
++ stop = gst_util_uint64_scale_int (stop, GST_SECOND, bit_rate);
++ if (time != -1)
++ time = gst_util_uint64_scale_int (time, GST_SECOND, bit_rate);
++
++ /* unref old event */
++ gst_event_unref (event);
++
++ /* create new converted time segment */
++ fmt = GST_FORMAT_TIME;
++ /* FIXME, bitrate is not good enough too find a good stop, let's
++ * hope start and time were 0... meh. */
++ stop = -1;
++ event = gst_event_new_new_segment (update, rate, fmt,
++ start, stop, time);
++ break;
++ }
++ default:
++ /* invalid format */
++ goto invalid_format;
++ }
++
++ /* drain pending frames before trying to use the new segment, queued
++ * buffers belonged to the previous segment. */
++ if (ffmpegdec->context->codec)
++ gst_ffmpegdec_drain (ffmpegdec);
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "NEWSEGMENT in time start %" GST_TIME_FORMAT " -- stop %"
++ GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
++
++ /* and store the values */
++ gst_segment_set_newsegment_full (&ffmpegdec->segment, update,
++ rate, arate, fmt, start, stop, time);
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* and push segment downstream */
++ ret = gst_pad_push_event (ffmpegdec->srcpad, event);
++
++done:
++ gst_object_unref (ffmpegdec);
++
++ return ret;
++
++ /* ERRORS */
++no_bitrate:
++ {
++ GST_WARNING_OBJECT (ffmpegdec, "no bitrate to convert BYTES to TIME");
++ gst_event_unref (event);
++ goto done;
++ }
++invalid_format:
++ {
++ GST_WARNING_OBJECT (ffmpegdec, "unknown format received in NEWSEGMENT");
++ gst_event_unref (event);
++ goto done;
++ }
++}
++
++static GstFlowReturn
++gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstFFMpegDecClass *oclass;
++ guint8 *data, *bdata;
++ gint size, bsize, len, have_data;
++ GstFlowReturn ret = GST_FLOW_OK;
++ GstClockTime in_timestamp;
++ GstClockTime in_duration;
++ gboolean discont;
++ gint64 in_offset;
++ const GstTSInfo *in_info;
++ const GstTSInfo *dec_info;
++
++ ffmpegdec = (GstFFMpegDec *) (GST_PAD_PARENT (pad));
++
++ if (G_UNLIKELY (!ffmpegdec->opened))
++ goto not_negotiated;
++
++ discont = GST_BUFFER_IS_DISCONT (inbuf);
++
++ /* The discont flags marks a buffer that is not continuous with the previous
++ * buffer. This means we need to clear whatever data we currently have. We
++ * currently also wait for a new keyframe, which might be suboptimal in the
++ * case of a network error, better show the errors than to drop all data.. */
++ if (G_UNLIKELY (discont)) {
++ GST_DEBUG_OBJECT (ffmpegdec, "received DISCONT");
++ /* drain what we have queued */
++ gst_ffmpegdec_drain (ffmpegdec);
++ gst_ffmpegdec_flush_pcache (ffmpegdec);
++ avcodec_flush_buffers (ffmpegdec->context);
++ ffmpegdec->discont = TRUE;
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ }
++ /* by default we clear the input timestamp after decoding each frame so that
++ * interpollation can work. */
++ ffmpegdec->clear_ts = TRUE;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ /* parse cache joining. If there is cached data */
++ if (ffmpegdec->pcache) {
++ /* join with previous data */
++ GST_LOG_OBJECT (ffmpegdec, "join parse cache");
++ inbuf = gst_buffer_join (ffmpegdec->pcache, inbuf);
++ /* no more cached data, we assume we can consume the complete cache */
++ ffmpegdec->pcache = NULL;
++ }
++
++ in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
++ in_duration = GST_BUFFER_DURATION (inbuf);
++ in_offset = GST_BUFFER_OFFSET (inbuf);
++
++ /* get handle to timestamp info, we can pass this around to ffmpeg */
++ in_info = gst_ts_info_store (ffmpegdec, in_timestamp, in_duration, in_offset);
++
++ if (in_timestamp != -1) {
++ /* check for increasing timestamps if they are jumping backwards, we
++ * probably are dealing with PTS as timestamps */
++ if (!ffmpegdec->reordered_in && ffmpegdec->last_in != -1) {
++ if (in_timestamp < ffmpegdec->last_in) {
++ GST_LOG_OBJECT (ffmpegdec, "detected reordered input timestamps");
++ ffmpegdec->reordered_in = TRUE;
++ ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
++ } else if (in_timestamp > ffmpegdec->last_in) {
++ GstClockTime diff;
++ /* keep track of timestamp diff to estimate duration */
++ diff = in_timestamp - ffmpegdec->last_in;
++ /* need to scale with amount of frames in the interval */
++ if (ffmpegdec->last_frames)
++ diff /= ffmpegdec->last_frames;
++
++ GST_LOG_OBJECT (ffmpegdec, "estimated duration %" GST_TIME_FORMAT " %u",
++ GST_TIME_ARGS (diff), ffmpegdec->last_frames);
++
++ ffmpegdec->last_diff = diff;
++ }
++ }
++ ffmpegdec->last_in = in_timestamp;
++ ffmpegdec->last_frames = 0;
++ }
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Received new data of size %u, offset:%" G_GUINT64_FORMAT ", ts:%"
++ GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT ", info %d",
++ GST_BUFFER_SIZE (inbuf), GST_BUFFER_OFFSET (inbuf),
++ GST_TIME_ARGS (in_timestamp), GST_TIME_ARGS (in_duration), in_info->idx);
++
++ /* workarounds, functions write to buffers:
++ * libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
++ * libavcodec/svq3.c:svq3_decode_slice_header too.
++ * ffmpeg devs know about it and will fix it (they said). */
++ if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
++ oclass->in_plugin->id == CODEC_ID_SVQ3) {
++ inbuf = gst_buffer_make_writable (inbuf);
++ }
++
++ bdata = GST_BUFFER_DATA (inbuf);
++ bsize = GST_BUFFER_SIZE (inbuf);
++
++ if (ffmpegdec->do_padding) {
++ /* add padding */
++ if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
++ ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
++ ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size);
++ GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d",
++ ffmpegdec->padded_size);
++ }
++ memcpy (ffmpegdec->padded, bdata, bsize);
++ memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++
++ bdata = ffmpegdec->padded;
++ }
++
++ do {
++ guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE];
++
++ /* parse, if at all possible */
++ if (ffmpegdec->pctx) {
++ gint res;
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Calling av_parser_parse2 with offset %" G_GINT64_FORMAT ", ts:%"
++ GST_TIME_FORMAT " size %d", in_offset, GST_TIME_ARGS (in_timestamp),
++ bsize);
++
++ /* feed the parser. We pass the timestamp info so that we can recover all
++ * info again later */
++ res = av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
++ &data, &size, bdata, bsize, in_info->idx, in_info->idx, in_offset);
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "parser returned res %d and size %d, id %" G_GINT64_FORMAT, res, size,
++ ffmpegdec->pctx->pts);
++
++ /* store pts for decoding */
++ if (ffmpegdec->pctx->pts != AV_NOPTS_VALUE && ffmpegdec->pctx->pts != -1)
++ dec_info = gst_ts_info_get (ffmpegdec, ffmpegdec->pctx->pts);
++ else {
++ /* ffmpeg sometimes loses track after a flush, help it by feeding a
++ * valid start time */
++ ffmpegdec->pctx->pts = in_info->idx;
++ ffmpegdec->pctx->dts = in_info->idx;
++ dec_info = in_info;
++ }
++
++ GST_LOG_OBJECT (ffmpegdec, "consuming %d bytes. id %d", size,
++ dec_info->idx);
++
++ if (res) {
++ /* there is output, set pointers for next round. */
++ bsize -= res;
++ bdata += res;
++ } else {
++ /* Parser did not consume any data, make sure we don't clear the
++ * timestamp for the next round */
++ ffmpegdec->clear_ts = FALSE;
++ }
++
++ /* if there is no output, we must break and wait for more data. also the
++ * timestamp in the context is not updated. */
++ if (size == 0) {
++ if (bsize > 0)
++ continue;
++ else
++ break;
++ }
++ } else {
++ data = bdata;
++ size = bsize;
++
++ dec_info = in_info;
++ }
++
++ if (ffmpegdec->do_padding) {
++ /* add temporary padding */
++ memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ }
++
++ /* decode a frame of audio/video now */
++ len =
++ gst_ffmpegdec_frame (ffmpegdec, data, size, &have_data, dec_info, &ret);
++
++ if (ffmpegdec->do_padding) {
++ memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
++ }
++
++ if (ret != GST_FLOW_OK) {
++ GST_LOG_OBJECT (ffmpegdec, "breaking because of flow ret %s",
++ gst_flow_get_name (ret));
++ /* bad flow retun, make sure we discard all data and exit */
++ bsize = 0;
++ break;
++ }
++ if (!ffmpegdec->pctx) {
++ if (len == 0 && !have_data) {
++ /* nothing was decoded, this could be because no data was available or
++ * because we were skipping frames.
++ * If we have no context we must exit and wait for more data, we keep the
++ * data we tried. */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding didn't return any data, breaking");
++ break;
++ } else if (len < 0) {
++ /* a decoding error happened, we must break and try again with next data. */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding error, breaking");
++ bsize = 0;
++ break;
++ }
++ /* prepare for the next round, for codecs with a context we did this
++ * already when using the parser. */
++ bsize -= len;
++ bdata += len;
++ } else {
++ if (len == 0) {
++ /* nothing was decoded, this could be because no data was available or
++ * because we were skipping frames. Since we have a parser we can
++ * continue with the next frame */
++ GST_LOG_OBJECT (ffmpegdec,
++ "Decoding didn't return any data, trying next");
++ } else if (len < 0) {
++ /* we have a context that will bring us to the next frame */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding error, trying next");
++ }
++ }
++
++ /* make sure we don't use the same old timestamp for the next frame and let
++ * the interpollation take care of it. */
++ if (ffmpegdec->clear_ts) {
++ in_timestamp = GST_CLOCK_TIME_NONE;
++ in_duration = GST_CLOCK_TIME_NONE;
++ in_offset = GST_BUFFER_OFFSET_NONE;
++ in_info = GST_TS_INFO_NONE;
++ } else {
++ ffmpegdec->clear_ts = TRUE;
++ }
++ ffmpegdec->last_frames++;
++
++ GST_LOG_OBJECT (ffmpegdec, "Before (while bsize>0). bsize:%d , bdata:%p",
++ bsize, bdata);
++ } while (bsize > 0);
++
++ /* keep left-over */
++ if (ffmpegdec->pctx && bsize > 0) {
++ in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
++ in_offset = GST_BUFFER_OFFSET (inbuf);
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Keeping %d bytes of data with offset %" G_GINT64_FORMAT ", timestamp %"
++ GST_TIME_FORMAT, bsize, in_offset, GST_TIME_ARGS (in_timestamp));
++
++ ffmpegdec->pcache = gst_buffer_create_sub (inbuf,
++ GST_BUFFER_SIZE (inbuf) - bsize, bsize);
++ /* we keep timestamp, even though all we really know is that the correct
++ * timestamp is not below the one from inbuf */
++ GST_BUFFER_TIMESTAMP (ffmpegdec->pcache) = in_timestamp;
++ GST_BUFFER_OFFSET (ffmpegdec->pcache) = in_offset;
++ } else if (bsize > 0) {
++ GST_DEBUG_OBJECT (ffmpegdec, "Dropping %d bytes of data", bsize);
++ }
++ gst_buffer_unref (inbuf);
++
++ return ret;
++
++ /* ERRORS */
++not_negotiated:
++ {
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
++ ("ffdec_%s: input format was not set before data start",
++ oclass->in_plugin->name));
++ gst_buffer_unref (inbuf);
++ return GST_FLOW_NOT_NEGOTIATED;
++ }
++}
++
++static GstStateChangeReturn
++gst_ffmpegdec_change_state (GstElement * element, GstStateChange transition)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) element;
++ GstStateChangeReturn ret;
++
++ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ GST_OBJECT_LOCK (ffmpegdec);
++ gst_ffmpegdec_close (ffmpegdec);
++ GST_OBJECT_UNLOCK (ffmpegdec);
++ clear_queued (ffmpegdec);
++ g_free (ffmpegdec->padded);
++ ffmpegdec->padded = NULL;
++ ffmpegdec->padded_size = 0;
++ ffmpegdec->can_allocate_aligned = TRUE;
++ break;
++ default:
++ break;
++ }
++
++ return ret;
++}
++
++static void
++gst_ffmpegdec_set_property (GObject * object,
++ guint prop_id, const GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ switch (prop_id) {
++ case PROP_LOWRES:
++ ffmpegdec->lowres = ffmpegdec->context->lowres = g_value_get_enum (value);
++ break;
++ case PROP_SKIPFRAME:
++ ffmpegdec->skip_frame = ffmpegdec->context->skip_frame =
++ g_value_get_enum (value);
++ break;
++ case PROP_DIRECT_RENDERING:
++ ffmpegdec->direct_rendering = g_value_get_boolean (value);
++ break;
++ case PROP_DO_PADDING:
++ ffmpegdec->do_padding = g_value_get_boolean (value);
++ break;
++ case PROP_DEBUG_MV:
++ ffmpegdec->debug_mv = ffmpegdec->context->debug_mv =
++ g_value_get_boolean (value);
++ break;
++ case PROP_CROP:
++ ffmpegdec->crop = g_value_get_boolean (value);
++ break;
++ case PROP_MAX_THREADS:
++ ffmpegdec->max_threads = g_value_get_int (value);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
++gst_ffmpegdec_get_property (GObject * object,
++ guint prop_id, GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ switch (prop_id) {
++ case PROP_LOWRES:
++ g_value_set_enum (value, ffmpegdec->context->lowres);
++ break;
++ case PROP_SKIPFRAME:
++ g_value_set_enum (value, ffmpegdec->context->skip_frame);
++ break;
++ case PROP_DIRECT_RENDERING:
++ g_value_set_boolean (value, ffmpegdec->direct_rendering);
++ break;
++ case PROP_DO_PADDING:
++ g_value_set_boolean (value, ffmpegdec->do_padding);
++ break;
++ case PROP_DEBUG_MV:
++ g_value_set_boolean (value, ffmpegdec->context->debug_mv);
++ break;
++ case PROP_CROP:
++ g_value_set_boolean (value, ffmpegdec->crop);
++ break;
++ case PROP_MAX_THREADS:
++ g_value_set_int (value, ffmpegdec->max_threads);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++gboolean
++gst_ffmpegdec_register (GstPlugin * plugin)
++{
++ GTypeInfo typeinfo = {
++ sizeof (GstFFMpegDecClass),
++ (GBaseInitFunc) gst_ffmpegdec_base_init,
++ NULL,
++ (GClassInitFunc) gst_ffmpegdec_class_init,
++ NULL,
++ NULL,
++ sizeof (GstFFMpegDec),
++ 0,
++ (GInstanceInitFunc) gst_ffmpegdec_init,
++ };
++ GType type;
++ AVCodec *in_plugin;
++ gint rank;
++
++ in_plugin = av_codec_next (NULL);
++
++ GST_LOG ("Registering decoders");
++
++ while (in_plugin) {
++ gchar *type_name;
++ gchar *plugin_name;
++
++ /* only decoders */
++ if (!in_plugin->decode) {
++ goto next;
++ }
++
++ /* no quasi-codecs, please */
++ if (in_plugin->id == CODEC_ID_RAWVIDEO ||
++ in_plugin->id == CODEC_ID_V210 ||
++ in_plugin->id == CODEC_ID_V210X ||
++ in_plugin->id == CODEC_ID_R210 ||
++ (in_plugin->id >= CODEC_ID_PCM_S16LE &&
++ in_plugin->id <= CODEC_ID_PCM_BLURAY)) {
++ goto next;
++ }
++
++ /* No decoders depending on external libraries (we don't build them, but
++ * people who build against an external ffmpeg might have them.
++ * We have native gstreamer plugins for all of those libraries anyway. */
++ if (!strncmp (in_plugin->name, "lib", 3)) {
++ GST_DEBUG
++ ("Not using external library decoder %s. Use the gstreamer-native ones instead.",
++ in_plugin->name);
++ goto next;
++ }
++
++ /* No vdpau plugins until we can figure out how to properly use them
++ * outside of ffmpeg. */
++ if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
++ GST_DEBUG
++ ("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
++ in_plugin->name);
++ goto next;
++ }
++
++ if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
++ GST_DEBUG
++ ("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
++ in_plugin->name);
++ goto next;
++ }
++
++ GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
++
++ /* no codecs for which we're GUARANTEED to have better alternatives */
++ /* MPEG1VIDEO : the mpeg2video decoder is preferred */
++ /* MP1 : Use MP3 for decoding */
++ /* MP2 : Use MP3 for decoding */
++ /* Theora: Use libtheora based theoradec */
++ if (!strcmp (in_plugin->name, "gif") ||
++ !strcmp (in_plugin->name, "vorbis") ||
++ !strcmp (in_plugin->name, "theora") ||
++ !strcmp (in_plugin->name, "mpeg1video") ||
++ !strcmp (in_plugin->name, "wavpack") ||
++ !strcmp (in_plugin->name, "mp1") ||
++ !strcmp (in_plugin->name, "mp2") ||
++ !strcmp (in_plugin->name, "libfaad") ||
++ !strcmp (in_plugin->name, "mpeg4aac") ||
++ !strcmp (in_plugin->name, "ass") ||
++ !strcmp (in_plugin->name, "srt") ||
++ !strcmp (in_plugin->name, "pgssub") ||
++ !strcmp (in_plugin->name, "dvdsub") ||
++ !strcmp (in_plugin->name, "dvbsub")) {
++ GST_LOG ("Ignoring decoder %s", in_plugin->name);
++ goto next;
++ }
++
++ /* construct the type */
++ plugin_name = g_strdup ((gchar *) in_plugin->name);
++ g_strdelimit (plugin_name, NULL, '_');
++ type_name = g_strdup_printf ("ffdec_%s", plugin_name);
++ g_free (plugin_name);
++
++ type = g_type_from_name (type_name);
++
++ if (!type) {
++ /* create the gtype now */
++ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
++ g_type_set_qdata (type, GST_FFDEC_PARAMS_QDATA, (gpointer) in_plugin);
++ }
++
++ /* (Ronald) MPEG-4 gets a higher priority because it has been well-
++ * tested and by far outperforms divxdec/xviddec - so we prefer it.
++ * msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
++ * VC1/WMV3 are not working and thus unpreferred for now. */
++ switch (in_plugin->id) {
++ case CODEC_ID_MPEG4:
++ case CODEC_ID_MSMPEG4V3:
++ case CODEC_ID_H264:
++ case CODEC_ID_RA_144:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ case CODEC_ID_COOK:
++ rank = GST_RANK_SECONDARY;
++ break;
++ /* DVVIDEO: we have a good dv decoder, fast on both ppc as well as x86.
++ * They say libdv's quality is better though. leave as secondary.
++ * note: if you change this, see the code in gstdv.c in good/ext/dv.
++ *
++ * SIPR: decoder should have a higher rank than realaudiodec.
++ */
++ case CODEC_ID_DVVIDEO:
++ case CODEC_ID_SIPR:
++ rank = GST_RANK_SECONDARY;
++ break;
++ case CODEC_ID_MP3:
++ rank = GST_RANK_NONE;
++ break;
++ /* TEMPORARILY DISABLING AC3/EAC3/DTS for 0.10.12 release
++ * due to downmixing failure.
++ * See Bug #608892 for more details */
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ case CODEC_ID_DTS:
++ rank = GST_RANK_NONE;
++ break;
++ default:
++ rank = GST_RANK_MARGINAL;
++ break;
++ }
++ if (!gst_element_register (plugin, type_name, rank, type)) {
++ g_warning ("Failed to register %s", type_name);
++ g_free (type_name);
++ return FALSE;
++ }
++
++ g_free (type_name);
++
++ next:
++ in_plugin = av_codec_next (in_plugin);
++ }
++
++ GST_LOG ("Finished Registering decoders");
++
++ return TRUE;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej 2014-08-08 15:26:38.471858652 +0200
+@@ -0,0 +1,11 @@
++--- ext/ffmpeg/gstffmpegdec.c
+++++ ext/ffmpeg/gstffmpegdec.c
++@@ -1565,7 +1564,7 @@
++ gst_message_new_latency (GST_OBJECT_CAST (ffmpegdec)));
++ }
++
++- is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
+++ is_itype = (ffmpegdec->picture->pict_type == AV_PICTURE_TYPE_I);
++ is_reference = (ffmpegdec->picture->reference == 1);
++
++ iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c 2014-08-08 15:26:07.874857555 +0200
+@@ -343,8 +343,11 @@
+ demux->audiopads = 0;
+
+ /* close demuxer context from ffmpeg */
+- av_close_input_file (demux->context);
+- demux->context = NULL;
++ if (demux->seekable)
++ gst_ffmpegdata_close (demux->context->pb);
++ else
++ gst_ffmpeg_pipe_close (demux->context->pb);
++ avformat_close_input (&demux->context);
+
+ GST_OBJECT_LOCK (demux);
+ demux->opened = FALSE;
+@@ -1146,9 +1149,9 @@
+ static gboolean
+ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
+ {
++ AVIOContext *iocontext = NULL;
+ GstFFMpegDemuxClass *oclass =
+ (GstFFMpegDemuxClass *) G_OBJECT_GET_CLASS (demux);
+- gchar *location;
+ gint res, n_streams, i;
+ #if 0
+ /* Re-enable once converted to new AVMetaData API
+@@ -1164,15 +1167,14 @@
+
+ /* open via our input protocol hack */
+ if (demux->seekable)
+- location = g_strdup_printf ("gstreamer://%p", demux->sinkpad);
++ res = gst_ffmpegdata_open (demux->sinkpad, AVIO_FLAG_READ, &iocontext);
+ else
+- location = g_strdup_printf ("gstpipe://%p", &demux->ffpipe);
+- GST_DEBUG_OBJECT (demux, "about to call av_open_input_file %s", location);
++ res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
+
+- res = av_open_input_file (&demux->context, location,
+- oclass->in_plugin, 0, NULL);
++ demux->context = avformat_alloc_context ();
++ demux->context->pb = iocontext;
++ res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);
+
+- g_free (location);
+ GST_DEBUG_OBJECT (demux, "av_open_input returned %d", res);
+ if (res < 0)
+ goto open_failed;
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c 2014-08-08 15:32:18.608870847 +0200
+@@ -770,7 +770,7 @@
+ GST_OBJECT_UNLOCK (ffmpegenc);
+
+ if (force_keyframe)
+- ffmpegenc->picture->pict_type = FF_I_TYPE;
++ ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
+
+ frame_size = gst_ffmpeg_avpicture_fill ((AVPicture *) ffmpegenc->picture,
+ GST_BUFFER_DATA (inbuf),
+@@ -1136,7 +1136,7 @@
+ const GstStructure *s;
+ s = gst_event_get_structure (event);
+ if (gst_structure_has_name (s, "GstForceKeyUnit")) {
+- ffmpegenc->picture->pict_type = FF_I_TYPE;
++ ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
+ }
+ break;
+ }
+@@ -1339,7 +1339,7 @@
+ }
+
+ /* only encoders */
+- if (!in_plugin->encode) {
++ if (!av_codec_is_encoder (in_plugin)) {
+ goto next;
+ }
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c 2014-08-08 15:26:07.874857555 +0200
+@@ -24,8 +24,10 @@
+ #include <string.h>
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avformat.h>
++#include <opt.h>
+ #else
+ #include <libavformat/avformat.h>
++#include <libavutil/opt.h>
+ #endif
+
+ #include <gst/gst.h>
+@@ -336,9 +338,6 @@
+ ffmpegmux->context = g_new0 (AVFormatContext, 1);
+ ffmpegmux->context->oformat = oclass->in_plugin;
+ ffmpegmux->context->nb_streams = 0;
+- g_snprintf (ffmpegmux->context->filename,
+- sizeof (ffmpegmux->context->filename),
+- "gstreamer://%p", ffmpegmux->srcpad);
+ ffmpegmux->opened = FALSE;
+
+ ffmpegmux->videopads = 0;
+@@ -450,10 +449,10 @@
+ gst_element_add_pad (element, pad);
+
+ /* AVStream needs to be created */
+- st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
++ st = avformat_new_stream (ffmpegmux->context, NULL);
++ st->id = collect_pad->padnum;
+ st->codec->codec_type = type;
+ st->codec->codec_id = CODEC_ID_NONE; /* this is a check afterwards */
+- st->stream_copy = 1; /* we're not the actual encoder */
+ st->codec->bit_rate = bitrate;
+ st->codec->frame_size = framesize;
+ /* we fill in codec during capsnego */
+@@ -485,7 +484,7 @@
+ collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
+
+ st = ffmpegmux->context->streams[collect_pad->padnum];
+- ffmpegmux->context->preload = ffmpegmux->preload;
++ av_opt_set_int (&ffmpegmux->context, "preload", ffmpegmux->preload, 0);
+ ffmpegmux->context->max_delay = ffmpegmux->max_delay;
+
+ /* for the format-specific guesses, we'll go to
+@@ -552,7 +551,7 @@
+
+ /* open "file" (gstreamer protocol to next element) */
+ if (!ffmpegmux->opened) {
+- int open_flags = URL_WRONLY;
++ int open_flags = AVIO_FLAG_WRITE;
+
+ /* we do need all streams to have started capsnego,
+ * or things will go horribly wrong */
+@@ -646,19 +645,13 @@
+ open_flags |= GST_FFMPEG_URL_STREAMHEADER;
+ }
+
+- if (url_fopen (&ffmpegmux->context->pb,
+- ffmpegmux->context->filename, open_flags) < 0) {
++ if (gst_ffmpegdata_open (ffmpegmux->srcpad, open_flags,
++ &ffmpegmux->context->pb) < 0) {
+ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
+ ("Failed to open stream context in ffmux"));
+ return GST_FLOW_ERROR;
+ }
+
+- if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
+- GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
+- ("Failed to initialize muxer"));
+- return GST_FLOW_ERROR;
+- }
+-
+ /* now open the mux format */
+ if (av_write_header (ffmpegmux->context) < 0) {
+ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
+@@ -670,7 +663,7 @@
+ ffmpegmux->opened = TRUE;
+
+ /* flush the header so it will be used as streamheader */
+- put_flush_packet (ffmpegmux->context->pb);
++ avio_flush (ffmpegmux->context->pb);
+ }
+
+ /* take the one with earliest timestamp,
+@@ -770,8 +763,8 @@
+ /* close down */
+ av_write_trailer (ffmpegmux->context);
+ ffmpegmux->opened = FALSE;
+- put_flush_packet (ffmpegmux->context->pb);
+- url_fclose (ffmpegmux->context->pb);
++ avio_flush (ffmpegmux->context->pb);
++ gst_ffmpegdata_close (ffmpegmux->context->pb);
+ gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
+ return GST_FLOW_UNEXPECTED;
+ }
+@@ -795,6 +788,10 @@
+ break;
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+ gst_collect_pads_stop (ffmpegmux->collect);
++ if (ffmpegmux->opened) {
++ ffmpegmux->opened = FALSE;
++ gst_ffmpegdata_close (ffmpegmux->context->pb);
++ }
+ break;
+ default:
+ break;
+@@ -809,7 +806,7 @@
+ gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
+ if (ffmpegmux->opened) {
+ ffmpegmux->opened = FALSE;
+- url_fclose (ffmpegmux->context->pb);
++ avio_close (ffmpegmux->context->pb);
+ }
+ break;
+ case GST_STATE_CHANGE_READY_TO_NULL:
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig 2011-07-13 11:07:28.000000000 +0200
+@@ -0,0 +1,970 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <string.h>
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avformat.h>
++#else
++#include <libavformat/avformat.h>
++#endif
++
++#include <gst/gst.h>
++#include <gst/base/gstcollectpads.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++#include "gstffmpegutils.h"
++
++typedef struct _GstFFMpegMux GstFFMpegMux;
++typedef struct _GstFFMpegMuxPad GstFFMpegMuxPad;
++
++struct _GstFFMpegMuxPad
++{
++ GstCollectData collect; /* we extend the CollectData */
++
++ gint padnum;
++};
++
++struct _GstFFMpegMux
++{
++ GstElement element;
++
++ GstCollectPads *collect;
++ /* We need to keep track of our pads, so we do so here. */
++ GstPad *srcpad;
++
++ AVFormatContext *context;
++ gboolean opened;
++
++ gint videopads, audiopads;
++
++ /*< private > */
++ /* event_function is the collectpads default eventfunction */
++ GstPadEventFunction event_function;
++ int preload;
++ int max_delay;
++};
++
++typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
++
++struct _GstFFMpegMuxClass
++{
++ GstElementClass parent_class;
++
++ AVOutputFormat *in_plugin;
++};
++
++#define GST_TYPE_FFMPEGMUX \
++ (gst_ffmpegdec_get_type())
++#define GST_FFMPEGMUX(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGMUX,GstFFMpegMux))
++#define GST_FFMPEGMUX_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGMUX,GstFFMpegMuxClass))
++#define GST_IS_FFMPEGMUX(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGMUX))
++#define GST_IS_FFMPEGMUX_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGMUX))
++
++enum
++{
++ /* FILL ME */
++ LAST_SIGNAL
++};
++
++enum
++{
++ ARG_0,
++ /* FILL ME */
++};
++
++enum
++{
++ PROP_0,
++ PROP_PRELOAD,
++ PROP_MAXDELAY
++};
++
++/* A number of function prototypes are given so we can refer to them later. */
++static void gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass);
++static void gst_ffmpegmux_base_init (gpointer g_class);
++static void gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux,
++ GstFFMpegMuxClass * g_class);
++static void gst_ffmpegmux_finalize (GObject * object);
++
++static gboolean gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps);
++static GstPad *gst_ffmpegmux_request_new_pad (GstElement * element,
++ GstPadTemplate * templ, const gchar * name);
++static GstFlowReturn gst_ffmpegmux_collected (GstCollectPads * pads,
++ gpointer user_data);
++
++static gboolean gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event);
++
++static GstStateChangeReturn gst_ffmpegmux_change_state (GstElement * element,
++ GstStateChange transition);
++
++static void gst_ffmpegmux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * pspec);
++static void gst_ffmpegmux_get_property (GObject * object, guint prop_id,
++ GValue * value, GParamSpec * pspec);
++
++static GstCaps *gst_ffmpegmux_get_id_caps (enum CodecID *id_list);
++static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
++ const gchar * field, guint num, const gint * values);
++
++#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("ffmux-params")
++
++static GstElementClass *parent_class = NULL;
++
++/*static guint gst_ffmpegmux_signals[LAST_SIGNAL] = { 0 }; */
++
++typedef struct
++{
++ const char *name;
++ const char *replacement;
++} GstFFMpegMuxReplacement;
++
++static const char *
++gst_ffmpegmux_get_replacement (const char *name)
++{
++ static const GstFFMpegMuxReplacement blacklist[] = {
++ {"avi", "avimux"},
++ {"matroska", "matroskamux"},
++ {"mov", "qtmux"},
++ {"mpegts", "mpegtsmux"},
++ {"mp4", "mp4mux"},
++ {"mpjpeg", "multipartmux"},
++ {"ogg", "oggmux"},
++ {"wav", "wavenc"},
++ {"webm", "webmmux"},
++ {"mxf", "mxfmux"},
++ {"3gp", "gppmux"},
++ {"yuv4mpegpipe", "y4menc"},
++ {"aiff", "aiffmux"},
++ {"adts", "aacparse"},
++ {"asf", "asfmux"},
++ {"asf_stream", "asfmux"},
++ {"flv", "flvmux"},
++ {"mp3", "id3v2mux"},
++ {"mp2", "id3v2mux"}
++ };
++ int i;
++
++ for (i = 0; i < sizeof (blacklist) / sizeof (blacklist[0]); i++) {
++ if (strcmp (blacklist[i].name, name) == 0) {
++ return blacklist[i].replacement;
++ }
++ }
++
++ return NULL;
++}
++
++static gboolean
++gst_ffmpegmux_is_formatter (const char *name)
++{
++ static const char *replace[] = {
++ "mp2", "mp3", NULL
++ };
++ int i;
++
++ for (i = 0; replace[i]; i++)
++ if (strcmp (replace[i], name) == 0)
++ return TRUE;
++ return FALSE;
++}
++
++static void
++gst_ffmpegmux_base_init (gpointer g_class)
++{
++ GstFFMpegMuxClass *klass = (GstFFMpegMuxClass *) g_class;
++ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
++ GstPadTemplate *videosinktempl, *audiosinktempl, *srctempl;
++ AVOutputFormat *in_plugin;
++ GstCaps *srccaps, *audiosinkcaps, *videosinkcaps;
++ enum CodecID *video_ids = NULL, *audio_ids = NULL;
++ gchar *longname, *description;
++ const char *replacement;
++ gboolean is_formatter;
++
++ in_plugin =
++ (AVOutputFormat *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
++ GST_FFMUX_PARAMS_QDATA);
++ g_assert (in_plugin != NULL);
++
++ /* construct the element details struct */
++ replacement = gst_ffmpegmux_get_replacement (in_plugin->name);
++ is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
++ if (replacement != NULL) {
++ longname =
++ g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
++ in_plugin->long_name, is_formatter ? "formatter" : "muxer",
++ replacement);
++ description =
++ g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
++ in_plugin->long_name, is_formatter ? "formatter" : "muxer",
++ replacement);
++ } else {
++ longname = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
++ is_formatter ? "formatter" : "muxer");
++ description = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
++ is_formatter ? "formatter" : "muxer");
++ }
++ gst_element_class_set_details_simple (element_class, longname,
++ is_formatter ? "Formatter/Metadata" : "Codec/Muxer", description,
++ "Wim Taymans <wim.taymans@chello.be>, "
++ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
++ g_free (longname);
++ g_free (description);
++
++ /* Try to find the caps that belongs here */
++ srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
++ if (!srccaps) {
++ GST_DEBUG ("Couldn't get source caps for muxer '%s', skipping format",
++ in_plugin->name);
++ goto beach;
++ }
++
++ if (!gst_ffmpeg_formatid_get_codecids (in_plugin->name,
++ &video_ids, &audio_ids, in_plugin)) {
++ gst_caps_unref (srccaps);
++ GST_DEBUG
++ ("Couldn't get sink caps for muxer '%s'. Most likely because no input format mapping exists.",
++ in_plugin->name);
++ goto beach;
++ }
++
++ videosinkcaps = video_ids ? gst_ffmpegmux_get_id_caps (video_ids) : NULL;
++ audiosinkcaps = audio_ids ? gst_ffmpegmux_get_id_caps (audio_ids) : NULL;
++
++ /* fix up allowed caps for some muxers */
++ /* FIXME : This should be in gstffmpegcodecmap.c ! */
++ if (strcmp (in_plugin->name, "flv") == 0) {
++ const gint rates[] = { 44100, 22050, 11025 };
++
++ gst_ffmpeg_mux_simple_caps_set_int_list (audiosinkcaps, "rate", 3, rates);
++ } else if (strcmp (in_plugin->name, "gif") == 0) {
++ if (videosinkcaps)
++ gst_caps_unref (videosinkcaps);
++
++ videosinkcaps =
++ gst_caps_from_string ("video/x-raw-rgb, bpp=(int)24, depth=(int)24");
++ }
++
++ /* pad templates */
++ srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
++ gst_element_class_add_pad_template (element_class, srctempl);
++
++ if (audiosinkcaps) {
++ audiosinktempl = gst_pad_template_new ("audio_%d",
++ GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
++ gst_element_class_add_pad_template (element_class, audiosinktempl);
++ }
++
++ if (videosinkcaps) {
++ videosinktempl = gst_pad_template_new ("video_%d",
++ GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
++ gst_element_class_add_pad_template (element_class, videosinktempl);
++ }
++
++beach:
++ klass->in_plugin = in_plugin;
++}
++
++static void
++gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass)
++{
++ GObjectClass *gobject_class;
++ GstElementClass *gstelement_class;
++
++ gobject_class = (GObjectClass *) klass;
++ gstelement_class = (GstElementClass *) klass;
++
++ parent_class = g_type_class_peek_parent (klass);
++
++ gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_set_property);
++ gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_get_property);
++
++ g_object_class_install_property (gobject_class, PROP_PRELOAD,
++ g_param_spec_int ("preload", "preload",
++ "Set the initial demux-decode delay (in microseconds)", 0, G_MAXINT,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (gobject_class, PROP_MAXDELAY,
++ g_param_spec_int ("maxdelay", "maxdelay",
++ "Set the maximum demux-decode delay (in microseconds)", 0, G_MAXINT,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ gstelement_class->request_new_pad = gst_ffmpegmux_request_new_pad;
++ gstelement_class->change_state = gst_ffmpegmux_change_state;
++ gobject_class->finalize = gst_ffmpegmux_finalize;
++}
++
++static void
++gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux, GstFFMpegMuxClass * g_class)
++{
++ GstElementClass *klass = GST_ELEMENT_CLASS (g_class);
++ GstFFMpegMuxClass *oclass = (GstFFMpegMuxClass *) klass;
++ GstPadTemplate *templ = gst_element_class_get_pad_template (klass, "src");
++
++ ffmpegmux->srcpad = gst_pad_new_from_template (templ, "src");
++ gst_pad_set_caps (ffmpegmux->srcpad, gst_pad_template_get_caps (templ));
++ gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
++
++ ffmpegmux->collect = gst_collect_pads_new ();
++ gst_collect_pads_set_function (ffmpegmux->collect,
++ (GstCollectPadsFunction) gst_ffmpegmux_collected, ffmpegmux);
++
++ ffmpegmux->context = g_new0 (AVFormatContext, 1);
++ ffmpegmux->context->oformat = oclass->in_plugin;
++ ffmpegmux->context->nb_streams = 0;
++ g_snprintf (ffmpegmux->context->filename,
++ sizeof (ffmpegmux->context->filename),
++ "gstreamer://%p", ffmpegmux->srcpad);
++ ffmpegmux->opened = FALSE;
++
++ ffmpegmux->videopads = 0;
++ ffmpegmux->audiopads = 0;
++ ffmpegmux->preload = 0;
++ ffmpegmux->max_delay = 0;
++}
++
++static void
++gst_ffmpegmux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegMux *src;
++
++ src = (GstFFMpegMux *) object;
++
++ switch (prop_id) {
++ case PROP_PRELOAD:
++ src->preload = g_value_get_int (value);
++ break;
++ case PROP_MAXDELAY:
++ src->max_delay = g_value_get_int (value);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
++gst_ffmpegmux_get_property (GObject * object, guint prop_id, GValue * value,
++ GParamSpec * pspec)
++{
++ GstFFMpegMux *src;
++
++ src = (GstFFMpegMux *) object;
++
++ switch (prop_id) {
++ case PROP_PRELOAD:
++ g_value_set_int (value, src->preload);
++ break;
++ case PROP_MAXDELAY:
++ g_value_set_int (value, src->max_delay);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++
++static void
++gst_ffmpegmux_finalize (GObject * object)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) object;
++
++ g_free (ffmpegmux->context);
++ gst_object_unref (ffmpegmux->collect);
++
++ if (G_OBJECT_CLASS (parent_class)->finalize)
++ G_OBJECT_CLASS (parent_class)->finalize (object);
++}
++
++static GstPad *
++gst_ffmpegmux_request_new_pad (GstElement * element,
++ GstPadTemplate * templ, const gchar * name)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) element;
++ GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
++ GstFFMpegMuxPad *collect_pad;
++ gchar *padname;
++ GstPad *pad;
++ AVStream *st;
++ enum AVMediaType type;
++ gint bitrate = 0, framesize = 0;
++
++ g_return_val_if_fail (templ != NULL, NULL);
++ g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
++ g_return_val_if_fail (ffmpegmux->opened == FALSE, NULL);
++
++ /* figure out a name that *we* like */
++ if (templ == gst_element_class_get_pad_template (klass, "video_%d")) {
++ padname = g_strdup_printf ("video_%d", ffmpegmux->videopads++);
++ type = AVMEDIA_TYPE_VIDEO;
++ bitrate = 64 * 1024;
++ framesize = 1152;
++ } else if (templ == gst_element_class_get_pad_template (klass, "audio_%d")) {
++ padname = g_strdup_printf ("audio_%d", ffmpegmux->audiopads++);
++ type = AVMEDIA_TYPE_AUDIO;
++ bitrate = 285 * 1024;
++ } else {
++ g_warning ("ffmux: unknown pad template!");
++ return NULL;
++ }
++
++ /* create pad */
++ pad = gst_pad_new_from_template (templ, padname);
++ collect_pad = (GstFFMpegMuxPad *)
++ gst_collect_pads_add_pad (ffmpegmux->collect, pad,
++ sizeof (GstFFMpegMuxPad));
++ collect_pad->padnum = ffmpegmux->context->nb_streams;
++
++ /* small hack to put our own event pad function and chain up to collect pad */
++ ffmpegmux->event_function = GST_PAD_EVENTFUNC (pad);
++ gst_pad_set_event_function (pad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegmux_sink_event));
++
++ gst_pad_set_setcaps_function (pad, GST_DEBUG_FUNCPTR (gst_ffmpegmux_setcaps));
++ gst_element_add_pad (element, pad);
++
++ /* AVStream needs to be created */
++ st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
++ st->codec->codec_type = type;
++ st->codec->codec_id = CODEC_ID_NONE; /* this is a check afterwards */
++ st->stream_copy = 1; /* we're not the actual encoder */
++ st->codec->bit_rate = bitrate;
++ st->codec->frame_size = framesize;
++ /* we fill in codec during capsnego */
++
++ /* we love debug output (c) (tm) (r) */
++ GST_DEBUG ("Created %s pad for ffmux_%s element",
++ padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
++ g_free (padname);
++
++ return pad;
++}
++
++/**
++ * gst_ffmpegmux_setcaps
++ * @pad: #GstPad
++ * @caps: New caps.
++ *
++ * Set caps to pad.
++ *
++ * Returns: #TRUE on success.
++ */
++static gboolean
++gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (gst_pad_get_parent (pad));
++ GstFFMpegMuxPad *collect_pad;
++ AVStream *st;
++
++ collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
++
++ st = ffmpegmux->context->streams[collect_pad->padnum];
++ ffmpegmux->context->preload = ffmpegmux->preload;
++ ffmpegmux->context->max_delay = ffmpegmux->max_delay;
++
++ /* for the format-specific guesses, we'll go to
++ * our famous codec mapper */
++ if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == CODEC_ID_NONE)
++ goto not_accepted;
++
++ /* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
++ * codec aspect. */
++ st->sample_aspect_ratio = st->codec->sample_aspect_ratio;
++
++ GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
++ return TRUE;
++
++ /* ERRORS */
++not_accepted:
++ {
++ GST_LOG_OBJECT (pad, "rejecting caps %" GST_PTR_FORMAT, caps);
++ return FALSE;
++ }
++}
++
++
++static gboolean
++gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) gst_pad_get_parent (pad);
++ gboolean res = TRUE;
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_TAG:{
++ GstTagList *taglist;
++ GstTagSetter *setter = GST_TAG_SETTER (ffmpegmux);
++ const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter);
++
++ gst_event_parse_tag (event, &taglist);
++ gst_tag_setter_merge_tags (setter, taglist, mode);
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* chaining up to collectpads default event function */
++ res = ffmpegmux->event_function (pad, event);
++
++ gst_object_unref (ffmpegmux);
++ return res;
++}
++
++static GstFlowReturn
++gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) user_data;
++ GSList *collected;
++ GstFFMpegMuxPad *best_pad;
++ GstClockTime best_time;
++#if 0
++ /* Re-enable once converted to new AVMetaData API
++ * See #566605
++ */
++ const GstTagList *tags;
++#endif
++
++ /* open "file" (gstreamer protocol to next element) */
++ if (!ffmpegmux->opened) {
++ int open_flags = URL_WRONLY;
++
++ /* we do need all streams to have started capsnego,
++ * or things will go horribly wrong */
++ for (collected = ffmpegmux->collect->data; collected;
++ collected = g_slist_next (collected)) {
++ GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
++ AVStream *st = ffmpegmux->context->streams[collect_pad->padnum];
++
++ /* check whether the pad has successfully completed capsnego */
++ if (st->codec->codec_id == CODEC_ID_NONE) {
++ GST_ELEMENT_ERROR (ffmpegmux, CORE, NEGOTIATION, (NULL),
++ ("no caps set on stream %d (%s)", collect_pad->padnum,
++ (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ?
++ "video" : "audio"));
++ return GST_FLOW_ERROR;
++ }
++ /* set framerate for audio */
++ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
++ switch (st->codec->codec_id) {
++ case CODEC_ID_PCM_S16LE:
++ case CODEC_ID_PCM_S16BE:
++ case CODEC_ID_PCM_U16LE:
++ case CODEC_ID_PCM_U16BE:
++ case CODEC_ID_PCM_S8:
++ case CODEC_ID_PCM_U8:
++ st->codec->frame_size = 1;
++ break;
++ default:
++ {
++ GstBuffer *buffer;
++
++ /* FIXME : This doesn't work for RAW AUDIO...
++ * in fact I'm wondering if it even works for any kind of audio... */
++ buffer = gst_collect_pads_peek (ffmpegmux->collect,
++ (GstCollectData *) collect_pad);
++ if (buffer) {
++ st->codec->frame_size =
++ st->codec->sample_rate *
++ GST_BUFFER_DURATION (buffer) / GST_SECOND;
++ gst_buffer_unref (buffer);
++ }
++ }
++ }
++ }
++ }
++
++#if 0
++ /* Re-enable once converted to new AVMetaData API
++ * See #566605
++ */
++
++ /* tags */
++ tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (ffmpegmux));
++ if (tags) {
++ gint i;
++ gchar *s;
++
++ /* get the interesting ones */
++ if (gst_tag_list_get_string (tags, GST_TAG_TITLE, &s)) {
++ strncpy (ffmpegmux->context->title, s,
++ sizeof (ffmpegmux->context->title));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &s)) {
++ strncpy (ffmpegmux->context->author, s,
++ sizeof (ffmpegmux->context->author));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_COPYRIGHT, &s)) {
++ strncpy (ffmpegmux->context->copyright, s,
++ sizeof (ffmpegmux->context->copyright));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_COMMENT, &s)) {
++ strncpy (ffmpegmux->context->comment, s,
++ sizeof (ffmpegmux->context->comment));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &s)) {
++ strncpy (ffmpegmux->context->album, s,
++ sizeof (ffmpegmux->context->album));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_GENRE, &s)) {
++ strncpy (ffmpegmux->context->genre, s,
++ sizeof (ffmpegmux->context->genre));
++ }
++ if (gst_tag_list_get_int (tags, GST_TAG_TRACK_NUMBER, &i)) {
++ ffmpegmux->context->track = i;
++ }
++ }
++#endif
++
++ /* set the streamheader flag for gstffmpegprotocol if codec supports it */
++ if (!strcmp (ffmpegmux->context->oformat->name, "flv")) {
++ open_flags |= GST_FFMPEG_URL_STREAMHEADER;
++ }
++
++ if (url_fopen (&ffmpegmux->context->pb,
++ ffmpegmux->context->filename, open_flags) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
++ ("Failed to open stream context in ffmux"));
++ return GST_FLOW_ERROR;
++ }
++
++ if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
++ ("Failed to initialize muxer"));
++ return GST_FLOW_ERROR;
++ }
++
++ /* now open the mux format */
++ if (av_write_header (ffmpegmux->context) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
++ ("Failed to write file header - check codec settings"));
++ return GST_FLOW_ERROR;
++ }
++
++ /* we're now opened */
++ ffmpegmux->opened = TRUE;
++
++ /* flush the header so it will be used as streamheader */
++ put_flush_packet (ffmpegmux->context->pb);
++ }
++
++ /* take the one with earliest timestamp,
++ * and push it forward */
++ best_pad = NULL;
++ best_time = GST_CLOCK_TIME_NONE;
++ for (collected = ffmpegmux->collect->data; collected;
++ collected = g_slist_next (collected)) {
++ GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
++ GstBuffer *buffer = gst_collect_pads_peek (ffmpegmux->collect,
++ (GstCollectData *) collect_pad);
++
++ /* if there's no buffer, just continue */
++ if (buffer == NULL) {
++ continue;
++ }
++
++ /* if we have no buffer yet, just use the first one */
++ if (best_pad == NULL) {
++ best_pad = collect_pad;
++ best_time = GST_BUFFER_TIMESTAMP (buffer);
++ goto next_pad;
++ }
++
++ /* if we do have one, only use this one if it's older */
++ if (GST_BUFFER_TIMESTAMP (buffer) < best_time) {
++ best_time = GST_BUFFER_TIMESTAMP (buffer);
++ best_pad = collect_pad;
++ }
++
++ next_pad:
++ gst_buffer_unref (buffer);
++
++ /* Mux buffers with invalid timestamp first */
++ if (!GST_CLOCK_TIME_IS_VALID (best_time))
++ break;
++ }
++
++ /* now handle the buffer, or signal EOS if we have
++ * no buffers left */
++ if (best_pad != NULL) {
++ GstBuffer *buf;
++ AVPacket pkt;
++ gboolean need_free = FALSE;
++
++ /* push out current buffer */
++ buf = gst_collect_pads_pop (ffmpegmux->collect,
++ (GstCollectData *) best_pad);
++
++ ffmpegmux->context->streams[best_pad->padnum]->codec->frame_number++;
++
++ /* set time */
++ pkt.pts = gst_ffmpeg_time_gst_to_ff (GST_BUFFER_TIMESTAMP (buf),
++ ffmpegmux->context->streams[best_pad->padnum]->time_base);
++ pkt.dts = pkt.pts;
++
++ if (strcmp (ffmpegmux->context->oformat->name, "gif") == 0) {
++ AVStream *st = ffmpegmux->context->streams[best_pad->padnum];
++ AVPicture src, dst;
++
++ need_free = TRUE;
++ pkt.size = st->codec->width * st->codec->height * 3;
++ pkt.data = g_malloc (pkt.size);
++
++ dst.data[0] = pkt.data;
++ dst.data[1] = NULL;
++ dst.data[2] = NULL;
++ dst.linesize[0] = st->codec->width * 3;
++
++ gst_ffmpeg_avpicture_fill (&src, GST_BUFFER_DATA (buf),
++ PIX_FMT_RGB24, st->codec->width, st->codec->height);
++
++ av_picture_copy (&dst, &src, PIX_FMT_RGB24,
++ st->codec->width, st->codec->height);
++ } else {
++ pkt.data = GST_BUFFER_DATA (buf);
++ pkt.size = GST_BUFFER_SIZE (buf);
++ }
++
++ pkt.stream_index = best_pad->padnum;
++ pkt.flags = 0;
++
++ if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT))
++ pkt.flags |= AV_PKT_FLAG_KEY;
++
++ if (GST_BUFFER_DURATION_IS_VALID (buf))
++ pkt.duration =
++ gst_ffmpeg_time_gst_to_ff (GST_BUFFER_DURATION (buf),
++ ffmpegmux->context->streams[best_pad->padnum]->time_base);
++ else
++ pkt.duration = 0;
++ av_write_frame (ffmpegmux->context, &pkt);
++ gst_buffer_unref (buf);
++ if (need_free)
++ g_free (pkt.data);
++ } else {
++ /* close down */
++ av_write_trailer (ffmpegmux->context);
++ ffmpegmux->opened = FALSE;
++ put_flush_packet (ffmpegmux->context->pb);
++ url_fclose (ffmpegmux->context->pb);
++ gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
++ return GST_FLOW_UNEXPECTED;
++ }
++
++ return GST_FLOW_OK;
++}
++
++static GstStateChangeReturn
++gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition)
++{
++ GstFlowReturn ret;
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (element);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_NULL_TO_READY:
++ break;
++ case GST_STATE_CHANGE_READY_TO_PAUSED:
++ gst_collect_pads_start (ffmpegmux->collect);
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ gst_collect_pads_stop (ffmpegmux->collect);
++ break;
++ default:
++ break;
++ }
++
++ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
++ if (ffmpegmux->opened) {
++ ffmpegmux->opened = FALSE;
++ url_fclose (ffmpegmux->context->pb);
++ }
++ break;
++ case GST_STATE_CHANGE_READY_TO_NULL:
++ break;
++ default:
++ break;
++ }
++
++ return ret;
++}
++
++static GstCaps *
++gst_ffmpegmux_get_id_caps (enum CodecID *id_list)
++{
++ GstCaps *caps, *t;
++ gint i;
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; id_list[i] != CODEC_ID_NONE; i++) {
++ if ((t = gst_ffmpeg_codecid_to_caps (id_list[i], NULL, TRUE)))
++ gst_caps_append (caps, t);
++ }
++ if (gst_caps_is_empty (caps)) {
++ gst_caps_unref (caps);
++ return NULL;
++ }
++
++ return caps;
++}
++
++/* set a list of integer values on the caps, e.g. for sample rates */
++static void
++gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps, const gchar * field,
++ guint num, const gint * values)
++{
++ GValue list = { 0, };
++ GValue val = { 0, };
++ gint i;
++
++ g_return_if_fail (GST_CAPS_IS_SIMPLE (caps));
++
++ g_value_init (&list, GST_TYPE_LIST);
++ g_value_init (&val, G_TYPE_INT);
++
++ for (i = 0; i < num; ++i) {
++ g_value_set_int (&val, values[i]);
++ gst_value_list_append_value (&list, &val);
++ }
++
++ gst_structure_set_value (gst_caps_get_structure (caps, 0), field, &list);
++
++ g_value_unset (&val);
++ g_value_unset (&list);
++}
++
++gboolean
++gst_ffmpegmux_register (GstPlugin * plugin)
++{
++ GTypeInfo typeinfo = {
++ sizeof (GstFFMpegMuxClass),
++ (GBaseInitFunc) gst_ffmpegmux_base_init,
++ NULL,
++ (GClassInitFunc) gst_ffmpegmux_class_init,
++ NULL,
++ NULL,
++ sizeof (GstFFMpegMux),
++ 0,
++ (GInstanceInitFunc) gst_ffmpegmux_init,
++ };
++ static const GInterfaceInfo tag_setter_info = {
++ NULL, NULL, NULL
++ };
++ GType type;
++ AVOutputFormat *in_plugin;
++
++ in_plugin = av_oformat_next (NULL);
++
++ GST_LOG ("Registering muxers");
++
++ while (in_plugin) {
++ gchar *type_name;
++ gchar *p;
++ GstRank rank = GST_RANK_MARGINAL;
++
++ if ((!strncmp (in_plugin->name, "u16", 3)) ||
++ (!strncmp (in_plugin->name, "s16", 3)) ||
++ (!strncmp (in_plugin->name, "u24", 3)) ||
++ (!strncmp (in_plugin->name, "s24", 3)) ||
++ (!strncmp (in_plugin->name, "u8", 2)) ||
++ (!strncmp (in_plugin->name, "s8", 2)) ||
++ (!strncmp (in_plugin->name, "u32", 3)) ||
++ (!strncmp (in_plugin->name, "s32", 3)) ||
++ (!strncmp (in_plugin->name, "f32", 3)) ||
++ (!strncmp (in_plugin->name, "f64", 3)) ||
++ (!strncmp (in_plugin->name, "raw", 3)) ||
++ (!strncmp (in_plugin->name, "crc", 3)) ||
++ (!strncmp (in_plugin->name, "null", 4)) ||
++ (!strncmp (in_plugin->name, "gif", 3)) ||
++ (!strncmp (in_plugin->name, "frame", 5)) ||
++ (!strncmp (in_plugin->name, "image", 5)) ||
++ (!strncmp (in_plugin->name, "mulaw", 5)) ||
++ (!strncmp (in_plugin->name, "alaw", 4)) ||
++ (!strncmp (in_plugin->name, "h26", 3)) ||
++ (!strncmp (in_plugin->name, "rtp", 3)) ||
++ (!strncmp (in_plugin->name, "ass", 3)) ||
++ (!strncmp (in_plugin->name, "ffmetadata", 10)) ||
++ (!strncmp (in_plugin->name, "srt", 3))
++ ) {
++ GST_LOG ("Ignoring muxer %s", in_plugin->name);
++ goto next;
++ }
++
++ if ((!strncmp (in_plugin->long_name, "raw ", 4))) {
++ GST_LOG ("Ignoring raw muxer %s", in_plugin->name);
++ goto next;
++ }
++
++ if (gst_ffmpegmux_get_replacement (in_plugin->name))
++ rank = GST_RANK_NONE;
++
++ /* FIXME : We need a fast way to know whether we have mappings for this
++ * muxer type. */
++
++ /* construct the type */
++ type_name = g_strdup_printf ("ffmux_%s", in_plugin->name);
++
++ p = type_name;
++
++ while (*p) {
++ if (*p == '.')
++ *p = '_';
++ p++;
++ }
++
++ type = g_type_from_name (type_name);
++
++ if (!type) {
++ /* create the type now */
++ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
++ g_type_set_qdata (type, GST_FFMUX_PARAMS_QDATA, (gpointer) in_plugin);
++ g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, &tag_setter_info);
++ }
++
++ if (!gst_element_register (plugin, type_name, rank, type)) {
++ g_free (type_name);
++ return FALSE;
++ }
++
++ g_free (type_name);
++
++ next:
++ in_plugin = av_oformat_next (in_plugin);
++ }
++
++ GST_LOG ("Finished registering muxers");
++
++ return TRUE;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c 2011-07-12 16:35:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c 2014-08-08 15:26:07.875857555 +0200
+@@ -46,63 +46,14 @@
+ };
+
+ static int
+-gst_ffmpegdata_open (URLContext * h, const char *filename, int flags)
+-{
+- GstProtocolInfo *info;
+- GstPad *pad;
+-
+- GST_LOG ("Opening %s", filename);
+-
+- info = g_new0 (GstProtocolInfo, 1);
+-
+- info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
+- flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+- h->flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+-
+- /* we don't support R/W together */
+- if (flags != URL_RDONLY && flags != URL_WRONLY) {
+- GST_WARNING ("Only read-only or write-only are supported");
+- return -EINVAL;
+- }
+-
+- if (sscanf (&filename[12], "%p", &pad) != 1) {
+- GST_WARNING ("could not decode pad from %s", filename);
+- return -EIO;
+- }
+-
+- /* make sure we're a pad and that we're of the right type */
+- g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
+-
+- switch (flags) {
+- case URL_RDONLY:
+- g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
+- break;
+- case URL_WRONLY:
+- g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
+- break;
+- }
+-
+- info->eos = FALSE;
+- info->pad = pad;
+- info->offset = 0;
+-
+- h->priv_data = (void *) info;
+- h->is_streamed = FALSE;
+- h->max_packet_size = 0;
+-
+- return 0;
+-}
+-
+-static int
+-gst_ffmpegdata_peek (URLContext * h, unsigned char *buf, int size)
++gst_ffmpegdata_peek (void *priv_data, unsigned char *buf, int size)
+ {
+ GstProtocolInfo *info;
+ GstBuffer *inbuf = NULL;
+ GstFlowReturn ret;
+ int total = 0;
+
+- g_return_val_if_fail (h->flags == URL_RDONLY, AVERROR (EIO));
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ GST_DEBUG ("Pulling %d bytes at position %" G_GUINT64_FORMAT, size,
+ info->offset);
+@@ -134,17 +85,17 @@
+ }
+
+ static int
+-gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size)
++gst_ffmpegdata_read (void *priv_data, unsigned char *buf, int size)
+ {
+ gint res;
+ GstProtocolInfo *info;
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ GST_DEBUG ("Reading %d bytes of data at position %" G_GUINT64_FORMAT, size,
+ info->offset);
+
+- res = gst_ffmpegdata_peek (h, buf, size);
++ res = gst_ffmpegdata_peek (priv_data, buf, size);
+ if (res >= 0)
+ info->offset += res;
+
+@@ -154,15 +105,13 @@
+ }
+
+ static int
+-gst_ffmpegdata_write (URLContext * h, const unsigned char *buf, int size)
++gst_ffmpegdata_write (void *priv_data, const unsigned char *buf, int size)
+ {
+ GstProtocolInfo *info;
+ GstBuffer *outbuf;
+
+ GST_DEBUG ("Writing %d bytes", size);
+- info = (GstProtocolInfo *) h->priv_data;
+-
+- g_return_val_if_fail (h->flags != URL_RDONLY, -EIO);
++ info = (GstProtocolInfo *) priv_data;
+
+ /* create buffer and push data further */
+ if (gst_pad_alloc_buffer_and_set_caps (info->pad,
+@@ -179,7 +128,7 @@
+ }
+
+ static int64_t
+-gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
++gst_ffmpegdata_seek (void *priv_data, int64_t pos, int whence)
+ {
+ GstProtocolInfo *info;
+ guint64 newpos = 0;
+@@ -187,70 +136,62 @@
+ GST_DEBUG ("Seeking to %" G_GINT64_FORMAT ", whence=%d",
+ (gint64) pos, whence);
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ /* TODO : if we are push-based, we need to return sensible info */
+
+- switch (h->flags) {
+- case URL_RDONLY:
+- {
+- /* sinkpad */
+- switch (whence) {
+- case SEEK_SET:
+- newpos = (guint64) pos;
+- break;
+- case SEEK_CUR:
+- newpos = info->offset + pos;
+- break;
+- case SEEK_END:
+- case AVSEEK_SIZE:
+- /* ffmpeg wants to know the current end position in bytes ! */
+- {
+- GstFormat format = GST_FORMAT_BYTES;
+- gint64 duration;
+-
+- GST_DEBUG ("Seek end");
+-
+- if (gst_pad_is_linked (info->pad))
+- if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
+- &duration))
+- newpos = ((guint64) duration) + pos;
+- }
+- break;
+- default:
+- g_assert (0);
+- break;
++ if (GST_PAD_IS_SINK (info->pad)) {
++ /* sinkpad */
++ switch (whence) {
++ case SEEK_SET:
++ newpos = (guint64) pos;
++ break;
++ case SEEK_CUR:
++ newpos = info->offset + pos;
++ break;
++ case SEEK_END:
++ case AVSEEK_SIZE:
++ /* ffmpeg wants to know the current end position in bytes ! */
++ {
++ GstFormat format = GST_FORMAT_BYTES;
++ gint64 duration;
++
++ GST_DEBUG ("Seek end");
++
++ if (gst_pad_is_linked (info->pad))
++ if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
++ &duration))
++ newpos = ((guint64) duration) + pos;
+ }
+- /* FIXME : implement case for push-based behaviour */
+- if (whence != AVSEEK_SIZE)
+- info->offset = newpos;
++ break;
++ default:
++ g_assert (0);
++ break;
+ }
+- break;
+- case URL_WRONLY:
+- {
+- /* srcpad */
+- switch (whence) {
+- case SEEK_SET:
+- info->offset = (guint64) pos;
+- gst_pad_push_event (info->pad, gst_event_new_new_segment
+- (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
+- GST_CLOCK_TIME_NONE, info->offset));
+- break;
+- case SEEK_CUR:
+- info->offset += pos;
+- gst_pad_push_event (info->pad, gst_event_new_new_segment
+- (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
+- GST_CLOCK_TIME_NONE, info->offset));
+- break;
+- default:
+- break;
+- }
+- newpos = info->offset;
++ /* FIXME : implement case for push-based behaviour */
++ if (whence != AVSEEK_SIZE)
++ info->offset = newpos;
++ } else if (GST_PAD_IS_SRC (info->pad)) {
++ /* srcpad */
++ switch (whence) {
++ case SEEK_SET:
++ info->offset = (guint64) pos;
++ gst_pad_push_event (info->pad, gst_event_new_new_segment
++ (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
++ GST_CLOCK_TIME_NONE, info->offset));
++ break;
++ case SEEK_CUR:
++ info->offset += pos;
++ gst_pad_push_event (info->pad, gst_event_new_new_segment
++ (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
++ GST_CLOCK_TIME_NONE, info->offset));
++ break;
++ default:
++ break;
+ }
+- break;
+- default:
+- g_assert (0);
+- break;
++ newpos = info->offset;
++ } else {
++ g_assert_not_reached ();
+ }
+
+ GST_DEBUG ("Now at offset %" G_GUINT64_FORMAT " (returning %" G_GUINT64_FORMAT
+@@ -258,85 +199,91 @@
+ return newpos;
+ }
+
+-static int
+-gst_ffmpegdata_close (URLContext * h)
++int
++gst_ffmpegdata_close (AVIOContext * h)
+ {
+ GstProtocolInfo *info;
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) h->opaque;
+ if (info == NULL)
+ return 0;
+
+ GST_LOG ("Closing file");
+
+- switch (h->flags) {
+- case URL_WRONLY:
+- {
+- /* send EOS - that closes down the stream */
+- gst_pad_push_event (info->pad, gst_event_new_eos ());
+- break;
+- }
+- default:
+- break;
++ if (GST_PAD_IS_SRC (info->pad)) {
++ /* send EOS - that closes down the stream */
++ gst_pad_push_event (info->pad, gst_event_new_eos ());
+ }
+
+ /* clean up data */
+ g_free (info);
+- h->priv_data = NULL;
++ h->opaque = NULL;
++
++ av_freep (&h->buffer);
++ av_free (h);
+
+ return 0;
+ }
+
++int
++gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context)
++{
++ GstProtocolInfo *info;
++ static const int buffer_size = 4096;
++ unsigned char *buffer = NULL;
+
+-URLProtocol gstreamer_protocol = {
+- /*.name = */ "gstreamer",
+- /*.url_open = */ gst_ffmpegdata_open,
+- /*.url_read = */ gst_ffmpegdata_read,
+- /*.url_write = */ gst_ffmpegdata_write,
+- /*.url_seek = */ gst_ffmpegdata_seek,
+- /*.url_close = */ gst_ffmpegdata_close,
+-};
++ info = g_new0 (GstProtocolInfo, 1);
+
++ info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
++ flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+
+-/* specialized protocol for cross-thread pushing,
+- * based on ffmpeg's pipe protocol */
++ /* we don't support R/W together */
++ if ((flags & AVIO_FLAG_WRITE) && (flags & AVIO_FLAG_READ)) {
++ GST_WARNING ("Only read-only or write-only are supported");
++ return -EINVAL;
++ }
+
+-static int
+-gst_ffmpeg_pipe_open (URLContext * h, const char *filename, int flags)
+-{
+- GstFFMpegPipe *ffpipe;
++ /* make sure we're a pad and that we're of the right type */
++ g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
+
+- GST_LOG ("Opening %s", filename);
++ if ((flags & AVIO_FLAG_READ))
++ g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
++ if ((flags & AVIO_FLAG_WRITE))
++ g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
+
+- /* we don't support W together */
+- if (flags != URL_RDONLY) {
+- GST_WARNING ("Only read-only is supported");
+- return -EINVAL;
+- }
++ info->eos = FALSE;
++ info->pad = pad;
++ info->offset = 0;
+
+- if (sscanf (&filename[10], "%p", &ffpipe) != 1) {
+- GST_WARNING ("could not decode pipe info from %s", filename);
+- return -EIO;
++ buffer = av_malloc (buffer_size);
++ if (buffer == NULL) {
++ GST_WARNING ("Failed to allocate buffer");
++ return -ENOMEM;
+ }
+
+- /* sanity check */
+- g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
+-
+- h->priv_data = (void *) ffpipe;
+- h->is_streamed = TRUE;
+- h->max_packet_size = 0;
++ *context =
++ avio_alloc_context (buffer, buffer_size, flags, (void *) info,
++ gst_ffmpegdata_read, gst_ffmpegdata_write, gst_ffmpegdata_seek);
++ (*context)->seekable = AVIO_SEEKABLE_NORMAL;
++ if (!(flags & AVIO_FLAG_WRITE)) {
++ (*context)->buf_ptr = (*context)->buf_end;
++ (*context)->write_flag = 0;
++ }
+
+ return 0;
+ }
+
++/* specialized protocol for cross-thread pushing,
++ * based on ffmpeg's pipe protocol */
++
+ static int
+-gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size)
++gst_ffmpeg_pipe_read (void *priv_data, unsigned char *buf, int size)
+ {
+ GstFFMpegPipe *ffpipe;
+ const guint8 *data;
+ guint available;
+
+- ffpipe = (GstFFMpegPipe *) h->priv_data;
++ ffpipe = (GstFFMpegPipe *) priv_data;
+
+ GST_LOG ("requested size %d", size);
+
+@@ -367,21 +314,38 @@
+ return size;
+ }
+
+-static int
+-gst_ffmpeg_pipe_close (URLContext * h)
++int
++gst_ffmpeg_pipe_close (AVIOContext * h)
+ {
+ GST_LOG ("Closing pipe");
+
+- h->priv_data = NULL;
++ h->opaque = NULL;
++ av_freep (&h->buffer);
++ av_free (h);
+
+ return 0;
+ }
+
+-URLProtocol gstpipe_protocol = {
+- "gstpipe",
+- gst_ffmpeg_pipe_open,
+- gst_ffmpeg_pipe_read,
+- NULL,
+- NULL,
+- gst_ffmpeg_pipe_close,
+-};
++int
++gst_ffmpeg_pipe_open (GstFFMpegPipe * ffpipe, int flags, AVIOContext ** context)
++{
++ static const int buffer_size = 4096;
++ unsigned char *buffer = NULL;
++
++ /* sanity check */
++ g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
++
++ buffer = av_malloc (buffer_size);
++ if (buffer == NULL) {
++ GST_WARNING ("Failed to allocate buffer");
++ return -ENOMEM;
++ }
++
++ *context =
++ avio_alloc_context (buffer, buffer_size, 0, (void *) ffpipe,
++ gst_ffmpeg_pipe_read, NULL, NULL);
++ (*context)->seekable = 0;
++ (*context)->buf_ptr = (*context)->buf_end;
++
++ return 0;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c 2014-08-08 15:34:04.007874626 +0200
+@@ -25,6 +25,11 @@
+ #ifdef __APPLE__
+ #include <sys/sysctl.h>
+ #endif
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avformat.h>
++#else
++#include <libavformat/avformat.h>
++#endif
+
+ G_CONST_RETURN gchar *
+ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
+@@ -39,21 +44,21 @@
+ }
+
+ gint
+-av_smp_format_depth (enum SampleFormat smp_fmt)
++av_smp_format_depth (enum AVSampleFormat smp_fmt)
+ {
+ gint depth = -1;
+ switch (smp_fmt) {
+- case SAMPLE_FMT_U8:
++ case AV_SAMPLE_FMT_U8:
+ depth = 1;
+ break;
+- case SAMPLE_FMT_S16:
++ case AV_SAMPLE_FMT_S16:
+ depth = 2;
+ break;
+- case SAMPLE_FMT_S32:
+- case SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_S32:
++ case AV_SAMPLE_FMT_FLT:
+ depth = 4;
+ break;
+- case SAMPLE_FMT_DBL:
++ case AV_SAMPLE_FMT_DBL:
+ depth = 8;
+ break;
+ default:
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig 2011-07-13 11:07:28.000000000 +0200
+@@ -0,0 +1,483 @@
++/* GStreamer
++ * Copyright (c) 2009 Edward Hervey <bilboed@bilboed.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include "gstffmpegutils.h"
++#include <unistd.h>
++#ifdef __APPLE__
++#include <sys/sysctl.h>
++#endif
++
++G_CONST_RETURN gchar *
++gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
++{
++ AVCodec *codec;
++ /* Let's use what ffmpeg can provide us */
++
++ if ((codec = avcodec_find_decoder (codec_id)) ||
++ (codec = avcodec_find_encoder (codec_id)))
++ return codec->long_name;
++ return NULL;
++}
++
++gint
++av_smp_format_depth (enum SampleFormat smp_fmt)
++{
++ gint depth = -1;
++ switch (smp_fmt) {
++ case SAMPLE_FMT_U8:
++ depth = 1;
++ break;
++ case SAMPLE_FMT_S16:
++ depth = 2;
++ break;
++ case SAMPLE_FMT_S32:
++ case SAMPLE_FMT_FLT:
++ depth = 4;
++ break;
++ case SAMPLE_FMT_DBL:
++ depth = 8;
++ break;
++ default:
++ GST_ERROR ("UNHANDLED SAMPLE FORMAT !");
++ break;
++ }
++ return depth;
++}
++
++
++/*
++ * Fill in pointers to memory in a AVPicture, where
++ * everything is aligned by 4 (as required by X).
++ * This is mostly a copy from imgconvert.c with some
++ * small changes.
++ */
++
++#define FF_COLOR_RGB 0 /* RGB color space */
++#define FF_COLOR_GRAY 1 /* gray color space */
++#define FF_COLOR_YUV 2 /* YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
++#define FF_COLOR_YUV_JPEG 3 /* YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
++
++#define FF_PIXEL_PLANAR 0 /* each channel has one component in AVPicture */
++#define FF_PIXEL_PACKED 1 /* only one components containing all the channels */
++#define FF_PIXEL_PALETTE 2 /* one components containing indexes for a palette */
++
++typedef struct PixFmtInfo
++{
++ const char *name;
++ uint8_t nb_channels; /* number of channels (including alpha) */
++ uint8_t color_type; /* color type (see FF_COLOR_xxx constants) */
++ uint8_t pixel_type; /* pixel storage type (see FF_PIXEL_xxx constants) */
++ uint8_t is_alpha:1; /* true if alpha can be specified */
++ uint8_t x_chroma_shift; /* X chroma subsampling factor is 2 ^ shift */
++ uint8_t y_chroma_shift; /* Y chroma subsampling factor is 2 ^ shift */
++ uint8_t depth; /* bit depth of the color components */
++} PixFmtInfo;
++
++
++/* this table gives more information about formats */
++static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
++void
++gst_ffmpeg_init_pix_fmt_info (void)
++{
++ /* YUV formats */
++ pix_fmt_info[PIX_FMT_YUV420P].name = g_strdup ("yuv420p");
++ pix_fmt_info[PIX_FMT_YUV420P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV420P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV420P].depth = 8,
++ pix_fmt_info[PIX_FMT_YUV420P].x_chroma_shift = 1,
++ pix_fmt_info[PIX_FMT_YUV420P].y_chroma_shift = 1;
++
++ pix_fmt_info[PIX_FMT_YUV422P].name = g_strdup ("yuv422p");
++ pix_fmt_info[PIX_FMT_YUV422P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV422P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV422P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV422P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV422P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUV422P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUV444P].name = g_strdup ("yuv444p");
++ pix_fmt_info[PIX_FMT_YUV444P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV444P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV444P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV444P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV444P].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_YUV444P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUYV422].name = g_strdup ("yuv422");
++ pix_fmt_info[PIX_FMT_YUYV422].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_YUYV422].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUYV422].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_YUYV422].depth = 8;
++ pix_fmt_info[PIX_FMT_YUYV422].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUYV422].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUV410P].name = g_strdup ("yuv410p");
++ pix_fmt_info[PIX_FMT_YUV410P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV410P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV410P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV410P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV410P].x_chroma_shift = 2;
++ pix_fmt_info[PIX_FMT_YUV410P].y_chroma_shift = 2;
++
++ pix_fmt_info[PIX_FMT_YUV411P].name = g_strdup ("yuv411p");
++ pix_fmt_info[PIX_FMT_YUV411P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV411P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV411P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV411P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV411P].x_chroma_shift = 2;
++ pix_fmt_info[PIX_FMT_YUV411P].y_chroma_shift = 0;
++
++ /* JPEG YUV */
++ pix_fmt_info[PIX_FMT_YUVJ420P].name = g_strdup ("yuvj420p");
++ pix_fmt_info[PIX_FMT_YUVJ420P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ420P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ420P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ420P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUVJ420P].y_chroma_shift = 1;
++
++ pix_fmt_info[PIX_FMT_YUVJ422P].name = g_strdup ("yuvj422p");
++ pix_fmt_info[PIX_FMT_YUVJ422P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ422P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ422P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ422P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ422P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUVJ422P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUVJ444P].name = g_strdup ("yuvj444p");
++ pix_fmt_info[PIX_FMT_YUVJ444P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ444P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ444P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ444P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ444P].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_YUVJ444P].y_chroma_shift = 0;
++
++ /* RGB formats */
++ pix_fmt_info[PIX_FMT_RGB24].name = g_strdup ("rgb24");
++ pix_fmt_info[PIX_FMT_RGB24].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_RGB24].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB24].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB24].depth = 8;
++ pix_fmt_info[PIX_FMT_RGB24].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB24].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_BGR24].name = g_strdup ("bgr24");
++ pix_fmt_info[PIX_FMT_BGR24].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_BGR24].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_BGR24].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_BGR24].depth = 8;
++ pix_fmt_info[PIX_FMT_BGR24].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_BGR24].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB32].name = g_strdup ("rgba32");
++ pix_fmt_info[PIX_FMT_RGB32].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_RGB32].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_RGB32].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB32].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB32].depth = 8;
++ pix_fmt_info[PIX_FMT_RGB32].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB32].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB565].name = g_strdup ("rgb565");
++ pix_fmt_info[PIX_FMT_RGB565].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_RGB565].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB565].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB565].depth = 5;
++ pix_fmt_info[PIX_FMT_RGB565].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB565].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB555].name = g_strdup ("rgb555");
++ pix_fmt_info[PIX_FMT_RGB555].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_RGB555].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_RGB555].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB555].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB555].depth = 5;
++ pix_fmt_info[PIX_FMT_RGB555].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB555].y_chroma_shift = 0;
++
++ /* gray / mono formats */
++ pix_fmt_info[PIX_FMT_GRAY8].name = g_strdup ("gray");
++ pix_fmt_info[PIX_FMT_GRAY8].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_GRAY8].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_GRAY8].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_GRAY8].depth = 8;
++
++ pix_fmt_info[PIX_FMT_MONOWHITE].name = g_strdup ("monow");
++ pix_fmt_info[PIX_FMT_MONOWHITE].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_MONOWHITE].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_MONOWHITE].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_MONOWHITE].depth = 1;
++
++ pix_fmt_info[PIX_FMT_MONOBLACK].name = g_strdup ("monob");
++ pix_fmt_info[PIX_FMT_MONOBLACK].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_MONOBLACK].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_MONOBLACK].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_MONOBLACK].depth = 1;
++
++ /* paletted formats */
++ pix_fmt_info[PIX_FMT_PAL8].name = g_strdup ("pal8");
++ pix_fmt_info[PIX_FMT_PAL8].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_PAL8].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_PAL8].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_PAL8].pixel_type = FF_PIXEL_PALETTE;
++ pix_fmt_info[PIX_FMT_PAL8].depth = 8;
++
++ pix_fmt_info[PIX_FMT_YUVA420P].name = g_strdup ("yuva420p");
++ pix_fmt_info[PIX_FMT_YUVA420P].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_YUVA420P].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_YUVA420P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUVA420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVA420P].depth = 8,
++ pix_fmt_info[PIX_FMT_YUVA420P].x_chroma_shift = 1,
++ pix_fmt_info[PIX_FMT_YUVA420P].y_chroma_shift = 1;
++};
++
++int
++gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height)
++{
++ AVPicture dummy_pict;
++
++ return gst_ffmpeg_avpicture_fill (&dummy_pict, NULL, pix_fmt, width, height);
++}
++
++#define GEN_MASK(x) ((1<<(x))-1)
++#define ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
++#define ROUND_UP_2(x) ROUND_UP_X (x, 1)
++#define ROUND_UP_4(x) ROUND_UP_X (x, 2)
++#define ROUND_UP_8(x) ROUND_UP_X (x, 3)
++#define DIV_ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) >> (x))
++
++int
++gst_ffmpeg_avpicture_fill (AVPicture * picture,
++ uint8_t * ptr, enum PixelFormat pix_fmt, int width, int height)
++{
++ int size, w2, h2, size2;
++ int stride, stride2;
++ PixFmtInfo *pinfo;
++
++ pinfo = &pix_fmt_info[pix_fmt];
++
++ switch (pix_fmt) {
++ case PIX_FMT_YUV420P:
++ case PIX_FMT_YUV422P:
++ case PIX_FMT_YUV444P:
++ case PIX_FMT_YUV410P:
++ case PIX_FMT_YUV411P:
++ case PIX_FMT_YUVJ420P:
++ case PIX_FMT_YUVJ422P:
++ case PIX_FMT_YUVJ444P:
++ stride = ROUND_UP_4 (width);
++ h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size = stride * h2;
++ w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
++ stride2 = ROUND_UP_4 (w2);
++ h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size2 = stride2 * h2;
++ picture->data[0] = ptr;
++ picture->data[1] = picture->data[0] + size;
++ picture->data[2] = picture->data[1] + size2;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = stride2;
++ picture->linesize[2] = stride2;
++ picture->linesize[3] = 0;
++ GST_DEBUG ("planes %d %d %d", 0, size, size + size2);
++ GST_DEBUG ("strides %d %d %d", stride, stride2, stride2);
++ return size + 2 * size2;
++ case PIX_FMT_YUVA420P:
++ stride = ROUND_UP_4 (width);
++ h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size = stride * h2;
++ w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
++ stride2 = ROUND_UP_4 (w2);
++ h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size2 = stride2 * h2;
++ picture->data[0] = ptr;
++ picture->data[1] = picture->data[0] + size;
++ picture->data[2] = picture->data[1] + size2;
++ picture->data[3] = picture->data[2] + size2;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = stride2;
++ picture->linesize[2] = stride2;
++ picture->linesize[3] = stride;
++ GST_DEBUG ("planes %d %d %d %d", 0, size, size + size2, size + 2 * size2);
++ GST_DEBUG ("strides %d %d %d %d", stride, stride2, stride2, stride);
++ return 2 * size + 2 * size2;
++ case PIX_FMT_RGB24:
++ case PIX_FMT_BGR24:
++ stride = ROUND_UP_4 (width * 3);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ /*case PIX_FMT_AYUV4444:
++ case PIX_FMT_BGR32:
++ case PIX_FMT_BGRA32:
++ case PIX_FMT_RGB32: */
++ case PIX_FMT_RGB32:
++ stride = width * 4;
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_RGB555:
++ case PIX_FMT_RGB565:
++ case PIX_FMT_YUYV422:
++ case PIX_FMT_UYVY422:
++ stride = ROUND_UP_4 (width * 2);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_UYYVYY411:
++ /* FIXME, probably not the right stride */
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = width + width / 2;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size + size / 2;
++ case PIX_FMT_GRAY8:
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_MONOWHITE:
++ case PIX_FMT_MONOBLACK:
++ stride = ROUND_UP_4 ((width + 7) >> 3);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_PAL8:
++ /* already forced to be with stride, so same result as other function */
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = ptr + size; /* palette is stored here as 256 32 bit words */
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 4;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size + 256 * 4;
++ default:
++ picture->data[0] = NULL;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ return -1;
++ }
++
++ return 0;
++}
++
++/* Create a GstBuffer of the requested size and caps.
++ * The memory will be allocated by ffmpeg, making sure it's properly aligned
++ * for any processing. */
++
++GstBuffer *
++new_aligned_buffer (gint size, GstCaps * caps)
++{
++ GstBuffer *buf;
++
++ buf = gst_buffer_new ();
++ GST_BUFFER_DATA (buf) = GST_BUFFER_MALLOCDATA (buf) = av_malloc (size);
++ GST_BUFFER_SIZE (buf) = size;
++ GST_BUFFER_FREE_FUNC (buf) = av_free;
++ if (caps)
++ gst_buffer_set_caps (buf, caps);
++
++ return buf;
++}
++
++int
++gst_ffmpeg_auto_max_threads (void)
++{
++ static gsize n_threads = 0;
++ if (g_once_init_enter (&n_threads)) {
++ int n = 1;
++#if defined(_WIN32)
++ {
++ const char *s = getenv ("NUMBER_OF_PROCESSORS");
++ if (s) {
++ n = atoi (s);
++ }
++ }
++#elif defined(__APPLE__)
++ {
++ int mib[] = { CTL_HW, HW_NCPU };
++ size_t dataSize = sizeof (int);
++
++ if (sysctl (mib, 2, &n_threads, &dataSize, NULL, 0)) {
++ n = 1;
++ }
++ }
++#else
++ n = sysconf (_SC_NPROCESSORS_CONF);
++#endif
++ if (n < 1)
++ n = 1;
++
++ g_once_init_leave (&n_threads, n);
++ }
++
++ return (int) (n_threads);
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h 2011-11-02 14:04:05.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h 2014-08-08 15:34:04.007874626 +0200
+@@ -23,6 +23,7 @@
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avcodec.h>
+ #else
++#include <libavutil/mathematics.h>
+ #include <libavcodec/avcodec.h>
+ #endif
+ #include <gst/gst.h>
+@@ -87,7 +88,7 @@
+ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
+
+ gint
+-av_smp_format_depth(enum SampleFormat smp_fmt);
++av_smp_format_depth(enum AVSampleFormat smp_fmt);
+
+ GstBuffer *
+ new_aligned_buffer (gint size, GstCaps * caps);
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig 2014-08-08 15:26:38.473858652 +0200
+@@ -0,0 +1,95 @@
++/* GStreamer
++ * Copyright (C) <2009> Edward Hervey <bilboed@bilboed.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifndef __GST_FFMPEG_UTILS_H__
++#define __GST_FFMPEG_UTILS_H__
++
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#else
++#include <libavcodec/avcodec.h>
++#endif
++#include <gst/gst.h>
++
++/*
++ *Get the size of an picture
++ */
++int
++gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height);
++
++/*
++ * Fill in pointers in an AVPicture, aligned by 4 (required by X).
++ */
++
++int
++gst_ffmpeg_avpicture_fill (AVPicture * picture,
++ uint8_t * ptr,
++ enum PixelFormat pix_fmt,
++ int width,
++ int height);
++
++/*
++ * Convert from/to a GStreamer <-> FFMpeg timestamp.
++ */
++static inline guint64
++gst_ffmpeg_time_ff_to_gst (gint64 pts, AVRational base)
++{
++ guint64 out;
++
++ if (pts == AV_NOPTS_VALUE){
++ out = GST_CLOCK_TIME_NONE;
++ } else {
++ AVRational bq = { 1, GST_SECOND };
++ out = av_rescale_q (pts, base, bq);
++ }
++
++ return out;
++}
++
++static inline gint64
++gst_ffmpeg_time_gst_to_ff (guint64 time, AVRational base)
++{
++ gint64 out;
++
++ if (!GST_CLOCK_TIME_IS_VALID (time) || base.num == 0) {
++ out = AV_NOPTS_VALUE;
++ } else {
++ AVRational bq = { 1, GST_SECOND };
++ out = av_rescale_q (time, bq, base);
++ }
++
++ return out;
++}
++
++void
++gst_ffmpeg_init_pix_fmt_info(void);
++
++int
++gst_ffmpeg_auto_max_threads(void);
++
++G_CONST_RETURN gchar *
++gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
++
++gint
++av_smp_format_depth(enum AVSampleFormat smp_fmt);
++
++GstBuffer *
++new_aligned_buffer (gint size, GstCaps * caps);
++
++#endif /* __GST_FFMPEG_UTILS_H__ */
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
index a3b2f5cf29..219feaafc9 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
LICENSE_FLAGS = "commercial"
HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native"
+DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native libpostproc"
inherit autotools pkgconfig
@@ -36,6 +36,28 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
file://0001-alac-fix-nb_samples-order-case.patch \
file://0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch \
file://0001-roqvideodec-check-dimensions-validity.patch \
+ file://0001-aacdec-check-channel-count.patch \
+ file://0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch \
+ file://0001-error_concealment-Check-that-the-picture-is-not-in-a.patch \
+ file://0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch \
+ file://0001-vp3-Copy-all-3-frames-for-thread-updates.patch \
+ file://0001-h264_sei-Fix-infinite-loop.patch \
+ file://0001-avcodec-parser-reset-indexes-on-realloc-failure.patch \
+ file://0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch \
+ file://gst-ffmpeg-CVE-2013-0855.patch \
+ file://0001-qdm2dec-fix-buffer-overflow.patch \
+ file://0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch \
+ file://0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch \
+ file://0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch \
+ file://0001-error-concealment-initialize-block-index.patch \
+ file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
+ file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
+ file://0001-ffserver-set-oformat.patch \
+ file://0001-h264-set-parameters-from-SPS-whenever-it-changes.patch \
+ file://0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch \
+ file://0001-avcodec-smc-fix-off-by-1-error.patch \
+ file://0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch \
+ file://libav-9.patch \
"
SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb
index 47dbc3492b..1e2cd2a4ab 100644
--- a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb
@@ -5,7 +5,10 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=259a43dd1c9854b71fc396f74699f4d2"
LICENSE_FLAGS = "commercial"
+GSTREAMER_DEBUG ?= "--disable-debug"
+EXTRA_OECONF += "${GSTREAMER_DEBUG} --with-gstreamer-api=0.10"
+
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-SRC_URI[md5sum] = "5d95a9a216dd15bc5c00c9414061115c"
-SRC_URI[sha256sum] = "30c79d24d8926f75dd4ef0f572942ce155ad541734b36a95591b9c0524dcc0f3"
+SRC_URI[md5sum] = "adf0390f3416bb72f91c358528be0c38"
+SRC_URI[sha256sum] = "dae0d0559a4e159c0dd92b7e18de059a5783f8d038904c7de4ca6393f7d55c7d"
diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo.inc b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
index c7e6595232..3cbb4652c7 100644
--- a/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
@@ -1,7 +1,7 @@
SUMMARY = "Fluendo closed-format GStreamer plug-in"
SECTION = "multimedia"
HOMEPAGE = "http://www.fluendo.com/resources/source-plugins.php"
-DEPENDS = "gstreamer zlib"
+DEPENDS = "gstreamer gst-plugins-base zlib"
inherit autotools pkgconfig
@@ -11,5 +11,4 @@ FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a"
-GSTREAMER_DEBUG ?= "--disable-debug"
-EXTRA_OECONF = "${GSTREAMER_DEBUG} --disable-valgrind"
+EXTRA_OECONF = "--disable-valgrind"
diff --git a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
index 518ab721af..039abe14fa 100644
--- a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
@@ -1,6 +1,11 @@
SUMMARY = "GStreamer package groups"
LICENSE = "MIT"
-DEPENDS = "gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad"
+
+COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
+DEPENDS_UGLY="${@'gst-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS_BAD="${@'gst-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS = "gstreamer gst-plugins-base gst-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
+
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
index 2ecdcf25ce..0f64871497 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
@@ -37,6 +37,7 @@ PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
PACKAGECONFIG[schro] = "--enable-schro,--disable-schro,schroedinger"
PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
ARM_INSTRUCTION_SET = "arm"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch
new file mode 100644
index 0000000000..52142562ab
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch
@@ -0,0 +1,37 @@
+audioresample: Fix build on x86 if emmintrin.h is available but can't be used
+
+On x86, EMMINTRIN is defined but not usable without SSE so check for
+__SSE__ and __SSE2__ as well.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=670690
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ gst/audioresample/resample.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
+index 98d006c..481fa01 100644
+--- a/gst/audioresample/resample.c
++++ b/gst/audioresample/resample.c
+@@ -77,13 +77,13 @@
+ #define EXPORT G_GNUC_INTERNAL
+
+ #ifdef _USE_SSE
+-#ifndef HAVE_XMMINTRIN_H
++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H)
+ #undef _USE_SSE
+ #endif
+ #endif
+
+ #ifdef _USE_SSE2
+-#ifndef HAVE_EMMINTRIN_H
++#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H)
+ #undef _USE_SSE2
+ #endif
+ #endif
+--
+1.7.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
index 4a8a9947a7..c8a949973d 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
DEPENDS += "alsa-lib liboil libogg libvorbis libtheora util-linux tremor glib-2.0-native"
SRC_URI += "file://gst-plugins-base-tremor.patch \
- file://configure.ac-fix-subparse-plugin.patch"
+ file://configure.ac-fix-subparse-plugin.patch \
+ file://audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch \
+"
SRC_URI[md5sum] = "776c73883e567f67b9c4a2847d8d041a"
SRC_URI[sha256sum] = "2cd3b0fa8e9b595db8f514ef7c2bdbcd639a0d63d154c00f8c9b609321f49976"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch b/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch
new file mode 100644
index 0000000000..48b8e98b81
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch
@@ -0,0 +1,47 @@
+From ce94b2c2b91b6db190c121860e12a6afafce7ae1 Mon Sep 17 00:00:00 2001
+From: Roland Krikava <rkrikava@gmail.com>
+Date: Fri, 2 Nov 2012 12:38:44 -0400
+Subject: [PATCH 407/440] mulawdec: fix integer overrun
+
+There might be more than 65535 samples in a chunk of data.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=687469
+
+Commit - 3be45f70220310ec1c60d819f90b5f2ae03b5d83 in 0.10 branch
+
+Upstream Status: Backported
+
+Signed-off-by: Roland Krikava <rkrikava@gmail.com>
+---
+ gst/law/mulaw-conversion.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gst/law/mulaw-conversion.c b/gst/law/mulaw-conversion.c
+index 8afae80..190a9f5 100644
+--- a/gst/law/mulaw-conversion.c
++++ b/gst/law/mulaw-conversion.c
+@@ -51,9 +51,10 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+ };
+- gint16 sign, exponent, mantissa, i;
++ gint16 sign, exponent, mantissa;
+ gint16 sample;
+ guint8 ulawbyte;
++ gint i;
+
+ for (i = 0; i < numsamples; i++) {
+ sample = in[i];
+@@ -102,7 +103,8 @@ mulaw_decode (guint8 * in, gint16 * out, gint numsamples)
+ static gint16 exp_lut[8] = { 0, 132, 396, 924, 1980, 4092, 8316, 16764 };
+ gint16 sign, exponent, mantissa;
+ guint8 ulawbyte;
+- gint16 linear, i;
++ gint16 linear;
++ gint i;
+
+ for (i = 0; i < numsamples; i++) {
+ ulawbyte = in[i];
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
index 88f90f3b85..495bb17649 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
@@ -22,13 +22,14 @@ PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
PACKAGECONFIG[x11] = "--enable-x,--disable-x,virtual/libx11 libxfixes libxdamage"
DEPENDS += "gst-plugins-base gconf cairo libpng zlib libid3tag flac \
- speex libsoup-2.4"
+ speex libsoup-2.4 libcap"
inherit gettext gconf
-SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch"
-SRC_URI += "file://0001-v4l2_calls-define-V4L2_CID_HCENTER-and-V4L2_CID_VCEN.patch"
-
+SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch \
+ file://0001-v4l2_calls-define-V4L2_CID_HCENTER-and-V4L2_CID_VCEN.patch \
+ file://0407-mulawdec-fix-integer-overrun.patch \
+"
EXTRA_OECONF += "--disable-aalib --disable-esd --disable-shout2 --disable-libcaca --disable-hal \
--disable-examples --disable-taglib"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index 0503b34ea3..7bb567866f 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -50,6 +50,8 @@ ALLOW_EMPTY_${PN}-staticdev = "1"
PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
FILES_${PN}-apps = "${bindir}"
+RDEPENDS_${PN}-apps += "perl"
+
FILES_${PN} = "${datadir}/gstreamer-${LIBV}"
FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug"
FILES_${PN}-glib = "${datadir}/glib-2.0"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins.inc b/meta/recipes-multimedia/gstreamer/gst-plugins.inc
index 26976092d6..c852c53fa9 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins.inc
@@ -19,10 +19,10 @@ require gst-plugins-package.inc
PACKAGES_DYNAMIC += "^${PN}-.*"
# apply gstreamer hack after Makefile.in.in in source is replaced by our version from
-# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed
+# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed
# http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html
-oe_runconf_prepend() {
+oe_runconf_prepend() {
if [ -e ${S}/po/Makefile.in.in ]; then
sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in
fi
-}
+}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch
new file mode 100644
index 0000000000..d07749682b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch
@@ -0,0 +1,32 @@
+From ed7f4802222234eef192aa3f74bc92268f338f97 Mon Sep 17 00:00:00 2001
+From: Sebastian Droege <sebastian.droege@collabora.co.uk>
+Date: Tue, 6 Mar 2012 12:28:02 +0100
+Subject: [PATCH] baseparse: Fix 'self-comparison always evaluates to true'
+
+This was really a bug.
+
+Commit is ed7f4802222234eef192aa3f74bc92268f338f97 in 0.10 branch
+
+Upstream Status: Backported
+
+Signed-off-by: Sebastian Droege <sebastian.droege@collabora.co.uk>
+---
+ libs/gst/base/gstbaseparse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
+index 851ec1d..108ee89 100644
+--- a/libs/gst/base/gstbaseparse.c
++++ b/libs/gst/base/gstbaseparse.c
+@@ -3899,7 +3899,7 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
+ seek event (in bytes) to upstream. Segment / flush handling happens
+ in corresponding src event handlers */
+ GST_DEBUG_OBJECT (parse, "seek in PUSH mode");
+- if (seekstop >= 0 && seekpos <= seekpos)
++ if (seekstop >= 0 && seekstop <= seekpos)
+ seekstop = seekpos;
+ new_event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+ GST_SEEK_TYPE_SET, seekpos, stop_type, seekstop);
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
index 350b528e94..11b1cfb08d 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
@@ -3,7 +3,7 @@ include gstreamer1.0-libav.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/LICENSE;md5=23a54f59b82572c203a559346e89ed57 \
+ file://gst-libs/ext/libav/LICENSE;md5=ea66e97a7ac1db978cf3529068a8c948 \
file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
@@ -12,13 +12,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- "
-SRC_URI[md5sum] = "6454f9f22b3aa37694781633e0d20a9c"
-SRC_URI[sha256sum] = "2a69480d63fc2db93249d9e2e229ab3541bbc2db881b0f64de13d0bfc7d1f037"
+"
+SRC_URI[md5sum] = "f4922a46adbcbe7bd01331ff5dc7979d"
+SRC_URI[sha256sum] = "605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc"
+
LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
--ranlib='${RANLIB}' \
- ${GSTREAMER_1_0_DEBUG}"
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index 5ce28ccbe7..bf1b87e6de 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -18,10 +18,12 @@ SRCREV = "127202d6f65584891dabf92be031f0d170b0e7f1"
LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
- ${GSTREAMER_1_0_DEBUG}"
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
index a703d9b7a4..3ef10c3723 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -3,7 +3,10 @@ LICENSE = "MIT"
inherit packagegroup
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad"
+COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
+DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
PACKAGES = "\
gstreamer1.0-meta-base \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
index b76786bddb..d698904349 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -3,7 +3,7 @@ SECTION = "multimedia"
LICENSE = "LGPLv2.1"
LICENSE_FLAGS = "commercial"
HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
RDEPENDS_${PN} = "libomxil"
inherit autotools pkgconfig gettext
@@ -13,7 +13,7 @@ acpaths = "-I ${S}/common/m4 -I ${S}/m4"
PR = "r1"
GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
-GSTREAMER_1_0_OMX_CORE_NAME ?= "/usr/lib/libomxil-bellagio.so.0"
+GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
@@ -31,7 +31,7 @@ python __anonymous () {
}
set_omx_core_name() {
- sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}/etc/xdg/gstomx.conf"
+ sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
}
do_install[postfuncs] += " set_omx_core_name "
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
index f5956c66df..fe7c91cb30 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-SRC_URI[md5sum] = "bb34b5742223267298bcffc209104a92"
-SRC_URI[sha256sum] = "7a1d8d28d70dacc6bd3c7ee7d7e40df6d5a1d38d7c256d5c9c5c8ef15c005014"
+SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8"
+SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745"
S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
index 11c77aeada..99c84668ef 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -2,21 +2,25 @@ DEFAULT_PREFERENCE = "-1"
include gstreamer1.0-omx.inc
-DEPENDS = "gstreamer1.0-plugins-bad"
-
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master \
- file://0001-omx-fixed-type-error-in-printf-call.patch \
+ git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \
+ file://0001-omx-fixed-type-error-in-printf-call.patch \
"
+
S = "${WORKDIR}/git"
-SRCREV = "a2db76b048db278ef0aa798e106b7594264e06c0"
+SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
+SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
+
+SRCREV_FORMAT = "gst-omx"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index ceb2de1917..9c15f2b1ed 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -2,25 +2,33 @@ require gstreamer1.0-plugins.inc
LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ "
-DEPENDS += "gstreamer1.0-plugins-base bzip2"
+DEPENDS += "gstreamer1.0-plugins-base bzip2 libpng jpeg"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
+SRC_URI += "file://configure-allow-to-disable-libssh2.patch \
+ "
+
inherit gettext
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
PACKAGECONFIG ??= " \
+ ${PACKAGECONFIG_GL} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglgles', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- orc curl uvch264 neon \
+ orc curl uvch264 neon sndfile \
hls sbc dash bz2 smoothstreaming \
"
+
# dash = Dynamic Adaptive Streaming over HTTP
PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[eglgles] = "--enable-eglgles,--disable-eglgles,virtual/egl virtual/libgles2"
+PACKAGECONFIG[gles2] = "--enable-gles2 --enable-egl,--disable-gles2 --disable-egl,virtual/libgles2 virtual/egl"
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
@@ -43,18 +51,27 @@ PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger"
PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez4"
PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
+PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
+PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
# these plugins have not been ported to 1.0 (yet):
-# directdraw vcd apexsink cdaudio dc1394 lv2 linsys musepack mythtv
-# nas timidity teletextdec sdl sndfile xvid wininet acm gsettings
-# sndio cdxaparse dccp faceoverlay hdvparse ivfparse jp2kdecimator
-# linsys mve nuvdemux osx_video patchdetect quicktime real sdi stereo
-# tta videomeasure videosignal vmnc
+# directdraw vcd apexsink dc1394 lv2 linsys musepack mythtv
+# nas timidity teletextdec sdl xvid wininet acm gsettings
+# sndio qtwrapper cdxaparse dccp faceoverlay hdvparse tta
+# mve nuvdemux osx_video patchdetect quicktime real sdi
+# videomeasure gsettings
+
+# these plugins have no corresponding library in OE-core or meta-openembedded:
+# openni2 winks direct3d directdraw directsound winscreencap osx_video
+# apple_media android_media avc chromaprint daala dts gme gsm kate ladspa mimic
+# mpeg2enc mplex ofa openjpeg opensles pvr resindvd rtmp soundtouch spandsp spc
+# srtp vdpau voaacenc voamrwbenc wasapi zbar
EXTRA_OECONF += " \
--enable-dvb \
--enable-shm \
- --enable-mfc \
--enable-fbdev \
--enable-decklink \
--disable-acm \
@@ -62,13 +79,12 @@ EXTRA_OECONF += " \
--disable-apexsink \
--disable-apple_media \
--disable-avc \
- --disable-cdaudio \
--disable-chromaprint \
+ --disable-cocoa \
--disable-daala \
--disable-dc1394 \
--disable-direct3d \
--disable-directdraw \
- --disable-directshow \
--disable-directsound \
--disable-dts \
--disable-gme \
@@ -91,10 +107,8 @@ EXTRA_OECONF += " \
--disable-pvr \
--disable-quicktime \
--disable-resindvd \
- --disable-rtmp \
--disable-sdl \
--disable-sdltest \
- --disable-sndfile \
--disable-sndio \
--disable-soundtouch \
--disable-spandsp \
@@ -107,7 +121,6 @@ EXTRA_OECONF += " \
--disable-voaacenc \
--disable-voamrwbenc \
--disable-wasapi \
- --disable-webp \
--disable-wildmidi \
--disable-wininet \
--disable-winscreencap \
@@ -118,3 +131,5 @@ EXTRA_OECONF += " \
ARM_INSTRUCTION_SET = "arm"
+FILES_gstreamer1.0-plugins-bad-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
new file mode 100644
index 0000000000..042a32c04d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
@@ -0,0 +1,41 @@
+From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Wed, 27 Aug 2014 14:47:25 +0200
+Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in
+ configuration
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522]
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ configure.ac | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1a46afb..e85d4ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -661,10 +661,16 @@ case $host in
+ fi
+ ;;
+ *)
+- AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
+- AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
+- AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
+- AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++ if test "x$NEED_GL" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
++ AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
++ fi
++ if test "x$NEED_GLES2" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
++ fi
++ if test "x$NEED_EGL" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++ fi
+
+ old_LIBS=$LIBS
+ old_CFLAGS=$CFLAGS
+--
+1.8.3.2
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
new file mode 100644
index 0000000000..d52afd5d57
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -0,0 +1,64 @@
+From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 18 Sep 2014 02:24:07 -0400
+Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2
+
+libssh2 is automatically linked to if present, this undetermined
+dependency may cause build errors like:
+
+ .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2
+
+libssh2 isn't an oe-core recipe, so allow to disable it from
+configure.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e95c5c..12153b4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
+ ])
+
+ dnl *** Curl ***
++AC_ARG_ENABLE([libssh2],
++ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@],
++ [case "${enableval}" in
++ yes) NEED_SSH2=yes ;;
++ no) NEED_SSH2=no ;;
++ auto) NEED_SSH2=auto ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;;
++ esac],[NEED_SSH2=auto])
++
+ translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
+ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
+@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ ])
+ AC_SUBST(CURL_CFLAGS)
+ AC_SUBST(CURL_LIBS)
+- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
+- HAVE_SSH2="yes"
+- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
+- ], [
+- HAVE_SSH2="no"
+- ])
++ if test "x$NEED_SSH2" != "xno"; then
++ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
++ HAVE_SSH2="yes"
++ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
++ ], [
++ HAVE_SSH2="no"
++ ])
++ fi
+ AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
+ AC_SUBST(SSH2_CFLAGS)
+ AC_SUBST(SSH2_LIBS)
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
index c57c98f2af..59065de811 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
@@ -4,7 +4,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \
file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
-SRC_URI[md5sum] = "16c2050716383926909664aa6c6aca2b"
-SRC_URI[sha256sum] = "984c133ec9d5d705e313d9e2bbd1472b93c6567460602a9a316578925ffe2eca"
+
+SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch"
+
+SRC_URI[md5sum] = "e0bb39412cf4a48fe0397bcf3a7cd451"
+SRC_URI[sha256sum] = "152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c"
+
S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
index e1a5904abf..75859f9a89 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -19,8 +19,9 @@ EXTRA_OECONF += " \
-disable-openjpeg \
"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
new file mode 100644
index 0000000000..0407a30f90
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
@@ -0,0 +1,37 @@
+From b608d027fff6efc2d1988ebf169cbe3b2b44a61b Mon Sep 17 00:00:00 2001
+From: zhouming <b42586@freescale.com>
+Date: Thu, 8 May 2014 12:01:17 +0800
+Subject: [PATCH] ENGR00312034: do not change eos event to gap event if no
+ data has passed to streamsynchronizer.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=727074
+
+Upstream Status: Pending
+
+Signed-off-by: zhouming <b42586@freescale.com>
+---
+ gst/playback/gststreamsynchronizer.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
+index 3997d1b..3e17c55 100644
+--- a/gst/playback/gststreamsynchronizer.c
++++ b/gst/playback/gststreamsynchronizer.c
+@@ -488,12 +488,11 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
+ }
+ g_slist_free (pads);
+ } else {
+- /* if EOS, but no data has passed, then send something to replace EOS
+- * for preroll purposes */
++ /* if EOS, but no data has passed, then send EOS event */
+ if (!seen_data) {
+ GstEvent *gap_event;
+
+- gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
++ gap_event = gst_event_new_eos ();
+ ret = gst_pad_push_event (srcpad, gap_event);
+ } else {
+ GstEvent *gap_event;
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
new file mode 100644
index 0000000000..0fc561c012
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -0,0 +1,44 @@
+From af0dac26f62aaceb4bf266720911953793e0fc5d Mon Sep 17 00:00:00 2001
+From: zhouming <b42586@freescale.com>
+Date: Wed, 14 May 2014 10:16:20 +0800
+Subject: [PATCH] ENGR00312515: get caps from src pad when query caps
+
+https://bugzilla.gnome.org/show_bug.cgi?id=728312
+
+Upstream Status: Pending
+
+Signed-off-by: zhouming <b42586@freescale.com>
+---
+ gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+ mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c
+
+diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
+old mode 100644
+new mode 100755
+index 9b6c478..ae2294a
+--- a/gst-libs/gst/tag/gsttagdemux.c
++++ b/gst-libs/gst/tag/gsttagdemux.c
+@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+ }
+ break;
+ }
++ case GST_QUERY_CAPS:
++ {
++
++ /* We can hijack caps query if we typefind already */
++ if (demux->priv->src_caps) {
++ gst_query_set_caps_result (query, demux->priv->src_caps);
++ res = TRUE;
++ } else {
++ res = gst_pad_query_default (pad, parent, query);
++ }
++ break;
++ }
++
+ default:
+ res = gst_pad_query_default (pad, parent, query);
+ break;
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
new file mode 100644
index 0000000000..51fdc7e177
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
@@ -0,0 +1,57 @@
+From 68fa1b1425ad2c5f7c5013d0943153a8a6d0934e Mon Sep 17 00:00:00 2001
+From: Jian Li <lj.qfy.sh@gmail.com>
+Date: Wed, 24 Sep 2014 17:21:02 +0800
+Subject: [PATCH] taglist not send to down stream if all the frame corrupted
+
+https://bugzilla.gnome.org/show_bug.cgi?id=737246
+
+Upstream status: Pending
+
+Signed-off-by: Jian Li <lj.qfy.sh@gmail.com>
+---
+ gst-libs/gst/audio/gstaudiodecoder.c | 9 +++++++++
+ gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
+index 3504678..3d69efe 100644
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
++++ b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2083,6 +2083,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
+ gst_audio_decoder_drain (dec);
+ GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+
++ /* send taglist if no valid frame is decoded util EOS */
++ if (dec->priv->taglist && dec->priv->taglist_changed) {
++ GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist);
++ if (!gst_tag_list_is_empty (dec->priv->taglist))
++ gst_audio_decoder_push_event (dec,
++ gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
++ dec->priv->taglist_changed = FALSE;
++ }
++
+ /* Forward EOS because no buffer or serialized event will come after
+ * EOS and nothing could trigger another _finish_frame() call. */
+ ret = gst_audio_decoder_push_event (dec, event);
+diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
+index dd8abe3..d9bfe4d 100644
+--- a/gst-libs/gst/video/gstvideodecoder.c
++++ b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1024,6 +1024,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
+ * parent class' ::sink_event() until a later time.
+ */
+ forward_immediate = TRUE;
++
++ /* send taglist if no valid frame is decoded util EOS */
++ if (decoder->priv->tags && decoder->priv->tags_changed) {
++ gst_video_decoder_push_event (decoder,
++ gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
++ decoder->priv->tags_changed = FALSE;
++ }
++
+ break;
+ }
+ case GST_EVENT_GAP:
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index ed8babe2a0..11cf8b4fde 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -4,6 +4,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
"
-SRC_URI[md5sum] = "278e0a1872ecb981e91830b2cb7f3e98"
-SRC_URI[sha256sum] = "4d6273dc3f5a94bcc53ccfe0711cfddd49e31371d1136bf62fa1ecc604fc6550"
+
+SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
+"
+
+SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e"
+SRC_URI[sha256sum] = "77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d"
+
S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
index a894abe501..fbe3a42cd7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -11,8 +11,9 @@ S = "${WORKDIR}/git"
SRCREV = "8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
index b73bcd06e7..b33ab2b705 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -3,7 +3,7 @@ require gstreamer1.0-plugins.inc
LICENSE = "GPLv2+ & LGPLv2.1+"
# libid3tag
-DEPENDS += "gstreamer1.0-plugins-base zlib bzip2"
+DEPENDS += "gstreamer1.0-plugins-base zlib bzip2 libcap"
inherit gettext
@@ -11,17 +11,18 @@ inherit gettext
PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- orc cairo flac gdk-pixbuf jpeg libpng soup speex taglib \
+ orc cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
-X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
-X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
+X11ENABLEOPTS = "--enable-x --enable-xshm"
+X11DISABLEOPTS = "--disable-x --disable-xshm"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo"
PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
+PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,udev"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
new file mode 100755
index 0000000000..53147df42b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
@@ -0,0 +1,62 @@
+From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498@freescale.com>
+Date: Tue, 5 Aug 2014 14:40:46 +0800
+Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec
+ data in caps.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=734263
+
+Upstream Status: Submitted
+
+Signed-off-by: Song Bing <b06498@freescale.com>
+---
+ gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
+index 7913d9a..1749d39 100644
+--- a/gst/rtp/gstrtpmp4gpay.c
++++ b/gst/rtp/gstrtpmp4gpay.c
+@@ -390,6 +390,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+ const GValue *codec_data;
+ const gchar *media_type = NULL;
+ gboolean res;
++ const gchar *name;
+
+ rtpmp4gpay = GST_RTP_MP4G_PAY (payload);
+
+@@ -400,7 +401,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+ GST_LOG_OBJECT (rtpmp4gpay, "got codec_data");
+ if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) {
+ GstBuffer *buffer;
+- const gchar *name;
+
+ buffer = gst_value_get_buffer (codec_data);
+ GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data");
+@@ -426,6 +426,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+
+ rtpmp4gpay->config = gst_buffer_copy (buffer);
+ }
++ } else {
++ name = gst_structure_get_name (structure);
++
++ if (!strcmp (name, "video/mpeg")) {
++ rtpmp4gpay->profile = g_strdup ("1");
++
++ /* fixed rate */
++ rtpmp4gpay->rate = 90000;
++ /* video stream type */
++ rtpmp4gpay->streamtype = "4";
++ /* no params for video */
++ rtpmp4gpay->params = NULL;
++ /* mode */
++ rtpmp4gpay->mode = "generic";
++
++ media_type = "video";
++ }
+ }
+ if (media_type == NULL)
+ goto config_failed;
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
new file mode 100755
index 0000000000..7f94f50760
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
@@ -0,0 +1,25 @@
+commit d71d74daac8ed54156ed103958ab455c63c72b0e
+Author: Song Bing <b06498@freescale.com>
+Date: Mon Nov 10 11:25:47 2014 +0800
+
+[asteriskh263] decrease the rank as we havn't this kind of decoder.
+
+Decrease the rank as we havn't this kind of decoder.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=739935
+
+Upstream Status: Pending
+
+Signed-off-by: Song Bing <b06498@freescale.com>
+
+diff --git a/gst/rtp/gstasteriskh263.c b/gst/rtp/gstasteriskh263.c
+index a01fbc8..8fa3194 100644
+--- a/gst/rtp/gstasteriskh263.c
++++ b/gst/rtp/gstasteriskh263.c
+@@ -226,5 +226,5 @@ gboolean
+ gst_asteriskh263_plugin_init (GstPlugin * plugin)
+ {
+ return gst_element_register (plugin, "asteriskh263",
+- GST_RANK_SECONDARY, GST_TYPE_ASTERISK_H263);
++ GST_RANK_SECONDARY - 1, GST_TYPE_ASTERISK_H263);
+ }
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
index 93813a06ec..943ab60397 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
@@ -3,7 +3,11 @@ include gstreamer1.0-plugins-good.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-SRC_URI[md5sum] = "8aac024ee0cd98b67a3066ad31d8c677"
-SRC_URI[sha256sum] = "c9c90368393c2e5e78387e95c02ce7b19f48e793bba6d8547f2c4b51c6f420d3"
-S = "${WORKDIR}/gst-plugins-good-${PV}"
+SRC_URI += "file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+ file://decrease_asteriskh263_rank.patch \
+"
+SRC_URI[md5sum] = "eaf1a6daf73749bc423feac301d60038"
+SRC_URI[sha256sum] = "79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index 8b11b20b1b..2c0e0efe68 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -10,8 +10,9 @@ S = "${WORKDIR}/git"
SRCREV = "fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
index dd5cb4e817..25cb28c060 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
@@ -2,7 +2,9 @@ include gstreamer1.0-plugins-ugly.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 "
-SRC_URI[md5sum] = "c87a27db498bb736f6c266198657ea74"
-SRC_URI[sha256sum] = "4ef6f76a47d57b8385d457c7b620b4c28fc041ab1d7c2e3e2f5f05b12b988ea8"
+
+SRC_URI[md5sum] = "6954beed7bb9a93e426dee543ff46393"
+SRC_URI[sha256sum] = "5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067"
+
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
index 2f72497363..dcf5ffc3c1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -9,8 +9,9 @@ S = "${WORKDIR}/git"
SRCREV = "06b8ac10cee85c5c304ca320997aa8f44295a66f"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb
deleted file mode 100644
index 78d35f349c..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "239f805e755deb388162e957fcffff1d"
-SRC_URI[sha256sum] = "c12befa5ec63818842c150725d3e9e38bf9948366317b67dc2536dfd00765da1"
-
-
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
new file mode 100644
index 0000000000..bb9b42b53f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
@@ -0,0 +1,6 @@
+include gstreamer1.0-rtsp-server.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+SRC_URI[md5sum] = "a9f9b8899ec7ab33663cda7627db40d3"
+SRC_URI[sha256sum] = "3089254bd31b7c1f1cf2c034a3b3551f92878f9e3cab65cef3a901a04c0f1d37"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
index 1204dd5fa3..94be84618e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
@@ -6,8 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
file://0001-Fix-crash-with-gst-inspect.patch \
- "
-SRC_URI[md5sum] = "74d8f674187a5f0ddf38da594c3998c3"
-SRC_URI[sha256sum] = "1e7ca67a7870a82c9ed51d51d0008cdbc550c41d64cc3ff3f9a1c2fc311b4929"
+"
+SRC_URI[md5sum] = "88a9289c64a4950ebb4f544980234289"
+SRC_URI[sha256sum] = "40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae"
+
S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index 424c90a9e8..cb00d319a7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -10,8 +10,9 @@ S = "${WORKDIR}/git"
SRCREV = "3b8181a8c550e74acaba4e8c55bdc649fa551dc9"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb b/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
index 99eee81761..f08908a216 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
@@ -13,7 +13,9 @@ PR = "r2"
SRC_URI = "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.bz2 \
file://check_fix.patch \
- file://gst-inspect-check-error.patch"
+ file://gst-inspect-check-error.patch \
+ file://0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch \
+"
SRC_URI[md5sum] = "a0cf7d6877f694a1a2ad2b4d1ecb890b"
SRC_URI[sha256sum] = "e556a529e0a8cf1cd0afd0cab2af5488c9524e7c3f409de29b5d82bb41ae7a30"
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index 1d617a2482..21c29fc5a7 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -10,6 +10,13 @@ SECTION = "libs"
LICENSE = "GPLv2+"
LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "http://libav.org/releases/${BP}.tar.xz"
+
# Provides ffmpeg compat, see http://libav.org/about.html
PROVIDES = "ffmpeg"
@@ -60,8 +67,6 @@ EXTRA_OECONF = " \
--enable-avserver \
--enable-avplay \
--ld="${CCLD}" \
- --enable-libtheora \
- --enable-libvorbis \
--arch=${TARGET_ARCH} \
--target-os="linux" \
--enable-cross-compile \
@@ -87,10 +92,8 @@ do_install_append() {
install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
}
-FFMPEG_LIBS = "libavcodec libavdevice libavformat \
- libavutil libpostproc libswscale libavfilter"
-
PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
RSUGGESTS_${PN} = "mplayer"
FILES_${PN} = "${bindir}"
@@ -142,5 +145,3 @@ python populate_packages_prepend() {
for pkg in pkgs:
d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
}
-
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc|swscale).*"
diff --git a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
deleted file mode 100644
index d9b22b9b6a..0000000000
--- a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-Date: Thu, 10 Jan 2013 12:42:19 +0100
-Subject: [PATCH] configure: enable pic for AArch64
-
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-Status: Backport
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- git.orig/configure
-+++ git/configure
-@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
- check_host_cflags -Wall
-
- case "$arch" in
-- alpha|ia64|mips|parisc|ppc|sparc)
-+ alpha|ia64|mips|parisc|ppc|sparc|aarch64)
- spic=$shared
- ;;
- x86)
diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb b/meta/recipes-multimedia/libav/libav_0.8.11.bb
deleted file mode 100644
index 662d205fee..0000000000
--- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require libav.inc
-
-SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
- file://0001-configure-enable-pic-for-AArch64.patch"
-
-SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
-SRC_URI[sha256sum] = "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-PROVIDES += "libpostproc"
-
-EXTRA_OECONF += " \
- --enable-postproc \
-"
diff --git a/meta/recipes-multimedia/libav/libav_9.13.bb b/meta/recipes-multimedia/libav/libav_9.13.bb
deleted file mode 100644
index 7bfbc48ba7..0000000000
--- a/meta/recipes-multimedia/libav/libav_9.13.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "http://libav.org/releases/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "23b9e34bffdaee366710fdf20157a570"
-SRC_URI[sha256sum] = "2ff05df6cd2259b3bb277eb16c234214f8e0530700d0c774d033eba23edde6ca"
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-multimedia/libav/libav_9.16.bb b/meta/recipes-multimedia/libav/libav_9.16.bb
new file mode 100644
index 0000000000..79ff3f84d1
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_9.16.bb
@@ -0,0 +1,4 @@
+require libav.inc
+
+SRC_URI[md5sum] = "7b44b75cec24b8e7545e5029e76917e0"
+SRC_URI[sha256sum] = "ca846473b0b8ed8e3404c52e5e92df6d35cb5fa487eec498525de3ffda4367a0"
diff --git a/meta/recipes-multimedia/libav/libpostproc_git.bb b/meta/recipes-multimedia/libav/libpostproc_git.bb
new file mode 100644
index 0000000000..88891db09b
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libpostproc_git.bb
@@ -0,0 +1,46 @@
+SUMMARY = "FFmpeg derived postprocessing library"
+HOMEPAGE = "http://git.videolan.org/?p=libpostproc.git;a=summary"
+SECTION = "libs"
+DEPENDS = "libav"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# because it depends on libav which has commercial flag
+LICENSE_FLAGS = "commercial"
+
+PV = "52.3.0+git${SRCPV}"
+
+SRCREV = "811db3b957dfde24aef2d0f82e297e5bf552d873"
+SRC_URI = "git://github.com/lu-zero/postproc;protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit autotools lib_package pkgconfig
+
+FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
+EXTRA_FFCONF ?= ""
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --enable-pthreads \
+ --enable-gpl \
+ --enable-postproc \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ --prefix=${prefix} \
+ \
+ --arch=${TARGET_ARCH} \
+ --target-os="linux" \
+ --enable-cross-compile \
+ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+ --extra-ldflags="${TARGET_LDFLAGS}" \
+ --sysroot="${STAGING_DIR_TARGET}" \
+ ${EXTRA_FFCONF} \
+"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch b/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
index 8a04b54efd..2845fb1d3a 100644
--- a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
+++ b/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
@@ -6,7 +6,8 @@ diff -Nurd libid3tag-0.15.1b/configure.ac libid3tag-0.15.1b/configure.ac
+++ libid3tag-0.15.1b/configure.ac 2013-01-03 06:41:02.734835014 +0200
@@ -28,7 +28,7 @@
- AM_INIT_AUTOMAKE
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch b/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
new file mode 100644
index 0000000000..3e544248d9
--- /dev/null
+++ b/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
@@ -0,0 +1,12 @@
+Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index e602fd3..e075b86 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
index 58d68a639b..30937ebe68 100644
--- a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ b/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libmad-${PV}.tar.gz \
file://add-pkgconfig.patch \
file://fix_for_mips_with_gcc-4.5.0.patch \
file://obsolete_automake_macros.patch \
+ file://automake-foreign.patch \
"
SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
diff --git a/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch b/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
new file mode 100644
index 0000000000..f408e4a621
--- /dev/null
+++ b/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
@@ -0,0 +1,36 @@
+Disable so versioning since they are really not a versioned shared lib.
+
+Upstream-Status: Submitted @ https://sourceforge.net/p/omxil/bugs/59/
+
+Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am 2014-07-20 15:25:42.687525225 -0400
+@@ -10,4 +10,5 @@
+ libomxaudio_effects_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
++libomxaudio_effects_la_LDFLAGS = -avoid-version
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am 2014-07-20 15:24:49.151259753 -0400
+@@ -10,4 +10,4 @@
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
+-
++libomxclocksrc_la_LDFLAGS = -avoid-version
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:00.862425254 -0400
++++ libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:36.462601786 -0400
+@@ -6,7 +6,7 @@
+ library_entry_point.c
+
+ libomxvideosched_la_LIBADD = $(top_builddir)/src/libomxil-bellagio.la
+-libomxvideosched_la_LDFLAGS =
++libomxvideosched_la_LDFLAGS = -avoid-version
+ libomxvideosched_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
diff --git a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
index 103d789482..40d6df8b6a 100644
--- a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
+++ b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
@@ -12,7 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/omxil/libomxil-bellagio-${PV}.tar.gz \
file://configure-fix.patch \
file://parallel-make.patch \
file://makefile-docdir-fix.patch \
- file://dynamicloader-linking.patch"
+ file://dynamicloader-linking.patch \
+ file://disable-so-versioning.patch"
SRC_URI[md5sum] = "a1de827fdb75c02c84e55f740ca27cb8"
SRC_URI[sha256sum] = "593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c"
@@ -23,12 +24,15 @@ inherit autotools
EXTRA_OECONF += "--disable-doc --disable-Werror"
-FILES_${PN} += "${libdir}/bellagio/*${SOLIBS} \
+#
+# The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
+# Make sure they get packaged in the main package.
+#
+FILES_${PN} += "${libdir}/bellagio/*.so \
${libdir}/omxloaders/*${SOLIBS}"
FILES_${PN}-staticdev += "${libdir}/bellagio/*.a \
${libdir}/omxloaders/*.a"
FILES_${PN}-dev += "${libdir}/bellagio/*.la \
- ${libdir}/bellagio/*${SOLIBSDEV} \
${libdir}/omxloaders/*.la \
${libdir}/omxloaders/*${SOLIBSDEV}"
FILES_${PN}-dbg += "${libdir}/bellagio/.debug/ \
diff --git a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch b/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch
deleted file mode 100644
index bbbca89e8f..0000000000
--- a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From fff7cbc01e061a235852f385866fe75fb17867e3 Mon Sep 17 00:00:00 2001
-From: Valentin Popa <valentin.popa@intel.com>
-Date: Tue, 26 Nov 2013 12:06:55 +0200
-Subject: [PATCH] configure: lower automake requirement
-
-We're not using parallel tests in OE-core yet
-
-Signed-off-by: Valentin Popa <valentin.popa@intel.com>
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
-Upstream-Status: Inapropriate [OE specific build hack]
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 28200c3..fab2515 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,7 +27,7 @@ AC_CONFIG_MACRO_DIR([scripts])
- # dist-xz requires automake 1.11 or later
- # 1.12.2 fixes a security issue in 1.11.2 and 1.12.1
- # 1.13 is required for parallel tests
--AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules subdir-objects])
-+AM_INIT_AUTOMAKE([1.12.2 foreign dist-xz color-tests silent-rules subdir-objects])
- # The following line causes --disable-maintainer-mode to be the default to
- # configure, this is necessary because libpng distributions cannot rely on the
- # time stamps of the autotools generated files being correct
---
-1.8.3.2
-
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb b/meta/recipes-multimedia/libpng/libpng_1.6.10.bb
deleted file mode 100644
index babf87e392..0000000000
--- a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cb7a834ba2891bc30b8577e49963a435 \
- file://png.h;endline=15;md5=853b11c4a19ec66decd641efd756bc2c \
- file://png.h;beginline=209;endline=323;md5=cface34a7db6b71eaa828fe934951f81"
-DEPENDS = "zlib"
-LIBV = "16"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \
- file://0001-configure-lower-automake-requirement.patch \
- "
-
-SRC_URI[md5sum] = "5f414b20f683b1d96b163c89e3eff768"
-SRC_URI[sha256sum] = "4003f0fd0e36110a2b742fc5b9e1ab93ed7a7ab57ae8dc65f0e8101458775a56"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.16.bb b/meta/recipes-multimedia/libpng/libpng_1.6.16.bb
new file mode 100644
index 0000000000..a8677e8a37
--- /dev/null
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.16.bb
@@ -0,0 +1,28 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76dbddb73e547d9b3fa16909a98049c0 \
+ file://png.h;endline=15;md5=fd8f7ae7b090a168a9e023d0a5d68a3e \
+ file://png.h;beginline=229;endline=343;md5=44075eedf4763ada355d8f60ac3296c9"
+DEPENDS = "zlib"
+LIBV = "16"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "23b7286b5d4a86de950fd2ffc5cac742"
+SRC_URI[sha256sum] = "42f754df633e4e700544e5913cbe2fd4928bbfccdc07708a5cf84e59827fbe60"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch
new file mode 100644
index 0000000000..fc4adb59d8
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch
@@ -0,0 +1,786 @@
+libtiff: fix CVE-2013-1961.
+
+Upstream-Status: Backported
+
+Issue Description: CVE-2013-1961
+Stack-based buffer overflow in the t2p_write_pdf_page function in tiff2pdf
+in libtiff before 4.0.3 allows remote attackers to cause a denial of service
+(application crash) via a crafted image length and resolution in a TIFF image file.
+
+Fix Description: Replace sprintf with snprintf
+
+Signed-off-by: Priyanka Shobhan <priyanka_shobhan@mentor.com>
+---
+
+diff --git a/contrib/dbs/xtiff/xtiff.c b/contrib/dbs/xtiff/xtiff.c
+index 2634030..97e4ffe 100644
+--- a/contrib/dbs/xtiff/xtiff.c
++++ b/contrib/dbs/xtiff/xtiff.c
+@@ -512,9 +512,9 @@ SetNameLabel()
+ Arg args[1];
+
+ if (tfMultiPage)
+- sprintf(buffer, "%s - page %d", fileName, tfDirectory);
++ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
+ else
+- strcpy(buffer, fileName);
++ snprintf(buffer, sizeof(buffer), "%s", fileName);
+ XtSetArg(args[0], XtNlabel, buffer);
+ XtSetValues(labelWidget, args, 1);
+ }
+diff --git a/libtiff/tif_codec.c b/libtiff/tif_codec.c
+index e201667..703e87d 100644
+--- a/libtiff/tif_codec.c
++++ b/libtiff/tif_codec.c
+@@ -108,7 +108,8 @@ _notConfigured(TIFF* tif)
+ const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
+ char compression_code[20];
+
+- sprintf( compression_code, "%d", tif->tif_dir.td_compression );
++ snprintf(compression_code, sizeof(compression_code), "%d",
++ tif->tif_dir.td_compression );
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%s compression support is not configured",
+ c ? c->name : compression_code );
+diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
+index d319931..4dae5e5 100644
+--- a/libtiff/tif_dirinfo.c
++++ b/libtiff/tif_dirinfo.c
+@@ -711,7 +711,7 @@ _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type)
+ * note that this name is a special sign to TIFFClose() and
+ * _TIFFSetupFields() to free the field
+ */
+- sprintf(fld->field_name, "Tag %d", (int) tag);
++ snprintf(fld->field_name, 32, "Tag %d", (int) tag);
+
+ return fld;
+ }
+diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c
+index 162aac1..a3eeb03 100644
+--- a/tools/rgb2ycbcr.c
++++ b/tools/rgb2ycbcr.c
+@@ -332,7 +332,8 @@ tiffcvt(TIFF* in, TIFF* out)
+ TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+ { char buf[2048];
+ char *cp = strrchr(TIFFFileName(in), '/');
+- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
++ snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
++ cp ? cp+1 : TIFFFileName(in));
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
+ }
+ TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
+diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c
+index bda754a..7ffaca0 100644
+--- a/tools/tiff2bw.c
++++ b/tools/tiff2bw.c
+@@ -205,7 +205,7 @@ main(int argc, char* argv[])
+ }
+ }
+ TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+- sprintf(thing, "B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
+ outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 356328c..957fd9f 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -3609,7 +3609,9 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
+ char buffer[16];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
++ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
++ t2p->pdf_majorversion&0xff,
++ t2p->pdf_minorversion&0xff);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
+
+@@ -3623,10 +3625,10 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen );
+ written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
+
+@@ -3665,13 +3667,13 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "/", 1);
+ for (i=0;i<namelen;i++){
+ if ( ((unsigned char)name[i]) < 0x21){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+ }
+ if ( ((unsigned char)name[i]) > 0x7E){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+@@ -3679,57 +3681,57 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
+ if (nextchar==0){
+ switch (name[i]){
+ case 0x23:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x25:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x28:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x29:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x2F:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3C:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3E:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+@@ -3844,14 +3846,14 @@ tsize_t t2p_write_pdf_stream_end(TIFF* output){
+ tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
+ if(len!=0){
+ written += t2p_write_pdf_stream_length(len, output);
+ } else {
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ }
+@@ -3892,10 +3894,10 @@ tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){
+ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)len);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+
+@@ -3909,7 +3911,7 @@ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
+ tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
+ {
+ tsize_t written = 0;
+- char buffer[16];
++ char buffer[32];
+ int buflen = 0;
+
+ written += t2pWriteFile(output,
+@@ -3948,7 +3950,6 @@ tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output)
+ written += t2p_write_pdf_string(t2p->pdf_datetime, output);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
+- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
+ written += t2p_write_pdf_string(buffer, output);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+@@ -4089,7 +4090,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ {
+ tsize_t written=0;
+ tdir_t i=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ int page=0;
+@@ -4097,7 +4098,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
+ page = t2p->pdf_pages+1;
+ for (i=0;i<t2p->tiff_pagecount;i++){
+- buflen=sprintf(buffer, "%d", page);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", page);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ if ( ((i+1)%8)==0 ) {
+@@ -4112,8 +4113,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
+
+@@ -4128,28 +4128,28 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+
+ unsigned int i=0;
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[256];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "] \n", 3);
+ written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
+@@ -4157,15 +4157,13 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen = sprintf(buffer, "%u", i+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4177,12 +4175,10 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4191,9 +4187,7 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ if(t2p->tiff_transferfunctioncount != 0) {
+ written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
+ t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4566,7 +4560,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
+ if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
+ box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4581,7 +4575,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
+ }
+ } else {
+ box=t2p->pdf_imagebox;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4606,59 +4600,48 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
+ TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
+ written += t2pWriteFile(output,
+ (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im",
+ 42);
+- buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ if(tile != 0){
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen=sprintf(buffer, "%lu", (unsigned long)tile);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
+ } else {
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+@@ -4702,11 +4685,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ t2p->pdf_colorspace ^= T2P_CS_PALETTE;
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+ t2p->pdf_colorspace |= T2P_CS_PALETTE;
+- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
++ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs );
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
+ return(written);
+@@ -4740,10 +4722,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ X_W /= Y_W;
+ Z_W /= Y_W;
+ Y_W = 1.0F;
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
+- buflen=sprintf(buffer, "[%d %d %d %d] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n",
+ t2p->pdf_labrange[0],
+ t2p->pdf_labrange[1],
+ t2p->pdf_labrange[2],
+@@ -4759,26 +4741,26 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
+ if(t2p->tiff_transferfunctioncount == 1){
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "[ ", 2);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 2));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4800,7 +4782,7 @@ tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){
+ written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
+ written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
+ written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
+- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
++ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
+ written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
+@@ -4827,7 +4809,7 @@ tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){
+ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[128];
++ char buffer[256];
+ int buflen=0;
+
+ float X_W=0.0;
+@@ -4895,16 +4877,16 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
+ if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
+ }
+ if(t2p->pdf_colorspace & T2P_CS_CALRGB){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
+ X_R, Y_R, Z_R,
+ X_G, Y_G, Z_G,
+ X_B, Y_B, Z_B);
+@@ -4923,11 +4905,11 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
+
+@@ -4937,11 +4919,11 @@ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/N ", 3);
+- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
+ t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
+@@ -5006,7 +4988,7 @@ tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ if(t2p->pdf_compression==T2P_COMPRESS_NONE){
+@@ -5021,41 +5003,33 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
+ if(tile==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_length);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+@@ -5082,21 +5056,17 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ if(t2p->pdf_compressionquality%100){
+ written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
+ written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen = sprintf(buffer, "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
+ }
+@@ -5116,16 +5086,16 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[21];
++ char buffer[64];
+ int buflen=0;
+ uint32 i=0;
+
+ written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
+ for (i=0;i<t2p->pdf_xrefcount;i++){
+- sprintf(buffer, "%.10lu 00000 n \n",
++ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
+ (unsigned long)t2p->pdf_xrefoffsets[i]);
+ written += t2pWriteFile(output, (tdata_t) buffer, 20);
+ }
+@@ -5149,17 +5119,14 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
+ snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
+
+ written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
+- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
++ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+@@ -5167,9 +5134,8 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+ written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
+
+ return(written);
+diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
+index 3330750..7a9a816 100644
+--- a/tools/tiff2ps.c
++++ b/tools/tiff2ps.c
+@@ -1789,8 +1789,8 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ imageOp = "imagemask";
+
+ (void)strcpy(im_x, "0");
+- (void)sprintf(im_y, "%lu", (long) h);
+- (void)sprintf(im_h, "%lu", (long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
++ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
+ tile_width = w;
+ tile_height = h;
+ if (TIFFIsTiled(tif)) {
+@@ -1811,7 +1811,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ }
+ if (tile_height < h) {
+ fputs("/im_y 0 def\n", fd);
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ } else {
+ repeat_count = tf_numberstrips;
+@@ -1823,7 +1823,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ fprintf(fd, "/im_h %lu def\n",
+ (unsigned long) tile_height);
+ (void)strcpy(im_h, "im_h");
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ }
+
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index 9cd5d86..a2443aa 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -2077,7 +2077,7 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex,
+ return 1;
+ }
+
+- sprintf (filenum, "-%03d%s", findex, export_ext);
++ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
+ filenum[14] = '\0';
+ strncat (exportname, filenum, 15);
+ }
+@@ -2230,8 +2230,8 @@ main(int argc, char* argv[])
+
+ /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
++ dump.infilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+@@ -2249,8 +2249,8 @@ main(int argc, char* argv[])
+
+ /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
++ dump.outfilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+diff --git a/tools/tiffdither.c b/tools/tiffdither.c
+index f2f0f20..4308946 100644
+--- a/tools/tiffdither.c
++++ b/tools/tiffdither.c
+@@ -260,7 +260,7 @@ main(int argc, char* argv[])
+ TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
+ else
+ CopyField(TIFFTAG_FILLORDER, shortv);
+- sprintf(thing, "Dithered B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ CopyField(TIFFTAG_PHOTOMETRIC, shortv);
+ CopyField(TIFFTAG_ORIENTATION, shortv);
+--
+1.8.3.rc3
+
+
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
index af1f2b6ad8..b7d1129ad6 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
@@ -6,6 +6,7 @@ HOMEPAGE = "http://www.remotesensing.org/libtiff/"
SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
file://libtool2.patch \
file://libtiff-CVE-2013-1960.patch \
+ file://libtiff-CVE-2013-1961.patch \
file://libtiff-CVE-2013-4232.patch \
file://libtiff-CVE-2013-4243.patch \
file://libtiff-CVE-2013-4244.patch \
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
index 12112842c3..cede2bf100 100644
--- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
+++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
@@ -6,8 +6,6 @@ LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
-
PR = "r2"
SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \
@@ -18,7 +16,10 @@ SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e
inherit autotools pkgconfig
-EXTRA_OECONF = "--enable-shared --disable-sdl --with-x"
+EXTRA_OECONF = "--enable-shared --disable-sdl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
diff --git a/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch
new file mode 100644
index 0000000000..a563b8b022
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch
@@ -0,0 +1,239 @@
+From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Wed, 23 Jan 2013 17:14:16 +0100
+Subject: [PATCH] Aarch64 basic port
+
+Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+
+
+Upstream-Status: Backport
+
+It is original from
+https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/atomic_ops.h | 4
+ src/atomic_ops/sysdeps/Makefile.am | 1
+ src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 189 insertions(+)
+ create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h
+
+--- libatomic_ops-7.2.orig/src/atomic_ops.h
++++ libatomic_ops-7.2/src/atomic_ops.h
+@@ -242,10 +242,14 @@
+ # endif /* __m68k__ */
+ # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
+ || defined(__powerpc64__) || defined(__ppc64__)
+ # include "atomic_ops/sysdeps/gcc/powerpc.h"
+ # endif /* __powerpc__ */
++# if defined(__aarch64__)
++# include "atomic_ops/sysdeps/gcc/aarch64.h"
++# define AO_CAN_EMUL_CAS
++# endif /* __aarch64__ */
+ # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS)
+ # include "atomic_ops/sysdeps/gcc/arm.h"
+ # define AO_CAN_EMUL_CAS
+ # endif /* __arm__ */
+ # if defined(__cris__) || defined(CRIS)
+--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am
++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am
+@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h
+ standard_ao_double_t.h \
+ README \
+ \
+ armcc/arm_v6.h \
+ \
++ gcc/aarch64.h \
+ gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \
+ gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \
+ gcc/mips.h gcc/powerpc.h gcc/s390.h \
+ gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \
+ \
+--- /dev/null
++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h
+@@ -0,0 +1,184 @@
++/*
++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
++ *
++ *
++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
++ *
++ * Permission is hereby granted to use or copy this program
++ * for any purpose, provided the above notices are retained on all copies.
++ * Permission to modify the code and to distribute modified code is granted,
++ * provided the above notices are retained, and a notice that the code was
++ * modified is included with the above copyright notice.
++ *
++ */
++
++#include "../read_ordered.h"
++
++#include "../test_and_set_t_is_ao_t.h"
++
++AO_INLINE void
++AO_nop_full(void)
++{
++# ifndef AO_UNIPROCESSOR
++__sync_synchronize ();
++# endif
++}
++#define AO_HAVE_nop_full
++
++AO_INLINE AO_t
++AO_load(const volatile AO_t *addr)
++{
++ return __atomic_load_n (addr, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_load
++
++AO_INLINE AO_t
++AO_load_acquire(const volatile AO_t *addr)
++{
++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_load_acquire
++
++AO_INLINE void
++ AO_store(volatile AO_t *addr, AO_t value)
++{
++ __atomic_store_n(addr, value, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_store
++
++AO_INLINE void
++ AO_store_release(volatile AO_t *addr, AO_t value)
++{
++ __atomic_store_n(addr, value, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_store_release
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED);
++}
++# define AO_HAVE_test_and_set
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_acquire(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
++}
++# define AO_HAVE_test_and_set_acquire
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_release(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE);
++}
++# define AO_HAVE_test_and_set_release
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_full(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
++}
++# define AO_HAVE_test_and_set_full
++
++AO_INLINE AO_t
++AO_fetch_and_add(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_add
++
++AO_INLINE AO_t
++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_add_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_add_release
++
++AO_INLINE AO_t
++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_add_full
++
++AO_INLINE AO_t
++AO_fetch_and_add1(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_add1
++
++AO_INLINE AO_t
++AO_fetch_and_add1_acquire(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_add1_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_add1_release(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_add1_release
++
++AO_INLINE AO_t
++AO_fetch_and_add1_full(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_add1_full
++
++AO_INLINE AO_t
++AO_fetch_and_sub1(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_sub1
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_acquire(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_sub1_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_release(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_sub1_release
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_full(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_sub1_full
++
++/* Returns nonzero if the comparison succeeded. */
++AO_INLINE int
++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
++{
++ return __sync_bool_compare_and_swap(addr, old_val, new_val);
++}
++# define AO_HAVE_compare_and_swap
++
++AO_INLINE AO_t
++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
++{
++ return __sync_val_compare_and_swap(addr, old_val, new_val);
++}
++# define AO_HAVE_fetch_compare_and_swap
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
index f31f9835e5..5a582287b5 100644
--- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
PR = "r1"
SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \
+ file://0001-libatomic_ops-Aarch64-basic-port.patch \
"
SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8"
@@ -27,3 +28,5 @@ do_install_append() {
install -m 0755 -d ${D}${docdir}
mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 195a98296d..99cad76186 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool"
# optional
DEPENDS += "udev alsa-lib glib-2.0 dbus gconf"
-DEPENDS += "json-c gdbm speex libxml-parser-perl-native"
+DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap"
inherit autotools pkgconfig useradd gettext perlnative
@@ -79,7 +79,7 @@ PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainl
#upgrade path:
RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
-PACKAGES_DYNAMIC += "^pulseaudio-lib.* ^pulseaudio-module.* ^libpulse-lib.* ^libpulse-module.* "
+PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
FILES_libpulsecore = "${libdir}/libpulsecore*.so"
FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
new file mode 100644
index 0000000000..d5f33dc42e
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Backport
+
+commit 26b9d22dd24c17eb118d0205bf7b02b75d435e3c upstream
+
+rtp-recv: fix crash on empty UDP packets (CVE-2014-3970)
+
+On FIONREAD returning 0 bytes, we cannot return success, as the caller
+(rtpoll_work_cb in module-rtp-recv.c) would then try to
+pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger
+an assertion.
+
+Also we have to read out the possible empty packet from the socket, so
+that the kernel doesn't tell us again and again about it.
+
+Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
+
+diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
+index 9195493..c45981e 100644
+--- a/src/modules/rtp/rtp.c
++++ b/src/modules/rtp/rtp.c
+@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
+ goto fail;
+ }
+
+- if (size <= 0)
+- return 0;
++ if (size <= 0) {
++ /* size can be 0 due to any of the following reasons:
++ *
++ * 1. Somebody sent us a perfectly valid zero-length UDP packet.
++ * 2. Somebody sent us a UDP packet with a bad CRC.
++ *
++ * It is unknown whether size can actually be less than zero.
++ *
++ * In the first case, the packet has to be read out, otherwise the
++ * kernel will tell us again and again about it, thus preventing
++ * reception of any further packets. So let's just read it out
++ * now and discard it later, when comparing the number of bytes
++ * received (0) with the number of bytes wanted (1, see below).
++ *
++ * In the second case, recvmsg() will fail, thus allowing us to
++ * return the error.
++ *
++ * Just to avoid passing zero-sized memchunks and NULL pointers to
++ * recvmsg(), let's force allocation of at least one byte by setting
++ * size to 1.
++ */
++ size = 1;
++ }
+
+ if (c->memchunk.length < (unsigned) size) {
+ size_t l;
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
index 8d8c421179..99f0ef3a46 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
@@ -2,7 +2,9 @@ require pulseaudio.inc
SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \
file://0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch \
- file://volatiles.04_pulse"
+ file://volatiles.04_pulse \
+ file://CVE-2014-3970.patch \
+"
SRC_URI[md5sum] = "c43749838612f4860465e83ed62ca38e"
SRC_URI[sha256sum] = "99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939"
diff --git a/meta/recipes-multimedia/sbc/sbc_1.2.bb b/meta/recipes-multimedia/sbc/sbc_1.3.bb
index 9cdf01bb74..2d7f31bc1b 100644
--- a/meta/recipes-multimedia/sbc/sbc_1.2.bb
+++ b/meta/recipes-multimedia/sbc/sbc_1.3.bb
@@ -10,7 +10,7 @@ DEPENDS = "libsndfile1"
SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
-SRC_URI[md5sum] = "ec65c444ad4c32aa85702641045b19e9"
-SRC_URI[sha256sum] = "c2f01ea54f7473704825113a9cdd46a23e67c650eff575f0670c3d9d66c4a5dc"
+SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c"
+SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309"
inherit autotools pkgconfig
diff --git a/meta/recipes-qt/meta/meta-toolchain-qt.inc b/meta/recipes-qt/meta/meta-toolchain-qt.inc
index c9bdeae9ac..7e75d93b14 100644
--- a/meta/recipes-qt/meta/meta-toolchain-qt.inc
+++ b/meta/recipes-qt/meta/meta-toolchain-qt.inc
@@ -4,29 +4,32 @@ TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${QTNAME}-${DISTRO_VERSION}"
require recipes-core/meta/meta-toolchain.bb
-QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
+QT_TOOLS_PREFIX = "$OECORE_NATIVE_SYSROOT${bindir_nativesdk}"
-toolchain_create_sdk_env_script_append() {
- echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script
+create_sdk_files_append() {
+ mkdir -p ${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/
+ script=${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/${QT_DIR_NAME}.sh
+
+ echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' > $script
echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
echo 'export OE_QMAKE_CC=$CC' >> $script
echo 'export OE_QMAKE_CXX=$CXX' >> $script
echo 'export OE_QMAKE_LINK=$CXX' >> $script
echo 'export OE_QMAKE_AR=$AR' >> $script
- echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}/${libdir}' >> $script
- echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}/${includedir}/${QT_DIR_NAME}' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=$OECORE_TARGET_SYSROOT${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=$OECORE_TARGET_SYSROOT${includedir}/${QT_DIR_NAME}' >> $script
echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
- echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
- echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
- echo 'export QT_CONF_PATH=${SDKPATHNATIVE}/${sysconfdir}/qt.conf' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+ echo 'export QT_CONF_PATH=$OECORE_NATIVE_SYSROOT${sysconfdir}/qt.conf' >> $script
- # make a symbolic link to mkspecs for compatibility with Nokia's SDK
- # and QTCreator
- (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
+ # make a symbolic link to mkspecs for compatibility with Qt SDK
+ # and Qt Creator
+ (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
}
diff --git a/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb b/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
index 15dec8eef2..5f6916a430 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
@@ -7,17 +7,12 @@ LICENSE = "MIT"
PR = "r4"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
PACKAGES = "${PN}-demoapps"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-demoapps = "task-core-qt-demos"
-RREPLACES_${PN}-demoapps = "task-core-qt-demos"
-RCONFLICTS_${PN}-demoapps = "task-core-qt-demos"
-
QTDEMOS ?= "quicky ${COMMERCIAL_QT} fotowall"
SUMMARY_${PN}-demoapps = "Qt demo applications"
diff --git a/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb b/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
index 02a649bab4..d4f0fd1d8c 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
@@ -3,15 +3,10 @@ PR = "r2"
LICENSE = "MIT"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-qt4e-base"
-RREPLACES_${PN} = "task-qt4e-base"
-RCONFLICTS_${PN} = "task-qt4e-base"
-
TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
RDEPENDS_${PN} = " \
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
index 0e7c800946..772c151d25 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
@@ -4,6 +4,10 @@ QTLIBPREFIX = ""
require packagegroup-qt-toolchain-target.inc
+inherit distro_features_check
+# depends on qt4-x11-free
+REQUIRED_DISTRO_FEATURES = "x11"
+
RDEPENDS_${PN} += " \
qt4-x11-free-dev \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libqtopengl4-dev', '', d)} \
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
index fc1ccba9a7..02a032658d 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
@@ -1,7 +1,7 @@
LICENSE = "MIT"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
index 3a1f2cb1b2..21f0273e2a 100644
--- a/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
+++ b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
@@ -2,8 +2,8 @@
set -e
-if [ -f /usr/bin/qtdemo ]; then
- QTDEMO="qtdemo > /var/log/Xsession.log 2> &1"
+if [ -x /usr/bin/qtdemo ]; then
+ QTDEMO="qtdemo"
else
QTDEMO="qtdemoE -qws"
fi
@@ -18,7 +18,7 @@ case "$1" in
if [ ! -f /etc/pointercal ]; then
/usr/bin/ts_calibrate
fi
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
Xorg &
export DISPLAY=:0
$QTDEMO &
@@ -26,7 +26,7 @@ case "$1" in
QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
fi
else
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
Xorg &
export DISPLAY=:0
fi
@@ -35,7 +35,7 @@ case "$1" in
;;
stop)
echo "Stopping qtdemo"
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
killall Xorg
killall qtdemo
else
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
index fff3620b09..aa1b0b62f2 100644
--- a/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
+++ b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
@@ -6,6 +6,8 @@ PR = "r3"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo
diff --git a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
index d46acb9c7e..ae1769de3a 100644
--- a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
+++ b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-mobility-${PV}:"
-SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/qt-mobility/qt-mobility-opensource-src-${PV}.tar.gz/ea5db5a8d3dd4709c2926dceda646bd8/qt-mobility-opensource-src-${PV}.tar.gz \
file://qt-mobility-configure.patch \
file://0001-gstvideoconnector-fixed-buffers-allocation.patch \
file://0002-Remove-unnecessary-rpaths-from-qml_device-example.patch \
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6.inc b/meta/recipes-qt/qt4/qt4-4.8.6.inc
index ae6692b50a..bd20dac66c 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6.inc
+++ b/meta/recipes-qt/qt4/qt4-4.8.6.inc
@@ -22,6 +22,11 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
file://0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch \
file://0027-tools.pro-disable-qmeegographicssystemhelper.patch \
file://0028-Don-t-crash-on-broken-GIF-images.patch \
+ file://0029-aarch64_arm64_fix_arch_detection.patch \
+ file://0030-aarch64_arm64_qatomic_support.patch \
+ file://0031-aarch64_arm64_mkspecs.patch \
+ file://0032-aarch64_add_header.patch \
+ file://Fix-QWSLock-invalid-argument-logs.patch \
file://g++.conf \
file://linux.conf \
"
@@ -31,6 +36,14 @@ SRC_URI[sha256sum] = "8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa70
S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
+# disable webkit for mips64 n32 temporarily that fails to compile,
+# qt upstream defect:
+# https://bugreports.qt-project.org/browse/QTBUG-39224
+QT_CONFIG_FLAGS_append_mips64n32 = " -no-webkit"
+
+# disable webkit for aarch64 temporarily that fails to compile
+QT_CONFIG_FLAGS_append_aarch64 = " -no-webkit"
+
FILES_${QT_BASE_NAME}-tools_append = " ${bindir}/qml ${bindir}/qmlplugindump"
FILES_${QT_BASE_NAME}-tools-dbg_append = " ${bindir}/.debug/qml ${bindir}/.debug/qmlplugindump"
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
index 7d3b336f77..1d23c929f4 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
@@ -7,7 +7,7 @@ Subject: [PATCH 07/21] dbus: Remove "const" usage that causes compile failure
Patch has apparently been rejected upstream, not because it is invalid
but because the submitter did not submit a merge request for it, so the
validity of the patch upstream is uncertain. For further details see:
-http://bugreports.qt.nokia.com/browse/QTBUG-17962
+https://bugreports.qt-project.org/browse/QTBUG-17962
Upstream-Status: Denied [possible retry]
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
index 8402eab635..8e411f3426 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
@@ -4,7 +4,7 @@ Date: Wed, 26 Sep 2012 20:39:21 +0200
Subject: [PATCH 12/21] Add 2bpp support
Submitted upstream but rejected as being "out of scope":
-http://bugreports.qt.nokia.com/browse/QTBUG-3468
+https://bugreports.qt-project.org/browse/QTBUG-3468
Upstream-Status: Denied
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch
new file mode 100644
index 0000000000..fbd32b173d
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch
@@ -0,0 +1,53 @@
+From 800abbba658203fc8e746e3fc780a297cd4110cf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Wed, 20 Aug 2014 17:52:49 -0300
+Subject: [PATCH] Fix AArch64/arm64 detection.
+
+The detection needs to go before arm, else the system will detect AArch64/arm64
+as arm.
+
+This patch comes from Wookey, he has agreed to put it under BSD or Expat
+to allow it's inclusion in here:
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#255>
+
+Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ configure | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure b/configure
+index a9ba7c8..eb88b72 100755
+--- a/configure
++++ b/configure
+@@ -3241,17 +3241,17 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
+ fi
+ CFG_HOST_ARCH=s390
+ ;;
+- *:*:arm*)
++ *:*:aarch64*|*:*:arm64*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+- echo " ARM (arm)"
++ echo " AArch64 (aarch64)"
+ fi
+- CFG_HOST_ARCH=arm
++ CFG_HOST_ARCH=aarch64
+ ;;
+- *:*:aarch64*)
++ *:*:arm*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+- echo " AArch64 (aarch64)"
++ echo " ARM (arm)"
+ fi
+- CFG_HOST_ARCH=aarch64
++ CFG_HOST_ARCH=arm
+ ;;
+ Linux:*:sparc*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+--
+2.1.0
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch
new file mode 100644
index 0000000000..ba4c2a6b4f
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch
@@ -0,0 +1,491 @@
+From 294010b562c9846bb2bc4ee9c63ff78adc7c1f4f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Sat, 15 Mar 2014 15:40:49 -0300
+Subject: [PATCH] Add qatomic support for AArch64 (aka arm64).
+
+Patch by Mark Salter <msalter@redhat.com>
+licensed under BSD:
+
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#195>
+
+This patch is known to not be the most correct way
+to implement them, as it seems to be possible to do it in a faster way,
+but should work non the less until we can provide something better.
+
+Change-Id: Ib392b27dc54691fd4c2ea9896240ad71fb8128cc
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ src/corelib/arch/aarch64/arch.pri | 4 +
+ src/corelib/arch/aarch64/qatomic_aarch64.cpp | 70 ++++++
+ src/corelib/arch/arch.pri | 4 +-
+ src/corelib/arch/qatomic_aarch64.h | 335 +++++++++++++++++++++++++++
+ src/corelib/arch/qatomic_arch.h | 2 +
+ 5 files changed, 414 insertions(+), 1 deletion(-)
+ create mode 100644 src/corelib/arch/aarch64/arch.pri
+ create mode 100644 src/corelib/arch/aarch64/qatomic_aarch64.cpp
+ create mode 100644 src/corelib/arch/qatomic_aarch64.h
+
+diff --git a/src/corelib/arch/aarch64/arch.pri b/src/corelib/arch/aarch64/arch.pri
+new file mode 100644
+index 0000000..63523d9
+--- /dev/null
++++ b/src/corelib/arch/aarch64/arch.pri
+@@ -0,0 +1,4 @@
++#
++# AArch64 architecture
++#
++SOURCES += $$QT_ARCH_CPP/qatomic_aarch64.cpp
+diff --git a/src/corelib/arch/aarch64/qatomic_aarch64.cpp b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
+new file mode 100644
+index 0000000..fc851b9
+--- /dev/null
++++ b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
+@@ -0,0 +1,70 @@
++/****************************************************************************
++**
++** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the QtCore module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include <QtCore/qglobal.h>
++
++#include <unistd.h>
++#ifdef _POSIX_PRIORITY_SCHEDULING
++# include <sched.h>
++#endif
++#include <time.h>
++
++QT_BEGIN_NAMESPACE
++
++QT_USE_NAMESPACE
++
++Q_CORE_EXPORT void qt_atomic_yield(int *count)
++{
++#ifdef _POSIX_PRIORITY_SCHEDULING
++ if ((*count)++ < 50) {
++ sched_yield();
++ } else
++#endif
++ {
++ struct timespec tm;
++ tm.tv_sec = 0;
++ tm.tv_nsec = 2000001;
++ nanosleep(&tm, NULL);
++ *count = 0;
++ }
++}
++
++QT_END_NAMESPACE
+diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
+index cd23e5e..f50fca7 100644
+--- a/src/corelib/arch/arch.pri
++++ b/src/corelib/arch/arch.pri
+@@ -31,7 +31,9 @@ integrity:HEADERS += arch/qatomic_integrity.h
+ arch/qatomic_s390.h \
+ arch/qatomic_x86_64.h \
+ arch/qatomic_sh.h \
+- arch/qatomic_sh4a.h
++ arch/qatomic_sh4a.h \
++ arch/qatomic_aarch64.h \
++
+
+ QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
+ DEPENDPATH += $$QT_ARCH_CPP
+diff --git a/src/corelib/arch/qatomic_aarch64.h b/src/corelib/arch/qatomic_aarch64.h
+new file mode 100644
+index 0000000..de61ca8
+--- /dev/null
++++ b/src/corelib/arch/qatomic_aarch64.h
+@@ -0,0 +1,335 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the QtCore module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QATOMIC_AARCH64_H
++#define QATOMIC_AARCH64_H
++
++QT_BEGIN_HEADER
++
++QT_BEGIN_NAMESPACE
++
++#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isReferenceCountingNative()
++{ return true; }
++inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isTestAndSetNative()
++{ return true; }
++inline bool QBasicAtomicInt::isTestAndSetWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isFetchAndStoreNative()
++{ return true; }
++inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isFetchAndAddNative()
++{ return true; }
++inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
++{ return false; }
++
++#ifndef Q_DATA_MEMORY_BARRIER
++# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
++#endif
++#ifndef Q_COMPILER_MEMORY_BARRIER
++# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
++#endif
++
++inline bool QBasicAtomicInt::ref()
++{
++ int newValue;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
++ Q_COMPILER_MEMORY_BARRIER;
++
++ return newValue != 0;
++}
++
++inline bool QBasicAtomicInt::deref()
++{
++ int newValue;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
++ Q_COMPILER_MEMORY_BARRIER;
++
++ return newValue != 0;
++}
++
++inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
++{
++ bool val;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
++ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
++{
++ int val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
++{
++ int val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
++{
++ bool val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
++ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
++{
++ T *val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
++{
++ T *val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
++{
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return testAndSetRelaxed(expectedValue, newValue);
++}
++
++inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
++{
++ int returnValue = fetchAndStoreRelaxed(newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndStoreRelaxed(newValue);
++}
++
++inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ int returnValue = fetchAndStoreRelaxed(newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
++{
++ int returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndAddRelaxed(valueToAdd);
++}
++
++inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ int returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
++{
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return testAndSetRelaxed(expectedValue, newValue);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ bool returnValue = testAndSetAcquire(expectedValue, newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
++{
++ T *returnValue = fetchAndStoreRelaxed(newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndStoreRelaxed(newValue);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ T *returnValue = fetchAndStoreRelaxed(newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
++{
++ T *returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndAddRelaxed(valueToAdd);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ T *returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++#undef Q_DATA_MEMORY_BARRIER
++#undef Q_COMPILER_MEMORY_BARRIER
++
++QT_END_NAMESPACE
++
++QT_END_HEADER
++
++#endif // QATOMIC_AARCH64_H
+diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
+index 141726c..3e96926 100644
+--- a/src/corelib/arch/qatomic_arch.h
++++ b/src/corelib/arch/qatomic_arch.h
+@@ -94,6 +94,8 @@ QT_BEGIN_HEADER
+ # include "QtCore/qatomic_sh4a.h"
+ #elif defined(QT_ARCH_NACL)
+ # include "QtCore/qatomic_generic.h"
++#elif defined(QT_ARCH_AARCH64)
++# include "QtCore/qatomic_aarch64.h"
+ #else
+ # error "Qt has not been ported to this architecture"
+ #endif
+--
+2.1.0
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch
new file mode 100644
index 0000000000..a01e7ada93
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch
@@ -0,0 +1,124 @@
+From 7090fc80ff630712a90de92403190f647dd38a39 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Sat, 15 Mar 2014 15:35:00 -0300
+Subject: [PATCH] mkspecs for AArch64 (aka arm64).
+
+Patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
+licensed under either Public Domain or BSD:
+
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#179>
+
+Change-Id: I21f17953234cfb176bac023e52ecdc927fc5c1a9
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ configure | 3 +++
+ mkspecs/linux-g++-aarch64/qmake.conf | 27 ++++++++++++++++++++
+ mkspecs/linux-g++-aarch64/qplatformdefs.h | 42 +++++++++++++++++++++++++++++++
+ 3 files changed, 72 insertions(+)
+ create mode 100644 mkspecs/linux-g++-aarch64/qmake.conf
+ create mode 100644 mkspecs/linux-g++-aarch64/qplatformdefs.h
+
+diff --git a/configure b/configure
+index a9ba7c8..e57d053 100755
+--- a/configure
++++ b/configure
+@@ -2808,6 +2808,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
+ *86_64)
+ PLATFORM=qws/linux-x86_64-g++
+ ;;
++ aarch64)
++ PLATFORM=linux-aarch64-g++
++ ;;
+ *)
+ PLATFORM=qws/linux-generic-g++
+ ;;
+diff --git a/mkspecs/linux-g++-aarch64/qmake.conf b/mkspecs/linux-g++-aarch64/qmake.conf
+new file mode 100644
+index 0000000..ebc0a92
+--- /dev/null
++++ b/mkspecs/linux-g++-aarch64/qmake.conf
+@@ -0,0 +1,27 @@
++#
++# qmake configuration for linux-g++
++#
++# Written for GNU/Linux platforms that have both lib and lib64 directories,
++# like the AMD Opteron.
++#
++
++MAKEFILE_GENERATOR = UNIX
++TARGET_PLATFORM = unix
++TEMPLATE = app
++CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
++QT += core gui
++QMAKE_INCREMENTAL_STYLE = sublib
++
++QMAKE_CFLAGS =
++QMAKE_LFLAGS =
++
++QMAKE_CFLAGS_RELEASE += -O2
++
++include(../common/linux.conf)
++include(../common/gcc-base-unix.conf)
++include(../common/g++-unix.conf)
++
++QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
++QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
++
++load(qt_config)
+diff --git a/mkspecs/linux-g++-aarch64/qplatformdefs.h b/mkspecs/linux-g++-aarch64/qplatformdefs.h
+new file mode 100644
+index 0000000..562128b
+--- /dev/null
++++ b/mkspecs/linux-g++-aarch64/qplatformdefs.h
+@@ -0,0 +1,42 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the qmake spec of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "../linux-g++/qplatformdefs.h"
+--
+2.1.0
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch
new file mode 100644
index 0000000000..7132224ecc
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch
@@ -0,0 +1,18 @@
+Add missing header for aarch64. And install ../corelib/arch/qatomic_aarch64.h.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff -Nru qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h
+--- qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h 1970-01-01 08:30:00.000000000 +0830
++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h 2014-09-09 17:18:03.768352551 +0800
+@@ -0,0 +1 @@
++#include "../../src/corelib/arch/qatomic_aarch64.h"
+--- qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri.orig 2014-09-09 18:05:37.100430311 +0800
++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri 2014-09-09 18:05:59.112430911 +0800
+@@ -1,3 +1,3 @@
+-SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore
++SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_aarch64.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore
+ SYNCQT.HEADER_CLASSES = ../../include/QtCore/QAbstractState ../../include/QtCore/QAbstractTransition ../../include/QtCore/QEventTransition ../../include/QtCore/QFinalState ../../include/QtCore/QHistoryState ../../include/QtCore/QSignalTransition ../../include/QtCore/QState ../../include/QtCore/QStateMachine ../../include/QtCore/QAtomicInt ../../include/QtCore/QAtomicPointer ../../include/QtCore/QBasicAtomicInt ../../include/QtCore/QBasicAtomicPointer ../../include/QtCore/QMutex ../../include/QtCore/QMutexLocker ../../include/QtCore/QMutexData ../../include/QtCore/QReadWriteLock ../../include/QtCore/QReadLocker ../../include/QtCore/QWriteLocker ../../include/QtCore/QSemaphore ../../include/QtCore/QThread ../../include/QtCore/QThreadStorageData ../../include/QtCore/QThreadStorage ../../include/QtCore/QWaitCondition ../../include/QtCore/QXmlStreamStringRef ../../include/QtCore/QXmlStreamAttribute ../../include/QtCore/QXmlStreamAttributes ../../include/QtCore/QXmlStreamNamespaceDeclaration ../../include/QtCore/QXmlStreamNamespaceDeclarations ../../include/QtCore/QXmlStreamNotationDeclaration ../../include/QtCore/QXmlStreamNotationDeclarations ../../include/QtCore/QXmlStreamEntityDeclaration ../../include/QtCore/QXmlStreamEntityDeclarations ../../include/QtCore/QXmlStreamEntityResolver ../../include/QtCore/QXmlStreamReader ../../include/QtCore/QXmlStreamWriter ../../include/QtCore/QFuture ../../include/QtCore/QFutureIterator ../../include/QtCore/QMutableFutureIterator ../../include/QtCore/QFutureInterfaceBase ../../include/QtCore/QFutureInterface ../../include/QtCore/QFutureSynchronizer ../../include/QtCore/QFutureWatcherBase ../../include/QtCore/QFutureWatcher ../../include/QtCore/QRunnable ../../include/QtCore/QtConcurrentFilter ../../include/QtCore/QtConcurrentMap ../../include/QtCore/QtConcurrentRun ../../include/QtCore/QThreadPool ../../include/QtCore/QAbstractEventDispatcher ../../include/QtCore/QModelIndex ../../include/QtCore/QPersistentModelIndex ../../include/QtCore/QModelIndexList ../../include/QtCore/QAbstractItemModel ../../include/QtCore/QAbstractTableModel ../../include/QtCore/QAbstractListModel ../../include/QtCore/QBasicTimer ../../include/QtCore/QCoreApplication ../../include/QtCore/QtCleanUpFunction ../../include/QtCore/QEvent ../../include/QtCore/QTimerEvent ../../include/QtCore/QChildEvent ../../include/QtCore/QCustomEvent ../../include/QtCore/QDynamicPropertyChangeEvent ../../include/QtCore/QEventLoop ../../include/QtCore/QMetaMethod ../../include/QtCore/QMetaEnum ../../include/QtCore/QMetaProperty ../../include/QtCore/QMetaClassInfo ../../include/QtCore/QMetaType ../../include/QtCore/QMetaTypeId ../../include/QtCore/QMetaTypeId2 ../../include/QtCore/QMimeData ../../include/QtCore/QObjectList ../../include/QtCore/QObjectData ../../include/QtCore/QObject ../../include/QtCore/QObjectUserData ../../include/QtCore/QObjectCleanupHandler ../../include/QtCore/QGenericArgument ../../include/QtCore/QGenericReturnArgument ../../include/QtCore/QArgument ../../include/QtCore/QReturnArgument ../../include/QtCore/QMetaObject ../../include/QtCore/QMetaObjectAccessor ../../include/QtCore/QMetaObjectExtraData ../../include/QtCore/QPointer ../../include/QtCore/QSharedMemory ../../include/QtCore/QSignalMapper ../../include/QtCore/QSocketNotifier ../../include/QtCore/QSystemSemaphore ../../include/QtCore/QTimer ../../include/QtCore/QTranslator ../../include/QtCore/QVariant ../../include/QtCore/QVariantList ../../include/QtCore/QVariantMap ../../include/QtCore/QVariantHash ../../include/QtCore/QVariantComparisonHelper ../../include/QtCore/QFactoryInterface ../../include/QtCore/QLibrary ../../include/QtCore/QtPlugin ../../include/QtCore/QtPluginInstanceFunction ../../include/QtCore/QPluginLoader ../../include/QtCore/QUuid ../../include/QtCore/QtEndian ../../include/QtCore/QtGlobal ../../include/QtCore/QIntegerForSize ../../include/QtCore/QNoImplicitBoolCast ../../include/QtCore/Q_INT8 ../../include/QtCore/Q_UINT8 ../../include/QtCore/Q_INT16 ../../include/QtCore/Q_UINT16 ../../include/QtCore/Q_INT32 ../../include/QtCore/Q_UINT32 ../../include/QtCore/Q_INT64 ../../include/QtCore/Q_UINT64 ../../include/QtCore/Q_LLONG ../../include/QtCore/Q_ULLONG ../../include/QtCore/Q_LONG ../../include/QtCore/Q_ULONG ../../include/QtCore/QSysInfo ../../include/QtCore/QtMsgHandler ../../include/QtCore/QGlobalStatic ../../include/QtCore/QGlobalStaticDeleter ../../include/QtCore/QBool ../../include/QtCore/QTypeInfo ../../include/QtCore/QFlag ../../include/QtCore/QIncompatibleFlag ../../include/QtCore/QFlags ../../include/QtCore/QForeachContainer ../../include/QtCore/QForeachContainerBase ../../include/QtCore/QLibraryInfo ../../include/QtCore/Qt ../../include/QtCore/QInternal ../../include/QtCore/QCOORD ../../include/QtCore/QtConfig ../../include/QtCore/QTextCodec ../../include/QtCore/QTextEncoder ../../include/QtCore/QTextDecoder ../../include/QtCore/QTextCodecFactoryInterface ../../include/QtCore/QTextCodecPlugin ../../include/QtCore/QAbstractFileEngine ../../include/QtCore/QAbstractFileEngineHandler ../../include/QtCore/QAbstractFileEngineIterator ../../include/QtCore/QBuffer ../../include/QtCore/QDataStream ../../include/QtCore/QtDebug ../../include/QtCore/QDebug ../../include/QtCore/QNoDebug ../../include/QtCore/QDir ../../include/QtCore/QDirIterator ../../include/QtCore/QFile ../../include/QtCore/QFileInfo ../../include/QtCore/QFileInfoList ../../include/QtCore/QFileInfoListIterator ../../include/QtCore/QFileSystemWatcher ../../include/QtCore/QFSFileEngine ../../include/QtCore/QIODevice ../../include/QtCore/Q_PID ../../include/QtCore/QProcessEnvironment ../../include/QtCore/QProcess ../../include/QtCore/QResource ../../include/QtCore/QSettings ../../include/QtCore/QTemporaryFile ../../include/QtCore/QTextStream ../../include/QtCore/QTextStreamFunction ../../include/QtCore/QTextStreamManipulator ../../include/QtCore/QTS ../../include/QtCore/QTextIStream ../../include/QtCore/QTextOStream ../../include/QtCore/QUrl ../../include/QtCore/QAbstractAnimation ../../include/QtCore/QAnimationDriver ../../include/QtCore/QAnimationGroup ../../include/QtCore/QParallelAnimationGroup ../../include/QtCore/QPauseAnimation ../../include/QtCore/QPropertyAnimation ../../include/QtCore/QSequentialAnimationGroup ../../include/QtCore/QVariantAnimation ../../include/QtCore/QtAlgorithms ../../include/QtCore/QBitArray ../../include/QtCore/QBitRef ../../include/QtCore/QByteArray ../../include/QtCore/QByteRef ../../include/QtCore/QByteArrayMatcher ../../include/QtCore/QCache ../../include/QtCore/QLatin1Char ../../include/QtCore/QChar ../../include/QtCore/QtContainerFwd ../../include/QtCore/QContiguousCacheData ../../include/QtCore/QContiguousCacheTypedData ../../include/QtCore/QContiguousCache ../../include/QtCore/QCryptographicHash ../../include/QtCore/QDate ../../include/QtCore/QTime ../../include/QtCore/QDateTime ../../include/QtCore/QEasingCurve ../../include/QtCore/QElapsedTimer ../../include/QtCore/QHashData ../../include/QtCore/QHashDummyValue ../../include/QtCore/QHashDummyNode ../../include/QtCore/QHashNode ../../include/QtCore/QHash ../../include/QtCore/QMultiHash ../../include/QtCore/QHashIterator ../../include/QtCore/QMutableHashIterator ../../include/QtCore/QLine ../../include/QtCore/QLineF ../../include/QtCore/QLinkedListData ../../include/QtCore/QLinkedListNode ../../include/QtCore/QLinkedList ../../include/QtCore/QLinkedListIterator ../../include/QtCore/QMutableLinkedListIterator ../../include/QtCore/QListData ../../include/QtCore/QList ../../include/QtCore/QListIterator ../../include/QtCore/QMutableListIterator ../../include/QtCore/QSystemLocale ../../include/QtCore/QLocale ../../include/QtCore/QBBSystemLocaleData ../../include/QtCore/QMapData ../../include/QtCore/QMapNode ../../include/QtCore/QMapPayloadNode ../../include/QtCore/QMap ../../include/QtCore/QMultiMap ../../include/QtCore/QMapIterator ../../include/QtCore/QMutableMapIterator ../../include/QtCore/QMargins ../../include/QtCore/QPair ../../include/QtCore/QPoint ../../include/QtCore/QPointF ../../include/QtCore/QQueue ../../include/QtCore/QRect ../../include/QtCore/QRectF ../../include/QtCore/QRegExp ../../include/QtCore/QScopedPointerDeleter ../../include/QtCore/QScopedPointerArrayDeleter ../../include/QtCore/QScopedPointerPodDeleter ../../include/QtCore/QScopedPointer ../../include/QtCore/QScopedArrayPointer ../../include/QtCore/QScopedValueRollback ../../include/QtCore/QSet ../../include/QtCore/QSetIterator ../../include/QtCore/QMutableSetIterator ../../include/QtCore/QSharedData ../../include/QtCore/QSharedDataPointer ../../include/QtCore/QExplicitlySharedDataPointer ../../include/QtCore/QSharedPointer ../../include/QtCore/QWeakPointer ../../include/QtCore/QSize ../../include/QtCore/QSizeF ../../include/QtCore/QStack ../../include/QtCore/QStdWString ../../include/QtCore/QString ../../include/QtCore/QLatin1String ../../include/QtCore/QCharRef ../../include/QtCore/QConstString ../../include/QtCore/QStringRef ../../include/QtCore/QLatin1Literal ../../include/QtCore/QAbstractConcatenable ../../include/QtCore/QConcatenable ../../include/QtCore/QStringBuilder ../../include/QtCore/QStringListIterator ../../include/QtCore/QMutableStringListIterator ../../include/QtCore/QStringList ../../include/QtCore/QStringMatcher ../../include/QtCore/QTextBoundaryFinder ../../include/QtCore/QTimeLine ../../include/QtCore/QVarLengthArray ../../include/QtCore/QVectorData ../../include/QtCore/QVectorTypedData ../../include/QtCore/QVector ../../include/QtCore/QVectorIterator ../../include/QtCore/QMutableVectorIterator
+ SYNCQT.PRIVATE_HEADER_FILES = ../corelib/statemachine/qabstractstate_p.h ../corelib/statemachine/qabstracttransition_p.h ../corelib/statemachine/qeventtransition_p.h ../corelib/statemachine/qhistorystate_p.h ../corelib/statemachine/qsignaleventgenerator_p.h ../corelib/statemachine/qsignaltransition_p.h ../corelib/statemachine/qstate_p.h ../corelib/statemachine/qstatemachine_p.h ../corelib/thread/qmutex_p.h ../corelib/thread/qmutexpool_p.h ../corelib/thread/qorderedmutexlocker_p.h ../corelib/thread/qreadwritelock_p.h ../corelib/thread/qthread_p.h ../corelib/xml/qxmlstream_p.h ../corelib/xml/qxmlutils_p.h ../corelib/concurrent/qfutureinterface_p.h ../corelib/concurrent/qfuturewatcher_p.h ../corelib/concurrent/qthreadpool_p.h ../corelib/kernel/qabstracteventdispatcher_p.h ../corelib/kernel/qabstractitemmodel_p.h ../corelib/kernel/qcore_mac_p.h ../corelib/kernel/qcore_symbian_p.h ../corelib/kernel/qcore_unix_p.h ../corelib/kernel/qcoreapplication_p.h ../corelib/kernel/qcorecmdlineargs_p.h ../corelib/kernel/qcoreglobaldata_p.h ../corelib/kernel/qcrashhandler_p.h ../corelib/kernel/qeventdispatcher_blackberry_p.h ../corelib/kernel/qeventdispatcher_glib_p.h ../corelib/kernel/qeventdispatcher_symbian_p.h ../corelib/kernel/qeventdispatcher_unix_p.h ../corelib/kernel/qeventdispatcher_win_p.h ../corelib/kernel/qfunctions_p.h ../corelib/kernel/qmetaobject_p.h ../corelib/kernel/qobject_p.h ../corelib/kernel/qsharedmemory_p.h ../corelib/kernel/qsystemerror_p.h ../corelib/kernel/qsystemsemaphore_p.h ../corelib/kernel/qtranslator_p.h ../corelib/kernel/qvariant_p.h ../corelib/kernel/qwineventnotifier_p.h ../corelib/plugin/qelfparser_p.h ../corelib/plugin/qfactoryloader_p.h ../corelib/plugin/qlibrary_p.h ../corelib/plugin/qsystemlibrary_p.h ../corelib/global/qnumeric_p.h ../corelib/global/qt_pch.h ../corelib/codecs/qfontlaocodec_p.h ../corelib/codecs/qiconvcodec_p.h ../corelib/codecs/qisciicodec_p.h ../corelib/codecs/qlatincodec_p.h ../corelib/codecs/qsimplecodec_p.h ../corelib/codecs/qtextcodec_p.h ../corelib/codecs/qtsciicodec_p.h ../corelib/codecs/qutfcodec_p.h ../corelib/io/qabstractfileengine_p.h ../corelib/io/qdatastream_p.h ../corelib/io/qdataurl_p.h ../corelib/io/qdir_p.h ../corelib/io/qfile_p.h ../corelib/io/qfileinfo_p.h ../corelib/io/qfilesystemengine_p.h ../corelib/io/qfilesystementry_p.h ../corelib/io/qfilesystemiterator_p.h ../corelib/io/qfilesystemmetadata_p.h ../corelib/io/qfilesystemwatcher_dnotify_p.h ../corelib/io/qfilesystemwatcher_fsevents_p.h ../corelib/io/qfilesystemwatcher_inotify_p.h ../corelib/io/qfilesystemwatcher_kqueue_p.h ../corelib/io/qfilesystemwatcher_p.h ../corelib/io/qfilesystemwatcher_symbian_p.h ../corelib/io/qfilesystemwatcher_win_p.h ../corelib/io/qfsfileengine_iterator_p.h ../corelib/io/qfsfileengine_p.h ../corelib/io/qiodevice_p.h ../corelib/io/qnoncontiguousbytedevice_p.h ../corelib/io/qprocess_p.h ../corelib/io/qresource_iterator_p.h ../corelib/io/qresource_p.h ../corelib/io/qsettings_p.h ../corelib/io/qtldurl_p.h ../corelib/io/qurltlds_p.h ../corelib/io/qwindowspipewriter_p.h ../corelib/animation/qabstractanimation_p.h ../corelib/animation/qanimationgroup_p.h ../corelib/animation/qparallelanimationgroup_p.h ../corelib/animation/qpropertyanimation_p.h ../corelib/animation/qsequentialanimationgroup_p.h ../corelib/animation/qvariantanimation_p.h ../corelib/tools/qbytedata_p.h ../corelib/tools/qdatetime_p.h ../corelib/tools/qharfbuzz_p.h ../corelib/tools/qlocale_data_p.h ../corelib/tools/qlocale_p.h ../corelib/tools/qlocale_tools_p.h ../corelib/tools/qpodlist_p.h ../corelib/tools/qringbuffer_p.h ../corelib/tools/qscopedpointer_p.h ../corelib/tools/qsimd_p.h ../corelib/tools/qtools_p.h ../corelib/tools/qunicodetables_p.h
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch
new file mode 100644
index 0000000000..f3face5755
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch
@@ -0,0 +1,40 @@
+configure: support c++0x standard for directfd
+
+While directfd upgrade to 1.7.6, it always includes directfb++ utils
+when C++ is used and set c++0x as c++ standard.
+(In git://git.directfb.org/git/directfb/core/DirectFB.git
+commit b444bcae3197be9faf883460dcc239ef757d5922, and commit
+522beeb76f2a8d2dee30d928d2a5955bd06cf25c)
+
+The directfd in qt4 is c++, and there was a build failure:
+...
+| qdirectfbwindowsurface.cpp:336:69: error: in C++98 'rect' must be
+initialized by constructor, not by '{...}'
+| const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
+...
+
+The g++ used c++98 as default c++ standard, we should
+explicitly set c++0x for directfd in qt4.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index 5724bd6..ecc2f8b 100755
+--- a/configure
++++ b/configure
+@@ -6656,6 +6656,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
+ if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
+ QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
++ QT_CFLAGS_DIRECTFB="$QT_CFLAGS_DIRECTFB -std=c++0x"
+ QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
+ elif directfb-config --version >/dev/null 2>&1; then
+ QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
+--
+1.9.1
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch b/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch
new file mode 100644
index 0000000000..1f5f00f716
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch
@@ -0,0 +1,98 @@
+From 52c34001bad85c3032618070b1d6b2a3c6880715 Mon Sep 17 00:00:00 2001
+From: Neil Jerram <n...@ossau.homelinux.net>
+Date: Thu, 8 Nov 2012 08:18:32 +0000
+Subject: [PATCH] Fix QWSLock "invalid argument" logs
+
+There was no known actual problem associated with these logs, but they
+were spamming the log, so I thought it worth trying to understand and
+fix them.
+
+The confusion is that there are two different ways of creating QWSLock
+objects. "QWSLock()" creates an object that creates a new set of
+semaphores, whereas "QWSLock(id)" creates an object that aliases the
+existing set of semaphores with ID id. What seems to happen is that
+each application creates a semaphore set scoped to that
+application (QWSDisplay::Data::clientLock in qapplication_qws.cpp),
+then this semaphore set is passed by complex means to
+places (QWSClientPrivate and QWSMemorySurface) that use the semaphores
+for a short period and then delete their QWSLock objects.
+
+The problem was that the QWSLock destructor always destroyed the
+semaphore set, even when that QWSLock hadn't create the semaphores
+itself, hence making the semaphores invalid for other QWSLock objects
+still referencing the same set.
+
+Clearly a QWSLock object shouldn't destroy the semaphore set if it
+didn't create it itself, and that is confirmed by the fact that one of
+the implementations inside QWSLock already implements this logic, with
+the 'owned' flag. The fix is to implement this for the #ifndef
+QT_POSIX_IPC case - which is what is used in QtMoko - just as is
+already implemented for the #ifdef QT_POSIX_IPC case.
+
+Original patch can be found here:
+ http://www.mail-archive.com/community@lists.openmoko.org/msg65512.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
+ (Removed the commented-out debug statements from the original patch.)
+
+---
+
+diff --git a/src/gui/embedded/qwslock.cpp b/src/gui/embedded/qwslock.cpp
+index 9914a24..1055785 100644
+--- a/src/gui/embedded/qwslock.cpp
++++ b/src/gui/embedded/qwslock.cpp
+@@ -83,9 +83,12 @@ QWSLock::QWSLock(int id) : semId(id)
+ QWSSignalHandler::instance()->addWSLock(this);
+ #endif
+
++ owned = false;
++
+ #ifndef QT_POSIX_IPC
+ if (semId == -1) {
+ semId = semget(IPC_PRIVATE, 3, IPC_CREAT | 0666);
++ owned = true;
+ if (semId == -1) {
+ perror("QWSLock::QWSLock");
+ qFatal("Unable to create semaphore");
+@@ -100,7 +104,6 @@ QWSLock::QWSLock(int id) : semId(id)
+ }
+ #else
+ sems[0] = sems[1] = sems[2] = SEM_FAILED;
+- owned = false;
+
+ if (semId == -1) {
+ // ### generate really unique IDs
+@@ -134,9 +137,11 @@ QWSLock::~QWSLock()
+
+ if (semId != -1) {
+ #ifndef QT_POSIX_IPC
+- qt_semun semval;
+- semval.val = 0;
+- semctl(semId, 0, IPC_RMID, semval);
++ if (owned) {
++ qt_semun semval;
++ semval.val = 0;
++ semctl(semId, 0, IPC_RMID, semval);
++ }
+ semId = -1;
+ #else
+ // emulate the SEM_UNDO behavior for the BackingStore lock
+diff --git a/src/gui/embedded/qwslock_p.h b/src/gui/embedded/qwslock_p.h
+index d324e4f..d867d20 100644
+--- a/src/gui/embedded/qwslock_p.h
++++ b/src/gui/embedded/qwslock_p.h
+@@ -86,8 +86,8 @@ private:
+ int lockCount[2];
+ #ifdef QT_POSIX_IPC
+ sem_t *sems[3];
+- bool owned;
+ #endif
++ bool owned;
+ };
+
+ QT_END_NAMESPACE
+
+--
+1.7.10.4
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf b/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
index 8755031017..be78c249e9 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
@@ -5,32 +5,14 @@
QMAKE_COMPILER = gcc
QMAKE_CC = $(OE_QMAKE_CC)
-QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS)
+QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE +=
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXX = $(OE_QMAKE_CXX)
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS)
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
@@ -39,9 +21,6 @@ QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
QMAKE_LINK_C = $(OE_QMAKE_LINK)
QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
-QMAKE_LFLAGS_RELEASE +=
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath-link,
diff --git a/meta/recipes-qt/qt4/qt4-embedded.inc b/meta/recipes-qt/qt4/qt4-embedded.inc
index e87de4b379..ef5cf2cf24 100644
--- a/meta/recipes-qt/qt4/qt4-embedded.inc
+++ b/meta/recipes-qt/qt4/qt4-embedded.inc
@@ -9,7 +9,9 @@ QT4EDEPENDS = ""
QT_BASE_LIB ?= "libqt-embedded"
# Set necessary variables in the profile
-SRC_URI += "file://qte.sh"
+SRC_URI += "file://qte.sh \
+ file://0033-configure-support-c-0x-standard-for-directfd.patch \
+"
QT_EMBEDDED_FLAGS ?= " \
-embedded $QT_ARCH \
diff --git a/meta/recipes-qt/qt4/qt4-native.inc b/meta/recipes-qt/qt4/qt4-native.inc
index bb16da666a..70bda7358f 100644
--- a/meta/recipes-qt/qt4/qt4-native.inc
+++ b/meta/recipes-qt/qt4/qt4-native.inc
@@ -18,6 +18,10 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
file://0021-configure-make-qt4-native-work-with-long-building-pa.patch \
+ file://0029-aarch64_arm64_fix_arch_detection.patch \
+ file://0030-aarch64_arm64_qatomic_support.patch \
+ file://0031-aarch64_arm64_mkspecs.patch \
+ file://0032-aarch64_add_header.patch \
file://g++.conf \
file://linux.conf \
"
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index 75a580c25f..09f6d93757 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -134,7 +134,7 @@ FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}"
RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}"
RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}"
-RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " eglibc-gconv-utf-16"
+RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " glibc-gconv-utf-16"
RRECOMMENDS_${QT_BASE_NAME}-demos += " \
${QT_BASE_NAME}-examples \
${QT_BASE_NAME}-plugin-sqldriver-sqlite \
diff --git a/meta/recipes-qt/qt4/qt4_arch.inc b/meta/recipes-qt/qt4/qt4_arch.inc
index c1d35ab726..07512db713 100644
--- a/meta/recipes-qt/qt4/qt4_arch.inc
+++ b/meta/recipes-qt/qt4/qt4_arch.inc
@@ -4,6 +4,7 @@ ARM_INSTRUCTION_SET = "arm"
set_arch() {
case ${TARGET_ARCH} in
+ aarch64) QT_ARCH=aarch64 ;;
arm*) QT_ARCH=arm ;;
i*86*) QT_ARCH=i386 ;;
mips*) QT_ARCH=mips ;;
diff --git a/meta/recipes-sato/images/core-image-sato-sdk.bb b/meta/recipes-sato/images/core-image-sato-sdk.bb
index 6d4b96a1f9..62836f94d3 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk.bb
@@ -6,9 +6,10 @@ form a standalone SDK."
QT4PKG = "qt4-pkgs"
QT4PKG_mips64 = ""
+QT4PKG_mips64n32 = ""
IMAGE_FEATURES += "dev-pkgs tools-sdk ${QT4PKG} \
tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks ssh-server-openssh"
-IMAGE_INSTALL += "kernel-dev"
+IMAGE_INSTALL += "kernel-devsrc"
diff --git a/meta/recipes-sato/midori/midori_0.5.5.bb b/meta/recipes-sato/midori/midori_0.5.5.bb
deleted file mode 100644
index b359037e22..0000000000
--- a/meta/recipes-sato/midori/midori_0.5.5.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "A lightweight web browser"
-HOMEPAGE = "http://www.twotoasts.de/index.php?/pages/midori_summary.html"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-DEPENDS = "webkit-gtk libsoup-2.4 openssl python-native python-docutils-native librsvg-native libnotify libunique"
-
-SRC_URI = "http://www.midori-browser.org/downloads/${BPN}_${PV}_all_.tar.bz2 \
-"
-
-SRC_URI[md5sum] = "b99e87d4b73a4732ed1c1e591f0242ac"
-SRC_URI[sha256sum] = "ca69382a285222a86028abebd73fed1976735883027ff0adc094b627789bbd62"
-
-# midori depends on webkit-gtk, and webkit-gtk can NOT be built on
-# MIPS64 with n32 ABI. So remove it from mips64 n32 temporarily.
-COMPATIBLE_HOST_mips64 = "mips64.*-linux$"
-
-inherit gtk-icon-cache pkgconfig vala pythonnative
-
-do_configure() {
- sed -i -e 's:, shell=False::g' -e s:/usr/X11R6/include::g -e s:/usr/X11R6/lib::g wscript
- ./configure \
- --prefix=${prefix} \
- --bindir=${bindir} \
- --sbindir=${sbindir} \
- --libexecdir=${libexecdir} \
- --datadir=${datadir} \
- --sysconfdir=${sysconfdir} \
- --sharedstatedir=${sharedstatedir} \
- --localstatedir=${localstatedir} \
- --libdir=${libdir} \
- --includedir=${includedir} \
- --infodir=${infodir} \
- --mandir=${mandir} \
- --disable-gtk3 \
- --disable-zeitgeist \
-}
-
-PARALLEL_MAKE = ""
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_install() {
- oe_runmake DESTDIR=${D} install
-}
-
-RRECOMMENDS_${PN} += "glib-networking ca-certificates gnome-icon-theme"
-
-FILES_${PN}-dev += "${datadir}/vala/vapi"
diff --git a/meta/recipes-sato/midori/midori_0.5.8.bb b/meta/recipes-sato/midori/midori_0.5.8.bb
new file mode 100644
index 0000000000..3aabdd4385
--- /dev/null
+++ b/meta/recipes-sato/midori/midori_0.5.8.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A lightweight web browser"
+HOMEPAGE = "http://midori-browser.org/"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+DEPENDS = "webkit-gtk libsoup-2.4 openssl python-native python-docutils-native librsvg-native libnotify libxscrnsaver"
+
+SRC_URI = "https://launchpad.net/midori/trunk/0.5.8/+download/${BPN}-${PV}.tar.bz2;subdir=${BPN}-${PV}"
+SRC_URI[md5sum] = "b89e25e74199d705e74767499a415976"
+SRC_URI[sha256sum] = "af19135fd4c4b04345df4d3592e7939c20f9b40eaca24550e6cb619751aa9381"
+
+# midori depends on webkit-gtk, and webkit-gtk can NOT be built on
+# MIPS64 with n32 ABI. So remove it from mips64 n32 temporarily.
+COMPATIBLE_HOST_mips64n32 = "null"
+
+inherit gtk-icon-cache pkgconfig vala pythonnative cmake
+
+EXTRA_OECMAKE = " \
+ -DCMAKE_INSTALL_PREFIX=${prefix} \
+ -DUSE_ZEITGEIST=0 \
+"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+RRECOMMENDS_${PN} += "glib-networking ca-certificates gnome-icon-theme"
+
+FILES_${PN} += "${datadir}/appdata"
diff --git a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 4ec5e8961c..bc3e0fd260 100644
--- a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -6,16 +6,11 @@ SUMMARY = "Sato desktop"
LICENSE = "MIT"
PR = "r33"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
+inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-x11-sato"
-RREPLACES_${PN} = "task-core-x11-sato"
-RCONFLICTS_${PN} = "task-core-x11-sato"
+PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
RDEPENDS_${PN} = "\
${PN}-base \
diff --git a/meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb b/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
index 14c5cd5d63..14f58ae68f 100644
--- a/meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb
+++ b/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
@@ -13,15 +13,15 @@ DEPENDS_append_poky = " libowl"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
file://gnome-fs-directory.png \
file://gnome-fs-regular.png \
file://gnome-mime-text-plain.png \
file://emblem-symbolic-link.png \
file://no-desktop.patch"
-SRC_URI[md5sum] = "41104699e653ff2b0a9a9e80a257d6a2"
-SRC_URI[sha256sum] = "23ee33b34066ac83ce9a98bc9930049e69839438fb60489bd453bec8c2068950"
+SRC_URI[md5sum] = "c993402d407b0a3fc076f842ac1bc5c9"
+SRC_URI[sha256sum] = "cfa8d82fc63be147045174bef074807e1e32ce8c6bf4dbd8fad49e260bcf6380"
inherit autotools pkgconfig
@@ -31,3 +31,5 @@ do_install_append () {
install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
}
+
+FILES_${PN} += "${libdir}/pcmanfm"
diff --git a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
new file mode 100644
index 0000000000..d246feeb09
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -0,0 +1,52 @@
+gtk.c: fix compiling failure with option -g -O
+
+There were compiling failure with option -g -O
+...
+././gtk.c: In function 'configure_area':
+././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ cairo_set_source_rgb(cr,
+ ^
+././gtk.c:384:14: note: 'cr' was declared here
+ cairo_t *cr;
+ ^
+././gtk.c: In function 'main':
+././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ fprintf(stderr, "%s: %s\n", pname, error);
+ ^
+cc1: all warnings being treated as errors
+...
+
+Initialized pointer 'cr' and 'error' with NULL
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gtk.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gtk.c b/gtk.c
+index a2eba2c..c54bf63 100644
+--- a/gtk.c
++++ b/gtk.c
+@@ -381,7 +381,7 @@ static void clear_backing_store(frontend *fe)
+
+ static void setup_backing_store(frontend *fe)
+ {
+- cairo_t *cr;
++ cairo_t *cr = NULL;
+ int i;
+
+ fe->pixmap = gdk_pixmap_new(fe->area->window, fe->pw, fe->ph, -1);
+@@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
+ int main(int argc, char **argv)
+ {
+ char *pname = argv[0];
+- char *error;
++ char *error = NULL;
+ int ngenerate = 0, print = FALSE, px = 1, py = 1;
+ int time_generation = FALSE, test_solve = FALSE, list_presets = FALSE;
+ int soln = FALSE, colour = FALSE;
+--
+1.9.1
+
diff --git a/meta/recipes-sato/puzzles/puzzles_r10116.bb b/meta/recipes-sato/puzzles/puzzles_r10116.bb
index ef5392b68f..6ee4d962b2 100644
--- a/meta/recipes-sato/puzzles/puzzles_r10116.bb
+++ b/meta/recipes-sato/puzzles/puzzles_r10116.bb
@@ -7,7 +7,9 @@ MOD_PV = "${@d.getVar('PV',1)[1:]}"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
-SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV}"
+SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
+ file://fix-compiling-failure-with-option-g-O.patch \
+"
S = "${WORKDIR}/${BPN}"
diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb b/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
new file mode 100644
index 0000000000..239fbeda4d
--- /dev/null
+++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
@@ -0,0 +1,65 @@
+SECTION = "x11/utils"
+SUMMARY = "rxvt terminal clone supporting unicode"
+DESCRIPTION = "rxvt-unicode is a clone of the well known \
+terminal emulator rxvt, modified to store text in Unicode \
+(either UCS-2 or UCS-4) and to use locale-correct input and \
+output. It also supports mixing multiple fonts at the \
+same time, including Xft fonts."
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/main.C;beginline=1;endline=31;md5=7dac0395806570856e037f98aba8513b"
+
+DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf"
+
+SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
+ file://xwc.patch \
+ file://rxvt.desktop \
+ file://rxvt.png"
+
+SRC_URI[md5sum] = "a9a06c608258c5fd247c3725d8f44582"
+SRC_URI[sha256sum] = "75270ed72bc5895a64a1d7392bf45a622204192371c3965bd3dd978dc088956b"
+
+inherit autotools update-alternatives
+
+PROVIDES = "virtual/x-terminal-emulator"
+ALTERNATIVE_${PN} = "x-terminal-emulator"
+ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/rxvt"
+
+CFLAGS_append = " -fpermissive"
+
+EXTRA_OECONF = "--enable-menubar --enable-xim \
+ --enable-utmp --enable-wtmp --enable-lastlog \
+ --disable-strings --with-term=rxvt --enable-keepscrolling \
+ --enable-xft --with-name=rxvt --enable-frills \
+ --enable-swapscreen --enable-transparency \
+ --with-codesets=eu \
+ --enable-cursor-blink --enable-pointer-blank \
+ --enable-text-blink --enable-rxvt-scroll \
+ --enable-combining --enable-shared \
+ --enable-xgetdefault \
+ --disable-perl \
+ --with-x=${STAGING_DIR_HOST}${prefix}"
+
+do_configure_prepend () {
+ if [ ! -e ${S}/acinclude.m4 ]; then
+ cp ${S}/aclocal.m4 ${S}/acinclude.m4
+ fi
+}
+
+do_compile_prepend () {
+ echo '#define UTMP_FILE "${localstatedir}/run/utmp"' >> config.h
+ echo '#define WTMP_FILE "${localstatedir}/log/wtmp"' >> config.h
+ echo '#define LASTLOG_FILE "${localstatedir}/log/lastlog"' >> config.h
+ echo '#define HAVE_XLOCALE 1' >> config.h
+}
+
+do_install_append () {
+ install -d ${D}/${datadir}
+ install -d ${D}/${datadir}/applications
+ install -d ${D}/${datadir}/pixmaps/
+
+ install -m 0644 ${WORKDIR}/rxvt.png ${D}/${datadir}/pixmaps
+ install -m 0644 ${WORKDIR}/rxvt.desktop ${D}/${datadir}/applications
+}
+
+FILES_${PN} += "${datadir}/applications/rxvt.desktop ${datadir}/pixmaps/rxvt.png"
diff --git a/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb b/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
index 29f8a7993f..920e1a0a76 100644
--- a/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
+++ b/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
@@ -32,7 +32,7 @@ SRC_URI[md5sum] = "dcbf9d5e2e6391f857c29a57528b32a6"
SRC_URI[sha256sum] = "ada02d636af61aed38f142d3cded662d141ce71264f624c4eb873621a74cc9e7"
# webkit-gtk can NOT be built on MIPS64 with n32 ABI
-COMPATIBLE_HOST_mips64 = "mips64.*-linux$"
+COMPATIBLE_HOST_mips64n32 = "null"
inherit autotools lib_package gtk-doc pkgconfig
diff --git a/meta/recipes-support/apr/apr-util_1.5.3.bb b/meta/recipes-support/apr/apr-util_1.5.4.bb
index 063a787396..ac01b63ecd 100644
--- a/meta/recipes-support/apr/apr-util_1.5.3.bb
+++ b/meta/recipes-support/apr/apr-util_1.5.4.bb
@@ -15,8 +15,8 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
file://run-ptest \
"
-SRC_URI[md5sum] = "71a11d037240b292f824ba1eb537b4e3"
-SRC_URI[sha256sum] = "76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743"
+SRC_URI[md5sum] = "866825c04da827c6e5f53daff5569f42"
+SRC_URI[sha256sum] = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19"
EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--without-odbc \
@@ -28,22 +28,25 @@ EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--with-expat=${STAGING_DIR_HOST}${prefix}"
-inherit autotools-brokensep lib_package binconfig
+inherit autotools lib_package binconfig
+
+PR = "r1"
OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
do_configure_append() {
if [ "${CLASSOVERRIDE}" = "class-target" ]; then
- cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
fi
}
do_configure_prepend_class-native() {
- cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${S}/build/rules.mk
+ mkdir ${B}/build
+ cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
}
do_configure_append_class-native() {
- sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk
+ sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
# sometimes there isn't SHELL
- sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk
+ sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
}
FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so"
@@ -54,7 +57,7 @@ FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a"
inherit ptest
do_compile_ptest() {
- cd ${S}/test
+ cd ${B}/test
oe_runmake
}
@@ -62,6 +65,6 @@ do_install_ptest() {
t=${D}${PTEST_PATH}/test
mkdir $t
for i in testall data; do \
- cp -r ${S}/test/$i $t; \
+ cp -r ${B}/test/$i $t; \
done
}
diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb
index 2720b523f3..a27b2338d1 100644
--- a/meta/recipes-support/apr/apr_1.5.1.bb
+++ b/meta/recipes-support/apr/apr_1.5.1.bb
@@ -32,11 +32,17 @@ CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
do_configure_prepend() {
+ # Avoid absolute paths for grep since it causes failures
+ # when using sstate between different hosts with different
+ # install paths for grep.
+ export GREP="grep"
+
cd ${S}
./buildconf
}
FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+RDEPENDS_${PN}-dev += "bash"
#for some reason, build/libtool.m4 handled by buildconf still be overwritten
#when autoconf, so handle it again.
@@ -85,3 +91,5 @@ do_install_ptest() {
cp ${S}/test/testall $t/
cp ${S}/test/tryread $t/
}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
index 56dabd38eb..a4f0e140b2 100644
--- a/meta/recipes-support/aspell/aspell_0.60.6.1.bb
+++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -15,6 +15,8 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
+RDEPENDS_${PN}-utils += "perl"
+
FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
diff --git a/meta/recipes-support/atk/at-spi2-atk_2.12.0.bb b/meta/recipes-support/atk/at-spi2-atk_2.14.1.bb
index db6dc9032c..23913899ce 100644
--- a/meta/recipes-support/atk/at-spi2-atk_2.12.0.bb
+++ b/meta/recipes-support/atk/at-spi2-atk_2.14.1.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "aafc5e1bb17cd3ad440f6350e7a021c1"
-SRC_URI[sha256sum] = "3b5467c9f169812bc36a4245355b7deedea0a62eb22153df96ced88dcd1c3633"
+SRC_URI[md5sum] = "5c6a085249a6d4e792ead86dca183504"
+SRC_URI[sha256sum] = "058f34ea60edf0a5f831c9f2bdd280fe95c1bcafb76e466e44aa0fb356d17bcb"
DEPENDS = "dbus glib-2.0 atk at-spi2-core"
diff --git a/meta/recipes-support/atk/at-spi2-core_2.12.0.bb b/meta/recipes-support/atk/at-spi2-core_2.14.1.bb
index 31e133fe43..8d01124d01 100644
--- a/meta/recipes-support/atk/at-spi2-core_2.12.0.bb
+++ b/meta/recipes-support/atk/at-spi2-core_2.14.1.bb
@@ -5,13 +5,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "b12ad0e0924706f5e7f51216241068ef"
-SRC_URI[sha256sum] = "db550edd98e53b4252521459c2dcaf0f3b060a9bad52489b9dbadbaedad3fb89"
+
+SRC_URI[md5sum] = "a37993cc50d90465c9aeed95e2ac439a"
+SRC_URI[sha256sum] = "eef9660b14fdf0fb1f30d1be7c72d591fa7cbb87b00ca3a444425712f46ce657"
DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
inherit autotools gtk-doc pkgconfig
-EXTRA_OECONF = "--disable-introspection --disable-xevie"
+EXTRA_OECONF = "--disable-introspection --disable-xevie --with-dbus-daemondir=${bindir}"
FILES_${PN} += "${datadir}/dbus-1/services/*.service"
diff --git a/meta/recipes-support/atk/atk_2.12.0.bb b/meta/recipes-support/atk/atk_2.14.0.bb
index 9112bbb6c2..e0e9be3be9 100644
--- a/meta/recipes-support/atk/atk_2.12.0.bb
+++ b/meta/recipes-support/atk/atk_2.14.0.bb
@@ -5,8 +5,8 @@ SECTION = "x11/libs"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \
- file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7"
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
DEPENDS = "glib-2.0"
@@ -14,8 +14,8 @@ inherit gnomebase gtk-doc
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "930238dec55fdbf8eda9975b44f07b76"
-SRC_URI[archive.sha256sum] = "48a8431974639c5a59c24fcd3ece1a19709872d5dfe78907524d9f5e9993f18f"
+SRC_URI[archive.md5sum] = "ecb7ca8469a5650581b1227d78051b8b"
+SRC_URI[archive.sha256sum] = "2875cc0b32bfb173c066c22a337f79793e0c99d2cc5e81c4dac0d5a523b8fbad"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
index bc9fd6dda3..b2bc8bac28 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -36,4 +36,4 @@ do_install_ptest() {
cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
}
-RDEPENDS_${PN}-ptest = "bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
+RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index c37d34f23d..28c750f987 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -35,3 +35,5 @@ do_install_ptest() {
}
RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+
+BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index 72f623e593..b17e9b10a4 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -7,7 +7,7 @@ inherit autotools-brokensep gettext
# the package comes with a custom config.h.in, it cannot be
# overwritten by autoheader
-export AUTOHEADER = "true"
+EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
EXTRA_OECONF_append_class-native = " --enable-gettext=no"
diff --git a/meta/recipes-support/bdwgc/bdwgc_7.2d.bb b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
index 2ba7aa5a87..23ec95419c 100644
--- a/meta/recipes-support/bdwgc/bdwgc_7.2d.bb
+++ b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
@@ -16,17 +16,15 @@ DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
calls, and removing free calls."
-HOMEPAGE = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/"
+HOMEPAGE = "http://www.hboehm.info/gc/"
SECTION = "devel"
-LICENSE = "MIT & FSF-Unlimited & GPL-2.0"
-LIC_FILES_CHKSUM = "file://README.QUICK;md5=9b9dd874f6940641b6ab19893ee8f1cc \
- file://doc/README;md5=92e7dd0334d1f672b699cd0aca08bef0 \
- file://libatomic_ops/doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
-SRC_URI = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${PV}.tar.gz"
+SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz"
-SRC_URI[md5sum] = "91340b28c61753a789eb6077675d87d2"
-SRC_URI[sha256sum] = "d9fe0ae8650d43746a48bfb394cab01a319f3809cee19f8ebd16aa985b511c5e"
+SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
+SRC_URI[sha256sum] = "63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2"
FILES_${PN}-doc = "/usr/share"
REAL_PV = "${@[d.getVar('PV',1)[:-1], d.getVar('PV',1)][(d.getVar('PV',1)[-1]).isdigit()]}"
@@ -35,4 +33,9 @@ S = "${WORKDIR}/gc-${REAL_PV}"
ARM_INSTRUCTION_SET = "arm"
inherit autotools pkgconfig
+
+# by default use external libatomic-ops
+PACKAGECONFIG ??= "libatomic-ops"
+PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomics-ops"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
new file mode 100644
index 0000000000..b3298ce2db
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
@@ -0,0 +1,34 @@
+Add config option --with-dev-dsp.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+--- a/configure.ac
++++ b/configure.ac
+@@ -106,6 +106,16 @@ AC_ARG_WITH(python,[ --with-python[[=AR
+ fi
+ ])
+
++AC_ARG_WITH(dev-dsp,[ --with-dev-dsp enables dev/dsp for entropy producing. auto for auto-detecting dev/dep on host. [[default=no]]],[
++ if test "$withval" = yes; then
++ AC_DEFINE([HAVE_DEV_DSP], 1)
++ else
++ if test "$withval" = auto; then
++ ac_detect_dev_dsp=yes
++ fi
++ fi
++ ],[ac_detect_dev_dsp=no])
++
+ # Check for expert mode
+ if test "$ac_enable_expert_mode" = yes; then
+ BEE_EXPERT_MODE
+@@ -464,7 +474,7 @@ linux*)
+ ac_cv_have_dev_dsp=no
+ fi
+ ])
+- if test "$ac_cv_have_dev_dsp" = yes; then
++ if test "$ac_cv_have_dev_dsp" = yes && test "$ac_detect_dev_dsp" = yes; then
+ AC_DEFINE([HAVE_DEV_DSP], 1)
+ fi
+ ;;
diff --git a/meta/recipes-support/beecrypt/beecrypt/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest
index 5bc7460be9..2ee294d991 100644
--- a/meta/recipes-support/beecrypt/beecrypt/run-ptest
+++ b/meta/recipes-support/beecrypt/beecrypt/run-ptest
@@ -1,5 +1,5 @@
#!/bin/sh
cd tests
-for i in `ls`; do ./$i; if [ $? == 0 ]; then echo "PASS: $i"; \
+for i in `ls`; do ./$i; if [ $? -eq 0 ]; then echo "PASS: $i"; \
else echo "FAIL: $i"; fi; done
diff --git a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
index 209b92e653..1e626f154c 100644
--- a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
+++ b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
file://fix-for-gcc-4.7.patch \
file://run-ptest \
file://beecrypt-enable-ptest-support.patch \
+ file://add-option-dev-dsp.patch \
"
SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
diff --git a/meta/recipes-support/boost/bjam-native_1.55.0.bb b/meta/recipes-support/boost/bjam-native_1.57.0.bb
index d85d1a96cb..d85d1a96cb 100644
--- a/meta/recipes-support/boost/bjam-native_1.55.0.bb
+++ b/meta/recipes-support/boost/bjam-native_1.57.0.bb
diff --git a/meta/recipes-support/boost/boost-1.55.0.inc b/meta/recipes-support/boost/boost-1.57.0.inc
index 7daadb6c9e..809419dbac 100644
--- a/meta/recipes-support/boost/boost-1.55.0.inc
+++ b/meta/recipes-support/boost/boost-1.57.0.inc
@@ -13,7 +13,7 @@ BOOST_P = "boost_${BOOST_VER}"
SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
-SRC_URI[md5sum] = "d6eef4b4cacb2183f2bf265a5a03a354"
-SRC_URI[sha256sum] = "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52"
+SRC_URI[md5sum] = "1be49befbdd9a5ce9def2983ba3e7b76"
+SRC_URI[sha256sum] = "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967"
S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 0a44d79746..6b42133aed 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -5,6 +5,8 @@ DEPENDS = "bjam-native zlib bzip2"
ARM_INSTRUCTION_SET = "arm"
BOOST_LIBS = "\
+ atomic \
+ chrono \
date_time \
filesystem \
graph \
@@ -90,7 +92,8 @@ EQD = '\"'
#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
-BJAM_TOOLS = "-sTOOLS=gcc \
+BJAM_TOOLS = "--ignore-site-config \
+ '-sTOOLS=gcc' \
'-sGCC=${CC} '${BJAM_CONF} \
'-sGXX=${CXX} '${BJAM_CONF} \
'-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
@@ -106,21 +109,29 @@ BJAM_TOOLS = "-sTOOLS=gcc \
def get_boost_parallel_make(bb, d):
pm = d.getVar('PARALLEL_MAKE', True)
if pm:
- # people are usually using "-jN" or "-j N", but let it work with something else appended to it
- import re
- pm_prefix = re.search("\D+", pm)
- pm_val = re.search("\d+", pm)
- if pm_prefix is None or pm_val is None:
- bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm)
- pm_nval = min(64, int(pm_val.group(0)))
- return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():]
- else:
- return ""
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ v = None
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ v = None
+
+ if v:
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
${BJAM_TOOLS} \
- -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam \
+ -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
--builddir=${S}/${TARGET_SYS} \
--disable-icu \
${BJAM_EXTRA}'
@@ -132,12 +143,12 @@ do_boostconfig() {
cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
- if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/v2/user-config.jam
+ if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/example/user-config.jam
then
- echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/v2/user-config.jam
+ echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
fi
- echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/v2/user-config.jam
+ echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
sed -i '/^using python/d' project-config.jam
diff --git a/meta/recipes-support/boost/boost_1.55.0.bb b/meta/recipes-support/boost/boost_1.55.0.bb
deleted file mode 100644
index b199c88577..0000000000
--- a/meta/recipes-support/boost/boost_1.55.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include boost-${PV}.inc
-include boost.inc
-
-SRC_URI += "file://arm-intrinsics.patch"
diff --git a/meta/recipes-support/boost/boost_1.57.0.bb b/meta/recipes-support/boost/boost_1.57.0.bb
new file mode 100644
index 0000000000..c09d5f431f
--- /dev/null
+++ b/meta/recipes-support/boost/boost_1.57.0.bb
@@ -0,0 +1,6 @@
+include boost-${PV}.inc
+include boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+"
diff --git a/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 0000000000..ad879d466b
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+--- ConsoleKit-0.4.6.orig/configure.ac
++++ ConsoleKit-0.4.6/configure.ac
+@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+
+-PKG_CHECK_MODULES(POLKIT,
+- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+- have_polkit=yes,
+- have_polkit=no)
++AC_ARG_WITH([polkit],
++ [AS_HELP_STRING([--with-polkit],
++ [support PolicyKit @<:@default=check@:>@])],
++ [],
++ [with_polkit=check])
++
++AS_IF([test "x$with_polkit" != xno],
++ [PKG_CHECK_MODULES(POLKIT,
++ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
++ have_polkit=yes,
++ [if test "x$with_polkit" != xcheck; then
++ AC_MSG_FAILURE(
++ [--with-polkit was given, but test for polkit failed])
++ else
++ have_polkit=no
++ fi
++ ])])
++
+ if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+ fi
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 98516166cf..dfbd11c2d1 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -6,13 +6,15 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3"
-DEPENDS = "glib-2.0 dbus dbus-glib virtual/libx11"
+DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
RDEPENDS_${PN} += "base-files"
inherit autotools pkgconfig
SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
- file://sepbuildfix.patch"
+ file://sepbuildfix.patch \
+ file://add-polkit-configure-argument.patch \
+"
SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
@@ -23,8 +25,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
-# No option to turn it on or off, so rely on the build dependency for now.
-PACKAGECONFIG[policykit] = ",,polkit"
+PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
diff --git a/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch b/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch
deleted file mode 100644
index e4b8fe2ab6..0000000000
--- a/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch
+++ /dev/null
@@ -1,8203 +0,0 @@
-Upstream-Status: Backport [to be fixed in 7.37.0]
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-
-diff -ruN a/src/tool_hugehelp.c b/src/tool_hugehelp.c
---- a/src/tool_hugehelp.c 2014-03-25 11:29:49.000000000 +0100
-+++ b/src/tool_hugehelp.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,8196 +0,0 @@
--#include "tool_setup.h"
--#ifndef HAVE_LIBZ
--/*
-- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: Tue Mar 25 11:29:49 2014
-- */
--#ifdef USE_MANUAL
--#include "tool_hugehelp.h"
--void hugehelp(void)
--{
-- fputs(
--" _ _ ____ _\n"
--" Project ___| | | | _ \\| |\n"
--" / __| | | | |_) | |\n"
--" | (__| |_| | _ <| |___\n"
--" \\___|\\___/|_| \\_\\_____|\n"
--"\n"
--"NAME\n"
--" curl - transfer a URL\n"
--"\n"
--"SYNOPSIS\n"
--" curl [options] [URL...]\n"
--"\n"
--"DESCRIPTION\n"
--" curl is a tool to transfer data from or to a server, using one of the\n"
--" supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,\n"
--, stdout);
-- fputs(
--" IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,\n"
--" TELNET and TFTP). The command is designed to work without user inter-\n"
--" action.\n"
--"\n"
--" curl offers a busload of useful tricks like proxy support, user authen-\n"
--" tication, FTP upload, HTTP post, SSL connections, cookies, file trans-\n"
--" fer resume, Metalink, and more. As you will see below, the number of\n"
--" features will make your head spin!\n"
--"\n"
--, stdout);
-- fputs(
--" curl is powered by libcurl for all transfer-related features. See\n"
--" libcurl(3) for details.\n"
--"\n"
--"URL\n"
--" The URL syntax is protocol-dependent. You'll find a detailed descrip-\n"
--" tion in RFC 3986.\n"
--"\n"
--" You can specify multiple URLs or parts of URLs by writing part sets\n"
--" within braces as in:\n"
--"\n"
--" http://site.{one,two,three}.com\n"
--"\n"
--" or you can get sequences of alphanumeric series by using [] as in:\n"
--"\n"
--" ftp://ftp.numericals.com/file[1-100].txt\n"
--, stdout);
-- fputs(
--" ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)\n"
--" ftp://ftp.letters.com/file[a-z].txt\n"
--"\n"
--" Nested sequences are not supported, but you can use several ones next\n"
--" to each other:\n"
--"\n"
--" http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html\n"
--"\n"
--" You can specify any amount of URLs on the command line. They will be\n"
--" fetched in a sequential manner in the specified order.\n"
--"\n"
--, stdout);
-- fputs(
--" You can specify a step counter for the ranges to get every Nth number\n"
--" or letter:\n"
--"\n"
--" http://www.numericals.com/file[1-100:10].txt\n"
--" http://www.letters.com/file[a-z:2].txt\n"
--"\n"
--" If you specify URL without protocol:// prefix, curl will attempt to\n"
--" guess what protocol you might want. It will then default to HTTP but\n"
--" try other protocols based on often-used host name prefixes. For exam-\n"
--, stdout);
-- fputs(
--" ple, for host names starting with \"ftp.\" curl will assume you want to\n"
--" speak FTP.\n"
--"\n"
--" curl will do its best to use what you pass to it as a URL. It is not\n"
--" trying to validate it as a syntactically correct URL by any means but\n"
--" is instead very liberal with what it accepts.\n"
--"\n"
--" curl will attempt to re-use connections for multiple file transfers, so\n"
--" that getting many files from the same server will not do multiple con-\n"
--, stdout);
-- fputs(
--" nects / handshakes. This improves speed. Of course this is only done on\n"
--" files specified on a single command line and cannot be used between\n"
--" separate curl invokes.\n"
--"\n"
--"PROGRESS METER\n"
--" curl normally displays a progress meter during operations, indicating\n"
--" the amount of transferred data, transfer speeds and estimated time\n"
--" left, etc.\n"
--"\n"
--" curl displays this data to the terminal by default, so if you invoke\n"
--, stdout);
-- fputs(
--" curl to do an operation and it is about to write data to the terminal,\n"
--" it disables the progress meter as otherwise it would mess up the output\n"
--" mixing progress meter and response data.\n"
--"\n"
--" If you want a progress meter for HTTP POST or PUT requests, you need to\n"
--" redirect the response output to a file, using shell redirect (>), -o\n"
--" [file] or similar.\n"
--"\n"
--" It is not the same case for FTP upload as that operation does not spit\n"
--, stdout);
-- fputs(
--" out any response data to the terminal.\n"
--"\n"
--" If you prefer a progress \"bar\" instead of the regular meter, -# is your\n"
--" friend.\n"
--"OPTIONS\n"
--" Options start with one or two dashes. Many of the options require an\n"
--" addition value next to it.\n"
--"\n"
--" The short \"single-dash\" form of the options, -d for example, may be\n"
--" used with or without a space between it and its value, although a space\n"
--" is a recommended separator. The long \"double-dash\" form, --data for\n"
--, stdout);
-- fputs(
--" example, requires a space between it and its value.\n"
--"\n"
--" Short version options that don't need any additional values can be used\n"
--" immediately next to each other, like for example you can specify all\n"
--" the options -O, -L and -v at once as -OLv.\n"
--"\n"
--" In general, all boolean options are enabled with --option and yet again\n"
--" disabled with --no-option. That is, you use the exact same option name\n"
--, stdout);
-- fputs(
--" but prefix it with \"no-\". However, in this list we mostly only list and\n"
--" show the --option version of them. (This concept with --no options was\n"
--" added in 7.19.0. Previously most options were toggled on/off on\n"
--" repeated use of the same command line option.)\n"
--"\n"
--" -#, --progress-bar\n"
--" Make curl display progress as a simple progress bar instead of\n"
--" the standard, more informational, meter.\n"
--"\n"
--" -:, --next\n"
--, stdout);
-- fputs(
--" Tells curl to use a separate operation for the following URL and\n"
--" associated options. This allows you to send several URL\n"
--" requests, each with their own specific options, for example,\n"
--" such as different user names or custom requests for each. (Added\n"
--" in 7.36.0)\n"
--"\n"
--" -0, --http1.0\n"
--" (HTTP) Tells curl to use HTTP version 1.0 instead of using its\n"
--" internally preferred: HTTP 1.1.\n"
--"\n"
--, stdout);
-- fputs(
--" --http1.1\n"
--" (HTTP) Tells curl to use HTTP version 1.1. This is the internal\n"
--" default version. (Added in 7.33.0)\n"
--"\n"
--" --http2\n"
--" (HTTP) Tells curl to issue its requests using HTTP 2. This\n"
--" requires that the underlying libcurl was built to support it.\n"
--" (Added in 7.33.0)\n"
--"\n"
--" --no-npn\n"
--" Disable the NPN TLS extension. NPN is enabled by default if\n"
--, stdout);
-- fputs(
--" libcurl was built with an SSL library that supports NPN. NPN is\n"
--" used by a libcurl that supports HTTP 2 to negotiate HTTP 2 sup-\n"
--" port with the server during https sessions.\n"
--"\n"
--" (Added in 7.36.0)\n"
--"\n"
--" --no-alpn\n"
--" Disable the ALPN TLS extension. ALPN is enabled by default if\n"
--" libcurl was built with an SSL library that supports ALPN. ALPN\n"
--, stdout);
-- fputs(
--" is used by a libcurl that supports HTTP 2 to negotiate HTTP 2\n"
--" support with the server during https sessions.\n"
--"\n"
--" (Added in 7.36.0)\n"
--"\n"
--" -1, --tlsv1\n"
--" (SSL) Forces curl to use TLS version 1.x when negotiating with a\n"
--" remote TLS server. You can use options --tlsv1.0, --tlsv1.1,\n"
--" and --tlsv1.2 to control the TLS version more precisely (if the\n"
--" SSL backend in use supports such a level of control).\n"
--"\n"
--, stdout);
-- fputs(
--" -2, --sslv2\n"
--" (SSL) Forces curl to use SSL version 2 when negotiating with a\n"
--" remote SSL server.\n"
--"\n"
--" -3, --sslv3\n"
--" (SSL) Forces curl to use SSL version 3 when negotiating with a\n"
--" remote SSL server.\n"
--"\n"
--" -4, --ipv4\n"
--" If curl is capable of resolving an address to multiple IP ver-\n"
--" sions (which it is if it is IPv6-capable), this option tells\n"
--" curl to resolve names to IPv4 addresses only.\n"
--, stdout);
-- fputs(
--"\n"
--" -6, --ipv6\n"
--" If curl is capable of resolving an address to multiple IP ver-\n"
--" sions (which it is if it is IPv6-capable), this option tells\n"
--" curl to resolve names to IPv6 addresses only.\n"
--"\n"
--" -a, --append\n"
--" (FTP/SFTP) When used in an upload, this will tell curl to append\n"
--" to the target file instead of overwriting it. If the file\n"
--" doesn't exist, it will be created. Note that this flag is\n"
--, stdout);
-- fputs(
--" ignored by some SSH servers (including OpenSSH).\n"
--"\n"
--" -A, --user-agent <agent string>\n"
--" (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
--" Some badly done CGIs fail if this field isn't set to\n"
--" \"Mozilla/4.0\". To encode blanks in the string, surround the\n"
--" string with single quote marks. This can also be set with the\n"
--" -H, --header option of course.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --anyauth\n"
--" (HTTP) Tells curl to figure out authentication method by itself,\n"
--" and use the most secure one the remote site claims to support.\n"
--" This is done by first doing a request and checking the response-\n"
--" headers, thus possibly inducing an extra network round-trip.\n"
--" This is used instead of setting a specific authentication\n"
--, stdout);
-- fputs(
--" method, which you can do with --basic, --digest, --ntlm, and\n"
--" --negotiate.\n"
--"\n"
--" Note that using --anyauth is not recommended if you do uploads\n"
--" from stdin, since it may require data to be sent twice and then\n"
--" the client must be able to rewind. If the need should arise when\n"
--" uploading from stdin, the upload operation will fail.\n"
--"\n"
--" -b, --cookie <name=data>\n"
--, stdout);
-- fputs(
--" (HTTP) Pass the data to the HTTP server as a cookie. It is sup-\n"
--" posedly the data previously received from the server in a \"Set-\n"
--" Cookie:\" line. The data should be in the format \"NAME1=VALUE1;\n"
--" NAME2=VALUE2\".\n"
--"\n"
--" If no '=' symbol is used in the line, it is treated as a file-\n"
--" name to use to read previously stored cookie lines from, which\n"
--, stdout);
-- fputs(
--" should be used in this session if they match. Using this method\n"
--" also activates the \"cookie parser\" which will make curl record\n"
--" incoming cookies too, which may be handy if you're using this in\n"
--" combination with the -L, --location option. The file format of\n"
--" the file to read cookies from should be plain HTTP headers or\n"
--" the Netscape/Mozilla cookie file format.\n"
--"\n"
--, stdout);
-- fputs(
--" NOTE that the file specified with -b, --cookie is only used as\n"
--" input. No cookies will be stored in the file. To store cookies,\n"
--" use the -c, --cookie-jar option or you could even save the HTTP\n"
--" headers to a file using -D, --dump-header!\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -B, --use-ascii\n"
--" (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be\n"
--, stdout);
-- fputs(
--" enforced by using an URL that ends with \";type=A\". This option\n"
--" causes data sent to stdout to be in text mode for win32 systems.\n"
--"\n"
--" --basic\n"
--" (HTTP) Tells curl to use HTTP Basic authentication. This is the\n"
--" default and this option is usually pointless, unless you use it\n"
--" to override a previously set option that sets a different\n"
--" authentication method (such as --ntlm, --digest, or --negoti-\n"
--, stdout);
-- fputs(
--" ate).\n"
--"\n"
--" -c, --cookie-jar <file name>\n"
--" (HTTP) Specify to which file you want curl to write all cookies\n"
--" after a completed operation. Curl writes all cookies previously\n"
--" read from a specified file as well as all cookies received from\n"
--" remote server(s). If no cookies are known, no file will be writ-\n"
--" ten. The file will be written using the Netscape cookie file\n"
--, stdout);
-- fputs(
--" format. If you set the file name to a single dash, \"-\", the\n"
--" cookies will be written to stdout.\n"
--"\n"
--" This command line option will activate the cookie engine that\n"
--" makes curl record and use cookies. Another way to activate it is\n"
--" to use the -b, --cookie option.\n"
--"\n"
--" If the cookie jar can't be created or written to, the whole curl\n"
--" operation won't fail or even report an error clearly. Using -v\n"
--, stdout);
-- fputs(
--" will get a warning displayed, but that is the only visible feed-\n"
--" back you get about this possibly lethal situation.\n"
--"\n"
--" If this option is used several times, the last specified file\n"
--" name will be used.\n"
--"\n"
--" -C, --continue-at <offset>\n"
--" Continue/Resume a previous file transfer at the given offset.\n"
--" The given offset is the exact number of bytes that will be\n"
--, stdout);
-- fputs(
--" skipped, counting from the beginning of the source file before\n"
--" it is transferred to the destination. If used with uploads, the\n"
--" FTP server command SIZE will not be used by curl.\n"
--"\n"
--" Use \"-C -\" to tell curl to automatically find out where/how to\n"
--" resume the transfer. It then uses the given output/input files\n"
--" to figure that out.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--, stdout);
-- fputs(
--" --ciphers <list of ciphers>\n"
--" (SSL) Specifies which ciphers to use in the connection. The list\n"
--" of ciphers must specify valid ciphers. Read up on SSL cipher\n"
--" list details on this URL:\n"
--" http://www.openssl.org/docs/apps/ciphers.html\n"
--"\n"
--" NSS ciphers are done differently than OpenSSL and GnuTLS. The\n"
--" full list of NSS ciphers is in the NSSCipherSuite entry at this\n"
--, stdout);
-- fputs(
--" URL: http://git.fedora-\n"
--" hosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --compressed\n"
--" (HTTP) Request a compressed response using one of the algorithms\n"
--" curl supports, and save the uncompressed document. If this\n"
--" option is used and the server sends an unsupported encoding,\n"
--, stdout);
-- fputs(
--" curl will report an error.\n"
--"\n"
--" --connect-timeout <seconds>\n"
--" Maximum time in seconds that you allow the connection to the\n"
--" server to take. This only limits the connection phase, once\n"
--" curl has connected this option is of no more use. Since 7.32.0,\n"
--" this option accepts decimal values, but the actual timeout will\n"
--" decrease in accuracy as the specified timeout increases in deci-\n"
--, stdout);
-- fputs(
--" mal precision. See also the -m, --max-time option.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --create-dirs\n"
--" When used in conjunction with the -o option, curl will create\n"
--" the necessary local directory hierarchy as needed. This option\n"
--" creates the dirs mentioned with the -o option, nothing else. If\n"
--" the -o file name uses no dir or if the dirs it mentions already\n"
--, stdout);
-- fputs(
--" exist, no dir will be created.\n"
--"\n"
--" To create remote directories when using FTP or SFTP, try --ftp-\n"
--" create-dirs.\n"
--"\n"
--" --crlf (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).\n"
--"\n"
--" --crlfile <file>\n"
--" (HTTPS/FTPS) Provide a file using PEM format with a Certificate\n"
--" Revocation List that may specify peer certificates that are to\n"
--" be considered revoked.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" (Added in 7.19.7)\n"
--" -d, --data <data>\n"
--" (HTTP) Sends the specified data in a POST request to the HTTP\n"
--" server, in the same way that a browser does when a user has\n"
--" filled in an HTML form and presses the submit button. This will\n"
--" cause curl to pass the data to the server using the content-type\n"
--, stdout);
-- fputs(
--" application/x-www-form-urlencoded. Compare to -F, --form.\n"
--"\n"
--" -d, --data is the same as --data-ascii. To post data purely\n"
--" binary, you should instead use the --data-binary option. To URL-\n"
--" encode the value of a form field you may use --data-urlencode.\n"
--"\n"
--" If any of these options is used more than once on the same com-\n"
--" mand line, the data pieces specified will be merged together\n"
--, stdout);
-- fputs(
--" with a separating &-symbol. Thus, using '-d name=daniel -d\n"
--" skill=lousy' would generate a post chunk that looks like\n"
--" 'name=daniel&skill=lousy'.\n"
--"\n"
--" If you start the data with the letter @, the rest should be a\n"
--" file name to read the data from, or - if you want curl to read\n"
--" the data from stdin. Multiple files can also be specified. Post-\n"
--, stdout);
-- fputs(
--" ing data from a file named 'foobar' would thus be done with\n"
--" --data @foobar. When --data is told to read from a file like\n"
--" that, carriage returns and newlines will be stripped out.\n"
--"\n"
--" -D, --dump-header <file>\n"
--" Write the protocol headers to the specified file.\n"
--"\n"
--" This option is handy to use when you want to store the headers\n"
--" that an HTTP site sends to you. Cookies from the headers could\n"
--, stdout);
-- fputs(
--" then be read in a second curl invocation by using the -b,\n"
--" --cookie option! The -c, --cookie-jar option is however a better\n"
--" way to store cookies.\n"
--"\n"
--" When used in FTP, the FTP server response lines are considered\n"
--" being \"headers\" and thus are saved there.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --data-ascii <data>\n"
--" See -d, --data.\n"
--"\n"
--" --data-binary <data>\n"
--, stdout);
-- fputs(
--" (HTTP) This posts data exactly as specified with no extra pro-\n"
--" cessing whatsoever.\n"
--"\n"
--" If you start the data with the letter @, the rest should be a\n"
--" filename. Data is posted in a similar manner as --data-ascii\n"
--" does, except that newlines and carriage returns are preserved\n"
--" and conversions are never done.\n"
--"\n"
--" If this option is used several times, the ones following the\n"
--, stdout);
-- fputs(
--" first will append data as described in -d, --data.\n"
--"\n"
--" --data-urlencode <data>\n"
--" (HTTP) This posts data, similar to the other --data options with\n"
--" the exception that this performs URL-encoding. (Added in 7.18.0)\n"
--" To be CGI-compliant, the <data> part should begin with a name\n"
--" followed by a separator and a content specification. The <data>\n"
--" part can be passed to curl using one of the following syntaxes:\n"
--"\n"
--, stdout);
-- fputs(
--" content\n"
--" This will make curl URL-encode the content and pass that\n"
--" on. Just be careful so that the content doesn't contain\n"
--" any = or @ symbols, as that will then make the syntax\n"
--" match one of the other cases below!\n"
--"\n"
--" =content\n"
--" This will make curl URL-encode the content and pass that\n"
--" on. The preceding = symbol is not included in the data.\n"
--"\n"
--, stdout);
-- fputs(
--" name=content\n"
--" This will make curl URL-encode the content part and pass\n"
--" that on. Note that the name part is expected to be URL-\n"
--" encoded already.\n"
--"\n"
--" @filename\n"
--" This will make curl load data from the given file\n"
--" (including any newlines), URL-encode that data and pass\n"
--" it on in the POST.\n"
--"\n"
--" name@filename\n"
--, stdout);
-- fputs(
--" This will make curl load data from the given file\n"
--" (including any newlines), URL-encode that data and pass\n"
--" it on in the POST. The name part gets an equal sign\n"
--" appended, resulting in name=urlencoded-file-content. Note\n"
--" that the name is expected to be URL-encoded already.\n"
--"\n"
--" --delegation LEVEL\n"
--" Set LEVEL to tell the server what it is allowed to delegate when\n"
--, stdout);
-- fputs(
--" it comes to user credentials. Used with GSS/kerberos.\n"
--"\n"
--" none Don't allow any delegation.\n"
--"\n"
--" policy Delegates if and only if the OK-AS-DELEGATE flag is set\n"
--" in the Kerberos service ticket, which is a matter of\n"
--" realm policy.\n"
--"\n"
--" always Unconditionally allow the server to delegate.\n"
--"\n"
--" --digest\n"
--" (HTTP) Enables HTTP Digest authentication. This is an authenti-\n"
--, stdout);
-- fputs(
--" cation scheme that prevents the password from being sent over\n"
--" the wire in clear text. Use this in combination with the normal\n"
--" -u, --user option to set user name and password. See also\n"
--" --ntlm, --negotiate and --anyauth for related options.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--" --disable-eprt\n"
--, stdout);
-- fputs(
--" (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
--" when doing active FTP transfers. Curl will normally always first\n"
--" attempt to use EPRT, then LPRT before using PORT, but with this\n"
--" option, it will use PORT right away. EPRT and LPRT are exten-\n"
--" sions to the original FTP protocol, and may not work on all\n"
--" servers, but they enable more functionality in a better way than\n"
--, stdout);
-- fputs(
--" the traditional PORT command.\n"
--"\n"
--" --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
--" is an alias for --disable-eprt.\n"
--"\n"
--" Disabling EPRT only changes the active behavior. If you want to\n"
--" switch to passive mode you need to not use -P, --ftp-port or\n"
--" force it with --ftp-pasv.\n"
--"\n"
--" --disable-epsv\n"
--" (FTP) Tell curl to disable the use of the EPSV command when\n"
--, stdout);
-- fputs(
--" doing passive FTP transfers. Curl will normally always first\n"
--" attempt to use EPSV before PASV, but with this option, it will\n"
--" not try using EPSV.\n"
--"\n"
--" --epsv can be used to explicitly enable EPSV again and --no-epsv\n"
--" is an alias for --disable-epsv.\n"
--"\n"
--" Disabling EPSV only changes the passive behavior. If you want to\n"
--" switch to active mode you need to use -P, --ftp-port.\n"
--"\n"
--, stdout);
-- fputs(
--" --dns-interface <interface>\n"
--" Tell curl to send outgoing DNS requests through <interface>.\n"
--" This option is a counterpart to --interface (which does not\n"
--" affect DNS). The supplied string must be an interface name (not\n"
--" an address).\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-ipv4-addr <ip-address>\n"
--" Tell curl to bind to <ip-address> when making IPv4 DNS requests,\n"
--" so that the DNS requests originate from this address. The argu-\n"
--" ment should be a single IPv4 address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-ipv6-addr <ip-address>\n"
--" Tell curl to bind to <ip-address> when making IPv6 DNS requests,\n"
--" so that the DNS requests originate from this address. The argu-\n"
--" ment should be a single IPv6 address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-servers <ip-address,ip-address>\n"
--" Set the list of DNS servers to be used instead of the system\n"
--" default. The list of IP addresses should be separated with com-\n"
--" mas. Port numbers may also optionally be given as :<port-number>\n"
--" after each IP address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--, stdout);
-- fputs(
--" backend that supports this operation. The c-ares backend is the\n"
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" -e, --referer <URL>\n"
--" (HTTP) Sends the \"Referrer Page\" information to the HTTP server.\n"
--" This can also be set with the -H, --header flag of course. When\n"
--" used with -L, --location you can append \";auto\" to the --referer\n"
--" URL to make curl automatically set the previous URL when it fol-\n"
--, stdout);
-- fputs(
--" lows a Location: header. The \";auto\" string can be used alone,\n"
--" even if you don't set an initial --referer.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -E, --cert <certificate[:password]>\n"
--" (SSL) Tells curl to use the specified client certificate file\n"
--" when getting a file with HTTPS, FTPS or another SSL-based proto-\n"
--" col. The certificate must be in PKCS#12 format if using Secure\n"
--, stdout);
-- fputs(
--" Transport, or PEM format if using any other engine. If the\n"
--" optional password isn't specified, it will be queried for on the\n"
--" terminal. Note that this option assumes a \"certificate\" file\n"
--" that is the private key and the private certificate concate-\n"
--" nated! See --cert and --key to specify them independently.\n"
--"\n"
--" If curl is built against the NSS SSL library then this option\n"
--, stdout);
-- fputs(
--" can tell curl the nickname of the certificate to use within the\n"
--" NSS database defined by the environment variable SSL_DIR (or by\n"
--" default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib-\n"
--" nsspem.so) is available then PEM files may be loaded. If you\n"
--" want to use a file from the current directory, please precede it\n"
--" with \"./\" prefix, in order to avoid confusion with a nickname.\n"
--, stdout);
-- fputs(
--" If the nickname contains \":\", it needs to be preceded by \"\\\" so\n"
--" that it is not recognized as password delimiter. If the nick-\n"
--" name contains \"\\\", it needs to be escaped as \"\\\\\" so that it is\n"
--" not recognized as an escape character.\n"
--"\n"
--" (iOS and Mac OS X only) If curl is built against Secure Trans-\n"
--" port, then the certificate string can either be the name of a\n"
--, stdout);
-- fputs(
--" certificate/private key in the system or user keychain, or the\n"
--" path to a PKCS#12-encoded certificate and private key. If you\n"
--" want to use a file from the current directory, please precede it\n"
--" with \"./\" prefix, in order to avoid confusion with a nickname.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --engine <name>\n"
--" Select the OpenSSL crypto engine to use for cipher operations.\n"
--, stdout);
-- fputs(
--" Use --engine list to print a list of build-time supported\n"
--" engines. Note that not all (or none) of the engines may be\n"
--" available at run-time.\n"
--"\n"
--" --environment\n"
--" (RISC OS ONLY) Sets a range of environment variables, using the\n"
--" names the -w option supports, to allow easier extraction of use-\n"
--" ful information after having run curl.\n"
--"\n"
--" --egd-file <file>\n"
--, stdout);
-- fputs(
--" (SSL) Specify the path name to the Entropy Gathering Daemon\n"
--" socket. The socket is used to seed the random engine for SSL\n"
--" connections. See also the --random-file option.\n"
--"\n"
--" --cert-type <type>\n"
--" (SSL) Tells curl what certificate type the provided certificate\n"
--" is in. PEM, DER and ENG are recognized types. If not specified,\n"
--" PEM is assumed.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --cacert <CA certificate>\n"
--" (SSL) Tells curl to use the specified certificate file to verify\n"
--" the peer. The file may contain multiple CA certificates. The\n"
--" certificate(s) must be in PEM format. Normally curl is built to\n"
--" use a default file for this, so this option is typically used to\n"
--" alter that default file.\n"
--"\n"
--, stdout);
-- fputs(
--" curl recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
--" if it is set, and uses the given path as a path to a CA cert\n"
--" bundle. This option overrides that variable.\n"
--"\n"
--" The windows version of curl will automatically look for a CA\n"
--" certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
--" tory as curl.exe, or in the Current Working Directory, or in any\n"
--" folder along your PATH.\n"
--"\n"
--, stdout);
-- fputs(
--" If curl is built against the NSS SSL library, the NSS PEM\n"
--" PKCS#11 module (libnsspem.so) needs to be available for this\n"
--" option to work properly.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --capath <CA certificate directory>\n"
--" (SSL) Tells curl to use the specified certificate directory to\n"
--" verify the peer. Multiple paths can be provided by separating\n"
--, stdout);
-- fputs(
--" them with \":\" (e.g. \"path1:path2:path3\"). The certificates must\n"
--" be in PEM format, and if curl is built against OpenSSL, the\n"
--" directory must have been processed using the c_rehash utility\n"
--" supplied with OpenSSL. Using --capath can allow OpenSSL-powered\n"
--" curl to make SSL-connections much more efficiently than using\n"
--" --cacert if the --cacert file contains many CA certificates.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is set, the default capath value will be ignored,\n"
--" and if it is used several times, the last one will be used.\n"
--"\n"
--" -f, --fail\n"
--" (HTTP) Fail silently (no output at all) on server errors. This\n"
--" is mostly done to better enable scripts etc to better deal with\n"
--" failed attempts. In normal cases when an HTTP server fails to\n"
--" deliver a document, it returns an HTML document stating so\n"
--, stdout);
-- fputs(
--" (which often also describes why and more). This flag will pre-\n"
--" vent curl from outputting that and return error 22.\n"
--"\n"
--" This method is not fail-safe and there are occasions where non-\n"
--" successful response codes will slip through, especially when\n"
--" authentication is involved (response codes 401 and 407).\n"
--"\n"
--" -F, --form <name=content>\n"
--" (HTTP) This lets curl emulate a filled-in form in which a user\n"
--, stdout);
-- fputs(
--" has pressed the submit button. This causes curl to POST data\n"
--" using the Content-Type multipart/form-data according to RFC\n"
--" 2388. This enables uploading of binary files etc. To force the\n"
--" 'content' part to be a file, prefix the file name with an @\n"
--" sign. To just get the content part from a file, prefix the file\n"
--" name with the symbol <. The difference between @ and < is then\n"
--, stdout);
-- fputs(
--" that @ makes a file get attached in the post as a file upload,\n"
--" while the < makes a text field and just get the contents for\n"
--" that text field from a file.\n"
--"\n"
--" Example, to send your password file to the server, where 'pass-\n"
--" word' is the name of the form-field to which /etc/passwd will be\n"
--" the input:\n"
--"\n"
--" curl -F password=@/etc/passwd www.mypasswords.com\n"
--"\n"
--, stdout);
-- fputs(
--" To read content from stdin instead of a file, use - as the file-\n"
--" name. This goes for both @ and < constructs.\n"
--"\n"
--" You can also tell curl what Content-Type to use by using\n"
--" 'type=', in a manner similar to:\n"
--"\n"
--" curl -F \"web=@index.html;type=text/html\" url.com\n"
--"\n"
--" or\n"
--"\n"
--" curl -F \"name=daniel;type=text/foo\" url.com\n"
--"\n"
--" You can also explicitly change the name field of a file upload\n"
--, stdout);
-- fputs(
--" part by setting filename=, like this:\n"
--"\n"
--" curl -F \"file=@localfile;filename=nameinpost\" url.com\n"
--"\n"
--" If filename/path contains ',' or ';', it must be quoted by dou-\n"
--" ble-quotes like:\n"
--"\n"
--" curl -F \"file=@\\\"localfile\\\";filename=\\\"nameinpost\\\"\" url.com\n"
--"\n"
--" or\n"
--"\n"
--" curl -F 'file=@\"localfile\";filename=\"nameinpost\"' url.com\n"
--"\n"
--" Note that if a filename/path is quoted by double-quotes, any\n"
--, stdout);
-- fputs(
--" double-quote or backslash within the filename must be escaped by\n"
--" backslash.\n"
--"\n"
--" See further examples and details in the MANUAL.\n"
--"\n"
--" This option can be used multiple times.\n"
--"\n"
--" --ftp-account [data]\n"
--" (FTP) When an FTP server asks for \"account data\" after user name\n"
--" and password has been provided, this data is sent off using the\n"
--" ACCT command. (Added in 7.13.0)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --ftp-alternative-to-user <command>\n"
--" (FTP) If authenticating with the USER and PASS commands fails,\n"
--" send this command. When connecting to Tumbleweed's Secure\n"
--" Transport server over FTPS using a client certificate, using\n"
--" \"SITE AUTH\" will tell the server to retrieve the username from\n"
--" the certificate. (Added in 7.15.5)\n"
--"\n"
--, stdout);
-- fputs(
--" --ftp-create-dirs\n"
--" (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that\n"
--" doesn't currently exist on the server, the standard behavior of\n"
--" curl is to fail. Using this option, curl will instead attempt to\n"
--" create missing directories.\n"
--"\n"
--" --ftp-method [method]\n"
--" (FTP) Control what method curl should use to reach a file on an\n"
--" FTP(S) server. The method argument should be one of the follow-\n"
--, stdout);
-- fputs(
--" ing alternatives:\n"
--"\n"
--" multicwd\n"
--" curl does a single CWD operation for each path part in\n"
--" the given URL. For deep hierarchies this means very many\n"
--" commands. This is how RFC 1738 says it should be done.\n"
--" This is the default but the slowest behavior.\n"
--"\n"
--" nocwd curl does no CWD at all. curl will do SIZE, RETR, STOR\n"
--, stdout);
-- fputs(
--" etc and give a full path to the server for all these com-\n"
--" mands. This is the fastest behavior.\n"
--"\n"
--" singlecwd\n"
--" curl does one CWD with the full target directory and then\n"
--" operates on the file \"normally\" (like in the multicwd\n"
--" case). This is somewhat more standards compliant than\n"
--" 'nocwd' but without the full penalty of 'multicwd'.\n"
--" (Added in 7.15.1)\n"
--"\n"
--, stdout);
-- fputs(
--" --ftp-pasv\n"
--" (FTP) Use passive mode for the data connection. Passive is the\n"
--" internal default behavior, but using this option can be used to\n"
--" override a previous -P/-ftp-port option. (Added in 7.11.0)\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used. Undoing an enforced passive really isn't doable but you\n"
--" must then instead enforce the correct -P, --ftp-port again.\n"
--"\n"
--, stdout);
-- fputs(
--" Passive mode means that curl will try the EPSV command first and\n"
--" then PASV, unless --disable-epsv is used.\n"
--"\n"
--" --ftp-skip-pasv-ip\n"
--" (FTP) Tell curl to not use the IP address the server suggests in\n"
--" its response to curl's PASV command when curl connects the data\n"
--" connection. Instead curl will re-use the same IP address it\n"
--" already uses for the control connection. (Added in 7.14.2)\n"
--"\n"
--, stdout);
-- fputs(
--" This option has no effect if PORT, EPRT or EPSV is used instead\n"
--" of PASV.\n"
--"\n"
--" --ftp-pret\n"
--" (FTP) Tell curl to send a PRET command before PASV (and EPSV).\n"
--" Certain FTP servers, mainly drftpd, require this non-standard\n"
--" command for directory listings as well as up and downloads in\n"
--" PASV mode. (Added in 7.20.x)\n"
--"\n"
--" --ftp-ssl-ccc\n"
--, stdout);
-- fputs(
--" (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS\n"
--" layer after authenticating. The rest of the control channel com-\n"
--" munication will be unencrypted. This allows NAT routers to fol-\n"
--" low the FTP transaction. The default mode is passive. See --ftp-\n"
--" ssl-ccc-mode for other modes. (Added in 7.16.1)\n"
--"\n"
--" --ftp-ssl-ccc-mode [active/passive]\n"
--, stdout);
-- fputs(
--" (FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The\n"
--" passive mode will not initiate the shutdown, but instead wait\n"
--" for the server to do it, and will not reply to the shutdown from\n"
--" the server. The active mode initiates the shutdown and waits for\n"
--" a reply from the server. (Added in 7.16.2)\n"
--"\n"
--" --ftp-ssl-control\n"
--" (FTP) Require SSL/TLS for the FTP login, clear for transfer.\n"
--, stdout);
-- fputs(
--" Allows secure authentication, but non-encrypted data transfers\n"
--" for efficiency. Fails the transfer if the server doesn't sup-\n"
--" port SSL/TLS. (Added in 7.16.0) that can still be used but will\n"
--" be removed in a future version.\n"
--"\n"
--" --form-string <name=string>\n"
--" (HTTP) Similar to --form except that the value string for the\n"
--" named parameter is used literally. Leading '@' and '<' charac-\n"
--, stdout);
-- fputs(
--" ters, and the ';type=' string in the value have no special mean-\n"
--" ing. Use this in preference to --form if there's any possibility\n"
--" that the string value may accidentally trigger the '@' or '<'\n"
--" features of --form.\n"
--"\n"
--" -g, --globoff\n"
--" This option switches off the \"URL globbing parser\". When you set\n"
--" this option, you can specify URLs that contain the letters {}[]\n"
--, stdout);
-- fputs(
--" without having them being interpreted by curl itself. Note that\n"
--" these letters are not normal legal URL contents but they should\n"
--" be encoded according to the URI standard.\n"
--"\n"
--" -G, --get\n"
--" When used, this option will make all data specified with -d,\n"
--" --data, --data-binary or --data-urlencode to be used in an HTTP\n"
--" GET request instead of the POST request that otherwise would be\n"
--, stdout);
-- fputs(
--" used. The data will be appended to the URL with a '?' separator.\n"
--" If used in combination with -I, the POST data will instead be\n"
--" appended to the URL with a HEAD request.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used. This is because undoing a GET doesn't make sense, but you\n"
--" should then instead enforce the alternative method you prefer.\n"
--"\n"
--" -H, --header <header>\n"
--, stdout);
-- fputs(
--" (HTTP) Extra header to use when getting a web page. You may\n"
--" specify any number of extra headers. Note that if you should add\n"
--" a custom header that has the same name as one of the internal\n"
--" ones curl would use, your externally set header will be used\n"
--" instead of the internal one. This allows you to make even trick-\n"
--" ier stuff than curl would normally do. You should not replace\n"
--, stdout);
-- fputs(
--" internally set headers without knowing perfectly well what\n"
--" you're doing. Remove an internal header by giving a replacement\n"
--" without content on the right side of the colon, as in: -H\n"
--" \"Host:\". If you send the custom header with no-value then its\n"
--" header must be terminated with a semicolon, such as -H \"X-Cus-\n"
--" tom-Header;\" to send \"X-Custom-Header:\".\n"
--"\n"
--, stdout);
-- fputs(
--" curl will make sure that each header you add/replace is sent\n"
--" with the proper end-of-line marker, you should thus not add that\n"
--" as a part of the header content: do not add newlines or carriage\n"
--" returns, they will only mess things up for you.\n"
--"\n"
--" See also the -A, --user-agent and -e, --referer options.\n"
--"\n"
--" This option can be used multiple times to add/replace/remove\n"
--" multiple headers.\n"
--"\n"
--, stdout);
-- fputs(
--" --hostpubmd5 <md5>\n"
--" (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The\n"
--" string should be the 128 bit MD5 checksum of the remote host's\n"
--" public key, curl will refuse the connection with the host unless\n"
--" the md5sums match. (Added in 7.17.1)\n"
--"\n"
--" --ignore-content-length\n"
--" (HTTP) Ignore the Content-Length header. This is particularly\n"
--, stdout);
-- fputs(
--" useful for servers running Apache 1.x, which will report incor-\n"
--" rect Content-Length for files larger than 2 gigabytes.\n"
--"\n"
--" -i, --include\n"
--" (HTTP) Include the HTTP-header in the output. The HTTP-header\n"
--" includes things like server-name, date of the document, HTTP-\n"
--" version and more...\n"
--"\n"
--" -I, --head\n"
--" (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature\n"
--, stdout);
-- fputs(
--" the command HEAD which this uses to get nothing but the header\n"
--" of a document. When used on an FTP or FILE file, curl displays\n"
--" the file size and last modification time only.\n"
--"\n"
--" --interface <name>\n"
--" Perform an operation using a specified interface. You can enter\n"
--" interface name, IP address or host name. An example could look\n"
--" like:\n"
--"\n"
--" curl --interface eth0:1 http://www.netscape.com/\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -j, --junk-session-cookies\n"
--" (HTTP) When curl is told to read cookies from a given file, this\n"
--" option will make it discard all \"session cookies\". This will\n"
--" basically have the same effect as if a new session is started.\n"
--" Typical browsers always discard session cookies when they're\n"
--" closed down.\n"
--"\n"
--" -J, --remote-header-name\n"
--, stdout);
-- fputs(
--" (HTTP) This option tells the -O, --remote-name option to use the\n"
--" server-specified Content-Disposition filename instead of\n"
--" extracting a filename from the URL.\n"
--"\n"
--" There's no attempt to decode %-sequences (yet) in the provided\n"
--" file name, so this option may provide you with rather unexpected\n"
--" file names.\n"
--"\n"
--" -k, --insecure\n"
--" (SSL) This option explicitly allows curl to perform \"insecure\"\n"
--, stdout);
-- fputs(
--" SSL connections and transfers. All SSL connections are attempted\n"
--" to be made secure by using the CA certificate bundle installed\n"
--" by default. This makes all connections considered \"insecure\"\n"
--" fail unless -k, --insecure is used.\n"
--"\n"
--" See this online resource for further details:\n"
--" http://curl.haxx.se/docs/sslcerts.html\n"
--"\n"
--" -K, --config <config file>\n"
--, stdout);
-- fputs(
--" Specify which config file to read curl arguments from. The con-\n"
--" fig file is a text file in which command line arguments can be\n"
--" written which then will be used as if they were written on the\n"
--" actual command line.\n"
--"\n"
--" Options and their parameters must be specified on the same con-\n"
--" fig file line, separated by whitespace, colon, or the equals\n"
--, stdout);
-- fputs(
--" sign. Long option names can optionally be given in the config\n"
--" file without the initial double dashes and if so, the colon or\n"
--" equals characters can be used as separators. If the option is\n"
--" specified with one or two dashes, there can be no colon or\n"
--" equals character between the option and its parameter.\n"
--"\n"
--" If the parameter is to contain whitespace, the parameter must be\n"
--, stdout);
-- fputs(
--" enclosed within quotes. Within double quotes, the following\n"
--" escape sequences are available: \\\\, \\\", \\t, \\n, \\r and \\v. A\n"
--" backslash preceding any other letter is ignored. If the first\n"
--" column of a config line is a '#' character, the rest of the line\n"
--" will be treated as a comment. Only write one option per physical\n"
--" line in the config file.\n"
--"\n"
--, stdout);
-- fputs(
--" Specify the filename to -K, --config as '-' to make curl read\n"
--" the file from stdin.\n"
--"\n"
--" Note that to be able to specify a URL in the config file, you\n"
--" need to specify it using the --url option, and not by simply\n"
--" writing the URL on its own line. So, it could look similar to\n"
--" this:\n"
--"\n"
--" url = \"http://curl.haxx.se/docs/\"\n"
--"\n"
--, stdout);
-- fputs(
--" When curl is invoked, it always (unless -q is used) checks for a\n"
--" default config file and uses it if found. The default config\n"
--" file is checked for in the following places in this order:\n"
--"\n"
--" 1) curl tries to find the \"home dir\": It first checks for the\n"
--" CURL_HOME and then the HOME environment variables. Failing that,\n"
--" it uses getpwuid() on UNIX-like systems (which returns the home\n"
--, stdout);
-- fputs(
--" dir given the current user in your system). On Windows, it then\n"
--" checks for the APPDATA variable, or as a last resort the '%USER-\n"
--" PROFILE%\\Application Data'.\n"
--"\n"
--" 2) On windows, if there is no _curlrc file in the home dir, it\n"
--" checks for one in the same dir the curl executable is placed. On\n"
--" UNIX-like systems, it will simply try to load .curlrc from the\n"
--" determined home dir.\n"
--"\n"
--, stdout);
-- fputs(
--" # --- Example file ---\n"
--" # this is a comment\n"
--" url = \"curl.haxx.se\"\n"
--" output = \"curlhere.html\"\n"
--" user-agent = \"superagent/1.0\"\n"
--"\n"
--" # and fetch another URL too\n"
--" url = \"curl.haxx.se/docs/manpage.html\"\n"
--" -O\n"
--" referer = \"http://nowhereatall.com/\"\n"
--" # --- End of example file ---\n"
--"\n"
--" This option can be used multiple times to load multiple config\n"
--" files.\n"
--"\n"
--, stdout);
-- fputs(
--" --keepalive-time <seconds>\n"
--" This option sets the time a connection needs to remain idle\n"
--" before sending keepalive probes and the time between individual\n"
--" keepalive probes. It is currently effective on operating systems\n"
--" offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options\n"
--" (meaning Linux, recent AIX, HP-UX and more). This option has no\n"
--" effect if --no-keepalive is used. (Added in 7.18.0)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--" If unspecified, the option defaults to 60 seconds.\n"
--"\n"
--" --key <key>\n"
--" (SSL/SSH) Private key file name. Allows you to provide your pri-\n"
--" vate key in this separate file.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --key-type <type>\n"
--" (SSL) Private key file type. Specify which type your --key pro-\n"
--, stdout);
-- fputs(
--" vided private key is. DER, PEM, and ENG are supported. If not\n"
--" specified, PEM is assumed.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --krb <level>\n"
--" (FTP) Enable Kerberos authentication and use. The level must be\n"
--" entered and should be one of 'clear', 'safe', 'confidential', or\n"
--" 'private'. Should you use a level that is not one of these,\n"
--, stdout);
-- fputs(
--" 'private' will instead be used.\n"
--"\n"
--" This option requires a library built with kerberos4 or GSSAPI\n"
--" (GSS-Negotiate) support. This is not very common. Use -V, --ver-\n"
--" sion to see if your curl supports it.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -l, --list-only\n"
--" (FTP) When listing an FTP directory, this switch forces a name-\n"
--, stdout);
-- fputs(
--" only view. This is especially useful if the user wants to\n"
--" machine-parse the contents of an FTP directory since the normal\n"
--" directory view doesn't use a standard look or format. When used\n"
--" like this, the option causes a NLST command to be sent to the\n"
--" server instead of LIST.\n"
--"\n"
--" Note: Some FTP servers list only files in their response to\n"
--, stdout);
-- fputs(
--" NLST; they do not include sub-directories and symbolic links.\n"
--"\n"
--" (POP3) When retrieving a specific email from POP3, this switch\n"
--" forces a LIST command to be performed instead of RETR. This is\n"
--" particularly useful if the user wants to see if a specific mes-\n"
--" sage id exists on the server and what size it is.\n"
--"\n"
--" Note: When combined with -X, --request <command>, this option\n"
--, stdout);
-- fputs(
--" can be used to send an UIDL command instead, so the user may use\n"
--" the email's unique identifier rather than it's message id to\n"
--" make the request. (Added in 7.21.5)\n"
--"\n"
--" -L, --location\n"
--" (HTTP/HTTPS) If the server reports that the requested page has\n"
--" moved to a different location (indicated with a Location: header\n"
--" and a 3XX response code), this option will make curl redo the\n"
--, stdout);
-- fputs(
--" request on the new place. If used together with -i, --include or\n"
--" -I, --head, headers from all requested pages will be shown. When\n"
--" authentication is used, curl only sends its credentials to the\n"
--" initial host. If a redirect takes curl to a different host, it\n"
--" won't be able to intercept the user+password. See also --loca-\n"
--" tion-trusted on how to change this. You can limit the amount of\n"
--, stdout);
-- fputs(
--" redirects to follow by using the --max-redirs option.\n"
--"\n"
--" When curl follows a redirect and the request is not a plain GET\n"
--" (for example POST or PUT), it will do the following request with\n"
--" a GET if the HTTP response was 301, 302, or 303. If the response\n"
--" code was any other 3xx code, curl will re-send the following\n"
--" request using the same unmodified method.\n"
--"\n"
--" --libcurl <file>\n"
--, stdout);
-- fputs(
--" Append this option to any ordinary curl command line, and you\n"
--" will get a libcurl-using C source code written to the file that\n"
--" does the equivalent of what your command-line operation does!\n"
--"\n"
--" If this option is used several times, the last given file name\n"
--" will be used. (Added in 7.16.1)\n"
--"\n"
--" --limit-rate <speed>\n"
--" Specify the maximum transfer rate you want curl to use. This\n"
--, stdout);
-- fputs(
--" feature is useful if you have a limited pipe and you'd like your\n"
--" transfer not to use your entire bandwidth.\n"
--"\n"
--" The given speed is measured in bytes/second, unless a suffix is\n"
--" appended. Appending 'k' or 'K' will count the number as kilo-\n"
--" bytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it\n"
--" gigabytes. Examples: 200K, 3m and 1G.\n"
--"\n"
--, stdout);
-- fputs(
--" The given rate is the average speed counted during the entire\n"
--" transfer. It means that curl might use higher transfer speeds in\n"
--" short bursts, but over time it uses no more than the given rate.\n"
--" If you also use the -Y, --speed-limit option, that option will\n"
--" take precedence and might cripple the rate-limiting slightly, to\n"
--" help keeping the speed-limit logic working.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --local-port <num>[-num]\n"
--" Set a preferred number or range of local port numbers to use for\n"
--" the connection(s). Note that port numbers by nature are a\n"
--" scarce resource that will be busy at times so setting this range\n"
--" to something too narrow might cause unnecessary connection setup\n"
--" failures. (Added in 7.15.2)\n"
--"\n"
--" --location-trusted\n"
--, stdout);
-- fputs(
--" (HTTP/HTTPS) Like -L, --location, but will allow sending the\n"
--" name + password to all hosts that the site may redirect to. This\n"
--" may or may not introduce a security breach if the site redirects\n"
--" you to a site to which you'll send your authentication info\n"
--" (which is plaintext in the case of HTTP Basic authentication).\n"
--"\n"
--" -m, --max-time <seconds>\n"
--, stdout);
-- fputs(
--" Maximum time in seconds that you allow the whole operation to\n"
--" take. This is useful for preventing your batch jobs from hang-\n"
--" ing for hours due to slow networks or links going down. Since\n"
--" 7.32.0, this option accepts decimal values, but the actual time-\n"
--" out will decrease in accuracy as the specified timeout increases\n"
--" in decimal precision. See also the --connect-timeout option.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --mail-auth <address>\n"
--" (SMTP) Specify a single address. This will be used to specify\n"
--" the authentication address (identity) of a submitted message\n"
--" that is being relayed to another server.\n"
--"\n"
--" (Added in 7.25.0)\n"
--"\n"
--" --mail-from <address>\n"
--" (SMTP) Specify a single address that the given mail should get\n"
--" sent from.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.20.0)\n"
--"\n"
--" --max-filesize <bytes>\n"
--" Specify the maximum size (in bytes) of a file to download. If\n"
--" the file requested is larger than this value, the transfer will\n"
--" not start and curl will return with exit code 63.\n"
--"\n"
--" NOTE: The file size is not always known prior to download, and\n"
--" for such files this option has no effect even if the file trans-\n"
--, stdout);
-- fputs(
--" fer ends up being larger than this given limit. This concerns\n"
--" both FTP and HTTP transfers.\n"
--"\n"
--" --mail-rcpt <address>\n"
--" (SMTP) Specify a single address, user name or mailing list name.\n"
--" When performing a mail transfer, the recipient should specify a\n"
--" valid email address to send the mail to. (Added in 7.20.0)\n"
--"\n"
--" When performing an address verification (VRFY command), the\n"
--, stdout);
-- fputs(
--" recipient should be specified as the user name or user name and\n"
--" domain (as per Section 3.5 of RFC5321). (Added in 7.34.0)\n"
--"\n"
--" When performing a mailing list expand (EXPN command), the recip-\n"
--" ient should be specified using the mailing list name, such as\n"
--" \"Friends\" or \"London-Office\". (Added in 7.34.0)\n"
--"\n"
--" --max-redirs <num>\n"
--" Set maximum number of redirection-followings allowed. If -L,\n"
--, stdout);
-- fputs(
--" --location is used, this option can be used to prevent curl from\n"
--" following redirections \"in absurdum\". By default, the limit is\n"
--" set to 50 redirections. Set this option to -1 to make it limit-\n"
--" less.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --metalink\n"
--" This option can tell curl to parse and process a given URI as\n"
--, stdout);
-- fputs(
--" Metalink file (both version 3 and 4 (RFC 5854) are supported)\n"
--" and make use of the mirrors listed within for failover if there\n"
--" are errors (such as the file or server not being available). It\n"
--" will also verify the hash of the file after the download com-\n"
--" pletes. The Metalink file itself is downloaded and processed in\n"
--" memory and not stored in the local file system.\n"
--"\n"
--, stdout);
-- fputs(
--" Example to use a remote Metalink file:\n"
--"\n"
--" curl --metalink http://www.example.com/example.metalink\n"
--"\n"
--" To use a Metalink file in the local file system, use FILE proto-\n"
--" col (file://):\n"
--"\n"
--" curl --metalink file://example.metalink\n"
--"\n"
--" Please note that if FILE protocol is disabled, there is no way\n"
--" to use a local Metalink file at the time of this writing. Also\n"
--, stdout);
-- fputs(
--" note that if --metalink and --include are used together,\n"
--" --include will be ignored. This is because including headers in\n"
--" the response will break Metalink parser and if the headers are\n"
--" included in the file described in Metalink file, hash check will\n"
--" fail.\n"
--"\n"
--" (Added in 7.27.0, if built against the libmetalink library.)\n"
--"\n"
--" -n, --netrc\n"
--, stdout);
-- fputs(
--" Makes curl scan the .netrc (_netrc on Windows) file in the\n"
--" user's home directory for login name and password. This is typi-\n"
--" cally used for FTP on UNIX. If used with HTTP, curl will enable\n"
--" user authentication. See netrc(4) or ftp(1) for details on the\n"
--" file format. Curl will not complain if that file doesn't have\n"
--" the right permissions (it should not be either world- or group-\n"
--, stdout);
-- fputs(
--" readable). The environment variable \"HOME\" is used to find the\n"
--" home directory.\n"
--"\n"
--" A quick and very simple example of how to setup a .netrc to\n"
--" allow curl to FTP to the machine host.domain.com with user name\n"
--" 'myself' and password 'secret' should look similar to:\n"
--"\n"
--" machine host.domain.com login myself password secret\n"
--"\n"
--" -N, --no-buffer\n"
--, stdout);
-- fputs(
--" Disables the buffering of the output stream. In normal work sit-\n"
--" uations, curl will use a standard buffered output stream that\n"
--" will have the effect that it will output the data in chunks, not\n"
--" necessarily exactly when the data arrives. Using this option\n"
--" will disable that buffering.\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --buffer to enforce the buffering.\n"
--"\n"
--, stdout);
-- fputs(
--" --netrc-file\n"
--" This option is similar to --netrc, except that you provide the\n"
--" path (absolute or relative) to the netrc file that Curl should\n"
--" use. You can only specify one netrc file per invocation. If\n"
--" several --netrc-file options are provided, only the last one\n"
--" will be used. (Added in 7.21.5)\n"
--"\n"
--" This option overrides any use of --netrc as they are mutually\n"
--, stdout);
-- fputs(
--" exclusive. It will also abide by --netrc-optional if specified.\n"
--"\n"
--" --netrc-optional\n"
--" Very similar to --netrc, but this option makes the .netrc usage\n"
--" optional and not mandatory as the --netrc option does.\n"
--"\n"
--" --negotiate\n"
--" (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate\n"
--" method was designed by Microsoft and is used in their web appli-\n"
--, stdout);
-- fputs(
--" cations. It is primarily meant as a support for Kerberos5\n"
--" authentication but may be also used along with another authenti-\n"
--" cation method. For more information see IETF draft draft-brezak-\n"
--" spnego-http-04.txt.\n"
--"\n"
--" If you want to enable Negotiate for your proxy authentication,\n"
--" then use --proxy-negotiate.\n"
--"\n"
--" This option requires a library built with GSSAPI support. This\n"
--, stdout);
-- fputs(
--" is not very common. Use -V, --version to see if your version\n"
--" supports GSS-Negotiate.\n"
--"\n"
--" When using this option, you must also provide a fake -u, --user\n"
--" option to activate the authentication code properly. Sending a\n"
--" '-u :' is enough as the user name and password from the -u\n"
--" option aren't actually used.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--, stdout);
-- fputs(
--" --no-keepalive\n"
--" Disables the use of keepalive messages on the TCP connection, as\n"
--" by default curl enables them.\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --keepalive to enforce keepalive.\n"
--"\n"
--" --no-sessionid\n"
--" (SSL) Disable curl's use of SSL session-ID caching. By default\n"
--" all transfers are done using the cache. Note that while nothing\n"
--, stdout);
-- fputs(
--" should ever get hurt by attempting to reuse SSL session-IDs,\n"
--" there seem to be broken SSL implementations in the wild that may\n"
--" require you to disable this in order for you to succeed. (Added\n"
--" in 7.16.0)\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --sessionid to enforce session-ID caching.\n"
--"\n"
--" --noproxy <no-proxy-list>\n"
--, stdout);
-- fputs(
--" Comma-separated list of hosts which do not use a proxy, if one\n"
--" is specified. The only wildcard is a single * character, which\n"
--" matches all hosts, and effectively disables the proxy. Each name\n"
--" in this list is matched as either a domain which contains the\n"
--" hostname, or the hostname itself. For example, local.com would\n"
--" match local.com, local.com:80, and www.local.com, but not\n"
--, stdout);
-- fputs(
--" www.notlocal.com. (Added in 7.19.4).\n"
--"\n"
--" --ntlm (HTTP) Enables NTLM authentication. The NTLM authentication\n"
--" method was designed by Microsoft and is used by IIS web servers.\n"
--" It is a proprietary protocol, reverse-engineered by clever peo-\n"
--" ple and implemented in curl based on their efforts. This kind of\n"
--" behavior should not be endorsed, you should encourage everyone\n"
--, stdout);
-- fputs(
--" who uses NTLM to switch to a public and documented authentica-\n"
--" tion method instead, such as Digest.\n"
--"\n"
--" If you want to enable NTLM for your proxy authentication, then\n"
--" use --proxy-ntlm.\n"
--"\n"
--" This option requires a library built with SSL support. Use -V,\n"
--" --version to see if your curl supports NTLM.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--, stdout);
-- fputs(
--" -o, --output <file>\n"
--" Write output to <file> instead of stdout. If you are using {} or\n"
--" [] to fetch multiple documents, you can use '#' followed by a\n"
--" number in the <file> specifier. That variable will be replaced\n"
--" with the current string for the URL being fetched. Like in:\n"
--"\n"
--" curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
--"\n"
--" or use several variables like:\n"
--"\n"
--, stdout);
-- fputs(
--" curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
--"\n"
--" You may use this option as many times as the number of URLs you\n"
--" have.\n"
--"\n"
--" See also the --create-dirs option to create the local directo-\n"
--" ries dynamically. Specifying the output as '-' (a single dash)\n"
--" will force the output to be done to stdout.\n"
--"\n"
--" -O, --remote-name\n"
--" Write output to a local file named like the remote file we get.\n"
--, stdout);
-- fputs(
--" (Only the file part of the remote file is used, the path is cut\n"
--" off.)\n"
--"\n"
--" The remote file name to use for saving is extracted from the\n"
--" given URL, nothing else.\n"
--"\n"
--" Consequentially, the file will be saved in the current working\n"
--" directory. If you want the file saved in a different directory,\n"
--" make sure you change current working directory before you invoke\n"
--, stdout);
-- fputs(
--" curl with the -O, --remote-name flag!\n"
--"\n"
--" There is no URL decoding done on the file name. If it has %20 or\n"
--" other URL encoded parts of the name, they will end up as-is as\n"
--" file name.\n"
--"\n"
--" You may use this option as many times as the number of URLs you\n"
--" have.\n"
--"\n"
--" --oauth2-bearer\n"
--" (IMAP, POP3, SMTP) Specify the Bearer Token for OAUTH 2.0 server\n"
--, stdout);
-- fputs(
--" authentication. The Bearer Token is used in conjunction with the\n"
--" user name which can be specified as part of the --url or -u,\n"
--" --user options.\n"
--"\n"
--" The Bearer Token and user name are formatted according to RFC\n"
--" 6750.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -p, --proxytunnel\n"
--" When an HTTP proxy is used (-x, --proxy), this option will cause\n"
--, stdout);
-- fputs(
--" non-HTTP protocols to attempt to tunnel through the proxy\n"
--" instead of merely using it to do HTTP-like operations. The tun-\n"
--" nel approach is made with the HTTP proxy CONNECT request and\n"
--" requires that the proxy allows direct connect to the remote port\n"
--" number curl wants to tunnel through to.\n"
--"\n"
--" -P, --ftp-port <address>\n"
--" (FTP) Reverses the default initiator/listener roles when con-\n"
--, stdout);
-- fputs(
--" necting with FTP. This switch makes curl use active mode. In\n"
--" practice, curl then tells the server to connect back to the\n"
--" client's specified address and port, while passive mode asks the\n"
--" server to setup an IP address and port for it to connect to.\n"
--" <address> should be one of:\n"
--"\n"
--" interface\n"
--" i.e \"eth0\" to specify which interface's IP address you\n"
--, stdout);
-- fputs(
--" want to use (Unix only)\n"
--"\n"
--" IP address\n"
--" i.e \"192.168.10.1\" to specify the exact IP address\n"
--"\n"
--" host name\n"
--" i.e \"my.host.domain\" to specify the machine\n"
--"\n"
--" - make curl pick the same IP address that is already used\n"
--" for the control connection\n"
--"\n"
--" If this option is used several times, the last one will be used. Dis-\n"
--, stdout);
-- fputs(
--" able the use of PORT with --ftp-pasv. Disable the attempt to use the\n"
--" EPRT command instead of PORT by using --disable-eprt. EPRT is really\n"
--" PORT++.\n"
--"\n"
--" Starting in 7.19.5, you can append \":[start]-[end]\" to the right of the\n"
--" address, to tell curl what TCP port range to use. That means you spec-\n"
--" ify a port range, from a lower to a higher number. A single number\n"
--" works as well, but do note that it increases the risk of failure since\n"
--, stdout);
-- fputs(
--" the port may not be available.\n"
--"\n"
--" --pass <phrase>\n"
--" (SSL/SSH) Passphrase for the private key\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --post301\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--" POST requests into GET requests when following a 301 redirect-\n"
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--, stdout);
-- fputs(
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.17.1)\n"
--"\n"
--" --post302\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--" POST requests into GET requests when following a 302 redirect-\n"
--, stdout);
-- fputs(
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.19.1)\n"
--"\n"
--" --post303\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--, stdout);
-- fputs(
--" POST requests into GET requests when following a 303 redirect-\n"
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.26.0)\n"
--"\n"
--" --proto <protocols>\n"
--, stdout);
-- fputs(
--" Tells curl to use the listed protocols for its initial\n"
--" retrieval. Protocols are evaluated left to right, are comma sep-\n"
--" arated, and are each a protocol name or 'all', optionally pre-\n"
--" fixed by zero or more modifiers. Available modifiers are:\n"
--"\n"
--" + Permit this protocol in addition to protocols already permit-\n"
--" ted (this is the default if no modifier is used).\n"
--"\n"
--, stdout);
-- fputs(
--" - Deny this protocol, removing it from the list of protocols\n"
--" already permitted.\n"
--"\n"
--" = Permit only this protocol (ignoring the list already permit-\n"
--" ted), though subject to later modification by subsequent\n"
--" entries in the comma separated list.\n"
--"\n"
--" For example:\n"
--"\n"
--" --proto -ftps uses the default protocols, but disables ftps\n"
--"\n"
--" --proto -all,https,+http\n"
--, stdout);
-- fputs(
--" only enables http and https\n"
--"\n"
--" --proto =http,https\n"
--" also only enables http and https\n"
--"\n"
--" Unknown protocols produce a warning. This allows scripts to\n"
--" safely rely on being able to disable potentially dangerous pro-\n"
--" tocols, without relying upon support for that protocol being\n"
--" built into curl to avoid an error.\n"
--"\n"
--, stdout);
-- fputs(
--" This option can be used multiple times, in which case the effect\n"
--" is the same as concatenating the protocols into one instance of\n"
--" the option.\n"
--"\n"
--" (Added in 7.20.2)\n"
--"\n"
--" --proto-redir <protocols>\n"
--" Tells curl to use the listed protocols after a redirect. See\n"
--" --proto for how protocols are represented.\n"
--"\n"
--" (Added in 7.20.2)\n"
--"\n"
--" --proxy-anyauth\n"
--, stdout);
-- fputs(
--" Tells curl to pick a suitable authentication method when commu-\n"
--" nicating with the given proxy. This might cause an extra\n"
--" request/response round-trip. (Added in 7.13.2)\n"
--"\n"
--" --proxy-basic\n"
--" Tells curl to use HTTP Basic authentication when communicating\n"
--" with the given proxy. Use --basic for enabling HTTP Basic with a\n"
--" remote host. Basic is the default authentication method curl\n"
--, stdout);
-- fputs(
--" uses with proxies.\n"
--"\n"
--" --proxy-digest\n"
--" Tells curl to use HTTP Digest authentication when communicating\n"
--" with the given proxy. Use --digest for enabling HTTP Digest with\n"
--" a remote host.\n"
--"\n"
--" --proxy-negotiate\n"
--" Tells curl to use HTTP Negotiate authentication when communicat-\n"
--" ing with the given proxy. Use --negotiate for enabling HTTP\n"
--" Negotiate with a remote host. (Added in 7.17.1)\n"
--"\n"
--, stdout);
-- fputs(
--" --proxy-ntlm\n"
--" Tells curl to use HTTP NTLM authentication when communicating\n"
--" with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
--" host.\n"
--"\n"
--" --proxy1.0 <proxyhost[:port]>\n"
--" Use the specified HTTP 1.0 proxy. If the port number is not\n"
--" specified, it is assumed at port 1080.\n"
--"\n"
--" The only difference between this and the HTTP proxy option (-x,\n"
--, stdout);
-- fputs(
--" --proxy), is that attempts to use CONNECT through the proxy will\n"
--" specify an HTTP 1.0 protocol instead of the default HTTP 1.1.\n"
--"\n"
--" --pubkey <key>\n"
--" (SSH) Public key file name. Allows you to provide your public\n"
--" key in this separate file.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -q If used as the first parameter on the command line, the curlrc\n"
--, stdout);
-- fputs(
--" config file will not be read and used. See the -K, --config for\n"
--" details on the default config file search path.\n"
--"\n"
--" -Q, --quote <command>\n"
--" (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP\n"
--" server. Quote commands are sent BEFORE the transfer takes place\n"
--" (just after the initial PWD command in an FTP transfer, to be\n"
--" exact). To make commands take place after a successful transfer,\n"
--, stdout);
-- fputs(
--" prefix them with a dash '-'. To make commands be sent after\n"
--" curl has changed the working directory, just before the transfer\n"
--" command(s), prefix the command with a '+' (this is only sup-\n"
--" ported for FTP). You may specify any number of commands. If the\n"
--" server returns failure for one of the commands, the entire oper-\n"
--" ation will be aborted. You must send syntactically correct FTP\n"
--, stdout);
-- fputs(
--" commands as RFC 959 defines to FTP servers, or one of the com-\n"
--" mands listed below to SFTP servers. This option can be used\n"
--" multiple times. When speaking to an FTP server, prefix the com-\n"
--" mand with an asterisk (*) to make curl continue even if the com-\n"
--" mand fails as by default curl will stop at first failure.\n"
--"\n"
--" SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP\n"
--, stdout);
-- fputs(
--" quote commands itself before sending them to the server. File\n"
--" names may be quoted shell-style to embed spaces or special char-\n"
--" acters. Following is the list of all supported SFTP quote com-\n"
--" mands:\n"
--"\n"
--" chgrp group file\n"
--" The chgrp command sets the group ID of the file named by\n"
--" the file operand to the group ID specified by the group\n"
--, stdout);
-- fputs(
--" operand. The group operand is a decimal integer group ID.\n"
--"\n"
--" chmod mode file\n"
--" The chmod command modifies the file mode bits of the\n"
--" specified file. The mode operand is an octal integer mode\n"
--" number.\n"
--"\n"
--" chown user file\n"
--" The chown command sets the owner of the file named by the\n"
--" file operand to the user ID specified by the user oper-\n"
--, stdout);
-- fputs(
--" and. The user operand is a decimal integer user ID.\n"
--"\n"
--" ln source_file target_file\n"
--" The ln and symlink commands create a symbolic link at the\n"
--" target_file location pointing to the source_file loca-\n"
--" tion.\n"
--"\n"
--" mkdir directory_name\n"
--" The mkdir command creates the directory named by the\n"
--" directory_name operand.\n"
--"\n"
--, stdout);
-- fputs(
--" pwd The pwd command returns the absolute pathname of the cur-\n"
--" rent working directory.\n"
--"\n"
--" rename source target\n"
--" The rename command renames the file or directory named by\n"
--" the source operand to the destination path named by the\n"
--" target operand.\n"
--"\n"
--" rm file\n"
--" The rm command removes the file specified by the file op-\n"
--" erand.\n"
--"\n"
--, stdout);
-- fputs(
--" rmdir directory\n"
--" The rmdir command removes the directory entry specified\n"
--" by the directory operand, provided it is empty.\n"
--"\n"
--" symlink source_file target_file\n"
--" See ln.\n"
--"\n"
--" -r, --range <range>\n"
--" (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial docu-\n"
--" ment) from a HTTP/1.1, FTP or SFTP server or a local FILE.\n"
--" Ranges can be specified in a number of ways.\n"
--"\n"
--, stdout);
-- fputs(
--" 0-499 specifies the first 500 bytes\n"
--"\n"
--" 500-999 specifies the second 500 bytes\n"
--"\n"
--" -500 specifies the last 500 bytes\n"
--"\n"
--" 9500- specifies the bytes from offset 9500 and forward\n"
--"\n"
--" 0-0,-1 specifies the first and last byte only(*)(H)\n"
--"\n"
--" 500-700,600-799\n"
--" specifies 300 bytes from offset 500(H)\n"
--"\n"
--" 100-199,500-599\n"
--, stdout);
-- fputs(
--" specifies two separate 100-byte ranges(*)(H)\n"
--"\n"
--" (*) = NOTE that this will cause the server to reply with a multipart\n"
--" response!\n"
--"\n"
--" Only digit characters (0-9) are valid in the 'start' and 'stop' fields\n"
--" of the 'start-stop' range syntax. If a non-digit character is given in\n"
--" the range, the server's response will be unspecified, depending on the\n"
--" server's configuration.\n"
--"\n"
--, stdout);
-- fputs(
--" You should also be aware that many HTTP/1.1 servers do not have this\n"
--" feature enabled, so that when you attempt to get a range, you'll\n"
--" instead get the whole document.\n"
--"\n"
--" FTP and SFTP range downloads only support the simple 'start-stop' syn-\n"
--" tax (optionally with one of the numbers omitted). FTP use depends on\n"
--" the extended FTP command SIZE.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -R, --remote-time\n"
--, stdout);
-- fputs(
--" When used, this will make curl attempt to figure out the time-\n"
--" stamp of the remote file, and if that is available make the\n"
--" local file get that same timestamp.\n"
--"\n"
--" --random-file <file>\n"
--" (SSL) Specify the path name to file containing what will be con-\n"
--" sidered as random data. The data is used to seed the random\n"
--" engine for SSL connections. See also the --egd-file option.\n"
--"\n"
--, stdout);
-- fputs(
--" --raw (HTTP) When used, it disables all internal HTTP decoding of con-\n"
--" tent or transfer encodings and instead makes them passed on\n"
--" unaltered, raw. (Added in 7.16.2)\n"
--"\n"
--" --remote-name-all\n"
--" This option changes the default action for all given URLs to be\n"
--" dealt with as if -O, --remote-name were used for each one. So if\n"
--" you want to disable that for a specific URL after --remote-name-\n"
--, stdout);
-- fputs(
--" all has been used, you must use \"-o -\" or --no-remote-name.\n"
--" (Added in 7.19.0)\n"
--"\n"
--" --resolve <host:port:address>\n"
--" Provide a custom address for a specific host and port pair.\n"
--" Using this, you can make the curl requests(s) use a specified\n"
--" address and prevent the otherwise normally resolved address to\n"
--" be used. Consider it a sort of /etc/hosts alternative provided\n"
--, stdout);
-- fputs(
--" on the command line. The port number should be the number used\n"
--" for the specific protocol the host will be used for. It means\n"
--" you need several entries if you want to provide address for the\n"
--" same host but different ports.\n"
--"\n"
--" This option can be used many times to add many host names to\n"
--" resolve.\n"
--"\n"
--" (Added in 7.21.3)\n"
--"\n"
--" --retry <num>\n"
--, stdout);
-- fputs(
--" If a transient error is returned when curl tries to perform a\n"
--" transfer, it will retry this number of times before giving up.\n"
--" Setting the number to 0 makes curl do no retries (which is the\n"
--" default). Transient error means either: a timeout, an FTP 4xx\n"
--" response code or an HTTP 5xx response code.\n"
--"\n"
--" When curl is about to retry a transfer, it will first wait one\n"
--, stdout);
-- fputs(
--" second and then for all forthcoming retries it will double the\n"
--" waiting time until it reaches 10 minutes which then will be the\n"
--" delay between the rest of the retries. By using --retry-delay\n"
--" you disable this exponential backoff algorithm. See also\n"
--" --retry-max-time to limit the total time allowed for retries.\n"
--" (Added in 7.12.3)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --retry-delay <seconds>\n"
--" Make curl sleep this amount of time before each retry when a\n"
--" transfer has failed with a transient error (it changes the\n"
--" default backoff time algorithm between retries). This option is\n"
--" only interesting if --retry is also used. Setting this delay to\n"
--, stdout);
-- fputs(
--" zero will make curl use the default backoff time. (Added in\n"
--" 7.12.3)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --retry-max-time <seconds>\n"
--" The retry timer is reset before the first transfer attempt.\n"
--" Retries will be done as usual (see --retry) as long as the timer\n"
--" hasn't reached this given limit. Notice that if the timer hasn't\n"
--, stdout);
-- fputs(
--" reached the limit, the request will be made and while perform-\n"
--" ing, it may take longer than this given time period. To limit a\n"
--" single request's maximum time, use -m, --max-time. Set this\n"
--" option to zero to not timeout retries. (Added in 7.12.3)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -s, --silent\n"
--" Silent or quiet mode. Don't show progress meter or error mes-\n"
--, stdout);
-- fputs(
--" sages. Makes Curl mute. It will still output the data you ask\n"
--" for, potentially even to the terminal/stdout unless you redirect\n"
--" it.\n"
--"\n"
--" --sasl-ir\n"
--" Enable initial response in SASL authentication. (Added in\n"
--" 7.31.0)\n"
--"\n"
--" -S, --show-error\n"
--" When used with -s it makes curl show an error message if it\n"
--" fails.\n"
--"\n"
--" --ssl (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.\n"
--, stdout);
-- fputs(
--" Reverts to a non-secure connection if the server doesn't support\n"
--" SSL/TLS. See also --ftp-ssl-control and --ssl-reqd for differ-\n"
--" ent levels of encryption required. (Added in 7.20.0)\n"
--"\n"
--" This option was formerly known as --ftp-ssl (Added in 7.11.0).\n"
--" That option name can still be used but will be removed in a\n"
--" future version.\n"
--"\n"
--" --ssl-reqd\n"
--, stdout);
-- fputs(
--" (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.\n"
--" Terminates the connection if the server doesn't support SSL/TLS.\n"
--" (Added in 7.20.0)\n"
--"\n"
--" This option was formerly known as --ftp-ssl-reqd (added in\n"
--" 7.15.5). That option name can still be used but will be removed\n"
--" in a future version.\n"
--"\n"
--" --ssl-allow-beast\n"
--" (SSL) This option tells curl to not work around a security flaw\n"
--, stdout);
-- fputs(
--" in the SSL3 and TLS1.0 protocols known as BEAST. If this option\n"
--" isn't used, the SSL layer may use workarounds known to cause\n"
--" interoperability problems with some older SSL implementations.\n"
--" WARNING: this option loosens the SSL security, and by using this\n"
--" flag you ask for exactly that. (Added in 7.25.0)\n"
--"\n"
--" --socks4 <host[:port]>\n"
--" Use the specified SOCKS4 proxy. If the port number is not speci-\n"
--, stdout);
-- fputs(
--" fied, it is assumed at port 1080. (Added in 7.15.2)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks4 proxy with -x, --proxy using a socks4:// protocol prefix.\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --socks4a <host[:port]>\n"
--, stdout);
-- fputs(
--" Use the specified SOCKS4a proxy. If the port number is not spec-\n"
--" ified, it is assumed at port 1080. (Added in 7.18.0)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks4a proxy with -x, --proxy using a socks4a:// protocol pre-\n"
--" fix.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --socks5-hostname <host[:port]>\n"
--" Use the specified SOCKS5 proxy (and let the proxy resolve the\n"
--" host name). If the port number is not specified, it is assumed\n"
--" at port 1080. (Added in 7.18.0)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--, stdout);
-- fputs(
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks5 hostname proxy with -x, --proxy using a socks5h:// proto-\n"
--" col prefix.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--" (This option was previously wrongly documented and used as\n"
--" --socks without the number appended.)\n"
--"\n"
--" --socks5 <host[:port]>\n"
--, stdout);
-- fputs(
--" Use the specified SOCKS5 proxy - but resolve the host name\n"
--" locally. If the port number is not specified, it is assumed at\n"
--" port 1080.\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks5 proxy with -x, --proxy using a socks5:// protocol prefix.\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--" (This option was previously wrongly documented and used as\n"
--" --socks without the number appended.)\n"
--"\n"
--" This option (as well as --socks4) does not work with IPV6, FTPS\n"
--" or LDAP.\n"
--"\n"
--" --socks5-gssapi-service <servicename>\n"
--" The default service name for a socks server is rcmd/server-fqdn.\n"
--" This option allows you to change it.\n"
--"\n"
--, stdout);
-- fputs(
--" Examples: --socks5 proxy-name --socks5-gssapi-service sockd\n"
--" would use sockd/proxy-name --socks5 proxy-name --socks5-gssapi-\n"
--" service sockd/real-name would use sockd/real-name for cases\n"
--" where the proxy-name does not match the principal name. (Added\n"
--" in 7.19.4).\n"
--"\n"
--" --socks5-gssapi-nec\n"
--" As part of the gssapi negotiation a protection mode is negoti-\n"
--, stdout);
-- fputs(
--" ated. RFC 1961 says in section 4.3/4.4 it should be protected,\n"
--" but the NEC reference implementation does not. The option\n"
--" --socks5-gssapi-nec allows the unprotected exchange of the pro-\n"
--" tection mode negotiation. (Added in 7.19.4).\n"
--"\n"
--" --stderr <file>\n"
--" Redirect all writes to stderr to the specified file instead. If\n"
--" the file name is a plain '-', it is instead written to stdout.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -t, --telnet-option <OPT=val>\n"
--" Pass options to the telnet protocol. Supported options are:\n"
--"\n"
--" TTYPE=<term> Sets the terminal type.\n"
--"\n"
--" XDISPLOC=<X display> Sets the X display location.\n"
--"\n"
--" NEW_ENV=<var,val> Sets an environment variable.\n"
--"\n"
--" -T, --upload-file <file>\n"
--" This transfers the specified local file to the remote URL. If\n"
--, stdout);
-- fputs(
--" there is no file part in the specified URL, Curl will append the\n"
--" local file name. NOTE that you must use a trailing / on the last\n"
--" directory to really prove to Curl that there is no file name or\n"
--" curl will think that your last directory name is the remote file\n"
--" name to use. That will most likely cause the upload operation to\n"
--" fail. If this is used on an HTTP(S) server, the PUT command will\n"
--" be used.\n"
--"\n"
--, stdout);
-- fputs(
--" Use the file name \"-\" (a single dash) to use stdin instead of a\n"
--" given file. Alternately, the file name \".\" (a single period)\n"
--" may be specified instead of \"-\" to use stdin in non-blocking\n"
--" mode to allow reading server output while stdin is being\n"
--" uploaded.\n"
--"\n"
--" You can specify one -T for each URL on the command line. Each -T\n"
--, stdout);
-- fputs(
--" + URL pair specifies what to upload and to where. curl also sup-\n"
--" ports \"globbing\" of the -T argument, meaning that you can upload\n"
--" multiple files to a single URL by using the same URL globbing\n"
--" style supported in the URL, like this:\n"
--"\n"
--" curl -T \"{file1,file2}\" http://www.uploadtothissite.com\n"
--"\n"
--" or even\n"
--"\n"
--" curl -T \"img[1-1000].png\" ftp://ftp.picturemania.com/upload/\n"
--"\n"
--" --tcp-nodelay\n"
--, stdout);
-- fputs(
--" Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man\n"
--" page for details about this option. (Added in 7.11.2)\n"
--"\n"
--" --tftp-blksize <value>\n"
--" (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
--" size that curl will try to use when transferring data to or from\n"
--" a TFTP server. By default 512 bytes will be used.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.20.0)\n"
--"\n"
--" --tlsauthtype <authtype>\n"
--" Set TLS authentication type. Currently, the only supported\n"
--" option is \"SRP\", for TLS-SRP (RFC 5054). If --tlsuser and\n"
--" --tlspassword are specified but --tlsauthtype is not, then this\n"
--" option defaults to \"SRP\". (Added in 7.21.4)\n"
--"\n"
--" --tlspassword <password>\n"
--" Set password for use with the TLS authentication method speci-\n"
--, stdout);
-- fputs(
--" fied with --tlsauthtype. Requires that --tlsuser also be set.\n"
--" (Added in 7.21.4)\n"
--"\n"
--" --tlsuser <user>\n"
--" Set username for use with the TLS authentication method speci-\n"
--" fied with --tlsauthtype. Requires that --tlspassword also be\n"
--" set. (Added in 7.21.4)\n"
--"\n"
--" --tlsv1.0\n"
--" (SSL) Forces curl to use TLS version 1.0 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tlsv1.1\n"
--, stdout);
-- fputs(
--" (SSL) Forces curl to use TLS version 1.1 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tlsv1.2\n"
--" (SSL) Forces curl to use TLS version 1.2 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tr-encoding\n"
--" (HTTP) Request a compressed Transfer-Encoding response using one\n"
--" of the algorithms curl supports, and uncompress the data while\n"
--" receiving it.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.21.6)\n"
--"\n"
--" --trace <file>\n"
--" Enables a full trace dump of all incoming and outgoing data,\n"
--" including descriptive information, to the given output file. Use\n"
--" \"-\" as filename to have the output sent to stdout.\n"
--"\n"
--" This option overrides previous uses of -v, --verbose or --trace-\n"
--" ascii.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --trace-ascii <file>\n"
--, stdout);
-- fputs(
--" Enables a full trace dump of all incoming and outgoing data,\n"
--" including descriptive information, to the given output file. Use\n"
--" \"-\" as filename to have the output sent to stdout.\n"
--"\n"
--" This is very similar to --trace, but leaves out the hex part and\n"
--" only shows the ASCII part of the dump. It makes smaller output\n"
--" that might be easier to read for untrained humans.\n"
--"\n"
--, stdout);
-- fputs(
--" This option overrides previous uses of -v, --verbose or --trace.\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --trace-time\n"
--" Prepends a time stamp to each trace or verbose line that curl\n"
--" displays. (Added in 7.14.0)\n"
--"\n"
--" -u, --user <user:password;options>\n"
--" Specify the user name, password and optional login options to\n"
--, stdout);
-- fputs(
--" use for server authentication. Overrides -n, --netrc and\n"
--" --netrc-optional.\n"
--"\n"
--" If you simply specify the user name, with or without the login\n"
--" options, curl will prompt for a password.\n"
--"\n"
--" If you use an SSPI-enabled curl binary and perform NTLM authen-\n"
--" tication, you can force curl to select the user name and pass-\n"
--" word from your environment by simply specifying a single colon\n"
--, stdout);
-- fputs(
--" with this option: \"-u :\" or by specifying the login options on\n"
--" their own, for example \"-u ;auth=NTLM\".\n"
--"\n"
--" You can use the optional login options part to specify protocol\n"
--" specific options that may be used during authentication. At\n"
--" present only IMAP, POP3 and SMTP support login options as part\n"
--" of the user login information. For more information about the\n"
--, stdout);
-- fputs(
--" login options please see RFC 2384, RFC 5092 and IETF draft\n"
--" draft-earhart-url-smtp-00.txt (Added in 7.31.0).\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -U, --proxy-user <user:password>\n"
--" Specify the user name and password to use for proxy authentica-\n"
--" tion.\n"
--"\n"
--" If you use an SSPI-enabled curl binary and do NTLM authentica-\n"
--, stdout);
-- fputs(
--" tion, you can force curl to pick up the user name and password\n"
--" from your environment by simply specifying a single colon with\n"
--" this option: \"-U :\".\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --url <URL>\n"
--" Specify a URL to fetch. This option is mostly handy when you\n"
--" want to specify URL(s) in a config file.\n"
--"\n"
--, stdout);
-- fputs(
--" This option may be used any number of times. To control where\n"
--" this URL is written, use the -o, --output or the -O, --remote-\n"
--" name options.\n"
--" -v, --verbose\n"
--" Makes the fetching more verbose/talkative. Mostly useful for\n"
--" debugging. A line starting with '>' means \"header data\" sent by\n"
--" curl, '<' means \"header data\" received by curl that is hidden in\n"
--, stdout);
-- fputs(
--" normal cases, and a line starting with '*' means additional info\n"
--" provided by curl.\n"
--"\n"
--" Note that if you only want HTTP headers in the output, -i,\n"
--" --include might be the option you're looking for.\n"
--"\n"
--" If you think this option still doesn't give you enough details,\n"
--" consider using --trace or --trace-ascii instead.\n"
--"\n"
--" This option overrides previous uses of --trace-ascii or --trace.\n"
--"\n"
--, stdout);
-- fputs(
--" Use -s, --silent to make curl quiet.\n"
--"\n"
--" -w, --write-out <format>\n"
--" Defines what to display on stdout after a completed and success-\n"
--" ful operation. The format is a string that may contain plain\n"
--" text mixed with any number of variables. The string can be spec-\n"
--" ified as \"string\", to get read from a particular file you spec-\n"
--" ify it \"@filename\" and to tell curl to read the format from\n"
--, stdout);
-- fputs(
--" stdin you write \"@-\".\n"
--"\n"
--" The variables present in the output format will be substituted\n"
--" by the value or text that curl thinks fit, as described below.\n"
--" All variables are specified as %{variable_name} and to output a\n"
--" normal % you just write them as %%. You can output a newline by\n"
--" using \\n, a carriage return with \\r and a tab space with \\t.\n"
--"\n"
--, stdout);
-- fputs(
--" NOTE: The %-symbol is a special symbol in the win32-environment,\n"
--" where all occurrences of % must be doubled when using this\n"
--" option.\n"
--"\n"
--" The variables available are:\n"
--"\n"
--" content_type The Content-Type of the requested document, if\n"
--" there was any.\n"
--"\n"
--" filename_effective\n"
--" The ultimate filename that curl writes out to.\n"
--, stdout);
-- fputs(
--" This is only meaningful if curl is told to write\n"
--" to a file with the --remote-name or --output\n"
--" option. It's most useful in combination with the\n"
--" --remote-header-name option. (Added in 7.25.1)\n"
--"\n"
--" ftp_entry_path The initial path curl ended up in when logging on\n"
--" to the remote FTP server. (Added in 7.15.4)\n"
--"\n"
--, stdout);
-- fputs(
--" http_code The numerical response code that was found in the\n"
--" last retrieved HTTP(S) or FTP(s) transfer. In\n"
--" 7.18.2 the alias response_code was added to show\n"
--" the same info.\n"
--"\n"
--" http_connect The numerical code that was found in the last\n"
--" response (from a proxy) to a curl CONNECT\n"
--" request. (Added in 7.12.4)\n"
--"\n"
--, stdout);
-- fputs(
--" local_ip The IP address of the local end of the most\n"
--" recently done connection - can be either IPv4 or\n"
--" IPv6 (Added in 7.29.0)\n"
--"\n"
--" local_port The local port number of the most recently done\n"
--" connection (Added in 7.29.0)\n"
--"\n"
--" num_connects Number of new connects made in the recent trans-\n"
--" fer. (Added in 7.12.3)\n"
--"\n"
--, stdout);
-- fputs(
--" num_redirects Number of redirects that were followed in the\n"
--" request. (Added in 7.12.3)\n"
--"\n"
--" redirect_url When an HTTP request was made without -L to fol-\n"
--" low redirects, this variable will show the actual\n"
--" URL a redirect would take you to. (Added in\n"
--" 7.18.2)\n"
--"\n"
--" remote_ip The remote IP address of the most recently done\n"
--, stdout);
-- fputs(
--" connection - can be either IPv4 or IPv6 (Added in\n"
--" 7.29.0)\n"
--"\n"
--" remote_port The remote port number of the most recently done\n"
--" connection (Added in 7.29.0)\n"
--"\n"
--" size_download The total amount of bytes that were downloaded.\n"
--"\n"
--" size_header The total amount of bytes of the downloaded head-\n"
--" ers.\n"
--"\n"
--, stdout);
-- fputs(
--" size_request The total amount of bytes that were sent in the\n"
--" HTTP request.\n"
--"\n"
--" size_upload The total amount of bytes that were uploaded.\n"
--"\n"
--" speed_download The average download speed that curl measured for\n"
--" the complete download. Bytes per second.\n"
--"\n"
--" speed_upload The average upload speed that curl measured for\n"
--" the complete upload. Bytes per second.\n"
--"\n"
--, stdout);
-- fputs(
--" ssl_verify_result\n"
--" The result of the SSL peer certificate verifica-\n"
--" tion that was requested. 0 means the verification\n"
--" was successful. (Added in 7.19.0)\n"
--"\n"
--" time_appconnect\n"
--" The time, in seconds, it took from the start\n"
--" until the SSL/SSH/etc connect/handshake to the\n"
--, stdout);
-- fputs(
--" remote host was completed. (Added in 7.19.0)\n"
--"\n"
--" time_connect The time, in seconds, it took from the start\n"
--" until the TCP connect to the remote host (or\n"
--" proxy) was completed.\n"
--"\n"
--" time_namelookup\n"
--" The time, in seconds, it took from the start\n"
--" until the name resolving was completed.\n"
--"\n"
--" time_pretransfer\n"
--, stdout);
-- fputs(
--" The time, in seconds, it took from the start\n"
--" until the file transfer was just about to begin.\n"
--" This includes all pre-transfer commands and nego-\n"
--" tiations that are specific to the particular pro-\n"
--" tocol(s) involved.\n"
--"\n"
--" time_redirect The time, in seconds, it took for all redirection\n"
--, stdout);
-- fputs(
--" steps include name lookup, connect, pretransfer\n"
--" and transfer before the final transaction was\n"
--" started. time_redirect shows the complete execu-\n"
--" tion time for multiple redirections. (Added in\n"
--" 7.12.3)\n"
--"\n"
--" time_starttransfer\n"
--" The time, in seconds, it took from the start\n"
--, stdout);
-- fputs(
--" until the first byte was just about to be trans-\n"
--" ferred. This includes time_pretransfer and also\n"
--" the time the server needed to calculate the\n"
--" result.\n"
--"\n"
--" time_total The total time, in seconds, that the full opera-\n"
--" tion lasted. The time will be displayed with mil-\n"
--" lisecond resolution.\n"
--"\n"
--, stdout);
-- fputs(
--" url_effective The URL that was fetched last. This is most mean-\n"
--" ingful if you've told curl to follow location:\n"
--" headers.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -x, --proxy <[protocol://][user:password@]proxyhost[:port]>\n"
--" Use the specified proxy.\n"
--"\n"
--" The proxy string can be specified with a protocol:// prefix to\n"
--, stdout);
-- fputs(
--" specify alternative proxy protocols. Use socks4://, socks4a://,\n"
--" socks5:// or socks5h:// to request the specific SOCKS version to\n"
--" be used. No protocol specified, http:// and all others will be\n"
--" treated as HTTP proxies. (The protocol support was added in curl\n"
--" 7.21.7)\n"
--"\n"
--" If the port number is not specified in the proxy string, it is\n"
--" assumed to be 1080.\n"
--"\n"
--, stdout);
-- fputs(
--" This option overrides existing environment variables that set\n"
--" the proxy to use. If there's an environment variable setting a\n"
--" proxy, you can set proxy to \"\" to override it.\n"
--"\n"
--" All operations that are performed over an HTTP proxy will trans-\n"
--" parently be converted to HTTP. It means that certain protocol\n"
--" specific operations might not be available. This is not the case\n"
--, stdout);
-- fputs(
--" if you can tunnel through the proxy, as one with the -p, --prox-\n"
--" ytunnel option.\n"
--"\n"
--" User and password that might be provided in the proxy string are\n"
--" URL decoded by curl. This allows you to pass in special charac-\n"
--" ters such as @ by using %40 or pass in a colon with %3a.\n"
--"\n"
--" The proxy host can be specified the exact same way as the proxy\n"
--" environment variables, including the protocol prefix (http://)\n"
--, stdout);
-- fputs(
--" and the embedded user + password.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -X, --request <command>\n"
--" (HTTP) Specifies a custom request method to use when communicat-\n"
--" ing with the HTTP server. The specified request will be used\n"
--" instead of the method otherwise used (which defaults to GET).\n"
--" Read the HTTP 1.1 specification for details and explanations.\n"
--, stdout);
-- fputs(
--" Common additional HTTP requests include PUT and DELETE, but\n"
--" related technologies like WebDAV offers PROPFIND, COPY, MOVE and\n"
--" more.\n"
--"\n"
--" Normally you don't need this option. All sorts of GET, HEAD,\n"
--" POST and PUT requests are rather invoked by using dedicated com-\n"
--" mand line options.\n"
--"\n"
--" This option only changes the actual word used in the HTTP\n"
--, stdout);
-- fputs(
--" request, it does not alter the way curl behaves. So for example\n"
--" if you want to make a proper HEAD request, using -X HEAD will\n"
--" not suffice. You need to use the -I, --head option.\n"
--"\n"
--" (FTP) Specifies a custom FTP command to use instead of LIST when\n"
--" doing file lists with FTP.\n"
--"\n"
--" (POP3) Specifies a custom POP3 command to use instead of LIST or\n"
--" RETR. (Added in 7.26.0)\n"
--"\n"
--, stdout);
-- fputs(
--" (IMAP) Specifies a custom IMAP command to use instead of LIST.\n"
--" (Added in 7.30.0)\n"
--"\n"
--" (SMTP) Specifies a custom SMTP command to use instead of HELP or\n"
--" VRFY. (Added in 7.34.0)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --xattr\n"
--" When saving output to a file, this option tells curl to store\n"
--" certain file metadata in extended file attributes. Currently,\n"
--, stdout);
-- fputs(
--" the URL is stored in the xdg.origin.url attribute and, for HTTP,\n"
--" the content type is stored in the mime_type attribute. If the\n"
--" file system does not support extended attributes, a warning is\n"
--" issued.\n"
--"\n"
--" -y, --speed-time <time>\n"
--" If a download is slower than speed-limit bytes per second during\n"
--" a speed-time period, the download gets aborted. If speed-time is\n"
--, stdout);
-- fputs(
--" used, the default speed-limit will be 1 unless set with -Y.\n"
--"\n"
--" This option controls transfers and thus will not affect slow\n"
--" connects etc. If this is a concern for you, try the --connect-\n"
--" timeout option.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -Y, --speed-limit <speed>\n"
--" If a download is slower than this given speed (in bytes per sec-\n"
--, stdout);
-- fputs(
--" ond) for speed-time seconds it gets aborted. speed-time is set\n"
--" with -y and is 30 if not set.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -z, --time-cond <date expression>|<file>\n"
--" (HTTP/FTP) Request a file that has been modified later than the\n"
--" given time and date, or one that has been modified before that\n"
--" time. The <date expression> can be all sorts of date strings or\n"
--, stdout);
-- fputs(
--" if it doesn't match any internal ones, it is taken as a filename\n"
--" and tries to get the modification date (mtime) from <file>\n"
--" instead. See the curl_getdate(3) man pages for date expression\n"
--" details.\n"
--"\n"
--" Start the date expression with a dash (-) to make it request for\n"
--" a document that is older than the given date/time, default is a\n"
--" document that is newer than the specified date/time.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -h, --help\n"
--" Usage help.\n"
--"\n"
--" -M, --manual\n"
--" Manual. Display the huge help text.\n"
--"\n"
--" -V, --version\n"
--" Displays information about curl and the libcurl version it uses.\n"
--" The first line includes the full version of curl, libcurl and\n"
--" other 3rd party libraries linked with the executable.\n"
--"\n"
--, stdout);
-- fputs(
--" The second line (starts with \"Protocols:\") shows all protocols\n"
--" that libcurl reports to support.\n"
--"\n"
--" The third line (starts with \"Features:\") shows specific features\n"
--" libcurl reports to offer. Available features include:\n"
--"\n"
--" IPv6 You can use IPv6 with this.\n"
--"\n"
--" krb4 Krb4 for FTP is supported.\n"
--"\n"
--" SSL HTTPS and FTPS are supported.\n"
--"\n"
--, stdout);
-- fputs(
--" libz Automatic decompression of compressed files over HTTP is\n"
--" supported.\n"
--"\n"
--" NTLM NTLM authentication is supported.\n"
--"\n"
--" GSS-Negotiate\n"
--" Negotiate authentication and krb5 for FTP is supported.\n"
--"\n"
--" Debug This curl uses a libcurl built with Debug. This enables\n"
--" more error-tracking and memory debugging etc. For curl-\n"
--" developers only!\n"
--"\n"
--" AsynchDNS\n"
--, stdout);
-- fputs(
--" This curl uses asynchronous name resolves.\n"
--"\n"
--" SPNEGO SPNEGO Negotiate authentication is supported.\n"
--"\n"
--" Largefile\n"
--" This curl supports transfers of large files, files larger\n"
--" than 2GB.\n"
--"\n"
--" IDN This curl supports IDN - international domain names.\n"
--"\n"
--" SSPI SSPI is supported. If you use NTLM and set a blank user\n"
--, stdout);
-- fputs(
--" name, curl will authenticate with your current user and\n"
--" password.\n"
--"\n"
--" TLS-SRP\n"
--" SRP (Secure Remote Password) authentication is supported\n"
--" for TLS.\n"
--" Metalink\n"
--" This curl supports Metalink (both version 3 and 4 (RFC\n"
--" 5854)), which describes mirrors and hashes. curl will\n"
--, stdout);
-- fputs(
--" use mirrors for failover if there are errors (such as the\n"
--" file or server not being available).\n"
--"\n"
--"FILES\n"
--" ~/.curlrc\n"
--" Default config file, see -K, --config for details.\n"
--"\n"
--"ENVIRONMENT\n"
--" The environment variables can be specified in lower case or upper case.\n"
--" The lower case version has precedence. http_proxy is an exception as it\n"
--" is only available in lower case.\n"
--"\n"
--, stdout);
-- fputs(
--" Using an environment variable to set the proxy has the same effect as\n"
--" using the --proxy option.\n"
--"\n"
--" http_proxy [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for HTTP.\n"
--" HTTPS_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for HTTPS.\n"
--"\n"
--" [url-protocol]_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for [url-protocol], where the pro-\n"
--, stdout);
-- fputs(
--" tocol is a protocol that curl supports and as specified in a\n"
--" URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.\n"
--"\n"
--" ALL_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use if no protocol-specific proxy is\n"
--" set.\n"
--"\n"
--" NO_PROXY <comma-separated list of hosts>\n"
--" list of host names that shouldn't go through any proxy. If set\n"
--" to a asterisk '*' only, it matches all hosts.\n"
--"\n"
--"PROXY PROTOCOL PREFIXES\n"
--, stdout);
-- fputs(
--" Since curl version 7.21.7, the proxy string may be specified with a\n"
--" protocol:// prefix to specify alternative proxy protocols.\n"
--"\n"
--" If no protocol is specified in the proxy string or if the string\n"
--" doesn't match a supported one, the proxy will be treated as an HTTP\n"
--" proxy.\n"
--"\n"
--" The supported proxy protocol prefixes are as follows:\n"
--"\n"
--" socks4://\n"
--" Makes it the equivalent of --socks4\n"
--"\n"
--" socks4a://\n"
--, stdout);
-- fputs(
--" Makes it the equivalent of --socks4a\n"
--"\n"
--" socks5://\n"
--" Makes it the equivalent of --socks5\n"
--"\n"
--" socks5h://\n"
--" Makes it the equivalent of --socks5-hostname\n"
--"\n"
--"EXIT CODES\n"
--" There are a bunch of different error codes and their corresponding\n"
--" error messages that may appear during bad conditions. At the time of\n"
--" this writing, the exit codes are:\n"
--"\n"
--" 1 Unsupported protocol. This build of curl has no support for this\n"
--, stdout);
-- fputs(
--" protocol.\n"
--"\n"
--" 2 Failed to initialize.\n"
--"\n"
--" 3 URL malformed. The syntax was not correct.\n"
--"\n"
--" 4 A feature or option that was needed to perform the desired\n"
--" request was not enabled or was explicitly disabled at build-\n"
--" time. To make curl able to do this, you probably need another\n"
--" build of libcurl!\n"
--"\n"
--" 5 Couldn't resolve proxy. The given proxy host could not be\n"
--" resolved.\n"
--"\n"
--, stdout);
-- fputs(
--" 6 Couldn't resolve host. The given remote host was not resolved.\n"
--"\n"
--" 7 Failed to connect to host.\n"
--"\n"
--" 8 FTP weird server reply. The server sent data curl couldn't\n"
--" parse.\n"
--"\n"
--" 9 FTP access denied. The server denied login or denied access to\n"
--" the particular resource or directory you wanted to reach. Most\n"
--" often you tried to change to a directory that doesn't exist on\n"
--" the server.\n"
--"\n"
--, stdout);
-- fputs(
--" 11 FTP weird PASS reply. Curl couldn't parse the reply sent to the\n"
--" PASS request.\n"
--"\n"
--" 13 FTP weird PASV reply, Curl couldn't parse the reply sent to the\n"
--" PASV request.\n"
--"\n"
--" 14 FTP weird 227 format. Curl couldn't parse the 227-line the\n"
--" server sent.\n"
--"\n"
--" 15 FTP can't get host. Couldn't resolve the host IP we got in the\n"
--" 227-line.\n"
--"\n"
--, stdout);
-- fputs(
--" 17 FTP couldn't set binary. Couldn't change transfer method to\n"
--" binary.\n"
--"\n"
--" 18 Partial file. Only a part of the file was transferred.\n"
--"\n"
--" 19 FTP couldn't download/access the given file, the RETR (or simi-\n"
--" lar) command failed.\n"
--"\n"
--" 21 FTP quote error. A quote command returned error from the server.\n"
--" 22 HTTP page not retrieved. The requested url was not found or\n"
--, stdout);
-- fputs(
--" returned another error with the HTTP error code being 400 or\n"
--" above. This return code only appears if -f, --fail is used.\n"
--"\n"
--" 23 Write error. Curl couldn't write data to a local filesystem or\n"
--" similar.\n"
--"\n"
--" 25 FTP couldn't STOR file. The server denied the STOR operation,\n"
--" used for FTP uploading.\n"
--"\n"
--" 26 Read error. Various reading problems.\n"
--"\n"
--" 27 Out of memory. A memory allocation request failed.\n"
--"\n"
--, stdout);
-- fputs(
--" 28 Operation timeout. The specified time-out period was reached\n"
--" according to the conditions.\n"
--"\n"
--" 30 FTP PORT failed. The PORT command failed. Not all FTP servers\n"
--" support the PORT command, try doing a transfer using PASV\n"
--" instead!\n"
--"\n"
--" 31 FTP couldn't use REST. The REST command failed. This command is\n"
--" used for resumed FTP transfers.\n"
--"\n"
--" 33 HTTP range error. The range \"command\" didn't work.\n"
--"\n"
--, stdout);
-- fputs(
--" 34 HTTP post error. Internal post-request generation error.\n"
--"\n"
--" 35 SSL connect error. The SSL handshaking failed.\n"
--"\n"
--" 36 FTP bad download resume. Couldn't continue an earlier aborted\n"
--" download.\n"
--"\n"
--" 37 FILE couldn't read file. Failed to open the file. Permissions?\n"
--"\n"
--" 38 LDAP cannot bind. LDAP bind operation failed.\n"
--"\n"
--" 39 LDAP search failed.\n"
--"\n"
--" 41 Function not found. A required LDAP function was not found.\n"
--"\n"
--, stdout);
-- fputs(
--" 42 Aborted by callback. An application told curl to abort the oper-\n"
--" ation.\n"
--"\n"
--" 43 Internal error. A function was called with a bad parameter.\n"
--"\n"
--" 45 Interface error. A specified outgoing interface could not be\n"
--" used.\n"
--"\n"
--" 47 Too many redirects. When following redirects, curl hit the maxi-\n"
--" mum amount.\n"
--"\n"
--" 48 Unknown option specified to libcurl. This indicates that you\n"
--, stdout);
-- fputs(
--" passed a weird option to curl that was passed on to libcurl and\n"
--" rejected. Read up in the manual!\n"
--"\n"
--" 49 Malformed telnet option.\n"
--"\n"
--" 51 The peer's SSL certificate or SSH MD5 fingerprint was not OK.\n"
--"\n"
--" 52 The server didn't reply anything, which here is considered an\n"
--" error.\n"
--"\n"
--" 53 SSL crypto engine not found.\n"
--"\n"
--" 54 Cannot set SSL crypto engine as default.\n"
--"\n"
--" 55 Failed sending network data.\n"
--"\n"
--, stdout);
-- fputs(
--" 56 Failure in receiving network data.\n"
--"\n"
--" 58 Problem with the local certificate.\n"
--"\n"
--" 59 Couldn't use specified SSL cipher.\n"
--"\n"
--" 60 Peer certificate cannot be authenticated with known CA certifi-\n"
--" cates.\n"
--"\n"
--" 61 Unrecognized transfer encoding.\n"
--"\n"
--" 62 Invalid LDAP URL.\n"
--"\n"
--" 63 Maximum file size exceeded.\n"
--"\n"
--" 64 Requested FTP SSL level failed.\n"
--"\n"
--" 65 Sending the data requires a rewind that failed.\n"
--"\n"
--, stdout);
-- fputs(
--" 66 Failed to initialise SSL Engine.\n"
--"\n"
--" 67 The user name, password, or similar was not accepted and curl\n"
--" failed to log in.\n"
--"\n"
--" 68 File not found on TFTP server.\n"
--"\n"
--" 69 Permission problem on TFTP server.\n"
--"\n"
--" 70 Out of disk space on TFTP server.\n"
--"\n"
--" 71 Illegal TFTP operation.\n"
--"\n"
--" 72 Unknown TFTP transfer ID.\n"
--"\n"
--" 73 File already exists (TFTP).\n"
--"\n"
--" 74 No such user (TFTP).\n"
--"\n"
--, stdout);
-- fputs(
--" 75 Character conversion failed.\n"
--"\n"
--" 76 Character conversion functions required.\n"
--"\n"
--" 77 Problem with reading the SSL CA cert (path? access rights?).\n"
--"\n"
--" 78 The resource referenced in the URL does not exist.\n"
--"\n"
--" 79 An unspecified error occurred during the SSH session.\n"
--"\n"
--" 80 Failed to shut down the SSL connection.\n"
--"\n"
--" 82 Could not load CRL file, missing or wrong format (added in\n"
--" 7.19.0).\n"
--"\n"
--, stdout);
-- fputs(
--" 83 Issuer check failed (added in 7.19.0).\n"
--"\n"
--" 84 The FTP PRET command failed\n"
--"\n"
--" 85 RTSP: mismatch of CSeq numbers\n"
--"\n"
--" 86 RTSP: mismatch of Session Identifiers\n"
--"\n"
--" 87 unable to parse FTP file list\n"
--"\n"
--" 88 FTP chunk callback reported error\n"
--"\n"
--" 89 No connection available, the session will be queued\n"
--"\n"
--" XX More error codes will appear here in future releases. The exist-\n"
--" ing ones are meant to never change.\n"
--"\n"
--, stdout);
-- fputs(
--"AUTHORS / CONTRIBUTORS\n"
--" Daniel Stenberg is the main author, but the whole list of contributors\n"
--" is found in the separate THANKS file.\n"
--"\n"
--"WWW\n"
--" http://curl.haxx.se\n"
--"\n"
--"FTP\n"
--" ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
--"\n"
--"SEE ALSO\n"
--" ftp(1), wget(1)\n"
--"\n"
--"LATEST VERSION\n"
--"\n"
--" You always find news about what's going on as well as the latest versions\n"
--" from the curl web pages, located at:\n"
--"\n"
--" http://curl.haxx.se\n"
--"\n"
--"SIMPLE USAGE\n"
--"\n"
--" Get the main page from Netscape's web-server:\n"
--"\n"
--, stdout);
-- fputs(
--" curl http://www.netscape.com/\n"
--"\n"
--" Get the README file the user's home directory at funet's ftp-server:\n"
--"\n"
--" curl ftp://ftp.funet.fi/README\n"
--"\n"
--" Get a web page from a server using port 8000:\n"
--"\n"
--" curl http://www.weirdserver.com:8000/\n"
--"\n"
--" Get a directory listing of an FTP site:\n"
--"\n"
--" curl ftp://cool.haxx.se/\n"
--"\n"
--" Get the definition of curl from a dictionary:\n"
--"\n"
--" curl dict://dict.org/m:curl\n"
--"\n"
--" Fetch two documents at once:\n"
--"\n"
--, stdout);
-- fputs(
--" curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n"
--"\n"
--" Get a file off an FTPS server:\n"
--"\n"
--" curl ftps://files.are.secure.com/secrets.txt\n"
--"\n"
--" or use the more appropriate FTPS way to get the same file:\n"
--"\n"
--" curl --ftp-ssl ftp://files.are.secure.com/secrets.txt\n"
--"\n"
--" Get a file from an SSH server using SFTP:\n"
--"\n"
--" curl -u username sftp://shell.example.com/etc/issue\n"
--"\n"
--" Get a file from an SSH server using SCP using a private key to authenticate:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \\\n"
--" scp://shell.example.com/~/personal.txt\n"
--"\n"
--" Get the main page from an IPv6 web server:\n"
--"\n"
--" curl -g \"http://[2001:1890:1112:1::20]/\"\n"
--"\n"
--"DOWNLOAD TO A FILE\n"
--"\n"
--" Get a web page and store in a local file with a specific name:\n"
--"\n"
--" curl -o thatpage.html http://www.netscape.com/\n"
--"\n"
--" Get a web page and store in a local file, make the local file get the name\n"
--, stdout);
-- fputs(
--" of the remote document (if no file name part is specified in the URL, this\n"
--" will fail):\n"
--"\n"
--" curl -O http://www.netscape.com/index.html\n"
--"\n"
--" Fetch two files and store them with their remote names:\n"
--"\n"
--" curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n"
--"\n"
--"USING PASSWORDS\n"
--"\n"
--" FTP\n"
--"\n"
--" To ftp files using name+passwd, include them in the URL like:\n"
--"\n"
--" curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
--"\n"
--" or specify them with the -u flag like\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n"
--"\n"
--" FTPS\n"
--"\n"
--" It is just like for FTP, but you may also want to specify and use\n"
--" SSL-specific options for certificates etc.\n"
--"\n"
--" Note that using FTPS:// as prefix is the \"implicit\" way as described in the\n"
--" standards while the recommended \"explicit\" way is done by using FTP:// and\n"
--" the --ftp-ssl option.\n"
--"\n"
--" SFTP / SCP\n"
--"\n"
--" This is similar to FTP, but you can specify a private key to use instead of\n"
--, stdout);
-- fputs(
--" a password. Note that the private key may itself be protected by a password\n"
--" that is unrelated to the login password of the remote system. If you\n"
--" provide a private key file you must also provide a public key file.\n"
--"\n"
--" HTTP\n"
--"\n"
--" Curl also supports user and password in HTTP URLs, thus you can pick a file\n"
--" like:\n"
--"\n"
--" curl http://name:passwd@machine.domain/full/path/to/file\n"
--"\n"
--" or specify user and password separately like in\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u name:passwd http://machine.domain/full/path/to/file\n"
--"\n"
--" HTTP offers many different methods of authentication and curl supports\n"
--" several: Basic, Digest, NTLM and Negotiate. Without telling which method to\n"
--" use, curl defaults to Basic. You can also ask curl to pick the most secure\n"
--" ones out of the ones that the server accepts for the given URL, by using\n"
--" --anyauth.\n"
--"\n"
--" NOTE! According to the URL specification, HTTP URLs can not contain a user\n"
--, stdout);
-- fputs(
--" and password, so that style will not work when using curl via a proxy, even\n"
--" though curl allows it at other times. When using a proxy, you _must_ use\n"
--" the -u style for user and password.\n"
--"\n"
--" HTTPS\n"
--"\n"
--" Probably most commonly used with private certificates, as explained below.\n"
--"\n"
--"PROXY\n"
--"\n"
--" curl supports both HTTP and SOCKS proxy servers, with optional authentication.\n"
--" It does not have special support for FTP proxy servers since there are no\n"
--, stdout);
-- fputs(
--" standards for those, but it can still be made to work with many of them. You\n"
--" can also use both HTTP and SOCKS proxies to transfer files to and from FTP\n"
--" servers.\n"
--"\n"
--" Get an ftp file using an HTTP proxy named my-proxy that uses port 888:\n"
--"\n"
--" curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n"
--"\n"
--" Get a file from an HTTP server that requires user and password, using the\n"
--" same proxy as above:\n"
--"\n"
--" curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
--"\n"
--, stdout);
-- fputs(
--" Some proxies require special authentication. Specify by using -U as above:\n"
--"\n"
--" curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
--"\n"
--" A comma-separated list of hosts and domains which do not use the proxy can\n"
--" be specified as:\n"
--"\n"
--" curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/\n"
--"\n"
--" If the proxy is specified with --proxy1.0 instead of --proxy or -x, then\n"
--" curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.\n"
--"\n"
--, stdout);
-- fputs(
--" curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.\n"
--"\n"
--" See also the environment variables Curl supports that offer further proxy\n"
--" control.\n"
--"\n"
--" Most FTP proxy servers are set up to appear as a normal FTP server from the\n"
--" client's perspective, with special commands to select the remote FTP server.\n"
--" curl supports the -u, -Q and --ftp-account options that can be used to\n"
--" set up transfers through many FTP proxies. For example, a file can be\n"
--, stdout);
-- fputs(
--" uploaded to a remote FTP server using a Blue Coat FTP proxy with the\n"
--" options:\n"
--"\n"
--" curl -u \"Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass\" \\\n"
--" --ftp-account Proxy-Password --upload-file local-file \\\n"
--" ftp://my-ftp.proxy.server:21/remote/upload/path/\n"
--"\n"
--" See the manual for your FTP proxy to determine the form it expects to set up\n"
--" transfers, and curl's -v option to see exactly what curl is sending.\n"
--"\n"
--"RANGES\n"
--"\n"
--" HTTP 1.1 introduced byte-ranges. Using this, a client can request\n"
--, stdout);
-- fputs(
--" to get only one or more subparts of a specified document. Curl supports\n"
--" this with the -r flag.\n"
--"\n"
--" Get the first 100 bytes of a document:\n"
--"\n"
--" curl -r 0-99 http://www.get.this/\n"
--"\n"
--" Get the last 500 bytes of a document:\n"
--"\n"
--" curl -r -500 http://www.get.this/\n"
--"\n"
--" Curl also supports simple ranges for FTP files as well. Then you can only\n"
--" specify start and stop position.\n"
--"\n"
--" Get the first 100 bytes of a document using FTP:\n"
--"\n"
--" curl -r 0-99 ftp://www.get.this/README\n"
--"\n"
--"UPLOADING\n"
--"\n"
--, stdout);
-- fputs(
--" FTP / FTPS / SFTP / SCP\n"
--"\n"
--" Upload all data on stdin to a specified server:\n"
--"\n"
--" curl -T - ftp://ftp.upload.com/myfile\n"
--"\n"
--" Upload data from a specified file, login with user and password:\n"
--"\n"
--" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n"
--"\n"
--" Upload a local file to the remote site, and use the local file name at the remote\n"
--" site too:\n"
--"\n"
--" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n"
--"\n"
--" Upload a local file to get appended to the remote file:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -T localfile -a ftp://ftp.upload.com/remotefile\n"
--"\n"
--" Curl also supports ftp upload through a proxy, but only if the proxy is\n"
--" configured to allow that kind of tunneling. If it does, you can run curl in\n"
--" a fashion similar to:\n"
--"\n"
--" curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n"
--"\n"
--" HTTP\n"
--"\n"
--" Upload all data on stdin to a specified HTTP site:\n"
--"\n"
--" curl -T - http://www.upload.com/myfile\n"
--"\n"
--" Note that the HTTP server must have been configured to accept PUT before\n"
--, stdout);
-- fputs(
--" this can be done successfully.\n"
--"\n"
--" For other ways to do HTTP data upload, see the POST section below.\n"
--"\n"
--"VERBOSE / DEBUG\n"
--"\n"
--" If curl fails where it isn't supposed to, if the servers don't let you in,\n"
--" if you can't understand the responses: use the -v flag to get verbose\n"
--" fetching. Curl will output lots of info and what it sends and receives in\n"
--" order to let the user see all client-server interaction (but it won't show\n"
--" you the actual data).\n"
--"\n"
--" curl -v ftp://ftp.upload.com/\n"
--"\n"
--, stdout);
-- fputs(
--" To get even more details and information on what curl does, try using the\n"
--" --trace or --trace-ascii options with a given file name to log to, like\n"
--" this:\n"
--"\n"
--" curl --trace trace.txt www.haxx.se\n"
--"\n"
--"\n"
--"DETAILED INFORMATION\n"
--"\n"
--" Different protocols provide different ways of getting detailed information\n"
--" about specific files/documents. To get curl to show detailed information\n"
--" about a single file, you should use -I/--head option. It displays all\n"
--, stdout);
-- fputs(
--" available info on a single file for HTTP and FTP. The HTTP information is a\n"
--" lot more extensive.\n"
--"\n"
--" For HTTP, you can get the header information (the same as -I would show)\n"
--" shown before the data by using -i/--include. Curl understands the\n"
--" -D/--dump-header option when getting files from both FTP and HTTP, and it\n"
--" will then store the headers in the specified file.\n"
--"\n"
--" Store the HTTP headers in a separate file (headers.txt in the example):\n"
--"\n"
--, stdout);
-- fputs(
--" curl --dump-header headers.txt curl.haxx.se\n"
--"\n"
--" Note that headers stored in a separate file can be very useful at a later\n"
--" time if you want curl to use cookies sent by the server. More about that in\n"
--" the cookies section.\n"
--"\n"
--"POST (HTTP)\n"
--"\n"
--" It's easy to post data using curl. This is done using the -d <data>\n"
--" option. The post data must be urlencoded.\n"
--"\n"
--" Post a simple \"name\" and \"phone\" guestbook.\n"
--"\n"
--" curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n"
--, stdout);
-- fputs(
--" http://www.where.com/guest.cgi\n"
--"\n"
--" How to post a form with curl, lesson #1:\n"
--"\n"
--" Dig out all the <input> tags in the form that you want to fill in. (There's\n"
--" a perl program called formfind.pl on the curl site that helps with this).\n"
--"\n"
--" If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n"
--" string\", which is in the format\n"
--"\n"
--" <variable1>=<data1>&<variable2>=<data2>&...\n"
--"\n"
--" The 'variable' names are the names set with \"name=\" in the <input> tags, and\n"
--, stdout);
-- fputs(
--" the data is the contents you want to fill in for the inputs. The data *must*\n"
--" be properly URL encoded. That means you replace space with + and that you\n"
--" replace weird letters with %XX where XX is the hexadecimal representation of\n"
--" the letter's ASCII code.\n"
--"\n"
--" Example:\n"
--"\n"
--" (page located at http://www.formpost.com/getthis/\n"
--"\n"
--" <form action=\"post.cgi\" method=\"post\">\n"
--" <input name=user size=10>\n"
--" <input name=pass type=password size=10>\n"
--, stdout);
-- fputs(
--" <input name=id type=hidden value=\"blablabla\">\n"
--" <input name=ding value=\"submit\">\n"
--" </form>\n"
--"\n"
--" We want to enter user 'foobar' with password '12345'.\n"
--"\n"
--" To post to this, you enter a curl command line like:\n"
--"\n"
--" curl -d \"user=foobar&pass=12345&id=blablabla&ding=submit\" (continues)\n"
--" http://www.formpost.com/getthis/post.cgi\n"
--"\n"
--"\n"
--" While -d uses the application/x-www-form-urlencoded mime-type, generally\n"
--, stdout);
-- fputs(
--" understood by CGI's and similar, curl also supports the more capable\n"
--" multipart/form-data type. This latter type supports things like file upload.\n"
--"\n"
--" -F accepts parameters like -F \"name=contents\". If you want the contents to\n"
--" be read from a file, use <@filename> as contents. When specifying a file,\n"
--" you can also specify the file content type by appending ';type=<mime type>'\n"
--" to the file name. You can also post the contents of several files in one\n"
--, stdout);
-- fputs(
--" field. For example, the field name 'coolfiles' is used to send three files,\n"
--" with different content types using the following syntax:\n"
--"\n"
--" curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n"
--" http://www.post.com/postit.cgi\n"
--"\n"
--" If the content-type is not specified, curl will try to guess from the file\n"
--" extension (it only knows a few), or use the previously specified type (from\n"
--" an earlier file if several files are specified in a list) or else it will\n"
--, stdout);
-- fputs(
--" use the default type 'application/octet-stream'.\n"
--"\n"
--" Emulate a fill-in form with -F. Let's say you fill in three fields in a\n"
--" form. One field is a file name which to post, one field is your name and one\n"
--" field is a file description. We want to post the file we have written named\n"
--" \"cooltext.txt\". To let curl do the posting of this data instead of your\n"
--" favourite browser, you have to read the HTML source of the form page and\n"
--, stdout);
-- fputs(
--" find the names of the input fields. In our example, the input field names\n"
--" are 'file', 'yourname' and 'filedescription'.\n"
--"\n"
--" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
--" -F \"filedescription=Cool text file with cool text inside\" \\\n"
--" http://www.post.com/postit.cgi\n"
--"\n"
--" To send two files in one post you can do it in two ways:\n"
--"\n"
--" 1. Send multiple files in a single \"field\" with a single field name:\n"
--"\n"
--" curl -F \"pictures=@dog.gif,cat.gif\"\n"
--"\n"
--, stdout);
-- fputs(
--" 2. Send two fields with two field names:\n"
--"\n"
--" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
--"\n"
--" To send a field value literally without interpreting a leading '@'\n"
--" or '<', or an embedded ';type=', use --form-string instead of\n"
--" -F. This is recommended when the value is obtained from a user or\n"
--" some other unpredictable source. Under these circumstances, using\n"
--" -F instead of --form-string would allow a user to trick curl into\n"
--" uploading a file.\n"
--"\n"
--"REFERRER\n"
--"\n"
--, stdout);
-- fputs(
--" An HTTP request has the option to include information about which address\n"
--" referred it to the actual page. Curl allows you to specify the\n"
--" referrer to be used on the command line. It is especially useful to\n"
--" fool or trick stupid servers or CGI scripts that rely on that information\n"
--" being available or contain certain data.\n"
--"\n"
--" curl -e www.coolsite.com http://www.showme.com/\n"
--"\n"
--" NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.\n"
--"\n"
--"USER AGENT\n"
--"\n"
--, stdout);
-- fputs(
--" An HTTP request has the option to include information about the browser\n"
--" that generated the request. Curl allows it to be specified on the command\n"
--" line. It is especially useful to fool or trick stupid servers or CGI\n"
--" scripts that only accept certain browsers.\n"
--"\n"
--" Example:\n"
--"\n"
--" curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n"
--"\n"
--" Other common strings:\n"
--" 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95\n"
--, stdout);
-- fputs(
--" 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95\n"
--" 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2\n"
--" 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX\n"
--" 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux\n"
--"\n"
--" Note that Internet Explorer tries hard to be compatible in every way:\n"
--" 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95\n"
--"\n"
--" Mozilla is not the only possible User-Agent name:\n"
--, stdout);
-- fputs(
--" 'Konqueror/1.0' KDE File Manager desktop client\n"
--" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
--"\n"
--"COOKIES\n"
--"\n"
--" Cookies are generally used by web servers to keep state information at the\n"
--" client's side. The server sets cookies by sending a response line in the\n"
--" headers that looks like 'Set-Cookie: <data>' where the data part then\n"
--" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
--, stdout);
-- fputs(
--" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
--" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
--" cookie should expire (\"expire=DATE\"), for what domain to use it\n"
--" (\"domain=NAME\") and if it should be used on secure connections only\n"
--" (\"secure\").\n"
--"\n"
--" If you've received a page from a server that contains a header like:\n"
--" Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
--"\n"
--, stdout);
-- fputs(
--" it means the server wants that first pair passed on when we get anything in\n"
--" a path beginning with \"/foo\".\n"
--"\n"
--" Example, get a page that wants my name passed in a cookie:\n"
--"\n"
--" curl -b \"name=Daniel\" www.sillypage.com\n"
--"\n"
--" Curl also has the ability to use previously received cookies in following\n"
--" sessions. If you get cookies from a server and store them in a file in a\n"
--" manner similar to:\n"
--"\n"
--" curl --dump-header headers www.example.com\n"
--"\n"
--, stdout);
-- fputs(
--" ... you can then in a second connect to that (or another) site, use the\n"
--" cookies from the 'headers' file like:\n"
--"\n"
--" curl -b headers www.example.com\n"
--"\n"
--" While saving headers to a file is a working way to store cookies, it is\n"
--" however error-prone and not the preferred way to do this. Instead, make curl\n"
--" save the incoming cookies using the well-known netscape cookie format like\n"
--" this:\n"
--"\n"
--" curl -c cookies.txt www.example.com\n"
--"\n"
--, stdout);
-- fputs(
--" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
--" you can make curl follow a location: (which often is used in combination\n"
--" with cookies). So that if a site sends cookies and a location, you can\n"
--" use a non-existing file to trigger the cookie awareness like:\n"
--"\n"
--" curl -L -b empty.txt www.example.com\n"
--"\n"
--" The file to read cookies from must be formatted using plain HTTP headers OR\n"
--" as netscape's cookie file. Curl will determine what kind it is based on the\n"
--, stdout);
-- fputs(
--" file contents. In the above command, curl will parse the header and store\n"
--" the cookies received from www.example.com. curl will send to the server the\n"
--" stored cookies which match the request as it follows the location. The\n"
--" file \"empty.txt\" may be a nonexistent file.\n"
--"\n"
--" Alas, to both read and write cookies from a netscape cookie file, you can\n"
--" set both -b and -c to use the same file:\n"
--"\n"
--" curl -b cookies.txt -c cookies.txt www.example.com\n"
--"\n"
--"PROGRESS METER\n"
--"\n"
--, stdout);
-- fputs(
--" The progress meter exists to show a user that something actually is\n"
--" happening. The different fields in the output have the following meaning:\n"
--"\n"
--" % Total % Received % Xferd Average Speed Time Curr.\n"
--" Dload Upload Total Current Left Speed\n"
--" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287\n"
--"\n"
--" From left-to-right:\n"
--" % - percentage completed of the whole transfer\n"
--, stdout);
-- fputs(
--" Total - total size of the whole expected transfer\n"
--" % - percentage completed of the download\n"
--" Received - currently downloaded amount of bytes\n"
--" % - percentage completed of the upload\n"
--" Xferd - currently uploaded amount of bytes\n"
--" Average Speed\n"
--" Dload - the average transfer speed of the download\n"
--" Average Speed\n"
--" Upload - the average transfer speed of the upload\n"
--" Time Total - expected time to complete the operation\n"
--, stdout);
-- fputs(
--" Time Current - time passed since the invoke\n"
--" Time Left - expected time left to completion\n"
--" Curr.Speed - the average transfer speed the last 5 seconds (the first\n"
--" 5 seconds of a transfer is based on less time of course.)\n"
--"\n"
--" The -# option will display a totally different progress bar that doesn't\n"
--" need much explanation!\n"
--"\n"
--"SPEED LIMIT\n"
--"\n"
--" Curl allows the user to set the transfer speed conditions that must be met\n"
--, stdout);
-- fputs(
--" to let the transfer keep going. By using the switch -y and -Y you\n"
--" can make curl abort transfers if the transfer speed is below the specified\n"
--" lowest limit for a specified time.\n"
--"\n"
--" To have curl abort the download if the speed is slower than 3000 bytes per\n"
--" second for 1 minute, run:\n"
--"\n"
--" curl -Y 3000 -y 60 www.far-away-site.com\n"
--"\n"
--" This can very well be used in combination with the overall time limit, so\n"
--" that the above operation must be completed in whole within 30 minutes:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n"
--"\n"
--" Forcing curl not to transfer data faster than a given rate is also possible,\n"
--" which might be useful if you're using a limited bandwidth connection and you\n"
--" don't want your transfer to use all of it (sometimes referred to as\n"
--" \"bandwidth throttle\").\n"
--"\n"
--" Make curl transfer data no faster than 10 kilobytes per second:\n"
--"\n"
--" curl --limit-rate 10K www.far-away-site.com\n"
--"\n"
--" or\n"
--"\n"
--" curl --limit-rate 10240 www.far-away-site.com\n"
--"\n"
--, stdout);
-- fputs(
--" Or prevent curl from uploading data faster than 1 megabyte per second:\n"
--"\n"
--" curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n"
--"\n"
--" When using the --limit-rate option, the transfer rate is regulated on a\n"
--" per-second basis, which will cause the total transfer speed to become lower\n"
--" than the given number. Sometimes of course substantially lower, if your\n"
--" transfer stalls during periods.\n"
--"\n"
--"CONFIG FILE\n"
--"\n"
--" Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
--, stdout);
-- fputs(
--" systems) from the user's home dir on startup.\n"
--"\n"
--" The config file could be made up with normal command line switches, but you\n"
--" can also specify the long options without the dashes to make it more\n"
--" readable. You can separate the options and the parameter with spaces, or\n"
--" with = or :. Comments can be used within the file. If the first letter on a\n"
--" line is a '#'-symbol the rest of the line is treated as a comment.\n"
--"\n"
--" If you want the parameter to contain spaces, you must enclose the entire\n"
--, stdout);
-- fputs(
--" parameter within double quotes (\"). Within those quotes, you specify a\n"
--" quote as \\\".\n"
--"\n"
--" NOTE: You must specify options and their arguments on the same line.\n"
--"\n"
--" Example, set default time out and proxy in a config file:\n"
--"\n"
--" # We want a 30 minute timeout:\n"
--" -m 1800\n"
--" # ... and we use a proxy for all accesses:\n"
--" proxy = proxy.our.domain.com:8080\n"
--"\n"
--" White spaces ARE significant at the end of lines, but all white spaces\n"
--, stdout);
-- fputs(
--" leading up to the first characters of each line are ignored.\n"
--"\n"
--" Prevent curl from reading the default file by using -q as the first command\n"
--" line parameter, like:\n"
--"\n"
--" curl -q www.thatsite.com\n"
--"\n"
--" Force curl to get and display a local help page in case it is invoked\n"
--" without URL by making a config file similar to:\n"
--"\n"
--" # default url to get\n"
--" url = \"http://help.with.curl.com/curlhelp.html\"\n"
--"\n"
--" You can specify another config file to be read by using the -K/--config\n"
--, stdout);
-- fputs(
--" flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
--" which can be handy if you want to hide options from being visible in process\n"
--" tables etc:\n"
--"\n"
--" echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n"
--"\n"
--"EXTRA HEADERS\n"
--"\n"
--" When using curl in your own very special programs, you may end up needing\n"
--" to pass on your own custom headers when getting a web page. You can do\n"
--" this by using the -H flag.\n"
--"\n"
--, stdout);
-- fputs(
--" Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
--" page:\n"
--"\n"
--" curl -H \"X-you-and-me: yes\" www.love.com\n"
--"\n"
--" This can also be useful in case you want curl to send a different text in a\n"
--" header than it normally does. The -H header you specify then replaces the\n"
--" header curl would normally send. If you replace an internal header with an\n"
--" empty one, you prevent that header from being sent. To prevent the Host:\n"
--" header from being used:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -H \"Host:\" www.server.com\n"
--"\n"
--"FTP and PATH NAMES\n"
--"\n"
--" Do note that when getting files with the ftp:// URL, the given path is\n"
--" relative the directory you enter. To get the file 'README' from your home\n"
--" directory at your ftp site, do:\n"
--"\n"
--" curl ftp://user:passwd@my.site.com/README\n"
--"\n"
--" But if you want the README file from the root directory of that very same\n"
--" site, you need to specify the absolute file name:\n"
--"\n"
--" curl ftp://user:passwd@my.site.com//README\n"
--"\n"
--, stdout);
-- fputs(
--" (I.e with an extra slash in front of the file name.)\n"
--"\n"
--"SFTP and SCP and PATH NAMES\n"
--"\n"
--" With sftp: and scp: URLs, the path name given is the absolute name on the\n"
--" server. To access a file relative to the remote user's home directory,\n"
--" prefix the file with /~/ , such as:\n"
--"\n"
--" curl -u $USER sftp://home.example.com/~/.bashrc\n"
--"\n"
--"FTP and firewalls\n"
--"\n"
--" The FTP protocol requires one of the involved parties to open a second\n"
--, stdout);
-- fputs(
--" connection as soon as data is about to get transferred. There are two ways to\n"
--" do this.\n"
--"\n"
--" The default way for curl is to issue the PASV command which causes the\n"
--" server to open another port and await another connection performed by the\n"
--" client. This is good if the client is behind a firewall that doesn't allow\n"
--" incoming connections.\n"
--"\n"
--" curl ftp.download.com\n"
--"\n"
--" If the server, for example, is behind a firewall that doesn't allow connections\n"
--, stdout);
-- fputs(
--" on ports other than 21 (or if it just doesn't support the PASV command), the\n"
--" other way to do it is to use the PORT command and instruct the server to\n"
--" connect to the client on the given IP number and port (as parameters to the\n"
--" PORT command).\n"
--"\n"
--" The -P flag to curl supports a few different options. Your machine may have\n"
--" several IP-addresses and/or network interfaces and curl allows you to select\n"
--" which of them to use. Default address can also be used:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -P - ftp.download.com\n"
--"\n"
--" Download with PORT but use the IP address of our 'le0' interface (this does\n"
--" not work on windows):\n"
--"\n"
--" curl -P le0 ftp.download.com\n"
--"\n"
--" Download with PORT but use 192.168.0.10 as our IP address to use:\n"
--"\n"
--" curl -P 192.168.0.10 ftp.download.com\n"
--"\n"
--"NETWORK INTERFACE\n"
--"\n"
--" Get a web page from a server using a specified port for the interface:\n"
--"\n"
--" curl --interface eth0:1 http://www.netscape.com/\n"
--"\n"
--" or\n"
--"\n"
--, stdout);
-- fputs(
--" curl --interface 192.168.1.10 http://www.netscape.com/\n"
--"\n"
--"HTTPS\n"
--"\n"
--" Secure HTTP requires SSL libraries to be installed and used when curl is\n"
--" built. If that is done, curl is capable of retrieving and posting documents\n"
--" using the HTTPS protocol.\n"
--"\n"
--" Example:\n"
--"\n"
--" curl https://www.secure-site.com\n"
--"\n"
--" Curl is also capable of using your personal certificates to get/post files\n"
--" from sites that require valid certificates. The only drawback is that the\n"
--, stdout);
-- fputs(
--" certificate needs to be in PEM-format. PEM is a standard and open format to\n"
--" store certificates with, but it is not used by the most commonly used\n"
--" browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n"
--" want curl to use the certificates you use with your (favourite) browser, you\n"
--" may need to download/compile a converter that can convert your browser's\n"
--" formatted certificates to PEM formatted ones. This kind of converter is\n"
--, stdout);
-- fputs(
--" included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
--" N. Henson has written a patch for SSLeay that adds this functionality. You\n"
--" can get his patch (that requires an SSLeay installation) from his site at:\n"
--" http://www.drh-consultancy.demon.co.uk/\n"
--"\n"
--" Example on how to automatically retrieve a document using a certificate with\n"
--" a personal password:\n"
--"\n"
--" curl -E /path/to/cert.pem:password https://secure.site.com/\n"
--"\n"
--, stdout);
-- fputs(
--" If you neglect to specify the password on the command line, you will be\n"
--" prompted for the correct password before any data can be received.\n"
--"\n"
--" Many older SSL-servers have problems with SSLv3 or TLS, which newer versions\n"
--" of OpenSSL etc use, therefore it is sometimes useful to specify what\n"
--" SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n"
--" version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n"
--"\n"
--" curl -2 https://secure.site.com/\n"
--"\n"
--, stdout);
-- fputs(
--" Otherwise, curl will first attempt to use v3 and then v2.\n"
--"\n"
--" To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
--" formatted one that curl can use, do something like this:\n"
--"\n"
--" In Netscape, you start with hitting the 'Security' menu button.\n"
--"\n"
--" Select 'certificates->yours' and then pick a certificate in the list\n"
--"\n"
--" Press the 'Export' button\n"
--"\n"
--" enter your PIN code for the certs\n"
--"\n"
--" select a proper place to save it\n"
--"\n"
--, stdout);
-- fputs(
--" Run the 'openssl' application to convert the certificate. If you cd to the\n"
--" openssl installation, you can do it like:\n"
--"\n"
--" # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n"
--"\n"
--" In Firefox, select Options, then Advanced, then the Encryption tab,\n"
--" View Certificates. This opens the Certificate Manager, where you can\n"
--" Export. Be sure to select PEM for the Save as type.\n"
--"\n"
--" In Internet Explorer, select Internet Options, then the Content tab, then\n"
--, stdout);
-- fputs(
--" Certificates. Then you can Export, and depending on the format you may\n"
--" need to convert to PEM.\n"
--"\n"
--" In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL\n"
--" select Manage Certificates.\n"
--"\n"
--"RESUMING FILE TRANSFERS\n"
--"\n"
--" To continue a file transfer where it was previously aborted, curl supports\n"
--" resume on HTTP(S) downloads as well as FTP uploads and downloads.\n"
--"\n"
--" Continue downloading a document:\n"
--"\n"
--" curl -C - -o file ftp://ftp.server.com/path/file\n"
--"\n"
--, stdout);
-- fputs(
--" Continue uploading a document(*1):\n"
--"\n"
--" curl -C - -T file ftp://ftp.server.com/path/file\n"
--"\n"
--" Continue downloading a document from a web server(*2):\n"
--"\n"
--" curl -C - -o file http://www.server.com/\n"
--"\n"
--" (*1) = This requires that the FTP server supports the non-standard command\n"
--" SIZE. If it doesn't, curl will say so.\n"
--"\n"
--" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n"
--" doesn't, curl will say so.\n"
--"\n"
--"TIME CONDITIONS\n"
--"\n"
--, stdout);
-- fputs(
--" HTTP allows a client to specify a time condition for the document it\n"
--" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to\n"
--" specify them with the -z/--time-cond flag.\n"
--"\n"
--" For example, you can easily make a download that only gets performed if the\n"
--" remote file is newer than a local copy. It would be made like:\n"
--"\n"
--" curl -z local.html http://remote.server.com/remote.html\n"
--"\n"
--" Or you can download a file only if the local file is newer than the remote\n"
--, stdout);
-- fputs(
--" one. Do this by prepending the date string with a '-', as in:\n"
--"\n"
--" curl -z -local.html http://remote.server.com/remote.html\n"
--"\n"
--" You can specify a \"free text\" date as condition. Tell curl to only download\n"
--" the file if it was updated since January 12, 2012:\n"
--"\n"
--" curl -z \"Jan 12 2012\" http://remote.server.com/remote.html\n"
--"\n"
--" Curl will then accept a wide range of date formats. You always make the date\n"
--" check the other way around by prepending it with a dash '-'.\n"
--"\n"
--"DICT\n"
--"\n"
--" For fun try\n"
--"\n"
--, stdout);
-- fputs(
--" curl dict://dict.org/m:curl\n"
--" curl dict://dict.org/d:heisenbug:jargon\n"
--" curl dict://dict.org/d:daniel:web1913\n"
--"\n"
--" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
--" and 'lookup'. For example,\n"
--"\n"
--" curl dict://dict.org/find:curl\n"
--"\n"
--" Commands that break the URL description of the RFC (but not the DICT\n"
--" protocol) are\n"
--"\n"
--" curl dict://dict.org/show:db\n"
--" curl dict://dict.org/show:strat\n"
--"\n"
--, stdout);
-- fputs(
--" Authentication is still missing (but this is not required by the RFC)\n"
--"\n"
--"LDAP\n"
--"\n"
--" If you have installed the OpenLDAP library, curl can take advantage of it\n"
--" and offer ldap:// support.\n"
--"\n"
--" LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
--" advise you to dig up the syntax description for that elsewhere. Two places\n"
--" that might suit you are:\n"
--"\n"
--" Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n"
--" Working with LDAP URLs\":\n"
--, stdout);
-- fputs(
--" http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n"
--"\n"
--" RFC 2255, \"The LDAP URL Format\" http://curl.haxx.se/rfc/rfc2255.txt\n"
--"\n"
--" To show you an example, this is how I can get all people from my local LDAP\n"
--" server that has a certain sub-domain in their email address:\n"
--"\n"
--" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
--"\n"
--" If I want the same info in HTML format, I can get it by not using the -B\n"
--" (enforce ASCII) flag.\n"
--"\n"
--"ENVIRONMENT VARIABLES\n"
--"\n"
--, stdout);
-- fputs(
--" Curl reads and understands the following environment variables:\n"
--"\n"
--" http_proxy, HTTPS_PROXY, FTP_PROXY\n"
--"\n"
--" They should be set for protocol-specific proxies. General proxy should be\n"
--" set with\n"
--"\n"
--" ALL_PROXY\n"
--"\n"
--" A comma-separated list of host names that shouldn't go through any proxy is\n"
--" set in (only an asterisk, '*' matches all hosts)\n"
--"\n"
--" NO_PROXY\n"
--"\n"
--" If the host name matches one of these strings, or the host is within the\n"
--, stdout);
-- fputs(
--" domain of one of these strings, transactions with that node will not be\n"
--" proxied.\n"
--"\n"
--"\n"
--" The usage of the -x/--proxy flag overrides the environment variables.\n"
--"\n"
--"NETRC\n"
--"\n"
--" Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
--" to specify name and password for commonly visited FTP sites in a file so\n"
--" that you don't have to type them in each time you visit those sites. You\n"
--" realize this is a big security risk if someone else gets hold of your\n"
--, stdout);
-- fputs(
--" passwords, so therefore most unix programs won't read this file unless it is\n"
--" only readable by yourself (curl doesn't care though).\n"
--"\n"
--" Curl supports .netrc files if told to (using the -n/--netrc and\n"
--" --netrc-optional options). This is not restricted to just FTP,\n"
--" so curl can use it for all protocols where authentication is used.\n"
--"\n"
--" A very simple .netrc file could look something like:\n"
--"\n"
--" machine curl.haxx.se login iamdaniel password mysecret\n"
--"\n"
--"CUSTOM OUTPUT\n"
--"\n"
--, stdout);
-- fputs(
--" To better allow script programmers to get to know about the progress of\n"
--" curl, the -w/--write-out option was introduced. Using this, you can specify\n"
--" what information from the previous transfer you want to extract.\n"
--"\n"
--" To display the amount of bytes downloaded together with some text and an\n"
--" ending newline:\n"
--"\n"
--" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
--"\n"
--"KERBEROS FTP TRANSFER\n"
--"\n"
--" Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need\n"
--, stdout);
-- fputs(
--" the kerberos package installed and used at curl build time for it to be\n"
--" available.\n"
--"\n"
--" First, get the krb-ticket the normal way, like with the kinit/kauth tool.\n"
--" Then use curl in way similar to:\n"
--"\n"
--" curl --krb private ftp://krb4site.com -u username:fakepwd\n"
--"\n"
--" There's no use for a password on the -u switch, but a blank one will make\n"
--" curl ask for one and you already entered the real password to kinit/kauth.\n"
--"\n"
--"TELNET\n"
--"\n"
--, stdout);
-- fputs(
--" The curl telnet support is basic and very easy to use. Curl passes all data\n"
--" passed to it on stdin to the remote server. Connect to a remote telnet\n"
--" server using a command line similar to:\n"
--"\n"
--" curl telnet://remote.server.com\n"
--"\n"
--" And enter the data to pass to the server on stdin. The result will be sent\n"
--" to stdout or to the file you specify with -o.\n"
--"\n"
--" You might want the -N/--no-buffer option to switch off the buffered output\n"
--" for slow connections or similar.\n"
--"\n"
--, stdout);
-- fputs(
--" Pass options to the telnet protocol negotiation, by using the -t option. To\n"
--" tell the server we use a vt100 terminal, try something like:\n"
--"\n"
--" curl -tTTYPE=vt100 telnet://remote.server.com\n"
--"\n"
--" Other interesting options for it -t include:\n"
--"\n"
--" - XDISPLOC=<X display> Sets the X display location.\n"
--"\n"
--" - NEW_ENV=<var,val> Sets an environment variable.\n"
--"\n"
--" NOTE: The telnet protocol does not specify any way to login with a specified\n"
--, stdout);
-- fputs(
--" user and password so curl can't do that automatically. To do that, you need\n"
--" to track when the login prompt is received and send the username and\n"
--" password accordingly.\n"
--"\n"
--"PERSISTENT CONNECTIONS\n"
--"\n"
--" Specifying multiple files on a single command line will make curl transfer\n"
--" all of them, one after the other in the specified order.\n"
--"\n"
--" libcurl will attempt to use persistent connections for the transfers so that\n"
--" the second transfer to the same host can use the same connection that was\n"
--, stdout);
-- fputs(
--" already initiated and was left open in the previous transfer. This greatly\n"
--" decreases connection time for all but the first transfer and it makes a far\n"
--" better use of the network.\n"
--"\n"
--" Note that curl cannot use persistent connections for transfers that are used\n"
--" in subsequence curl invokes. Try to stuff as many URLs as possible on the\n"
--" same command line if they are using the same host, as that'll make the\n"
--" transfers faster. If you use an HTTP proxy for file transfers, practically\n"
--, stdout);
-- fputs(
--" all transfers will be persistent.\n"
--"\n"
--"MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE\n"
--"\n"
--" As is mentioned above, you can download multiple files with one command line\n"
--" by simply adding more URLs. If you want those to get saved to a local file\n"
--" instead of just printed to stdout, you need to add one save option for each\n"
--" URL you specify. Note that this also goes for the -O option (but not\n"
--" --remote-name-all).\n"
--"\n"
--" For example: get two files and use -O for the first and a custom file\n"
--, stdout);
-- fputs(
--" name for the second:\n"
--"\n"
--" curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg\n"
--"\n"
--" You can also upload multiple files in a similar fashion:\n"
--"\n"
--" curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt\n"
--"\n"
--"IPv6\n"
--"\n"
--" curl will connect to a server with IPv6 when a host lookup returns an IPv6\n"
--" address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6\n"
--" options can specify which address to use when both are available. IPv6\n"
--, stdout);
-- fputs(
--" addresses can also be specified directly in URLs using the syntax:\n"
--"\n"
--" http://[2001:1890:1112:1::20]/overview.html\n"
--"\n"
--" When this style is used, the -g option must be given to stop curl from\n"
--" interpreting the square brackets as special globbing characters. Link local\n"
--" and site local addresses including a scope identifier, such as fe80::1234%1,\n"
--" may also be used, but the scope portion must be numeric and the percent\n"
--" character must be URL escaped. The previous example in an SFTP URL might\n"
--, stdout);
-- fputs(
--" look like:\n"
--"\n"
--" sftp://[fe80::1234%251]/\n"
--"\n"
--" IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface\n"
--" or --ftp-port options) should not be URL encoded.\n"
--"\n"
--"METALINK\n"
--"\n"
--" Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way\n"
--" to list multiple URIs and hashes for a file. Curl will make use of the mirrors\n"
--" listed within for failover if there are errors (such as the file or server not\n"
--, stdout);
-- fputs(
--" being available). It will also verify the hash of the file after the download\n"
--" completes. The Metalink file itself is downloaded and processed in memory and\n"
--" not stored in the local file system.\n"
--"\n"
--" Example to use a remote Metalink file:\n"
--"\n"
--" curl --metalink http://www.example.com/example.metalink\n"
--"\n"
--" To use a Metalink file in the local file system, use FILE protocol (file://):\n"
--"\n"
--" curl --metalink file://example.metalink\n"
--"\n"
--, stdout);
-- fputs(
--" Please note that if FILE protocol is disabled, there is no way to use a local\n"
--" Metalink file at the time of this writing. Also note that if --metalink and\n"
--" --include are used together, --include will be ignored. This is because including\n"
--" headers in the response will break Metalink parser and if the headers are included\n"
--" in the file described in Metalink file, hash check will fail.\n"
--"\n"
--"MAILING LISTS\n"
--"\n"
--" For your convenience, we have several open mailing lists to discuss curl,\n"
--, stdout);
-- fputs(
--" its development and things relevant to this. Get all info at\n"
--" http://curl.haxx.se/mail/. Some of the lists available are:\n"
--"\n"
--" curl-users\n"
--"\n"
--" Users of the command line tool. How to use it, what doesn't work, new\n"
--" features, related tools, questions, news, installations, compilations,\n"
--" running, porting etc.\n"
--"\n"
--" curl-library\n"
--"\n"
--" Developers using or developing libcurl. Bugs, extensions, improvements.\n"
--"\n"
--" curl-announce\n"
--"\n"
--, stdout);
-- fputs(
--" Low-traffic. Only receives announcements of new public versions. At worst,\n"
--" that makes something like one or two mails per month, but usually only one\n"
--" mail every second month.\n"
--"\n"
--" curl-and-php\n"
--"\n"
--" Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n"
--" with a curl angle.\n"
--"\n"
--" curl-and-python\n"
--"\n"
--" Python hackers using curl with or without the python binding pycurl.\n"
--"\n"
--" Please direct curl questions, feature requests and trouble reports to one of\n"
--, stdout);
-- fputs(
--" these mailing lists instead of mailing any individual.\n"
--, stdout) ;
--}
--#endif /* USE_MANUAL */
--#else
--/*
-- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: Tue Mar 25 11:29:49 2014
-- */
--#ifdef USE_MANUAL
--#include "tool_hugehelp.h"
--#include <zlib.h>
--#include "memdebug.h" /* keep this as LAST include */
--static const unsigned char hugehelpgz[] = {
-- /* This mumbo-jumbo is the huge help text compressed with gzip.
-- Thanks to this operation, the size of this data shrunk from 156972
-- to 47509 bytes. You can disable the use of compressed help
-- texts by NOT passing -c to the mkhelp.pl tool. */
-- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
-- 0x6b, 0x5b, 0x23, 0x57, 0x92, 0x2e, 0xfa, 0x9d, 0x5f, 0x91, 0xad, 0x3e,
-- 0x3d, 0xc0, 0xb4, 0x24, 0x2e, 0x75, 0xb1, 0x8b, 0xae, 0xf2, 0x18, 0x53,
-- 0x94, 0xcd, 0x36, 0x55, 0xb0, 0x81, 0xf2, 0x65, 0xdb, 0x7e, 0xea, 0x49,
-- 0x49, 0x09, 0x64, 0x23, 0x29, 0xd5, 0x99, 0x29, 0x28, 0x7a, 0x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b6, 0xd3, 0x26, 0xdf, 0x88, 0xf0, 0xa3, 0xe9, 0x14, 0x38, 0x79,
-- 0xa7, 0xdf, 0x9c, 0x0e, 0x93, 0x43, 0x6e, 0x49, 0xc6, 0xa4, 0x72, 0x2b,
-- 0x4c, 0x2e, 0xf4, 0x1d, 0x4d, 0xf6, 0x8a, 0xef, 0xaf, 0x93, 0x92, 0xff,
-- 0x42, 0x6b, 0xfa, 0xa5, 0x58, 0x59, 0xf1, 0x6d, 0xb3, 0x57, 0x6a, 0xc8,
-- 0x82, 0xa6, 0x4f, 0xf1, 0x3b, 0x1d, 0x15, 0x92, 0xa6, 0xdc, 0x36, 0xf9,
-- 0x1e, 0x8a, 0xb2, 0x01, 0xa5, 0x23, 0x6f, 0x26, 0x24, 0x64, 0x41, 0x54,
-- 0x5a, 0xdc, 0x63, 0xff, 0x02, 0xde, 0x28, 0xe2, 0xa4, 0x34, 0x10, 0x90,
-- 0x96, 0x92, 0x9f, 0x0b, 0xc7, 0x93, 0x73, 0x55, 0x0a, 0x88, 0x4c, 0x99,
-- 0x69, 0xf0, 0x62, 0xa1, 0x5e, 0x4f, 0x31, 0x50, 0x54, 0x59, 0xeb, 0xb8,
-- 0x06, 0xea, 0x98, 0x7d, 0xc1, 0x5a, 0x34, 0x8f, 0x85, 0x84, 0x16, 0xda,
-- 0x82, 0xe1, 0xda, 0xff, 0x0d, 0xe7, 0xf9, 0xe0, 0x85, 0x2c, 0x65, 0x02,
-- 0x00,
--};
--#define BUF_SIZE 0x10000
--static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
--{
-- (void) opaque;
-- /* not a typo, keep it calloc() */
-- return (voidpf) calloc(items, size);
--}
--static void zfree_func(voidpf opaque, voidpf ptr)
--{
-- (void) opaque;
-- free(ptr);
--}
--/* Decompress and send to stdout a gzip-compressed buffer */
--void hugehelp(void)
--{
-- unsigned char* buf;
-- int status,headerlen;
-- z_stream z;
--
-- /* Make sure no gzip options are set */
-- if (hugehelpgz[3] & 0xfe)
-- return;
--
-- headerlen = 10;
-- memset(&z, 0, sizeof(z_stream));
-- z.zalloc = (alloc_func)zalloc_func;
-- z.zfree = (free_func)zfree_func;
-- z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
-- z.next_in = (unsigned char *)hugehelpgz + headerlen;
--
-- if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
-- return;
--
-- buf = malloc(BUF_SIZE);
-- if (buf) {
-- while(1) {
-- z.avail_out = BUF_SIZE;
-- z.next_out = buf;
-- status = inflate(&z, Z_SYNC_FLUSH);
-- if (status == Z_OK || status == Z_STREAM_END) {
-- fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
-- if (status == Z_STREAM_END)
-- break;
-- }
-- else
-- break; /* Error */
-- }
-- free(buf);
-- }
-- inflateEnd(&z);
--}
--#endif /* USE_MANUAL */
--#endif /* HAVE_LIBZ */
diff --git a/meta/recipes-support/curl/curl_7.37.0.bb b/meta/recipes-support/curl/curl_7.40.0.bb
index f6b05a7787..d4b4ee3506 100644
--- a/meta/recipes-support/curl/curl_7.37.0.bb
+++ b/meta/recipes-support/curl/curl_7.40.0.bb
@@ -5,44 +5,38 @@ SECTION = "console/network"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
-DEPENDS = "zlib gnutls"
-DEPENDS_class-native = "zlib-native openssl-native"
-DEPENDS_class-nativesdk = "nativesdk-zlib"
-
SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://pkgconfig_fix.patch \
-"
+ "
# curl likes to set -g0 in CFLAGS, so we stop it
# from mucking around with debug options
#
SRC_URI += " file://configure_ac.patch"
-SRC_URI[md5sum] = "7dda0cc2e4136f78d5801ac347be696b"
-SRC_URI[sha256sum] = "24502492de3168b0556d8e1a06f14f7589e57b204917d602a572e14239b3e09e"
+SRC_URI[md5sum] = "8d30594212e65657a5c32030f0998fa9"
+SRC_URI[sha256sum] = "899109eb3900fa6b8a2f995df7f449964292776a04763e94fae640700f883fba"
inherit autotools pkgconfig binconfig multilib_header
-PACKAGECONFIG ??= "gnutls ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
-PACKAGECONFIG_class-native = "ipv6 ssl"
-PACKAGECONFIG_class-nativesdk = "ipv6"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ssl] = "--with-ssl, --without-ssl, ,"
-PACKAGECONFIG[gnutls] = "--with-gnutls=${STAGING_LIBDIR}/../, --without-gnutls, gnutls,"
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls zlib"
+PACKAGECONFIG_class-native = "ipv6 ssl zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 ssl zlib"
-EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
- --without-libssh2 \
- --with-random=/dev/urandom \
- --without-libidn \
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,samba"
+
+EXTRA_OECONF = "--without-libidn \
--enable-crypto-auth \
--disable-ldap \
--disable-ldaps \
--with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
- "
-
-do_configure_prepend() {
- sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g ${S}/configure.ac
-}
+"
do_install_append() {
oe_multilib_header curl/curlbuild.h
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 057c9d8425..e8b814e06b 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -42,6 +42,7 @@ PROVIDES += "${VIRTUAL_NAME}"
# persuades bitbake to go to the right place
S = "${WORKDIR}/db-${PV}/dist"
B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
diff --git a/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb
index 9fc4a30a88..47fb296daa 100644
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -42,6 +42,7 @@ PROVIDES += "${VIRTUAL_NAME}"
# persuades bitbake to go to the right place
S = "${WORKDIR}/db-${PV}/dist"
B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
diff --git a/meta/recipes-support/debianutils/debianutils_4.4.bb b/meta/recipes-support/debianutils/debianutils_4.4.bb
new file mode 100644
index 0000000000..346eaf16eb
--- /dev/null
+++ b/meta/recipes-support/debianutils/debianutils_4.4.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.gz"
+SRC_URI[md5sum] = "c0cb076754d7f4eb1e3397d00916647f"
+SRC_URI[sha256sum] = "190850cdd6b5302e0a1ba1aaed1bc7074d67d3bd8d04c613f242f7145afa53a6"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ # Debian places some utils into ${base_bindir} as does busybox
+ install -d ${D}${base_bindir}
+ for app in run-parts tempfile; do
+ mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+ done
+ fi
+}
+
+ALTERNATIVE_PRIORITY="100"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell run-parts savelog tempfile which"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
new file mode 100644
index 0000000000..770d8f66b9
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
@@ -0,0 +1,22 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Inappropriate [old version]
+
+--- gdbm-1.8.3.orig/Makefile.in
++++ gdbm-1.8.3/Makefile.in
+@@ -156,12 +156,12 @@ install-compat:
+
+ libgdbm.la: $(LOBJS) gdbm.h
+ rm -f libgdbm.la
+- $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm.la -rpath $(libdir) \
+ -version-info $(SHLIB_VER) $(LOBJS)
+
+ libgdbm_compat.la: $(C_LOBJS) gdbm.h
+ rm -f libgdbm_compat.la
+- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm_compat.la -rpath $(libdir) \
+ -version-info $(SHLIB_VER) $(C_LOBJS)
+
+ gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
diff --git a/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
index aecf47afb9..2331d1df3a 100644
--- a/meta/recipes-support/gdbm/gdbm_1.8.3.bb
+++ b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
@@ -8,7 +8,8 @@ PR = "r4"
SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
file://makefile.patch \
- file://libtool-mode.patch"
+ file://libtool-mode.patch \
+ file://ldflags.patch"
SRC_URI[md5sum] = "1d1b1d5c0245b1c00aff92da751e9aa1"
SRC_URI[sha256sum] = "cc340338a2e28b40058ab9eb5354a21d53f88a1582ea21ba0bb185c37a281dc9"
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/configure.patch b/meta/recipes-support/gmp/gmp-4.2.1/configure.patch
deleted file mode 100644
index 7597a935a2..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/configure.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-Upstream-Status: Pending
-
- acinclude.m4 | 26 ++++++++++++++------------
- configure.in | 24 +++++++++---------------
- 2 files changed, 23 insertions(+), 27 deletions(-)
-
-Index: gmp-5.0.3/acinclude.m4
-===================================================================
---- gmp-5.0.3.orig/acinclude.m4
-+++ gmp-5.0.3/acinclude.m4
-@@ -30,29 +30,29 @@ dnl a_out.exe - OpenVMS DEC C called
- dnl conftest.exe - various DOS compilers
-
-
--define(IA64_PATTERN,
-+define([IA64_PATTERN],
- [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
-
- dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
- dnl of which config.sub accepts. (Though none of which are likely to work
- dnl with GMP.)
- dnl
--define(M68K_PATTERN,
-+define([M68K_PATTERN],
- [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
-
--define(POWERPC64_PATTERN,
-+define([POWERPC64_PATTERN],
- [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
-
--define(S390_PATTERN,
-+define([S390_PATTERN],
- [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
-
--define(S390X_PATTERN,
-+define([S390X_PATTERN],
- [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
-
--define(X86_PATTERN,
-+define([X86_PATTERN],
- [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
-
--define(X86_64_PATTERN,
-+define([X86_64_PATTERN],
- [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
-
- dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
-@@ -70,7 +70,7 @@ dnl x86 -> x86
- dnl x86/k6 -> k6
- dnl x86/k6/mmx -> k6_mmx
-
--define(GMP_FAT_SUFFIX,
-+define([GMP_FAT_SUFFIX],
- [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
-
-
-@@ -79,7 +79,7 @@ dnl ----------------------------------
- dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
- dnl shell expression like $foo if desired.
-
--define(GMP_REMOVE_FROM_LIST,
-+define([GMP_REMOVE_FROM_LIST],
- [remove_from_list_tmp=
- for remove_from_list_i in $[][$1]; do
- if test $remove_from_list_i = [$2]; then :;
-@@ -95,12 +95,12 @@ dnl GMP_STRIP_PATH(subdir)
- dnl ----------------------
- dnl Strip entries */subdir from $path and $fat_path.
-
--define(GMP_STRIP_PATH,
-+define([GMP_STRIP_PATH],
- [GMP_STRIP_PATH_VAR(path, [$1])
- GMP_STRIP_PATH_VAR(fat_path, [$1])
- ])
-
--define(GMP_STRIP_PATH_VAR,
-+define([GMP_STRIP_PATH_VAR],
- [tmp_path=
- for i in $[][$1]; do
- case $i in
-@@ -121,7 +121,7 @@ dnl
- dnl Dummy value for GMP_LIMB_BITS is enough
- dnl for all current configure-time uses of gmp.h.
-
--define(GMP_INCLUDE_GMP_H,
-+define([GMP_INCLUDE_GMP_H],
- [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
- #define GMP_NAIL_BITS $GMP_NAIL_BITS
- #define GMP_LIMB_BITS 123
-@@ -136,7 +136,7 @@ dnl Expand at autoconf time to the valu
- dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
- dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
-
--define(GMP_HEADER_GETVAL,
-+define([GMP_HEADER_GETVAL],
- [patsubst(patsubst(
- esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
- [^.*$1[ ]+],[]),
-@@ -150,7 +150,7 @@ dnl The gmp version number, extracted f
- dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
- dnl like 3.0.1 if patchlevel > 0.
-
--define(GMP_VERSION,
-+define([GMP_VERSION],
- [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
-@@ -1512,7 +1512,9 @@ esac
- echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
-
- # All CPUs use asm-defs.m4
--echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
-+echo -n ["include("] >>$gmp_tmpconfigm4i
-+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
-+echo [")"] >>$gmp_tmpconfigm4i
- ])
-
-
-Index: gmp-5.0.3/configure.in
-===================================================================
---- gmp-5.0.3.orig/configure.in
-+++ gmp-5.0.3/configure.in
-@@ -29,12 +29,6 @@ AC_REVISION($Revision$)
- AC_PREREQ(2.59)
- AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
- AC_CONFIG_SRCDIR(gmp-impl.h)
--m4_pattern_forbid([^[ \t]*GMP_])
--m4_pattern_allow(GMP_LDFLAGS)
--m4_pattern_allow(GMP_LIMB_BITS)
--m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
--m4_pattern_allow(GMP_NAIL_BITS)
--m4_pattern_allow(GMP_NUMB_BITS)
-
- # If --target is not used then $target_alias is empty, but if say
- # "./configure athlon-pc-freebsd3.5" is used, then all three of
-@@ -311,7 +305,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
- # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
- # called. User selections of CC etc are respected.
- #
--# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
-+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
- # pre-testing, since they of course depend on AC_PROG_CC, and also some of
- # them cache their results, which is not wanted.
- #
-@@ -403,7 +397,7 @@ abilist="standard"
- # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
- # c89 over cc here. But note that on HP-UX c89 provides a castrated
- # environment, and would want to be excluded somehow. Maybe
--# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
-+# already does enough to stick cc into ANSI mode and
- # we don't need to worry.
- #
- cclist="gcc cc"
-@@ -1666,7 +1660,7 @@ esac
- CFLAGS_or_unset=${CFLAGS-'(unset)'}
- CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
-
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- User:
- ABI=$ABI
- CC=$CC
-@@ -2073,7 +2067,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
-
- # The C compiler and preprocessor, put into ANSI mode if possible.
- AC_PROG_CC
--AC_PROG_CC_STDC
- AC_PROG_CPP
- GMP_H_ANSI
-
-@@ -2096,11 +2089,11 @@ AC_SUBST(CCAS)
-
- # The C++ compiler, if desired.
- want_cxx=no
-+AC_PROG_CXX
- if test $enable_cxx != no; then
- test_CXXFLAGS=${CXXFLAGS+set}
-- AC_PROG_CXX
-
-- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
-+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
- cxxflags_ac_prog_cxx=$CXXFLAGS
- cxxflags_list=ac_prog_cxx
-
-@@ -2206,7 +2199,7 @@ case $host in
- esac
-
-
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- Decided:
- ABI=$ABI
- CC=$CC
-@@ -3465,7 +3458,7 @@ GMP_FINISH
- # FIXME: Upcoming version of autoconf/automake may not like broken lines.
- # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
-
--AC_OUTPUT(Makefile \
-+AC_CONFIG_FILES([Makefile \
- mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
- mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
- tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
-@@ -3474,4 +3467,5 @@ AC_OUTPUT(Makefile \
- tests/cxx/Makefile \
- doc/Makefile tune/Makefile \
- demos/Makefile demos/calc/Makefile demos/expr/Makefile \
-- gmp.h:gmp-h.in mp.h:mp-h.in)
-+ gmp.h:gmp-h.in mp.h:mp-h.in])
-+AC_OUTPUT
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch b/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
deleted file mode 100644
index aaffaf14c5..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-# "extern inline" in traditional gcc means that the function should be
-# inlined wherever it's seen, while in C99, "extern inline" means that i
-# the function should only be inlined where the inline definition is
-# seen while in other places it's not inlined:
-# http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
-#
-# gmp checks "--std=gnu99" to use C99 convention however it internally
-# defines some "extern inline" functions in gmp.h, which is included
-# by mainly .c files and finally lead a flood of redefinition function
-# errors when linking objects together.
-#
-# So disable C99/ANSI detection to stick to tranditional gcc behavior
-#
-# by Kevin Tian <kevin.tian@intel.com>, 2010-08-13
-#
-# (this patch is licensed under GPLv2+)
-
-diff --git a/configure.in b/configure.in
-index 450cc92..aab0b59 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
-
- # The C compiler and preprocessor, put into ANSI mode if possible.
- AC_PROG_CC
--AC_PROG_CC_STDC
- AC_PROG_CPP
--GMP_H_ANSI
-
-
- # The C compiler on the build system, and associated tests.
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch b/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
deleted file mode 100644
index fbd8a39d01..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has depricated automatic de-ANSI-fication support
-
-this patch avoids these kinds of errors:
-
-| configure.in:2240: error: automatic de-ANSI-fication support has been removed
-| Makefile.am:28: error: automatic de-ANSI-fication support has been removed
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/02
-
-Index: gmp-4.2.1/configure.in
-===================================================================
---- gmp-4.2.1.orig/configure.in
-+++ gmp-4.2.1/configure.in
-@@ -67,7 +67,7 @@ dnl
- dnl Note that there's a copy of these options in the top-level Makefile.am,
- dnl so update there too if changing anything.
- dnl
--AM_INIT_AUTOMAKE([1.8 gnu no-dependencies $(top_builddir)/ansi2knr])
-+AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
- AM_CONFIG_HEADER(config.h:config.in)
- AM_MAINTAINER_MODE
-
-@@ -2022,9 +2022,6 @@ fi
- echo " MPN_PATH=\"$path\""
-
-
--# Automake ansi2knr support.
--AM_C_PROTOTYPES
--
- GMP_PROG_AR
- GMP_PROG_NM
-
-Index: gmp-4.2.1/Makefile.am
-===================================================================
---- gmp-4.2.1.orig/Makefile.am
-+++ gmp-4.2.1/Makefile.am
-@@ -27,7 +27,7 @@
- # Makefiles in subdirectories, but here we must omit it so automake gives
- # the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
- #
--AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
-+AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies
-
-
- # Libtool -version-info for libgmp.la and libmp.la. See "Versioning" in the
diff --git a/meta/recipes-support/gmp/gmp.inc b/meta/recipes-support/gmp/gmp.inc
index d025e07256..558ee06799 100644
--- a/meta/recipes-support/gmp/gmp.inc
+++ b/meta/recipes-support/gmp/gmp.inc
@@ -4,9 +4,9 @@ DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operati
HOMEPAGE = "http://gmplib.org/"
LICENSE = "GPLv3 LGPLv3"
-REVISION = ""
+REVISION ?= ""
-SRC_URI = "ftp://ftp.gmplib.org/pub/gmp-${PV}/gmp-${PV}${REVISION}.tar.bz2 \
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
file://configure.patch \
file://amd64.patch "
@@ -18,6 +18,9 @@ acpaths = ""
BBCLASSEXTEND = "native nativesdk"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
+
EXTRA_OECONF += " --enable-cxx=detect"
PACKAGES =+ "libgmpxx"
diff --git a/meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
index ae1386c4c1..ae1386c4c1 100644
--- a/meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch
+++ b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
diff --git a/meta/recipes-support/gmp/gmp-5.1.1/configure.patch b/meta/recipes-support/gmp/gmp/configure.patch
index 591ea79051..349da3c6b0 100644
--- a/meta/recipes-support/gmp/gmp-5.1.1/configure.patch
+++ b/meta/recipes-support/gmp/gmp/configure.patch
@@ -4,17 +4,23 @@ Updated to apply to gmp-5.1.0
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gmp-5.1.0/acinclude.m4 gmp-5.1.0/acinclude.m4
---- gmp-5.1.0/acinclude.m4 2012-12-18 21:05:09.000000000 +0200
-+++ gmp-5.1.0/acinclude.m4 2013-01-02 05:19:26.977013073 +0200
-@@ -30,29 +30,29 @@
+---
+ acinclude.m4 | 32 +++++++++++++++++---------------
+ configure.ac | 26 +++++++++-----------------
+ 2 files changed, 26 insertions(+), 32 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 227712a..199aa6f 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -40,29 +40,29 @@ dnl a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
dnl conftest.exe - various DOS compilers
-
-
+
+
-define(IA64_PATTERN,
+define([IA64_PATTERN],
[[ia64*-*-* | itanium-*-* | itanium2-*-*]])
-
+
dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
dnl of which config.sub accepts. (Though none of which are likely to work
dnl with GMP.)
@@ -22,105 +28,106 @@ diff -Nurd gmp-5.1.0/acinclude.m4 gmp-5.1.0/acinclude.m4
-define(M68K_PATTERN,
+define([M68K_PATTERN],
[[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
-
+
-define(POWERPC64_PATTERN,
+define([POWERPC64_PATTERN],
[[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
-
+
-define(S390_PATTERN,
+define([S390_PATTERN],
[[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
-
+
-define(S390X_PATTERN,
+define([S390X_PATTERN],
[[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
-
+
-define(X86_PATTERN,
+define([X86_PATTERN],
[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
-
+
-define(X86_64_PATTERN,
+define([X86_64_PATTERN],
- [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
-
+ [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
+
dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
-@@ -70,7 +70,7 @@
+@@ -80,7 +80,7 @@ dnl x86 -> x86
dnl x86/k6 -> k6
dnl x86/k6/mmx -> k6_mmx
-
+
-define(GMP_FAT_SUFFIX,
+define([GMP_FAT_SUFFIX],
[[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
-
-
-@@ -79,7 +79,7 @@
+
+
+@@ -89,7 +89,7 @@ dnl ----------------------------------
dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
dnl shell expression like $foo if desired.
-
+
-define(GMP_REMOVE_FROM_LIST,
+define([GMP_REMOVE_FROM_LIST],
[remove_from_list_tmp=
for remove_from_list_i in $[][$1]; do
if test $remove_from_list_i = [$2]; then :;
-@@ -95,12 +95,12 @@
+@@ -105,12 +105,12 @@ dnl GMP_STRIP_PATH(subdir)
dnl ----------------------
dnl Strip entries */subdir from $path and $fat_path.
-
+
-define(GMP_STRIP_PATH,
+define([GMP_STRIP_PATH],
[GMP_STRIP_PATH_VAR(path, [$1])
GMP_STRIP_PATH_VAR(fat_path, [$1])
])
-
+
-define(GMP_STRIP_PATH_VAR,
+define([GMP_STRIP_PATH_VAR],
[tmp_path=
for i in $[][$1]; do
case $i in
-@@ -121,7 +121,7 @@
+@@ -131,7 +131,7 @@ dnl
dnl Dummy value for GMP_LIMB_BITS is enough
dnl for all current configure-time uses of gmp.h.
-
+
-define(GMP_INCLUDE_GMP_H,
+define([GMP_INCLUDE_GMP_H],
[[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
#define GMP_NAIL_BITS $GMP_NAIL_BITS
#define GMP_LIMB_BITS 123
-@@ -136,7 +136,7 @@
+@@ -146,7 +146,7 @@ dnl Expand at autoconf time to the value of a "#define NAME" from the given
dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
-
+
-define(GMP_HEADER_GETVAL,
+define([GMP_HEADER_GETVAL],
[patsubst(patsubst(
esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
[^.*$1[ ]+],[]),
-@@ -150,7 +150,7 @@
+@@ -160,7 +160,7 @@ dnl The gmp version number, extracted from the #defines in gmp-h.in at
dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
dnl like 3.0.1 if patchlevel > 0.
-
+
-define(GMP_VERSION,
+define([GMP_VERSION],
[GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
.GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
.GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
-@@ -1512,7 +1512,9 @@
+@@ -1524,7 +1524,9 @@ esac
echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
-
+
# All CPUs use asm-defs.m4
-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
+echo -n ["include("] >>$gmp_tmpconfigm4i
+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
+echo [")"] >>$gmp_tmpconfigm4i
])
-
-
-diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
---- gmp-5.1.0/configure.ac 2012-12-18 21:05:09.000000000 +0200
-+++ gmp-5.1.0/configure.ac 2013-01-02 05:19:26.977013073 +0200
-@@ -29,13 +29,6 @@
+
+
+diff --git a/configure.ac b/configure.ac
+index 64b2c50..f07b821 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
AC_PREREQ(2.59)
- AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
+ AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
AC_CONFIG_SRCDIR(gmp-impl.h)
-m4_pattern_forbid([^[ \t]*GMP_])
-m4_pattern_allow(GMP_LDFLAGS)
@@ -129,10 +136,11 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
-m4_pattern_allow(GMP_NAIL_BITS)
-m4_pattern_allow(GMP_NUMB_BITS)
-m4_pattern_allow(GMP_NONSTD_ABI)
-
+-m4_pattern_allow(GMP_CPU_TYPE)
+
# If --target is not used then $target_alias is empty, but if say
# "./configure athlon-pc-freebsd3.5" is used, then all three of
-@@ -314,7 +307,7 @@
+@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
# called. User selections of CC etc are respected.
#
@@ -141,7 +149,7 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
# pre-testing, since they of course depend on AC_PROG_CC, and also some of
# them cache their results, which is not wanted.
#
-@@ -406,7 +399,7 @@
+@@ -440,7 +432,7 @@ abilist="standard"
# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
# c89 over cc here. But note that on HP-UX c89 provides a castrated
# environment, and would want to be excluded somehow. Maybe
@@ -150,61 +158,65 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
# we don't need to worry.
#
cclist="gcc cc"
-@@ -1727,7 +1720,7 @@
+@@ -1843,7 +1835,7 @@ esac
CFLAGS_or_unset=${CFLAGS-'(unset)'}
CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
-
+
-cat >&AC_FD_CC <<EOF
+cat >&AS_MESSAGE_LOG_FD() <<EOF
User:
ABI=$ABI
CC=$CC
-@@ -2147,7 +2140,6 @@
-
+@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
# The C compiler and preprocessor, put into ANSI mode if possible.
AC_PROG_CC
-AC_PROG_CC_STDC
AC_PROG_CPP
-
-
-@@ -2169,11 +2161,11 @@
-
+
+
+@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
+
# The C++ compiler, if desired.
want_cxx=no
+AC_PROG_CXX
if test $enable_cxx != no; then
test_CXXFLAGS=${CXXFLAGS+set}
- AC_PROG_CXX
-
+
- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
cxxflags_ac_prog_cxx=$CXXFLAGS
cxxflags_list=ac_prog_cxx
-
-@@ -2289,7 +2281,7 @@
+
+@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
fi
-
-
+
+
-cat >&AC_FD_CC <<EOF
+cat >&AS_MESSAGE_LOG_FD() <<EOF
Decided:
ABI=$ABI
CC=$CC
-@@ -3638,7 +3630,7 @@
+@@ -3781,7 +3772,7 @@ GMP_FINISH
# FIXME: Upcoming version of autoconf/automake may not like broken lines.
# Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
-
+
-AC_OUTPUT(Makefile \
+AC_CONFIG_FILES([Makefile \
mpf/Makefile mpn/Makefile mpq/Makefile \
mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
tests/Makefile tests/devel/Makefile \
-@@ -3647,7 +3639,8 @@
+@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile \
tests/cxx/Makefile \
doc/Makefile tune/Makefile \
demos/Makefile demos/calc/Makefile demos/expr/Makefile \
- gmp.h:gmp-h.in)
+ gmp.h:gmp-h.in])
+AC_OUTPUT
-
+
AC_MSG_NOTICE([summary of build options:
+
+--
+1.9.1
+
diff --git a/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
new file mode 100644
index 0000000000..1113b41ecd
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
@@ -0,0 +1,26 @@
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+This patch with pulled from gmp.
+https://gmplib.org/repo/gmp/rev/4a6d258b467f
+Upstream-Status: Backport
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1395835068 -3600
+# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
+# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a
+Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
+
+diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
+--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100
++++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100
+@@ -43,6 +43,9 @@
+ define(`n', `r4')
+ define(`v0', `r5')
+
++ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
++ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
++
+ EXTERN_FUNC(mpn_mod_1)
+ EXTERN_FUNC(mpn_modexact_1c_odd)
diff --git a/meta/recipes-support/gmp/gmp_4.2.1.bb b/meta/recipes-support/gmp/gmp_4.2.1.bb
deleted file mode 100644
index 5c93925daa..0000000000
--- a/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "GNU multiprecision arithmetic library"
-DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
-HOMEPAGE = "http://gmplib.org/"
-BUGTRACKER = "http://gmplib.org/mailman/listinfo/gmp-bugs"
-# demo is licensed under GPLv2+, which however we don't package at all
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
- file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
- file://gmp-h.in;beginline=6;endline=21;md5=e056f74a12c3277d730dbcfb85d2ca34"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/gmp/${BP}.tar.bz2 \
- file://disable-stdc.patch \
- file://gmp_fix_for_automake-1.12.patch \
- "
-
-SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
-SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
-
-inherit autotools texinfo
diff --git a/meta/recipes-support/gmp/gmp_5.1.1.bb b/meta/recipes-support/gmp/gmp_5.1.1.bb
deleted file mode 100644
index 602061096a..0000000000
--- a/meta/recipes-support/gmp/gmp_5.1.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require gmp.inc
-LICENSE="LGPLv3&GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://version.c;endline=18;md5=d8c56b52b9092346b9f93b4da65ef790"
-
-SRC_URI_append = " file://use-includedir.patch \
- file://append_user_provided_flags.patch \
- "
-
-SRC_URI[md5sum] = "2fa018a7cd193c78494525f236d02dd6"
-SRC_URI[sha256sum] = "a0d4779f48b36519dfaceb5f987a7c76fcac223258bebea3bb2244310970afad"
diff --git a/meta/recipes-support/gmp/gmp_6.0.0.bb b/meta/recipes-support/gmp/gmp_6.0.0.bb
new file mode 100644
index 0000000000..6218491142
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp_6.0.0.bb
@@ -0,0 +1,14 @@
+require gmp.inc
+LICENSE="GPLv2 | LGPLv3"
+REVISION="a"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+SRC_URI_append = " file://use-includedir.patch \
+ file://append_user_provided_flags.patch \
+ file://gmp-6.0.0-ppc64.patch \
+"
+
+SRC_URI[md5sum] = "b7ff2d88cae7f8085bd5006096eed470"
+SRC_URI[sha256sum] = "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
new file mode 100644
index 0000000000..840666f302
--- /dev/null
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
@@ -0,0 +1,35 @@
+From b1de2c6290bc0651fe87a8c4fb52e7a0a5fe6322 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 5 Oct 2014 16:01:49 -0700
+Subject: [PATCH] gsystem-subprocess.c: Enable GNU extensions in system C
+ library
+
+This should export O_CLOEXEC where it is only
+available when _GNU_SOURCE is defined .e.g. uclibc based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+---
+ src/libgsystem/gsystem-subprocess.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/libgsystem/gsystem-subprocess.c b/src/libgsystem/gsystem-subprocess.c
+index a967896..a52a362 100644
+--- a/src/libgsystem/gsystem-subprocess.c
++++ b/src/libgsystem/gsystem-subprocess.c
+@@ -18,6 +18,10 @@
+
+ #include "config.h"
+
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #define _GSYSTEM_NO_LOCAL_ALLOC
+ #include "libgsystem.h"
+
+--
+2.1.1
+
diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
index 146a02ac7d..482de99d4d 100644
--- a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
@@ -2,7 +2,9 @@ SUMMARY = "Test runner for GNOME-style installed tests"
HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
LICENSE = "LGPLv2+"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
+ file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
+ "
SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
@@ -11,7 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
DEPENDS = "glib-2.0"
-inherit autotools-brokensep pkgconfig
+inherit autotools pkgconfig
+
+PR = "r1"
PACKAGECONFIG ??= ""
PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,systemd,systemd"
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
new file mode 100644
index 0000000000..c9addca28e
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
@@ -0,0 +1,62 @@
+From e2202ff2b704623efc6277fb5256e4e15bac5676 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk@gnupg.org>
+Date: Thu, 25 Jul 2013 11:17:52 +0200
+Subject: [PATCH] Mitigate a flush+reload cache attack on RSA secret
+ exponents.
+
+commit e2202ff2b704623efc6277fb5256e4e15bac5676 from
+git://git.gnupg.org/libgcrypt.git
+
+* mpi/mpi-pow.c (gcry_mpi_powm): Always perfrom the mpi_mul for
+exponents in secure memory.
+
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+--
+
+The attack is published as http://eprint.iacr.org/2013/448 :
+
+Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel
+Attack by Yuval Yarom and Katrina Falkner. 18 July 2013.
+
+ Flush+Reload is a cache side-channel attack that monitors access to
+ data in shared pages. In this paper we demonstrate how to use the
+ attack to extract private encryption keys from GnuPG. The high
+ resolution and low noise of the Flush+Reload attack enables a spy
+ program to recover over 98% of the bits of the private key in a
+ single decryption or signing round. Unlike previous attacks, the
+ attack targets the last level L3 cache. Consequently, the spy
+ program and the victim do not need to share the execution core of
+ the CPU. The attack is not limited to a traditional OS and can be
+ used in a virtualised environment, where it can attack programs
+ executing in a different VM.
+
+Index: gnupg-1.4.7/mpi/mpi-pow.c
+===================================================================
+--- gnupg-1.4.7.orig/mpi/mpi-pow.c
++++ gnupg-1.4.7/mpi/mpi-pow.c
+@@ -212,7 +212,13 @@ mpi_powm( MPI res, MPI base, MPI exponen
+ tp = rp; rp = xp; xp = tp;
+ rsize = xsize;
+
+- if( (mpi_limb_signed_t)e < 0 ) {
++ /* To mitigate the Yarom/Falkner flush+reload cache
++ * side-channel attack on the RSA secret exponent, we do
++ * the multiplication regardless of the value of the
++ * high-bit of E. But to avoid this performance penalty
++ * we do it only if the exponent has been stored in secure
++ * memory and we can thus assume it is a secret exponent. */
++ if (esec || (mpi_limb_signed_t)e < 0) {
+ /*mpihelp_mul( xp, rp, rsize, bp, bsize );*/
+ if( bsize < KARATSUBA_THRESHOLD ) {
+ mpihelp_mul( xp, rp, rsize, bp, bsize );
+@@ -227,6 +233,8 @@ mpi_powm( MPI res, MPI base, MPI exponen
+ mpihelp_divrem(xp + msize, 0, xp, xsize, mp, msize);
+ xsize = msize;
+ }
++ }
++ if ( (mpi_limb_signed_t)e < 0 ) {
+
+ tp = rp; rp = xp; xp = tp;
+ rsize = xsize;
diff --git a/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch b/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
new file mode 100644
index 0000000000..3dc506c2f2
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: gnupg-2.1.0/dirmngr/Makefile.am
+===================================================================
+--- gnupg-2.1.0.orig/dirmngr/Makefile.am
++++ gnupg-2.1.0/dirmngr/Makefile.am
+@@ -71,7 +71,8 @@ endif
+ dirmngr_LDADD = $(libcommontlsnpth) $(libcommonpth) \
+ ../gl/libgnu.a $(DNSLIBS) $(LIBASSUAN_LIBS) \
+ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
+- $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
++ $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV) \
++ $(GPG_ERROR_LIBS)
+ if !USE_LDAPWRAPPER
+ dirmngr_LDADD += $(ldaplibs)
+ endif
diff --git a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
index ae92392dae..5e036bac90 100644
--- a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
+++ b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
@@ -5,11 +5,11 @@ Upstream-Status: Rejected
RP 2014/5/22
-Index: gnupg-2.0.22/m4/gnupg-pth.m4
+Index: gnupg-2.1.0/m4/gnupg-pth.m4
===================================================================
---- gnupg-2.0.22.orig/m4/gnupg-pth.m4 2013-10-04 12:32:53.000000000 +0000
-+++ gnupg-2.0.22/m4/gnupg-pth.m4 2014-05-13 21:33:21.000000000 +0000
-@@ -17,33 +17,9 @@
+--- gnupg-2.1.0.orig/m4/gnupg-pth.m4
++++ gnupg-2.1.0/m4/gnupg-pth.m4
+@@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY
# Taken and modified from the m4 macros which come with Pth.
AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
[
@@ -44,7 +44,7 @@ Index: gnupg-2.0.22/m4/gnupg-pth.m4
if test $have_pth = yes; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([whether PTH installation is sane])
-@@ -51,9 +29,9 @@
+@@ -51,9 +27,9 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
_gnupg_pth_save_cflags=$CFLAGS
_gnupg_pth_save_ldflags=$LDFLAGS
_gnupg_pth_save_libs=$LIBS
@@ -57,30 +57,34 @@ Index: gnupg-2.0.22/m4/gnupg-pth.m4
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
],
[[ pth_init ();]])],
-@@ -81,23 +59,11 @@
+@@ -80,26 +56,13 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ # PTH_CLFAGS and PTH_LIBS are AS_SUBST.
#
AC_DEFUN([GNUPG_PATH_PTH],
-+[
-[ AC_ARG_WITH(pth-prefix,
- AC_HELP_STRING([--with-pth-prefix=PFX],
-- [prefix where GNU Pth is installed]),
+- [prefix where GNU Pth is installed (optional)]),
- pth_config_prefix="$withval", pth_config_prefix="")
- if test x$pth_config_prefix != x ; then
- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
- fi
- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
++[
tmp=ifelse([$1], ,1.3.7,$1)
- if test "$PTH_CONFIG" != "no"; then
- GNUPG_PTH_VERSION_CHECK($tmp)
-- if test $have_pth = yes; then
+- if test $have_pth = yes; then
- PTH_CFLAGS=`$PTH_CONFIG --cflags`
- PTH_LIBS=`$PTH_CONFIG --ldflags`
- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
+- AC_DEFINE(HAVE_PTH, 1,
+ GNUPG_PTH_VERSION_CHECK($tmp)
+ if test $have_pth = yes; then
- AC_DEFINE(HAVE_PTH, 1,
++ AC_DEFINE(HAVE_PTH, 1,
[Defined if the GNU Pth is available])
- fi
fi
AC_SUBST(PTH_CFLAGS)
AC_SUBST(PTH_LIBS)
+ ])
+-
diff --git a/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch b/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
new file mode 100644
index 0000000000..c6dbf1b75a
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
@@ -0,0 +1,72 @@
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: gnupg-2.1.0/m4/npth.m4
+===================================================================
+--- gnupg-2.1.0.orig/m4/npth.m4
++++ gnupg-2.1.0/m4/npth.m4
+@@ -17,10 +17,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
+ if test "x$npth_config_prefix" != x ; then
+ NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
+ fi
+- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
++ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
+
+- if test "$NPTH_CONFIG" != "no" ; then
+- npth_version=`$NPTH_CONFIG --version`
++ if test "$PKGCONFIG" != "no" ; then
++ npth_version=`$PKGCONFIG --modversion npth`
+ fi
+ npth_version_major=`echo $npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+@@ -45,7 +45,7 @@ AC_DEFUN([AM_PATH_NPTH],
+
+ AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
+ ok=no
+- if test "$NPTH_CONFIG" != "no" ; then
++ if test "$PKGCONFIG" != "no" ; then
+ req_major=`echo $min_npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_npth_version | \
+@@ -66,28 +66,9 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ if test $ok = yes; then
+ AC_MSG_RESULT([yes ($npth_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
+- if test $ok = yes; then
+- # If we have a recent NPTH, we should also check that the
+- # API is compatible.
+- if test "$req_npth_api" -gt 0 ; then
+- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
+- if test "$tmp" -gt 0 ; then
+- AC_MSG_CHECKING([NPTH API version])
+- if test "$req_npth_api" -eq "$tmp" ; then
+- AC_MSG_RESULT([okay])
+- else
+- ok=no
+- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
+- NPTH_LIBS=`$NPTH_CONFIG --libs`
++ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
++ NPTH_LIBS=`$PKGCONFIG --libs npth`
++ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
+ ifelse([$2], , :, [$2])
+ npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
+ if test x"$npth_config_host" != xnone ; then
+@@ -103,6 +84,7 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ fi
+ else
++ AC_MSG_RESULT(no)
+ NPTH_CFLAGS=""
+ NPTH_LIBS=""
+ ifelse([$3], , :, [$3])
diff --git a/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
index 031eaf3cab..aef515d534 100644
--- a/meta/recipes-support/gnupg/gnupg_1.4.7.bb
+++ b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -17,6 +17,7 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \
file://curl_typeof_fix_backport.patch \
file://CVE-2013-4351.patch \
file://CVE-2013-4576.patch \
+ file://CVE-2013-4242.patch \
"
SRC_URI[md5sum] = "b06a141cca5cd1a55bbdd25ab833303c"
@@ -95,3 +96,7 @@ FILES_gpgv = "${bindir}/gpgv"
# Exclude debug files from the main packages
FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
FILES_${PN}-dbg += "${libexecdir}/${BPN}/.debug"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR},--without-libcurl,curl"
+PACKAGECONFIG[libusb] = "--with-libusb=${STAGING_LIBDIR},--without-libusb,libusb-compat"
diff --git a/meta/recipes-support/gnupg/gnupg_2.0.23.bb b/meta/recipes-support/gnupg/gnupg_2.1.1.bb
index 30414f943c..a7c42545bd 100644
--- a/meta/recipes-support/gnupg/gnupg_2.0.23.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.1.1.bb
@@ -4,25 +4,26 @@ LICENSE = "GPLv3 & LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "${PTH} libassuan libksba zlib bzip2 readline libgcrypt"
-PTH = "pth"
-PTH_libc-uclibc = "npth"
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
inherit autotools gettext texinfo pkgconfig
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://pkgconfig.patch"
+ file://pkgconfig.patch \
+ file://use-pkgconfig-instead-of-npth-config.patch \
+ file://dirmngr-uses-libgpg-error.patch \
+ "
-SRC_URI[md5sum] = "1c30b3aa1f99f17b4988e1ab616355d4"
-SRC_URI[sha256sum] = "cf196b8056eafb4236f000a3e12543e0022a1fec4d6edff1b91b48936c109841"
+SRC_URI[md5sum] = "9a314c3dcef0a091de90b6aa4d467db5"
+SRC_URI[sha256sum] = "70ecd01d2875db62624c911c2fd815742f50aef5492698eb3bfc09a08690ce49"
EXTRA_OECONF = "--disable-ldap \
--disable-ccid-driver \
- --without-libcurl \
--with-zlib=${STAGING_LIBDIR}/.. \
--with-bzip2=${STAGING_LIBDIR}/.. \
--with-readline=${STAGING_LIBDIR}/.. \
"
+RRECOMMENDS_${PN} = "pinentry"
do_configure_prepend () {
# Else these could be used in prefernce to those in aclocal-copy
@@ -36,3 +37,5 @@ do_install_append() {
ln -sf gpg2 ${D}${bindir}/gpg
ln -sf gpgv2 ${D}${bindir}/gpgv
}
+
+RDEPENDS_${PN} = "gnutls"
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
index 8820b0ef39..45fb529fa1 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -17,7 +17,7 @@ SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
-inherit autotools-brokensep texinfo binconfig pkgconfig gettext lib_package
+inherit autotools texinfo binconfig pkgconfig gettext lib_package
EXTRA_OECONF="--disable-rpath \
--with-included-libtasn1 \
@@ -25,6 +25,7 @@ EXTRA_OECONF="--disable-rpath \
--with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
--with-libz-prefix=${STAGING_DIR_HOST}${prefix} \
--disable-guile \
+ --disable-crywrap \
--without-p11-kit \
"
@@ -34,6 +35,9 @@ do_configure_prepend() {
done
}
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers"
+
PACKAGES =+ "${PN}-openssl ${PN}-xx"
FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
@@ -42,4 +46,4 @@ FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
LDFLAGS_append_libc-uclibc += " -pthread"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch b/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
new file mode 100644
index 0000000000..44a9934b5d
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
@@ -0,0 +1,31 @@
+From eb93aa7b986c84da60a3db40afb29d1a70c50223 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 17 Jan 2015 17:02:15 +0000
+Subject: [PATCH] configure.ac: fix sed command
+
+The "sed 's/.bak//g'" matchs "bitbake", which would cause strange errors
+when the S contains "bitbake", fix to "sed 's/\.bak$//'`"
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c6818a0..1c4582d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -466,7 +466,7 @@ if test "$NEED_LIBOPTS_DIR" = "true";then
+ dnl replace libopts-generated files with distributed backups, if present
+ missing_baks=
+ for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
+- nam=`echo $i|sed 's/.bak//g'`
++ nam=`echo $i|sed 's/\.bak$//'`
+ if test -f $i;then
+ cp -f $i $nam
+ else
+--
+2.0.1
+
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.12.bb b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
new file mode 100644
index 0000000000..0d6ec756e6
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
@@ -0,0 +1,7 @@
+require gnutls.inc
+
+SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
+ file://configure.ac-fix-sed-command.patch \
+ "
+SRC_URI[md5sum] = "a37b20b4352a5f542367ded904729c90"
+SRC_URI[sha256sum] = "67ab3e92c5d48f3323b897d7c1aa0bb2af6f3a84f5bd9931cda163a7ff32299b"
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.5.bb b/meta/recipes-support/gnutls/gnutls_3.3.5.bb
deleted file mode 100644
index b3daa49249..0000000000
--- a/meta/recipes-support/gnutls/gnutls_3.3.5.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
- "
-
-SRC_URI[md5sum] = "1f396dcf3c14ea67de7243821006d1a2"
-SRC_URI[sha256sum] = "48f34ae032692c498e782e9f1369506572be40ecf7f3f3604b0b00bad1b10477"
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
new file mode 100644
index 0000000000..30a4d56d6e
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: gpgme
+Description: GNU Privacy Guard Made Easy
+Version: 1.4.3
+Requires:
+Libs: -L${libdir} -lgpgme -lassuan -lgpg-error
+Cflags: -I${includedir}
diff --git a/meta/recipes-support/gpgme/gpgme_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
index ef08d4f2f4..ca1e5f9344 100644
--- a/meta/recipes-support/gpgme/gpgme_1.4.3.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
- file://disable_gpgconf_check.patch"
+ file://disable_gpgconf_check.patch \
+ file://gpgme.pc"
SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"
@@ -32,3 +33,8 @@ do_configure_prepend () {
rm -f ${S}/m4/gpg-error.m4
rm -f ${S}/m4/libassuan.m4
}
+
+do_install_append () {
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
+}
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index 77321076d5..26994bb901 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -7,6 +7,7 @@ DEPENDS = "icu-native"
DEPENDS_class-native = ""
S = "${WORKDIR}/icu/source"
+SPDX_S = "${WORKDIR}/icu"
STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
PARALLEL_MAKE = ""
@@ -24,7 +25,7 @@ EXTRA_OECONF_class-native = ""
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
# ICU puts custom m4 autoconf functions in aclocal.m4.
-# However, this file is deleted in our build system.
+# However, this file is deleted in our build system.
# To make it work, we copy aclocal.m4 to acinclude.m4.
# This is a bug of ICU. See bug reference:
# http://bugs.icu-project.org/trac/ticket/9790
diff --git a/meta/recipes-support/icu/icu_53.1.bb b/meta/recipes-support/icu/icu_54.1.bb
index d93af68438..45b5cb6001 100644
--- a/meta/recipes-support/icu/icu_53.1.bb
+++ b/meta/recipes-support/icu/icu_54.1.bb
@@ -1,6 +1,6 @@
require icu.inc
-LIC_FILES_CHKSUM = "file://../license.html;md5=8b139ac5b93769623bd343318048238c"
+LIC_FILES_CHKSUM = "file://../license.html;md5=9890f5ff4ed056a0c2fa84848b9b6066"
def icu_download_version(d):
pvsplit = d.getVar('PV', True).split('.')
@@ -16,6 +16,6 @@ SRC_URI = "${BASE_SRC_URI} \
SRC_URI_append_class-target = "\
file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
"
+SRC_URI[md5sum] = "e844caed8f2ca24c088505b0d6271bc0"
+SRC_URI[sha256sum] = "d42bc9a8ca6a91c55eb0925c279f49e5b508d51ef26ac9850d9be55de5bb8ab3"
-SRC_URI[md5sum] = "b73baa6fbdfef197608d1f69300919b9"
-SRC_URI[sha256sum] = "6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28"
diff --git a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
index 4f968812c9..f130d85652 100644
--- a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
+++ b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -6,18 +6,18 @@ Upstream-Status: Rejected
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: libassuan-2.1.1/Makefile.am
+Index: libassuan-2.1.2/Makefile.am
===================================================================
---- libassuan-2.1.1.orig/Makefile.am 2014-05-13 20:57:37.794398357 +0000
-+++ libassuan-2.1.1/Makefile.am 2014-05-13 20:57:37.790398357 +0000
-@@ -24,10 +24,13 @@
+--- libassuan-2.1.2.orig/Makefile.am
++++ libassuan-2.1.2/Makefile.am
+@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
GITLOG_TO_CHANGELOG=gitlog-to-changelog
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libassuan.pc
+
- EXTRA_DIST = config.rpath autogen.sh README.GIT \
+ EXTRA_DIST = autogen.sh autogen.rc README.GIT \
ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
tests/ChangeLog-2011 contrib/ChangeLog-2011 \
- build-aux/git-log-footer build-aux/git-log-fix
@@ -25,10 +25,10 @@ Index: libassuan-2.1.1/Makefile.am
SUBDIRS = m4 src doc tests
-Index: libassuan-2.1.1/libassuan.pc.in
+Index: libassuan-2.1.2/libassuan.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libassuan-2.1.1/libassuan.pc.in 2014-05-13 20:57:37.790398357 +0000
+--- /dev/null
++++ libassuan-2.1.2/libassuan.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -44,11 +44,11 @@ Index: libassuan-2.1.1/libassuan.pc.in
+Libs: -L${libdir} -lassuan
+Libs.private: -lgpg-error
+Cflags: -I${includedir}
-Index: libassuan-2.1.1/configure.ac
+Index: libassuan-2.1.2/configure.ac
===================================================================
---- libassuan-2.1.1.orig/configure.ac 2014-05-13 20:57:37.794398357 +0000
-+++ libassuan-2.1.1/configure.ac 2014-05-13 20:57:37.790398357 +0000
-@@ -434,7 +434,7 @@
+--- libassuan-2.1.2.orig/configure.ac
++++ libassuan-2.1.2/configure.ac
+@@ -439,7 +439,7 @@ AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
AC_CONFIG_FILES([src/versioninfo.rc])
@@ -57,11 +57,11 @@ Index: libassuan-2.1.1/configure.ac
AC_OUTPUT
echo "
-Index: libassuan-2.1.1/src/libassuan.m4
+Index: libassuan-2.1.2/src/libassuan.m4
===================================================================
---- libassuan-2.1.1.orig/src/libassuan.m4 2011-04-06 15:37:26.000000000 +0000
-+++ libassuan-2.1.1/src/libassuan.m4 2014-05-13 21:06:53.402395537 +0000
-@@ -15,18 +15,6 @@
+--- libassuan-2.1.2.orig/src/libassuan.m4
++++ libassuan-2.1.2/src/libassuan.m4
+@@ -15,18 +15,6 @@ dnl Returns ok set to yes or no.
dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -80,7 +80,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
tmp=ifelse([$1], ,1:0.9.2,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-@@ -37,51 +25,12 @@
+@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
min_libassuan_version="$tmp"
fi
@@ -134,7 +134,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBASSUAN API version])
if test "$req_libassuan_api" -eq "$tmp" ; then
-@@ -96,7 +45,7 @@
+@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test x"$host" != x ; then
@@ -143,7 +143,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
if test x"$libassuan_config_host" != xnone ; then
if test x"$libassuan_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -137,12 +86,8 @@
+@@ -137,12 +86,8 @@ dnl
AC_DEFUN([AM_PATH_LIBASSUAN],
[ _AM_PATH_LIBASSUAN_COMMON($1)
if test $ok = yes; then
diff --git a/meta/recipes-support/libassuan/libassuan_2.1.1.bb b/meta/recipes-support/libassuan/libassuan_2.2.0.bb
index d66023320d..5fc8b8c92f 100644
--- a/meta/recipes-support/libassuan/libassuan_2.1.1.bb
+++ b/meta/recipes-support/libassuan/libassuan_2.2.0.bb
@@ -13,8 +13,8 @@ DEPENDS = "libgpg-error"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
file://libassuan-add-pkgconfig-support.patch"
-SRC_URI[md5sum] = "757243cc4a71b30ed8d8dbe784035d36"
-SRC_URI[sha256sum] = "23e2d67779b88e90d29fe1df6b157109f1c2a647d0f1b2a0f4295bb3c0b2039d"
+SRC_URI[md5sum] = "a104faed3e97b9c302c5d67cc22b1d60"
+SRC_URI[sha256sum] = "7df58ed70be4b694f77efd1f3b3f103c6311b6b71e04a370382f9fe8204f6ec6"
BINCONFIG = "${bindir}/libassuan-config"
@@ -22,5 +22,5 @@ inherit autotools texinfo binconfig-disabled pkgconfig
do_configure_prepend () {
# Else these could be used in prefernce to those in aclocal-copy
- rm ${S}/m4/*.m4
+ rm -f ${S}/m4/*.m4
}
diff --git a/meta/recipes-support/libbsd/libbsd_0.6.0.bb b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
index 70926bf742..902666da7f 100644
--- a/meta/recipes-support/libbsd/libbsd_0.6.0.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
@@ -9,12 +9,13 @@ DESCRIPTION = "This library provides useful functions commonly found on BSD syst
HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
LICENSE = "BSD-4-Clause & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=98a015f07e71239b058398054f506f07"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f1530ea92aeaa1c5e2547cfd43905d8c"
SECTION = "libs"
DEPENDS = ""
SRC_URI = "http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f6c75f0a9818e323a589bcbd560a0eb4"
-SRC_URI[sha256sum] = "9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62"
+
+SRC_URI[md5sum] = "fcceb4e66fd448ca4ed42ba22a8babb0"
+SRC_URI[sha256sum] = "0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb"
inherit autotools pkgconfig
diff --git a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
deleted file mode 100644
index a5571883d3..0000000000
--- a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-fix CAP_LAST_CAP
-
-Upstream-Status: pending
-
-Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into
-kernel, but libcap did not update them.
-Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and
-application always use capability.h from kernel, that will make cap_get_flag
-return wrong value.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- libcap/include/linux/capability.h | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h
-index 4924f2a..57026be 100644
---- a/libcap/include/linux/capability.h
-+++ b/libcap/include/linux/capability.h
-@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data {
- CAP_SYS_ADMIN is not acceptable anymore. */
- #define CAP_SYSLOG 34
-
--#define CAP_LAST_CAP CAP_SYSLOG
-+/* Allow triggering something that will wake the system */
-+
-+#define CAP_WAKE_ALARM 35
-+
-+/* Allow preventing system suspends */
-+
-+#define CAP_BLOCK_SUSPEND 36
-+
-+#define CAP_LAST_CAP CAP_BLOCK_SUSPEND
-
- #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
-
---
-1.7.10.4
-
diff --git a/meta/recipes-support/libcap/libcap_2.22.bb b/meta/recipes-support/libcap/libcap_2.22.bb
deleted file mode 100644
index a989bb6a6b..0000000000
--- a/meta/recipes-support/libcap/libcap_2.22.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require libcap.inc
-
-PR = "r6"
-
-SRC_URI[md5sum] = "b4896816b626bea445f0b3849bdd4077"
-SRC_URI[sha256sum] = "e1cae65d8febf2579be37c255d2e058715785ead481a4e6a4357a06aff84721f"
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap_2.24.bb
index a21420fd9b..75cf5d415d 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap_2.24.bb
@@ -7,10 +7,10 @@ LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
DEPENDS = "perl-native-runtime"
-SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
- file://fix-CAP_LAST_CAP.patch"
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
-PR = "r1"
+SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80"
+SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65"
inherit lib_package
@@ -56,8 +56,10 @@ do_install_append() {
# Move the library to base_libdir
install -d ${D}${base_libdir}
if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${libdir}/* ${D}${base_libdir}
- rmdir ${D}${libdir}
+ mv ${D}${libdir}/libcap* ${D}${base_libdir}
+ if [ -d ${D}${libdir}/security ]; then
+ mv ${D}${libdir}/security ${D}${base_libdir}
+ fi
fi
}
@@ -67,4 +69,4 @@ FILES_${PN}-dev += "${base_libdir}/*.so"
FILES_${PN} += "${base_libdir}/security/*.so"
FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcheck/libcheck_0.9.13.bb b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
index 8c063d4696..2a69ff7733 100644
--- a/meta/recipes-support/libcheck/libcheck_0.9.13.bb
+++ b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
"
-SRC_URI[md5sum] = "95530868f81a9496b2518fd2b713008a"
-SRC_URI[sha256sum] = "ca6589c34f9c60ffd4c3e198ce581e944a9f040ca9352ed54068dd61bebb5cb7"
+SRC_URI[md5sum] = "38263d115d784c17aa3b959ce94be8b8"
+SRC_URI[sha256sum] = "c272624645b1b738cf57fd5d81a3e4d9b722b99d6133ee3f3c4007d4d279840a"
S = "${WORKDIR}/check-${PV}"
diff --git a/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
index 278934e68d..88696a4f47 100644
--- a/meta/recipes-support/libcroco/libcroco_0.6.8.bb
+++ b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
@@ -11,11 +11,11 @@ SECTION = "x11/utils"
DEPENDS = "glib-2.0 libxml2 zlib"
BBCLASSEXTEND = "native"
EXTRA_OECONF += "--enable-Bsymbolic=auto"
-PR = "r1"
+PR = "r2"
BINCONFIG = "${bindir}/croco-0.6-config"
-inherit autotools-brokensep pkgconfig gnomebase gtk-doc binconfig-disabled
+inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
GNOME_COMPRESS_TYPE = "xz"
diff --git a/meta/recipes-support/libevdev/libevdev_1.3.bb b/meta/recipes-support/libevdev/libevdev_1.3.bb
new file mode 100644
index 0000000000..7206b307e0
--- /dev/null
+++ b/meta/recipes-support/libevdev/libevdev_1.3.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+ file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+SRC_URI[md5sum] = "ab67de8f949e84ae2abb48af09eda423"
+SRC_URI[sha256sum] = "265411ce79a592b3074e9d07fb97d462745d0c7ef178254a6f720245ed253446"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
deleted file mode 100644
index 5d39d1954d..0000000000
--- a/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix make parallelism issue
-
-- remove pkginclude_HEADERS ( LIBFM_INCLUDES and LIBFM_GTK_INCLUDES
-variables are empty)
-- if we don't remove it then we will have a race condition between the code
-that tries to symlink ${includedir}/libfm-1.0 to ${includedir}/libfm and the
-am autogenerated code from the pkginclude_HEADERS definition which
-tries to create pkgincludedir (${includedir}/libfm);
-- if pkgincludedir is created before the symlink the symlink will be created
-in the ${includedir}/libfm dir and it will have libfm-1.0 as name which is
-wrong (we need the ${includedir}/libfm symlink for pcmanfm)
-
-Upstream-Status: Pending
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: libfm-1.1.0/src/Makefile.am
-===================================================================
---- libfm-1.1.0.orig/src/Makefile.am
-+++ libfm-1.1.0/src/Makefile.am
-@@ -211,11 +211,6 @@ libfmgtkinclude_HEADERS = \
- gtk/fm-gtk-marshal.h \
- $(NULL)
-
--pkginclude_HEADERS = \
-- $(LIBFM_INCLUDES) \
-- $(LIBFM_GTK_INCLUDES) \
-- $(NULL)
--
- EXTRA_LTLIBRARIES = libfm-gtk.la libfm-gtk3.la
-
- lib_LTLIBRARIES = libfm.la @LIBFM_GTK_LTLIBRARIES@
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
deleted file mode 100644
index 58a2f09d66..0000000000
--- a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libfm-1.1.2.2/configure.ac libfm-1.1.2.2/configure.ac
---- libfm-1.1.2.2/configure.ac 2013-08-22 23:16:09.000000000 +0300
-+++ libfm-1.1.2.2/configure.ac 2013-10-25 01:35:18.110323079 +0300
-@@ -3,7 +3,7 @@
-
- AC_PREREQ([2.63])
- AC_INIT([libfm], [1.1.2.2], [http://pcmanfm.sourceforge.net/])
--AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-+AM_INIT_AUTOMAKE([-Wall foreign])
- AC_CONFIG_MACRO_DIR(m4)
- AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-support/libfm/libfm-extra_1.2.3.bb b/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
new file mode 100644
index 0000000000..85bcc3c0c3
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 intltool-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/meta/recipes-support/libfm/libfm_1.1.2.2.bb b/meta/recipes-support/libfm/libfm_1.1.2.2.bb
deleted file mode 100644
index 10f31d9911..0000000000
--- a/meta/recipes-support/libfm/libfm_1.1.2.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://src/fm.h;endline=22;md5=e64555171770a551e3b51cc06fc62f1a \
- file://src/base/fm-config.h;endline=23;md5=ad0fc418c3cf041eea35ddb3daf37f17"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.gz \
- file://fix-make-parallelism-issue.patch \
- file://ignore_automake_warnings.patch \
- "
-
-SRC_URI[md5sum] = "ea3d09b23ef4c37cb84ae57ea16b8f08"
-SRC_URI[sha256sum] = "158e2b6974350d2dab15932b496bb4d448553e60bbf7cdfe4d6e9bd99d19d682"
-
-inherit autotools-brokensep pkgconfig gtk-doc
-
-do_configure[dirs] =+ "${S}/m4"
-
-PACKAGES += "${PN}-mime"
-FILES_${PN}-mime = "${datadir}/mime/"
diff --git a/meta/recipes-support/libfm/libfm_1.2.3.bb b/meta/recipes-support/libfm/libfm_1.2.3.bb
new file mode 100644
index 0000000000..629502f68f
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm_1.2.3.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
+
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES += "${PN}-mime"
+FILES_${PN}-mime = "${datadir}/mime/"
+FILES_${PN}-dbg += "${libdir}/libfm/modules/.debug"
+
+do_install_append () {
+ # remove files which are part of libfm-extra
+ rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-version.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
+ rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
+ rm -f ${D}${libdir}/libfm-extra.so*
+ rm -f ${D}${libdir}/libfm-extra.a
+ rm -f ${D}${libdir}/libfm-extra.la
+}
diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
index fa2bc38284..eea67aa58d 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -18,13 +18,15 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
BINCONFIG = "${bindir}/libgcrypt-config"
-inherit autotools-brokensep texinfo binconfig-disabled pkgconfig
+PR = "r1"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
EXTRA_OECONF = "--disable-asm --with-capabilities"
do_configure_prepend () {
- # Else these could be used in prefernce to those in aclocal-copy
- rm -f ${S}/m4/*.m4
+ # Else this could be used in preference to the one in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
}
# libgcrypt.pc is added locally and thus installed here
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
deleted file mode 100644
index 1657ea4de4..0000000000
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require libgcrypt.inc
-
-SRC_URI[md5sum] = "d155aa1b06fa879175922ba28f6a6509"
-SRC_URI[sha256sum] = "7c1007197bef49c3b8740cf6af8b4eb4eb74c7a69796ebcf555d928c287255de"
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb
new file mode 100644
index 0000000000..c49c0e7c17
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "d19adc062edff0ebc7e887212733ef1f"
+SRC_URI[sha256sum] = "936921644b9c81e2395e18a554a9a5f9252aae3976f8afc3e4229ee9d785e627"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
index 2a2c1e9c21..96476badaa 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch
+++ b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
@@ -5,11 +5,11 @@
Upstream-Status: Pending
-Index: libgpg-error-1.12/configure.ac
+Index: libgpg-error-1.17/configure.ac
===================================================================
---- libgpg-error-1.12.orig/configure.ac 2014-05-13 21:14:26.846393236 +0000
-+++ libgpg-error-1.12/configure.ac 2014-05-13 21:14:26.926393236 +0000
-@@ -217,6 +217,7 @@
+--- libgpg-error-1.17.orig/configure.ac
++++ libgpg-error-1.17/configure.ac
+@@ -521,6 +521,7 @@ AC_CONFIG_FILES([src/Makefile tests/Make
AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
AC_CONFIG_FILES([src/versioninfo.rc])
AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
@@ -17,11 +17,11 @@ Index: libgpg-error-1.12/configure.ac
AC_OUTPUT
-Index: libgpg-error-1.12/src/Makefile.am
+Index: libgpg-error-1.17/src/Makefile.am
===================================================================
---- libgpg-error-1.12.orig/src/Makefile.am 2014-05-13 21:14:26.846393236 +0000
-+++ libgpg-error-1.12/src/Makefile.am 2014-05-13 21:14:26.934393236 +0000
-@@ -37,13 +37,15 @@
+--- libgpg-error-1.17.orig/src/Makefile.am
++++ libgpg-error-1.17/src/Makefile.am
+@@ -74,13 +74,15 @@ nodist_include_HEADERS = gpg-error.h
bin_SCRIPTS = gpg-error-config
m4datadir = $(datadir)/aclocal
m4data_DATA = gpg-error.m4
@@ -31,17 +31,17 @@ Index: libgpg-error-1.12/src/Makefile.am
EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
mkerrnos.awk errnos.in README \
mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
- mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
+ mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
-- gpg-error.def.in versioninfo.rc.in
-+ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in
+- gpg-error.vers gpg-error.def.in versioninfo.rc.in \
++ gpg-error.vers gpg-error.def.in versioninfo.rc.in gpg-error.pc \
+ $(lock_obj_pub)
BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
- err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
-Index: libgpg-error-1.12/src/gpg-error.pc.in
+Index: libgpg-error-1.17/src/gpg-error.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libgpg-error-1.12/src/gpg-error.pc.in 2014-05-13 21:48:20.266382916 +0000
+--- /dev/null
++++ libgpg-error-1.17/src/gpg-error.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -52,13 +52,13 @@ Index: libgpg-error-1.12/src/gpg-error.pc.in
+Name: gpg-error
+Description: a library that defines common error values for all GnuPG components
+Version: @VERSION@
-+Libs: -L{libdir} -lgpg-error
++Libs: -L${libdir} -lgpg-error
+Cflags: -I${includedir}
-Index: libgpg-error-1.12/src/gpg-error.m4
+Index: libgpg-error-1.17/src/gpg-error.m4
===================================================================
---- libgpg-error-1.12.orig/src/gpg-error.m4 2014-05-13 21:45:02.038383922 +0000
-+++ libgpg-error-1.12/src/gpg-error.m4 2014-05-13 21:47:08.362383281 +0000
-@@ -15,58 +15,14 @@
+--- libgpg-error-1.17.orig/src/gpg-error.m4
++++ libgpg-error-1.17/src/gpg-error.m4
+@@ -26,73 +26,13 @@ dnl is added to the gpg_config_script_wa
dnl
AC_DEFUN([AM_PATH_GPG_ERROR],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -70,7 +70,7 @@ Index: libgpg-error-1.12/src/gpg-error.m4
- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
- [prefix where GPG Error is installed (optional)]),
- [gpg_error_config_prefix="$withval"])
-
+-
- dnl Accept --with-gpg-error-prefix and make it work the same as
- dnl --with-libgpg-error-prefix above, for backwards compatibility,
- dnl but do not document this old, inconsistently-named option.
@@ -78,14 +78,27 @@ Index: libgpg-error-1.12/src/gpg-error.m4
- [gpg_error_config_prefix="$withval"])
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
-- if test x$gpg_error_config_prefix != x ; then
-- if test x${GPG_ERROR_CONFIG+set} != xset ; then
-- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+- if test x"${GPG_ERROR_CONFIG}" = x ; then
+- if test x"${gpg_error_config_prefix}" != x ; then
+- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
- fi
- fi
+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
-- AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no)
+- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
- min_gpg_error_version=ifelse([$1], ,0.0,$1)
- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
- ok=no
@@ -113,6 +126,8 @@ Index: libgpg-error-1.12/src/gpg-error.m4
if test $ok = yes; then
- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
- AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
@@ -120,12 +135,14 @@ Index: libgpg-error-1.12/src/gpg-error.m4
if test x"$gpg_error_config_host" != xnone ; then
if test x"$gpg_error_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -80,9 +36,6 @@
+@@ -107,11 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
fi
fi
else
- GPG_ERROR_CFLAGS=""
- GPG_ERROR_LIBS=""
+- GPG_ERROR_MT_CFLAGS=""
+- GPG_ERROR_MT_LIBS=""
- AC_MSG_RESULT(no)
ifelse([$3], , :, [$3])
fi
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
deleted file mode 100644
index af9574d8fd..0000000000
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Small library that defines common error values for all GnuPG components"
-HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/gpg-error.h.in;endline=23;md5=6ac0378874589a44d53512b3786b4bc0 \
- file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c"
-
-
-SECTION = "libs"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
- file://pkgconfig.patch"
-
-SRC_URI[md5sum] = "8f0eb41a344d19ac2aa9bd101dfb9ce6"
-SRC_URI[sha256sum] = "cafc9ed6a87c53a35175d5a1220a96ca386696eef2fa059cc0306211f246e55f"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-
-do_install_append() {
- # we don't have common lisp in OE
- rm -rf "${D}${datadir}/common-lisp/"
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb
new file mode 100644
index 0000000000..c905bd1eb1
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/gpg-error.h.in;endline=23;md5=5dfe776dc8b62af093ddc859de6f494c \
+ file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
+
+
+SECTION = "libs"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch"
+
+SRC_URI[md5sum] = "b4f8d8b9ff14aed41f279aa844563539"
+SRC_URI[sha256sum] = "3ff4e5a71116eb862cd14185fcd282850927b8608e3b4186834fd940fbef57b5"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext
+
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${TARGET_OS} != "linux" ]; then
+ TARGET_FILE=${TARGET_OS}
+ fi
+
+ case ${TARGET_ARCH} in
+ aarch64) TUPLE=aarch64-unknown-linux-gnu ;;
+ arm) TUPLE=arm-unknown-linux-gnueabi ;;
+ armeb) TUPLE=arm-unknown-linux-gnueabi ;;
+ i586) TUPLE=i486-pc-linux-gnu ;;
+ mipsel) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips64el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips64) TUPLE=mips-unknown-linux-gnu ;;
+ mips) TUPLE=mips-unknown-linux-gnu ;;
+ powerpc64) TUPLE=powerpc64-unknown-linux-gnu ;;
+ powerpc) TUPLE=powerpc-unknown-linux-gnu ;;
+ sh4) TUPLE=sh4-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-pc-linux-gnu ;;
+ esac
+
+ cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+ ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+}
+
+do_install_append() {
+ # we don't have common lisp in OE
+ rm -rf "${D}${datadir}/common-lisp/"
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libical/files/pthread-fix.patch b/meta/recipes-support/libical/files/pthread-fix.patch
deleted file mode 100644
index 877b808fc0..0000000000
--- a/meta/recipes-support/libical/files/pthread-fix.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-New added pthread feature leads to some deadlock with some unlock code missing.
-This patch fix it.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Pending
-
-Index: libical-0.47/src/libical/icaltimezone.c
-===================================================================
---- libical-0.47.orig/src/libical/icaltimezone.c 2011-12-16 13:42:25.000000000 +0800
-+++ libical-0.47/src/libical/icaltimezone.c 2011-12-16 14:16:25.000000000 +0800
-@@ -1773,7 +1773,7 @@
- filename = (char*) malloc (filename_len);
- if (!filename) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
-- return;
-+ goto out;
- }
-
- snprintf (filename, filename_len, "%s/%s.ics", get_zone_directory(),
-@@ -1783,7 +1783,7 @@
- free (filename);
- if (!fp) {
- icalerror_set_errno(ICAL_FILE_ERROR);
-- return;
-+ goto out;
- }
-
-
-@@ -1807,7 +1807,7 @@
-
- if (!subcomp) {
- icalerror_set_errno(ICAL_PARSE_ERROR);
-- return;
-+ goto out;
- }
-
- icaltimezone_get_vtimezone_properties (zone, subcomp);
-@@ -1817,10 +1817,12 @@
- icalcomponent_free(comp);
- }
- #endif
--#ifdef HAVE_PTHREAD
-+
- out:
-+#ifdef HAVE_PTHREAD
- pthread_mutex_unlock(&builtin_mutex);
- #endif
-+ return;
- }
-
-
diff --git a/meta/recipes-support/libical/libical_0.48.bb b/meta/recipes-support/libical/libical_0.48.bb
deleted file mode 100644
index f464026f8c..0000000000
--- a/meta/recipes-support/libical/libical_0.48.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
-HOMEPAGE = "http://sourceforge.net/projects/freeassociation/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16077&atid=116077"
-LICENSE = "LGPLv2.1 | MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
- file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
-SECTION = "libs"
-
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/freeassociation/${BPN}/${P}/${BPN}-${PV}.tar.gz\
- file://pthread-fix.patch"
-
-SRC_URI[md5sum] = "e549f434d5fbf9cd156c60ed4943618f"
-SRC_URI[sha256sum] = "2ae78b0757f0dd13431acf42a9a8d038339fd4767fd5134e650bf60ee0b4dff0"
-
-inherit autotools
diff --git a/meta/recipes-support/libical/libical_1.0.0.bb b/meta/recipes-support/libical/libical_1.0.0.bb
new file mode 100644
index 0000000000..be6b635caf
--- /dev/null
+++ b/meta/recipes-support/libical/libical_1.0.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
+HOMEPAGE = "https://github.com/libical/libical"
+BUGTRACKER = "https://github.com/libical/libical/issues"
+LICENSE = "LGPLv2.1 | MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
+ file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
+SECTION = "libs"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36"
+SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2"
+
+inherit autotools
diff --git a/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
index c52564a42c..abf739bfa1 100644
--- a/meta/recipes-support/libiconv/libiconv_1.11.1.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
@@ -21,8 +21,8 @@ S = "${WORKDIR}/libiconv-${PV}"
inherit autotools pkgconfig gettext
python __anonymous() {
- if d.getVar("TCLIBC", True) == "eglibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - eglibc already provides iconv")
+ if d.getVar("TCLIBC", True) == "glibc":
+ raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
}
EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
index d5f47b4e34..1b6fe09bb7 100644
--- a/meta/recipes-support/libiconv/libiconv_1.14.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -25,8 +25,8 @@ inherit autotools pkgconfig gettext
python __anonymous() {
if d.getVar("TARGET_OS", True) != "linux":
return
- if d.getVar("TCLIBC", True) == "eglibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - eglibc already provides iconv")
+ if d.getVar("TCLIBC", True) == "glibc":
+ raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
}
EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
diff --git a/meta/recipes-support/libksba/libksba_1.3.0.bb b/meta/recipes-support/libksba/libksba_1.3.2.bb
index 13ad437629..cce08c302c 100644
--- a/meta/recipes-support/libksba/libksba_1.3.0.bb
+++ b/meta/recipes-support/libksba/libksba_1.3.2.bb
@@ -6,7 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
"
-PR = "r1"
DEPENDS = "libgpg-error"
@@ -17,8 +16,8 @@ inherit autotools binconfig-disabled pkgconfig texinfo
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
file://ksba-add-pkgconfig-support.patch"
-SRC_URI[md5sum] = "cd86fad9c9d360b2cf80449f8a4a4075"
-SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971"
+SRC_URI[md5sum] = "c3c9a66e22d87fe3ae59865250b8a09c"
+SRC_URI[sha256sum] = "eb95537955dfc2845690a4cc3836074fa6d0a2c2ca2cbf1759364d3bd9868406"
do_configure_prepend () {
# Else these could be used in preference to those in aclocal-copy
diff --git a/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch b/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
deleted file mode 100644
index 22b0d88428..0000000000
--- a/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 82fdf49c185fd5f3810781af9ef52aa6a52bf2df Mon Sep 17 00:00:00 2001
-From: "Song.Li" <Song.Li@windriver.com>
-Date: Thu, 28 Jun 2012 20:03:17 +0800
-Subject: [PATCH] fix lib/cache_mngr.c two parentheses bugs
-
-there are two parentheses bugs in libnl /lib/cache_mngr.c file.
-The parentheses doesn't make any sense,
-This will cause the variable err get a bool value,
-the correct value of variable err should be the return value
-of the function which can be any integer value.
-
----
- lib/cache_mngr.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Upstream-Status: Pending
-
-diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
-index dae8768..57cc1f9 100644
---- a/lib/cache_mngr.c
-+++ b/lib/cache_mngr.c
-@@ -150,10 +150,10 @@ int nl_cache_mngr_alloc(struct nl_sock *sk, int protocol, int flags,
- /* Required to receive async event notifications */
- nl_socket_disable_seq_check(mngr->cm_sock);
-
-- if ((err = nl_connect(mngr->cm_sock, protocol) < 0))
-+ if ((err = nl_connect(mngr->cm_sock, protocol)) < 0)
- goto errout;
-
-- if ((err = nl_socket_set_nonblocking(mngr->cm_sock) < 0))
-+ if ((err = nl_socket_set_nonblocking(mngr->cm_sock)) < 0)
- goto errout;
-
- NL_DBG(1, "Allocated cache manager %p, protocol %d, %d caches\n",
---
-1.7.9.5
-
diff --git a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
index b93d97b1b7..79aa0bdf11 100644
--- a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
+++ b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
@@ -6,24 +6,24 @@ newer version so we can assume this issue is fixed upstream
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-Index: libnl-3.2.14/lib/Makefile.am
+Index: libnl-3.2.25/lib/Makefile.am
===================================================================
---- libnl-3.2.14.orig/lib/Makefile.am
-+++ libnl-3.2.14/lib/Makefile.am
-@@ -39,9 +39,12 @@ CLEANFILES = \
+--- libnl-3.2.25.orig/lib/Makefile.am
++++ libnl-3.2.25/lib/Makefile.am
+@@ -46,9 +46,12 @@ CLEANFILES = \
# Hack to avoid using ylwrap. It does not function correctly in combination
# with --header-file=
+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
+route/pktloc_grammar.h: route/pktloc_grammar.c
route/pktloc_grammar.c: route/pktloc_grammar.l
- $(AM_V_GEN) $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
+ $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
+route/pktloc_syntax.h: route/pktloc_syntax.c
route/pktloc_syntax.c: route/pktloc_syntax.y
- $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $^
+ $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
-@@ -89,7 +92,9 @@ BUILT_SOURCES = \
+@@ -102,7 +105,9 @@ BUILT_SOURCES = \
route/cls/ematch_grammar.c \
route/cls/ematch_syntax.c \
route/pktloc_grammar.c \
diff --git a/meta/recipes-support/libnl/libnl_3.2.24.bb b/meta/recipes-support/libnl/libnl_3.2.25.bb
index d34ab74eac..97814fb134 100644
--- a/meta/recipes-support/libnl/libnl_3.2.24.bb
+++ b/meta/recipes-support/libnl/libnl_3.2.25.bb
@@ -3,6 +3,7 @@ HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
SECTION = "libs/network"
PE = "1"
+PR = "r1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
@@ -12,12 +13,12 @@ DEPENDS = "flex-native bison-native"
SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
file://fix-pktloc_syntax_h-race.patch \
file://fix-pc-file.patch \
- file://fix-lib-cache_mngr.c-two-parentheses-bugs.patch \
"
-SRC_URI[md5sum] = "6e0e7bad0674749d930dd9f285343d55"
-SRC_URI[sha256sum] = "fb8d6e5dc8af5b85bc6d00a71582a68a01e6a3f7d1664d4a646e289a99dd6816"
-inherit autotools-brokensep pkgconfig
+SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c"
+SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5"
+
+inherit autotools pkgconfig
FILES_${PN} = "${libdir}/libnl-3.so.* \
${libdir}/libnl.so.* \
diff --git a/meta/recipes-support/libpcre/libpcre/Makefile b/meta/recipes-support/libpcre/libpcre/Makefile
index 5419d71f7f..708d807d08 100644
--- a/meta/recipes-support/libpcre/libpcre/Makefile
+++ b/meta/recipes-support/libpcre/libpcre/Makefile
@@ -65,7 +65,7 @@ am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
MKDIR_P = /bin/mkdir -p
-PACKAGE_STRING = PCRE 8.34
+PACKAGE_STRING = PCRE 8.36
SHELL = /bin/sh
srcdir = .
top_srcdir = .
diff --git a/meta/recipes-support/libpcre/libpcre_8.35.bb b/meta/recipes-support/libpcre/libpcre_8.36.bb
index 92098c8c51..6aa0237aa4 100644
--- a/meta/recipes-support/libpcre/libpcre_8.35.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.36.bb
@@ -14,8 +14,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \
file://Makefile \
"
-SRC_URI[md5sum] = "6aacb23986adccd9b3bc626c00979958"
-SRC_URI[sha256sum] = "a961c1c78befef263cc130756eeca7b674b4e73a81533293df44e4265236865b"
+SRC_URI[md5sum] = "b767bc9af0c20bc9c1fe403b0d41ad97"
+SRC_URI[sha256sum] = "ef833457de0c40e82f573e34528f43a751ff20257ad0e86d272ed5637eb845bb"
S = "${WORKDIR}/pcre-${PV}"
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
index a53a197615..3367c85156 100644
--- a/meta/recipes-support/libproxy/libproxy_0.4.11.bb
+++ b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -29,7 +29,7 @@ do_configure_prepend() {
}
python() {
- if bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
+ if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE").replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS").split() if i != "gconf"))
}
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
index f062b2eefa..81da911926 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
@@ -23,7 +23,7 @@ SRC_URI[sha256sum] = "fa3d5574c1a2df521242e2ca624a2b3057121798cab9f8f40525aa186a
S = "${WORKDIR}/libsoup-${PV}"
-inherit autotools pkgconfig
+inherit autotools gettext pkgconfig
# glib-networking is needed for SSL, proxies, etc.
RRECOMMENDS_${PN} = "glib-networking"
diff --git a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
index a330c73412..d4489165bf 100644
--- a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -16,11 +16,11 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
gnulib-m4/iconv.m4 | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
-diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
-index f46ff14..de0a5e9 100644
---- a/gnulib-m4/iconv.m4
-+++ b/gnulib-m4/iconv.m4
-@@ -126,17 +126,6 @@ int main ()
+Index: libunistring-0.9.4/gnulib-m4/iconv.m4
+===================================================================
+--- libunistring-0.9.4.orig/gnulib-m4/iconv.m4 2014-11-03 17:41:29.755011917 +0000
++++ libunistring-0.9.4/gnulib-m4/iconv.m4 2014-11-03 17:43:03.795014480 +0000
+@@ -159,17 +159,6 @@
}
}
#endif
@@ -34,9 +34,7 @@ index f46ff14..de0a5e9 100644
- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
- /* Try HP-UX names. */
- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-- return 1;
- return 0;
- }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
- [case "$host_os" in
---
-1.7.4
+- result |= 16;
+ return result;
+ }]])],
+ [am_cv_func_iconv_works=yes],
diff --git a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
deleted file mode 100644
index 5d831d5491..0000000000
--- a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has deprecated use of mkdir_p, and it recommends
-use of MKDIR_P instead. Changed the code to avoid these kind
-of warning-errors.
-
-| make[2]: /build/tmp/work/x86_64-linux/libunistring-native-0.9.3-r2/image/srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/doc/libunistring: Command not found
-| make[2]: *** [install-html-split] Error 127
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/10
-
-Index: libunistring-0.9.3/doc/Makefile.am
-===================================================================
---- libunistring-0.9.3.orig/doc/Makefile.am
-+++ libunistring-0.9.3/doc/Makefile.am
-@@ -87,7 +87,7 @@ TEXI2DVI = @TEXI2DVI@ $(TEXINCLUDES)
- # The install-dvi target is already defined by automake.
-
- installdirs-dvi:
-- $(mkdir_p) $(DESTDIR)$(dvidir)
-+ $(MKDIR_P) $(DESTDIR)$(dvidir)
-
- uninstall-dvi:
- $(RM) $(DESTDIR)$(dvidir)/libunistring.dvi
-@@ -105,7 +105,7 @@ libunistring.ps: libunistring.dvi
- # The install-ps target is already defined by automake.
-
- installdirs-ps:
-- $(mkdir_p) $(DESTDIR)$(psdir)
-+ $(MKDIR_P) $(DESTDIR)$(psdir)
-
- uninstall-ps:
- $(RM) $(DESTDIR)$(psdir)/libunistring.ps
-@@ -120,7 +120,7 @@ TEXI2PDF = @TEXI2DVI@ --pdf $(TEXINCLUDE
- # The install-pdf target is already defined by automake.
-
- installdirs-pdf:
-- $(mkdir_p) $(DESTDIR)$(pdfdir)
-+ $(MKDIR_P) $(DESTDIR)$(pdfdir)
-
- uninstall-pdf:
- $(RM) $(DESTDIR)$(pdfdir)/libunistring.pdf
-@@ -151,17 +151,17 @@ libunistring_toc.html: libunistring.texi
- }
-
- install-html-monolithic: libunistring.html
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
- $(INSTALL_DATA) `if test -f libunistring.html; then echo .; else echo $(srcdir); fi`/libunistring.html $(DESTDIR)$(htmldir)/libunistring.html
-
- install-html-split: libunistring_toc.html
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
- for file in `if test -f libunistring_toc.html; then echo .; else echo $(srcdir); fi`/libunistring_*.html; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
- done
-
- installdirs-html:
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
-
- uninstall-html-monolithic:
- $(RM) $(DESTDIR)$(htmldir)/libunistring.html
-@@ -170,14 +170,14 @@ uninstall-html-split:
- $(RM) $(DESTDIR)$(htmldir)/libunistring_*.html
-
- dist-html-monolithic:
-- $(mkdir_p) $(distdir)/
-+ $(MKDIR_P) $(distdir)/
- file=libunistring.html; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- cp -p $$d/$$file $(distdir)/$$file || exit 1
-
- # We would like to put libunistring_*.html into EXTRA_DIST, but it doesn't work.
- dist-html-split: libunistring_toc.html
-- $(mkdir_p) $(distdir)/
-+ $(MKDIR_P) $(distdir)/
- file=libunistring_toc.html; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && echo libunistring_*.html`; do \
diff --git a/meta/recipes-support/libunistring/libunistring/parallelmake.patch b/meta/recipes-support/libunistring/libunistring/parallelmake.patch
deleted file mode 100644
index 21025b8e9d..0000000000
--- a/meta/recipes-support/libunistring/libunistring/parallelmake.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Fix a parallel make race where cdefs.h uses the unused-parameter.h header file
-but has no dependency listed. This can result in an empty cdefs.h file which
-results in a build failure like:
-
-| In file included from striconveh.c:30:0:
-| unistr.h:193:48: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
-| In file included from striconveh.c:30:0:
-| unistr.h:263:54: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
-
-Upstream-Status: Pending
-
-RP 2012/4/12
-
-Index: libunistring-0.9.3/lib/Makefile.am
-===================================================================
---- libunistring-0.9.3.orig/lib/Makefile.am 2012-04-12 07:45:41.450059820 +0000
-+++ libunistring-0.9.3/lib/Makefile.am 2012-04-12 07:48:45.434055559 +0000
-@@ -157,7 +157,7 @@
-
- # unistring/cdefs.h is not public, but is included by other header files.
- nobase_nodist_include_HEADERS += unistring/cdefs.h
--unistring/cdefs.h : unistring/cdefs.in.h
-+unistring/cdefs.h : unistring/cdefs.in.h $(UNUSED_PARAMETER_H)
- @MKDIR_P@ unistring
- rm -f $@-t $@
- sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.3.bb b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
index db1651b2a6..89b1dc26f1 100644
--- a/meta/recipes-support/libunistring/libunistring_0.9.3.bb
+++ b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
@@ -18,15 +18,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
- file://parallelmake.patch \
- file://libunistring_fix_for_automake_1.12.patch \
file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
"
-SRC_URI[md5sum] = "db8eca3b64163abadf8c40e5cecc261f"
-SRC_URI[sha256sum] = "610d3ec724fbdaa654afe3cff20b9f4d504be3fd296fded2e0f7f764041006a3"
-
-PR = "r3"
+SRC_URI[md5sum] = "c24a6a3838d9ad4a41a62549312c4226"
+SRC_URI[sha256sum] = "f5246d63286a42902dc096d6d44541fbe4204b6c02d6d5d28b457c9882ddd8a6"
inherit autotools texinfo
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
new file mode 100644
index 0000000000..228ec322d5
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
@@ -0,0 +1,2529 @@
+From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Sat, 11 May 2013 09:18:23 -0600
+Subject: [PATCH] AArch64 port.
+
+Upstream-Status: Backport
+
+---
+ Makefile.am | 6
+ README | 1
+ configure.ac | 6
+ include/libunwind-aarch64.h | 187 ++++++++++++++++++++++
+ include/libunwind.h.in | 4
+ include/tdep-aarch64/dwarf-config.h | 52 ++++++
+ include/tdep-aarch64/jmpbuf.h | 33 +++
+ include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++
+ include/tdep/dwarf-config.h | 4
+ include/tdep/jmpbuf.h | 2
+ include/tdep/libunwind_i.h.in | 4
+ src/Makefile.am | 39 ++++
+ src/aarch64/Gcreate_addr_space.c | 60 +++++++
+ src/aarch64/Gget_proc_info.c | 39 ++++
+ src/aarch64/Gget_save_loc.c | 100 +++++++++++
+ src/aarch64/Gglobal.c | 57 ++++++
+ src/aarch64/Ginit.c | 187 ++++++++++++++++++++++
+ src/aarch64/Ginit_local.c | 55 ++++++
+ src/aarch64/Ginit_remote.c | 45 +++++
+ src/aarch64/Gis_signal_frame.c | 64 +++++++
+ src/aarch64/Gregs.c | 113 +++++++++++++
+ src/aarch64/Gresume.c | 177 +++++++++++++++++++++
+ src/aarch64/Gstep.c | 129 +++++++++++++++
+ src/aarch64/Lcreate_addr_space.c | 5
+ src/aarch64/Lget_proc_info.c | 5
+ src/aarch64/Lget_save_loc.c | 5
+ src/aarch64/Lglobal.c | 5
+ src/aarch64/Linit.c | 5
+ src/aarch64/Linit_local.c | 5
+ src/aarch64/Linit_remote.c | 5
+ src/aarch64/Lis_signal_frame.c | 5
+ src/aarch64/Lregs.c | 5
+ src/aarch64/Lresume.c | 5
+ src/aarch64/Lstep.c | 5
+ src/aarch64/gen-offsets.c | 68 ++++++++
+ src/aarch64/init.h | 127 +++++++++++++++
+ src/aarch64/is_fpreg.c | 32 +++
+ src/aarch64/offsets.h | 49 +++++
+ src/aarch64/regname.c | 106 ++++++++++++
+ src/aarch64/siglongjmp.S | 12 +
+ src/aarch64/unwind_i.h | 43 +++++
+ src/coredump/_UCD_access_reg_linux.c | 5
+ src/ptrace/_UPT_reg_offset.c | 36 ++++
+ 43 files changed, 2184 insertions(+), 7 deletions(-)
+ create mode 100644 include/libunwind-aarch64.h
+ create mode 100644 include/tdep-aarch64/dwarf-config.h
+ create mode 100644 include/tdep-aarch64/jmpbuf.h
+ create mode 100644 include/tdep-aarch64/libunwind_i.h
+ create mode 100644 src/aarch64/Gcreate_addr_space.c
+ create mode 100644 src/aarch64/Gget_proc_info.c
+ create mode 100644 src/aarch64/Gget_save_loc.c
+ create mode 100644 src/aarch64/Gglobal.c
+ create mode 100644 src/aarch64/Ginit.c
+ create mode 100644 src/aarch64/Ginit_local.c
+ create mode 100644 src/aarch64/Ginit_remote.c
+ create mode 100644 src/aarch64/Gis_signal_frame.c
+ create mode 100644 src/aarch64/Gregs.c
+ create mode 100644 src/aarch64/Gresume.c
+ create mode 100644 src/aarch64/Gstep.c
+ create mode 100644 src/aarch64/Lcreate_addr_space.c
+ create mode 100644 src/aarch64/Lget_proc_info.c
+ create mode 100644 src/aarch64/Lget_save_loc.c
+ create mode 100644 src/aarch64/Lglobal.c
+ create mode 100644 src/aarch64/Linit.c
+ create mode 100644 src/aarch64/Linit_local.c
+ create mode 100644 src/aarch64/Linit_remote.c
+ create mode 100644 src/aarch64/Lis_signal_frame.c
+ create mode 100644 src/aarch64/Lregs.c
+ create mode 100644 src/aarch64/Lresume.c
+ create mode 100644 src/aarch64/Lstep.c
+ create mode 100644 src/aarch64/gen-offsets.c
+ create mode 100644 src/aarch64/init.h
+ create mode 100644 src/aarch64/is_fpreg.c
+ create mode 100644 src/aarch64/offsets.h
+ create mode 100644 src/aarch64/regname.c
+ create mode 100644 src/aarch64/siglongjmp.S
+ create mode 100644 src/aarch64/unwind_i.h
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna
+ include/libunwind-ptrace.h \
+ include/libunwind-coredump.h
+
++if ARCH_AARCH64
++include_HEADERS += include/libunwind-aarch64.h
++endif
+ if ARCH_ARM
+ include_HEADERS += include/libunwind-arm.h
+ endif
+@@ -41,6 +44,9 @@ SUBDIRS = src tests doc
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+ include/compiler.h include/libunwind_i.h include/mempool.h \
+ include/remote.h \
++ include/tdep-aarch64/dwarf-config.h \
++ include/tdep-aarch64/jmpbuf.h \
++ include/tdep-aarch64/libunwind_i.h \
+ include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \
+ include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \
+ include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \
+--- a/README
++++ b/README
+@@ -9,6 +9,7 @@ several architecture/operating-system co
+ Linux/IA-64: Fully tested and supported.
+ Linux/PARISC: Works well, but C library missing unwind-info.
+ HP-UX/IA-64: Mostly works but known to have some serious limitations.
++ Linux/AArch64: Newly added.
+ Linux/PPC64: Newly added.
+ Linux/SuperH: Newly added.
+ FreeBSD/i386: Newly added.
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch])
+
+ AC_ARG_ENABLE(coredump,
+ AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
+- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
++ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
+ )
+
+ AC_MSG_CHECKING([if we should build libunwind-coredump])
+@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os])
+
+ AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
+ AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
++AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
+ AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
+ AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
+ AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
+@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target
+ AC_MSG_CHECKING([for ELF helper width])
+ case "${target_arch}" in
+ (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
+-(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
++(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
+ (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
+ *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
+ esac
+@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions]
+ # C++ exception handling doesn't work too well on x86
+ case $target_arch in
+ x86*) enable_cxx_exceptions=no;;
++ aarch64*) enable_cxx_exceptions=no;;
+ arm*) enable_cxx_exceptions=no;;
+ mips*) enable_cxx_exceptions=no;;
+ *) enable_cxx_exceptions=yes;;
+--- /dev/null
++++ b/include/libunwind-aarch64.h
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2004 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef LIBUNWIND_H
++#define LIBUNWIND_H
++
++#if defined(__cplusplus) || defined(c_plusplus)
++extern "C" {
++#endif
++
++#include <inttypes.h>
++#include <stddef.h>
++#include <ucontext.h>
++
++#define UNW_TARGET aarch64
++#define UNW_TARGET_AARCH64 1
++
++#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
++
++/* This needs to be big enough to accommodate "struct cursor", while
++ leaving some slack for future expansion. Changing this value will
++ require recompiling all users of this library. Stack allocation is
++ relatively cheap and unwind-state copying is relatively rare, so we
++ want to err on making it rather too big than too small. */
++
++#define UNW_TDEP_CURSOR_LEN 4096
++
++typedef uint64_t unw_word_t;
++typedef int64_t unw_sword_t;
++
++typedef long double unw_tdep_fpreg_t;
++
++typedef struct
++ {
++ /* no aarch64-specific auxiliary proc-info */
++ }
++unw_tdep_proc_info_t;
++
++typedef enum
++ {
++ /* 64-bit general registers. */
++ UNW_AARCH64_X0,
++ UNW_AARCH64_X1,
++ UNW_AARCH64_X2,
++ UNW_AARCH64_X3,
++ UNW_AARCH64_X4,
++ UNW_AARCH64_X5,
++ UNW_AARCH64_X6,
++ UNW_AARCH64_X7,
++ UNW_AARCH64_X8,
++
++ /* Temporary registers. */
++ UNW_AARCH64_X9,
++ UNW_AARCH64_X10,
++ UNW_AARCH64_X11,
++ UNW_AARCH64_X12,
++ UNW_AARCH64_X13,
++ UNW_AARCH64_X14,
++ UNW_AARCH64_X15,
++
++ /* Intra-procedure-call temporary registers. */
++ UNW_AARCH64_X16,
++ UNW_AARCH64_X17,
++
++ /* Callee-saved registers. */
++ UNW_AARCH64_X18,
++ UNW_AARCH64_X19,
++ UNW_AARCH64_X20,
++ UNW_AARCH64_X21,
++ UNW_AARCH64_X22,
++ UNW_AARCH64_X23,
++ UNW_AARCH64_X24,
++ UNW_AARCH64_X25,
++ UNW_AARCH64_X26,
++ UNW_AARCH64_X27,
++ UNW_AARCH64_X28,
++
++ /* 64-bit frame pointer. */
++ UNW_AARCH64_X29,
++
++ /* 64-bit link register. */
++ UNW_AARCH64_X30,
++
++ /* 64-bit stack pointer. */
++ UNW_AARCH64_SP = 31,
++ UNW_AARCH64_PC,
++ UNW_AARCH64_PSTATE,
++
++ /* 128-bit FP/Advanced SIMD registers. */
++ UNW_AARCH64_V0 = 64,
++ UNW_AARCH64_V1,
++ UNW_AARCH64_V2,
++ UNW_AARCH64_V3,
++ UNW_AARCH64_V4,
++ UNW_AARCH64_V5,
++ UNW_AARCH64_V6,
++ UNW_AARCH64_V7,
++ UNW_AARCH64_V8,
++ UNW_AARCH64_V9,
++ UNW_AARCH64_V10,
++ UNW_AARCH64_V11,
++ UNW_AARCH64_V12,
++ UNW_AARCH64_V13,
++ UNW_AARCH64_V14,
++ UNW_AARCH64_V15,
++ UNW_AARCH64_V16,
++ UNW_AARCH64_V17,
++ UNW_AARCH64_V18,
++ UNW_AARCH64_V19,
++ UNW_AARCH64_V20,
++ UNW_AARCH64_V21,
++ UNW_AARCH64_V22,
++ UNW_AARCH64_V23,
++ UNW_AARCH64_V24,
++ UNW_AARCH64_V25,
++ UNW_AARCH64_V26,
++ UNW_AARCH64_V27,
++ UNW_AARCH64_V28,
++ UNW_AARCH64_V29,
++ UNW_AARCH64_V30,
++ UNW_AARCH64_V31,
++
++ UNW_AARCH64_FPSR,
++ UNW_AARCH64_FPCR,
++
++ /* For AArch64, the CFA is the value of SP (x31) at the call site of the
++ previous frame. */
++ UNW_AARCH64_CFA = UNW_AARCH64_SP,
++
++ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
++
++ UNW_TDEP_IP = UNW_AARCH64_X30,
++ UNW_TDEP_SP = UNW_AARCH64_SP,
++ UNW_TDEP_EH = UNW_AARCH64_X0,
++
++ }
++aarch64_regnum_t;
++
++/* Use R0 through R3 to pass exception handling information. */
++#define UNW_TDEP_NUM_EH_REGS 4
++
++typedef struct unw_tdep_save_loc
++ {
++ /* Additional target-dependent info on a save location. */
++ }
++unw_tdep_save_loc_t;
++
++
++/* On AArch64, we can directly use ucontext_t as the unwind context. */
++typedef ucontext_t unw_tdep_context_t;
++
++#include "libunwind-common.h"
++#include "libunwind-dynamic.h"
++
++#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
++#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
++
++extern int unw_tdep_is_fpreg (int);
++
++#if defined(__cplusplus) || defined(c_plusplus)
++}
++#endif
++
++#endif /* LIBUNWIND_H */
+--- a/include/libunwind.h.in
++++ b/include/libunwind.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++#include "libunwind-aarch64.h"
++#elif defined __arm__
+ # include "libunwind-arm.h"
+ #elif defined __hppa__
+ # include "libunwind-hppa.h"
+--- /dev/null
++++ b/include/tdep-aarch64/dwarf-config.h
+@@ -0,0 +1,52 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef dwarf_config_h
++#define dwarf_config_h
++
++/* This matches the value udes by GCC (see
++ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */
++#define DWARF_NUM_PRESERVED_REGS 97
++
++/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
++#define dwarf_is_big_endian(addr_space) 0
++
++#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0)
++
++/* Convert a pointer to a dwarf_cursor structure to a pointer to
++ unw_cursor_t. */
++#define dwarf_to_cursor(c) ((unw_cursor_t *) (c))
++
++typedef struct dwarf_loc
++ {
++ unw_word_t val;
++#ifndef UNW_LOCAL_ONLY
++ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */
++#endif
++ }
++dwarf_loc_t;
++
++#endif /* dwarf_config_h */
+--- /dev/null
++++ b/include/tdep-aarch64/jmpbuf.h
+@@ -0,0 +1,33 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++/* Use glibc's jump-buffer indices; NPTL peeks at SP: */
++
++/* FIXME for AArch64 */
++
++#define JB_SP 13
++#define JB_RP 14
++#define JB_MASK_SAVED 15
++#define JB_MASK 16
+--- /dev/null
++++ b/include/tdep-aarch64/libunwind_i.h
+@@ -0,0 +1,294 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2005 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef AARCH64_LIBUNWIND_I_H
++#define AARCH64_LIBUNWIND_I_H
++
++/* Target-dependent definitions that are internal to libunwind but need
++ to be shared with target-independent code. */
++
++#include <stdlib.h>
++#include <libunwind.h>
++
++#include "elf64.h"
++#include "mempool.h"
++#include "dwarf.h"
++
++typedef struct
++ {
++ /* no aarch64-specific fast trace */
++ }
++unw_tdep_frame_t;
++
++#ifdef UNW_LOCAL_ONLY
++
++typedef unw_word_t aarch64_loc_t;
++
++#else /* !UNW_LOCAL_ONLY */
++
++typedef struct aarch64_loc
++ {
++ unw_word_t w0, w1;
++ }
++aarch64_loc_t;
++
++#endif /* !UNW_LOCAL_ONLY */
++
++struct unw_addr_space
++ {
++ struct unw_accessors acc;
++ int big_endian;
++ unw_caching_policy_t caching_policy;
++#ifdef HAVE_ATOMIC_OPS_H
++ AO_t cache_generation;
++#else
++ uint32_t cache_generation;
++#endif
++ unw_word_t dyn_generation; /* see dyn-common.h */
++ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */
++ struct dwarf_rs_cache global_cache;
++ struct unw_debug_frame_list *debug_frames;
++ };
++
++struct cursor
++ {
++ struct dwarf_cursor dwarf; /* must be first */
++ enum
++ {
++ AARCH64_SCF_NONE,
++ AARCH64_SCF_LINUX_RT_SIGFRAME,
++ }
++ sigcontext_format;
++ unw_word_t sigcontext_addr;
++ unw_word_t sigcontext_sp;
++ unw_word_t sigcontext_pc;
++ };
++
++#define DWARF_GET_LOC(l) ((l).val)
++
++#ifdef UNW_LOCAL_ONLY
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0)
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) })
++# define DWARF_IS_REG_LOC(l) 0
++# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_word_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_word_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++#else /* !UNW_LOCAL_ONLY */
++# define DWARF_LOC_TYPE_FP (1 << 0)
++# define DWARF_LOC_TYPE_REG (1 << 1)
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) \
++ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
++# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0)
++# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0)
++# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG)
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \
++ | DWARF_LOC_TYPE_FP))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ val, 0, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 0, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0,
++ c->as_arg);
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ &val, 1, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 1, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1,
++ 1, c->as_arg);
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++}
++
++#endif /* !UNW_LOCAL_ONLY */
++
++
++
++#define tdep_getcontext_trace unw_getcontext
++#define tdep_init_done UNW_OBJ(init_done)
++#define tdep_init UNW_OBJ(init)
++/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
++ tdep_search_unwind_table. */
++#define tdep_search_unwind_table dwarf_search_unwind_table
++#define tdep_find_unwind_table dwarf_find_unwind_table
++#define tdep_uc_addr UNW_OBJ(uc_addr)
++#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
++#define tdep_access_reg UNW_OBJ(access_reg)
++#define tdep_access_fpreg UNW_OBJ(access_fpreg)
++#define tdep_fetch_frame(c,ip,n) do {} while(0)
++#define tdep_cache_frame(c,rs) do {} while(0)
++#define tdep_reuse_frame(c,rs) do {} while(0)
++#define tdep_stash_frame(c,rs) do {} while(0)
++#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
++
++#ifdef UNW_LOCAL_ONLY
++# define tdep_find_proc_info(c,ip,n) \
++ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ dwarf_put_unwind_info((as), (pi), (arg))
++#else
++# define tdep_find_proc_info(c,ip,n) \
++ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ (*(as)->acc.put_unwind_info)((as), (pi), (arg))
++#endif
++
++#define tdep_get_as(c) ((c)->dwarf.as)
++#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
++#define tdep_get_ip(c) ((c)->dwarf.ip)
++#define tdep_big_endian(as) ((as)->big_endian)
++
++extern int tdep_init_done;
++
++extern void tdep_init (void);
++extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
++ unw_dyn_info_t *di, unw_proc_info_t *pi,
++ int need_unwind_info, void *arg);
++extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg);
++extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
++ unsigned long *segbase, unsigned long *mapoff,
++ char *path, size_t pathlen);
++extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
++ unw_word_t *valp, int write);
++extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
++ unw_fpreg_t *valp, int write);
++
++#endif /* AARCH64_LIBUNWIND_I_H */
+--- a/include/tdep/dwarf-config.h
++++ b/include/tdep/dwarf-config.h
+@@ -1,7 +1,9 @@
+ /* Provide a real file - not a symlink - as it would cause multiarch conflicts
+ when multiple different arch releases are installed simultaneously. */
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/dwarf-config.h"
++#elif defined __arm__
+ # include "tdep-arm/dwarf-config.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/dwarf-config.h"
+--- a/include/tdep/jmpbuf.h
++++ b/include/tdep/jmpbuf.h
+@@ -3,6 +3,8 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
++#if defined __aarch64__
++# include "tdep-aarch64/jmpbuf.h"
+ #if defined __arm__
+ # include "tdep-arm/jmpbuf.h"
+ #elif defined __hppa__
+--- a/include/tdep/libunwind_i.h.in
++++ b/include/tdep/libunwind_i.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/libunwind_i.h"
++#elif defined __arm__
+ # include "tdep-arm/libunwind_i.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/libunwind_i.h"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c
+ noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
+ libunwind_la_LIBADD += $(LIBUNWIND_ELF)
+
++# The list of files that go into libunwind and libunwind-aarch64:
++noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h
++libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \
++ aarch64/is_fpreg.c aarch64/regname.c
++
++# The list of files that go into libunwind:
++libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_local) \
++ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \
++ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \
++ aarch64/Linit_local.c aarch64/Linit_remote.c \
++ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \
++ aarch64/Lstep.c
++
++libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_generic) \
++ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \
++ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \
++ aarch64/Ginit_local.c aarch64/Ginit_remote.c \
++ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \
++ aarch64/Gstep.c
++
+ # The list of files that go into libunwind and libunwind-arm:
+ noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
+ libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
+@@ -418,6 +440,18 @@ if OS_FREEBSD
+ libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
+ endif
+
++if ARCH_AARCH64
++ lib_LTLIBRARIES += libunwind-aarch64.la
++ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
++ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64)
++ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
++ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la
++ libunwind_aarch64_la_LIBADD += libunwind-elf64.la
++if !REMOTE_ONLY
++ libunwind_aarch64_la_LIBADD += libunwind.la -lc
++endif
++ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S
++else
+ if ARCH_ARM
+ lib_LTLIBRARIES += libunwind-arm.la
+ libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
+@@ -545,6 +579,7 @@ endif # ARCH_MIPS
+ endif # ARCH_HPPA
+ endif # ARCH_IA64
+ endif # ARCH_ARM
++endif # ARCH_AARCH64
+
+ # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
+ # at the end.
+@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+ noinst_HEADERS += unwind/unwind-internal.h
+
+-EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
++EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \
++ $(libunwind_la_SOURCES_arm) \
+ $(libunwind_la_SOURCES_hppa) \
+ $(libunwind_la_SOURCES_ia64) \
+ $(libunwind_la_SOURCES_mips) \
+@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm)
+ $(libunwind_la_SOURCES_common) \
+ $(libunwind_la_SOURCES_local) \
+ $(libunwind_la_SOURCES_generic) \
++ $(libunwind_aarch64_la_SOURCES_aarch64) \
+ $(libunwind_arm_la_SOURCES_arm) \
+ $(libunwind_hppa_la_SOURCES_hppa) \
+ $(libunwind_ia64_la_SOURCES_ia64) \
+--- /dev/null
++++ b/src/aarch64/Gcreate_addr_space.c
+@@ -0,0 +1,60 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include <string.h>
++#include <stdlib.h>
++
++#include "unwind_i.h"
++
++PROTECTED unw_addr_space_t
++unw_create_addr_space (unw_accessors_t *a, int byte_order)
++{
++#ifdef UNW_LOCAL_ONLY
++ return NULL;
++#else
++ unw_addr_space_t as;
++
++ /* AArch64 supports little-endian and big-endian. */
++ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN
++ && byte_order != __BIG_ENDIAN)
++ return NULL;
++
++ as = malloc (sizeof (*as));
++ if (!as)
++ return NULL;
++
++ memset (as, 0, sizeof (*as));
++
++ as->acc = *a;
++
++ /* Default to little-endian for AArch64. */
++ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN)
++ as->big_endian = 0;
++ else
++ as->big_endian = 1;
++
++ return as;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gget_proc_info.c
+@@ -0,0 +1,39 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++PROTECTED int
++unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ ret = dwarf_make_proc_info (&c->dwarf);
++ if (ret < 0)
++ return ret;
++
++ *pi = c->dwarf.pi;
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gget_save_loc.c
+@@ -0,0 +1,100 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++PROTECTED int
++unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ dwarf_loc_t loc;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_SP:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ default:
++ loc = DWARF_NULL_LOC; /* default to "not saved" */
++ break;
++ }
++
++ memset (sloc, 0, sizeof (*sloc));
++
++ if (DWARF_IS_NULL_LOC (loc))
++ {
++ sloc->type = UNW_SLT_NONE;
++ return 0;
++ }
++
++#if !defined(UNW_LOCAL_ONLY)
++ if (DWARF_IS_REG_LOC (loc))
++ {
++ sloc->type = UNW_SLT_REG;
++ sloc->u.regnum = DWARF_GET_LOC (loc);
++ }
++ else
++#endif
++ {
++ sloc->type = UNW_SLT_MEMORY;
++ sloc->u.addr = DWARF_GET_LOC (loc);
++ }
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gglobal.c
+@@ -0,0 +1,57 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "dwarf_i.h"
++
++HIDDEN define_lock (aarch64_lock);
++HIDDEN int tdep_init_done;
++
++HIDDEN void
++tdep_init (void)
++{
++ intrmask_t saved_mask;
++
++ sigfillset (&unwi_full_mask);
++
++ lock_acquire (&aarch64_lock, saved_mask);
++ {
++ if (tdep_init_done)
++ /* another thread else beat us to it... */
++ goto out;
++
++ mi_init ();
++
++ dwarf_init ();
++
++#ifndef UNW_REMOTE_ONLY
++ aarch64_local_addr_space_init ();
++#endif
++ tdep_init_done = 1; /* signal that we're initialized... */
++ }
++ out:
++ lock_release (&aarch64_lock, saved_mask);
++}
+--- /dev/null
++++ b/src/aarch64/Ginit.c
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "unwind_i.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++/* unw_local_addr_space is a NULL pointer in this case. */
++PROTECTED unw_addr_space_t unw_local_addr_space;
++
++#else /* !UNW_REMOTE_ONLY */
++
++static struct unw_addr_space local_addr_space;
++
++PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space;
++
++static inline void *
++uc_addr (ucontext_t *uc, int reg)
++{
++ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
++ return &uc->uc_mcontext.regs[reg];
++ else
++ return NULL;
++}
++
++# ifdef UNW_LOCAL_ONLY
++
++HIDDEN void *
++tdep_uc_addr (ucontext_t *uc, int reg)
++{
++ return uc_addr (uc, reg);
++}
++
++# endif /* UNW_LOCAL_ONLY */
++
++HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
++
++/* XXX fix me: there is currently no way to locate the dyn-info list
++ by a remote unwinder. On ia64, this is done via a special
++ unwind-table entry. Perhaps something similar can be done with
++ DWARF2 unwind info. */
++
++static void
++put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
++{
++ /* it's a no-op */
++}
++
++static int
++get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
++ void *arg)
++{
++ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++ return 0;
++}
++
++static int
++access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
++ void *arg)
++{
++ if (write)
++ {
++ Debug (16, "mem[%lx] <- %lx\n", addr, *val);
++ *(unw_word_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (16, "mem[%lx] -> %lx\n", addr, *val);
++ }
++ return 0;
++}
++
++static int
++access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
++ void *arg)
++{
++ unw_word_t *addr;
++ ucontext_t *uc = arg;
++
++ if (unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ *(unw_word_t *) addr = *val;
++ Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
++
++static int
++access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
++ int write, void *arg)
++{
++ ucontext_t *uc = arg;
++ unw_fpreg_t *addr;
++
++ if (!unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ *(unw_fpreg_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_fpreg_t *) addr;
++ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ /* attempt to access a non-preserved register */
++ return -UNW_EBADREG;
++}
++
++static int
++get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
++ char *buf, size_t buf_len, unw_word_t *offp,
++ void *arg)
++{
++ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
++}
++
++HIDDEN void
++aarch64_local_addr_space_init (void)
++{
++ memset (&local_addr_space, 0, sizeof (local_addr_space));
++ local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
++ local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
++ local_addr_space.acc.put_unwind_info = put_unwind_info;
++ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
++ local_addr_space.acc.access_mem = access_mem;
++ local_addr_space.acc.access_reg = access_reg;
++ local_addr_space.acc.access_fpreg = access_fpreg;
++ local_addr_space.acc.resume = aarch64_local_resume;
++ local_addr_space.acc.get_proc_name = get_static_proc_name;
++ unw_flush_cache (&local_addr_space, 0, 0);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_local.c
+@@ -0,0 +1,55 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "init.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ return -UNW_EINVAL;
++}
++
++#else /* !UNW_REMOTE_ONLY */
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = unw_local_addr_space;
++ c->dwarf.as_arg = uc;
++
++ return common_init (c, 1);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_remote.c
+@@ -0,0 +1,45 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "init.h"
++#include "unwind_i.h"
++
++PROTECTED int
++unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
++{
++#ifdef UNW_LOCAL_ONLY
++ return -UNW_EINVAL;
++#else /* !UNW_LOCAL_ONLY */
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = as;
++ c->dwarf.as_arg = as_arg;
++ return common_init (c, 0);
++#endif /* !UNW_LOCAL_ONLY */
++}
+--- /dev/null
++++ b/src/aarch64/Gis_signal_frame.c
+@@ -0,0 +1,64 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++/* The restorer stub will always have the form:
++
++ d2801168 movz x8, #0x8b
++ d4000001 svc #0x0
++*/
++
++PROTECTED int
++unw_is_signal_frame (unw_cursor_t *cursor)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_word_t w0, ip;
++ unw_addr_space_t as;
++ unw_accessors_t *a;
++ void *arg;
++ int ret;
++
++ as = c->dwarf.as;
++ a = unw_get_accessors (as);
++ arg = c->dwarf.as_arg;
++
++ ip = c->dwarf.ip;
++
++ ret = (*a->access_mem) (as, ip, &w0, 0, arg);
++ if (ret < 0)
++ return ret;
++
++ /* FIXME: distinguish 32bit insn vs 64bit registers. */
++ if (w0 != 0xd4000001d2801168)
++ return 0;
++
++ return 1;
++
++#else
++ return -UNW_ENOINFO;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gregs.c
+@@ -0,0 +1,113 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++HIDDEN int
++tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
++ int write)
++{
++ dwarf_loc_t loc = DWARF_NULL_LOC;
++ unsigned int mask;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ mask = 1 << reg;
++ if (write)
++ {
++ c->dwarf.eh_args[reg] = *valp;
++ c->dwarf.eh_valid_mask |= mask;
++ return 0;
++ }
++ else if ((c->dwarf.eh_valid_mask & mask) != 0)
++ {
++ *valp = c->dwarf.eh_args[reg];
++ return 0;
++ }
++ else
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_SP:
++ if (write)
++ return -UNW_EREADONLYREG;
++ *valp = c->dwarf.cfa;
++ return 0;
++
++ default:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++ }
++
++ if (write)
++ return dwarf_put (&c->dwarf, loc, *valp);
++ else
++ return dwarf_get (&c->dwarf, loc, valp);
++}
++
++HIDDEN int
++tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp,
++ int write)
++{
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
+--- /dev/null
++++ b/src/aarch64/Gresume.c
+@@ -0,0 +1,177 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "offsets.h"
++
++#ifndef UNW_REMOTE_ONLY
++
++HIDDEN inline int
++aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_tdep_context_t *uc = c->dwarf.as_arg;
++
++ if (c->sigcontext_format == AARCH64_SCF_NONE)
++ {
++ /* Since there are no signals involved here we restore the non scratch
++ registers only. */
++ unsigned long regs[11];
++ regs[0] = uc->uc_mcontext.regs[19];
++ regs[1] = uc->uc_mcontext.regs[20];
++ regs[2] = uc->uc_mcontext.regs[21];
++ regs[3] = uc->uc_mcontext.regs[22];
++ regs[4] = uc->uc_mcontext.regs[23];
++ regs[5] = uc->uc_mcontext.regs[24];
++ regs[6] = uc->uc_mcontext.regs[25];
++ regs[7] = uc->uc_mcontext.regs[26];
++ regs[8] = uc->uc_mcontext.regs[27];
++ regs[9] = uc->uc_mcontext.regs[28];
++ regs[10] = uc->uc_mcontext.regs[30]; /* LR */
++ unsigned long sp = uc->uc_mcontext.sp;
++
++ struct regs_overlay {
++ char x[sizeof(regs)];
++ };
++
++ asm volatile (
++ "ldp x19, x20, [%0]\n"
++ "ldp x21, x22, [%0,16]\n"
++ "ldp x23, x24, [%0,32]\n"
++ "ldp x25, x26, [%0,48]\n"
++ "ldp x27, x28, [%0,64]\n"
++ "ldr x30, [%0,80]\n"
++ "mov sp, %1\n"
++ "ret \n"
++ :
++ : "r" (regs),
++ "r" (sp),
++ "m" (*(struct regs_overlay *)regs)
++ );
++ }
++ else
++ {
++ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
++
++ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0];
++ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1];
++ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2];
++ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3];
++
++ sc->regs[4] = uc->uc_mcontext.regs[4];
++ sc->regs[5] = uc->uc_mcontext.regs[5];
++ sc->regs[6] = uc->uc_mcontext.regs[6];
++ sc->regs[7] = uc->uc_mcontext.regs[7];
++ sc->regs[8] = uc->uc_mcontext.regs[8];
++ sc->regs[9] = uc->uc_mcontext.regs[9];
++ sc->regs[10] = uc->uc_mcontext.regs[10];
++ sc->regs[11] = uc->uc_mcontext.regs[11];
++ sc->regs[12] = uc->uc_mcontext.regs[12];
++ sc->regs[13] = uc->uc_mcontext.regs[13];
++ sc->regs[14] = uc->uc_mcontext.regs[14];
++ sc->regs[15] = uc->uc_mcontext.regs[15];
++ sc->regs[16] = uc->uc_mcontext.regs[16];
++ sc->regs[17] = uc->uc_mcontext.regs[17];
++ sc->regs[18] = uc->uc_mcontext.regs[18];
++ sc->regs[19] = uc->uc_mcontext.regs[19];
++ sc->regs[20] = uc->uc_mcontext.regs[20];
++ sc->regs[21] = uc->uc_mcontext.regs[21];
++ sc->regs[22] = uc->uc_mcontext.regs[22];
++ sc->regs[23] = uc->uc_mcontext.regs[23];
++ sc->regs[24] = uc->uc_mcontext.regs[24];
++ sc->regs[25] = uc->uc_mcontext.regs[25];
++ sc->regs[26] = uc->uc_mcontext.regs[26];
++ sc->regs[27] = uc->uc_mcontext.regs[27];
++ sc->regs[28] = uc->uc_mcontext.regs[28];
++ sc->regs[29] = uc->uc_mcontext.regs[29];
++ sc->regs[30] = uc->uc_mcontext.regs[30];
++ sc->sp = uc->uc_mcontext.sp;
++ sc->pc = uc->uc_mcontext.pc;
++ sc->pstate = uc->uc_mcontext.pstate;
++
++ asm volatile (
++ "mov sp, %0\n"
++ "ret %1\n"
++ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
++ );
++ }
++ unreachable();
++#else
++ printf ("%s: implement me\n", __FUNCTION__);
++#endif
++ return -UNW_EINVAL;
++}
++
++#endif /* !UNW_REMOTE_ONLY */
++
++static inline void
++establish_machine_state (struct cursor *c)
++{
++ unw_addr_space_t as = c->dwarf.as;
++ void *arg = c->dwarf.as_arg;
++ unw_fpreg_t fpval;
++ unw_word_t val;
++ int reg;
++
++ Debug (8, "copying out cursor state\n");
++
++ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg)
++ {
++ Debug (16, "copying %s %d\n", unw_regname (reg), reg);
++ if (unw_is_fpreg (reg))
++ {
++ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
++ as->acc.access_fpreg (as, reg, &fpval, 1, arg);
++ }
++ else
++ {
++ if (tdep_access_reg (c, reg, &val, 0) >= 0)
++ as->acc.access_reg (as, reg, &val, 1, arg);
++ }
++ }
++}
++
++PROTECTED int
++unw_resume (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ if (!c->dwarf.ip)
++ {
++ /* This can happen easily when the frame-chain gets truncated
++ due to bad or missing unwind-info. */
++ Debug (1, "refusing to resume execution at address 0\n");
++ return -UNW_EINVAL;
++ }
++
++ establish_machine_state (c);
++
++ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c,
++ c->dwarf.as_arg);
++}
+--- /dev/null
++++ b/src/aarch64/Gstep.c
+@@ -0,0 +1,129 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "offsets.h"
++
++PROTECTED int
++unw_handle_signal_frame (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa;
++ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0);
++
++ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0)
++ return -UNW_EUNSPEC;
++
++ ret = unw_is_signal_frame (cursor);
++ Debug(1, "unw_is_signal_frame()=%d\n", ret);
++
++ /* Save the SP and PC to be able to return execution at this point
++ later in time (unw_resume). */
++ c->sigcontext_sp = c->dwarf.cfa;
++ c->sigcontext_pc = c->dwarf.ip;
++
++ if (ret)
++ {
++ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME;
++ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
++ }
++ else
++ return -UNW_EUNSPEC;
++
++ c->sigcontext_addr = sc_addr;
++
++ /* Update the dwarf cursor.
++ Set the location of the registers to the corresponding addresses of the
++ uc_mcontext / sigcontext structure contents. */
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0);
++
++ /* Set SP/CFA and PC/IP. */
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++
++ c->dwarf.pi_valid = 0;
++
++ return 1;
++}
++
++PROTECTED int
++unw_step (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n",
++ c, c->dwarf.ip, c->dwarf.cfa);
++
++ /* Check if this is a signal frame. */
++ if (unw_is_signal_frame (cursor))
++ return unw_handle_signal_frame (cursor);
++
++ ret = dwarf_step (&c->dwarf);
++ Debug(1, "dwarf_step()=%d\n", ret);
++
++ if (unlikely (ret == -UNW_ESTOPUNWIND))
++ return ret;
++
++ if (unlikely (ret < 0))
++ return 0;
++
++ return (c->dwarf.ip == 0) ? 0 : 1;
++}
+--- /dev/null
++++ b/src/aarch64/Lcreate_addr_space.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gcreate_addr_space.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_proc_info.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_proc_info.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_save_loc.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_save_loc.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lglobal.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gglobal.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_local.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_local.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_remote.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_remote.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lis_signal_frame.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gis_signal_frame.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lregs.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gregs.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lresume.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gresume.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lstep.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gstep.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/gen-offsets.c
+@@ -0,0 +1,68 @@
++#include <stdio.h>
++#include <stddef.h>
++#include <ucontext.h>
++#include <asm/sigcontext.h>
++
++#define UC(N,X) \
++ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
++
++#define SC(N,X) \
++ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
++
++int
++main (void)
++{
++ printf (
++"/* Linux-specific definitions: */\n\n"
++
++"/* Define various structure offsets to simplify cross-compilation. */\n\n"
++
++"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n");
++
++ UC ("FLAGS", uc_flags);
++ UC ("LINK", uc_link);
++ UC ("STACK", uc_stack);
++ UC ("MCONTEXT", uc_mcontext);
++ UC ("SIGMASK", uc_sigmask);
++
++ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n");
++
++ SC ("R0", regs[0]);
++ SC ("R1", regs[1]);
++ SC ("R2", regs[2]);
++ SC ("R3", regs[3]);
++ SC ("R4", regs[4]);
++ SC ("R5", regs[5]);
++ SC ("R6", regs[6]);
++ SC ("R7", regs[7]);
++ SC ("R8", regs[8]);
++ SC ("R9", regs[9]);
++ SC ("R10", regs[10]);
++ SC ("R11", regs[11]);
++ SC ("R12", regs[12]);
++ SC ("R13", regs[13]);
++ SC ("R14", regs[14]);
++ SC ("R15", regs[15]);
++ SC ("R16", regs[16]);
++ SC ("R17", regs[17]);
++ SC ("R18", regs[18]);
++ SC ("R19", regs[19]);
++ SC ("R20", regs[20]);
++ SC ("R21", regs[21]);
++ SC ("R22", regs[22]);
++ SC ("R23", regs[23]);
++ SC ("R24", regs[24]);
++ SC ("R25", regs[25]);
++ SC ("R26", regs[26]);
++ SC ("R27", regs[27]);
++ SC ("R28", regs[28]);
++ SC ("R29", regs[29]);
++ SC ("R30", regs[30]);
++ SC ("R31", regs[31]);
++
++ SC ("PC", pc);
++ SC ("SP", sp);
++ SC ("Fault", fault_address);
++ SC ("state", pstate);
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/init.h
+@@ -0,0 +1,127 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++static inline int
++common_init (struct cursor *c, unsigned use_prev_instr)
++{
++ int ret, i;
++
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf,
++ UNW_AARCH64_PSTATE);
++ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0);
++ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1);
++ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2);
++ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3);
++ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4);
++ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5);
++ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6);
++ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7);
++ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8);
++ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9);
++ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10);
++ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11);
++ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12);
++ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13);
++ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14);
++ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15);
++ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16);
++ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17);
++ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18);
++ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19);
++ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20);
++ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21);
++ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22);
++ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23);
++ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24);
++ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25);
++ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26);
++ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27);
++ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28);
++ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29);
++ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30);
++ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31);
++
++ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i)
++ c->dwarf.loc[i] = DWARF_NULL_LOC;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++ if (ret < 0)
++ return ret;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ if (ret < 0)
++ return ret;
++
++ c->sigcontext_format = AARCH64_SCF_NONE;
++ c->sigcontext_addr = 0;
++ c->sigcontext_sp = 0;
++ c->sigcontext_pc = 0;
++
++ c->dwarf.args_size = 0;
++ c->dwarf.ret_addr_column = 0;
++ c->dwarf.stash_frames = 0;
++ c->dwarf.use_prev_instr = use_prev_instr;
++ c->dwarf.pi_valid = 0;
++ c->dwarf.pi_is_dynamic = 0;
++ c->dwarf.hint = 0;
++ c->dwarf.prev_rs = 0;
++
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/is_fpreg.c
+@@ -0,0 +1,32 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "libunwind_i.h"
++
++PROTECTED int
++unw_is_fpreg (int regnum)
++{
++ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
++}
+--- /dev/null
++++ b/src/aarch64/offsets.h
+@@ -0,0 +1,49 @@
++/* Linux-specific definitions: */
++
++/* Define various structure offsets to simplify cross-compilation. */
++
++/* Offsets for AArch64 Linux "ucontext_t": */
++
++#define LINUX_UC_FLAGS_OFF 0x0
++#define LINUX_UC_LINK_OFF 0x8
++#define LINUX_UC_STACK_OFF 0x10
++#define LINUX_UC_SIGMASK_OFF 0x28
++#define LINUX_UC_MCONTEXT_OFF 0xb0
++
++/* Offsets for AArch64 Linux "struct sigcontext": */
++
++#define LINUX_SC_FAULTADDRESS_OFF 0x00
++#define LINUX_SC_X0_OFF 0x008
++#define LINUX_SC_X1_OFF 0x010
++#define LINUX_SC_X2_OFF 0x018
++#define LINUX_SC_X3_OFF 0x020
++#define LINUX_SC_X4_OFF 0x028
++#define LINUX_SC_X5_OFF 0x030
++#define LINUX_SC_X6_OFF 0x038
++#define LINUX_SC_X7_OFF 0x040
++#define LINUX_SC_X8_OFF 0x048
++#define LINUX_SC_X9_OFF 0x050
++#define LINUX_SC_X10_OFF 0x058
++#define LINUX_SC_X11_OFF 0x060
++#define LINUX_SC_X12_OFF 0x068
++#define LINUX_SC_X13_OFF 0x070
++#define LINUX_SC_X14_OFF 0x078
++#define LINUX_SC_X15_OFF 0x080
++#define LINUX_SC_X16_OFF 0x088
++#define LINUX_SC_X17_OFF 0x090
++#define LINUX_SC_X18_OFF 0x098
++#define LINUX_SC_X19_OFF 0x0a0
++#define LINUX_SC_X20_OFF 0x0a8
++#define LINUX_SC_X21_OFF 0x0b0
++#define LINUX_SC_X22_OFF 0x0b8
++#define LINUX_SC_X23_OFF 0x0c0
++#define LINUX_SC_X24_OFF 0x0c8
++#define LINUX_SC_X25_OFF 0x0d0
++#define LINUX_SC_X26_OFF 0x0d8
++#define LINUX_SC_X27_OFF 0x0e0
++#define LINUX_SC_X28_OFF 0x0e8
++#define LINUX_SC_X29_OFF 0x0f0
++#define LINUX_SC_X30_OFF 0x0f8
++#define LINUX_SC_SP_OFF 0x100
++#define LINUX_SC_PC_OFF 0x108
++#define LINUX_SC_PSTATE_OFF 0x110
+--- /dev/null
++++ b/src/aarch64/regname.c
+@@ -0,0 +1,106 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++static const char *const regname[] =
++ {
++ [UNW_AARCH64_X0] = "x0",
++ [UNW_AARCH64_X1] = "x1",
++ [UNW_AARCH64_X2] = "x2",
++ [UNW_AARCH64_X3] = "x3",
++ [UNW_AARCH64_X4] = "x4",
++ [UNW_AARCH64_X5] = "x5",
++ [UNW_AARCH64_X6] = "x6",
++ [UNW_AARCH64_X7] = "x7",
++ [UNW_AARCH64_X8] = "x8",
++ [UNW_AARCH64_X9] = "x9",
++ [UNW_AARCH64_X10] = "x10",
++ [UNW_AARCH64_X11] = "x11",
++ [UNW_AARCH64_X12] = "x12",
++ [UNW_AARCH64_X13] = "x13",
++ [UNW_AARCH64_X14] = "x14",
++ [UNW_AARCH64_X15] = "x15",
++ [UNW_AARCH64_X16] = "ip0",
++ [UNW_AARCH64_X17] = "ip1",
++ [UNW_AARCH64_X18] = "x18",
++ [UNW_AARCH64_X19] = "x19",
++ [UNW_AARCH64_X20] = "x20",
++ [UNW_AARCH64_X21] = "x21",
++ [UNW_AARCH64_X22] = "x22",
++ [UNW_AARCH64_X23] = "x23",
++ [UNW_AARCH64_X24] = "x24",
++ [UNW_AARCH64_X25] = "x25",
++ [UNW_AARCH64_X26] = "x26",
++ [UNW_AARCH64_X27] = "x27",
++ [UNW_AARCH64_X28] = "x28",
++ [UNW_AARCH64_X29] = "fp",
++ [UNW_AARCH64_X30] = "lr",
++ [UNW_AARCH64_SP] = "sp",
++ [UNW_AARCH64_PC] = "pc",
++ [UNW_AARCH64_V0] = "v0",
++ [UNW_AARCH64_V1] = "v1",
++ [UNW_AARCH64_V2] = "v2",
++ [UNW_AARCH64_V3] = "v3",
++ [UNW_AARCH64_V4] = "v4",
++ [UNW_AARCH64_V5] = "v5",
++ [UNW_AARCH64_V6] = "v6",
++ [UNW_AARCH64_V7] = "v7",
++ [UNW_AARCH64_V8] = "v8",
++ [UNW_AARCH64_V9] = "v9",
++ [UNW_AARCH64_V10] = "v10",
++ [UNW_AARCH64_V11] = "v11",
++ [UNW_AARCH64_V12] = "v12",
++ [UNW_AARCH64_V13] = "v13",
++ [UNW_AARCH64_V14] = "v14",
++ [UNW_AARCH64_V15] = "v15",
++ [UNW_AARCH64_V16] = "v16",
++ [UNW_AARCH64_V17] = "v17",
++ [UNW_AARCH64_V18] = "v18",
++ [UNW_AARCH64_V19] = "v19",
++ [UNW_AARCH64_V20] = "v20",
++ [UNW_AARCH64_V21] = "v21",
++ [UNW_AARCH64_V22] = "v22",
++ [UNW_AARCH64_V23] = "v23",
++ [UNW_AARCH64_V24] = "v24",
++ [UNW_AARCH64_V25] = "v25",
++ [UNW_AARCH64_V26] = "v26",
++ [UNW_AARCH64_V27] = "v27",
++ [UNW_AARCH64_V28] = "v28",
++ [UNW_AARCH64_V29] = "v29",
++ [UNW_AARCH64_V30] = "v30",
++ [UNW_AARCH64_V31] = "v31",
++ [UNW_AARCH64_FPSR] = "fpsr",
++ [UNW_AARCH64_FPCR] = "fpcr",
++ };
++
++PROTECTED const char *
++unw_regname (unw_regnum_t reg)
++{
++ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL)
++ return regname[reg];
++ else
++ return "???";
++}
+--- /dev/null
++++ b/src/aarch64/siglongjmp.S
+@@ -0,0 +1,12 @@
++ /* Dummy implementation for now. */
++
++ .global _UI_siglongjmp_cont
++ .global _UI_longjmp_cont
++
++_UI_siglongjmp_cont:
++_UI_longjmp_cont:
++ ret
++#ifdef __linux__
++ /* We do not need executable stack. */
++ .section .note.GNU-stack,"",%progbits
++#endif
+--- /dev/null
++++ b/src/aarch64/unwind_i.h
+@@ -0,0 +1,43 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef unwind_i_h
++#define unwind_i_h
++
++#include <stdint.h>
++
++#include <libunwind-aarch64.h>
++
++#include "libunwind_i.h"
++
++#define aarch64_lock UNW_OBJ(lock)
++#define aarch64_local_resume UNW_OBJ(local_resume)
++#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init)
++
++extern void aarch64_local_addr_space_init (void);
++extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
++ void *arg);
++
++#endif /* unwind_i_h */
+--- a/src/coredump/_UCD_access_reg_linux.c
++++ b/src/coredump/_UCD_access_reg_linux.c
+@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as,
+ return -UNW_EINVAL;
+ }
+
+-#if defined(UNW_TARGET_ARM)
++#if defined(UNW_TARGET_AARCH64)
++ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
++ goto badreg;
++#elif defined(UNW_TARGET_ARM)
+ if (regnum < 0 || regnum >= 16)
+ goto badreg;
+ #elif defined(UNW_TARGET_SH)
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -1,6 +1,7 @@
+ /* libunwind - a platform-independent unwind library
+ Copyright (C) 2003-2004 Hewlett-Packard Co
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
+
+ This file is part of libunwind.
+
+@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST +
+ [UNW_ARM_R15] = 0x3c,
+ #elif defined(UNW_TARGET_MIPS)
+ #elif defined(UNW_TARGET_SH)
++#elif defined(UNW_TARGET_AARCH64)
++ [UNW_AARCH64_X0] = 0x00,
++ [UNW_AARCH64_X1] = 0x08,
++ [UNW_AARCH64_X2] = 0x10,
++ [UNW_AARCH64_X3] = 0x18,
++ [UNW_AARCH64_X4] = 0x20,
++ [UNW_AARCH64_X5] = 0x28,
++ [UNW_AARCH64_X6] = 0x30,
++ [UNW_AARCH64_X7] = 0x38,
++ [UNW_AARCH64_X8] = 0x40,
++ [UNW_AARCH64_X9] = 0x48,
++ [UNW_AARCH64_X10] = 0x50,
++ [UNW_AARCH64_X11] = 0x58,
++ [UNW_AARCH64_X12] = 0x60,
++ [UNW_AARCH64_X13] = 0x68,
++ [UNW_AARCH64_X14] = 0x70,
++ [UNW_AARCH64_X15] = 0x78,
++ [UNW_AARCH64_X16] = 0x80,
++ [UNW_AARCH64_X17] = 0x88,
++ [UNW_AARCH64_X18] = 0x90,
++ [UNW_AARCH64_X19] = 0x98,
++ [UNW_AARCH64_X20] = 0xa0,
++ [UNW_AARCH64_X21] = 0xa8,
++ [UNW_AARCH64_X22] = 0xb0,
++ [UNW_AARCH64_X23] = 0xb8,
++ [UNW_AARCH64_X24] = 0xc0,
++ [UNW_AARCH64_X25] = 0xc8,
++ [UNW_AARCH64_X26] = 0xd0,
++ [UNW_AARCH64_X27] = 0xd8,
++ [UNW_AARCH64_X28] = 0xe0,
++ [UNW_AARCH64_X29] = 0xe8,
++ [UNW_AARCH64_X30] = 0xf0,
++ [UNW_AARCH64_SP] = 0xf8,
++ [UNW_AARCH64_PC] = 0x100,
++ [UNW_AARCH64_PSTATE] = 0x108
+ #else
+ # error Fix me.
+ #endif
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
new file mode 100644
index 0000000000..dc0f5c1b47
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
@@ -0,0 +1,28 @@
+Fix test case link failure on PowerPC systems with Altivec
+
+Upstream-Status:backport
+
+On systems where the system compiler supports Altivec by default,
+the libunwind Makefile will attempt to build an extra test case
+ppc64-test-altivec. Unfortunately, the link step will fail since
+the Makefile does not actually link against the libunwind library.
+
+Fixed by adding the appropriate LDADD macro.
+
+Signed-off-by: Ulrich Weigand <address@hidden>
+---
+ tests/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 0e30536..9c76628 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
+ Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
+ ia64_test_dyn1_LDADD = $(LIBUNWIND)
+ ia64_test_sig_LDADD = $(LIBUNWIND)
++ppc64_test_altivec_LDADD = $(LIBUNWIND)
+--
+1.8.5
+
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
new file mode 100644
index 0000000000..268b702dcb
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
@@ -0,0 +1,72 @@
+From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
+From: Ladislav Michl <ladis@linux-mips.org>
+Date: Tue, 13 Nov 2012 11:19:47 +0100
+Subject: [PATCH] Support building with older compilers.
+
+Add a check for __builtin_unreachable.
+
+Upstream-Status: Pending
+---
+ configure.ac | 11 +++++++++++
+ include/libunwind_i.h | 6 ++++++
+ src/arm/Gresume.c | 2 +-
+ src/sh/Gresume.c | 2 +-
+ 4 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
+ fi
+ AC_MSG_RESULT([$have__builtin___clear_cache])
+
++AC_MSG_CHECKING([for __builtin_unreachable])
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
++ [have__builtin_unreachable=yes],
++ [have__builtin_unreachable=no])
++if test x$have__builtin_unreachable = xyes; then
++ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
++ [Defined if __builtin_unreachable() is available])
++fi
++AC_MSG_RESULT([$have__builtin_unreachable])
++
+ AC_MSG_CHECKING([for __sync atomics])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[
+--- a/include/libunwind_i.h
++++ b/include/libunwind_i.h
+@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ # endif
+ #endif
+
++#if defined(HAVE__BUILTIN_UNREACHABLE)
++# define unreachable() __builtin_unreachable()
++#else
++# define unreachable() do { } while (1)
++#endif
++
+ #ifdef DEBUG
+ # define UNW_DEBUG 1
+ #else
+--- a/src/arm/Gresume.c
++++ b/src/arm/Gresume.c
+@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
+ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #else
+ printf ("%s: implement me\n", __FUNCTION__);
+ #endif
+--- a/src/sh/Gresume.c
++++ b/src/sh/Gresume.c
+@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
+ "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #endif
+ return -UNW_EINVAL;
+ }
diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc
new file mode 100644
index 0000000000..6743b21fcf
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind.inc
@@ -0,0 +1,31 @@
+DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
+HOMEPAGE = "http://www.nongnu.org/libunwind"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3fced11d6df719b47505837a51c16ae5"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+inherit autotools
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,lzma"
+
+EXTRA_OECONF_arm = "--enable-debug-frame"
+EXTRA_OECONF_aarch64 = "--enable-debug-frame"
+
+CFLAGS += "${ATOMICOPS}"
+ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
+ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1"
+ATOMICOPS ?= ""
+
+LDFLAGS += "${LIBATOMICS}"
+LIBATOMICS_armv5 = "-latomic_ops"
+LIBATOMICS_armv4 = "-latomic_ops"
+LIBATOMICS ?= ""
+
+DEPENDS += "${DEPLIBATOMICS}"
+DEPLIBATOMICS_armv5 = "libatomics-ops"
+DEPLIBATOMICS_armv4 = "libatomics-ops"
+DEPLIBATOMICS ?= ""
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb
new file mode 100644
index 0000000000..5b54dcbb21
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -0,0 +1,10 @@
+require libunwind.inc
+
+SRC_URI += "\
+ file://Support-building-with-older-compilers.patch \
+ file://AArch64-port.patch \
+ file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
+"
+
+SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
+SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
diff --git a/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
new file mode 100644
index 0000000000..535a7384cb
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
@@ -0,0 +1,47 @@
+From 7b3df100346128d780f218b881d563d1fd12e310 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 20 Oct 2014 13:46:10 +1100
+Subject: [PATCH] Revert "Blacklist ARM gcc 4.8.0, 4.8.1, 4.8.2"
+
+This reverts commit 4b79310aa3d408ba30fee02cc497a68072d38a99.
+OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
+properly.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ urcu/compiler.h | 19 -------------------
+ 1 file changed, 19 deletions(-)
+
+diff --git a/urcu/compiler.h b/urcu/compiler.h
+index 1e30903..19534f0 100644
+--- a/urcu/compiler.h
++++ b/urcu/compiler.h
+@@ -108,23 +108,4 @@
+
+ #define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+-/*
+- * Don't allow compiling with buggy compiler.
+- */
+-
+-#ifdef __GNUC__
+-# define URCU_GCC_VERSION (__GNUC__ * 10000 \
+- + __GNUC_MINOR__ * 100 \
+- + __GNUC_PATCHLEVEL__)
+-
+-/*
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
+- */
+-# ifdef __ARMEL__
+-# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
+-# error Your gcc version produces clobbered frame accesses
+-# endif
+-# endif
+-#endif
+-
+ #endif /* _URCU_COMPILER_H */
+--
+2.1.2
+
diff --git a/meta/recipes-support/liburcu/liburcu/aarch64.patch b/meta/recipes-support/liburcu/liburcu/aarch64.patch
new file mode 100644
index 0000000000..c6cc8c2fd3
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/aarch64.patch
@@ -0,0 +1,19 @@
+libucru: recognize aarch64
+
+Make the same as "arm" internally.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,6 +77,7 @@ AS_CASE([$host_cpu],
+ [alpha*], [ARCHTYPE="alpha"],
+ [ia64], [ARCHTYPE="gcc"],
+ [arm*], [ARCHTYPE="arm"],
++ [aarch64], [ARCHTYPE="arm"],
+ [mips*], [ARCHTYPE="mips"],
+ [tile*], [ARCHTYPE="gcc"],
+ [ARCHTYPE="unknown"]
diff --git a/meta/recipes-support/liburcu/liburcu_0.8.4.bb b/meta/recipes-support/liburcu/liburcu_0.8.6.bb
index cd7af24baa..263b77e995 100644
--- a/meta/recipes-support/liburcu/liburcu_0.8.4.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.8.6.bb
@@ -8,10 +8,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \
+ file://aarch64.patch \
"
-SRC_URI[md5sum] = "2ca6671b20a550aa0e8020a1a9a96fd4"
-SRC_URI[sha256sum] = "96c0a157e94a15b1506efe9aedd98145e6eb41a3fbcf5b0d118b7a783b22fe12"
+SRC_URI[md5sum] = "834d91d939dd55108a05763be9879856"
+SRC_URI[sha256sum] = "b1a5d3bce014ba7a702759bc60b692c1cd46ff0e8a5b53f0d0a95e22db74ab21"
S = "${WORKDIR}/userspace-rcu-${PV}"
CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
index 0b2526dbee..ded883e457 100644
--- a/meta/recipes-support/libxslt/libxslt_1.1.28.bb
+++ b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
@@ -35,6 +35,11 @@ RPROVIDES_${PN}-bin += "${PN}-utils"
RCONFLICTS_${PN}-bin += "${PN}-utils"
RREPLACES_${PN}-bin += "${PN}-utils"
+
+do_install_append_class-native () {
+ create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
FILES_${PN} += "${libdir}/libxslt-plugins"
FILES_${PN}-dev += "${libdir}/xsltConf.sh"
diff --git a/meta/recipes-support/lz4/lz4_svn.bb b/meta/recipes-support/lz4/lz4_svn.bb
index 38e36d8256..363e439eea 100644
--- a/meta/recipes-support/lz4/lz4_svn.bb
+++ b/meta/recipes-support/lz4/lz4_svn.bb
@@ -2,10 +2,10 @@ SUMMARY = "Extremely Fast Compression algorithm"
DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2008d2325e11691e17fcaa3a6046f850"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0b0d063f37a4477b54af2459477dcafd"
# Upstream names releases after SVN revs
-SRCREV = "112"
+SRCREV = "127"
PV = "r${SRCREV}"
SRC_URI = "svn://lz4.googlecode.com/svn/;module=trunk;protocol=http"
diff --git a/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 0000000000..db3a70e803
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
@@ -0,0 +1,70 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 23 Nov 2014 22:50:33 +0000
+Subject: Use memcpy() instead of reinventing it
+
+gcc inlines memcpy() with results as fast as handwritten code (at
+least in my brief testing with lzop), and knows the alignment
+constraints for our architectures.
+
+Change suggested by Julian Taylor.
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ minilzo/minilzo.c | 14 ++++++++++++++
+ src/lzo_func.h | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+
+diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
+index ab2be5f..6913c2f 100644
+--- a/minilzo/minilzo.c
++++ b/minilzo/minilzo.c
+@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
+diff --git a/src/lzo_func.h b/src/lzo_func.h
+index dfaa676..1cc1b53 100644
+--- a/src/lzo_func.h
++++ b/src/lzo_func.h
+@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
diff --git a/meta/recipes-support/lzo/lzo-2.06/acinclude.m4 b/meta/recipes-support/lzo/lzo/acinclude.m4
index c4d2ccd5b5..c4d2ccd5b5 100644
--- a/meta/recipes-support/lzo/lzo-2.06/acinclude.m4
+++ b/meta/recipes-support/lzo/lzo/acinclude.m4
diff --git a/meta/recipes-support/lzo/lzo_2.06.bb b/meta/recipes-support/lzo/lzo_2.08.bb
index 23f54edd80..af06e29a6f 100644
--- a/meta/recipes-support/lzo/lzo_2.06.bb
+++ b/meta/recipes-support/lzo/lzo_2.08.bb
@@ -3,15 +3,15 @@ HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
SECTION = "libs"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/lzo_init.c;beginline=23;endline=40;md5=924a0f71f5394f6d404be3b458474769"
-PR = "r1"
+ file://src/lzo_init.c;beginline=5;endline=25;md5=a6e25df9a83b24629e847846ccdd8054"
SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
+ file://0001-Use-memcpy-instead-of-reinventing-it.patch \
file://acinclude.m4 \
"
-SRC_URI[md5sum] = "95380bd4081f85ef08c5209f4107e9f8"
-SRC_URI[sha256sum] = "ff79e6f836d62d3f86ef6ce893ed65d07e638ef4d3cb952963471b4234d43e73"
+SRC_URI[md5sum] = "fcec64c26a0f4f4901468f360029678f"
+SRC_URI[sha256sum] = "ac1b3e4dee46febe9fd28737eb7f5692d3232ef1a01da10444394c3d47536614"
inherit autotools
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb b/meta/recipes-support/nettle/nettle_2.7.1.bb
index 8aa5351896..f53afcc5d4 100644
--- a/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -23,4 +23,4 @@ do_configure_prepend() {
inherit autotools
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/npth/npth/pkgconfig.patch b/meta/recipes-support/npth/npth/pkgconfig.patch
new file mode 100644
index 0000000000..178ed54c22
--- /dev/null
+++ b/meta/recipes-support/npth/npth/pkgconfig.patch
@@ -0,0 +1,49 @@
+Added npth pkgconfig file
+
+Upstream-Status: Incompatible [oe-core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: npth-1.1/src/npth.pc.in
+===================================================================
+--- /dev/null
++++ npth-1.1/src/npth.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: npth
++Description: a new portable posix threading library
++Version: @VERSION@
++Libs: -L${libdir} -lnpth -lpthread
++Cflags: -I${includedir}
+Index: npth-1.1/src/Makefile.am
+===================================================================
+--- npth-1.1.orig/src/Makefile.am
++++ npth-1.1/src/Makefile.am
+@@ -27,8 +27,10 @@
+ # License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ ## Process this file with automake to produce Makefile.in
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = npth.pc
+
+-EXTRA_DIST = libnpth.vers
++EXTRA_DIST = libnpth.vers npth.pc
+ # versioninfo.rc.in
+ nodist_include_HEADERS = npth.h
+
+Index: npth-1.1/configure.ac
+===================================================================
+--- npth-1.1.orig/configure.ac
++++ npth-1.1/configure.ac
+@@ -337,6 +337,7 @@ src/Makefile
+ w32/Makefile
+ tests/Makefile])
+ AC_CONFIG_FILES(npth-config, chmod +x npth-config)
++AC_CONFIG_FILES([src/npth.pc])
+ AC_OUTPUT
+
+ echo "
diff --git a/meta/recipes-support/npth/npth_0.91.bb b/meta/recipes-support/npth/npth_1.1.bb
index 7105b94e3d..72a194e784 100644
--- a/meta/recipes-support/npth/npth_0.91.bb
+++ b/meta/recipes-support/npth/npth_1.1.bb
@@ -7,9 +7,11 @@ LIC_FILES_CHKSUM = "\
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
"
-SRC_URI[md5sum] = "87712f0cee656c390b49773923e26e7f"
-SRC_URI[sha256sum] = "caef86ced4a331e162897818a5b924860c8d6003e52da5bdf76da00e8e0dfae1"
+
+SRC_URI[md5sum] = "aaffc8ef3e955ab50a1905809f268a23"
+SRC_URI[sha256sum] = "896c561eb2ec8da35f11828fb04a3fbff12d41ff657c799056d7dc4a66e5df7f"
BINCONFIG = "${bindir}/npth-config"
diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
index a6fa1ea607..c2b7258e50 100644
--- a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -11,23 +11,27 @@ Upstream-Status: Pending
configure.in | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
-diff --git a/configure.in b/configure.in
-index 39c96a3..99a03ac 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1778,24 +1778,24 @@ tools are selected during the Xcode/Developer Tools installation.])
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
- if test -n "$USE_64"; then
- PR_MD_ASFILES=os_Linux_x86_64.s
-- else
-+ if test -n "$USE_N32"; then
- AC_DEFINE(i386)
- PR_MD_ASFILES=os_Linux_x86.s
- CC="$CC -m32"
- CXX="$CXX -m32"
-+ else
+- elif test -n "$USE_X32"; then
++ if test -n "$USE_X32"; then
++ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ CC="$CC -mx32"
+ CXX="$CXX -mx32"
+ else
+- AC_DEFINE(i386)
+- PR_MD_ASFILES=os_Linux_x86.s
+- CC="$CC -m32"
+- CXX="$CXX -m32"
+ PR_MD_ASFILES=os_Linux_x86_64.s
fi
;;
@@ -46,6 +50,3 @@ index 39c96a3..99a03ac 100644
fi
;;
m68k)
---
-1.7.1
-
diff --git a/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
new file mode 100644
index 0000000000..565ff168e0
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
@@ -0,0 +1,67 @@
+Fix for CVE-2014-1545
+
+Upstream-Status: Backport
+
+Backported from nspr-4.10.6.tar.gz.
+---
+--- a/pr/src/io/prprf.c
++++ b/pr/src/io/prprf.c
+@@ -50,6 +50,10 @@
+ #include "prlog.h"
+ #include "prmem.h"
+
++#ifdef _MSC_VER
++#define snprintf _snprintf
++#endif
++
+ /*
+ ** WARNING: This code may *NOT* call PR_LOG (because PR_LOG calls it)
+ */
+@@ -330,7 +334,7 @@
+ ** Convert a double precision floating point number into its printable
+ ** form.
+ **
+-** XXX stop using sprintf to convert floating point
++** XXX stop using snprintf to convert floating point
+ */
+ static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
+ {
+@@ -338,15 +342,14 @@
+ char fout[300];
+ int amount = fmt1 - fmt0;
+
+- PR_ASSERT((amount > 0) && (amount < sizeof(fin)));
+- if (amount >= sizeof(fin)) {
+- /* Totally bogus % command to sprintf. Just ignore it */
++ if (amount <= 0 || amount >= sizeof(fin)) {
++ /* Totally bogus % command to snprintf. Just ignore it */
+ return 0;
+ }
+ memcpy(fin, fmt0, amount);
+ fin[amount] = 0;
+
+- /* Convert floating point using the native sprintf code */
++ /* Convert floating point using the native snprintf code */
+ #ifdef DEBUG
+ {
+ const char *p = fin;
+@@ -356,14 +359,11 @@
+ }
+ }
+ #endif
+- sprintf(fout, fin, d);
+-
+- /*
+- ** This assert will catch overflow's of fout, when building with
+- ** debugging on. At least this way we can track down the evil piece
+- ** of calling code and fix it!
+- */
+- PR_ASSERT(strlen(fout) < sizeof(fout));
++ memset(fout, 0, sizeof(fout));
++ snprintf(fout, sizeof(fout), fin, d);
++ /* Explicitly null-terminate fout because on Windows snprintf doesn't
++ * append a null-terminator if the buffer is too small. */
++ fout[sizeof(fout) - 1] = '\0';
+
+ return (*ss->stuff)(ss, fout, strlen(fout));
+ }
diff --git a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
new file mode 100644
index 0000000000..bde715c5dc
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
@@ -0,0 +1,19 @@
+the $srcdir is not defined at the time of gnu-configurize.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
+ AC_INIT
+ AC_CONFIG_SRCDIR([pr/include/nspr.h])
+
+-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
++AC_CONFIG_AUX_DIR(build/autoconf)
+ AC_CANONICAL_TARGET
+
+ dnl ========================================================
diff --git a/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch
deleted file mode 100644
index 8ca51e4d1f..0000000000
--- a/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-trickily fix build failure on x86_64
-
-It seems that we can not run the 'autoreconf -f -i' for the nspr, I met
-several strange problems while trying to do that, and the previous
-author seemed had noticed this, so he wrote:
-
-do_configure() {
- oe_runconf
-}
-
-to avoid running the "autoreconf". But we must modify configure.in to
-fix the build failure on x86_64, so both modify configure and
-configure.in, once the "autoreconf" can work correctly, we can remove
-this patch.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- configure | 12 ++++++------
- 1 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -4366,9 +4366,7 @@ EOF
- PR_MD_ASFILES=os_Linux_ia64.s
- ;;
- x86_64)
-- if test -n "$USE_64"; then
-- PR_MD_ASFILES=os_Linux_x86_64.s
-- else
-+ if test -n "$USE_N32"; then
- cat >> confdefs.h <<\EOF
- #define i386 1
- EOF
-@@ -4376,17 +4374,19 @@ EOF
- PR_MD_ASFILES=os_Linux_x86.s
- CC="$CC -m32"
- CXX="$CXX -m32"
-+ else
-+ PR_MD_ASFILES=os_Linux_x86_64.s
- fi
- ;;
- ppc|powerpc)
- PR_MD_ASFILES=os_Linux_ppc.s
- ;;
- powerpc64)
-- if test -n "$USE_64"; then
-+ if test -n "$USE_N32"; then
-+ PR_MD_ASFILES=os_Linux_ppc.s
-+ else
- CC="$CC -m64"
- CXX="$CXX -m64"
-- else
-- PR_MD_ASFILES=os_Linux_ppc.s
- fi
- ;;
- m68k)
---
-1.7.1
-
diff --git a/meta/recipes-support/nspr/nspr_4.10.3.bb b/meta/recipes-support/nspr/nspr_4.10.7.bb
index 0adfe3b3a3..de281974c5 100644
--- a/meta/recipes-support/nspr/nspr_4.10.3.bb
+++ b/meta/recipes-support/nspr/nspr_4.10.7.bb
@@ -8,21 +8,20 @@ SECTION = "libs/network"
SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
file://remove-rpath-from-tests.patch \
file://fix-build-on-x86_64.patch \
- file://trickly-fix-build-on-x86_64.patch \
+ file://remove-srcdir-from-configure-in.patch \
"
SRC_URI += "file://nspr.pc.in"
-SRC_URI[md5sum] = "bf298e874cf454a3c2f8fe7e671c5d2e"
-SRC_URI[sha256sum] = "f25779b1a665dab0090b9c977dc6c29a63320f442956ed78629b66b405cb01e5"
+SRC_URI[md5sum] = "6e06919e4b56efed501e05d8b45ec10e"
+SRC_URI[sha256sum] = "389af5cfa863ea9bc6de7b30c15f8a4f9bddd8002f8c6fdc8b33caef43893938"
S = "${WORKDIR}/nspr-${PV}/nspr"
RDEPENDS_${PN}-dev += "perl"
TARGET_CC_ARCH += "${LDFLAGS}"
-TESTS = "runtests.pl \
- runtests.sh \
+TESTS = " \
accept \
acceptread \
acceptreademu \
@@ -138,13 +137,9 @@ TESTS = "runtests.pl \
xnotify \
zerolen"
-inherit autotools-brokensep
+PR = "r1"
-do_configure() {
- gnu-configize --force
- mv config.sub config.guess build/autoconf
- oe_runconf
-}
+inherit autotools
do_compile_prepend() {
oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
@@ -160,8 +155,11 @@ do_install_append() {
sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
- cd ${S}/pr/tests
+
mkdir -p ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+ cd ${B}/pr/tests
install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
# delete compile-et.pl and perr.properties from ${bindir} because these are
diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
index 540f22330a..bbce9e9af0 100644
--- a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -11,16 +11,19 @@ SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${P
SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
-inherit autotools
+inherit autotools distro_features_check
+
+# The systemd has its own copy of nss-myhostname
+CONFLICT_DISTRO_FEATURES = "systemd"
pkg_postinst_${PN} () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
pkg_prerm_${PN} () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e '/^hosts:/s/\s*myhostname//' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
deleted file mode 100644
index 1a159c3934..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
-
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -10509,7 +10509,7 @@ ssl_RemoveSSLv3CBCPadding(sslBuffer *pla
- /* SSLv3 padding bytes are random and cannot be checked. */
- t = plaintext->len;
- t -= paddingLength+overhead;
-- /* If len >= padding_length+overhead then the MSB of t is zero. */
-+ /* If len >= paddingLength+overhead then the MSB of t is zero. */
- good = DUPLICATE_MSB_TO_ALL(~t);
- /* SSLv3 requires that the padding is minimal. */
- t = blockSize - (paddingLength+1);
-@@ -10742,7 +10742,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- }
- }
-
-- good = (unsigned)-1;
-+ good = ~0U;
- minLength = crSpec->mac_size;
- if (cipher_def->type == type_block) {
- /* CBC records have a padding length byte at the end. */
-@@ -10756,14 +10756,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- /* We can perform this test in variable time because the record's total
- * length and the ciphersuite are both public knowledge. */
- if (cText->buf->len < minLength) {
-- SSL_DBG(("%d: SSL3[%d]: HandleRecord, record too small.",
-- SSL_GETPID(), ss->fd));
-- /* must not hold spec lock when calling SSL3_SendAlert. */
-- ssl_ReleaseSpecReadLock(ss);
-- SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
-- /* always log mac error, in case attacker can read server logs. */
-- PORT_SetError(SSL_ERROR_BAD_MAC_READ);
-- return SECFailure;
-+ goto decrypt_loser;
- }
-
- if (cipher_def->type == type_block &&
-@@ -10831,11 +10824,18 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- return SECFailure;
- }
-
-+ if (cipher_def->type == type_block &&
-+ ((cText->buf->len - ivLen) % cipher_def->block_size) != 0) {
-+ goto decrypt_loser;
-+ }
-+
- /* decrypt from cText buf to plaintext. */
- rv = crSpec->decode(
- crSpec->decodeContext, plaintext->buf, (int *)&plaintext->len,
- plaintext->space, cText->buf->buf + ivLen, cText->buf->len - ivLen);
-- good &= SECStatusToMask(rv);
-+ if (rv != SECSuccess) {
-+ goto decrypt_loser;
-+ }
-
- PRINT_BUF(80, (ss, "cleartext:", plaintext->buf, plaintext->len));
-
-@@ -10843,7 +10843,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
-
- /* If it's a block cipher, check and strip the padding. */
- if (cipher_def->type == type_block) {
-- const unsigned int blockSize = cipher_def->iv_size;
-+ const unsigned int blockSize = cipher_def->block_size;
- const unsigned int macSize = crSpec->mac_size;
-
- if (crSpec->version <= SSL_LIBRARY_VERSION_3_0) {
-@@ -10899,10 +10899,11 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- }
-
- if (good == 0) {
-+decrypt_loser:
- /* must not hold spec lock when calling SSL3_SendAlert. */
- ssl_ReleaseSpecReadLock(ss);
-
-- SSL_DBG(("%d: SSL3[%d]: mac check failed", SSL_GETPID(), ss->fd));
-+ SSL_DBG(("%d: SSL3[%d]: decryption failed", SSL_GETPID(), ss->fd));
-
- if (!IS_DTLS(ss)) {
- SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
deleted file mode 100644
index 21da0c03b5..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Upstream-Status: backport
-yanjun.zhu <yanjun.zhu@windriver.com>
---- a/nss/lib/util/secport.c
-+++ b/nss/lib/util/secport.c
-@@ -69,13 +69,22 @@ PORTCharConversionFunc ucs4Utf8ConvertFu
- PORTCharConversionFunc ucs2Utf8ConvertFunc;
- PORTCharConversionWSwapFunc ucs2AsciiConvertFunc;
-
-+/* NSPR memory allocation functions (PR_Malloc, PR_Calloc, and PR_Realloc)
-+ * use the PRUint32 type for the size parameter. Before we pass a size_t or
-+ * unsigned long size to these functions, we need to ensure it is <= half of
-+ * the maximum PRUint32 value to avoid truncation and catch a negative size.
-+ */
-+#define MAX_SIZE (PR_UINT32_MAX >> 1)
-+
- void *
- PORT_Alloc(size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- /* Always allocate a non-zero amount of bytes */
-- rv = (void *)PR_Malloc(bytes ? bytes : 1);
-+ if (bytes <= MAX_SIZE) {
-+ /* Always allocate a non-zero amount of bytes */
-+ rv = PR_Malloc(bytes ? bytes : 1);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -86,9 +95,11 @@ PORT_Alloc(size_t bytes)
- void *
- PORT_Realloc(void *oldptr, size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- rv = (void *)PR_Realloc(oldptr, bytes);
-+ if (bytes <= MAX_SIZE) {
-+ rv = PR_Realloc(oldptr, bytes);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -99,10 +110,12 @@ PORT_Realloc(void *oldptr, size_t bytes)
- void *
- PORT_ZAlloc(size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- /* Always allocate a non-zero amount of bytes */
-- rv = (void *)PR_Calloc(1, bytes ? bytes : 1);
-+ if (bytes <= MAX_SIZE) {
-+ /* Always allocate a non-zero amount of bytes */
-+ rv = PR_Calloc(1, bytes ? bytes : 1);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -209,6 +222,10 @@ PORT_NewArena(unsigned long chunksize)
- {
- PORTArenaPool *pool;
-
-+ if (chunksize > MAX_SIZE) {
-+ PORT_SetError(SEC_ERROR_NO_MEMORY);
-+ return NULL;
-+ }
- pool = PORT_ZNew(PORTArenaPool);
- if (!pool) {
- return NULL;
-@@ -224,8 +241,6 @@ PORT_NewArena(unsigned long chunksize)
- return(&pool->arena);
- }
-
--#define MAX_SIZE 0x7fffffffUL
--
- void *
- PORT_ArenaAlloc(PLArenaPool *arena, size_t size)
- {
-@@ -330,6 +345,11 @@ PORT_ArenaGrow(PLArenaPool *arena, void
- PORTArenaPool *pool = (PORTArenaPool *)arena;
- PORT_Assert(newsize >= oldsize);
-
-+ if (newsize > MAX_SIZE) {
-+ PORT_SetError(SEC_ERROR_NO_MEMORY);
-+ return NULL;
-+ }
-+
- if (ARENAPOOL_MAGIC == pool->magic ) {
- PZ_Lock(pool->lock);
- /* Do we do a THREADMARK check here? */
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
deleted file mode 100644
index 7203d02c78..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-signed-off-by: Ryan Sleevi <ryan.sleevi@gmail.com>
-Upstream-Status: Backport
-reference:https://hg.mozilla.org/projects/nss/rev/e79a09364b5e
-
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -781,6 +781,11 @@ static SECStatus
- Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen,
- const unsigned char *input, int inputLen)
- {
-+ if (inputLen > maxOutputLen) {
-+ *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */
-+ PORT_SetError(SEC_ERROR_OUTPUT_LEN);
-+ return SECFailure;
-+ }
- *outputLen = inputLen;
- if (input != output)
- PORT_Memcpy(output, input, inputLen);
diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
deleted file mode 100644
index db3d6f9103..0000000000
--- a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
+++ /dev/null
@@ -1,916 +0,0 @@
-nss: CVE-2013-1740
-
-Upstream-Status: Backport
-
-the patch comes from:
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1740
-https://bugzilla.mozilla.org/show_bug.cgi?id=919877
-https://bugzilla.mozilla.org/show_bug.cgi?id=713933
-
-changeset: 10946:f28426e944ae
-user: Wan-Teh Chang <wtc@google.com>
-date: Tue Nov 26 16:44:39 2013 -0800
-summary: Bug 713933: Handle the return value of both ssl3_HandleRecord calls
-
-changeset: 10945:774c7dec7565
-user: Wan-Teh Chang <wtc@google.com>
-date: Mon Nov 25 19:16:23 2013 -0800
-summary: Bug 713933: Declare the |falseStart| local variable in the smallest
-
-changeset: 10848:141fae8fb2e8
-user: Wan-Teh Chang <wtc@google.com>
-date: Mon Sep 23 11:25:41 2013 -0700
-summary: Bug 681839: Allow SSL_HandshakeNegotiatedExtension to be called before the handshake is finished, r=brian@briansmith.org
-
-changeset: 10898:1b9c43d28713
-user: Brian Smith <brian@briansmith.org>
-date: Thu Oct 31 15:40:42 2013 -0700
-summary: Bug 713933: Make SSL False Start work with asynchronous certificate validation, r=wtc
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- nss/lib/ssl/ssl.def | 7 ++
- nss/lib/ssl/ssl.h | 54 +++++++++++---
- nss/lib/ssl/ssl3con.c | 188 +++++++++++++++++++++++++++++++++++------------
- nss/lib/ssl/ssl3gthr.c | 63 ++++++++++++----
- nss/lib/ssl/sslauth.c | 10 +--
- nss/lib/ssl/sslimpl.h | 22 +++++-
- nss/lib/ssl/sslinfo.c | 10 +--
- nss/lib/ssl/sslreveal.c | 9 +--
- nss/lib/ssl/sslsecur.c | 139 ++++++++++++++++++++++++++++-------
- nss/lib/ssl/sslsock.c | 12 ++-
- 10 files changed, 386 insertions(+), 128 deletions(-)
-
-diff --git a/nss/lib/ssl/ssl.def b/nss/lib/ssl/ssl.def
-index fbf7fc5..e937bd4 100644
---- a/nss/lib/ssl/ssl.def
-+++ b/nss/lib/ssl/ssl.def
-@@ -163,3 +163,10 @@ SSL_SetStapledOCSPResponses;
- ;+ local:
- ;+*;
- ;+};
-+;+NSS_3.15.3 { # NSS 3.15.3 release
-+;+ global:
-+SSL_RecommendedCanFalseStart;
-+SSL_SetCanFalseStartCallback;
-+;+ local:
-+;+*;
-+;+};
-diff --git a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h
-index 6db0e34..ddeaaef 100644
---- a/nss/lib/ssl/ssl.h
-+++ b/nss/lib/ssl/ssl.h
-@@ -121,14 +121,17 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd);
- #define SSL_ENABLE_FALSE_START 22 /* Enable SSL false start (off by */
- /* default, applies only to */
- /* clients). False start is a */
--/* mode where an SSL client will start sending application data before */
--/* verifying the server's Finished message. This means that we could end up */
--/* sending data to an imposter. However, the data will be encrypted and */
--/* only the true server can derive the session key. Thus, so long as the */
--/* cipher isn't broken this is safe. Because of this, False Start will only */
--/* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */
--/* bits. The advantage of False Start is that it saves a round trip for */
--/* client-speaks-first protocols when performing a full handshake. */
-+/* mode where an SSL client will start sending application data before
-+ * verifying the server's Finished message. This means that we could end up
-+ * sending data to an imposter. However, the data will be encrypted and
-+ * only the true server can derive the session key. Thus, so long as the
-+ * cipher isn't broken this is safe. The advantage of false start is that
-+ * it saves a round trip for client-speaks-first protocols when performing a
-+ * full handshake.
-+ *
-+ * In addition to enabling this option, the application must register a
-+ * callback using the SSL_SetCanFalseStartCallback function.
-+ */
-
- /* For SSL 3.0 and TLS 1.0, by default we prevent chosen plaintext attacks
- * on SSL CBC mode cipher suites (see RFC 4346 Section F.3) by splitting
-@@ -653,14 +656,45 @@ SSL_IMPORT SECStatus SSL_SetMaxServerCacheLocks(PRUint32 maxLocks);
- SSL_IMPORT SECStatus SSL_InheritMPServerSIDCache(const char * envString);
-
- /*
--** Set the callback on a particular socket that gets called when we finish
--** performing a handshake.
-+** Set the callback that gets called when a TLS handshake is complete. The
-+** handshake callback is called after verifying the peer's Finished message and
-+** before processing incoming application data.
-+**
-+** For the initial handshake: If the handshake false started (see
-+** SSL_ENABLE_FALSE_START), then application data may already have been sent
-+** before the handshake callback is called. If we did not false start then the
-+** callback will get called before any application data is sent.
- */
- typedef void (PR_CALLBACK *SSLHandshakeCallback)(PRFileDesc *fd,
- void *client_data);
- SSL_IMPORT SECStatus SSL_HandshakeCallback(PRFileDesc *fd,
- SSLHandshakeCallback cb, void *client_data);
-
-+/* Applications that wish to enable TLS false start must set this callback
-+** function. NSS will invoke the functon to determine if a particular
-+** connection should use false start or not. SECSuccess indicates that the
-+** callback completed successfully, and if so *canFalseStart indicates if false
-+** start can be used. If the callback does not return SECSuccess then the
-+** handshake will be canceled. NSS's recommended criteria can be evaluated by
-+** calling SSL_RecommendedCanFalseStart.
-+**
-+** If no false start callback is registered then false start will never be
-+** done, even if the SSL_ENABLE_FALSE_START option is enabled.
-+**/
-+typedef SECStatus (PR_CALLBACK *SSLCanFalseStartCallback)(
-+ PRFileDesc *fd, void *arg, PRBool *canFalseStart);
-+
-+SSL_IMPORT SECStatus SSL_SetCanFalseStartCallback(
-+ PRFileDesc *fd, SSLCanFalseStartCallback callback, void *arg);
-+
-+/* This function sets *canFalseStart according to the recommended criteria for
-+** false start. These criteria may change from release to release and may depend
-+** on which handshake features have been negotiated and/or properties of the
-+** certifciates/keys used on the connection.
-+*/
-+SSL_IMPORT SECStatus SSL_RecommendedCanFalseStart(PRFileDesc *fd,
-+ PRBool *canFalseStart);
-+
- /*
- ** For the server, request a new handshake. For the client, begin a new
- ** handshake. If flushCache is non-zero, the SSL3 cache entry will be
-diff --git a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
-index 61d24d9..f39ba09 100644
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -2535,7 +2535,7 @@ ssl3_SendRecord( sslSocket * ss,
- SSL_TRC(3, ("%d: SSL3[%d] SendRecord type: %s nIn=%d",
- SSL_GETPID(), ss->fd, ssl3_DecodeContentType(type),
- nIn));
-- PRINT_BUF(3, (ss, "Send record (plain text)", pIn, nIn));
-+ PRINT_BUF(50, (ss, "Send record (plain text)", pIn, nIn));
-
- PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) );
-
-@@ -6674,36 +6674,73 @@ done:
- return rv;
- }
-
-+static SECStatus
-+ssl3_CheckFalseStart(sslSocket *ss)
-+{
-+ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
-+ PORT_Assert( !ss->ssl3.hs.authCertificatePending );
-+ PORT_Assert( !ss->ssl3.hs.canFalseStart );
-+
-+ if (!ss->canFalseStartCallback) {
-+ SSL_TRC(3, ("%d: SSL[%d]: no false start callback so no false start",
-+ SSL_GETPID(), ss->fd));
-+ } else {
-+ PRBool maybeFalseStart;
-+ SECStatus rv;
-+
-+ /* An attacker can control the selected ciphersuite so we only wish to
-+ * do False Start in the case that the selected ciphersuite is
-+ * sufficiently strong that the attack can gain no advantage.
-+ * Therefore we always require an 80-bit cipher. */
-+ ssl_GetSpecReadLock(ss);
-+ maybeFalseStart = ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10;
-+ ssl_ReleaseSpecReadLock(ss);
-+
-+ if (!maybeFalseStart) {
-+ SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher",
-+ SSL_GETPID(), ss->fd));
-+ } else {
-+ rv = (ss->canFalseStartCallback)(ss->fd,
-+ ss->canFalseStartCallbackData,
-+ &ss->ssl3.hs.canFalseStart);
-+ if (rv == SECSuccess) {
-+ SSL_TRC(3, ("%d: SSL[%d]: false start callback returned %s",
-+ SSL_GETPID(), ss->fd,
-+ ss->ssl3.hs.canFalseStart ? "TRUE" : "FALSE"));
-+ } else {
-+ SSL_TRC(3, ("%d: SSL[%d]: false start callback failed (%s)",
-+ SSL_GETPID(), ss->fd,
-+ PR_ErrorToName(PR_GetError())));
-+ }
-+ return rv;
-+ }
-+ }
-+
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ return SECSuccess;
-+}
-+
- PRBool
--ssl3_CanFalseStart(sslSocket *ss) {
-- PRBool rv;
-+ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss)
-+{
-+ PRBool result = PR_FALSE;
-
- PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
-
-- /* XXX: does not take into account whether we are waiting for
-- * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when
-- * that is done, this function could return different results each time it
-- * would be called.
-- */
-+ switch (ss->ssl3.hs.ws) {
-+ case wait_new_session_ticket:
-+ result = PR_TRUE;
-+ break;
-+ case wait_change_cipher:
-+ result = !ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn);
-+ break;
-+ case wait_finished:
-+ break;
-+ default:
-+ PR_NOT_REACHED("ssl3_WaitingForStartOfServerSecondRound");
-+ }
-
-- ssl_GetSpecReadLock(ss);
-- rv = ss->opt.enableFalseStart &&
-- !ss->sec.isServer &&
-- !ss->ssl3.hs.isResuming &&
-- ss->ssl3.cwSpec &&
--
-- /* An attacker can control the selected ciphersuite so we only wish to
-- * do False Start in the case that the selected ciphersuite is
-- * sufficiently strong that the attack can gain no advantage.
-- * Therefore we require an 80-bit cipher and a forward-secret key
-- * exchange. */
-- ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 &&
-- (ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
-- ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
-- ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
-- ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa);
-- ssl_ReleaseSpecReadLock(ss);
-- return rv;
-+ return result;
- }
-
- static SECStatus ssl3_SendClientSecondRound(sslSocket *ss);
-@@ -6785,6 +6822,9 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- }
- if (ss->ssl3.hs.authCertificatePending &&
- (sendClientCert || ss->ssl3.sendEmptyCert || ss->firstHsDone)) {
-+ SSL_TRC(3, ("%d: SSL3[%p]: deferring ssl3_SendClientSecondRound because"
-+ " certificate authentication is still pending.",
-+ SSL_GETPID(), ss->fd));
- ss->ssl3.hs.restartTarget = ssl3_SendClientSecondRound;
- return SECWouldBlock;
- }
-@@ -6822,14 +6862,50 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- goto loser; /* err code was set. */
- }
-
-- /* XXX: If the server's certificate hasn't been authenticated by this
-- * point, then we may be leaking this NPN message to an attacker.
-+ /* This must be done after we've set ss->ssl3.cwSpec in
-+ * ssl3_SendChangeCipherSpecs because SSL_GetChannelInfo uses information
-+ * from cwSpec. This must be done before we call ssl3_CheckFalseStart
-+ * because the false start callback (if any) may need the information from
-+ * the functions that depend on this being set.
- */
-+ ss->enoughFirstHsDone = PR_TRUE;
-+
- if (!ss->firstHsDone) {
-+ /* XXX: If the server's certificate hasn't been authenticated by this
-+ * point, then we may be leaking this NPN message to an attacker.
-+ */
- rv = ssl3_SendNextProto(ss);
- if (rv != SECSuccess) {
- goto loser; /* err code was set. */
- }
-+
-+ if (ss->opt.enableFalseStart) {
-+ if (!ss->ssl3.hs.authCertificatePending) {
-+ /* When we fix bug 589047, we will need to know whether we are
-+ * false starting before we try to flush the client second
-+ * round to the network. With that in mind, we purposefully
-+ * call ssl3_CheckFalseStart before calling ssl3_SendFinished,
-+ * which includes a call to ssl3_FlushHandshake, so that
-+ * no application develops a reliance on such flushing being
-+ * done before its false start callback is called.
-+ */
-+ ssl_ReleaseXmitBufLock(ss);
-+ rv = ssl3_CheckFalseStart(ss);
-+ ssl_GetXmitBufLock(ss);
-+ if (rv != SECSuccess) {
-+ goto loser;
-+ }
-+ } else {
-+ /* The certificate authentication and the server's Finished
-+ * message are racing each other. If the certificate
-+ * authentication wins, then we will try to false start in
-+ * ssl3_AuthCertificateComplete.
-+ */
-+ SSL_TRC(3, ("%d: SSL3[%p]: deferring false start check because"
-+ " certificate authentication is still pending.",
-+ SSL_GETPID(), ss->fd));
-+ }
-+ }
- }
-
- rv = ssl3_SendFinished(ss, 0);
-@@ -6844,10 +6920,7 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- else
- ss->ssl3.hs.ws = wait_change_cipher;
-
-- /* Do the handshake callback for sslv3 here, if we can false start. */
-- if (ss->handshakeCallback != NULL && ssl3_CanFalseStart(ss)) {
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-- }
-+ PORT_Assert(ssl3_WaitingForStartOfServerSecondRound(ss));
-
- return SECSuccess;
-
-@@ -9421,13 +9494,6 @@ ssl3_AuthCertificate(sslSocket *ss)
-
- ss->ssl3.hs.authCertificatePending = PR_TRUE;
- rv = SECSuccess;
--
-- /* XXX: Async cert validation and False Start don't work together
-- * safely yet; if we leave False Start enabled, we may end up false
-- * starting (sending application data) before we
-- * SSL_AuthCertificateComplete has been called.
-- */
-- ss->opt.enableFalseStart = PR_FALSE;
- }
-
- if (rv != SECSuccess) {
-@@ -9551,6 +9617,12 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
- } else if (ss->ssl3.hs.restartTarget != NULL) {
- sslRestartTarget target = ss->ssl3.hs.restartTarget;
- ss->ssl3.hs.restartTarget = NULL;
-+
-+ if (target == ssl3_FinishHandshake) {
-+ SSL_TRC(3,("%d: SSL3[%p]: certificate authentication lost the race"
-+ " with peer's finished message", SSL_GETPID(), ss->fd));
-+ }
-+
- rv = target(ss);
- /* Even if we blocked here, we have accomplished enough to claim
- * success. Any remaining work will be taken care of by subsequent
-@@ -9560,7 +9632,29 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
- rv = SECSuccess;
- }
- } else {
-- rv = SECSuccess;
-+ SSL_TRC(3, ("%d: SSL3[%p]: certificate authentication won the race with"
-+ " peer's finished message", SSL_GETPID(), ss->fd));
-+
-+ PORT_Assert(!ss->firstHsDone);
-+ PORT_Assert(!ss->sec.isServer);
-+ PORT_Assert(!ss->ssl3.hs.isResuming);
-+ PORT_Assert(ss->ssl3.hs.ws == wait_new_session_ticket ||
-+ ss->ssl3.hs.ws == wait_change_cipher ||
-+ ss->ssl3.hs.ws == wait_finished);
-+
-+ /* ssl3_SendClientSecondRound deferred the false start check because
-+ * certificate authentication was pending, so we do it now if we still
-+ * haven't received any of the server's second round yet.
-+ */
-+ if (ss->opt.enableFalseStart &&
-+ !ss->firstHsDone &&
-+ !ss->sec.isServer &&
-+ !ss->ssl3.hs.isResuming &&
-+ ssl3_WaitingForStartOfServerSecondRound(ss)) {
-+ rv = ssl3_CheckFalseStart(ss);
-+ } else {
-+ rv = SECSuccess;
-+ }
- }
-
- done:
-@@ -10023,9 +10117,6 @@ xmit_loser:
- return rv;
- }
-
-- ss->gs.writeOffset = 0;
-- ss->gs.readOffset = 0;
--
- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) {
- effectiveExchKeyType = kt_rsa;
- } else {
-@@ -10090,6 +10181,9 @@ xmit_loser:
- return rv;
- }
-
-+/* The return type is SECStatus instead of void because this function needs
-+ * to have type sslRestartTarget.
-+ */
- SECStatus
- ssl3_FinishHandshake(sslSocket * ss)
- {
-@@ -10099,19 +10193,16 @@ ssl3_FinishHandshake(sslSocket * ss)
-
- /* The first handshake is now completed. */
- ss->handshake = NULL;
-- ss->firstHsDone = PR_TRUE;
-
- if (ss->ssl3.hs.cacheSID) {
- (*ss->sec.cache)(ss->sec.ci.sid);
- ss->ssl3.hs.cacheSID = PR_FALSE;
- }
-
-+ ss->ssl3.hs.canFalseStart = PR_FALSE; /* False Start phase is complete */
- ss->ssl3.hs.ws = idle_handshake;
-
-- /* Do the handshake callback for sslv3 here, if we cannot false start. */
-- if (ss->handshakeCallback != NULL && !ssl3_CanFalseStart(ss)) {
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-- }
-+ ssl_FinishHandshake(ss);
-
- return SECSuccess;
- }
-@@ -11045,7 +11136,6 @@ process_it:
-
- ssl_ReleaseSSL3HandshakeLock(ss);
- return rv;
--
- }
-
- /*
-diff --git a/nss/lib/ssl/ssl3gthr.c b/nss/lib/ssl/ssl3gthr.c
-index 6d62515..03e369d 100644
---- a/nss/lib/ssl/ssl3gthr.c
-+++ b/nss/lib/ssl/ssl3gthr.c
-@@ -275,11 +275,17 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
- {
- SSL3Ciphertext cText;
- int rv;
-- PRBool canFalseStart = PR_FALSE;
-+ PRBool keepGoing = PR_TRUE;
-
- SSL_TRC(30, ("ssl3_GatherCompleteHandshake"));
-
-+ /* ssl3_HandleRecord may end up eventually calling ssl_FinishHandshake,
-+ * which requires the 1stHandshakeLock, which must be acquired before the
-+ * RecvBufLock.
-+ */
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
- PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
- do {
- PRBool handleRecordNow = PR_FALSE;
-
-@@ -368,20 +374,48 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
- if (rv < 0) {
- return ss->recvdCloseNotify ? 0 : rv;
- }
-+ if (rv == (int) SECSuccess && ss->gs.buf.len > 0) {
-+ /* We have application data to return to the application. This
-+ * prioritizes returning application data to the application over
-+ * completing any renegotiation handshake we may be doing.
-+ */
-+ PORT_Assert(ss->firstHsDone);
-+ PORT_Assert(cText.type == content_application_data);
-+ break;
-+ }
-
-- /* If we kicked off a false start in ssl3_HandleServerHelloDone, break
-- * out of this loop early without finishing the handshake.
-- */
-- if (ss->opt.enableFalseStart) {
-- ssl_GetSSL3HandshakeLock(ss);
-- canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher ||
-- ss->ssl3.hs.ws == wait_new_session_ticket) &&
-- ssl3_CanFalseStart(ss);
-- ssl_ReleaseSSL3HandshakeLock(ss);
-+ PORT_Assert(keepGoing);
-+ ssl_GetSSL3HandshakeLock(ss);
-+ if (ss->ssl3.hs.ws == idle_handshake) {
-+ /* We are done with the current handshake so stop trying to
-+ * handshake. Note that it would be safe to test ss->firstHsDone
-+ * instead of ss->ssl3.hs.ws. By testing ss->ssl3.hs.ws instead,
-+ * we prioritize completing a renegotiation handshake over sending
-+ * application data.
-+ */
-+ PORT_Assert(ss->firstHsDone);
-+ PORT_Assert(!ss->ssl3.hs.canFalseStart);
-+ keepGoing = PR_FALSE;
-+ } else if (ss->ssl3.hs.canFalseStart) {
-+ /* Prioritize sending application data over trying to complete
-+ * the handshake if we're false starting.
-+ *
-+ * If we were to do this check at the beginning of the loop instead
-+ * of here, then this function would become be a no-op after
-+ * receiving the ServerHelloDone in the false start case, and we
-+ * would never complete the handshake.
-+ */
-+ PORT_Assert(!ss->firstHsDone);
-+
-+ if (ssl3_WaitingForStartOfServerSecondRound(ss)) {
-+ keepGoing = PR_FALSE;
-+ } else {
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ }
- }
-- } while (ss->ssl3.hs.ws != idle_handshake &&
-- !canFalseStart &&
-- ss->gs.buf.len == 0);
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+ } while (keepGoing);
-+
-
- ss->gs.readOffset = 0;
- ss->gs.writeOffset = ss->gs.buf.len;
-@@ -404,7 +438,10 @@ ssl3_GatherAppDataRecord(sslSocket *ss, int flags)
- {
- int rv;
-
-+ /* ssl3_GatherCompleteHandshake requires both of these locks. */
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
- PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
- do {
- rv = ssl3_GatherCompleteHandshake(ss, flags);
- } while (rv > 0 && ss->gs.buf.len == 0);
-diff --git a/nss/lib/ssl/sslauth.c b/nss/lib/ssl/sslauth.c
-index d2f57bf..cb956d4 100644
---- a/nss/lib/ssl/sslauth.c
-+++ b/nss/lib/ssl/sslauth.c
-@@ -60,7 +60,6 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
- sslSocket *ss;
- const char *cipherName;
- PRBool isDes = PR_FALSE;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- ss = ssl_FindSocket(fd);
- if (!ss) {
-@@ -78,14 +77,7 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
- *op = SSL_SECURITY_STATUS_OFF;
- }
-
-- if (ss->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-- ssl3_CanFalseStart(ss)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
-- if (ss->opt.useSecurity && enoughFirstHsDone) {
-+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
- if (ss->version < SSL_LIBRARY_VERSION_3_0) {
- cipherName = ssl_cipherName[ss->sec.cipherType];
- } else {
-diff --git a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h
-index 90e9567..bf0d67f 100644
---- a/nss/lib/ssl/sslimpl.h
-+++ b/nss/lib/ssl/sslimpl.h
-@@ -842,6 +842,8 @@ const ssl3CipherSuiteDef *suite_def;
- /* Shared state between ssl3_HandleFinished and ssl3_FinishHandshake */
- PRBool cacheSID;
-
-+ PRBool canFalseStart; /* Can/did we False Start */
-+
- /* clientSigAndHash contains the contents of the signature_algorithms
- * extension (if any) from the client. This is only valid for TLS 1.2
- * or later. */
-@@ -1116,6 +1118,10 @@ struct sslSocketStr {
- unsigned long clientAuthRequested;
- unsigned long delayDisabled; /* Nagle delay disabled */
- unsigned long firstHsDone; /* first handshake is complete. */
-+ unsigned long enoughFirstHsDone; /* enough of the first handshake is
-+ * done for callbacks to be able to
-+ * retrieve channel security
-+ * parameters from the SSL socket. */
- unsigned long handshakeBegun;
- unsigned long lastWriteBlocked;
- unsigned long recvdCloseNotify; /* received SSL EOF. */
-@@ -1156,6 +1162,8 @@ const unsigned char * preferredCipher;
- void *badCertArg;
- SSLHandshakeCallback handshakeCallback;
- void *handshakeCallbackData;
-+ SSLCanFalseStartCallback canFalseStartCallback;
-+ void *canFalseStartCallbackData;
- void *pkcs11PinArg;
- SSLNextProtoCallback nextProtoCallback;
- void *nextProtoArg;
-@@ -1358,7 +1366,19 @@ extern void ssl3_SetAlwaysBlock(sslSocket *ss);
-
- extern SECStatus ssl_EnableNagleDelay(sslSocket *ss, PRBool enabled);
-
--extern PRBool ssl3_CanFalseStart(sslSocket *ss);
-+extern void ssl_FinishHandshake(sslSocket *ss);
-+
-+/* Returns PR_TRUE if we are still waiting for the server to respond to our
-+ * client second round. Once we've received any part of the server's second
-+ * round then we don't bother trying to false start since it is almost always
-+ * the case that the NewSessionTicket, ChangeCipherSoec, and Finished messages
-+ * were sent in the same packet and we want to process them all at the same
-+ * time. If we were to try to false start in the middle of the server's second
-+ * round, then we would increase the number of I/O operations
-+ * (SSL_ForceHandshake/PR_Recv/PR_Send/etc.) needed to finish the handshake.
-+ */
-+extern PRBool ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss);
-+
- extern SECStatus
- ssl3_CompressMACEncryptRecord(ssl3CipherSpec * cwSpec,
- PRBool isServer,
-diff --git a/nss/lib/ssl/sslinfo.c b/nss/lib/ssl/sslinfo.c
-index 9f2597e..d0c23b7 100644
---- a/nss/lib/ssl/sslinfo.c
-+++ b/nss/lib/ssl/sslinfo.c
-@@ -26,7 +26,6 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
- sslSocket * ss;
- SSLChannelInfo inf;
- sslSessionID * sid;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- if (!info || len < sizeof inf.length) {
- PORT_SetError(SEC_ERROR_INVALID_ARGS);
-@@ -43,14 +42,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
- memset(&inf, 0, sizeof inf);
- inf.length = PR_MIN(sizeof inf, len);
-
-- if (ss->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-- ssl3_CanFalseStart(ss)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
-- if (ss->opt.useSecurity && enoughFirstHsDone) {
-+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
- sid = ss->sec.ci.sid;
- inf.protocolVersion = ss->version;
- inf.authKeyBits = ss->sec.authKeyBits;
-diff --git a/nss/lib/ssl/sslreveal.c b/nss/lib/ssl/sslreveal.c
-index dc14794..d972998 100644
---- a/nss/lib/ssl/sslreveal.c
-+++ b/nss/lib/ssl/sslreveal.c
-@@ -77,7 +77,6 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
- {
- /* some decisions derived from SSL_GetChannelInfo */
- sslSocket * sslsocket = NULL;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- if (!pYes) {
- PORT_SetError(SEC_ERROR_INVALID_ARGS);
-@@ -93,14 +92,8 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
-
- *pYes = PR_FALSE;
-
-- if (sslsocket->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (sslsocket->ssl3.initialized && ssl3_CanFalseStart(sslsocket)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
- /* according to public API SSL_GetChannelInfo, this doesn't need a lock */
-- if (sslsocket->opt.useSecurity && enoughFirstHsDone) {
-+ if (sslsocket->opt.useSecurity) {
- if (sslsocket->ssl3.initialized) { /* SSL3 and TLS */
- /* now we know this socket went through ssl3_InitState() and
- * ss->xtnData got initialized, which is the only member accessed by
-diff --git a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c
-index 49bb42b..d0df442 100644
---- a/nss/lib/ssl/sslsecur.c
-+++ b/nss/lib/ssl/sslsecur.c
-@@ -97,23 +97,13 @@ ssl_Do1stHandshake(sslSocket *ss)
- ss->securityHandshake = 0;
- }
- if (ss->handshake == 0) {
-- ssl_GetRecvBufLock(ss);
-- ss->gs.recordLen = 0;
-- ssl_ReleaseRecvBufLock(ss);
--
-- SSL_TRC(3, ("%d: SSL[%d]: handshake is completed",
-- SSL_GETPID(), ss->fd));
-- /* call handshake callback for ssl v2 */
-- /* for v3 this is done in ssl3_HandleFinished() */
-- if ((ss->handshakeCallback != NULL) && /* has callback */
-- (!ss->firstHsDone) && /* only first time */
-- (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */
-- ss->firstHsDone = PR_TRUE;
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-+ /* for v3 this is done in ssl3_FinishHandshake */
-+ if (!ss->firstHsDone && ss->version < SSL_LIBRARY_VERSION_3_0) {
-+ ssl_GetRecvBufLock(ss);
-+ ss->gs.recordLen = 0;
-+ ssl_FinishHandshake(ss);
-+ ssl_ReleaseRecvBufLock(ss);
- }
-- ss->firstHsDone = PR_TRUE;
-- ss->gs.writeOffset = 0;
-- ss->gs.readOffset = 0;
- break;
- }
- rv = (*ss->handshake)(ss);
-@@ -134,6 +124,24 @@ ssl_Do1stHandshake(sslSocket *ss)
- return rv;
- }
-
-+void
-+ssl_FinishHandshake(sslSocket *ss)
-+{
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
-+ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
-+ SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", SSL_GETPID(), ss->fd));
-+
-+ ss->firstHsDone = PR_TRUE;
-+ ss->enoughFirstHsDone = PR_TRUE;
-+ ss->gs.writeOffset = 0;
-+ ss->gs.readOffset = 0;
-+
-+ if (ss->handshakeCallback) {
-+ (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-+ }
-+}
-+
- /*
- * Handshake function that blocks. Used to force a
- * retry on a connection on the next read/write.
-@@ -206,6 +214,7 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
- ssl_Get1stHandshakeLock(ss);
-
- ss->firstHsDone = PR_FALSE;
-+ ss->enoughFirstHsDone = PR_FALSE;
- if ( asServer ) {
- ss->handshake = ssl2_BeginServerHandshake;
- ss->handshaking = sslHandshakingAsServer;
-@@ -221,6 +230,8 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
- ssl_ReleaseRecvBufLock(ss);
-
- ssl_GetSSL3HandshakeLock(ss);
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ ss->ssl3.hs.restartTarget = NULL;
-
- /*
- ** Blow away old security state and get a fresh setup.
-@@ -331,6 +342,71 @@ SSL_HandshakeCallback(PRFileDesc *fd, SSLHandshakeCallback cb,
- return SECSuccess;
- }
-
-+/* Register an application callback to be called when false start may happen.
-+** Acquires and releases HandshakeLock.
-+*/
-+SECStatus
-+SSL_SetCanFalseStartCallback(PRFileDesc *fd, SSLCanFalseStartCallback cb,
-+ void *arg)
-+{
-+ sslSocket *ss;
-+
-+ ss = ssl_FindSocket(fd);
-+ if (!ss) {
-+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetCanFalseStartCallback",
-+ SSL_GETPID(), fd));
-+ return SECFailure;
-+ }
-+
-+ if (!ss->opt.useSecurity) {
-+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
-+ return SECFailure;
-+ }
-+
-+ ssl_Get1stHandshakeLock(ss);
-+ ssl_GetSSL3HandshakeLock(ss);
-+
-+ ss->canFalseStartCallback = cb;
-+ ss->canFalseStartCallbackData = arg;
-+
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+ ssl_Release1stHandshakeLock(ss);
-+
-+ return SECSuccess;
-+}
-+
-+SECStatus
-+SSL_RecommendedCanFalseStart(PRFileDesc *fd, PRBool *canFalseStart)
-+{
-+ sslSocket *ss;
-+
-+ *canFalseStart = PR_FALSE;
-+ ss = ssl_FindSocket(fd);
-+ if (!ss) {
-+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_RecommendedCanFalseStart",
-+ SSL_GETPID(), fd));
-+ return SECFailure;
-+ }
-+
-+ if (!ss->ssl3.initialized) {
-+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
-+ return SECFailure;
-+ }
-+
-+ if (ss->version < SSL_LIBRARY_VERSION_3_0) {
-+ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2);
-+ return SECFailure;
-+ }
-+
-+ /* Require a forward-secret key exchange. */
-+ *canFalseStart = ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
-+ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
-+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
-+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa;
-+
-+ return SECSuccess;
-+}
-+
- /* Try to make progress on an SSL handshake by attempting to read the
- ** next handshake from the peer, and sending any responses.
- ** For non-blocking sockets, returns PR_ERROR_WOULD_BLOCK if it cannot
-@@ -524,6 +600,9 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
- int amount;
- int available;
-
-+ /* ssl3_GatherAppDataRecord may call ssl_FinishHandshake, which needs the
-+ * 1stHandshakeLock. */
-+ ssl_Get1stHandshakeLock(ss);
- ssl_GetRecvBufLock(ss);
-
- available = ss->gs.writeOffset - ss->gs.readOffset;
-@@ -590,6 +669,7 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
-
- done:
- ssl_ReleaseRecvBufLock(ss);
-+ ssl_Release1stHandshakeLock(ss);
- return rv;
- }
-
-@@ -1156,7 +1236,7 @@ ssl_SecureRead(sslSocket *ss, unsigned char *buf, int len)
- int
- ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- {
-- int rv = 0;
-+ int rv = 0;
-
- SSL_TRC(2, ("%d: SSL[%d]: SecureSend: sending %d bytes",
- SSL_GETPID(), ss->fd, len));
-@@ -1191,19 +1271,15 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- ss->writerThread = PR_GetCurrentThread();
- /* If any of these is non-zero, the initial handshake is not done. */
- if (!ss->firstHsDone) {
-- PRBool canFalseStart = PR_FALSE;
-+ PRBool falseStart = PR_FALSE;
- ssl_Get1stHandshakeLock(ss);
-- if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
-+ if (ss->opt.enableFalseStart &&
-+ ss->version >= SSL_LIBRARY_VERSION_3_0) {
- ssl_GetSSL3HandshakeLock(ss);
-- if ((ss->ssl3.hs.ws == wait_change_cipher ||
-- ss->ssl3.hs.ws == wait_finished ||
-- ss->ssl3.hs.ws == wait_new_session_ticket) &&
-- ssl3_CanFalseStart(ss)) {
-- canFalseStart = PR_TRUE;
-- }
-+ falseStart = ss->ssl3.hs.canFalseStart;
- ssl_ReleaseSSL3HandshakeLock(ss);
- }
-- if (!canFalseStart &&
-+ if (!falseStart &&
- (ss->handshake || ss->nextHandshake || ss->securityHandshake)) {
- rv = ssl_Do1stHandshake(ss);
- }
-@@ -1228,6 +1304,17 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- goto done;
- }
-
-+ if (!ss->firstHsDone) {
-+ PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_3_0);
-+#ifdef DEBUG
-+ ssl_GetSSL3HandshakeLock(ss);
-+ PORT_Assert(ss->ssl3.hs.canFalseStart);
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+#endif
-+ SSL_TRC(3, ("%d: SSL[%d]: SecureSend: sending data due to false start",
-+ SSL_GETPID(), ss->fd));
-+ }
-+
- /* Send out the data using one of these functions:
- * ssl2_SendClear, ssl2_SendStream, ssl2_SendBlock,
- * ssl3_SendApplicationData
-diff --git a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c
-index cd4a7a7..73e069b 100644
---- a/nss/lib/ssl/sslsock.c
-+++ b/nss/lib/ssl/sslsock.c
-@@ -349,6 +349,8 @@ ssl_DupSocket(sslSocket *os)
- ss->badCertArg = os->badCertArg;
- ss->handshakeCallback = os->handshakeCallback;
- ss->handshakeCallbackData = os->handshakeCallbackData;
-+ ss->canFalseStartCallback = os->canFalseStartCallback;
-+ ss->canFalseStartCallbackData = os->canFalseStartCallbackData;
- ss->pkcs11PinArg = os->pkcs11PinArg;
-
- /* Create security data */
-@@ -2341,10 +2343,14 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *p_out_flags)
- } else if (new_flags & PR_POLL_WRITE) {
- /* The caller is trying to write, but the handshake is
- ** blocked waiting for data to read, and the first
-- ** handshake has been sent. so do NOT to poll on write.
-+ ** handshake has been sent. So do NOT to poll on write
-+ ** unless we did false start.
- */
-- new_flags ^= PR_POLL_WRITE; /* don't select on write. */
-- new_flags |= PR_POLL_READ; /* do select on read. */
-+ if (!(ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-+ ss->ssl3.hs.canFalseStart)) {
-+ new_flags ^= PR_POLL_WRITE; /* don't select on write. */
-+ }
-+ new_flags |= PR_POLL_READ; /* do select on read. */
- }
- }
- } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) {
---
-1.7.9.5
-
diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
deleted file mode 100644
index 1be8a17870..0000000000
--- a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-nss: CVE-2014-1492
-
-Upstream-Status: Backport
-
-the patch comes from:
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1492
-https://bugzilla.mozilla.org/show_bug.cgi?id=903885
-
-changeset: 11063:709d4e597979
-user: Kai Engert <kaie@kuix.de>
-date: Wed Mar 05 18:38:55 2014 +0100
-summary: Bug 903885, address requests to clarify comments from wtc
-
-changeset: 11046:2ffa40a3ff55
-tag: tip
-user: Wan-Teh Chang <wtc@google.com>
-date: Tue Feb 25 18:17:08 2014 +0100
-summary: Bug 903885, fix IDNA wildcard handling v4, r=kaie
-
-changeset: 11045:15ea62260c21
-user: Christian Heimes <sites@cheimes.de>
-date: Mon Feb 24 17:50:25 2014 +0100
-summary: Bug 903885, fix IDNA wildcard handling, r=kaie
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- nss/lib/certdb/certdb.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/nss/lib/certdb/certdb.c b/nss/lib/certdb/certdb.c
-index b7d22bd..91877b7 100644
---- a/nss/lib/certdb/certdb.c
-+++ b/nss/lib/certdb/certdb.c
-@@ -1381,7 +1381,7 @@ cert_TestHostName(char * cn, const char * hn)
- return rv;
- }
- } else {
-- /* New approach conforms to RFC 2818. */
-+ /* New approach conforms to RFC 6125. */
- char *wildcard = PORT_Strchr(cn, '*');
- char *firstcndot = PORT_Strchr(cn, '.');
- char *secondcndot = firstcndot ? PORT_Strchr(firstcndot+1, '.') : NULL;
-@@ -1390,14 +1390,17 @@ cert_TestHostName(char * cn, const char * hn)
- /* For a cn pattern to be considered valid, the wildcard character...
- * - may occur only in a DNS name with at least 3 components, and
- * - may occur only as last character in the first component, and
-- * - may be preceded by additional characters
-+ * - may be preceded by additional characters, and
-+ * - must not be preceded by an IDNA ACE prefix (xn--)
- */
- if (wildcard && secondcndot && secondcndot[1] && firsthndot
-- && firstcndot - wildcard == 1
-- && secondcndot - firstcndot > 1
-- && PORT_Strrchr(cn, '*') == wildcard
-+ && firstcndot - wildcard == 1 /* wildcard is last char in first component */
-+ && secondcndot - firstcndot > 1 /* second component is non-empty */
-+ && PORT_Strrchr(cn, '*') == wildcard /* only one wildcard in cn */
- && !PORT_Strncasecmp(cn, hn, wildcard - cn)
-- && !PORT_Strcasecmp(firstcndot, firsthndot)) {
-+ && !PORT_Strcasecmp(firstcndot, firsthndot)
-+ /* If hn starts with xn--, then cn must start with wildcard */
-+ && (PORT_Strncasecmp(hn, "xn--", 4) || wildcard == cn)) {
- /* valid wildcard pattern match */
- return SECSuccess;
- }
---
-1.7.9.5
-
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index cc9e7b9cd2..6330f4e0a1 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -8,7 +8,7 @@ v3 certificates, and other security standards."
HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
SECTION = "libs"
-LICENSE = "MPL-1.1 GPL-2.0 LGPL-2.1"
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859"
@@ -16,18 +16,14 @@ SRC_URI = "\
file://nss-fix-support-cross-compiling.patch \
file://nss-no-rpath-for-cross-compiling.patch \
file://nss-fix-incorrect-shebang-of-perl.patch \
- file://nss-3.15.1-fix-CVE-2013-1741.patch \
- file://nss-3.15.1-fix-CVE-2013-5605.patch \
- file://nss-CVE-2014-1492.patch \
- file://nss-CVE-2013-1740.patch \
- file://nss-3.15.1-fix-CVE-2013-1739.patch \
+ file://nss-fix-nsinstall-build.patch \
"
-SRC_URI_append_class-target = "\
+SRC_URI_append = "\
file://nss.pc.in \
file://signlibs.sh \
"
inherit siteinfo
-PR = "r0"
+
DEPENDS = "sqlite3 nspr zlib nss-native"
DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
RDEPENDS_${PN} = "perl"
@@ -151,7 +147,7 @@ do_install() {
done
}
-do_install_append_class-target() {
+do_install_append() {
# Create empty .chk files for the NSS libraries at build time. They could
# be regenerated at target's boot time.
for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
@@ -166,12 +162,14 @@ do_install_append_class-target() {
sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+do_install_append_class-target() {
# Create a blank certificate
- mkdir -p ${D}/etc/pki/nssdb/
+ mkdir -p ${D}${sysconfdir}/pki/nssdb/
touch ./empty_password
- certutil -N -d ${D}/etc/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}/etc/pki/nssdb/*.db
+ certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+ chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
rm ./empty_password
}
diff --git a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
index 547594d5b6..547594d5b6 100644
--- a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch
+++ b/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
diff --git a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
new file mode 100644
index 0000000000..866de07ea8
--- /dev/null
+++ b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -0,0 +1,35 @@
+Fix nss multilib build on openSUSE 11.x 32bit
+
+While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
+fail with error:
+
+* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
+
+It caused by the '-m64' option which passed to host gcc.
+
+The nsinstall was built first while nss starting to build, it only runs
+on host to install built files, it doesn't need any cross-compling or
+multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
+error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+===================================================
+diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile
+index 1850bcb..5aee84f 100644
+--- a/nss/coreconf/nsinstall/Makefile
++++ b/nss/coreconf/nsinstall/Makefile
+@@ -18,6 +18,12 @@ INTERNAL_TOOLS = 1
+
+ include $(DEPTH)/coreconf/config.mk
+
++# nsinstall is unfit for cross-compiling/multilib-build since it was
++# always run on local host to install built files. This change intends
++# to clean the '-m64' from ARCHFLAG and LDFLAGS.
++ARCHFLAG =
++LDFLAGS =
++
+ ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
+ PROGRAM =
+ else
diff --git a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
index f0b3550bff..f0b3550bff 100644
--- a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch
+++ b/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
diff --git a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
index 7661dc93a0..7661dc93a0 100644
--- a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch
+++ b/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
diff --git a/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/nss/nss.pc.in
index 200f635c65..200f635c65 100644
--- a/meta/recipes-support/nss/files/nss.pc.in
+++ b/meta/recipes-support/nss/nss/nss.pc.in
diff --git a/meta/recipes-support/nss/files/signlibs.sh b/meta/recipes-support/nss/nss/signlibs.sh
index 1ec79f4576..1ec79f4576 100644
--- a/meta/recipes-support/nss/files/signlibs.sh
+++ b/meta/recipes-support/nss/nss/signlibs.sh
diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb
deleted file mode 100644
index 7b06f00cde..0000000000
--- a/meta/recipes-support/nss/nss_3.15.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require nss.inc
-
-SRC_URI += "\
- http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb"
-SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284"
-
diff --git a/meta/recipes-support/nss/nss_3.17.3.bb b/meta/recipes-support/nss/nss_3.17.3.bb
new file mode 100644
index 0000000000..e7d0780fb8
--- /dev/null
+++ b/meta/recipes-support/nss/nss_3.17.3.bb
@@ -0,0 +1,7 @@
+require nss.inc
+
+SRC_URI += "\
+ http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_3_RTM/src/${BP}.tar.gz \
+"
+SRC_URI[md5sum] = "fba7489e1b26f2a0bfe5527430fd61e1"
+SRC_URI[sha256sum] = "f4d5e9035a2f84f25f35c283de3b0ff60d72e918748de25eaf017ed201fa21d5"
diff --git a/meta/recipes-support/pinentry/pinentry_0.9.0.bb b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
new file mode 100644
index 0000000000..10b329b15e
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
+DESCRIPTION = "\
+ Pinentry is a collection of simple PIN or passphrase entry dialogs which \
+ utilize the Assuan protocol as described by the aegypten project; see \
+ http://www.gnupg.org/aegypten/ for details."
+
+HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
+
+PR = "r1"
+
+inherit autotools
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "40a05856cb3accf6679987b7899b0f5a"
+SRC_URI[sha256sum] = "90045a07ab8e1a8e1ecf5d19b51691f195525e579fa5d71d7e92c120b05490ab"
+
+EXTRA_OECONF = "--disable-rpath \
+ --disable-dependency-tracking \
+ "
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt4] = "--enable-pinentry-qt4, --disable-pinentry-qt4, qt4-x11"
+PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index 33424134c5..c618f1148d 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,5 +1,5 @@
#!/bin/sh
-
+ANYFAILED=no
echo "START: $0"
for libdir in /usr/lib*
@@ -15,9 +15,13 @@ do
date "+%Y-%m-%dT%H:%M"
echo "BEGIN: $x"
cd "$x"
- ./run-ptest
+ ./run-ptest || ANYFAILED=yes
echo "END: $x"
date "+%Y-%m-%dT%H:%M"
done
done
echo "STOP: $0"
+if [ "$ANYFAILED" = "yes" ]; then
+ exit 1
+fi
+exit 0
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
index 7443811d8c..bc1b0a4d46 100644
--- a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
+++ b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
INHIBIT_DEFAULT_DEPS = "1"
+S = "${WORKDIR}"
+
do_install () {
mkdir -p ${D}${bindir}
install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000000..9d073e9abf
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
+'scons' cleans the environment which breaks ccache builds because
+CCACHEDIR can point to an unexpected location:
+
+| ccache arm-linux-gnueabi-gcc ... context.c
+| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
+
+Issue is described in
+
+ http://www.scons.org/wiki/ImportingEnvironmentSettings
+
+and because 'bitbake' cleans environment we can pass it completely
+instead of trying to enumerate needed env.
+
+Upstream-Status: Inappropriate
+
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct
++++ serf-1.3.6/SConstruct
+@@ -149,6 +149,7 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+ tools=('default', 'textfile',),
+ CPPPATH=['.', ],
++ ENV = os.environ,
+ )
+
+ env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch
new file mode 100644
index 0000000000..380f5d00d2
--- /dev/null
+++ b/meta/recipes-support/serf/serf/norpath.patch
@@ -0,0 +1,42 @@
+The RPATH handling in serf is all wrong for us and we don't need it
+anyway so hack around it by removing this for now.
+
+Upstream-Status: Inappropriate
+
+RP 2014/7/17
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000
++++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000
+@@ -218,8 +218,7 @@
+ else:
+ LIBNAMESTATIC = 'serf-${MAJOR}'
+
+-env.Append(RPATH=libdir,
+- PDB='${TARGET.filebase}.pdb')
++env.Append(PDB='${TARGET.filebase}.pdb')
+
+ #for i in env:
+ # print(str(env[i]))
+@@ -371,12 +370,6 @@
+ if sys.platform == 'win32':
+ env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
+
+-# On some systems, the -R values that APR describes never make it into actual
+-# RPATH flags. We'll manually map all directories in LIBPATH into new
+-# flags to set RPATH values.
+-for d in env['LIBPATH']:
+- env.Append(RPATH=':'+d)
+-
+ # Set up the construction of serf-*.pc
+ pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
+ env.File('build/serf.pc.in'),
+@@ -446,7 +439,6 @@
+ ENV={'PATH' : os.environ['PATH']}))
+
+ # Find the (dynamic) library in this directory
+-tenv.Replace(RPATH=thisdir)
+ tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
+ LIBPATH=[thisdir, ])
+
diff --git a/meta/recipes-support/serf/serf_1.3.8.bb b/meta/recipes-support/serf/serf_1.3.8.bb
new file mode 100644
index 0000000000..aa7918b5c3
--- /dev/null
+++ b/meta/recipes-support/serf/serf_1.3.8.bb
@@ -0,0 +1,26 @@
+
+SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-${PV}.tar.bz2 \
+ file://norpath.patch \
+ file://env.patch"
+
+SRC_URI[md5sum] = "2e4efe57ff28cb3202a112e90f0c2889"
+SRC_URI[sha256sum] = "e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
+
+do_compile() {
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
+ CC="${CC}" \
+ APR=`which apr-1-config` APU=`which apu-1-config` \
+ CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
+ OPENSSL="${STAGING_EXECPREFIXDIR}"
+}
+
+do_install() {
+ ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb
deleted file mode 100644
index 11fd6ded64..0000000000
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI[md5sum] = "8f90f3f2b8478fa47e70678d34013f99"
-SRC_URI[sha256sum] = "a5516ae241b95a948a6749b1cbf65dc20c3bb563a73cc7bedb7065933788bb78"
-
-SRC_URI =+ "file://parallelmake.patch \
- file://install-data-hook.patch"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
new file mode 100644
index 0000000000..4bd81cd831
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI[md5sum] = "743720bc4803dd69f55449013d350f31"
+SRC_URI[sha256sum] = "4fd49c8c7ca9ecb10c59845094a18dbb73b69c72b4bad3db5e864f2111cb323a"
+
+SRC_URI =+ "file://parallelmake.patch \
+ file://install-data-hook.patch"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb b/meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb
index 244816bb9b..4c73d304da 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb
@@ -10,10 +10,10 @@ PE = "3"
SQLITE_PV = "${@sqlite_download_version(d)}"
SRC_URI = "http://www.sqlite.org/2014/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+SRC_URI[md5sum] = "33bb8db0038317ce1b0480ca1185c7ba"
+SRC_URI[sha256sum] = "86370f139405fdfe03334fd618171a74e50f589f17ccbe5933361ed1f58359ec"
-SRC_URI[md5sum] = "0544ef6d7afd8ca797935ccc2685a9ed"
-SRC_URI[sha256sum] = "98c33abe4106e508e73fda648b2657ac9e969fe24695f543dcde68cc71f3091b"
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
# Provide column meta-data API
BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
diff --git a/meta/site/arm-32 b/meta/site/arm-32
new file mode 100644
index 0000000000..81fd8d3103
--- /dev/null
+++ b/meta/site/arm-32
@@ -0,0 +1,47 @@
+# definitions assuming 32-bit arm architecture
+
+# apache
+ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
+
+# glib
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+
+# glib-2.0
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
+glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
+glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+
+# jikes
+ac_cv_sizeof_wchar_t=4
+
+# ORBit2
+ac_cv_alignof_CORBA_boolean=1
+ac_cv_alignof_CORBA_char=1
+ac_cv_alignof_CORBA_double=8
+ac_cv_alignof_CORBA_float=4
+ac_cv_alignof_CORBA_long=4
+ac_cv_alignof_CORBA_long_double=8
+ac_cv_alignof_CORBA_long_long=8
+ac_cv_alignof_CORBA_octet=1
+ac_cv_alignof_CORBA_pointer=4
+ac_cv_alignof_CORBA_short=2
+ac_cv_alignof_CORBA_struct=1
+ac_cv_alignof_CORBA_wchar=2
+
+# at-spi2-core
+ac_cv_alignof_char=1
+ac_cv_alignof_dbind_pointer=4
+ac_cv_alignof_dbind_struct=1
+ac_cv_alignof_dbus_bool_t=4
+ac_cv_alignof_dbus_int16_t=2
+ac_cv_alignof_dbus_int32_t=4
+ac_cv_alignof_dbus_int64_t=8
+ac_cv_alignof_double=8
diff --git a/meta/site/arm-64 b/meta/site/arm-64
new file mode 100644
index 0000000000..90c09b2d54
--- /dev/null
+++ b/meta/site/arm-64
@@ -0,0 +1,46 @@
+# definitions assuming 64-bit arm architecture
+
+# general
+ac_cv_sizeof_wchar_t=4
+ac_cv_sizeof_size_t=8
+ac_cv_sizeof_ssize_t=8
+ac_cv_alignof_char=1
+ac_cv_alignof_double=8
+
+# glib
+#glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+#glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+#glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+
+# glib-2.0
+#glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+#glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
+#glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
+#glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
+#glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+
+# ORBit2 (should be in meta-gnome/site/arm-64)
+#ac_cv_alignof_CORBA_boolean=1
+#ac_cv_alignof_CORBA_char=1
+#ac_cv_alignof_CORBA_double=8
+#ac_cv_alignof_CORBA_float=4
+#ac_cv_alignof_CORBA_long=4
+#ac_cv_alignof_CORBA_long_double=8
+#ac_cv_alignof_CORBA_long_long=8
+#ac_cv_alignof_CORBA_octet=1
+#ac_cv_alignof_CORBA_pointer=4
+#ac_cv_alignof_CORBA_short=2
+#ac_cv_alignof_CORBA_struct=1
+#ac_cv_alignof_CORBA_wchar=2
+
+# at-spi2-core
+ac_cv_alignof_dbind_pointer=8
+ac_cv_alignof_dbind_struct=1
+ac_cv_alignof_dbus_bool_t=4
+ac_cv_alignof_dbus_int16_t=2
+ac_cv_alignof_dbus_int32_t=4
+ac_cv_alignof_dbus_int64_t=8
+
diff --git a/meta/site/arm-common b/meta/site/arm-common
index 1893dc0ab8..12e5d4592a 100644
--- a/meta/site/arm-common
+++ b/meta/site/arm-common
@@ -11,7 +11,6 @@ ac_cv_sctp=${ac_cv_sctp=no}
# apache
ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
-ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
# bash
@@ -51,8 +50,6 @@ ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
am_cv_func_working_getline=${am_cv_func_working_getline=yes}
# glib
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
glib_cv_stack_grows=${glib_cv_stack_grows=no}
glib_cv_uscore=${glib_cv_uscore=no}
glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
@@ -60,7 +57,6 @@ glib_cv_has__inline=${glib_cv_has__inline=yes}
glib_cv_has__inline__=${glib_cv_has__inline__=yes}
glib_cv_hasinline=${glib_cv_hasinline=yes}
glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
glib_cv_uscore=${glib_cv_uscore=no}
glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
@@ -70,15 +66,7 @@ glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_po
# glib-2.0
glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
-glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
-glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
-glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
-glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes}
-ac_cv_alignof_guint32=4
-ac_cv_alignof_guint64=8
-ac_cv_alignof_unsigned_long=4
#gstreamer
as_cv_unaligned_access=${as_cv_unaligned_access=no}
@@ -86,9 +74,6 @@ as_cv_unaligned_access=${as_cv_unaligned_access=no}
# httppc
ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no}
-# jikes
-ac_cv_sizeof_wchar_t=4
-
# lftp
ac_cv_need_trio=${ac_cv_need_trio=no}
lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes}
@@ -119,20 +104,6 @@ mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no}
ac_cv_regexec_segfault_emptystr=${ac_cv_regexec_segfault_emptystr=no}
nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no}
-# ORBit2
-ac_cv_alignof_CORBA_boolean=1
-ac_cv_alignof_CORBA_char=1
-ac_cv_alignof_CORBA_double=8
-ac_cv_alignof_CORBA_float=4
-ac_cv_alignof_CORBA_long=4
-ac_cv_alignof_CORBA_long_double=8
-ac_cv_alignof_CORBA_long_long=8
-ac_cv_alignof_CORBA_octet=1
-ac_cv_alignof_CORBA_pointer=4
-ac_cv_alignof_CORBA_short=2
-ac_cv_alignof_CORBA_struct=1
-ac_cv_alignof_CORBA_wchar=2
-
# php
ac_cv_pread=${ac_cv_pread=no}
ac_cv_pwrite=${ac_cv_pwrite=no}
@@ -186,12 +157,3 @@ jm_cv_func_working_readdir=yes
# evolution-data-server
ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
-# at-spi2-core
-ac_cv_alignof_char=1
-ac_cv_alignof_dbind_pointer=4
-ac_cv_alignof_dbind_struct=1
-ac_cv_alignof_dbus_bool_t=4
-ac_cv_alignof_dbus_int16_t=2
-ac_cv_alignof_dbus_int32_t=4
-ac_cv_alignof_dbus_int64_t=8
-ac_cv_alignof_double=8
diff --git a/meta/site/common-darwin b/meta/site/common-darwin
new file mode 100644
index 0000000000..7d2d898749
--- /dev/null
+++ b/meta/site/common-darwin
@@ -0,0 +1,2 @@
+ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
+ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
diff --git a/meta/site/common-mingw b/meta/site/common-mingw
new file mode 100644
index 0000000000..f337c36e75
--- /dev/null
+++ b/meta/site/common-mingw
@@ -0,0 +1,2 @@
+# expat
+ac_cv_func_mmap_fixed_mapped=no
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index 00079989dc..9b9e0f44b0 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -60,14 +60,14 @@ if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
res=$?
fi
+if [ $res != 0 ] ; then
+ bitbake --server-only -t xmlrpc -B localhost:$port
+fi
+
if [ $port = -1 ] ; then
export BBSERVER=localhost:-1
echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
else
- if [ $res != 0 ] ; then
- bitbake --server-only -t xmlrpc -B localhost:$port
- fi
-
export BBSERVER=`cat bitbake.lock`
if [ $res = 0 ] ; then
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 19d64e64e1..851003d855 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -26,6 +26,7 @@ import logging
import subprocess
import ConfigParser
import re
+from collections import OrderedDict
__version__ = "0.2.1"
@@ -305,18 +306,17 @@ def check_rev_branch(component, repodir, rev, branch):
return False
return True
-def get_repos(conf, args):
+def get_repos(conf, repo_names):
repos = []
- if len(args) > 1:
- for arg in args[1:]:
- if arg.startswith('-'):
- break
- else:
- repos.append(arg)
- for repo in repos:
- if not repo in conf.repos:
- logger.error("Specified component '%s' not found in configuration" % repo)
- sys.exit(0)
+ for name in repo_names:
+ if name.startswith('-'):
+ break
+ else:
+ repos.append(name)
+ for repo in repos:
+ if not repo in conf.repos:
+ logger.error("Specified component '%s' not found in configuration" % repo)
+ sys.exit(0)
if not repos:
repos = conf.repos
@@ -327,7 +327,7 @@ def action_pull(conf, args):
"""
update the component repos only
"""
- repos = get_repos(conf, args)
+ repos = get_repos(conf, args[1:])
# make sure all repos are clean
for name in repos:
@@ -348,7 +348,13 @@ def action_update(conf, args):
generate the patch list
apply the generated patches
"""
- repos = get_repos(conf, args)
+ components = [arg.split(':')[0] for arg in args[1:]]
+ revisions = []
+ for arg in args[1:]:
+ revision= arg.split(':', 1)[1] if ':' in arg else None
+ revisions.append(revision)
+ # Map commitishes to repos
+ repos = OrderedDict(zip(get_repos(conf, components), revisions))
# make sure combo repo is clean
check_repo_clean(os.getcwd())
@@ -362,9 +368,9 @@ def action_update(conf, args):
if conf.nopull:
logger.info("Skipping pull (-n)")
else:
- action_pull(conf, args)
+ action_pull(conf, ['arg0'] + components)
- for name in repos:
+ for name, revision in repos.iteritems():
repo = conf.repos[name]
ldir = repo['local_repo_dir']
dest_dir = repo['dest_dir']
@@ -373,18 +379,21 @@ def action_update(conf, args):
# Step 2: generate the patch list and store to patch dir
logger.info("Generating patches from %s..." % name)
+ top_revision = revision or branch
+ if not check_rev_branch(name, ldir, top_revision, branch):
+ sys.exit(1)
if dest_dir != ".":
prefix = "--src-prefix=a/%s/ --dst-prefix=b/%s/" % (dest_dir, dest_dir)
else:
prefix = ""
if repo['last_revision'] == "":
logger.info("Warning: last_revision of component %s is not set, starting from the first commit" % name)
- patch_cmd_range = "--root %s" % branch
- rev_cmd_range = branch
+ patch_cmd_range = "--root %s" % top_revision
+ rev_cmd_range = top_revision
else:
if not check_rev_branch(name, ldir, repo['last_revision'], branch):
sys.exit(1)
- patch_cmd_range = "%s..%s" % (repo['last_revision'], branch)
+ patch_cmd_range = "%s..%s" % (repo['last_revision'], top_revision)
rev_cmd_range = patch_cmd_range
file_filter = repo.get('file_filter',"")
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index be3b648046..cdd7885dca 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -335,7 +335,7 @@ test2 () {
#
# Start with
# i) "rm -rf tmp/cache; time bitbake -p"
-# ii) "rm -rf tmp/cache/default-eglibc/; time bitbake -p"
+# ii) "rm -rf tmp/cache/default-glibc/; time bitbake -p"
# iii) "time bitbake -p"
@@ -344,8 +344,8 @@ test3 () {
log " Removing tmp/cache && cache"
rm -rf tmp/cache cache
bbtime -p
- log " Removing tmp/cache/default-eglibc/"
- rm -rf tmp/cache/default-eglibc/
+ log " Removing tmp/cache/default-glibc/"
+ rm -rf tmp/cache/default-glibc/
bbtime -p
bbtime -p
}
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index 598b5c3fc6..2f3b8b06a6 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -65,7 +65,6 @@ def get_recipesdata(bbhandler, preferred):
data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data)
flags = data.getVarFlags("PACKAGECONFIG")
flags.pop('doc', None)
- flags.pop('defaultval', None)
if flags:
data_dict[fn] = data
@@ -78,7 +77,6 @@ def collect_pkgs(data_dict):
for fn in data_dict:
pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG")
pkgconfigflags.pop('doc', None)
- pkgconfigflags.pop('defaultval', None)
pkgname = data_dict[fn].getVar("P", True)
pkg_dict[pkgname] = sorted(pkgconfigflags.keys())
@@ -135,7 +133,7 @@ def display_all(data_dict):
print('PACKAGECONFIG %s' % packageconfig)
for flag,flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").iteritems():
- if flag in ["defaultval", "doc"]:
+ if flag == "doc":
continue
print('PACKAGECONFIG[%s] %s' % (flag, flag_val))
print ''
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 1992d6c6cb..b96b7d4f7d 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -20,6 +20,10 @@
LANG=C
+# Set to 1 to enable additional output
+DEBUG=0
+OUT="/dev/null"
+
#
# Defaults
#
@@ -28,8 +32,60 @@ BOOT_SIZE=20
# 5% for swap
SWAP_RATIO=5
+# Cleanup after die()
+cleanup() {
+ debug "Syncing and unmounting devices"
+ # Unmount anything we mounted
+ unmount $ROOTFS_MNT || error "Failed to unmount $ROOTFS_MNT"
+ unmount $BOOTFS_MNT || error "Failed to unmount $BOOTFS_MNT"
+ unmount $HDDIMG_ROOTFS_MNT || error "Failed to unmount $HDDIMG_ROOTFS_MNT"
+ unmount $HDDIMG_MNT || error "Failed to unmount $HDDIMG_MNT"
+
+ # Remove the TMPDIR
+ debug "Removing temporary files"
+ if [ -d "$TMPDIR" ]; then
+ rm -rf $TMPDIR || error "Failed to remove $TMPDIR"
+ fi
+}
+
+trap 'die "Signal Received, Aborting..."' HUP INT TERM
+
+# Logging routines
+WARNINGS=0
+ERRORS=0
+CLEAR="$(tput sgr0)"
+INFO="$(tput bold)"
+RED="$(tput setaf 1)$(tput bold)"
+GREEN="$(tput setaf 2)$(tput bold)"
+YELLOW="$(tput setaf 3)$(tput bold)"
+info() {
+ echo "${INFO}$1${CLEAR}"
+}
+error() {
+ ERRORS=$((ERRORS+1))
+ echo "${RED}$1${CLEAR}"
+}
+warn() {
+ WARNINGS=$((WARNINGS+1))
+ echo "${YELLOW}$1${CLEAR}"
+}
+success() {
+ echo "${GREEN}$1${CLEAR}"
+}
+die() {
+ error "$1"
+ cleanup
+ exit 1
+}
+debug() {
+ if [ $DEBUG -eq 1 ]; then
+ echo "$1"
+ fi
+}
+
usage() {
- echo "Usage: $(basename $0) DEVICE HDDIMG TARGET_DEVICE"
+ echo "Usage: $(basename $0) [-v] DEVICE HDDIMG TARGET_DEVICE"
+ echo " -v: Verbose debug"
echo " DEVICE: The device to write the image to, e.g. /dev/sdh"
echo " HDDIMG: The hddimg file to generate the efi disk from"
echo " TARGET_DEVICE: The device the target will boot from, e.g. /dev/mmcblk0"
@@ -37,8 +93,7 @@ usage() {
image_details() {
IMG=$1
- echo "Image details"
- echo "============="
+ info "Image details"
echo " image: $(stat --printf '%N\n' $IMG)"
echo " size: $(stat -L --printf '%s bytes\n' $IMG)"
echo " modified: $(stat -L --printf '%y\n' $IMG)"
@@ -50,8 +105,7 @@ device_details() {
DEV=$1
BLOCK_SIZE=512
- echo "Device details"
- echo "=============="
+ info "Device details"
echo " device: $DEVICE"
if [ -f "/sys/class/block/$DEV/device/vendor" ]; then
echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)"
@@ -74,26 +128,37 @@ device_details() {
unmount_device() {
grep -q $DEVICE /proc/mounts
if [ $? -eq 0 ]; then
- echo -n "$DEVICE listed in /proc/mounts, attempting to unmount..."
+ warn "$DEVICE listed in /proc/mounts, attempting to unmount"
umount $DEVICE* 2>/dev/null
- grep -q $DEVICE /proc/mounts
- if [ $? -eq 0 ]; then
- echo "FAILED"
- exit 1
- fi
- echo "OK"
+ return $?
fi
+ return 0
}
+unmount() {
+ grep -q $1 /proc/mounts
+ if [ $? -eq 0 ]; then
+ debug "Unmounting $1"
+ umount $1
+ return $?
+ fi
+ return 0
+}
#
# Parse and validate arguments
#
-if [ $# -ne 3 ]; then
+if [ $# -lt 3 ] || [ $# -gt 4 ]; then
usage
exit 1
fi
+if [ "$1" = "-v" ]; then
+ DEBUG=1
+ OUT="1"
+ shift
+fi
+
DEVICE=$1
HDDIMG=$2
TARGET_DEVICE=$3
@@ -104,30 +169,31 @@ if [ $? -eq 0 ]; then
fi
if [ ! -w "$DEVICE" ]; then
- echo "ERROR: Device $DEVICE does not exist or is not writable"
usage
- exit 1
+ die "Device $DEVICE does not exist or is not writable"
fi
if [ ! -e "$HDDIMG" ]; then
- echo "ERROR: HDDIMG $HDDIMG does not exist"
usage
- exit 1
+ die "HDDIMG $HDDIMG does not exist"
fi
+#
+# Ensure the hddimg is not mounted
+#
+unmount "$HDDIMG" || die "Failed to unmount $HDDIMG"
#
# Check if any $DEVICE partitions are mounted
#
-unmount_device
-
+unmount_device || die "Failed to unmount $DEVICE"
#
# Confirm device with user
#
image_details $HDDIMG
device_details $(basename $DEVICE)
-echo -n "Prepare EFI image on $DEVICE [y/N]? "
+echo -n "${INFO}Prepare EFI image on $DEVICE [y/N]?${CLEAR} "
read RESPONSE
if [ "$RESPONSE" != "y" ]; then
echo "Image creation aborted"
@@ -136,12 +202,26 @@ fi
#
+# Prepare the temporary working space
+#
+TMPDIR=$(mktemp -d mkefidisk-XXX) || die "Failed to create temporary mounting directory."
+HDDIMG_MNT=$TMPDIR/hddimg
+HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs
+ROOTFS_MNT=$TMPDIR/rootfs
+BOOTFS_MNT=$TMPDIR/bootfs
+mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT"
+mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT"
+mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT"
+mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT"
+
+
+#
# Partition $DEVICE
#
DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//")
# If the device size is not reported there may not be a valid label
if [ "$DEVICE_SIZE" = "" ] ; then
- parted $DEVICE mklabel msdos
+ parted $DEVICE mklabel msdos || die "Failed to create MSDOS partition table"
DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//")
fi
SWAP_SIZE=$((DEVICE_SIZE*SWAP_RATIO/100))
@@ -166,87 +246,130 @@ fi
TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2
TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3
-echo "*****************"
-echo "Boot partition size: $BOOT_SIZE MB ($BOOTFS)"
-echo "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)"
-echo "Swap partition size: $SWAP_SIZE MB ($SWAP)"
-echo "*****************"
-
-echo "Deleting partition table on $DEVICE ..."
-dd if=/dev/zero of=$DEVICE bs=512 count=2
+echo ""
+info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)"
+info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)"
+info "Swap partition size: $SWAP_SIZE MB ($SWAP)"
+echo ""
# Use MSDOS by default as GPT cannot be reliably distributed in disk image form
# as it requires the backup table to be on the last block of the device, which
# of course varies from device to device.
-echo "Creating new partition table (MSDOS) on $DEVICE ..."
-parted $DEVICE mklabel msdos
-echo "Creating boot partition on $BOOTFS"
-parted $DEVICE mkpart primary 0% $BOOT_SIZE
+info "Partitioning installation media ($DEVICE)"
-echo "Enabling boot flag on $BOOTFS"
-parted $DEVICE set 1 boot on
+debug "Deleting partition table on $DEVICE"
+dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>&1 || die "Failed to zero beginning of $DEVICE"
-echo "Creating ROOTFS partition on $ROOTFS"
-parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END
+debug "Creating new partition table (MSDOS) on $DEVICE"
+parted $DEVICE mklabel msdos >$OUT 2>&1 || die "Failed to create MSDOS partition table"
-echo "Creating swap partition on $SWAP"
-parted $DEVICE mkpart primary $SWAP_START 100%
+debug "Creating boot partition on $BOOTFS"
+parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>&1 || die "Failed to create BOOT partition"
-parted $DEVICE print
+debug "Enabling boot flag on $BOOTFS"
+parted $DEVICE set 1 boot on >$OUT 2>&1 || die "Failed to enable boot flag"
+
+debug "Creating ROOTFS partition on $ROOTFS"
+parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>&1 || die "Failed to create ROOTFS partition"
+
+debug "Creating swap partition on $SWAP"
+parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>&1 || die "Failed to create SWAP partition"
+
+if [ $DEBUG -eq 1 ]; then
+ parted $DEVICE print
+fi
#
# Check if any $DEVICE partitions are mounted after partitioning
#
-unmount_device
+unmount_device || die "Failed to unmount $DEVICE partitions"
#
# Format $DEVICE partitions
#
-echo ""
-echo "Formatting $BOOTFS as vfat..."
+info "Formatting partitions"
+debug "Formatting $BOOTFS as vfat"
if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then
- mkfs.vfat -I $BOOTFS -n "efi"
+ mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
else
- mkfs.vfat $BOOTFS -n "efi"
-
+ mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
fi
-echo "Formatting $ROOTFS as ext3..."
-mkfs.ext3 $ROOTFS -L "root"
+debug "Formatting $ROOTFS as ext3"
+mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>&1 || die "Failed to format $ROOTFS"
-echo "Formatting swap partition...($SWAP)"
-mkswap $SWAP
+debug "Formatting swap partition ($SWAP)"
+mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap"
#
# Installing to $DEVICE
#
-echo ""
-echo "Mounting images and device in preparation for installation..."
-TMPDIR=$(mktemp -d mkefidisk-XXX)
-if [ $? -ne 0 ]; then
- echo "ERROR: Failed to create temporary mounting directory."
- exit 1
+debug "Mounting images and device in preparation for installation"
+mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG"
+mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img"
+mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
+mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT"
+
+info "Preparing boot partition"
+EFIDIR="$BOOTFS_MNT/EFI/BOOT"
+cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz"
+# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists)
+cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir"
+# Silently ignore a missing gummiboot loader dir (we might just be a GRUB image)
+cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1
+
+# Update the boot loaders configurations for an installed image
+# Remove any existing root= kernel parameters and:
+# o Add a root= parameter with the target rootfs
+# o Specify ro so fsck can be run during boot
+# o Specify rootwait in case the target media is an asyncronous block device
+# such as MMC or USB disks
+# o Specify "quiet" to minimize boot time when using slow serial consoles
+
+# Look for a GRUB installation
+GRUB_CFG="$EFIDIR/grub.cfg"
+if [ -e "$GRUB_CFG" ]; then
+ info "Configuring GRUB"
+ # Delete the install entry
+ sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG
+ # Delete the initrd lines
+ sed -i "/initrd /d" $GRUB_CFG
+ # Delete any LABEL= strings
+ sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
+
+ sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
+ sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG
fi
-HDDIMG_MNT=$TMPDIR/hddimg
-HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs
-ROOTFS_MNT=$TMPDIR/rootfs
-BOOTFS_MNT=$TMPDIR/bootfs
-mkdir $HDDIMG_MNT
-mkdir $HDDIMG_ROOTFS_MNT
-mkdir $ROOTFS_MNT
-mkdir $BOOTFS_MNT
-mount -o loop $HDDIMG $HDDIMG_MNT
-mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT
-mount $ROOTFS $ROOTFS_MNT
-mount $BOOTFS $BOOTFS_MNT
+# Look for a gummiboot installation
+GUMMI_ENTRIES="$BOOTFS_MNT/loader/entries"
+GUMMI_CFG="$GUMMI_ENTRIES/boot.conf"
+if [ -d "$GUMMI_ENTRIES" ]; then
+ info "Configuring Gummiboot"
+ # remove the install target if it exists
+ rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1
-echo "Copying ROOTFS files..."
-cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT
+ if [ ! -e "$GUMMI_CFG" ]; then
+ echo "ERROR: $GUMMI_CFG not found"
+ fi
+
+ sed -i "/initrd /d" $GUMMI_CFG
+ sed -i "s@ root=[^ ]*@ @" $GUMMI_CFG
+ sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait quiet @" $GUMMI_CFG
+fi
+
+# Ensure we have at least one EFI bootloader configured
+if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then
+ die "No EFI bootloader configuration found"
+fi
+
+
+info "Copying ROOTFS files (this may take a while)"
+cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>&1 || die "Root FS copy failed"
echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
@@ -255,37 +378,19 @@ if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
fi
-umount $ROOTFS_MNT
-umount $HDDIMG_ROOTFS_MNT
-
-echo "Preparing boot partition..."
-EFIDIR="$BOOTFS_MNT/EFI/BOOT"
-mkdir -p $EFIDIR
-GRUBCFG="$EFIDIR/grub.cfg"
-
-cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT
-# Copy the efi loader and config (booti*.efi and grub.cfg)
-cp $HDDIMG_MNT/EFI/BOOT/* $EFIDIR
-
-# Update grub config for the installed image
-# Delete the install entry
-sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
-# Delete the initrd lines
-sed -i "/initrd /d" $GRUBCFG
-# Delete any LABEL= strings
-sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-# Remove any existing root= kernel parameters and:
-# o Add a root= parameter with the target rootfs
-# o Specify ro so fsck can be run during boot
-# o Specify rootwait in case the target media is an asyncronous block device
-# such as MMC or USB disks
-# o Specify "quiet" to minimize boot time when using slow serial consoles
-sed -i "s@ root=[^ ]*@ @" $GRUBCFG
-sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUBCFG
-umount $BOOTFS_MNT
-umount $HDDIMG_MNT
-rm -rf $TMPDIR
-sync
+# Call cleanup to unmount devices and images and remove the TMPDIR
+cleanup
-echo "Installation complete."
+echo ""
+if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then
+ echo "${YELLOW}Installation completed with warnings${CLEAR}"
+ echo "${YELLOW}Warnings: $WARNINGS${CLEAR}"
+elif [ $ERRORS -ne 0 ]; then
+ echo "${RED}Installation encountered errors${CLEAR}"
+ echo "${RED}Errors: $ERRORS${CLEAR}"
+ echo "${YELLOW}Warnings: $WARNINGS${CLEAR}"
+else
+ success "Installation completed successfully"
+fi
+echo ""
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py
index 65486d8ec4..52224fb934 100755
--- a/scripts/contrib/python/generate-manifest-2.7.py
+++ b/scripts/contrib/python/generate-manifest-2.7.py
@@ -275,11 +275,11 @@ if __name__ == "__main__":
m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
"colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
- m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils",
+ m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient",
"lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
"pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
- m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
+ m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs",
"json lib-dynload/_json.so" ) # package
m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
@@ -388,4 +388,11 @@ if __name__ == "__main__":
m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
"mailbox.*" )
+ m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
+ "argparse.*" )
+
+ m.addPackage( "${PN}-contextlib", "Python utilities for with-statement" +
+ "contexts.", "${PN}-core",
+ "${libdir}/python${PYTHON_MAJMIN}/contextlib.*" )
+
m.make()
diff --git a/scripts/contrib/python/generate-manifest-3.3.py b/scripts/contrib/python/generate-manifest-3.3.py
index 288def293d..48cc84d4e0 100755
--- a/scripts/contrib/python/generate-manifest-3.3.py
+++ b/scripts/contrib/python/generate-manifest-3.3.py
@@ -166,15 +166,15 @@ if __name__ == "__main__":
# Parameters: revision, name, description, dependencies, filenames
#
- m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
- "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " +
+ m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
+ "__future__.* _abcoll.* abc.* copy.* copyreg.* ConfigParser.* " +
"genericpath.* getopt.* linecache.* new.* " +
"os.* posixpath.* struct.* " +
"warnings.* site.* stat.* " +
"UserDict.* UserList.* UserString.* " +
"lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
"lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* " +
- "_weakrefset.* sysconfig.* config/Makefile " +
+ "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " +
"${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
"${libdir}/python${PYTHON_MAJMIN}/collections " +
"${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
@@ -329,6 +329,9 @@ if __name__ == "__main__":
m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
"lib-dynload/readline.*.so rlcompleter.*" )
+ m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
+ "${libdir}/python3.3/reprlib.py" )
+
m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
"lib-dynload/resource.*.so" )
diff --git a/scripts/create-recipe b/scripts/create-recipe
index b192990080..e4bc4c322b 100755
--- a/scripts/create-recipe
+++ b/scripts/create-recipe
@@ -1747,7 +1747,6 @@ sub write_bbfile
print BBFILE "\"\n";
}
- print BBFILE 'PR = "r0"' . "\n";
if ($python == 1) {
print BBFILE "PV = \"$pversion\"\n\n";
}
@@ -1865,7 +1864,7 @@ foreach (@tgzfiles) {
#
my @sourcetars = <$orgdir/$outputdir/*\.tar\.bz2 $orgdir/$outputdir/*\.tar\.gz $orgdir/$outputdir/*\.zip>;
-if ( length @sourcetars == 0) {
+if (scalar(@sourcetars) == 0) {
print "Can NOT find source tarball. Exiting...\n";
exit (1);
}
diff --git a/scripts/devtool b/scripts/devtool
new file mode 100755
index 0000000000..d6e1b9710d
--- /dev/null
+++ b/scripts/devtool
@@ -0,0 +1,255 @@
+#!/usr/bin/env python
+
+# OpenEmbedded Development tool
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import sys
+import os
+import argparse
+import glob
+import re
+import ConfigParser
+import subprocess
+import logging
+
+basepath = ''
+workspace = {}
+config = None
+context = None
+
+
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import scriptutils
+logger = scriptutils.logger_create('devtool')
+
+plugins = []
+
+
+class ConfigHandler(object):
+ config_file = ''
+ config_obj = None
+ init_path = ''
+ workspace_path = ''
+
+ def __init__(self, filename):
+ self.config_file = filename
+ self.config_obj = ConfigParser.SafeConfigParser()
+
+ def get(self, section, option, default=None):
+ try:
+ ret = self.config_obj.get(section, option)
+ except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
+ if default != None:
+ ret = default
+ else:
+ raise
+ return ret
+
+ def read(self):
+ if os.path.exists(self.config_file):
+ self.config_obj.read(self.config_file)
+
+ if self.config_obj.has_option('General', 'init_path'):
+ pth = self.get('General', 'init_path')
+ self.init_path = os.path.join(basepath, pth)
+ if not os.path.exists(self.init_path):
+ logger.error('init_path %s specified in config file cannot be found' % pth)
+ return False
+ else:
+ self.config_obj.add_section('General')
+
+ self.workspace_path = self.get('General', 'workspace_path', os.path.join(basepath, 'workspace'))
+ return True
+
+
+ def write(self):
+ logger.debug('writing to config file %s' % self.config_file)
+ self.config_obj.set('General', 'workspace_path', self.workspace_path)
+ with open(self.config_file, 'w') as f:
+ self.config_obj.write(f)
+
+class Context:
+ def __init__(self, **kwargs):
+ self.__dict__.update(kwargs)
+
+
+def read_workspace():
+ global workspace
+ workspace = {}
+ if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')):
+ if context.fixed_setup:
+ logger.error("workspace layer not set up")
+ sys.exit(1)
+ else:
+ logger.info('Creating workspace layer in %s' % config.workspace_path)
+ _create_workspace(config.workspace_path, config, basepath)
+
+ logger.debug('Reading workspace in %s' % config.workspace_path)
+ externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-[a-zA-Z0-9-]*)? =.*$')
+ for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')):
+ pn = os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+ with open(fn, 'r') as f:
+ for line in f:
+ if externalsrc_re.match(line.rstrip()):
+ splitval = line.split('=', 2)
+ workspace[pn] = splitval[1].strip('" \n\r\t')
+ break
+
+def create_workspace(args, config, basepath, workspace):
+ if args.directory:
+ workspacedir = os.path.abspath(args.directory)
+ else:
+ workspacedir = os.path.abspath(os.path.join(basepath, 'workspace'))
+ _create_workspace(workspacedir, config, basepath, args.create_only)
+
+def _create_workspace(workspacedir, config, basepath, create_only=False):
+ import bb
+
+ confdir = os.path.join(workspacedir, 'conf')
+ if os.path.exists(os.path.join(confdir, 'layer.conf')):
+ logger.info('Specified workspace already set up, leaving as-is')
+ else:
+ # Add a config file
+ bb.utils.mkdirhier(confdir)
+ with open(os.path.join(confdir, 'layer.conf'), 'w') as f:
+ f.write('# ### workspace layer auto-generated by devtool ###\n')
+ f.write('BBPATH =. "$' + '{LAYERDIR}:"\n')
+ f.write('BBFILES += "$' + '{LAYERDIR}/recipes/*/*.bb \\\n')
+ f.write(' $' + '{LAYERDIR}/appends/*.bbappend"\n')
+ f.write('BBFILE_COLLECTIONS += "workspacelayer"\n')
+ f.write('BBFILE_PATTERN_workspacelayer = "^$' + '{LAYERDIR}/"\n')
+ f.write('BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"\n')
+ f.write('BBFILE_PRIORITY_workspacelayer = "99"\n')
+ # Add a README file
+ with open(os.path.join(workspacedir, 'README'), 'w') as f:
+ f.write('This layer was created by the OpenEmbedded devtool utility in order to\n')
+ f.write('contain recipes and bbappends. In most instances you should use the\n')
+ f.write('devtool utility to manage files within it rather than modifying files\n')
+ f.write('directly (although recipes added with "devtool add" will often need\n')
+ f.write('direct modification.)\n')
+ f.write('\nIf you no longer need to use devtool you can remove the path to this\n')
+ f.write('workspace layer from your conf/bblayers.conf file (and then delete the\n')
+ f.write('layer, if you wish).\n')
+ if not create_only:
+ # Add the workspace layer to bblayers.conf
+ bblayers_conf = os.path.join(basepath, 'conf', 'bblayers.conf')
+ if not os.path.exists(bblayers_conf):
+ logger.error('Unable to find bblayers.conf')
+ return -1
+ bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
+ if config.workspace_path != workspacedir:
+ # Update our config to point to the new location
+ config.workspace_path = workspacedir
+ config.write()
+
+
+def main():
+ global basepath
+ global config
+ global context
+
+ context = Context(fixed_setup=False)
+
+ # Default basepath
+ basepath = os.path.dirname(os.path.abspath(__file__))
+ pth = basepath
+ while pth != '' and pth != os.sep:
+ if os.path.exists(os.path.join(pth, '.devtoolbase')):
+ context.fixed_setup = True
+ basepath = pth
+ break
+ pth = os.path.dirname(pth)
+
+ parser = argparse.ArgumentParser(description="OpenEmbedded development tool",
+ epilog="Use %(prog)s <command> --help to get help on a specific command")
+ parser.add_argument('--basepath', help='Base directory of SDK / build directory')
+ parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
+ parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
+ parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto')
+
+ subparsers = parser.add_subparsers(dest="subparser_name")
+
+ if not context.fixed_setup:
+ parser_create_workspace = subparsers.add_parser('create-workspace', help='Set up a workspace')
+ parser_create_workspace.add_argument('directory', nargs='?', help='Directory for the workspace')
+ parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace, do not alter configuration')
+ parser_create_workspace.set_defaults(func=create_workspace)
+
+ scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'devtool'))
+ for plugin in plugins:
+ if hasattr(plugin, 'register_commands'):
+ plugin.register_commands(subparsers, context)
+
+ args = parser.parse_args()
+
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+ elif args.quiet:
+ logger.setLevel(logging.ERROR)
+
+ if args.basepath:
+ # Override
+ basepath = args.basepath
+ elif not context.fixed_setup:
+ basepath = os.environ.get('BUILDDIR')
+ if not basepath:
+ logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
+ sys.exit(1)
+
+ logger.debug('Using basepath %s' % basepath)
+
+ config = ConfigHandler(os.path.join(basepath, 'conf', 'devtool.conf'))
+ if not config.read():
+ return -1
+
+ bitbake_subdir = config.get('General', 'bitbake_subdir', '')
+ if bitbake_subdir:
+ # Normally set for use within the SDK
+ logger.debug('Using bitbake subdir %s' % bitbake_subdir)
+ sys.path.insert(0, os.path.join(basepath, bitbake_subdir, 'lib'))
+ core_meta_subdir = config.get('General', 'core_meta_subdir')
+ sys.path.insert(0, os.path.join(basepath, core_meta_subdir, 'lib'))
+ else:
+ # Standard location
+ import scriptpath
+ bitbakepath = scriptpath.add_bitbake_lib_path()
+ if not bitbakepath:
+ logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
+ sys.exit(1)
+ logger.debug('Using standard bitbake path %s' % bitbakepath)
+ scriptpath.add_oe_lib_path()
+
+ scriptutils.logger_setup_color(logger, args.color)
+
+ if args.subparser_name != 'create-workspace':
+ read_workspace()
+
+ ret = args.func(args, config, basepath, workspace)
+
+ return ret
+
+
+if __name__ == "__main__":
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc(5)
+ sys.exit(ret)
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 @@
+#!/usr/bin/env python
+#
+# gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir>
+#
+
+import os
+import sys
+import glob
+import shutil
+import errno
+
+def mkdir(d):
+ try:
+ os.makedirs(d)
+ except OSError as e:
+ if e.errno != errno.EEXIST:
+ raise e
+
+if len(sys.argv) < 3:
+ print("Incorrect number of arguments specified")
+ sys.exit(1)
+
+sigs = []
+with open(sys.argv[1]) as f:
+ for l in f.readlines():
+ if ":" in l:
+ sigs.append(l.split(":")[2].split()[0])
+
+files = set()
+for s in sigs:
+ p = sys.argv[2] + "/" + s[:2] + "/*" + s + "*"
+ files |= set(glob.glob(p))
+ p = sys.argv[2] + "/*/" + s[:2] + "/*" + s + "*"
+ files |= set(glob.glob(p))
+
+for f in files:
+ dst = f.replace(sys.argv[2], sys.argv[3])
+ mkdir(os.path.dirname(dst))
+ os.link(f, dst)
+
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py
index 681720d20a..7d6be239da 100644
--- a/scripts/lib/bsp/engine.py
+++ b/scripts/lib/bsp/engine.py
@@ -756,6 +756,8 @@ class CheckInputLine(ListValInputLine):
return None
+dirname_substitutions = {}
+
class SubstrateBase(object):
"""
Base class for both expanded and unexpanded file and dir container
@@ -764,6 +766,7 @@ class SubstrateBase(object):
def __init__(self, filename, filebase, out_filebase):
self.filename = filename
self.filebase = filebase
+ self.translated_filename = filename
self.out_filebase = out_filebase
self.raw_lines = []
self.expanded_lines = []
@@ -869,6 +872,167 @@ class SubstrateBase(object):
return self.expand_input_tag(tag, lineno)
+ def append_translated_filename(self, filename):
+ """
+ Simply append filename to translated_filename
+ """
+ self.translated_filename = os.path.join(self.translated_filename, filename)
+
+ def get_substituted_file_or_dir_name(self, first_line, tag):
+ """
+ If file or dir names contain name substitutions, return the name
+ to substitute. Note that this is just the file or dirname and
+ doesn't include the path.
+ """
+ filename = first_line.find(tag)
+ if filename != -1:
+ filename += len(tag)
+ substituted_filename = first_line[filename:].strip()
+ this = substituted_filename.find(" this")
+ if this != -1:
+ head, tail = os.path.split(self.filename)
+ substituted_filename = substituted_filename[:this + 1] + tail
+ if tag == DIRNAME_TAG: # get rid of .noinstall in dirname
+ substituted_filename = substituted_filename.split('.')[0]
+
+ return substituted_filename
+
+ def get_substituted_filename(self, first_line):
+ """
+ If a filename contains a name substitution, return the name to
+ substitute. Note that this is just the filename and doesn't
+ include the path.
+ """
+ return self.get_substituted_file_or_dir_name(first_line, FILENAME_TAG)
+
+ def get_substituted_dirname(self, first_line):
+ """
+ If a dirname contains a name substitution, return the name to
+ substitute. Note that this is just the dirname and doesn't
+ include the path.
+ """
+ return self.get_substituted_file_or_dir_name(first_line, DIRNAME_TAG)
+
+ def substitute_filename(self, first_line):
+ """
+ Find the filename in first_line and append it to translated_filename.
+ """
+ substituted_filename = self.get_substituted_filename(first_line)
+ self.append_translated_filename(substituted_filename);
+
+ def substitute_dirname(self, first_line):
+ """
+ Find the dirname in first_line and append it to translated_filename.
+ """
+ substituted_dirname = self.get_substituted_dirname(first_line)
+ self.append_translated_filename(substituted_dirname);
+
+ def is_filename_substitution(self, line):
+ """
+ Do we have a filename subustition?
+ """
+ if line.find(FILENAME_TAG) != -1:
+ return True
+ return False
+
+ def is_dirname_substitution(self, line):
+ """
+ Do we have a dirname subustition?
+ """
+ if line.find(DIRNAME_TAG) != -1:
+ return True
+ return False
+
+ def translate_dirname(self, first_line):
+ """
+ Just save the first_line mapped by filename. The later pass
+ through the directories will look for a dirname.noinstall
+ match and grab the substitution line.
+ """
+ dirname_substitutions[self.filename] = first_line
+
+ def translate_dirnames_in_path(self, path):
+ """
+ Translate dirnames below this file or dir, not including tail.
+ dirname_substititions is keyed on actual untranslated filenames.
+ translated_path contains the subsititutions for each element.
+ """
+ remainder = path[len(self.filebase)+1:]
+ translated_path = untranslated_path = self.filebase
+
+ untranslated_dirs = remainder.split(os.sep)
+
+ for dir in untranslated_dirs:
+ key = os.path.join(untranslated_path, dir + '.noinstall')
+ try:
+ first_line = dirname_substitutions[key]
+ except KeyError:
+ translated_path = os.path.join(translated_path, dir)
+ untranslated_path = os.path.join(untranslated_path, dir)
+ continue
+ substituted_dir = self.get_substituted_dirname(first_line)
+ translated_path = os.path.join(translated_path, substituted_dir)
+ untranslated_path = os.path.join(untranslated_path, dir)
+
+ return translated_path
+
+ def translate_file_or_dir_name(self):
+ """
+ Originally we were allowed to use open/close/assign tags and python
+ code in the filename, which fit in nicely with the way we
+ processed the templates and generated code. Now that we can't
+ do that, we make those tags proper file contents and have this
+ pass substitute the nice but non-functional names with those
+ 'strange' ones, and then proceed as usual.
+
+ So, if files or matching dir<.noinstall> files contain
+ filename substitutions, this function translates them into the
+ corresponding 'strange' names, which future passes will expand
+ as they always have. The resulting pathname is kept in the
+ file or directory's translated_filename. Another way to think
+ about it is that self.filename is the input filename, and
+ translated_filename is the output filename before expansion.
+ """
+ # remove leaf file or dirname
+ head, tail = os.path.split(self.filename)
+ translated_path = self.translate_dirnames_in_path(head)
+ self.translated_filename = translated_path
+
+ # This is a dirname - does it have a matching .noinstall with
+ # a substitution? If so, apply the dirname subsititution.
+ if not os.path.isfile(self.filename):
+ key = self.filename + ".noinstall"
+ try:
+ first_line = dirname_substitutions[key]
+ except KeyError:
+ self.append_translated_filename(tail)
+ return
+ self.substitute_dirname(first_line)
+ return
+
+ f = open(self.filename)
+ first_line = f.readline()
+ f.close()
+
+ # This is a normal filename not needing translation, just use
+ # it as-is.
+ if not first_line or not first_line.startswith("#"):
+ self.append_translated_filename(tail)
+ return
+
+ # If we have a filename substitution (first line in the file
+ # is a FILENAME_TAG line) do the substitution now. If we have
+ # a dirname substitution (DIRNAME_TAG in dirname.noinstall
+ # meta-file), hash it so we can apply it when we see the
+ # matching dirname later. Otherwise we have a regular
+ # filename, just use it as-is.
+ if self.is_filename_substitution(first_line):
+ self.substitute_filename(first_line)
+ elif self.is_dirname_substitution(first_line):
+ self.translate_dirname(first_line)
+ else:
+ self.append_translated_filename(tail)
+
def expand_file_or_dir_name(self):
"""
Expand file or dir names into codeline. Dirnames and
@@ -878,7 +1042,7 @@ class SubstrateBase(object):
"""
lineno = 0
- line = self.filename[len(self.filebase):]
+ line = self.translated_filename[len(self.filebase):]
if line.startswith("/"):
line = line[1:]
opentag_start = -1
@@ -897,7 +1061,6 @@ class SubstrateBase(object):
self.parse_error("No close tag found for open tag", lineno, line)
# we have a {{ tag i.e. code
tag = line[opentag_start + len(OPEN_TAG):end].strip()
-
if not tag.lstrip().startswith(IF_TAG):
self.parse_error("Only 'if' tags are allowed in file or directory names",
lineno, line)
@@ -933,6 +1096,7 @@ class SubstrateBase(object):
Expand the file or dir name first, eventually this ends up
creating the file or dir.
"""
+ self.translate_file_or_dir_name()
self.expand_file_or_dir_name()
@@ -955,6 +1119,9 @@ class SubstrateFile(SubstrateBase):
self.read()
for lineno, line in enumerate(self.raw_lines):
+ # only first line can be a filename substitition
+ if lineno == 0 and line.startswith("#") and FILENAME_TAG in line:
+ continue # skip it - we've already expanded it
expanded_line = self.expand_tag(line, lineno + 1) # humans not 0-based
if not expanded_line:
expanded_line = NormalLine(line.rstrip())
@@ -1141,7 +1308,7 @@ def gather_inputlines(files):
for file in files:
if isinstance(file, SubstrateFile):
group = None
- basename = os.path.basename(file.filename)
+ basename = os.path.basename(file.translated_filename)
codeline = conditional_filename(basename)
if codeline:
diff --git a/scripts/lib/bsp/help.py b/scripts/lib/bsp/help.py
index 7c436d6be0..4cce100d16 100644
--- a/scripts/lib/bsp/help.py
+++ b/scripts/lib/bsp/help.py
@@ -230,6 +230,7 @@ DESCRIPTION
powerpc
i386
mips
+ mips64
x86_64
qemu
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/{{=machine}}.conf b/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/{{=machine}}.conf
deleted file mode 100644
index 44a80d226c..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/{{=machine}}.conf
+++ /dev/null
@@ -1,105 +0,0 @@
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
- xf86-input-evdev \
- xf86-input-mouse \
- xf86-video-omapfb \
- xf86-input-keyboard"
-
-# Ship all kernel modules by default
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-# Allow for MMC booting (required by the NAND-less Beagleboard XM)
-EXTRA_IMAGEDEPENDS += "u-boot"
-
-# Uncomment the following line to enable the hard floating point abi. Note that
-# this breaks some binary libraries and 3D (neither of which ship with
-# meta-yocto). For maximum compatibility, leave this disabled.
-#DEFAULTTUNE ?= "cortexa8hf-neon"
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_cortexa8" }}
-{{ input type:"choice" val:"tune_arm1136jf_s" msg:"arm1136jf-s tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm920t" msg:"arm920t tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm926ejs" msg:"arm926ejs tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm9tdmi" msg:"arm9tdmi tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa5" msg:"cortexa5 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa7" msg:"cortexa7 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa8" msg:"cortexa8 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa9" msg:"cortexa9 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa15" msg:"cortexa15 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm1" msg:"cortexm1 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm3" msg:"cortexm3 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexr4" msg:"cortexr4 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ep9312" msg:"ep9312 tuning optimizations" }}
-{{ input type:"choice" val:"tune_iwmmxt" msg:"iwmmxt tuning optimizations" }}
-{{ input type:"choice" val:"tune_strongarm1100" msg:"strongarm1100 tuning optimizations" }}
-{{ input type:"choice" val:"tune_xscale" msg:"xscale tuning optimizations" }}
-{{ if tunefile == "tune_arm1136jf_s": }}
-include conf/machine/include/tune-arm1136jf-s.inc
-{{ if tunefile == "tune_arm920t": }}
-include conf/machine/include/tune-arm920t.inc
-{{ if tunefile == "tune_arm926ejs": }}
-include conf/machine/include/tune-arm926ejs.inc
-{{ if tunefile == "tune_arm9tdmi": }}
-include conf/machine/include/tune-arm9tdmi.inc
-{{ if tunefile == "tune_cortexa5": }}
-include conf/machine/include/tune-cortexa5.inc
-{{ if tunefile == "tune_cortexa7": }}
-include conf/machine/include/tune-cortexa7.inc
-{{ if tunefile == "tune_cortexa8": }}
-include conf/machine/include/tune-cortexa8.inc
-{{ if tunefile == "tune_cortexa9": }}
-include conf/machine/include/tune-cortexa9.inc
-{{ if tunefile == "tune_cortexa15": }}
-include conf/machine/include/tune-cortexa15.inc
-{{ if tunefile == "tune_cortexm1": }}
-include conf/machine/include/tune-cortexm1.inc
-{{ if tunefile == "tune_cortexm3": }}
-include conf/machine/include/tune-cortexm3.inc
-{{ if tunefile == "tune_cortexr4": }}
-include conf/machine/include/tune-cortexr4.inc
-{{ if tunefile == "tune_ep9312": }}
-include conf/machine/include/tune-ep9312.inc
-{{ if tunefile == "tune_iwmmxt": }}
-include conf/machine/include/tune-iwmmxt.inc
-{{ if tunefile == "tune_strongarm1100": }}
-include conf/machine/include/tune-strongarm1100.inc
-{{ if tunefile == "tune_xscale": }}
-include conf/machine/include/tune-xscale.inc
-
-IMAGE_FSTYPES += "tar.bz2 jffs2"
-EXTRA_IMAGECMD_jffs2 = "-lnp "
-
-# 2.6.37 and later kernels use OMAP_SERIAL, ttyO2
-# earlier kernels use ttyS2
-SERIAL_CONSOLE = "115200 ttyO2"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-KERNEL_IMAGETYPE = "zImage"
-KERNEL_DEVICETREE = "${S}/arch/arm/boot/dts/omap3-beagle.dts ${S}/arch/arm/boot/dts/omap3-beagle-xm.dts"
-
-SPL_BINARY = "MLO"
-UBOOT_SUFFIX = "img"
-{{ input type:"edit" name:"uboot_machine" prio:"40" msg:"Please specify a value for UBOOT_MACHINE:" default:"omap3_beagle_config" }}
-UBOOT_MACHINE = "{{=uboot_machine}}"
-{{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x80008000" }}
-UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
-{{ input type:"edit" name:"uboot_loadaddress" prio:"40" msg:"Please specify a value for UBOOT_LOADADDRESS:" default:"0x80008000" }}
-UBOOT_LOADADDRESS = "{{=uboot_loadaddress}}"
-
-MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
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}}/{{ if xserver == "y": }} xorg.conf b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
index 264f3c91ad..bc52893e2a 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if xserver == "y": }} this
Section "Module"
Load "extmod"
Load "dbe"
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 @@
+# yocto-bsp-filename {{ if xserver == "y": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 72d991c7e5..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-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/{{ if kernel_choice != "custom": }} files/{{=machine}}-non_hardware.cfg b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
index 361343bb58..9bfc90c6f2 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-non_hardware.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-non_hardware.cfg
#
# Miscellaneous filesystems
#
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
index 56f7f0f1e3..ca5f3b5be9 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH arm
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
index 80640db4a2..9014c2c97e 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH arm
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
index 51eaf2d32c..3f1c252232 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH arm
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/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
index 10134c81f5..a2e1ae0f75 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.cfg
#
# System Type
#
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
index 24196e6f67..828400df40 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
kconf non-hardware {{machine}}-non_hardware.cfg
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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
index 25c87a85ac..2fa6231cbf 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
index 08b1f88d1b..35b0958582 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
new file mode 100644
index 0000000000..5f8db03c64
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
index bc6968d832..f04dd0cce4 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
index d221d5f2a4..471ccbcc3e 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..fb4253271a
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend
index 1e814c54d7..badb3aa239 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend
index ca7f8c5978..1e1cc51315 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.17.bbappend
index ca7f8c5978..72af58afc1 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -29,4 +30,4 @@ SRC_URI += "file://{{=machine}}-standard.scc \
# the appropriate changes committed to the upstream linux-yocto repo
#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
-#LINUX_VERSION = "3.14" \ No newline at end of file
+#LINUX_VERSION = "3.17" \ No newline at end of file
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
index 3b85d3821f..3b85d3821f 100644
--- 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
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
index 03b7d84ec2..663dddbb0f 100644
--- 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
@@ -2,22 +2,22 @@
{{ 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"}}
{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
-{{ 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"}}
+{{ 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.16.3)" default:"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}}
{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
-{{ 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"}}
+{{ 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.16.3)" default:"/home/trz/yocto/kernels/linux-stable.git"}}
{{ if kernel_choice == "custom": }}
{{ 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"}}
{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y": }}
-{{ 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"}}
+{{ 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.16.y' branch):" default:"linux-3.16.y"}}
{{ if kernel_choice == "custom": }}
{{ 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}"}}
{{ if kernel_choice == "custom": }}
-{{ 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"}}
+{{ input type:"edit" name:"custom_kernel_linux_version" prio:"20" msg:"Please enter the Linux version of the kernel you've specified:" default:"3.16.3"}}
{{ if kernel_choice == "custom": }}
{{ 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"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom.bb b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
index 6d3cc6f743..69f598e144 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom.bb
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "custom": }} this
# This file was derived from the linux-yocto-custom.bb recipe in
# oe-core.
#
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/{{ if kernel_choice == "custom": }} linux-yocto-custom/defconfig b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
index ceb0ffa30c..ceb0ffa30c 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/defconfig
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} 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
index 17c8b503da..922309d5ab 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} 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
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-user-config.cfg
#
# Used by yocto-kernel to manage config options.
#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} 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
index 7a598d9118..6d1138f42a 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} 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
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-user-patches.scc
#
# Used by yocto-kernel to manage patches.
#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
index 95170b12eb..1ba8201f16 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.cfg
#
# A convenient place to add config options, nothing more.
#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
index 2e3ca90793..0b6b413377 100644
--- a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/{{ if kernel_choice == "custom": }} linux-yocto-custom/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
#
# The top-level 'feature' for the {{=machine}} custom kernel.
#
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
index 0df4dc2035..e13dabc1e5 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.conf
#@TYPE: Machine
#@NAME: {{=machine}}
@@ -32,19 +33,23 @@ MACHINE_FEATURES += "wifi efi pcbios"
{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y" and (kernel_choice == "linux-yocto_3.14" or kernel_choice == "linux-yocto_3.10"): }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }}
+{{ if xserver == "y" and (kernel_choice == "linux-yocto_3.17" or kernel_choice == "linux-yocto_3.14" or kernel_choice == "linux-yocto_3.10"): }}
+{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_vesa" }}
{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
+{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
+{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
{{ if xserver == "y" and kernel_choice == "custom": }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }}
+{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_vesa" }}
{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
+{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
+{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
-{{ 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" }}
+{{ if xserver == "y" and kernel_choice != "linux-yocto_3.17" and kernel_choice != "linux-yocto_3.14" and kernel_choice != "linux-yocto_3.10" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
{{ if xserver == "y": }}
XSERVER ?= "${XSERVER_X86_BASE} \
@@ -55,12 +60,18 @@ XSERVER ?= "${XSERVER_X86_BASE} \
${XSERVER_X86_I915} \
{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
${XSERVER_X86_I965} \
+{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
+ ${XSERVER_X86_FBDEV} \
+{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
+ ${XSERVER_X86_MODESETTING} \
{{ if xserver == "y": }}
"
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d"
+MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
+GLIBC_ADDONS = "nptl"
+
{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
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 @@
+# yocto-bsp-filename {{ if xserver == "y": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 72d991c7e5..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-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/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
index bfefb0d0a0..619ee3f367 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH i386
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
index 60b670dffc..682012fafc 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH i386
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
index ec44ef9485..cc7519699a 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH i386
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/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
index e93c0b8a08..3b168b7e36 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.cfg
CONFIG_X86_32=y
CONFIG_MATOM=y
CONFIG_PRINTK=y
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
index eda1d62f11..3d32f111b0 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
include features/intel-e1xxxx/intel-e100.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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
index 25c87a85ac..2fa6231cbf 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
index 08b1f88d1b..35b0958582 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
new file mode 100644
index 0000000000..5f8db03c64
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
index bc6968d832..f04dd0cce4 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
index d221d5f2a4..471ccbcc3e 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..fb4253271a
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend
index c1f26540a7..1cfc611949 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend
index 948d568cd1..fbb49edb26 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..c8fc73a97d
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ /dev/null
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/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
index 2e50ff668d..353133080a 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
#
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/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
index 2000a34da5..2000a34da5 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
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/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
index 14bf344da5..ba1ccb16c6 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=example_recipe_name}}_0.1.bb
#
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
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/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
index 2000a34da5..2000a34da5 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
index 71f2e46b4e..71f2e46b4e 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
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
index 9ea411933c..b319d626f4 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.conf
#@TYPE: Machine
#@NAME: {{=machine}}
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/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
index b0fb63ac6a..176190cd2e 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH mips
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
index 326663a509..f05dd851d2 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH mips
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
index 4514765eb3..f71c775397 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH mips
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 @@
+# yocto-bsp-filename {{=machine}}.cfg
+CONFIG_MIPS=y
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
index 1ef01b6e3c..f39dc3edf1 100644
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
include cfg/usb-mass-storage.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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
index 25c87a85ac..2fa6231cbf 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
index 08b1f88d1b..35b0958582 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
new file mode 100644
index 0000000000..5f8db03c64
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
index bc6968d832..f04dd0cce4 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#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-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..142e38b3bc
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend
index 1e814c54d7..badb3aa239 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#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.17.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..72af58afc1
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
deleted file mode 100644
index a1b333ca56..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_MIPS=y
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 85544e812c..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ 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" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
- file://{{=machine}}-user-config.cfg \
- file://{{=machine}}-user-patches.scc \
- file://{{=machine}}-user-features.scc \
- "
-
-# uncomment and replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
-#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
-#LINUX_VERSION = "3.14" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
new file mode 100644
index 0000000000..3afc5e093e
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
@@ -0,0 +1,39 @@
+# yocto-bsp-filename {{=machine}}.conf
+#@TYPE: Machine
+#@NAME: {{=machine}}
+
+#@DESCRIPTION: Machine configuration for {{=machine}} systems
+
+require conf/machine/include/tune-mips64.inc
+
+MACHINE_FEATURES = "pci ext2 ext3 serial"
+
+KERNEL_IMAGETYPE = "vmlinux"
+KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment"
+
+{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
+{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
+{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
+PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
+
+{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
+{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
+{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
+PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
+PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
+
+{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
+{{ if xserver == "y": }}
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+XSERVER ?= "xserver-xorg \
+ xf86-input-evdev \
+ xf86-video-fbdev"
+
+SERIAL_CONSOLE = "115200 ttyS0"
+USE_VT ?= "0"
+
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
+IMAGE_FSTYPES ?= "jffs2 tar.bz2"
+JFFS2_ERASEBLOCK = "0x10000"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall
new file mode 100644
index 0000000000..1e0d92c55c
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
new file mode 100644
index 0000000000..176190cd2e
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -0,0 +1,10 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
+define KMACHINE {{=machine}}
+define KTYPE preempt-rt
+define KARCH mips
+
+include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+{{ if need_new_kbranch == "y": }}
+branch {{=machine}}
+
+include {{=machine}}.scc
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
new file mode 100644
index 0000000000..f05dd851d2
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
@@ -0,0 +1,10 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
+define KMACHINE {{=machine}}
+define KTYPE standard
+define KARCH mips
+
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+{{ if need_new_kbranch == "y": }}
+branch {{=machine}}
+
+include {{=machine}}.scc
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
new file mode 100644
index 0000000000..f71c775397
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
@@ -0,0 +1,10 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
+define KMACHINE {{=machine}}
+define KTYPE tiny
+define KARCH mips
+
+include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+{{ if need_new_kbranch == "y": }}
+branch {{=machine}}
+
+include {{=machine}}.scc
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg
new file mode 100644
index 0000000000..69efdcc759
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc
new file mode 100644
index 0000000000..85be26de97
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc
new file mode 100644
index 0000000000..4c59daac46
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
new file mode 100644
index 0000000000..0cc906bbf0
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
@@ -0,0 +1,66 @@
+# yocto-bsp-filename {{=machine}}.cfg
+#SOC
+CONFIG_CAVIUM_OCTEON_SOC=y
+CONFIG_CAVIUM_CN63XXP1=y
+CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2
+
+#Kernel
+CONFIG_SMP=y
+CONFIG_NR_CPUS=32
+#Executable file formats
+CONFIG_MIPS32_COMPAT=y
+CONFIG_MIPS32_O32=y
+CONFIG_MIPS32_N32=y
+
+
+#PCI
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+
+#I2C
+CONFIG_I2C=y
+CONFIG_I2C_OCTEON=y
+
+CONFIG_HW_RANDOM_OCTEON=y
+
+#SPI
+CONFIG_SPI=y
+CONFIG_SPI_OCTEON=y
+
+#Misc
+CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
+CONFIG_OCTEON_WDT=y
+
+CONFIG_STAGING=y
+
+#Ethernet
+CONFIG_OCTEON_ETHERNET=y
+CONFIG_OCTEON_MGMT_ETHERNET=y
+CONFIG_MDIO_OCTEON=y
+
+#PHY
+CONFIG_MARVELL_PHY=y
+CONFIG_BROADCOM_PHY=y
+CONFIG_BCM87XX_PHY=y
+
+
+#USB
+CONFIG_USB=y
+CONFIG_OCTEON_USB=y
+CONFIG_USB_OCTEON_EHCI=y
+CONFIG_USB_OCTEON_OHCI=y
+CONFIG_USB_OCTEON2_COMMON=y
+
+CONFIG_MTD=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
new file mode 100644
index 0000000000..f39dc3edf1
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
@@ -0,0 +1,8 @@
+# yocto-bsp-filename {{=machine}}.scc
+kconf hardware {{=machine}}.cfg
+
+include cfg/usb-mass-storage.scc
+include cfg/fs/vfat.scc
+
+kconf hardware {{=machine}}-user-config.cfg
+include {{=machine}}-user-patches.scc
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
new file mode 100644
index 0000000000..8903a823aa
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
@@ -0,0 +1,5 @@
+{{ if kernel_choice != "custom": }}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
+
+{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
+{{ 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.17"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
index 25c87a85ac..2fa6231cbf 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.10.9"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
new file mode 100644
index 0000000000..5f8db03c64
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
index bc6968d832..f04dd0cce4 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/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/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.14" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..142e38b3bc
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.10.bbappend
new file mode 100644
index 0000000000..badb3aa239
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "19f7e43b54aef08d58135ed2a897d77b624b320a"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "459165c1dd61c4e843c36e6a1abeb30949a20ba7"
+#LINUX_VERSION = "3.10.9" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend
new file mode 100644
index 0000000000..1e1cc51315
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.14" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..72af58afc1
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17" \ No newline at end of file
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
index 78fb5db22b..48fcb2bbbe 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.conf
#@TYPE: Machine
#@NAME: {{=machine}}
@@ -16,6 +17,9 @@ TARGET_FPU = ""
{{ input type:"choice" val:"tune_ppce500v2" msg:"ppce500v2 tuning optimizations" }}
{{ input type:"choice" val:"tune_ppce5500" msg:"ppce5500 tuning optimizations" }}
{{ input type:"choice" val:"tune_ppce6500" msg:"ppce6500 tuning optimizations" }}
+{{ input type:"choice" val:"tune_power5" msg:"power5 tuning optimizations" }}
+{{ input type:"choice" val:"tune_power6" msg:"power6 tuning optimizations" }}
+{{ input type:"choice" val:"tune_power7" msg:"power7 tuning optimizations" }}
{{ if tunefile == "tune_ppc476": }}
include conf/machine/include/tune-ppc476.inc
{{ if tunefile == "tune_ppc603e": }}
@@ -36,6 +40,12 @@ include conf/machine/include/tune-ppce500v2.inc
include conf/machine/include/tune-ppce5500.inc
{{ if tunefile == "tune_ppce6500": }}
include conf/machine/include/tune-ppce6500.inc
+{{ if tunefile == "tune_power5": }}
+include conf/machine/include/tune-power5.inc
+{{ if tunefile == "tune_power6": }}
+include conf/machine/include/tune-power6.inc
+{{ if tunefile == "tune_power7": }}
+include conf/machine/include/tune-power7.inc
KERNEL_IMAGETYPE = "uImage"
@@ -72,3 +82,6 @@ UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/{{=kernel_devicetree}}"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
+IMAGE_FSTYPES ?= "jffs2 tar.bz2"
+JFFS2_ERASEBLOCK = "0x4000"
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/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
index 1da7b0c892..40c9267831 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH powerpc
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
index 53a74a6ca2..7a1d35be1e 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH powerpc
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
index 4ca6224774..1bf94b2d05 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH powerpc
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/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
index 9f37d07553..5bfe1fe4b0 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.cfg
..........................................................................
. WARNING
.
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
index c9fd468180..7aac8b0801 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
include cfg/usb-mass-storage.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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/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/powerpc/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.10.9" \ No newline at end of file
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
index 00c8c68933..7a2544617f 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -29,4 +30,4 @@ SRC_URI += "file://{{=machine}}-preempt-rt.scc \
# the appropriate changes committed to the upstream linux-yocto repo
#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
-#LINUX_VERSION = "3.10.9" \ No newline at end of file
+#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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.10.9"
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
index d221d5f2a4..471ccbcc3e 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..fb4253271a
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend
index a61f5ccb80..15b4b973c9 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend
index aebda9b3a5..e688384020 100644
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..2f1933055d
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ /dev/null
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
index d53b6f57b7..67e1cbd997 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.conf
#@TYPE: Machine
#@NAME: {{=machine}}
@@ -26,6 +27,7 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
{{ input type:"choice" val:"arm" msg:"ARM (32-bit)" }}
{{ input type:"choice" val:"powerpc" msg:"PowerPC (32-bit)" }}
{{ input type:"choice" val:"mips" msg:"MIPS (32-bit)" }}
+{{ input type:"choice" val:"mips64" msg:"MIPS64 (64-bit)" }}
{{ if qemuarch == "i386": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-i586.inc
@@ -42,6 +44,9 @@ require conf/machine/include/tune-ppc7400.inc
{{ if qemuarch == "mips": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-mips32.inc
+{{ if qemuarch == "mips64": }}
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-mips64.inc
{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
MACHINE_FEATURES += "x86"
@@ -62,7 +67,7 @@ SERIAL_CONSOLE = "115200 ttyAMA0"
KERNEL_IMAGETYPE = "vmlinux"
SERIAL_CONSOLE = "115200 ttyS0"
-{{ if qemuarch == "mips": }}
+{{ if qemuarch == "mips" or qemuarch == "mips64": }}
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
SERIAL_CONSOLE = "115200 ttyS0"
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 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
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
index 13519804bc..3bdde79e6f 100644
--- 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
@@ -14,7 +14,7 @@ EndSection
Section "InputDevice"
Identifier "Configured Mouse"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips": }}
+{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
Driver "mouse"
{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
Driver "vmmouse"
@@ -36,7 +36,7 @@ EndSection
Section "Device"
Identifier "Graphics Controller"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips": }}
+{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
Driver "fbdev"
{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
Driver "vmware"
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/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
index af34437d0a..6aaffb8184 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH {{=qemuarch}}
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
index 0e20023764..d2a03ec209 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH {{=qemuarch}}
@@ -10,6 +11,8 @@ include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard
include bsp/qemu-ppc32/qemu-ppc32-standard
{{ if qemuarch == "mips": }}
include bsp/mti-malta32/mti-malta32-be-standard
+{{ if qemuarch == "mips64": }}
+include bsp/mti-malta64/mti-malta64-be-standard
{{ if need_new_kbranch == "y": }}
branch {{=machine}}
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
index 10c4dac44d..6c098fed21 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH {{=qemuarch}}
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/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
index f3739be1e6..8301e05f7d 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
kconf hardware {{=machine}}-user-config.cfg
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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
index 7599ecb0a5..be479bee67 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -18,10 +19,10 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
{{ 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" }}
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
index 73b6e34839..3609787207 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" 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" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
new file mode 100644
index 0000000000..ce5e1a09b3
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,62 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
index da4e61ef83..1ee148fd0c 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" 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" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..0175107899
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,62 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "8f55bee2403176a50cc0dd41811aa60fcf07243c"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.4.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend
index 013883ffeb..5bfb877eb9 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.4.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.4": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" 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" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend
index 392ace6694..974e291afd 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -18,10 +19,10 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
{{ 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" }}
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend
index 2cc9b87cf2..626019c40a 100644
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
@@ -18,10 +19,10 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ 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" }}
+{{ 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" }}
{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
{{ 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" }}
@@ -35,6 +36,12 @@ COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
{{ 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" }}
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
+
{{ if need_new_kbranch == "n": }}
KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..b81f272c38
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,62 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "8f55bee2403176a50cc0dd41811aa60fcf07243c"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ /dev/null
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
index 0780af90da..e4b825104f 100644
--- 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
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.conf
#@TYPE: Machine
#@NAME: {{=machine}}
@@ -36,6 +37,8 @@ MACHINE_FEATURES += "wifi efi pcbios"
{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
+{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
+{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
{{ if xserver == "y": }}
XSERVER ?= "${XSERVER_X86_BASE} \
${XSERVER_X86_EXT} \
@@ -45,12 +48,18 @@ XSERVER ?= "${XSERVER_X86_BASE} \
${XSERVER_X86_I915} \
{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
${XSERVER_X86_I965} \
+{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
+ ${XSERVER_X86_FBDEV} \
+{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
+ ${XSERVER_X86_MODESETTING} \
{{ if xserver == "y": }}
"
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d"
+MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
+GLIBC_ADDONS = "nptl"
+
{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
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/{{=machine}}/{{ if xserver == "y": }} xorg.conf b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf
+++ /dev/null
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 @@
+# yocto-bsp-filename {{ if xserver == "y": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 72d991c7e5..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/{{ if xserver == "y": }} xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-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/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
index c9882590a8..fd5320ba1e 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-preempt-rt.scc
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-preempt-rt.scc
define KMACHINE {{=machine}}
define KTYPE preempt-rt
define KARCH x86_64
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
index e500bad4b2..569f967c6a 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-standard.scc
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-standard.scc
define KMACHINE {{=machine}}
define KTYPE standard
define KARCH x86_64
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
index e8e3c1c04d..fb21432a4f 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-tiny.scc
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}-tiny.scc
define KMACHINE {{=machine}}
define KTYPE tiny
define KARCH x86_64
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/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
index b4b82d7ca0..3290ddefe7 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.cfg
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.cfg
CONFIG_PRINTK=y
# Basic hardware support for the box - network, USB, PCI, sound
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
index db45140381..9b7c291a8f 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}.scc
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{=machine}}.scc
kconf hardware {{=machine}}.cfg
include features/serial/8250.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
index a04e6c7852..8903a823aa 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.17) kernel? (y/n)" default:"y"}}
{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ 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"}}
+{{ 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.17"}}
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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#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-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/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/x86_64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-preempt-rt.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
+#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
+#LINUX_VERSION = "3.14" \ 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 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.10.9"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
index d221d5f2a4..471ccbcc3e 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.14": }} linux-yocto-tiny_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
new file mode 100644
index 0000000000..fb4253271a
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend
index 162348114f..e21a333fa4 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.10": }} linux-yocto_3.10.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend
index 81e528bc33..ca0b497ff4 100644
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto_3.14": }} linux-yocto_3.14.bbappend
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -1,3 +1,4 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR := "${PR}.1"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.17.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.17.bbappend
new file mode 100644
index 0000000000..08aa00a15c
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.17": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ 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" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ 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" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ file://{{=machine}}-user-patches.scc \
+ file://{{=machine}}-user-features.scc \
+ "
+
+# uncomment and replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+#SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
+#SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
+#LINUX_VERSION = "3.17"
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-config.cfg
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ /dev/null
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
deleted file mode 100644
index 25c87a85ac..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-dev": }} linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,25 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ 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" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
- file://{{=machine}}-user-config.cfg \
- file://{{=machine}}-user-patches.scc \
- file://{{=machine}}-user-features.scc \
- "
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
deleted file mode 100644
index 00c8c68933..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-rt_3.10": }} linux-yocto-rt_3.10.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ 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" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
- file://{{=machine}}-user-config.cfg \
- file://{{=machine}}-user-patches.scc \
- file://{{=machine}}-user-features.scc \
- "
-
-# uncomment and replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-#SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb"
-#SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f"
-#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/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
deleted file mode 100644
index bc6968d832..0000000000
--- a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == "linux-yocto-tiny_3.10": }} linux-yocto-tiny_3.10.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ 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" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ 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" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}} = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
- file://{{=machine}}-user-config.cfg \
- file://{{=machine}}-user-patches.scc \
- file://{{=machine}}-user-features.scc \
- "
-
-# uncomment and replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-#SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8"
-#SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993"
-#LINUX_VERSION = "3.10.9"
diff --git a/scripts/lib/bsp/tags.py b/scripts/lib/bsp/tags.py
index 6d5feb0a59..3719427884 100644
--- a/scripts/lib/bsp/tags.py
+++ b/scripts/lib/bsp/tags.py
@@ -25,11 +25,13 @@
# Tom Zanussi <tom.zanussi (at] intel.com>
#
-OPEN_TAG = "{{"
-CLOSE_TAG = "}}"
-ASSIGN_TAG = "{{="
-INPUT_TAG = "input"
-IF_TAG = "if"
+OPEN_TAG = "{{"
+CLOSE_TAG = "}}"
+ASSIGN_TAG = "{{="
+INPUT_TAG = "input"
+IF_TAG = "if"
+FILENAME_TAG = "yocto-bsp-filename"
+DIRNAME_TAG = "yocto-bsp-dirname"
INDENT_STR = " "
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
new file mode 100644
index 0000000000..3f8158e24a
--- /dev/null
+++ b/scripts/lib/devtool/__init__.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+
+# Development tool - utility functions for plugins
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+import os
+import sys
+import subprocess
+import logging
+
+logger = logging.getLogger('devtool')
+
+def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
+ import bb
+ if not 'cwd' in options:
+ options["cwd"] = builddir
+ if init_path:
+ logger.debug('Executing command: "%s" using init path %s' % (cmd, init_path))
+ init_prefix = '. %s %s > /dev/null && ' % (init_path, builddir)
+ else:
+ logger.debug('Executing command "%s"' % cmd)
+ init_prefix = ''
+ if watch:
+ if sys.stdout.isatty():
+ # Fool bitbake into thinking it's outputting to a terminal (because it is, indirectly)
+ cmd = 'script -q -c "%s" /dev/null' % cmd
+ return exec_watch('%s%s' % (init_prefix, cmd), **options)
+ else:
+ return bb.process.run('%s%s' % (init_prefix, cmd), **options)
+
+def exec_watch(cmd, **options):
+ if isinstance(cmd, basestring) and not "shell" in options:
+ options["shell"] = True
+
+ process = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options
+ )
+
+ buf = ''
+ while True:
+ out = process.stdout.read(1)
+ if out:
+ sys.stdout.write(out)
+ sys.stdout.flush()
+ buf += out
+ elif out == '' and process.poll() != None:
+ break
+ return buf
+
+def setup_tinfoil():
+ import scriptpath
+ bitbakepath = scriptpath.add_bitbake_lib_path()
+ if not bitbakepath:
+ logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
+ sys.exit(1)
+
+ import bb.tinfoil
+ import logging
+ tinfoil = bb.tinfoil.Tinfoil()
+ tinfoil.prepare(False)
+ tinfoil.logger.setLevel(logging.WARNING)
+ return tinfoil
+
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
new file mode 100644
index 0000000000..bd23e95dd9
--- /dev/null
+++ b/scripts/lib/devtool/deploy.py
@@ -0,0 +1,100 @@
+# Development tool - deploy/undeploy command plugin
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import os
+import subprocess
+import logging
+from devtool import exec_build_env_command
+
+logger = logging.getLogger('devtool')
+
+def plugin_init(pluginlist):
+ pass
+
+
+def deploy(args, config, basepath, workspace):
+ import re
+ from devtool import exec_build_env_command
+
+ if not args.recipename in workspace:
+ logger.error("no recipe named %s in your workspace" % args.recipename)
+ return -1
+ try:
+ host, destdir = args.target.split(':')
+ except ValueError:
+ destdir = '/'
+ else:
+ args.target = host
+
+ deploy_dir = os.path.join(basepath, 'target_deploy', args.target)
+ deploy_file = os.path.join(deploy_dir, args.recipename + '.list')
+
+ if os.path.exists(deploy_file):
+ undeploy(args)
+
+ stdout, stderr = exec_build_env_command(config.init_path, basepath, 'bitbake -e %s' % args.recipename, shell=True)
+ recipe_outdir = re.search(r'^D="(.*)"', stdout, re.MULTILINE).group(1)
+ ret = subprocess.call('scp -qr %s/* %s:%s' % (recipe_outdir, args.target, destdir), shell=True)
+ if ret != 0:
+ return ret
+
+ logger.info('Successfully deployed %s' % recipe_outdir)
+
+ if not os.path.exists(deploy_dir):
+ os.makedirs(deploy_dir)
+
+ files_list = []
+ for root, _, files in os.walk(recipe_outdir):
+ for filename in files:
+ filename = os.path.relpath(os.path.join(root, filename), recipe_outdir)
+ files_list.append(os.path.join(destdir, filename))
+
+ with open(deploy_file, 'w') as fobj:
+ fobj.write('\n'.join(files_list))
+
+ return 0
+
+def undeploy(args, config, basepath, workspace):
+
+ deploy_file = os.path.join(basepath, 'target_deploy', args.target, args.recipename + '.list')
+ if not os.path.exists(deploy_file):
+ logger.error('%s has not been deployed' % args.recipename)
+ return -1
+
+ ret = subprocess.call("scp -q %s %s:/tmp" % (deploy_file, args.target), shell=True)
+ if ret != 0:
+ logger.error('Failed to copy %s to %s' % (deploy, args.target))
+ return -1
+
+ ret = subprocess.call("ssh %s 'xargs -n1 rm -f </tmp/%s'" % (args.target, os.path.basename(deploy_file)), shell=True)
+ if ret == 0:
+ logger.info('Successfully undeployed %s' % args.recipename)
+ os.remove(deploy_file)
+
+ return ret
+
+
+def register_commands(subparsers, context):
+ parser_deploy = subparsers.add_parser('deploy-target', help='Deploy recipe output files to live target machine')
+ parser_deploy.add_argument('recipename', help='Recipe to deploy')
+ parser_deploy.add_argument('target', help='Live target machine running an ssh server: user@hostname[:destdir]')
+ parser_deploy.set_defaults(func=deploy)
+
+ parser_undeploy = subparsers.add_parser('undeploy-target', help='Undeploy recipe output files in live target machine')
+ parser_undeploy.add_argument('recipename', help='Recipe to undeploy')
+ parser_undeploy.add_argument('target', help='Live target machine running an ssh server: user@hostname')
+ parser_undeploy.set_defaults(func=undeploy)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
new file mode 100644
index 0000000000..69bb228487
--- /dev/null
+++ b/scripts/lib/devtool/standard.py
@@ -0,0 +1,545 @@
+# Development tool - standard commands plugin
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import os
+import sys
+import re
+import shutil
+import glob
+import tempfile
+import logging
+import argparse
+from devtool import exec_build_env_command, setup_tinfoil
+
+logger = logging.getLogger('devtool')
+
+def plugin_init(pluginlist):
+ pass
+
+
+def add(args, config, basepath, workspace):
+ import bb
+ import oe.recipeutils
+
+ if args.recipename in workspace:
+ logger.error("recipe %s is already in your workspace" % args.recipename)
+ return -1
+
+ reason = oe.recipeutils.validate_pn(args.recipename)
+ if reason:
+ logger.error(reason)
+ return -1
+
+ srctree = os.path.abspath(args.srctree)
+ appendpath = os.path.join(config.workspace_path, 'appends')
+ if not os.path.exists(appendpath):
+ os.makedirs(appendpath)
+
+ recipedir = os.path.join(config.workspace_path, 'recipes', args.recipename)
+ bb.utils.mkdirhier(recipedir)
+ if args.version:
+ if '_' in args.version or ' ' in args.version:
+ logger.error('Invalid version string "%s"' % args.version)
+ return -1
+ bp = "%s_%s" % (args.recipename, args.version)
+ else:
+ bp = args.recipename
+ recipefile = os.path.join(recipedir, "%s.bb" % bp)
+ if sys.stdout.isatty():
+ color = 'always'
+ else:
+ color = args.color
+ stdout, stderr = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s %s' % (color, recipefile, srctree))
+ logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
+
+ _add_md5(config, args.recipename, recipefile)
+
+ initial_rev = None
+ if os.path.exists(os.path.join(srctree, '.git')):
+ (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
+ initial_rev = stdout.rstrip()
+
+ appendfile = os.path.join(appendpath, '%s.bbappend' % args.recipename)
+ with open(appendfile, 'w') as f:
+ f.write('inherit externalsrc\n')
+ f.write('EXTERNALSRC = "%s"\n' % srctree)
+ if initial_rev:
+ f.write('\n# initial_rev: %s\n' % initial_rev)
+
+ _add_md5(config, args.recipename, appendfile)
+
+ return 0
+
+
+def _get_recipe_file(cooker, pn):
+ import oe.recipeutils
+ recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
+ if not recipefile:
+ skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
+ if skipreasons:
+ logger.error('\n'.join(skipreasons))
+ else:
+ logger.error("Unable to find any recipe file matching %s" % pn)
+ return recipefile
+
+
+def extract(args, config, basepath, workspace):
+ import bb
+ import oe.recipeutils
+
+ tinfoil = setup_tinfoil()
+
+ recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
+ if not recipefile:
+ # Error already logged
+ return -1
+ rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
+
+ srctree = os.path.abspath(args.srctree)
+ initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd)
+ if initial_rev:
+ return 0
+ else:
+ return -1
+
+
+def _extract_source(srctree, keep_temp, devbranch, d):
+ import bb.event
+
+ def eventfilter(name, handler, event, d):
+ if name == 'base_eventhandler':
+ return True
+ else:
+ return False
+
+ if hasattr(bb.event, 'set_eventfilter'):
+ bb.event.set_eventfilter(eventfilter)
+
+ pn = d.getVar('PN', True)
+
+ if pn == 'perf':
+ logger.error("The perf recipe does not actually check out source and thus cannot be supported by this tool")
+ return None
+
+ if 'work-shared' in d.getVar('S', True):
+ logger.error("The %s recipe uses a shared workdir which this tool does not currently support" % pn)
+ return None
+
+ if bb.data.inherits_class('externalsrc', d) and d.getVar('EXTERNALSRC', True):
+ logger.error("externalsrc is currently enabled for the %s recipe. This prevents the normal do_patch task from working. You will need to disable this first." % pn)
+ return None
+
+ if os.path.exists(srctree):
+ if not os.path.isdir(srctree):
+ logger.error("output path %s exists and is not a directory" % srctree)
+ return None
+ elif os.listdir(srctree):
+ logger.error("output path %s already exists and is non-empty" % srctree)
+ return None
+
+ # Prepare for shutil.move later on
+ bb.utils.mkdirhier(srctree)
+ os.rmdir(srctree)
+
+ initial_rev = None
+ tempdir = tempfile.mkdtemp(prefix='devtool')
+ try:
+ crd = d.createCopy()
+ # Make a subdir so we guard against WORKDIR==S
+ workdir = os.path.join(tempdir, 'workdir')
+ crd.setVar('WORKDIR', workdir)
+ crd.setVar('T', os.path.join(tempdir, 'temp'))
+
+ # FIXME: This is very awkward. Unfortunately it's not currently easy to properly
+ # execute tasks outside of bitbake itself, until then this has to suffice if we
+ # are to handle e.g. linux-yocto's extra tasks
+ executed = []
+ def exec_task_func(func, report):
+ if not func in executed:
+ deps = crd.getVarFlag(func, 'deps')
+ if deps:
+ for taskdepfunc in deps:
+ exec_task_func(taskdepfunc, True)
+ if report:
+ logger.info('Executing %s...' % func)
+ fn = d.getVar('FILE', True)
+ localdata = bb.build._task_data(fn, func, crd)
+ bb.build.exec_func(func, localdata)
+ executed.append(func)
+
+ logger.info('Fetching %s...' % pn)
+ exec_task_func('do_fetch', False)
+ logger.info('Unpacking...')
+ exec_task_func('do_unpack', False)
+ srcsubdir = crd.getVar('S', True)
+ if srcsubdir != workdir and os.path.dirname(srcsubdir) != workdir:
+ # Handle if S is set to a subdirectory of the source
+ srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0])
+
+ patchdir = os.path.join(srcsubdir, 'patches')
+ haspatches = False
+ if os.path.exists(patchdir):
+ if os.listdir(patchdir):
+ haspatches = True
+ else:
+ os.rmdir(patchdir)
+
+ if not bb.data.inherits_class('kernel-yocto', d):
+ if not os.listdir(srcsubdir):
+ logger.error("no source unpacked to S, perhaps the %s recipe doesn't use any source?" % pn)
+ return None
+
+ if not os.path.exists(os.path.join(srcsubdir, '.git')):
+ bb.process.run('git init', cwd=srcsubdir)
+ bb.process.run('git add .', cwd=srcsubdir)
+ bb.process.run('git commit -q -m "Initial commit from upstream at version %s"' % crd.getVar('PV', True), cwd=srcsubdir)
+
+ (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srcsubdir)
+ initial_rev = stdout.rstrip()
+
+ bb.process.run('git checkout -b %s' % devbranch, cwd=srcsubdir)
+ bb.process.run('git tag -f devtool-base', cwd=srcsubdir)
+
+ crd.setVar('PATCHTOOL', 'git')
+
+ logger.info('Patching...')
+ exec_task_func('do_patch', False)
+
+ bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
+
+ if os.path.exists(patchdir):
+ shutil.rmtree(patchdir)
+ if haspatches:
+ bb.process.run('git checkout patches', cwd=srcsubdir)
+
+ shutil.move(srcsubdir, srctree)
+ logger.info('Source tree extracted to %s' % srctree)
+ finally:
+ if keep_temp:
+ logger.info('Preserving temporary directory %s' % tempdir)
+ else:
+ shutil.rmtree(tempdir)
+ return initial_rev
+
+def _add_md5(config, recipename, filename):
+ import bb.utils
+ md5 = bb.utils.md5_file(filename)
+ with open(os.path.join(config.workspace_path, '.devtool_md5'), 'a') as f:
+ f.write('%s|%s|%s\n' % (recipename, os.path.relpath(filename, config.workspace_path), md5))
+
+def _check_preserve(config, recipename):
+ import bb.utils
+ origfile = os.path.join(config.workspace_path, '.devtool_md5')
+ newfile = os.path.join(config.workspace_path, '.devtool_md5_new')
+ preservepath = os.path.join(config.workspace_path, 'attic')
+ with open(origfile, 'r') as f:
+ with open(newfile, 'w') as tf:
+ for line in f.readlines():
+ splitline = line.rstrip().split('|')
+ if splitline[0] == recipename:
+ removefile = os.path.join(config.workspace_path, splitline[1])
+ md5 = bb.utils.md5_file(removefile)
+ if splitline[2] != md5:
+ bb.utils.mkdirhier(preservepath)
+ preservefile = os.path.basename(removefile)
+ logger.warn('File %s modified since it was written, preserving in %s' % (preservefile, preservepath))
+ shutil.move(removefile, os.path.join(preservepath, preservefile))
+ else:
+ os.remove(removefile)
+ else:
+ tf.write(line)
+ os.rename(newfile, origfile)
+
+ return False
+
+
+def modify(args, config, basepath, workspace):
+ import bb
+ import oe.recipeutils
+
+ if args.recipename in workspace:
+ logger.error("recipe %s is already in your workspace" % args.recipename)
+ return -1
+
+ if not args.extract:
+ if not os.path.isdir(args.srctree):
+ logger.error("directory %s does not exist or not a directory (specify -x to extract source from recipe)" % args.srctree)
+ return -1
+
+ tinfoil = setup_tinfoil()
+
+ recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
+ if not recipefile:
+ # Error already logged
+ return -1
+ rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
+
+ initial_rev = None
+ commits = []
+ srctree = os.path.abspath(args.srctree)
+ if args.extract:
+ initial_rev = _extract_source(args.srctree, False, args.branch, rd)
+ if not initial_rev:
+ return -1
+ # Get list of commits since this revision
+ (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=args.srctree)
+ commits = stdout.split()
+ else:
+ if os.path.exists(os.path.join(args.srctree, '.git')):
+ (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree)
+ initial_rev = stdout.rstrip()
+
+ # Handle if S is set to a subdirectory of the source
+ s = rd.getVar('S', True)
+ workdir = rd.getVar('WORKDIR', True)
+ if s != workdir and os.path.dirname(s) != workdir:
+ srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:])
+ srctree = os.path.join(srctree, srcsubdir)
+
+ appendpath = os.path.join(config.workspace_path, 'appends')
+ if not os.path.exists(appendpath):
+ os.makedirs(appendpath)
+
+ appendname = os.path.splitext(os.path.basename(recipefile))[0]
+ if args.wildcard:
+ appendname = re.sub(r'_.*', '_%', appendname)
+ appendfile = os.path.join(appendpath, appendname + '.bbappend')
+ with open(appendfile, 'w') as f:
+ f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n\n')
+ f.write('inherit externalsrc\n')
+ f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
+ f.write('EXTERNALSRC_pn-%s = "%s"\n' % (args.recipename, srctree))
+ if bb.data.inherits_class('autotools-brokensep', rd):
+ logger.info('using source tree as build directory since original recipe inherits autotools-brokensep')
+ f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (args.recipename, srctree))
+ if initial_rev:
+ f.write('\n# initial_rev: %s\n' % initial_rev)
+ for commit in commits:
+ f.write('# commit: %s\n' % commit)
+
+ _add_md5(config, args.recipename, appendfile)
+
+ logger.info('Recipe %s now set up to build from %s' % (args.recipename, srctree))
+
+ return 0
+
+
+def update_recipe(args, config, basepath, workspace):
+ if not args.recipename in workspace:
+ logger.error("no recipe named %s in your workspace" % args.recipename)
+ return -1
+
+ # Get initial revision from bbappend
+ appends = glob.glob(os.path.join(config.workspace_path, 'appends', '%s_*.bbappend' % args.recipename))
+ if not appends:
+ logger.error('unable to find workspace bbappend for recipe %s' % args.recipename)
+ return -1
+
+ tinfoil = setup_tinfoil()
+ import bb
+ from oe.patch import GitApplyTree
+ import oe.recipeutils
+
+ srctree = workspace[args.recipename]
+ commits = []
+ update_rev = None
+ if args.initial_rev:
+ initial_rev = args.initial_rev
+ else:
+ initial_rev = None
+ with open(appends[0], 'r') as f:
+ for line in f:
+ if line.startswith('# initial_rev:'):
+ initial_rev = line.split(':')[-1].strip()
+ elif line.startswith('# commit:'):
+ commits.append(line.split(':')[-1].strip())
+
+ if initial_rev:
+ # Find first actually changed revision
+ (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
+ newcommits = stdout.split()
+ for i in xrange(min(len(commits), len(newcommits))):
+ if newcommits[i] == commits[i]:
+ update_rev = commits[i]
+
+ if not initial_rev:
+ logger.error('Unable to find initial revision - please specify it with --initial-rev')
+ return -1
+
+ if not update_rev:
+ update_rev = initial_rev
+
+ # Find list of existing patches in recipe file
+ recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
+ if not recipefile:
+ # Error already logged
+ return -1
+ rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
+ existing_patches = oe.recipeutils.get_recipe_patches(rd)
+
+ removepatches = []
+ if not args.no_remove:
+ # Get all patches from source tree and check if any should be removed
+ tempdir = tempfile.mkdtemp(prefix='devtool')
+ try:
+ GitApplyTree.extractPatches(srctree, initial_rev, tempdir)
+ newpatches = os.listdir(tempdir)
+ for patch in existing_patches:
+ patchfile = os.path.basename(patch)
+ if patchfile not in newpatches:
+ removepatches.append(patch)
+ finally:
+ shutil.rmtree(tempdir)
+
+ # Get updated patches from source tree
+ tempdir = tempfile.mkdtemp(prefix='devtool')
+ try:
+ GitApplyTree.extractPatches(srctree, update_rev, tempdir)
+
+ # Match up and replace existing patches with corresponding new patches
+ updatepatches = False
+ updaterecipe = False
+ newpatches = os.listdir(tempdir)
+ for patch in existing_patches:
+ patchfile = os.path.basename(patch)
+ if patchfile in newpatches:
+ logger.info('Updating patch %s' % patchfile)
+ shutil.move(os.path.join(tempdir, patchfile), patch)
+ newpatches.remove(patchfile)
+ updatepatches = True
+ srcuri = (rd.getVar('SRC_URI', False) or '').split()
+ if newpatches:
+ # Add any patches left over
+ patchdir = os.path.join(os.path.dirname(recipefile), rd.getVar('BPN', True))
+ bb.utils.mkdirhier(patchdir)
+ for patchfile in newpatches:
+ logger.info('Adding new patch %s' % patchfile)
+ shutil.move(os.path.join(tempdir, patchfile), os.path.join(patchdir, patchfile))
+ srcuri.append('file://%s' % patchfile)
+ updaterecipe = True
+ if removepatches:
+ # Remove any patches that we don't need
+ for patch in removepatches:
+ patchfile = os.path.basename(patch)
+ for i in xrange(len(srcuri)):
+ if srcuri[i].startswith('file://') and os.path.basename(srcuri[i]).split(';')[0] == patchfile:
+ logger.info('Removing patch %s' % patchfile)
+ srcuri.pop(i)
+ # FIXME "git rm" here would be nice if the file in question is tracked
+ # FIXME there's a chance that this file is referred to by another recipe, in which case deleting wouldn't be the right thing to do
+ os.remove(patch)
+ updaterecipe = True
+ break
+ if updaterecipe:
+ logger.info('Updating recipe %s' % os.path.basename(recipefile))
+ oe.recipeutils.patch_recipe(rd, recipefile, {'SRC_URI': ' '.join(srcuri)})
+ elif not updatepatches:
+ # Neither patches nor recipe were updated
+ logger.info('No patches need updating')
+ finally:
+ shutil.rmtree(tempdir)
+
+ return 0
+
+
+def status(args, config, basepath, workspace):
+ if workspace:
+ for recipe, value in workspace.iteritems():
+ print("%s: %s" % (recipe, value))
+ else:
+ logger.info('No recipes currently in your workspace - you can use "devtool modify" to work on an existing recipe or "devtool add" to add a new one')
+ return 0
+
+
+def reset(args, config, basepath, workspace):
+ import bb.utils
+ if not args.recipename in workspace:
+ logger.error("no recipe named %s in your workspace" % args.recipename)
+ return -1
+ _check_preserve(config, args.recipename)
+
+ preservepath = os.path.join(config.workspace_path, 'attic', args.recipename)
+ def preservedir(origdir):
+ if os.path.exists(origdir):
+ for fn in os.listdir(origdir):
+ logger.warn('Preserving %s in %s' % (fn, preservepath))
+ bb.utils.mkdirhier(preservepath)
+ shutil.move(os.path.join(origdir, fn), os.path.join(preservepath, fn))
+ os.rmdir(origdir)
+
+ preservedir(os.path.join(config.workspace_path, 'recipes', args.recipename))
+ # We don't automatically create this dir next to appends, but the user can
+ preservedir(os.path.join(config.workspace_path, 'appends', args.recipename))
+ return 0
+
+
+def build(args, config, basepath, workspace):
+ import bb
+ if not args.recipename in workspace:
+ logger.error("no recipe named %s in your workspace" % args.recipename)
+ return -1
+ exec_build_env_command(config.init_path, basepath, 'bitbake -c install %s' % args.recipename, watch=True)
+
+ return 0
+
+
+def register_commands(subparsers, context):
+ parser_add = subparsers.add_parser('add', help='Add a new recipe',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_add.add_argument('recipename', help='Name for new recipe to add')
+ parser_add.add_argument('srctree', help='Path to external source tree')
+ parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
+ parser_add.set_defaults(func=add)
+
+ parser_add = subparsers.add_parser('modify', help='Modify the source for an existing recipe',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_add.add_argument('recipename', help='Name for recipe to edit')
+ parser_add.add_argument('srctree', help='Path to external source tree')
+ parser_add.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend')
+ parser_add.add_argument('--extract', '-x', action="store_true", help='Extract source as well')
+ parser_add.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout')
+ parser_add.set_defaults(func=modify)
+
+ parser_add = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_add.add_argument('recipename', help='Name for recipe to extract the source for')
+ parser_add.add_argument('srctree', help='Path to where to extract the source tree')
+ parser_add.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout')
+ parser_add.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
+ parser_add.set_defaults(func=extract)
+
+ parser_add = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_add.add_argument('recipename', help='Name of recipe to update')
+ parser_add.add_argument('--initial-rev', help='Starting revision for patches')
+ parser_add.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
+ parser_add.set_defaults(func=update_recipe)
+
+ parser_status = subparsers.add_parser('status', help='Show status',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_status.set_defaults(func=status)
+
+ parser_build = subparsers.add_parser('build', help='Build recipe',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_build.add_argument('recipename', help='Recipe to build')
+ parser_build.set_defaults(func=build)
+
+ parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_reset.add_argument('recipename', help='Recipe to reset')
+ parser_reset.set_defaults(func=reset)
+
diff --git a/scripts/lib/image/canned-wks/directdisk.wks b/scripts/lib/image/canned-wks/directdisk.wks
index 397a929c74..62dcab15ce 100644
--- a/scripts/lib/image/canned-wks/directdisk.wks
+++ b/scripts/lib/image/canned-wks/directdisk.wks
@@ -3,7 +3,7 @@
# can directly dd to boot media.
-part /boot --source bootimg-pcbios --ondisk sda --fstype=msdos --label boot --active --align 1024
+part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"
diff --git a/scripts/lib/image/canned-wks/mkefidisk.wks b/scripts/lib/image/canned-wks/mkefidisk.wks
index e976bc80dd..58d42e61eb 100644
--- a/scripts/lib/image/canned-wks/mkefidisk.wks
+++ b/scripts/lib/image/canned-wks/mkefidisk.wks
@@ -2,7 +2,7 @@
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media.
-part /boot --source bootimg-efi --ondisk sda --fstype=msdos --label msdos --active --align 1024
+part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
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 @@
+# short-description: Create an EFI disk image
+# long-description: Creates a partitioned EFI disk image that the user
+# can directly dd to boot media.
+
+part /boot --source bootimg-efi --sourceparams="loader=gummiboot" --ondisk sda --label msdos --active --align 1024
+
+part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
+
+part swap --ondisk sda --size 44 --label swap1 --fstype=swap
+
+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 @@
+# short-description: Create SD card image with a boot partition
+# long-description: Creates a partitioned SD card image. Boot files
+# are located in the first vfat partition.
+
+part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
+part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4
diff --git a/scripts/lib/image/config/wic.conf b/scripts/lib/image/config/wic.conf
index e96d6aec45..a51bcb55eb 100644
--- a/scripts/lib/image/config/wic.conf
+++ b/scripts/lib/image/config/wic.conf
@@ -4,4 +4,3 @@ distro_name = OpenEmbedded
[create]
; settings for create subcommand
-runtime=native
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 1256236304..e794545e94 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -37,12 +37,12 @@ import subprocess
import shutil
import os, sys, errno
-from mic import msger, creator
-from mic.utils import cmdln, misc, errors
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.__version__ import VERSION
-from mic.utils.oe.misc import *
+from wic import msger, creator
+from wic.utils import cmdln, misc, errors
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
+from wic.__version__ import VERSION
+from wic.utils.oe.misc import *
def verify_build_env():
@@ -67,7 +67,7 @@ def find_artifacts(image_name):
"""
bitbake_env_lines = get_bitbake_env_lines()
- rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
+ rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = ""
for line in bitbake_env_lines.split('\n'):
if (get_line_val(line, "IMAGE_ROOTFS")):
@@ -76,17 +76,11 @@ def find_artifacts(image_name):
if (get_line_val(line, "STAGING_KERNEL_DIR")):
kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR")
continue
- if (get_line_val(line, "HDDDIR")):
- hdddir = get_line_val(line, "HDDDIR")
- continue
- if (get_line_val(line, "STAGING_DATADIR")):
- staging_data_dir = get_line_val(line, "STAGING_DATADIR")
- continue
if (get_line_val(line, "STAGING_DIR_NATIVE")):
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
continue
- return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot)
+ return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot)
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
@@ -174,19 +168,26 @@ def list_canned_image_help(scripts_path, fullpath):
break
-def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, hdddir, staging_data_dir, scripts_path,
- image_output_dir, debug, properties_file, properties=None):
+def list_source_plugins():
"""
- Create image
+ List the available source plugins i.e. plugins available for --source.
+ """
+ plugins = pluginmgr.get_source_plugins()
+
+ for plugin in plugins:
+ print " %s" % plugin
+
+
+def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
+ native_sysroot, scripts_path, image_output_dir, debug,
+ properties_file, properties=None):
+ """Create image
wks_file - user-defined OE kickstart file
rootfs_dir - absolute path to the build's /rootfs dir
bootimg_dir - absolute path to the build's boot artifacts directory
kernel_dir - absolute path to the build's kernel directory
native_sysroot - absolute path to the build's native sysroots dir
- hdddir - absolute path to the build's HDDDIR dir
- staging_data_dir - absolute path to the build's STAGING_DATA_DIR dir
scripts_path - absolute path to /scripts dir
image_output_dir - dirname to create for image
properties_file - use values from this file if nonempty i.e no prompting
@@ -201,22 +202,14 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
rootfs_dir: IMAGE_ROOTFS
kernel_dir: STAGING_KERNEL_DIR
native_sysroot: STAGING_DIR_NATIVE
- hdddir: HDDDIR
- staging_data_dir: STAGING_DATA_DIR
- In the above case, bootimg_dir remains unset and the image
- creation code determines which of the passed-in directories to
- use.
+ In the above case, bootimg_dir remains unset and the
+ plugin-specific image creation code is responsible for finding the
+ bootimg artifacts.
In the case where the values are passed in explicitly i.e 'wic -e'
is not used but rather the individual 'wic' options are used to
- explicitly specify these values, hdddir and staging_data_dir will
- be unset, but bootimg_dir must be explicit i.e. explicitly set to
- either hdddir or staging_data_dir, depending on the image being
- generated. The other values (rootfs_dir, kernel_dir, and
- native_sysroot) correspond to the same values found above via
- 'bitbake -e').
-
+ explicitly specify these values.
"""
try:
oe_builddir = os.environ["BUILDDIR"]
@@ -232,8 +225,6 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
direct_args.insert(0, bootimg_dir)
direct_args.insert(0, kernel_dir)
direct_args.insert(0, native_sysroot)
- direct_args.insert(0, hdddir)
- direct_args.insert(0, staging_data_dir)
direct_args.insert(0, "direct")
if debug:
@@ -258,6 +249,9 @@ def wic_list(args, scripts_path, properties_file):
if args[0] == "images":
list_canned_images(scripts_path)
return True
+ elif args[0] == "source-plugins":
+ list_source_plugins()
+ return True
elif args[0] == "properties":
return True
else:
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index cb3112cf08..6b74f57662 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -87,7 +87,13 @@ wic_usage = """
create Create a new OpenEmbedded image
list List available values for options and image properties
- See 'wic help COMMAND' for more information on a specific command.
+ Help topics:
+ overview wic overview - General overview of wic
+ plugins wic plugins - Overview and API
+ kickstart wic kickstart - wic kickstart reference
+
+ See 'wic help <COMMAND or HELP TOPIC>' for more information on a specific
+ command or help topic.
"""
wic_help_usage = """
@@ -103,8 +109,9 @@ wic_create_usage = """
usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
- [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
- [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
This command creates an OpenEmbedded image based on the 'OE kickstart
commands' found in the <wks file>.
@@ -123,8 +130,9 @@ NAME
SYNOPSIS
wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
- [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
- [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE
@@ -138,7 +146,7 @@ DESCRIPTION
the corresponding artifacts are typically found in a normal
OpenEmbedded build.
- Alternatively, users can use the -e option to have 'mic' determine
+ Alternatively, users can use the -e option to have 'wic' determine
those locations for a given image. If the -e option is used, the
user needs to have set the appropriate MACHINE variable in
local.conf, and have sourced the build environment.
@@ -166,6 +174,12 @@ DESCRIPTION
explicitly, 'wic' assumes the user knows what he or she is doing
and skips the build check.
+ The -D option is used to display debug information detailing
+ exactly what happens behind the scenes when a create request is
+ fulfilled (or not, as the case may be). It enumerates and
+ displays the command sequence used, and should be included in any
+ bug report describing unexpected results.
+
When 'wic -e' is used, the locations for the build artifacts
values are determined by 'wic -e' from the output of the 'bitbake
-e' command given an image name e.g. 'core-image-minimal' and a
@@ -175,7 +189,7 @@ DESCRIPTION
-r: IMAGE_ROOTFS
-k: STAGING_KERNEL_DIR
-n: STAGING_DIR_NATIVE
- -b: HDDDIR and STAGING_DATA_DIR (handlers decide which to use)
+ -b: empty (plugin-specific handlers must determine this)
If 'wic -e' is not used, the user needs to select the appropriate
value for -b (as well as -r, -k, and -n).
@@ -199,6 +213,7 @@ wic_list_usage = """
usage: wic list images
wic list <image> help
+ wic list source-plugins
wic list properties
wic list properties <wks file>
wic list property <property>
@@ -214,11 +229,14 @@ wic_list_usage = """
The second form lists the detailed help information for a specific
'canned' image.
- The third form enumerates all the possible values that exist and can
+ The third form enumerates all the available --sources (source
+ plugins).
+
+ The fourth form enumerates all the possible values that exist and can
be specified in an OE kickstart (wks) file.
- The fourth form enumerates all the possible options that exist for
- the set of properties specified in a given OE kickstart (ks) file.
+ The fifth form enumerates all the possible options that exist for the
+ set of properties specified in a given OE kickstart (ks) file.
The final form enumerates all the possible values that exist and can
be specified for any given OE kickstart (wks) property.
@@ -234,6 +252,7 @@ NAME
SYNOPSIS
wic list images
wic list <image> help
+ wic list source-plugins
wic list properties
wic list properties <wks file>
wic list property <property>
@@ -255,6 +274,15 @@ DESCRIPTION
The second form lists the detailed help information for a specific
'canned' image.
+ The third form enumerates all the available --sources (source
+ plugins). The contents of a given partition are driven by code
+ defined in 'source plugins'. Users specify a specific plugin via
+ the --source parameter of the partition .wks command. Normally
+ this is the 'rootfs' plugin but can be any of the more specialized
+ sources listed by the 'list source-plugins' command. Users can
+ also add their own source plugins - see 'wic help plugins' for
+ details.
+
The third form enumerates all the possible values that exist and
can be specified in a OE kickstart (wks) file. The output of this
can be used by the third form to print the description and
@@ -309,3 +337,420 @@ DESCRIPTION
["offset", "offset of the partition within the image"]
"""
+
+wic_plugins_help = """
+
+NAME
+ wic plugins - Overview and API
+
+DESCRIPTION
+ plugins allow wic functionality to be extended and specialized by
+ users. This section documents the plugin interface, which is
+ currently restricted to 'source' plugins.
+
+ 'Source' plugins provide a mechanism to customize various aspects
+ of the image generation process in wic, mainly the contents of
+ partitions.
+
+ Source plugins provide a mechanism for mapping values specified in
+ .wks files using the --source keyword to a particular plugin
+ implementation that populates a corresponding partition.
+
+ A source plugin is created as a subclass of SourcePlugin (see
+ scripts/lib/wic/pluginbase.py) and the plugin file containing it
+ is added to scripts/lib/wic/plugins/source/ to make the plugin
+ implementation available to the wic implementation.
+
+ Source plugins can also be implemented and added by external
+ layers - any plugins found in a scripts/lib/wic/plugins/source/
+ directory in an external layer will also be made available.
+
+ When the wic implementation needs to invoke a partition-specific
+ implementation, it looks for the plugin that has the same name as
+ the --source param given to that partition. For example, if the
+ partition is set up like this:
+
+ part /boot --source bootimg-pcbios ...
+
+ then the methods defined as class members of the plugin having the
+ matching bootimg-pcbios .name class member would be used.
+
+ To be more concrete, here's the plugin definition that would match
+ a '--source bootimg-pcbios' usage, along with an example method
+ that would be called by the wic implementation when it needed to
+ invoke an implementation-specific partition-preparation function:
+
+ class BootimgPcbiosPlugin(SourcePlugin):
+ name = 'bootimg-pcbios'
+
+ @classmethod
+ def do_prepare_partition(self, part, ...)
+
+ If the subclass itself doesn't implement a function, a 'default'
+ version in a superclass will be located and used, which is why all
+ plugins must be derived from SourcePlugin.
+
+ The SourcePlugin class defines the following methods, which is the
+ current set of methods that can be implemented/overridden by
+ --source plugins. Any methods not implemented by a SourcePlugin
+ subclass inherit the implementations present in the SourcePlugin
+ class (see the SourcePlugin source for details):
+
+ do_prepare_partition()
+ Called to do the actual content population for a
+ partition. In other words, it 'prepares' the final partition
+ image which will be incorporated into the disk image.
+
+ do_configure_partition()
+ Called before do_prepare_partition(), typically used to
+ create custom configuration files for a partition, for
+ example syslinux or grub config files.
+
+ do_install_disk()
+ Called after all partitions have been prepared and assembled
+ into a disk image. This provides a hook to allow
+ finalization of a disk image, for example to write an MBR to
+ it.
+
+ do_stage_partition()
+ Special content-staging hook called before
+ do_prepare_partition(), normally empty.
+
+ Typically, a partition will just use the passed-in
+ parameters, for example the unmodified value of bootimg_dir.
+ In some cases however, things may need to be more tailored.
+ As an example, certain files may additionally need to be
+ take from bootimg_dir + /boot. This hook allows those files
+ to be staged in a customized fashion. Note that
+ get_bitbake_var() allows you to access non-standard
+ variables that you might want to use for these types of
+ situations.
+
+ This scheme is extensible - adding more hooks is a simple matter
+ of adding more plugin methods to SourcePlugin and derived classes.
+ The code that then needs to call the plugin methods uses
+ plugin.get_source_plugin_methods() to find the method(s) needed by
+ the call; this is done by filling up a dict with keys containing
+ the method names of interest - on success, these will be filled in
+ with the actual methods. Please see the implementation for
+ examples and details.
+"""
+
+wic_overview_help = """
+
+NAME
+ wic overview - General overview of wic
+
+DESCRIPTION
+ The 'wic' command generates partitioned images from existing
+ OpenEmbedded build artifacts. Image generation is driven by
+ partitioning commands contained in an 'Openembedded kickstart'
+ (.wks) file (see 'wic help kickstart') specified either directly
+ on the command-line or as one of a selection of canned .wks files
+ (see 'wic list images'). When applied to a given set of build
+ artifacts, the result is an image or set of images that can be
+ directly written onto media and used on a particular system.
+
+ The 'wic' command and the infrastructure it's based on is by
+ definition incomplete - its purpose is to allow the generation of
+ customized images, and as such was designed to be completely
+ extensible via a plugin interface (see 'wic help plugins').
+
+ Background and Motivation
+
+ wic is meant to be a completely independent standalone utility
+ that initially provides easier-to-use and more flexible
+ replacements for a couple bits of existing functionality in
+ oe-core: directdisk.bbclass and mkefidisk.sh. The difference
+ between wic and those examples is that with wic the functionality
+ of those scripts is implemented by a general-purpose partitioning
+ 'language' based on Redhat kickstart syntax).
+
+ The initial motivation and design considerations that lead to the
+ current tool are described exhaustively in Yocto Bug #3847
+ (https://bugzilla.yoctoproject.org/show_bug.cgi?id=3847).
+
+ Implementation and Examples
+
+ wic can be used in two different modes, depending on how much
+ control the user needs in specifying the Openembedded build
+ artifacts that will be used in creating the image: 'raw' and
+ 'cooked'.
+
+ If used in 'raw' mode, artifacts are explicitly specified via
+ command-line arguments (see example below).
+
+ The more easily usable 'cooked' mode uses the current MACHINE
+ setting and a specified image name to automatically locate the
+ artifacts used to create the image.
+
+ OE kickstart files (.wks) can of course be specified directly on
+ the command-line, but the user can also choose from a set of
+ 'canned' .wks files available via the 'wic list images' command
+ (example below).
+
+ In any case, the prerequisite for generating any image is to have
+ the build artifacts already available. The below examples assume
+ the user has already build a 'core-image-minimal' for a specific
+ machine (future versions won't require this redundant step, but
+ for now that's typically how build artifacts get generated).
+
+ The other prerequisite is to source the build environment:
+
+ $ source oe-init-build-env
+
+ To start out with, we'll generate an image from one of the canned
+ .wks files. The following generates a list of availailable
+ images:
+
+ $ wic list images
+ mkefidisk Create an EFI disk image
+ directdisk Create a 'pcbios' direct disk image
+
+ You can get more information about any of the available images by
+ typing 'wic list xxx help', where 'xxx' is one of the image names:
+
+ $ wic list mkefidisk help
+
+ Creates a partitioned EFI disk image that the user can directly dd
+ to boot media.
+
+ At any time, you can get help on the 'wic' command or any
+ subcommand (currently 'list' and 'create'). For instance, to get
+ the description of 'wic create' command and its parameters:
+
+ $ wic create
+
+ Usage:
+
+ Create a new OpenEmbedded image
+
+ usage: wic create <wks file or image name> [-o <DIRNAME> | ...]
+ [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
+ [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
+ [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot]
+
+ This command creates an OpenEmbedded image based on the 'OE
+ kickstart commands' found in the <wks file>.
+
+ The -o option can be used to place the image in a directory
+ with a different name and location.
+
+ See 'wic help create' for more detailed instructions.
+ ...
+
+ As mentioned in the command, you can get even more detailed
+ information by adding 'help' to the above:
+
+ $ wic help create
+
+ So, the easiest way to create an image is to use the -e option
+ with a canned .wks file. To use the -e option, you need to
+ specify the image used to generate the artifacts and you actually
+ need to have the MACHINE used to build them specified in your
+ local.conf (these requirements aren't necessary if you aren't
+ using the -e options.) Below, we generate a directdisk image,
+ pointing the process at the core-image-minimal artifacts for the
+ current MACHINE:
+
+ $ wic create directdisk -e core-image-minimal
+
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/directdisk-201309252350-sda.direct
+
+ The following build artifacts were used to create the image(s):
+
+ ROOTFS_DIR: ...
+ BOOTIMG_DIR: ...
+ KERNEL_DIR: ...
+ NATIVE_SYSROOT: ...
+
+ The image(s) were created using OE kickstart file:
+ .../scripts/lib/image/canned-wks/directdisk.wks
+
+ The output shows the name and location of the image created, and
+ so that you know exactly what was used to generate the image, each
+ of the artifacts and the kickstart file used.
+
+ Similarly, you can create a 'mkefidisk' image in the same way
+ (notice that this example uses a different machine - because it's
+ using the -e option, you need to change the MACHINE in your
+ local.conf):
+
+ $ wic create mkefidisk -e core-image-minimal
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/mkefidisk-201309260027-sda.direct
+
+ ...
+
+ Here's an example that doesn't take the easy way out and manually
+ specifies each build artifact, along with a non-canned .wks file,
+ and also uses the -o option to have wic create the output
+ somewhere other than the default /var/tmp/wic:
+
+ $ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir
+ /home/trz/yocto/build/tmp/work/crownbay/core-image-minimal/1.0-r0/rootfs
+ --bootimg-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/share
+ --kernel-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/src/kernel
+ --native-sysroot /home/trz/yocto/build/tmp/sysroots/x86_64-linux
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /home/trz/testwic/build/test-201309260032-sda.direct
+
+ ...
+
+ Finally, here's an example of the actual partition language
+ commands used to generate the mkefidisk image i.e. these are the
+ contents of the mkefidisk.wks OE kickstart file:
+
+ # short-description: Create an EFI disk image
+ # long-description: Creates a partitioned EFI disk image that the user
+ # can directly dd to boot media.
+
+ part /boot --source bootimg-efi --ondisk sda --fstype=efi --active
+
+ part / --source rootfs --ondisk sda --fstype=ext3 --label platform
+
+ part swap --ondisk sda --size 44 --label swap1 --fstype=swap
+
+ bootloader --timeout=10 --append="rootwait console=ttyPCH0,115200"
+
+ You can get a complete listing and description of all the
+ kickstart commands available for use in .wks files from 'wic help
+ kickstart'.
+"""
+
+wic_kickstart_help = """
+
+NAME
+ wic kickstart - wic kickstart reference
+
+DESCRIPTION
+ This section provides the definitive reference to the wic
+ kickstart language. It also provides documentation on the list of
+ --source plugins available for use from the 'part' command (see
+ the 'Platform-specific Plugins' section below).
+
+ The current wic implementation supports only the basic kickstart
+ partitioning commands: partition (or part for short) and
+ bootloader.
+
+ The following is a listing of the commands, their syntax, and
+ meanings. The commands are based on the Fedora kickstart
+ documentation but with modifications to reflect wic capabilities.
+
+ http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
+ http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
+
+ Commands
+
+ * 'part' or 'partition'
+
+ This command creates a partition on the system and uses the
+ following syntax:
+
+ part <mountpoint>
+
+ The <mountpoint> is where the partition will be mounted and
+ must take of one of the following forms:
+
+ /<path>: For example: /, /usr, or /home
+
+ swap: The partition will be used as swap space.
+
+ The following are supported 'part' options:
+
+ --size: The minimum partition size in MBytes. Specify an
+ integer value such as 500. Do not append the number
+ with "MB". You do not need this option if you use
+ --source.
+
+ --source: This option is a wic-specific option that names the
+ source of the data that will populate the
+ partition. The most common value for this option
+ is 'rootfs', but can be any value which maps to a
+ valid 'source plugin' (see 'wic help plugins').
+
+ If '--source rootfs' is used, it tells the wic
+ command to create a partition as large as needed
+ and to fill it with the contents of the root
+ filesystem pointed to by the '-r' wic command-line
+ option (or the equivalent rootfs derived from the
+ '-e' command-line option). The filesystem type
+ that will be used to create the partition is driven
+ by the value of the --fstype option specified for
+ the partition (see --fstype below).
+
+ If --source <plugin-name>' is used, it tells the
+ wic command to create a partition as large as
+ needed and to fill with the contents of the
+ partition that will be generated by the specified
+ plugin name using the data pointed to by the '-r'
+ wic command-line option (or the equivalent rootfs
+ derived from the '-e' command-line option).
+ Exactly what those contents and filesystem type end
+ up being are dependent on the given plugin
+ implementation.
+
+ --ondisk or --ondrive: Forces the partition to be created on
+ a particular disk.
+
+ --fstype: Sets the file system type for the partition. These
+ apply to partitions created using '--source rootfs' (see
+ --source above). Valid values are:
+
+ ext2
+ ext3
+ ext4
+ btrfs
+ squashfs
+ swap
+
+ --fsoptions: Specifies a free-form string of options to be
+ used when mounting the filesystem. This string
+ will be copied into the /etc/fstab file of the
+ installed system and should be enclosed in
+ quotes. If not specified, the default string is
+ "defaults".
+
+ --label label: Specifies the label to give to the filesystem
+ to be made on the partition. If the given
+ label is already in use by another filesystem,
+ a new label is created for the partition.
+
+ --active: Marks the partition as active.
+
+ --align (in KBytes): This option is specific to wic and says
+ to start a partition on an x KBytes
+ boundary.
+
+ * bootloader
+
+ This command allows the user to specify various bootloader
+ options. The following are supported 'bootloader' options:
+
+ --timeout: Specifies the number of seconds before the
+ bootloader times out and boots the default option.
+
+ --append: Specifies kernel parameters. These will be added to
+ bootloader command-line - for example, the syslinux
+ APPEND or grub kernel command line.
+
+ Note that bootloader functionality and boot partitions are
+ implemented by the various --source plugins that implement
+ bootloader functionality; the bootloader command essentially
+ provides a means of modifying bootloader configuration.
+"""
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py b/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py
deleted file mode 100644
index da48ff50d5..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-import authconfig, autopart, autostep, bootloader, clearpart, device
-import deviceprobe, displaymode, dmraid, driverdisk, fcoe, firewall, firstboot
-import group, ignoredisk, interactive, iscsi, iscsiname, key, keyboard, lang
-import langsupport, lilocheck, logging, logvol, mediacheck, method, monitor
-import mouse, multipath, network, partition, raid, reboot, repo, rescue, rootpw
-import selinux, services, skipx, sshpw, timezone, updates, upgrade, user, vnc
-import volgroup, xconfig, zerombr, zfcp
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py b/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py
deleted file mode 100644
index 9af9c0ff14..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-
-class FC3_Authconfig(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, *args, **kwargs)
- self.authconfig = kwargs.get("authconfig", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.authconfig:
- retval += "# System authorization information\nauth %s\n" % self.authconfig
-
- return retval
-
- def parse(self, args):
- self.authconfig = self.currentLine[len(self.currentCmd):].strip()
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py b/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py
deleted file mode 100644
index cf28b5c7f7..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_AutoPart(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=100, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.autopart = kwargs.get("autopart", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.autopart:
- retval += "autopart\n"
-
- return retval
-
- def parse(self, args):
- if len(args) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "autopart")
-
- self.autopart = True
- return self
-
-class F9_AutoPart(FC3_AutoPart):
- removedKeywords = FC3_AutoPart.removedKeywords
- removedAttrs = FC3_AutoPart.removedAttrs
-
- def __init__(self, writePriority=100, *args, **kwargs):
- FC3_AutoPart.__init__(self, writePriority=writePriority, *args, **kwargs)
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- self.op = self._getParser()
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.autopart:
- retval += "autopart"
-
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\""% self.passphrase
-
- if retval != "":
- retval += "\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- self.autopart = True
- return self
-
-class F12_AutoPart(F9_AutoPart):
- removedKeywords = F9_AutoPart.removedKeywords
- removedAttrs = F9_AutoPart.removedAttrs
-
- def __init__(self, writePriority=100, *args, **kwargs):
- F9_AutoPart.__init__(self, writePriority=writePriority, *args, **kwargs)
-
- self.escrowcert = kwargs.get("escrowcert", "")
- self.backuppassphrase = kwargs.get("backuppassphrase", False)
-
- def __str__(self):
- retval = F9_AutoPart.__str__(self)
-
- if self.encrypted and self.escrowcert != "":
- retval = retval.strip()
-
- retval += " --escrowcert=\"%s\"" % self.escrowcert
-
- if self.backuppassphrase:
- retval += " --backuppassphrase"
-
- retval += "\n"
-
- return retval
-
- def _getParser(self):
- op = F9_AutoPart._getParser(self)
- op.add_option("--escrowcert")
- op.add_option("--backuppassphrase", action="store_true", default=False)
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py b/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py
deleted file mode 100644
index e6ae71cefc..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-class FC3_AutoStep(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.autostep = kwargs.get("autostep", False)
- self.autoscreenshot = kwargs.get("autoscreenshot", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.autostep:
- if self.autoscreenshot:
- retval += "autostep --autoscreenshot\n"
- else:
- retval += "autostep\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--autoscreenshot", dest="autoscreenshot",
- action="store_true", default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- self.autostep = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py b/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py
deleted file mode 100644
index a8089fcb99..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-class FC3_ClearPart(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=120, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.drives = kwargs.get("drives", [])
- self.initAll = kwargs.get("initAll", False)
- self.type = kwargs.get("type", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.type is None:
- return retval
-
- if self.type == CLEARPART_TYPE_NONE:
- clearstr = "--none"
- elif self.type == CLEARPART_TYPE_LINUX:
- clearstr = "--linux"
- elif self.type == CLEARPART_TYPE_ALL:
- clearstr = "--all"
- else:
- clearstr = ""
-
- if self.initAll:
- initstr = "--initlabel"
- else:
- initstr = ""
-
- if len(self.drives) > 0:
- drivestr = "--drives=" + ",".join(self.drives)
- else:
- drivestr = ""
-
- retval += "# Partition clearing information\nclearpart %s %s %s\n" % (clearstr, initstr, drivestr)
- return retval
-
- def _getParser(self):
- def drive_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = KSOptionParser()
- op.add_option("--all", dest="type", action="store_const",
- const=CLEARPART_TYPE_ALL)
- op.add_option("--drives", dest="drives", action="callback",
- callback=drive_cb, nargs=1, type="string")
- op.add_option("--initlabel", dest="initAll", action="store_true",
- default=False)
- op.add_option("--linux", dest="type", action="store_const",
- const=CLEARPART_TYPE_LINUX)
- op.add_option("--none", dest="type", action="store_const",
- const=CLEARPART_TYPE_NONE)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/device.py b/scripts/lib/mic/3rdparty/pykickstart/commands/device.py
deleted file mode 100644
index 321410e2e2..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/device.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F8_DeviceData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.moduleName = kwargs.get("moduleName", "")
- self.moduleOpts = kwargs.get("moduleOpts", "")
-
- def __eq__(self, y):
- return self.moduleName == y.moduleName
-
- def __str__(self):
- retval = BaseData.__str__(self)
-
- if self.moduleName != "":
- retval += "device %s" % self.moduleName
-
- if self.moduleOpts != "":
- retval += " --opts=\"%s\"" % self.moduleOpts
-
- return retval + "\n"
-
-class FC3_Device(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.type = kwargs.get("type", "")
- self.moduleName = kwargs.get("moduleName", "")
- self.moduleOpts = kwargs.get("moduleOpts", "")
-
- def __eq__(self, y):
- return self.moduleName == y.moduleName
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.moduleName != "":
- retval += "device %s %s" % (self.type, self.moduleName)
-
- if self.moduleOpts != "":
- retval += " --opts=\"%s\"" % self.moduleOpts
-
- return retval + "\n"
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--opts", dest="moduleOpts", default="")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 2:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("device command requires two arguments: module type and name"))
-
- self.moduleOpts = opts.moduleOpts
- self.type = extra[0]
- self.moduleName = extra[1]
- return self
-
-class F8_Device(FC3_Device):
- removedKeywords = FC3_Device.removedKeywords
- removedAttrs = FC3_Device.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_Device.__init__(self, writePriority, *args, **kwargs)
- self.deviceList = kwargs.get("deviceList", [])
-
- def __str__(self):
- retval = ""
- for device in self.deviceList:
- retval += device.__str__()
-
- return retval
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("%s command requires a single argument: %s") % ("device", "module name"))
-
- dd = F8_DeviceData()
- self._setToObj(self.op, opts, dd)
- dd.lineno = self.lineno
- dd.moduleName = extra[0]
-
- # Check for duplicates in the data list.
- if dd in self.dataList():
- warnings.warn(_("A module with the name %s has already been defined.") % dd.moduleName)
-
- return dd
-
- def dataList(self):
- return self.deviceList
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py b/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py
deleted file mode 100644
index 9f462fdff7..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-
-class FC3_DeviceProbe(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.deviceprobe = kwargs.get("deviceprobe", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.deviceprobe != "":
- retval += "deviceprobe %s\n" % self.deviceprobe
-
- return retval
-
- def parse(self, args):
- self.deviceprobe = " ".join(args)
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py b/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py
deleted file mode 100644
index 6a12d58ec2..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_DisplayMode(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.displayMode = kwargs.get("displayMode", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.displayMode is None:
- return retval
-
- if self.displayMode == DISPLAY_MODE_CMDLINE:
- retval += "cmdline\n"
- elif self.displayMode == DISPLAY_MODE_GRAPHICAL:
- retval += "# Use graphical install\ngraphical\n"
- elif self.displayMode == DISPLAY_MODE_TEXT:
- retval += "# Use text mode install\ntext\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 0:
- raise KickstartParseError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % self.currentCmd)
-
- if self.currentCmd == "cmdline":
- self.displayMode = DISPLAY_MODE_CMDLINE
- elif self.currentCmd == "graphical":
- self.displayMode = DISPLAY_MODE_GRAPHICAL
- elif self.currentCmd == "text":
- self.displayMode = DISPLAY_MODE_TEXT
-
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py b/scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py
deleted file mode 100644
index 993575a041..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-# Peter Jones <pjones@redhat.com>
-#
-# Copyright 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_DmRaidData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
-
- self.name = kwargs.get("name", "")
- self.devices = kwargs.get("devices", [])
- self.dmset = kwargs.get("dmset", None)
-
- def __eq__(self, y):
- return self.name == y.name and self.devices == y.devices
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "dmraid --name=%s" % self.name
-
- for dev in self.devices:
- retval += " --dev=\"%s\"" % dev
-
- return retval + "\n"
-
-class FC6_DmRaid(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=60, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.dmraids = kwargs.get("dmraids", [])
-
- def __str__(self):
- retval = ""
- for dm in self.dmraids:
- retval += dm.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--name", dest="name", action="store", type="string",
- required=1)
- op.add_option("--dev", dest="devices", action="append", type="string",
- required=1)
- return op
-
- def parse(self, args):
- dm = FC6_DmRaidData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- dm.name = dm.name.split('/')[-1]
- self._setToObj(self.op, opts, dm)
- dm.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if dm in self.dataList():
- warnings.warn(_("A DM RAID device with the name %s and devices %s has already been defined.") % (dm.name, dm.devices))
-
- return dm
-
- def dataList(self):
- return self.dmraids
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py b/scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py
deleted file mode 100644
index 82a58c0e28..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py
+++ /dev/null
@@ -1,184 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_DriverDiskData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
-
- self.partition = kwargs.get("partition", "")
- self.source = kwargs.get("source", "")
- self.type = kwargs.get("type", "")
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.partition:
- retval += "%s" % self.partition
-
- if hasattr(self, "type") and self.type:
- retval += " --type=%s" % self.type
- elif self.source:
- retval += "--source=%s" % self.source
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "driverdisk %s\n" % self._getArgsAsStr()
- return retval
-
-class FC4_DriverDiskData(FC3_DriverDiskData):
- removedKeywords = FC3_DriverDiskData.removedKeywords
- removedAttrs = FC3_DriverDiskData.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_DriverDiskData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.biospart = kwargs.get("biospart", "")
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.partition:
- retval += "%s" % self.partition
-
- if hasattr(self, "type") and self.type:
- retval += " --type=%s" % self.type
- elif self.source:
- retval += "--source=%s" % self.source
- elif self.biospart:
- retval += "--biospart=%s" % self.biospart
-
- return retval
-
-class F12_DriverDiskData(FC4_DriverDiskData):
- removedKeywords = FC4_DriverDiskData.removedKeywords + ["type"]
- removedAttrs = FC4_DriverDiskData.removedAttrs + ["type"]
-
- def __init__(self, *args, **kwargs):
- FC4_DriverDiskData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
-F14_DriverDiskData = F12_DriverDiskData
-
-class FC3_DriverDisk(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.driverdiskList = kwargs.get("driverdiskList", [])
-
- def __str__(self):
- retval = ""
- for dd in self.driverdiskList:
- retval += dd.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--source")
- op.add_option("--type")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one partition may be specified for driverdisk command."))
-
- if len(extra) == 1 and opts.source:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --source and partition may be specified for driverdisk command."))
-
- if not extra and not opts.source:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --source or partition must be specified for driverdisk command."))
-
- ddd = self.handler.DriverDiskData()
- self._setToObj(self.op, opts, ddd)
- ddd.lineno = self.lineno
- if len(extra) == 1:
- ddd.partition = extra[0]
-
- return ddd
-
- def dataList(self):
- return self.driverdiskList
-
-class FC4_DriverDisk(FC3_DriverDisk):
- removedKeywords = FC3_DriverDisk.removedKeywords
- removedAttrs = FC3_DriverDisk.removedKeywords
-
- def _getParser(self):
- op = FC3_DriverDisk._getParser(self)
- op.add_option("--biospart")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one partition may be specified for driverdisk command."))
-
- if len(extra) == 1 and opts.source:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --source and partition may be specified for driverdisk command."))
- elif len(extra) == 1 and opts.biospart:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biospart and partition may be specified for driverdisk command."))
- elif opts.source and opts.biospart:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biospart and --source may be specified for driverdisk command."))
-
- if not extra and not opts.source and not opts.biospart:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --source, --biospart, or partition must be specified for driverdisk command."))
-
- ddd = self.handler.DriverDiskData()
- self._setToObj(self.op, opts, ddd)
- ddd.lineno = self.lineno
- if len(extra) == 1:
- ddd.partition = extra[0]
-
- return ddd
-
-class F12_DriverDisk(FC4_DriverDisk):
- removedKeywords = FC4_DriverDisk.removedKeywords
- removedAttrs = FC4_DriverDisk.removedKeywords
-
- def _getParser(self):
- op = FC4_DriverDisk._getParser(self)
- op.add_option("--type", deprecated=1)
- return op
-
-class F14_DriverDisk(F12_DriverDisk):
- removedKeywords = F12_DriverDisk.removedKeywords
- removedAttrs = F12_DriverDisk.removedKeywords
-
- def _getParser(self):
- op = F12_DriverDisk._getParser(self)
- op.remove_option("--type")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py b/scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py
deleted file mode 100644
index 33208499b3..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# Hans de Goede <hdegoede@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F12_FcoeData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.nic = kwargs.get("nic", None)
-
- def __eq__(self, y):
- return self.nic == y.nic
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.nic:
- retval += " --nic=%s" % self.nic
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "fcoe%s\n" % self._getArgsAsStr()
- return retval
-
-class F13_FcoeData(F12_FcoeData):
- removedKeywords = F12_FcoeData.removedKeywords
- removedAttrs = F12_FcoeData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F12_FcoeData.__init__(self, *args, **kwargs)
- self.dcb = kwargs.get("dcb", False)
-
- def _getArgsAsStr(self):
- retval = F12_FcoeData._getArgsAsStr(self)
-
- if self.dcb:
- retval += " --dcb"
-
- return retval
-
-class F12_Fcoe(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=71, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.fcoe = kwargs.get("fcoe", [])
-
- def __str__(self):
- retval = ""
- for fcoe in self.fcoe:
- retval += fcoe.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--nic", dest="nic", required=1)
- return op
-
- def parse(self, args):
- zd = self.handler.FcoeData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) > 0:
- mapping = {"command": "fcoe", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(command)s command: %(options)s") % mapping)
-
- self._setToObj(self.op, opts, zd)
- zd.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if zd in self.dataList():
- warnings.warn(_("A FCOE device with the name %s has already been defined.") % zd.nic)
-
- return zd
-
- def dataList(self):
- return self.fcoe
-
-class F13_Fcoe(F12_Fcoe):
- removedKeywords = F12_Fcoe.removedKeywords
- removedAttrs = F12_Fcoe.removedAttrs
-
- def _getParser(self):
- op = F12_Fcoe._getParser(self)
- op.add_option("--dcb", dest="dcb", action="store_true", default=False)
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py b/scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py
deleted file mode 100644
index 24a01bd610..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py
+++ /dev/null
@@ -1,193 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Firewall(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.enabled = kwargs.get("enabled", None)
- self.ports = kwargs.get("ports", [])
- self.trusts = kwargs.get("trusts", [])
-
- def __str__(self):
- extra = []
- filteredPorts = []
-
- retval = KickstartCommand.__str__(self)
-
- if self.enabled is None:
- return retval
-
- if self.enabled:
- # It's possible we have words in the ports list instead of
- # port:proto (s-c-kickstart may do this). So, filter those
- # out into their own list leaving what we expect.
- for port in self.ports:
- if port == "ssh":
- extra.append(" --ssh")
- elif port == "telnet":
- extra.append(" --telnet")
- elif port == "smtp":
- extra.append(" --smtp")
- elif port == "http":
- extra.append(" --http")
- elif port == "ftp":
- extra.append(" --ftp")
- else:
- filteredPorts.append(port)
-
- # All the port:proto strings go into a comma-separated list.
- portstr = ",".join(filteredPorts)
- if len(portstr) > 0:
- portstr = " --port=" + portstr
- else:
- portstr = ""
-
- extrastr = "".join(extra)
- truststr = ",".join(self.trusts)
-
- if len(truststr) > 0:
- truststr = " --trust=" + truststr
-
- # The output port list consists only of port:proto for
- # everything that we don't recognize, and special options for
- # those that we do.
- retval += "# Firewall configuration\nfirewall --enabled%s%s%s\n" % (extrastr, portstr, truststr)
- else:
- retval += "# Firewall configuration\nfirewall --disabled\n"
-
- return retval
-
- def _getParser(self):
- def firewall_port_cb (option, opt_str, value, parser):
- for p in value.split(","):
- p = p.strip()
- if p.find(":") == -1:
- p = "%s:tcp" % p
- parser.values.ensure_value(option.dest, []).append(p)
-
- op = KSOptionParser(mapping={"ssh":["22:tcp"], "telnet":["23:tcp"],
- "smtp":["25:tcp"], "http":["80:tcp", "443:tcp"],
- "ftp":["21:tcp"]})
-
- op.add_option("--disable", "--disabled", dest="enabled",
- action="store_false")
- op.add_option("--enable", "--enabled", dest="enabled",
- action="store_true", default=True)
- op.add_option("--ftp", "--http", "--smtp", "--ssh", "--telnet",
- dest="ports", action="map_extend")
- op.add_option("--high", deprecated=1)
- op.add_option("--medium", deprecated=1)
- op.add_option("--port", dest="ports", action="callback",
- callback=firewall_port_cb, nargs=1, type="string")
- op.add_option("--trust", dest="trusts", action="append")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 0:
- mapping = {"command": "firewall", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(command)s command: %(options)s") % mapping)
-
- self._setToSelf(self.op, opts)
- return self
-
-class F9_Firewall(FC3_Firewall):
- removedKeywords = FC3_Firewall.removedKeywords
- removedAttrs = FC3_Firewall.removedAttrs
-
- def _getParser(self):
- op = FC3_Firewall._getParser(self)
- op.remove_option("--high")
- op.remove_option("--medium")
- return op
-
-class F10_Firewall(F9_Firewall):
- removedKeywords = F9_Firewall.removedKeywords
- removedAttrs = F9_Firewall.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F9_Firewall.__init__(self, writePriority, *args, **kwargs)
- self.services = kwargs.get("services", [])
-
- def __str__(self):
- if self.enabled is None:
- return ""
-
- retval = F9_Firewall.__str__(self)
- if self.enabled:
- retval = retval.strip()
-
- svcstr = ",".join(self.services)
- if len(svcstr) > 0:
- svcstr = " --service=" + svcstr
- else:
- svcstr = ""
-
- return retval + "%s\n" % svcstr
- else:
- return retval
-
- def _getParser(self):
- def service_cb (option, opt_str, value, parser):
- # python2.4 does not support action="append_const" that we were
- # using for these options. Instead, we have to fake it by
- # appending whatever the option string is to the service list.
- if not value:
- parser.values.ensure_value(option.dest, []).append(opt_str[2:])
- return
-
- for p in value.split(","):
- p = p.strip()
- parser.values.ensure_value(option.dest, []).append(p)
-
- op = F9_Firewall._getParser(self)
- op.add_option("--service", dest="services", action="callback",
- callback=service_cb, nargs=1, type="string")
- op.add_option("--ftp", dest="services", action="callback",
- callback=service_cb)
- op.add_option("--http", dest="services", action="callback",
- callback=service_cb)
- op.add_option("--smtp", dest="services", action="callback",
- callback=service_cb)
- op.add_option("--ssh", dest="services", action="callback",
- callback=service_cb)
- op.add_option("--telnet", deprecated=1)
- return op
-
-class F14_Firewall(F10_Firewall):
- removedKeywords = F10_Firewall.removedKeywords + ["telnet"]
- removedAttrs = F10_Firewall.removedAttrs + ["telnet"]
-
- def _getParser(self):
- op = F10_Firewall._getParser(self)
- op.remove_option("--telnet")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py b/scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py
deleted file mode 100644
index 05c0ac11c6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.options import *
-
-class FC3_Firstboot(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.firstboot = kwargs.get("firstboot", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.firstboot is None:
- return retval
-
- if self.firstboot == FIRSTBOOT_SKIP:
- retval += "firstboot --disable\n"
- elif self.firstboot == FIRSTBOOT_DEFAULT:
- retval += "# Run the Setup Agent on first boot\nfirstboot --enable\n"
- elif self.firstboot == FIRSTBOOT_RECONFIG:
- retval += "# Run the Setup Agent on first boot\nfirstboot --reconfig\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--disable", "--disabled", dest="firstboot",
- action="store_const", const=FIRSTBOOT_SKIP)
- op.add_option("--enable", "--enabled", dest="firstboot",
- action="store_const", const=FIRSTBOOT_DEFAULT)
- op.add_option("--reconfig", dest="firstboot", action="store_const",
- const=FIRSTBOOT_RECONFIG)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self.firstboot = opts.firstboot
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/group.py b/scripts/lib/mic/3rdparty/pykickstart/commands/group.py
deleted file mode 100644
index 80ba5bdca6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/group.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F12_GroupData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.name = kwargs.get("name", "")
- self.gid = kwargs.get("gid", None)
-
- def __eq__(self, y):
- return self.name == y.name
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "group"
-
- if self.name:
- retval += " --name=%s" % self.name
- if self.gid:
- retval += " --gid=%s" % self.gid
-
- return retval + "\n"
-
-class F12_Group(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.groupList = kwargs.get("groupList", [])
-
- def __str__(self):
- retval = ""
- for user in self.groupList:
- retval += user.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--name", required=1)
- op.add_option("--gid", type="int")
- return op
-
- def parse(self, args):
- gd = self.handler.GroupData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToObj(self.op, opts, gd)
- gd.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if gd in self.dataList():
- warnings.warn(_("A group with the name %s has already been defined.") % gd.name)
-
- return gd
-
- def dataList(self):
- return self.groupList
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py b/scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py
deleted file mode 100644
index 676d080836..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_IgnoreDisk(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.ignoredisk = kwargs.get("ignoredisk", [])
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if len(self.ignoredisk) > 0:
- retval += "ignoredisk --drives=%s\n" % ",".join(self.ignoredisk)
-
- return retval
-
- def _getParser(self):
- def drive_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = KSOptionParser()
- op.add_option("--drives", dest="ignoredisk", action="callback",
- callback=drive_cb, nargs=1, type="string", required=1)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- return self
-
-class F8_IgnoreDisk(FC3_IgnoreDisk):
- removedKeywords = FC3_IgnoreDisk.removedKeywords
- removedAttrs = FC3_IgnoreDisk.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_IgnoreDisk.__init__(self, writePriority, *args, **kwargs)
-
- self.onlyuse = kwargs.get("onlyuse", [])
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if len(self.ignoredisk) > 0:
- retval += "ignoredisk --drives=%s\n" % ",".join(self.ignoredisk)
- elif len(self.onlyuse) > 0:
- retval += "ignoredisk --only-use=%s\n" % ",".join(self.onlyuse)
-
- return retval
-
- def parse(self, args, errorCheck=True):
- retval = FC3_IgnoreDisk.parse(self, args)
-
- if errorCheck:
- if (len(self.ignoredisk) == 0 and len(self.onlyuse) == 0) or (len(self.ignoredisk) > 0 and (len(self.onlyuse) > 0)):
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --drives or --only-use must be specified for ignoredisk command."))
-
- return retval
-
- def _getParser(self):
- def drive_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = FC3_IgnoreDisk._getParser(self)
- op.add_option("--drives", dest="ignoredisk", action="callback",
- callback=drive_cb, nargs=1, type="string")
- op.add_option("--only-use", dest="onlyuse", action="callback",
- callback=drive_cb, nargs=1, type="string")
- return op
-
-class RHEL6_IgnoreDisk(F8_IgnoreDisk):
- removedKeywords = F8_IgnoreDisk.removedKeywords
- removedAttrs = F8_IgnoreDisk.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F8_IgnoreDisk.__init__(self, writePriority, *args, **kwargs)
-
- self.interactive = kwargs.get("interactive", False)
- if self.interactive:
- self.ignoredisk = []
-
- def __str__(self):
- retval = F8_IgnoreDisk.__str__(self)
-
- if self.interactive:
- retval = "ignoredisk --interactive\n"
-
- return retval
-
- def parse(self, args):
- retval = F8_IgnoreDisk.parse(self, args, errorCheck=False)
-
- howmany = 0
- if len(self.ignoredisk) > 0:
- howmany += 1
- if len(self.onlyuse) > 0:
- howmany += 1
- if self.interactive:
- howmany += 1
- if howmany != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --drives , --only-use , or --interactive must be specified for ignoredisk command."))
-
- return retval
-
- def _getParser(self):
- op = F8_IgnoreDisk._getParser(self)
- op.add_option("--interactive", dest="interactive", action="store_true",
- default=False)
- return op
-
-F14_IgnoreDisk = RHEL6_IgnoreDisk
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py b/scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py
deleted file mode 100644
index fa3dc025b1..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Interactive(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.interactive = kwargs.get("interactive", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.interactive:
- retval += "# Use interactive kickstart installation method\ninteractive\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "interactive")
-
- self.interactive = True
- return self
-
-class F14_Interactive(DeprecatedCommand):
- def __init__(self):
- DeprecatedCommand.__init__(self)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py b/scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py
deleted file mode 100644
index da5a544e86..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-# Peter Jones <pjones@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_IscsiData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.ipaddr = kwargs.get("ipaddr", "")
- self.port = kwargs.get("port", "3260")
- self.target = kwargs.get("target", "")
- self.user = kwargs.get("user", None)
- self.password = kwargs.get("password", None)
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.target != "":
- retval += " --target=%s" % self.target
- if self.ipaddr != "":
- retval += " --ipaddr=%s" % self.ipaddr
- if self.port != "3260":
- retval += " --port=%s" % self.port
- if self.user is not None:
- retval += " --user=%s" % self.user
- if self.password is not None:
- retval += " --password=%s" % self.password
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "iscsi%s\n" % self._getArgsAsStr()
- return retval
-
-class F10_IscsiData(FC6_IscsiData):
- removedKeywords = FC6_IscsiData.removedKeywords
- removedAttrs = FC6_IscsiData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC6_IscsiData.__init__(self, *args, **kwargs)
- self.user_in = kwargs.get("user_in", None)
- self.password_in = kwargs.get("password_in", None)
-
- def _getArgsAsStr(self):
- retval = FC6_IscsiData._getArgsAsStr(self)
-
- if self.user_in is not None:
- retval += " --reverse-user=%s" % self.user_in
- if self.password_in is not None:
- retval += " --reverse-password=%s" % self.password_in
-
- return retval
-
-class FC6_Iscsi(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=71, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.iscsi = kwargs.get("iscsi", [])
-
- def __str__(self):
- retval = ""
- for iscsi in self.iscsi:
- retval += iscsi.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--target", dest="target", action="store", type="string")
- op.add_option("--ipaddr", dest="ipaddr", action="store", type="string",
- required=1)
- op.add_option("--port", dest="port", action="store", type="string")
- op.add_option("--user", dest="user", action="store", type="string")
- op.add_option("--password", dest="password", action="store",
- type="string")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 0:
- mapping = {"command": "iscsi", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(command)s command: %(options)s") % mapping)
-
- dd = self.handler.IscsiData()
- self._setToObj(self.op, opts, dd)
- dd.lineno = self.lineno
- return dd
-
- def dataList(self):
- return self.iscsi
-
-class F10_Iscsi(FC6_Iscsi):
- removedKeywords = FC6_Iscsi.removedKeywords
- removedAttrs = FC6_Iscsi.removedAttrs
-
- def _getParser(self):
- op = FC6_Iscsi._getParser(self)
- op.add_option("--reverse-user", dest="user_in", action="store",
- type="string")
- op.add_option("--reverse-password", dest="password_in", action="store",
- type="string")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py b/scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py
deleted file mode 100644
index a87d0637d6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-# Peter Jones <pjones@redhat.com>
-#
-# Copyright 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_IscsiName(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=70, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.iscsiname = kwargs.get("iscsiname", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.iscsiname != "":
- retval += "iscsiname %s\n" % self.iscsiname
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s requires one argument") % "iscsiname")
- self.iscsiname = extra[0]
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/key.py b/scripts/lib/mic/3rdparty/pykickstart/commands/key.py
deleted file mode 100644
index c20c4231f6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/key.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class RHEL5_Key(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.key = kwargs.get("key", "")
- self.skip = kwargs.get("skip", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.key == KS_INSTKEY_SKIP:
- retval += "key --skip\n"
- elif self.key != "":
- retval += "key %s\n" % self.key
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--skip", action="store_true", default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
-
- if self.skip:
- self.key = KS_INSTKEY_SKIP
- elif len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s requires one argument") % "key")
- else:
- self.key = extra[0]
-
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py b/scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py
deleted file mode 100644
index babc2acd4c..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Keyboard(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.keyboard = kwargs.get("keyboard", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.keyboard != "":
- retval += "# System keyboard\nkeyboard %s\n" % self.keyboard
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s requires one argument") % "keyboard")
-
- self.keyboard = extra[0]
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/lang.py b/scripts/lib/mic/3rdparty/pykickstart/commands/lang.py
deleted file mode 100644
index cf5e46cda7..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/lang.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Lang(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.lang = kwargs.get("lang", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.lang != "":
- retval += "# System language\nlang %s\n" % self.lang
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s requires one argument") % "lang")
-
- self.lang = extra[0]
- return self
-
- def apply(self, instroot="/"):
- if self.lang == "": return
- f = open(instroot + "/etc/sysconfig/i18n", "w+")
- f.write("LANG=\"%s\"\n" %(self.lang,))
- f.close()
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py b/scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py
deleted file mode 100644
index 73a9e537a9..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-class FC3_LangSupport(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.deflang = kwargs.get("deflang", "")
- self.supported = kwargs.get("supported", [])
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.deflang:
- retval += "langsupport --default=%s" % self.deflang
-
- if self.supported:
- retval += " %s" % " ".join(self.supported)
-
- return retval + "\n"
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--default", dest="deflang", default="en_US.UTF-8")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- self.supported = extra
- return self
-
-class FC5_LangSupport(DeprecatedCommand):
- def __init__(self):
- DeprecatedCommand.__init__(self)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py b/scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py
deleted file mode 100644
index 92b3f930b6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_LiloCheck(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.check = kwargs.get("check", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.check:
- retval += "lilocheck\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "lilocheck")
-
- self.check = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/logging.py b/scripts/lib/mic/3rdparty/pykickstart/commands/logging.py
deleted file mode 100644
index 698561994d..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/logging.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007, 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_Logging(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.host = kwargs.get("host", "")
- self.level = kwargs.get("level", "info")
- self.port = kwargs.get("port", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
- retval += "# Installation logging level\nlogging --level=%s" % self.level
-
- if self.host != "":
- retval += " --host=%s" % self.host
-
- if self.port != "":
- retval += " --port=%s" % self.port
-
- return retval + "\n"
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--host")
- op.add_option("--level", type="choice", default="info",
- choices=["debug", "info", "warning", "error", "critical"])
- op.add_option("--port")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if opts.port and not opts.host:
- raise KickstartParseError, formatErrorMsg(self.lineno, msg=_("Can't specify --port without --host."))
-
- self._setToSelf(self.op, opts)
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py b/scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py
deleted file mode 100644
index c1b9cc3a61..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py
+++ /dev/null
@@ -1,304 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_LogVolData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.fstype = kwargs.get("fstype", "")
- self.grow = kwargs.get("grow", False)
- self.maxSizeMB = kwargs.get("maxSizeMB", 0)
- self.name = kwargs.get("name", "")
- self.format = kwargs.get("format", True)
- self.percent = kwargs.get("percent", 0)
- self.recommended = kwargs.get("recommended", False)
- self.size = kwargs.get("size", None)
- self.preexist = kwargs.get("preexist", False)
- self.vgname = kwargs.get("vgname", "")
- self.mountpoint = kwargs.get("mountpoint", "")
-
- def __eq__(self, y):
- return self.vgname == y.vgname and self.name == y.name
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.fstype != "":
- retval += " --fstype=\"%s\"" % self.fstype
- if self.grow:
- retval += " --grow"
- if self.maxSizeMB > 0:
- retval += " --maxsize=%d" % self.maxSizeMB
- if not self.format:
- retval += " --noformat"
- if self.percent > 0:
- retval += " --percent=%d" % self.percent
- if self.recommended:
- retval += " --recommended"
- if self.size > 0:
- retval += " --size=%d" % self.size
- if self.preexist:
- retval += " --useexisting"
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "logvol %s %s --name=%s --vgname=%s\n" % (self.mountpoint, self._getArgsAsStr(), self.name, self.vgname)
- return retval
-
-class FC4_LogVolData(FC3_LogVolData):
- removedKeywords = FC3_LogVolData.removedKeywords
- removedAttrs = FC3_LogVolData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC3_LogVolData.__init__(self, *args, **kwargs)
- self.bytesPerInode = kwargs.get("bytesPerInode", 4096)
- self.fsopts = kwargs.get("fsopts", "")
-
- def _getArgsAsStr(self):
- retval = FC3_LogVolData._getArgsAsStr(self)
-
- if hasattr(self, "bytesPerInode") and self.bytesPerInode != 0:
- retval += " --bytes-per-inode=%d" % self.bytesPerInode
- if self.fsopts != "":
- retval += " --fsoptions=\"%s\"" % self.fsopts
-
- return retval
-
-class RHEL5_LogVolData(FC4_LogVolData):
- removedKeywords = FC4_LogVolData.removedKeywords
- removedAttrs = FC4_LogVolData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC4_LogVolData.__init__(self, *args, **kwargs)
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- def _getArgsAsStr(self):
- retval = FC4_LogVolData._getArgsAsStr(self)
-
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\"" % self.passphrase
-
- return retval
-
-class F9_LogVolData(FC4_LogVolData):
- removedKeywords = FC4_LogVolData.removedKeywords + ["bytesPerInode"]
- removedAttrs = FC4_LogVolData.removedAttrs + ["bytesPerInode"]
-
- def __init__(self, *args, **kwargs):
- FC4_LogVolData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.fsopts = kwargs.get("fsopts", "")
- self.fsprofile = kwargs.get("fsprofile", "")
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- def _getArgsAsStr(self):
- retval = FC4_LogVolData._getArgsAsStr(self)
-
- if self.fsprofile != "":
- retval += " --fsprofile=\"%s\"" % self.fsprofile
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\"" % self.passphrase
-
- return retval
-
-class F12_LogVolData(F9_LogVolData):
- removedKeywords = F9_LogVolData.removedKeywords
- removedAttrs = F9_LogVolData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F9_LogVolData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.escrowcert = kwargs.get("escrowcert", "")
- self.backuppassphrase = kwargs.get("backuppassphrase", False)
-
- def _getArgsAsStr(self):
- retval = F9_LogVolData._getArgsAsStr(self)
-
- if self.encrypted and self.escrowcert != "":
- retval += " --escrowcert=\"%s\"" % self.escrowcert
-
- if self.backuppassphrase:
- retval += " --backuppassphrase"
-
- return retval
-
-F14_LogVolData = F12_LogVolData
-
-class F15_LogVolData(F14_LogVolData):
- removedKeywords = F14_LogVolData.removedKeywords
- removedAttrs = F14_LogVolData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F14_LogVolData.__init__(self, *args, **kwargs)
- self.label = kwargs.get("label", "")
-
- def _getArgsAsStr(self):
- retval = F14_LogVolData._getArgsAsStr(self)
-
- if self.label != "":
- retval += " --label=\"%s\"" % self.label
-
- return retval
-
-class FC3_LogVol(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=133, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.lvList = kwargs.get("lvList", [])
-
- def __str__(self):
- retval = ""
-
- for part in self.lvList:
- retval += part.__str__()
-
- return retval
-
- def _getParser(self):
- def lv_cb (option, opt_str, value, parser):
- parser.values.format = False
- parser.values.preexist = True
-
- op = KSOptionParser()
- op.add_option("--fstype", dest="fstype")
- op.add_option("--grow", dest="grow", action="store_true",
- default=False)
- op.add_option("--maxsize", dest="maxSizeMB", action="store", type="int",
- nargs=1)
- op.add_option("--name", dest="name", required=1)
- op.add_option("--noformat", action="callback", callback=lv_cb,
- dest="format", default=True, nargs=0)
- op.add_option("--percent", dest="percent", action="store", type="int",
- nargs=1)
- op.add_option("--recommended", dest="recommended", action="store_true",
- default=False)
- op.add_option("--size", dest="size", action="store", type="int",
- nargs=1)
- op.add_option("--useexisting", dest="preexist", action="store_true",
- default=False)
- op.add_option("--vgname", dest="vgname", required=1)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) == 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "logvol")
-
- lvd = self.handler.LogVolData()
- self._setToObj(self.op, opts, lvd)
- lvd.lineno = self.lineno
- lvd.mountpoint=extra[0]
-
- # Check for duplicates in the data list.
- if lvd in self.dataList():
- warnings.warn(_("A logical volume with the name %s has already been defined in volume group %s.") % (lvd.device, lvd.vgname))
-
- return lvd
-
- def dataList(self):
- return self.lvList
-
-class FC4_LogVol(FC3_LogVol):
- removedKeywords = FC3_LogVol.removedKeywords
- removedAttrs = FC3_LogVol.removedAttrs
-
- def _getParser(self):
- op = FC3_LogVol._getParser(self)
- op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store",
- type="int", nargs=1)
- op.add_option("--fsoptions", dest="fsopts")
- return op
-
-class RHEL5_LogVol(FC4_LogVol):
- removedKeywords = FC4_LogVol.removedKeywords
- removedAttrs = FC4_LogVol.removedAttrs
-
- def _getParser(self):
- op = FC4_LogVol._getParser(self)
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
-class F9_LogVol(FC4_LogVol):
- removedKeywords = FC4_LogVol.removedKeywords
- removedAttrs = FC4_LogVol.removedAttrs
-
- def _getParser(self):
- op = FC4_LogVol._getParser(self)
- op.add_option("--bytes-per-inode", deprecated=1)
- op.add_option("--fsprofile", dest="fsprofile", action="store",
- type="string", nargs=1)
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
-class F12_LogVol(F9_LogVol):
- removedKeywords = F9_LogVol.removedKeywords
- removedAttrs = F9_LogVol.removedAttrs
-
- def _getParser(self):
- op = F9_LogVol._getParser(self)
- op.add_option("--escrowcert")
- op.add_option("--backuppassphrase", action="store_true", default=False)
- return op
-
-class F14_LogVol(F12_LogVol):
- removedKeywords = F12_LogVol.removedKeywords
- removedAttrs = F12_LogVol.removedAttrs
-
- def _getParser(self):
- op = F12_LogVol._getParser(self)
- op.remove_option("--bytes-per-inode")
- return op
-
-class F15_LogVol(F14_LogVol):
- removedKeywords = F14_LogVol.removedKeywords
- removedAttrs = F14_LogVol.removedAttrs
-
- def _getParser(self):
- op = F14_LogVol._getParser(self)
- op.add_option("--label")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py b/scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py
deleted file mode 100644
index 388823a839..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC4_MediaCheck(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.mediacheck = kwargs.get("mediacheck", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
- if self.mediacheck:
- retval += "mediacheck\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "mediacheck")
-
- self.mediacheck = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/method.py b/scripts/lib/mic/3rdparty/pykickstart/commands/method.py
deleted file mode 100644
index e21064acda..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/method.py
+++ /dev/null
@@ -1,186 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007, 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Method(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.method = kwargs.get("method", "")
-
- # Set all these attributes so calls to this command's __call__
- # method can set them. However we don't want to provide them as
- # arguments to __init__ because method is special.
- self.biospart = None
- self.partition = None
- self.server = None
- self.dir = None
- self.url = None
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.method == "cdrom":
- retval += "# Use CDROM installation media\ncdrom\n"
- elif self.method == "harddrive":
- msg = "# Use hard drive installation media\nharddrive --dir=%s" % self.dir
-
- if self.biospart is not None:
- retval += msg + " --biospart=%s\n" % self.biospart
- else:
- retval += msg + " --partition=%s\n" % self.partition
- elif self.method == "nfs":
- retval += "# Use NFS installation media\nnfs --server=%s --dir=%s\n" % (self.server, self.dir)
- elif self.method == "url":
- retval += "# Use network installation\nurl --url=\"%s\"\n" % self.url
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
-
- # method = "cdrom" falls through to the return
- if self.currentCmd == "harddrive":
- op.add_option("--biospart", dest="biospart")
- op.add_option("--partition", dest="partition")
- op.add_option("--dir", dest="dir", required=1)
- elif self.currentCmd == "nfs":
- op.add_option("--server", dest="server", required=1)
- op.add_option("--dir", dest="dir", required=1)
- elif self.currentCmd == "url":
- op.add_option("--url", dest="url", required=1)
-
- return op
-
- def parse(self, args):
- self.method = self.currentCmd
-
- op = self._getParser()
- (opts, extra) = op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(op, opts)
-
- if self.currentCmd == "harddrive":
- if self.biospart is None and self.partition is None or \
- self.biospart is not None and self.partition is not None:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of biospart or partition options must be specified."))
-
- return self
-
-class FC6_Method(FC3_Method):
- removedKeywords = FC3_Method.removedKeywords
- removedAttrs = FC3_Method.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_Method.__init__(self, writePriority, *args, **kwargs)
-
- # Same reason for this attribute as the comment in FC3_Method.
- self.opts = None
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.method == "cdrom":
- retval += "# Use CDROM installation media\ncdrom\n"
- elif self.method == "harddrive":
- msg = "# Use hard drive installation media\nharddrive --dir=%s" % self.dir
-
- if self.biospart is not None:
- retval += msg + " --biospart=%s\n" % self.biospart
- else:
- retval += msg + " --partition=%s\n" % self.partition
- elif self.method == "nfs":
- retval += "# Use NFS installation media\nnfs --server=%s --dir=%s" % (self.server, self.dir)
- if self.opts is not None:
- retval += " --opts=\"%s\"" % self.opts
- retval += "\n"
- elif self.method == "url":
- retval += "# Use network installation\nurl --url=\"%s\"\n" % self.url
-
- return retval
-
- def _getParser(self):
- op = FC3_Method._getParser(self)
-
- if self.currentCmd == "nfs":
- op.add_option("--opts", dest="opts")
-
- return op
-
-class F13_Method(FC6_Method):
- removedKeywords = FC6_Method.removedKeywords
- removedAttrs = FC6_Method.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC6_Method.__init__(self, *args, **kwargs)
-
- # And same as all the other __init__ methods.
- self.proxy = ""
-
- def __str__(self):
- retval = FC6_Method.__str__(self)
-
- if self.method == "url" and self.proxy:
- retval = retval.strip()
- retval += " --proxy=\"%s\"\n" % self.proxy
-
- return retval
-
- def _getParser(self):
- op = FC6_Method._getParser(self)
-
- if self.currentCmd == "url":
- op.add_option("--proxy")
-
- return op
-
-class F14_Method(F13_Method):
- removedKeywords = F13_Method.removedKeywords
- removedAttrs = F13_Method.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F13_Method.__init__(self, *args, **kwargs)
-
- self.noverifyssl = False
-
- def __str__(self):
- retval = F13_Method.__str__(self)
-
- if self.method == "url" and self.noverifyssl:
- retval = retval.strip()
- retval += " --noverifyssl\n"
-
- return retval
-
- def _getParser(self):
- op = F13_Method._getParser(self)
-
- if self.currentCmd == "url":
- op.add_option("--noverifyssl", action="store_true", default=False)
-
- return op
-
-RHEL6_Method = F14_Method
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py b/scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py
deleted file mode 100644
index 8c8c2c4fc9..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Monitor(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.hsync = kwargs.get("hsync", "")
- self.monitor = kwargs.get("monitor", "")
- self.vsync = kwargs.get("vsync", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
- retval += "monitor"
-
- if self.hsync != "":
- retval += " --hsync=%s" % self.hsync
- if self.monitor != "":
- retval += " --monitor=\"%s\"" % self.monitor
- if self.vsync != "":
- retval += " --vsync=%s" % self.vsync
-
- if retval != "monitor":
- return retval + "\n"
- else:
- return ""
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--hsync")
- op.add_option("--monitor")
- op.add_option("--vsync")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if extra:
- mapping = {"cmd": "monitor", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(cmd)s command: %(options)s") % mapping)
-
- self._setToSelf(self.op, opts)
- return self
-
-class FC6_Monitor(FC3_Monitor):
- removedKeywords = FC3_Monitor.removedKeywords
- removedAttrs = FC3_Monitor.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_Monitor.__init__(self, writePriority, *args, **kwargs)
- self.probe = kwargs.get("probe", True)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
- retval += "monitor"
-
- if self.hsync != "":
- retval += " --hsync=%s" % self.hsync
- if self.monitor != "":
- retval += " --monitor=\"%s\"" % self.monitor
- if not self.probe:
- retval += " --noprobe"
- if self.vsync != "":
- retval += " --vsync=%s" % self.vsync
-
- if retval != "monitor":
- return retval + "\n"
- else:
- return ""
-
- def _getParser(self):
- op = FC3_Monitor._getParser(self)
- op.add_option("--noprobe", dest="probe", action="store_false",
- default=True)
- return op
-
-class F10_Monitor(DeprecatedCommand):
- def __init__(self):
- DeprecatedCommand.__init__(self)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py b/scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py
deleted file mode 100644
index c643bcedc3..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class RHEL3_Mouse(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.device = kwargs.get("device", "")
- self.emulthree = kwargs.get("emulthree", False)
- self.mouse = kwargs.get("mouse", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- opts = ""
- if self.device:
- opts += "--device=%s " % self.device
- if self.emulthree:
- opts += "--emulthree "
-
- if self.mouse:
- retval += "# System mouse\nmouse %s%s\n" % (opts, self.mouse)
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--device", dest="device", default="")
- op.add_option("--emulthree", dest="emulthree", default=False, action="store_true")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s requires one argument") % "mouse")
-
- self.mouse = extra[0]
- return self
-
-class FC3_Mouse(DeprecatedCommand):
- def __init__(self):
- DeprecatedCommand.__init__(self)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py b/scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py
deleted file mode 100644
index 84ba755e68..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-# Peter Jones <pjones@redhat.com>
-#
-# Copyright 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_MpPathData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.mpdev = kwargs.get("mpdev", "")
- self.device = kwargs.get("device", "")
- self.rule = kwargs.get("rule", "")
-
- def __str__(self):
- return " --device=%s --rule=\"%s\"" % (self.device, self.rule)
-
-class FC6_MultiPathData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.name = kwargs.get("name", "")
- self.paths = kwargs.get("paths", [])
-
- def __str__(self):
- retval = BaseData.__str__(self)
-
- for path in self.paths:
- retval += "multipath --mpdev=%s %s\n" % (self.name, path.__str__())
-
- return retval
-
-class FC6_MultiPath(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=50, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.mpaths = kwargs.get("mpaths", [])
-
- def __str__(self):
- retval = ""
- for mpath in self.mpaths:
- retval += mpath.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--name", dest="name", action="store", type="string",
- required=1)
- op.add_option("--device", dest="device", action="store", type="string",
- required=1)
- op.add_option("--rule", dest="rule", action="store", type="string",
- required=1)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- dd = FC6_MpPathData()
- self._setToObj(self.op, opts, dd)
- dd.lineno = self.lineno
- dd.mpdev = dd.mpdev.split('/')[-1]
-
- parent = None
- for x in range(0, len(self.mpaths)):
- mpath = self.mpaths[x]
- for path in mpath.paths:
- if path.device == dd.device:
- mapping = {"device": path.device, "multipathdev": path.mpdev}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Device '%(device)s' is already used in multipath '%(multipathdev)s'") % mapping)
- if mpath.name == dd.mpdev:
- parent = x
-
- if parent is None:
- mpath = FC6_MultiPathData()
- return mpath
- else:
- mpath = self.mpaths[parent]
-
- return dd
-
- def dataList(self):
- return self.mpaths
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/network.py b/scripts/lib/mic/3rdparty/pykickstart/commands/network.py
deleted file mode 100644
index 9b67f92831..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/network.py
+++ /dev/null
@@ -1,363 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_NetworkData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.bootProto = kwargs.get("bootProto", BOOTPROTO_DHCP)
- self.dhcpclass = kwargs.get("dhcpclass", "")
- self.device = kwargs.get("device", "")
- self.essid = kwargs.get("essid", "")
- self.ethtool = kwargs.get("ethtool", "")
- self.gateway = kwargs.get("gateway", "")
- self.hostname = kwargs.get("hostname", "")
- self.ip = kwargs.get("ip", "")
- self.mtu = kwargs.get("mtu", "")
- self.nameserver = kwargs.get("nameserver", "")
- self.netmask = kwargs.get("netmask", "")
- self.nodns = kwargs.get("nodns", False)
- self.onboot = kwargs.get("onboot", True)
- self.wepkey = kwargs.get("wepkey", "")
-
- def __eq__(self, y):
- return self.device and self.device == y.device
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.bootProto != "":
- retval += " --bootproto=%s" % self.bootProto
- if self.dhcpclass != "":
- retval += " --dhcpclass=%s" % self.dhcpclass
- if self.device != "":
- retval += " --device=%s" % self.device
- if self.essid != "":
- retval += " --essid=\"%s\"" % self.essid
- if self.ethtool != "":
- retval += " --ethtool=\"%s\"" % self.ethtool
- if self.gateway != "":
- retval += " --gateway=%s" % self.gateway
- if self.hostname != "":
- retval += " --hostname=%s" % self.hostname
- if self.ip != "":
- retval += " --ip=%s" % self.ip
- if self.mtu != "":
- retval += " --mtu=%s" % self.mtu
- if self.nameserver != "":
- retval += " --nameserver=%s" % self.nameserver
- if self.netmask != "":
- retval += " --netmask=%s" % self.netmask
- if self.nodns:
- retval += " --nodns"
- if not self.onboot:
- retval += " --onboot=off"
- if self.wepkey != "":
- retval += " --wepkey=%s" % self.wepkey
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "network %s\n" % self._getArgsAsStr()
- return retval
-
-class FC4_NetworkData(FC3_NetworkData):
- removedKeywords = FC3_NetworkData.removedKeywords
- removedAttrs = FC3_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC3_NetworkData.__init__(self, *args, **kwargs)
- self.notksdevice = kwargs.get("notksdevice", False)
-
- def _getArgsAsStr(self):
- retval = FC3_NetworkData._getArgsAsStr(self)
-
- if self.notksdevice:
- retval += " --notksdevice"
-
- return retval
-
-class FC6_NetworkData(FC4_NetworkData):
- removedKeywords = FC4_NetworkData.removedKeywords
- removedAttrs = FC4_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC4_NetworkData.__init__(self, *args, **kwargs)
- self.noipv4 = kwargs.get("noipv4", False)
- self.noipv6 = kwargs.get("noipv6", False)
-
- def _getArgsAsStr(self):
- retval = FC4_NetworkData._getArgsAsStr(self)
-
- if self.noipv4:
- retval += " --noipv4"
- if self.noipv6:
- retval += " --noipv6"
-
- return retval
-
-class F8_NetworkData(FC6_NetworkData):
- removedKeywords = FC6_NetworkData.removedKeywords
- removedAttrs = FC6_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC6_NetworkData.__init__(self, *args, **kwargs)
- self.ipv6 = kwargs.get("ipv6", "")
-
- def _getArgsAsStr(self):
- retval = FC6_NetworkData._getArgsAsStr(self)
-
- if self.ipv6 != "":
- retval += " --ipv6" % self.ipv6
-
- return retval
-
-class F16_NetworkData(F8_NetworkData):
- removedKeywords = F8_NetworkData.removedKeywords
- removedAttrs = F8_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F8_NetworkData.__init__(self, *args, **kwargs)
- self.activate = kwargs.get("activate", False)
- self.nodefroute = kwargs.get("nodefroute", False)
- self.wpakey = kwargs.get("wpakey", "")
-
- def _getArgsAsStr(self):
- retval = F8_NetworkData._getArgsAsStr(self)
-
- if self.activate:
- retval += " --activate"
- if self.nodefroute:
- retval += " --nodefroute"
- if self.wpakey != "":
- retval += "--wpakey=%s" % self.wpakey
-
- return retval
-
-class RHEL4_NetworkData(FC3_NetworkData):
- removedKeywords = FC3_NetworkData.removedKeywords
- removedAttrs = FC3_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC3_NetworkData.__init__(self, *args, **kwargs)
- self.notksdevice = kwargs.get("notksdevice", False)
-
- def _getArgsAsStr(self):
- retval = FC3_NetworkData._getArgsAsStr(self)
-
- if self.notksdevice:
- retval += " --notksdevice"
-
- return retval
-
-class RHEL6_NetworkData(F8_NetworkData):
- removedKeywords = F8_NetworkData.removedKeywords
- removedAttrs = F8_NetworkData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F8_NetworkData.__init__(self, *args, **kwargs)
- self.activate = kwargs.get("activate", False)
- self.nodefroute = kwargs.get("nodefroute", False)
-
- def _getArgsAsStr(self):
- retval = F8_NetworkData._getArgsAsStr(self)
-
- if self.activate:
- retval += " --activate"
- if self.nodefroute:
- retval += " --nodefroute"
-
- return retval
-
-class FC3_Network(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.bootprotoList = [BOOTPROTO_DHCP, BOOTPROTO_BOOTP,
- BOOTPROTO_STATIC]
-
- self.op = self._getParser()
-
- self.network = kwargs.get("network", [])
-
- def __str__(self):
- retval = ""
-
- for nic in self.network:
- retval += nic.__str__()
-
- if retval != "":
- return "# Network information\n" + retval
- else:
- return ""
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--bootproto", dest="bootProto",
- default=BOOTPROTO_DHCP,
- choices=self.bootprotoList)
- op.add_option("--dhcpclass", dest="dhcpclass")
- op.add_option("--device", dest="device")
- op.add_option("--essid", dest="essid")
- op.add_option("--ethtool", dest="ethtool")
- op.add_option("--gateway", dest="gateway")
- op.add_option("--hostname", dest="hostname")
- op.add_option("--ip", dest="ip")
- op.add_option("--mtu", dest="mtu")
- op.add_option("--nameserver", dest="nameserver")
- op.add_option("--netmask", dest="netmask")
- op.add_option("--nodns", dest="nodns", action="store_true",
- default=False)
- op.add_option("--onboot", dest="onboot", action="store",
- type="ksboolean")
- op.add_option("--wepkey", dest="wepkey")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- nd = self.handler.NetworkData()
- self._setToObj(self.op, opts, nd)
- nd.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if nd in self.dataList():
- warnings.warn(_("A network device with the name %s has already been defined.") % nd.device)
-
- return nd
-
- def dataList(self):
- return self.network
-
-class FC4_Network(FC3_Network):
- removedKeywords = FC3_Network.removedKeywords
- removedAttrs = FC3_Network.removedAttrs
-
- def _getParser(self):
- op = FC3_Network._getParser(self)
- op.add_option("--notksdevice", dest="notksdevice", action="store_true",
- default=False)
- return op
-
-class FC6_Network(FC4_Network):
- removedKeywords = FC4_Network.removedKeywords
- removedAttrs = FC4_Network.removedAttrs
-
- def _getParser(self):
- op = FC4_Network._getParser(self)
- op.add_option("--noipv4", dest="noipv4", action="store_true",
- default=False)
- op.add_option("--noipv6", dest="noipv6", action="store_true",
- default=False)
- return op
-
-class F8_Network(FC6_Network):
- removedKeywords = FC6_Network.removedKeywords
- removedAttrs = FC6_Network.removedAttrs
-
- def _getParser(self):
- op = FC6_Network._getParser(self)
- op.add_option("--ipv6", dest="ipv6")
- return op
-
-class F9_Network(F8_Network):
- removedKeywords = F8_Network.removedKeywords
- removedAttrs = F8_Network.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F8_Network.__init__(self, writePriority, *args, **kwargs)
- self.bootprotoList.append(BOOTPROTO_QUERY)
-
- def _getParser(self):
- op = F8_Network._getParser(self)
- op.add_option("--bootproto", dest="bootProto",
- default=BOOTPROTO_DHCP,
- choices=self.bootprotoList)
- return op
-
-class F16_Network(F9_Network):
- removedKeywords = F9_Network.removedKeywords
- removedAttrs = F9_Network.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F9_Network.__init__(self, writePriority, *args, **kwargs)
- self.bootprotoList.append(BOOTPROTO_IBFT)
-
- def _getParser(self):
- op = F9_Network._getParser(self)
- op.add_option("--activate", dest="activate", action="store_true",
- default=False)
- op.add_option("--nodefroute", dest="nodefroute", action="store_true",
- default=False)
- op.add_option("--wpakey", dest="wpakey", action="store", default="")
- return op
-
-class RHEL4_Network(FC3_Network):
- removedKeywords = FC3_Network.removedKeywords
- removedAttrs = FC3_Network.removedAttrs
-
- def _getParser(self):
- op = FC3_Network._getParser(self)
- op.add_option("--notksdevice", dest="notksdevice", action="store_true",
- default=False)
- return op
-
-class RHEL5_Network(FC6_Network):
- removedKeywords = FC6_Network.removedKeywords
- removedAttrs = FC6_Network.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC6_Network.__init__(self, writePriority, *args, **kwargs)
- self.bootprotoList.append(BOOTPROTO_QUERY)
-
- def _getParser(self):
- op = FC6_Network._getParser(self)
- op.add_option("--bootproto", dest="bootProto",
- default=BOOTPROTO_DHCP,
- choices=self.bootprotoList)
- return op
-
-class RHEL6_Network(F9_Network):
- removedKeywords = F9_Network.removedKeywords
- removedAttrs = F9_Network.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F9_Network.__init__(self, writePriority, *args, **kwargs)
- self.bootprotoList.append(BOOTPROTO_IBFT)
-
- def _getParser(self):
- op = F9_Network._getParser(self)
- op.add_option("--activate", dest="activate", action="store_true",
- default=False)
- op.add_option("--nodefroute", dest="nodefroute", action="store_true",
- default=False)
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/raid.py b/scripts/lib/mic/3rdparty/pykickstart/commands/raid.py
deleted file mode 100644
index 0f4c92a107..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/raid.py
+++ /dev/null
@@ -1,365 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008, 2011 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_RaidData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.device = kwargs.get("device", None)
- self.fstype = kwargs.get("fstype", "")
- self.level = kwargs.get("level", "")
- self.format = kwargs.get("format", True)
- self.spares = kwargs.get("spares", 0)
- self.preexist = kwargs.get("preexist", False)
- self.mountpoint = kwargs.get("mountpoint", "")
- self.members = kwargs.get("members", [])
-
- def __eq__(self, y):
- return self.device == y.device
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.device != "":
- retval += " --device=%s" % self.device
- if self.fstype != "":
- retval += " --fstype=\"%s\"" % self.fstype
- if self.level != "":
- retval += " --level=%s" % self.level
- if not self.format:
- retval += " --noformat"
- if self.spares != 0:
- retval += " --spares=%d" % self.spares
- if self.preexist:
- retval += " --useexisting"
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "raid %s%s %s\n" % (self.mountpoint, self._getArgsAsStr(),
- " ".join(self.members))
- return retval
-
-class FC4_RaidData(FC3_RaidData):
- removedKeywords = FC3_RaidData.removedKeywords
- removedAttrs = FC3_RaidData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC3_RaidData.__init__(self, *args, **kwargs)
- self.fsopts = kwargs.get("fsopts", "")
-
- def _getArgsAsStr(self):
- retval = FC3_RaidData._getArgsAsStr(self)
-
- if self.fsopts != "":
- retval += " --fsoptions=\"%s\"" % self.fsopts
-
- return retval
-
-class FC5_RaidData(FC4_RaidData):
- removedKeywords = FC4_RaidData.removedKeywords
- removedAttrs = FC4_RaidData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC4_RaidData.__init__(self, *args, **kwargs)
- self.bytesPerInode = kwargs.get("bytesPerInode", 4096)
-
- def _getArgsAsStr(self):
- retval = FC4_RaidData._getArgsAsStr(self)
-
- if hasattr(self, "bytesPerInode") and self.bytesPerInode != 0:
- retval += " --bytes-per-inode=%d" % self.bytesPerInode
-
- return retval
-
-class RHEL5_RaidData(FC5_RaidData):
- removedKeywords = FC5_RaidData.removedKeywords
- removedAttrs = FC5_RaidData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC5_RaidData.__init__(self, *args, **kwargs)
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- def _getArgsAsStr(self):
- retval = FC5_RaidData._getArgsAsStr(self)
-
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\"" % self.passphrase
-
- return retval
-
-F7_RaidData = FC5_RaidData
-
-class F9_RaidData(FC5_RaidData):
- removedKeywords = FC5_RaidData.removedKeywords + ["bytesPerInode"]
- removedAttrs = FC5_RaidData.removedAttrs + ["bytesPerInode"]
-
- def __init__(self, *args, **kwargs):
- FC5_RaidData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.fsprofile = kwargs.get("fsprofile", "")
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- def _getArgsAsStr(self):
- retval = FC5_RaidData._getArgsAsStr(self)
-
- if self.fsprofile != "":
- retval += " --fsprofile=\"%s\"" % self.fsprofile
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\"" % self.passphrase
-
- return retval
-
-class F12_RaidData(F9_RaidData):
- removedKeywords = F9_RaidData.removedKeywords
- removedAttrs = F9_RaidData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F9_RaidData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.escrowcert = kwargs.get("escrowcert", "")
- self.backuppassphrase = kwargs.get("backuppassphrase", False)
-
- def _getArgsAsStr(self):
- retval = F9_RaidData._getArgsAsStr(self)
-
- if self.encrypted and self.escrowcert != "":
- retval += " --escrowcert=\"%s\"" % self.escrowcert
-
- if self.backuppassphrase:
- retval += " --backuppassphrase"
- return retval
-
-F13_RaidData = F12_RaidData
-
-F14_RaidData = F13_RaidData
-
-class F15_RaidData(F14_RaidData):
- removedKeywords = F14_RaidData.removedKeywords
- removedAttrs = F14_RaidData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F14_RaidData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.label = kwargs.get("label", "")
-
- def _getArgsAsStr(self):
- retval = F14_RaidData._getArgsAsStr(self)
-
- if self.label != "":
- retval += " --label=%s" % self.label
-
- return retval
-
-class FC3_Raid(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=131, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- # A dict of all the RAID levels we support. This means that if we
- # support more levels in the future, subclasses don't have to
- # duplicate too much.
- self.levelMap = { "RAID0": "RAID0", "0": "RAID0",
- "RAID1": "RAID1", "1": "RAID1",
- "RAID5": "RAID5", "5": "RAID5",
- "RAID6": "RAID6", "6": "RAID6" }
-
- self.raidList = kwargs.get("raidList", [])
-
- def __str__(self):
- retval = ""
-
- for raid in self.raidList:
- retval += raid.__str__()
-
- return retval
-
- def _getParser(self):
- def raid_cb (option, opt_str, value, parser):
- parser.values.format = False
- parser.values.preexist = True
-
- def device_cb (option, opt_str, value, parser):
- if value[0:2] == "md":
- parser.values.ensure_value(option.dest, value[2:])
- else:
- parser.values.ensure_value(option.dest, value)
-
- def level_cb (option, opt_str, value, parser):
- if self.levelMap.has_key(value):
- parser.values.ensure_value(option.dest, self.levelMap[value])
-
- op = KSOptionParser()
- op.add_option("--device", action="callback", callback=device_cb,
- dest="device", type="string", nargs=1, required=1)
- op.add_option("--fstype", dest="fstype")
- op.add_option("--level", dest="level", action="callback",
- callback=level_cb, type="string", nargs=1)
- op.add_option("--noformat", action="callback", callback=raid_cb,
- dest="format", default=True, nargs=0)
- op.add_option("--spares", dest="spares", action="store", type="int",
- nargs=1, default=0)
- op.add_option("--useexisting", dest="preexist", action="store_true",
- default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) == 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "raid")
- if len(extra) == 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Partitions required for %s") % "raid")
-
- rd = self.handler.RaidData()
- self._setToObj(self.op, opts, rd)
- rd.lineno = self.lineno
-
- # --device can't just take an int in the callback above, because it
- # could be specificed as "mdX", which causes optparse to error when
- # it runs int().
- rd.device = int(rd.device)
- rd.mountpoint = extra[0]
- rd.members = extra[1:]
-
- # Check for duplicates in the data list.
- if rd in self.dataList():
- warnings.warn(_("A RAID device with the name %s has already been defined.") % rd.device)
-
- return rd
-
- def dataList(self):
- return self.raidList
-
-class FC4_Raid(FC3_Raid):
- removedKeywords = FC3_Raid.removedKeywords
- removedAttrs = FC3_Raid.removedAttrs
-
- def _getParser(self):
- op = FC3_Raid._getParser(self)
- op.add_option("--fsoptions", dest="fsopts")
- return op
-
-class FC5_Raid(FC4_Raid):
- removedKeywords = FC4_Raid.removedKeywords
- removedAttrs = FC4_Raid.removedAttrs
-
- def _getParser(self):
- op = FC4_Raid._getParser(self)
- op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store",
- type="int", nargs=1)
- return op
-
-class RHEL5_Raid(FC5_Raid):
- removedKeywords = FC5_Raid.removedKeywords
- removedAttrs = FC5_Raid.removedAttrs
-
- def __init__(self, writePriority=131, *args, **kwargs):
- FC5_Raid.__init__(self, writePriority, *args, **kwargs)
-
- self.levelMap.update({"RAID10": "RAID10", "10": "RAID10"})
-
- def _getParser(self):
- op = FC5_Raid._getParser(self)
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
-class F7_Raid(FC5_Raid):
- removedKeywords = FC5_Raid.removedKeywords
- removedAttrs = FC5_Raid.removedAttrs
-
- def __init__(self, writePriority=131, *args, **kwargs):
- FC5_Raid.__init__(self, writePriority, *args, **kwargs)
-
- self.levelMap.update({"RAID10": "RAID10", "10": "RAID10"})
-
-class F9_Raid(F7_Raid):
- removedKeywords = F7_Raid.removedKeywords
- removedAttrs = F7_Raid.removedAttrs
-
- def _getParser(self):
- op = F7_Raid._getParser(self)
- op.add_option("--bytes-per-inode", deprecated=1)
- op.add_option("--fsprofile")
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
-class F12_Raid(F9_Raid):
- removedKeywords = F9_Raid.removedKeywords
- removedAttrs = F9_Raid.removedAttrs
-
- def _getParser(self):
- op = F9_Raid._getParser(self)
- op.add_option("--escrowcert")
- op.add_option("--backuppassphrase", action="store_true", default=False)
- return op
-
-class F13_Raid(F12_Raid):
- removedKeywords = F12_Raid.removedKeywords
- removedAttrs = F12_Raid.removedAttrs
-
- def __init__(self, writePriority=131, *args, **kwargs):
- F12_Raid.__init__(self, writePriority, *args, **kwargs)
-
- self.levelMap.update({"RAID4": "RAID4", "4": "RAID4"})
-
-class F14_Raid(F13_Raid):
- removedKeywords = F13_Raid.removedKeywords
- removedAttrs = F13_Raid.removedAttrs
-
- def _getParser(self):
- op = F13_Raid._getParser(self)
- op.remove_option("--bytes-per-inode")
- return op
-
-class F15_Raid(F14_Raid):
- removedKeywords = F14_Raid.removedKeywords
- removedAttrs = F14_Raid.removedAttrs
-
- def _getParser(self):
- op = F14_Raid._getParser(self)
- op.add_option("--label")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py b/scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py
deleted file mode 100644
index 391af14c22..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-class FC3_Reboot(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.action = kwargs.get("action", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.action == KS_REBOOT:
- retval += "# Reboot after installation\nreboot\n"
- elif self.action == KS_SHUTDOWN:
- retval += "# Shutdown after installation\nshutdown\n"
-
- return retval
-
- def parse(self, args):
- if self.currentCmd == "reboot":
- self.action = KS_REBOOT
- else:
- self.action = KS_SHUTDOWN
-
- return self
-
-class FC6_Reboot(FC3_Reboot):
- removedKeywords = FC3_Reboot.removedKeywords
- removedAttrs = FC3_Reboot.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_Reboot.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.eject = kwargs.get("eject", False)
-
- def __str__(self):
- retval = FC3_Reboot.__str__(self).rstrip()
-
- if self.eject:
- retval += " --eject"
-
- return retval + "\n"
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--eject", dest="eject", action="store_true",
- default=False)
- return op
-
- def parse(self, args):
- FC3_Reboot.parse(self, args)
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/repo.py b/scripts/lib/mic/3rdparty/pykickstart/commands/repo.py
deleted file mode 100644
index 543ef947c1..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/repo.py
+++ /dev/null
@@ -1,249 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007, 2008, 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_RepoData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.baseurl = kwargs.get("baseurl", "")
- self.mirrorlist = kwargs.get("mirrorlist", None)
- self.name = kwargs.get("name", "")
-
- def __eq__(self, y):
- return self.name == y.name
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.baseurl:
- retval += "--baseurl=%s" % self.baseurl
- elif self.mirrorlist:
- retval += "--mirrorlist=%s" % self.mirrorlist
-
- return retval
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "repo --name=\"%s\" %s\n" % (self.name, self._getArgsAsStr())
- return retval
-
-class F8_RepoData(FC6_RepoData):
- removedKeywords = FC6_RepoData.removedKeywords
- removedAttrs = FC6_RepoData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC6_RepoData.__init__(self, *args, **kwargs)
- self.cost = kwargs.get("cost", None)
- self.includepkgs = kwargs.get("includepkgs", [])
- self.excludepkgs = kwargs.get("excludepkgs", [])
-
- def _getArgsAsStr(self):
- retval = FC6_RepoData._getArgsAsStr(self)
-
- if self.cost:
- retval += " --cost=%s" % self.cost
- if self.includepkgs:
- retval += " --includepkgs=\"%s\"" % ",".join(self.includepkgs)
- if self.excludepkgs:
- retval += " --excludepkgs=\"%s\"" % ",".join(self.excludepkgs)
-
- return retval
-
-class F11_RepoData(F8_RepoData):
- removedKeywords = F8_RepoData.removedKeywords
- removedAttrs = F8_RepoData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F8_RepoData.__init__(self, *args, **kwargs)
- self.ignoregroups = kwargs.get("ignoregroups", None)
-
- def _getArgsAsStr(self):
- retval = F8_RepoData._getArgsAsStr(self)
-
- if self.ignoregroups:
- retval += " --ignoregroups=true"
- return retval
-
-class F13_RepoData(F11_RepoData):
- removedKeywords = F11_RepoData.removedKeywords
- removedAttrs = F11_RepoData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F11_RepoData.__init__(self, *args, **kwargs)
- self.proxy = kwargs.get("proxy", "")
-
- def _getArgsAsStr(self):
- retval = F11_RepoData._getArgsAsStr(self)
-
- if self.proxy:
- retval += " --proxy=\"%s\"" % self.proxy
-
- return retval
-
-class F14_RepoData(F13_RepoData):
- removedKeywords = F13_RepoData.removedKeywords
- removedAttrs = F13_RepoData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F13_RepoData.__init__(self, *args, **kwargs)
- self.noverifyssl = kwargs.get("noverifyssl", False)
-
- def _getArgsAsStr(self):
- retval = F13_RepoData._getArgsAsStr(self)
-
- if self.noverifyssl:
- retval += " --noverifyssl"
-
- return retval
-
-RHEL6_RepoData = F14_RepoData
-
-F15_RepoData = F14_RepoData
-
-class FC6_Repo(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- urlRequired = True
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.repoList = kwargs.get("repoList", [])
-
- def __str__(self):
- retval = ""
- for repo in self.repoList:
- retval += repo.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--name", dest="name", required=1)
- op.add_option("--baseurl")
- op.add_option("--mirrorlist")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 0:
- mapping = {"command": "repo", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(command)s command: %(options)s") % mapping)
-
- # This is lame, but I can't think of a better way to make sure only
- # one of these two is specified.
- if opts.baseurl and opts.mirrorlist:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --baseurl and --mirrorlist may be specified for repo command."))
-
- if self.urlRequired and not opts.baseurl and not opts.mirrorlist:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --baseurl or --mirrorlist must be specified for repo command."))
-
- rd = self.handler.RepoData()
- self._setToObj(self.op, opts, rd)
- rd.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if rd in self.dataList():
- warnings.warn(_("A repo with the name %s has already been defined.") % rd.name)
-
- return rd
-
- def dataList(self):
- return self.repoList
-
-class F8_Repo(FC6_Repo):
- removedKeywords = FC6_Repo.removedKeywords
- removedAttrs = FC6_Repo.removedAttrs
-
- def __str__(self):
- retval = ""
- for repo in self.repoList:
- retval += repo.__str__()
-
- return retval
-
- def _getParser(self):
- def list_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = FC6_Repo._getParser(self)
- op.add_option("--cost", action="store", type="int")
- op.add_option("--excludepkgs", action="callback", callback=list_cb,
- nargs=1, type="string")
- op.add_option("--includepkgs", action="callback", callback=list_cb,
- nargs=1, type="string")
- return op
-
- def methodToRepo(self):
- if not self.handler.method.url:
- raise KickstartError, formatErrorMsg(self.handler.method.lineno, msg=_("Method must be a url to be added to the repo list."))
- reponame = "ks-method-url"
- repourl = self.handler.method.url
- rd = self.handler.RepoData(name=reponame, baseurl=repourl)
- return rd
-
-class F11_Repo(F8_Repo):
- removedKeywords = F8_Repo.removedKeywords
- removedAttrs = F8_Repo.removedAttrs
-
- def _getParser(self):
- op = F8_Repo._getParser(self)
- op.add_option("--ignoregroups", action="store", type="ksboolean")
- return op
-
-class F13_Repo(F11_Repo):
- removedKeywords = F11_Repo.removedKeywords
- removedAttrs = F11_Repo.removedAttrs
-
- def _getParser(self):
- op = F11_Repo._getParser(self)
- op.add_option("--proxy")
- return op
-
-class F14_Repo(F13_Repo):
- removedKeywords = F13_Repo.removedKeywords
- removedAttrs = F13_Repo.removedAttrs
-
- def _getParser(self):
- op = F13_Repo._getParser(self)
- op.add_option("--noverifyssl", action="store_true", default=False)
- return op
-
-RHEL6_Repo = F14_Repo
-
-class F15_Repo(F14_Repo):
- removedKeywords = F14_Repo.removedKeywords
- removedAttrs = F14_Repo.removedAttrs
-
- urlRequired = False
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py b/scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py
deleted file mode 100644
index 1893d4ea49..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Alexander Todorov <atodorov@redhat.com>
-#
-# Copyright 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F10_Rescue(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.rescue = False
- self.nomount = kwargs.get("nomount", False)
- self.romount = kwargs.get("romount", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.rescue:
- retval += "rescue"
-
- if self.nomount:
- retval += " --nomount"
- if self.romount:
- retval += " --romount"
-
- retval = "# Start rescue mode\n%s\n" % retval
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--nomount", dest="nomount", action="store_true", default=False)
- op.add_option("--romount", dest="romount", action="store_true", default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if opts.nomount and opts.romount:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --nomount and --romount may be specified for rescue command."))
-
- self._setToSelf(self.op, opts)
- self.rescue = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py b/scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py
deleted file mode 100644
index e038b4525d..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_RootPw(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.isCrypted = kwargs.get("isCrypted", False)
- self.password = kwargs.get("password", "")
-
- def _getArgsAsStr(self):
- retval = ""
-
- if self.isCrypted:
- retval += " --iscrypted"
-
- return retval
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.password != "":
- retval += "# Root password\nrootpw%s %s\n" % (self._getArgsAsStr(), self.password)
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--iscrypted", dest="isCrypted", action="store_true",
- default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("A single argument is expected for the %s command") % "rootpw")
-
- self.password = extra[0]
- return self
-
-class F8_RootPw(FC3_RootPw):
- removedKeywords = FC3_RootPw.removedKeywords
- removedAttrs = FC3_RootPw.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_RootPw.__init__(self, writePriority, *args, **kwargs)
- self.lock = kwargs.get("lock", False)
-
- def _getArgsAsStr(self):
- retval = FC3_RootPw._getArgsAsStr(self)
-
- if self.lock:
- retval += " --lock"
-
- if not self.isCrypted:
- retval += " --plaintext"
-
- return retval
-
- def _getParser(self):
- op = FC3_RootPw._getParser(self)
- op.add_option("--lock", dest="lock", action="store_true", default=False)
- op.add_option("--plaintext", dest="isCrypted", action="store_false")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py b/scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py
deleted file mode 100644
index 9f8059c76b..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.options import *
-
-class FC3_SELinux(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.selinux = kwargs.get("selinux", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if not retval and self.selinux is None:
- return ""
-
- retval += "# SELinux configuration\n"
-
- if self.selinux == SELINUX_DISABLED:
- retval += "selinux --disabled\n"
- elif self.selinux == SELINUX_ENFORCING:
- retval += "selinux --enforcing\n"
- elif self.selinux == SELINUX_PERMISSIVE:
- retval += "selinux --permissive\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--disabled", dest="selinux", action="store_const",
- const=SELINUX_DISABLED)
- op.add_option("--enforcing", dest="selinux", action="store_const",
- const=SELINUX_ENFORCING)
- op.add_option("--permissive", dest="selinux", action="store_const",
- const=SELINUX_PERMISSIVE)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/services.py b/scripts/lib/mic/3rdparty/pykickstart/commands/services.py
deleted file mode 100644
index 2e0eab8007..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/services.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_Services(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.disabled = kwargs.get("disabled", [])
- self.enabled = kwargs.get("enabled", [])
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
- args = ""
-
- if len(self.disabled) > 0:
- args += " --disabled=\"%s\"" % ",".join(self.disabled)
- if len(self.enabled) > 0:
- args += " --enabled=\"%s\"" % ",".join(self.enabled)
-
- if args != "":
- retval += "# System services\nservices%s\n" % args
-
- return retval
-
- def _getParser(self):
- def services_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d.strip())
-
- op = KSOptionParser()
- op.add_option("--disabled", dest="disabled", action="callback",
- callback=services_cb, nargs=1, type="string")
- op.add_option("--enabled", dest="enabled", action="callback",
- callback=services_cb, nargs=1, type="string")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
-
- if len(self.disabled) == 0 and len(self.enabled) == 0:
- raise KickstartParseError, formatErrorMsg(self.lineno, msg=_("One of --disabled or --enabled must be provided."))
-
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py b/scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py
deleted file mode 100644
index 36d1a8d5ba..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_SkipX(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.skipx = kwargs.get("skipx", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.skipx:
- retval += "# Do not configure the X Window System\nskipx\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "skipx")
-
- self.skipx = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py b/scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py
deleted file mode 100644
index e7867ebfb2..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#
-# Peter Jones <pjones@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F13_SshPwData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.username = kwargs.get("username", None)
- self.isCrypted = kwargs.get("isCrypted", False)
- self.password = kwargs.get("password", "")
- self.lock = kwargs.get("lock", False)
-
- def __eq__(self, y):
- return self.username == y.username
-
- def __str__(self):
- retval = BaseData.__str__(self)
-
- retval += "sshpw"
- retval += self._getArgsAsStr() + '\n'
-
- return retval
-
- def _getArgsAsStr(self):
- retval = ""
-
- retval += " --username=%s" % self.username
- if self.lock:
- retval += " --lock"
- if self.isCrypted:
- retval += " --iscrypted"
- else:
- retval += " --plaintext"
-
- retval += " %s" % self.password
- return retval
-
-class F13_SshPw(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.sshUserList = kwargs.get("sshUserList", [])
-
- def __str__(self):
- retval = ""
- for user in self.sshUserList:
- retval += user.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--username", dest="username", required=True)
- op.add_option("--iscrypted", dest="isCrypted", action="store_true",
- default=False)
- op.add_option("--plaintext", dest="isCrypted", action="store_false")
- op.add_option("--lock", dest="lock", action="store_true", default=False)
- return op
-
- def parse(self, args):
- ud = self.handler.SshPwData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToObj(self.op, opts, ud)
- ud.lineno = self.lineno
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("A single argument is expected for the %s command") % "sshpw")
- ud.password = extra[0]
-
- if ud in self.dataList():
- warnings.warn(_("An ssh user with the name %s has already been defined.") % ud.name)
-
- return ud
-
- def dataList(self):
- return self.sshUserList
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py b/scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py
deleted file mode 100644
index f5441de593..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Timezone(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.isUtc = kwargs.get("isUtc", False)
- self.timezone = kwargs.get("timezone", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.timezone != "":
- if self.isUtc:
- utc = "--utc"
- else:
- utc = ""
-
- retval += "# System timezone\ntimezone %s %s\n" %(utc, self.timezone)
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--utc", dest="isUtc", action="store_true", default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
-
- if len(extra) != 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("A single argument is expected for the %s command") % "timezone")
-
- self.timezone = extra[0]
- return self
-
-class FC6_Timezone(FC3_Timezone):
- removedKeywords = FC3_Timezone.removedKeywords
- removedAttrs = FC3_Timezone.removedAttrs
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.timezone != "":
- if self.isUtc:
- utc = "--isUtc"
- else:
- utc = ""
-
- retval += "# System timezone\ntimezone %s %s\n" %(utc, self.timezone)
-
- return retval
-
- def _getParser(self):
- op = FC3_Timezone._getParser(self)
- op.add_option("--utc", "--isUtc", dest="isUtc", action="store_true", default=False)
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/updates.py b/scripts/lib/mic/3rdparty/pykickstart/commands/updates.py
deleted file mode 100644
index 53ec49f7b8..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/updates.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class F7_Updates(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.url = kwargs.get("url", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.url == "floppy":
- retval += "updates\n"
- elif self.url != "":
- retval += "updates %s\n" % self.url
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 1:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s only takes one argument") % "updates")
- elif len(extra) == 0:
- self.url = "floppy"
- else:
- self.url = extra[0]
-
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py b/scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py
deleted file mode 100644
index a68a82d378..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_Upgrade(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.upgrade = kwargs.get("upgrade", None)
- self.op = self._getParser()
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.upgrade is None:
- return retval
-
- if self.upgrade:
- retval += "# Upgrade existing installation\nupgrade\n"
- else:
- retval += "# Install OS instead of upgrade\ninstall\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "upgrade")
-
- if self.currentCmd == "upgrade":
- self.upgrade = True
- else:
- self.upgrade = False
-
- return self
-
-class F11_Upgrade(FC3_Upgrade):
- removedKeywords = FC3_Upgrade.removedKeywords
- removedAttrs = FC3_Upgrade.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_Upgrade.__init__(self, writePriority, *args, **kwargs)
-
- self.op = self._getParser()
- self.root_device = kwargs.get("root_device", None)
-
- def __str__(self):
- if self.upgrade and (self.root_device is not None):
- retval = KickstartCommand.__str__(self)
- retval += "# Upgrade existing installation\nupgrade --root-device=%s\n" % self.root_device
- else:
- retval = FC3_Upgrade.__str__(self)
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--root-device", dest="root_device")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 0:
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "upgrade")
-
- if (opts.root_device is not None) and (opts.root_device == ""):
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not accept empty parameter %s") % ("upgrade", "--root-device"))
- else:
- self.root_device = opts.root_device
-
- if self.currentCmd == "upgrade":
- self.upgrade = True
- else:
- self.upgrade = False
-
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/user.py b/scripts/lib/mic/3rdparty/pykickstart/commands/user.py
deleted file mode 100644
index 189dc7585f..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/user.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.constants import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC6_UserData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.groups = kwargs.get("groups", [])
- self.homedir = kwargs.get("homedir", "")
- self.isCrypted = kwargs.get("isCrypted", False)
- self.name = kwargs.get("name", "")
- self.password = kwargs.get("password", "")
- self.shell = kwargs.get("shell", "")
- self.uid = kwargs.get("uid", None)
-
- def __eq__(self, y):
- return self.name == y.name
-
- def __str__(self):
- retval = BaseData.__str__(self)
-
- if self.uid != "":
- retval += "user"
- retval += self._getArgsAsStr() + "\n"
-
- return retval
-
- def _getArgsAsStr(self):
- retval = ""
-
- if len(self.groups) > 0:
- retval += " --groups=%s" % ",".join(self.groups)
- if self.homedir:
- retval += " --homedir=%s" % self.homedir
- if self.name:
- retval += " --name=%s" % self.name
- if self.password:
- retval += " --password=%s" % self.password
- if self.isCrypted:
- retval += " --iscrypted"
- if self.shell:
- retval += " --shell=%s" % self.shell
- if self.uid:
- retval += " --uid=%s" % self.uid
-
- return retval
-
-class F8_UserData(FC6_UserData):
- removedKeywords = FC6_UserData.removedKeywords
- removedAttrs = FC6_UserData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC6_UserData.__init__(self, *args, **kwargs)
- self.lock = kwargs.get("lock", False)
-
- def _getArgsAsStr(self):
- retval = FC6_UserData._getArgsAsStr(self)
-
- if self.lock:
- retval += " --lock"
-
- return retval
-
-class F12_UserData(F8_UserData):
- removedKeywords = F8_UserData.removedKeywords
- removedAttrs = F8_UserData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- F8_UserData.__init__(self, *args, **kwargs)
- self.gecos = kwargs.get("gecos", "")
-
- def _getArgsAsStr(self):
- retval = F8_UserData._getArgsAsStr(self)
-
- if self.gecos:
- retval += " --gecos=\"%s\"" % (self.gecos,)
-
- return retval
-
-class FC6_User(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.userList = kwargs.get("userList", [])
-
- def __str__(self):
- retval = ""
- for user in self.userList:
- retval += user.__str__()
-
- return retval
-
- def _getParser(self):
- def groups_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = KSOptionParser()
- op.add_option("--groups", dest="groups", action="callback",
- callback=groups_cb, nargs=1, type="string")
- op.add_option("--homedir")
- op.add_option("--iscrypted", dest="isCrypted", action="store_true",
- default=False)
- op.add_option("--name", required=1)
- op.add_option("--password")
- op.add_option("--shell")
- op.add_option("--uid", type="int")
- return op
-
- def parse(self, args):
- ud = self.handler.UserData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToObj(self.op, opts, ud)
- ud.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if ud in self.dataList():
- warnings.warn(_("A user with the name %s has already been defined.") % ud.name)
-
- return ud
-
- def dataList(self):
- return self.userList
-
-class F8_User(FC6_User):
- removedKeywords = FC6_User.removedKeywords
- removedAttrs = FC6_User.removedAttrs
-
- def _getParser(self):
- op = FC6_User._getParser(self)
- op.add_option("--lock", action="store_true", default=False)
- op.add_option("--plaintext", dest="isCrypted", action="store_false")
- return op
-
-class F12_User(F8_User):
- removedKeywords = F8_User.removedKeywords
- removedAttrs = F8_User.removedAttrs
-
- def _getParser(self):
- op = F8_User._getParser(self)
- op.add_option("--gecos", type="string")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py b/scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py
deleted file mode 100644
index 200ccfba2e..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-class FC3_Vnc(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.enabled = kwargs.get("enabled", False)
- self.password = kwargs.get("password", "")
- self.connect = kwargs.get("connect", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if not self.enabled:
- return retval
-
- retval += "vnc"
-
- if self.connect != "":
- retval += " --connect=%s" % self.connect
- if self.password != "":
- retval += " --password=%s" % self.password
-
- return retval + "\n"
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--connect")
- op.add_option("--password", dest="password")
- return op
-
- def parse(self, args):
- self.enabled = True
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToSelf(self.op, opts)
- return self
-
-class FC6_Vnc(FC3_Vnc):
- removedKeywords = FC3_Vnc.removedKeywords + ["connect"]
- removedAttrs = FC3_Vnc.removedAttrs + ["connect"]
-
- def __init__(self, writePriority=0, host="", port="", *args, **kwargs):
- FC3_Vnc.__init__(self, writePriority, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.host = kwargs.get("host", "")
- self.port = kwargs.get("port", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if not self.enabled:
- return retval
-
- retval += "vnc"
-
- if self.host != "":
- retval += " --host=%s" % self.host
-
- if self.port != "":
- retval += " --port=%s" % self.port
- if self.password != "":
- retval += " --password=%s" % self.password
-
- return retval + "\n"
-
- def _getParser(self):
- def connect_cb (option, opt_str, value, parser):
- cargs = value.split(":")
- parser.values.ensure_value("host", cargs[0])
-
- if len(cargs) > 1:
- parser.values.ensure_value("port", cargs[1])
-
- op = FC3_Vnc._getParser(self)
- op.add_option("--connect", action="callback", callback=connect_cb,
- nargs=1, type="string")
- op.add_option("--host", dest="host")
- op.add_option("--port", dest="port")
- return op
-
-class F9_Vnc(FC6_Vnc):
- removedKeywords = FC6_Vnc.removedKeywords
- removedAttrs = FC6_Vnc.removedAttrs
-
- def _getParser(self):
- op = FC6_Vnc._getParser(self)
- op.remove_option("--connect")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py b/scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py
deleted file mode 100644
index 255c47f0ae..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_VolGroupData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.format = kwargs.get("format", True)
- self.pesize = kwargs.get("pesize", 32768)
- self.preexist = kwargs.get("preexist", False)
- self.vgname = kwargs.get("vgname", "")
- self.physvols = kwargs.get("physvols", [])
-
- def __eq__(self, y):
- return self.vgname == y.vgname
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "volgroup %s" % self.vgname
-
- if not self.format:
- retval += " --noformat"
- if self.pesize != 0:
- retval += " --pesize=%d" % self.pesize
- if self.preexist:
- retval += " --useexisting"
-
- return retval + " " + " ".join(self.physvols) + "\n"
-
-class FC3_VolGroup(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=132, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.vgList = kwargs.get("vgList", [])
-
- def __str__(self):
- retval = ""
- for vg in self.vgList:
- retval += vg.__str__()
-
- return retval
-
- def _getParser(self):
- # Have to be a little more complicated to set two values.
- def vg_cb (option, opt_str, value, parser):
- parser.values.format = False
- parser.values.preexist = True
-
- op = KSOptionParser()
- op.add_option("--noformat", action="callback", callback=vg_cb,
- dest="format", default=True, nargs=0)
- op.add_option("--pesize", dest="pesize", type="int", nargs=1,
- default=32768)
- op.add_option("--useexisting", dest="preexist", action="store_true",
- default=False)
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- vg = self.handler.VolGroupData()
- self._setToObj(self.op, opts, vg)
- vg.lineno = self.lineno
- vg.vgname = extra[0]
- vg.physvols = extra[1:]
-
- # Check for duplicates in the data list.
- if vg in self.dataList():
- warnings.warn(_("A volgroup with the name %s has already been defined.") % vg.vgname)
-
- return vg
-
- def dataList(self):
- return self.vgList
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py b/scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py
deleted file mode 100644
index 644ee86743..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py
+++ /dev/null
@@ -1,184 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_XConfig(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=0, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.card = kwargs.get("card", "")
- self.defaultdesktop = kwargs.get("defaultdesktop", "")
- self.depth = kwargs.get("depth", 0)
- self.hsync = kwargs.get("hsync", "")
- self.monitor = kwargs.get("monitor", "")
- self.noProbe = kwargs.get("noProbe", False)
- self.resolution = kwargs.get("resolution", "")
- self.server = kwargs.get("server", "")
- self.startX = kwargs.get("startX", False)
- self.videoRam = kwargs.get("videoRam", "")
- self.vsync = kwargs.get("vsync", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.card != "":
- retval += " --card=%s" % self.card
- if self.defaultdesktop != "":
- retval += " --defaultdesktop=%s" % self.defaultdesktop
- if self.depth != 0:
- retval += " --depth=%d" % self.depth
- if self.hsync != "":
- retval += " --hsync=%s" % self.hsync
- if self.monitor != "":
- retval += " --monitor=%s" % self.monitor
- if self.noProbe:
- retval += " --noprobe"
- if self.resolution != "":
- retval += " --resolution=%s" % self.resolution
- if self.server != "":
- retval += " --server=%s" % self.server
- if self.startX:
- retval += " --startxonboot"
- if self.videoRam != "":
- retval += " --videoram=%s" % self.videoRam
- if self.vsync != "":
- retval += " --vsync=%s" % self.vsync
-
- if retval != "":
- retval = "# X Window System configuration information\nxconfig %s\n" % retval
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--card")
- op.add_option("--defaultdesktop")
- op.add_option("--depth", action="store", type="int", nargs=1)
- op.add_option("--hsync")
- op.add_option("--monitor")
- op.add_option("--noprobe", dest="noProbe", action="store_true",
- default=False)
- op.add_option("--resolution")
- op.add_option("--server")
- op.add_option("--startxonboot", dest="startX", action="store_true",
- default=False)
- op.add_option("--videoram", dest="videoRam")
- op.add_option("--vsync")
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- if extra:
- mapping = {"command": "xconfig", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Unexpected arguments to %(command)s command: %(options)s") % mapping)
-
- self._setToSelf(self.op, opts)
- return self
-
-class FC6_XConfig(FC3_XConfig):
- removedKeywords = FC3_XConfig.removedKeywords + ["card", "hsync", "monitor", "noProbe", "vsync"]
- removedAttrs = FC3_XConfig.removedAttrs + ["card", "hsync", "monitor", "noProbe", "vsync"]
-
- def __init__(self, writePriority=0, *args, **kwargs):
- FC3_XConfig.__init__(self, writePriority, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- self.driver = kwargs.get("driver", "")
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if hasattr(self, "driver") and self.driver != "":
- retval += " --driver=%s" % self.driver
- if self.defaultdesktop != "":
- retval += " --defaultdesktop=%s" % self.defaultdesktop
- if self.depth != 0:
- retval += " --depth=%d" % self.depth
- if hasattr(self, "resolution") and self.resolution != "":
- retval += " --resolution=%s" % self.resolution
- if self.startX:
- retval += " --startxonboot"
- if hasattr(self, "videoRam") and self.videoRam != "":
- retval += " --videoram=%s" % self.videoRam
-
- if retval != "":
- retval = "# X Window System configuration information\nxconfig %s\n" % retval
-
- return retval
-
- def _getParser(self):
- op = FC3_XConfig._getParser(self)
- op.add_option("--card", deprecated=1)
- op.add_option("--driver", dest="driver")
- op.add_option("--hsync", deprecated=1)
- op.add_option("--monitor", deprecated=1)
- op.add_option("--noprobe", deprecated=1)
- op.add_option("--vsync", deprecated=1)
- return op
-
-class F9_XConfig(FC6_XConfig):
- removedKeywords = FC6_XConfig.removedKeywords
- removedAttrs = FC6_XConfig.removedAttrs
-
- def _getParser(self):
- op = FC6_XConfig._getParser(self)
- op.remove_option("--card")
- op.remove_option("--hsync")
- op.remove_option("--monitor")
- op.remove_option("--noprobe")
- op.remove_option("--vsync")
- return op
-
-class F10_XConfig(F9_XConfig):
- removedKeywords = F9_XConfig.removedKeywords + ["driver", "resolution", "videoRam"]
- removedAttrs = F9_XConfig.removedAttrs + ["driver", "resolution", "videoRam"]
-
- def __init__(self, writePriority=0, *args, **kwargs):
- F9_XConfig.__init__(self, writePriority, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- def _getParser(self):
- op = F9_XConfig._getParser(self)
- op.add_option("--driver", deprecated=1)
- op.add_option("--depth", deprecated=1)
- op.add_option("--resolution", deprecated=1)
- op.add_option("--videoram", deprecated=1)
- return op
-
-class F14_XConfig(F10_XConfig):
- removedKeywords = F10_XConfig.removedKeywords
- removedAttrs = F10_XConfig.removedAttrs
-
- def _getParser(self):
- op = F10_XConfig._getParser(self)
- op.remove_option("--driver")
- op.remove_option("--depth")
- op.remove_option("--resolution")
- op.remove_option("--videoram")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py b/scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py
deleted file mode 100644
index 79555a9b27..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-import warnings
-
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_ZeroMbr(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=110, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
- self.zerombr = kwargs.get("zerombr", False)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.zerombr:
- retval += "# Clear the Master Boot Record\nzerombr\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 0:
- warnings.warn(_("Ignoring deprecated option on line %s: The zerombr command no longer takes any options. In future releases, this will result in a fatal error from kickstart. Please modify your kickstart file to remove any options.") % self.lineno, DeprecationWarning)
-
- self.zerombr = True
- return self
-
-class F9_ZeroMbr(FC3_ZeroMbr):
- removedKeywords = FC3_ZeroMbr.removedKeywords
- removedAttrs = FC3_ZeroMbr.removedAttrs
-
- def parse(self, args):
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) > 0:
- raise KickstartParseError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "zerombr")
-
- self.zerombr = True
- return self
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py b/scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py
deleted file mode 100644
index 1ed2694c89..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_ZFCPData(BaseData):
- removedKeywords = BaseData.removedKeywords
- removedAttrs = BaseData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- BaseData.__init__(self, *args, **kwargs)
- self.devnum = kwargs.get("devnum", "")
- self.wwpn = kwargs.get("wwpn", "")
- self.fcplun = kwargs.get("fcplun", "")
- self.scsiid = kwargs.get("scsiid", "")
- self.scsilun = kwargs.get("scsilun", "")
-
- def __eq__(self, y):
- return self.devnum == y.devnum and self.wwpn == y.wwpn and \
- self.fcplun == y.fcplun and self.scsiid == y.scsiid and \
- self.scsilun == y.scsilun
-
- def __str__(self):
- retval = BaseData.__str__(self)
- retval += "zfcp"
-
- if self.devnum != "":
- retval += " --devnum=%s" % self.devnum
- if self.wwpn != "":
- retval += " --wwpn=%s" % self.wwpn
- if self.fcplun != "":
- retval += " --fcplun=%s" % self.fcplun
- if hasattr(self, "scsiid") and self.scsiid != "":
- retval += " --scsiid=%s" % self.scsiid
- if hasattr(self, "scsilun") and self.scsilun != "":
- retval += " --scsilun=%s" % self.scsilun
-
- return retval + "\n"
-
-class F12_ZFCPData(FC3_ZFCPData):
- removedKeywords = FC3_ZFCPData.removedKeywords + ["scsiid", "scsilun"]
- removedAttrs = FC3_ZFCPData.removedAttrs + ["scsiid", "scsilun"]
-
- def __init__(self, *args, **kwargs):
- FC3_ZFCPData.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
-F14_ZFCPData = F12_ZFCPData
-
-class FC3_ZFCP(KickstartCommand):
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, writePriority=71, *args, **kwargs):
- KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.op = self._getParser()
-
- self.zfcp = kwargs.get("zfcp", [])
-
- def __str__(self):
- retval = ""
- for zfcp in self.zfcp:
- retval += zfcp.__str__()
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- op.add_option("--devnum", dest="devnum", required=1)
- op.add_option("--fcplun", dest="fcplun", required=1)
- op.add_option("--scsiid", dest="scsiid", required=1)
- op.add_option("--scsilun", dest="scsilun", required=1)
- op.add_option("--wwpn", dest="wwpn", required=1)
- return op
-
- def parse(self, args):
- zd = self.handler.ZFCPData()
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- self._setToObj(self.op, opts, zd)
- zd.lineno = self.lineno
-
- # Check for duplicates in the data list.
- if zd in self.dataList():
- warnings.warn(_("A zfcp with this information has already been defined."))
-
- return zd
-
- def dataList(self):
- return self.zfcp
-
-class F12_ZFCP(FC3_ZFCP):
- removedKeywords = FC3_ZFCP.removedKeywords
- removedAttrs = FC3_ZFCP.removedAttrs + ["scsiid", "scsilun"]
-
- def __init__(self, *args, **kwargs):
- FC3_ZFCP.__init__(self, *args, **kwargs)
- self.deleteRemovedAttrs()
-
- def _getParser(self):
- op = FC3_ZFCP._getParser(self)
- op.add_option("--scsiid", deprecated=1)
- op.add_option("--scsilun", deprecated=1)
- return op
-
-class F14_ZFCP(F12_ZFCP):
- removedKeywords = F12_ZFCP.removedKeywords
- removedAttrs = F12_ZFCP.removedAttrs
-
- def _getParser(self):
- op = F12_ZFCP._getParser(self)
- op.remove_option("--scsiid")
- op.remove_option("--scsilun")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/control.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/control.py
deleted file mode 100644
index d8c8f2b899..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/control.py
+++ /dev/null
@@ -1,1307 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.version import *
-from pykickstart.commands import *
-
-# This map is keyed on kickstart syntax version as provided by
-# pykickstart.version. Within each sub-dict is a mapping from command name
-# to the class that handles it. This is an onto mapping - that is, multiple
-# command names can map to the same class. However, the Handler will ensure
-# that only one instance of each class ever exists.
-commandMap = {
- FC3: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC3_Bootloader,
- "cdrom": method.FC3_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "driverdisk": driverdisk.FC3_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC3_Reboot,
- "harddrive": method.FC3_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC3_LangSupport,
- "lilo": bootloader.FC3_Bootloader,
- "lilocheck": lilocheck.FC3_LiloCheck,
- "logvol": logvol.FC3_LogVol,
- "monitor": monitor.FC3_Monitor,
- "mouse": mouse.FC3_Mouse,
- "network": network.FC3_Network,
- "nfs": method.FC3_Method,
- "part": partition.FC3_Partition,
- "partition": partition.FC3_Partition,
- "poweroff": reboot.FC3_Reboot,
- "raid": raid.FC3_Raid,
- "reboot": reboot.FC3_Reboot,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "shutdown": reboot.FC3_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC3_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC3_Method,
- "vnc": vnc.FC3_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC3_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on fc3
- FC4: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC4_Bootloader,
- "cdrom": method.FC3_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC3_Reboot,
- "harddrive": method.FC3_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC3_LangSupport,
- "logvol": logvol.FC4_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC3_Monitor,
- "mouse": mouse.FC3_Mouse,
- "network": network.FC4_Network,
- "nfs": method.FC3_Method,
- "part": partition.FC4_Partition,
- "partition": partition.FC4_Partition,
- "poweroff": reboot.FC3_Reboot,
- "raid": raid.FC4_Raid,
- "reboot": reboot.FC3_Reboot,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "shutdown": reboot.FC3_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC3_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC3_Method,
- "vnc": vnc.FC3_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC3_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on fc4
- FC5: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC4_Bootloader,
- "cdrom": method.FC3_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC3_Reboot,
- "harddrive": method.FC3_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC5_LangSupport,
- "logvol": logvol.FC4_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC3_Monitor,
- "mouse": mouse.FC3_Mouse,
- "network": network.FC4_Network,
- "nfs": method.FC3_Method,
- "part": partition.FC4_Partition,
- "partition": partition.FC4_Partition,
- "poweroff": reboot.FC3_Reboot,
- "raid": raid.FC5_Raid,
- "reboot": reboot.FC3_Reboot,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "shutdown": reboot.FC3_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC3_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC3_Method,
- "vnc": vnc.FC3_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC3_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on fc5
- FC6: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC4_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.FC6_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC5_LangSupport,
- "logging": logging.FC6_Logging,
- "logvol": logvol.FC4_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC6_Monitor,
- "mouse": mouse.FC3_Mouse,
- "multipath": multipath.FC6_MultiPath,
- "network": network.FC6_Network,
- "nfs": method.FC6_Method,
- "part": partition.FC4_Partition,
- "partition": partition.FC4_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.FC5_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.FC6_Repo,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "user": user.FC6_User,
- "url": method.FC6_Method,
- "vnc": vnc.FC6_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC6_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on fc6
- F7: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC4_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.FC6_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.FC4_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC6_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.FC6_Network,
- "nfs": method.FC6_Method,
- "part": partition.FC4_Partition,
- "partition": partition.FC4_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F7_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.FC6_Repo,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC6_Method,
- "user": user.FC6_User,
- "vnc": vnc.FC6_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC6_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f7
- F8: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F8_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.FC6_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.FC4_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC6_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F8_Network,
- "nfs": method.FC6_Method,
- "part": partition.FC4_Partition,
- "partition": partition.FC4_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F7_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F8_Repo,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC6_Method,
- "user": user.F8_User,
- "vnc": vnc.FC6_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC6_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f8
- F9: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F9_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F8_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.F9_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.FC6_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F9_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC6_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.FC6_Method,
- "part": partition.F9_Partition,
- "partition": partition.F9_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F9_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F8_Repo,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC6_Method,
- "user": user.F8_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F9_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f9
- F10: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F9_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F8_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.F10_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F9_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.FC6_Method,
- "part": partition.F9_Partition,
- "partition": partition.F9_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F9_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F8_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC6_Method,
- "user": user.F8_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F10_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f10
- F11: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F9_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F8_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.F10_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F9_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.FC6_Method,
- "part": partition.F11_Partition,
- "partition": partition.F11_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F9_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F11_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.FC6_Method,
- "user": user.F8_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F10_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f11
- F12: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F12_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F12_DriverDisk,
- "fcoe": fcoe.F12_Fcoe,
- "firewall": firewall.F10_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F12_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.FC6_Method,
- "part": partition.F12_Partition,
- "partition": partition.F12_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F12_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F11_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.FC6_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F10_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F12_ZFCP,
- },
-
- # based on f12
- F13: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F12_Bootloader,
- "cdrom": method.F13_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F12_DriverDisk,
- "fcoe": fcoe.F13_Fcoe,
- "firewall": firewall.F10_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.F13_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F12_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.F13_Method,
- "part": partition.F12_Partition,
- "partition": partition.F12_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F13_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F13_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "sshpw": sshpw.F13_SshPw,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.F13_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F10_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F12_ZFCP,
- },
-
- # based on f13
- F14: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F14_Bootloader,
- "cdrom": method.F14_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F14_DriverDisk,
- "fcoe": fcoe.F13_Fcoe,
- "firewall": firewall.F14_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.F14_Method,
- "ignoredisk": ignoredisk.F14_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "interactive": interactive.F14_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F14_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.F14_Method,
- "part": partition.F14_Partition,
- "partition": partition.F14_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F14_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F14_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "sshpw": sshpw.F13_SshPw,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.F14_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F14_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F14_ZFCP,
- },
-
- # based on f14
- F15: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F15_Bootloader,
- "cdrom": method.F14_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F14_DriverDisk,
- "fcoe": fcoe.F13_Fcoe,
- "firewall": firewall.F14_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.F14_Method,
- "ignoredisk": ignoredisk.F14_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F15_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F9_Network,
- "nfs": method.F14_Method,
- "part": partition.F14_Partition,
- "partition": partition.F14_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F15_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F15_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "sshpw": sshpw.F13_SshPw,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.F14_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F14_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F14_ZFCP,
- },
-
- # based on f15
- F16: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.F15_Bootloader,
- "cdrom": method.F14_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F14_DriverDisk,
- "fcoe": fcoe.F13_Fcoe,
- "firewall": firewall.F14_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.F14_Method,
- "ignoredisk": ignoredisk.F14_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F15_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.F16_Network,
- "nfs": method.F14_Method,
- "part": partition.F14_Partition,
- "partition": partition.F14_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F15_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.F15_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "sshpw": sshpw.F13_SshPw,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.F14_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F14_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F14_ZFCP,
- },
-
- # based on fc1
- RHEL3: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC3_Bootloader,
- "cdrom": method.FC3_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "driverdisk": driverdisk.FC3_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC3_Reboot,
- "harddrive": method.FC3_Method,
- "ignoredisk": ignoredisk.FC3_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC3_LangSupport,
- "lilo": bootloader.FC3_Bootloader,
- "lilocheck": lilocheck.FC3_LiloCheck,
- "logvol": logvol.FC3_LogVol,
- "monitor": monitor.FC3_Monitor,
- "mouse": mouse.RHEL3_Mouse,
- "network": network.FC3_Network,
- "nfs": method.FC3_Method,
- "part": partition.FC3_Partition,
- "partition": partition.FC3_Partition,
- "poweroff": reboot.FC3_Reboot,
- "raid": raid.FC3_Raid,
- "reboot": reboot.FC3_Reboot,
- "rootpw": rootpw.FC3_RootPw,
- "shutdown": reboot.FC3_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC3_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC3_Method,
- "vnc": vnc.FC3_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC3_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- },
-
- # based on fc3
- RHEL4: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.FC3_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.FC3_Bootloader,
- "cdrom": method.FC3_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "driverdisk": driverdisk.FC4_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC3_Reboot,
- "harddrive": method.FC3_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC3_LangSupport,
- "lilo": bootloader.FC3_Bootloader,
- "lilocheck": lilocheck.FC3_LiloCheck,
- "logvol": logvol.FC3_LogVol,
- "monitor": monitor.FC3_Monitor,
- "mouse": mouse.FC3_Mouse,
- "network": network.RHEL4_Network,
- "nfs": method.FC3_Method,
- "part": partition.FC3_Partition,
- "partition": partition.FC3_Partition,
- "poweroff": reboot.FC3_Reboot,
- "raid": raid.FC3_Raid,
- "reboot": reboot.FC3_Reboot,
- "rootpw": rootpw.FC3_RootPw,
- "selinux": selinux.FC3_SELinux,
- "shutdown": reboot.FC3_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC3_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "url": method.FC3_Method,
- "vnc": vnc.FC3_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC3_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on fc6
- RHEL5: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F9_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.RHEL5_Bootloader,
- "cdrom": method.FC6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.FC3_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F12_DriverDisk,
- "firewall": firewall.FC3_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.FC6_Method,
- "ignoredisk": ignoredisk.F8_IgnoreDisk,
- "install": upgrade.FC3_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.FC6_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "key": key.RHEL5_Key,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "langsupport": langsupport.FC5_LangSupport,
- "logging": logging.FC6_Logging,
- "logvol": logvol.RHEL5_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.FC6_Monitor,
- "mouse": mouse.FC3_Mouse,
- "multipath": multipath.FC6_MultiPath,
- "network": network.RHEL5_Network,
- "nfs": method.FC6_Method,
- "part": partition.RHEL5_Partition,
- "partition": partition.RHEL5_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.RHEL5_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.FC6_Repo,
- "rootpw": rootpw.FC3_RootPw,
- "services": services.FC6_Services,
- "selinux": selinux.FC3_SELinux,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "upgrade": upgrade.FC3_Upgrade,
- "user": user.FC6_User,
- "url": method.FC6_Method,
- "vnc": vnc.FC6_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.FC6_XConfig,
- "zerombr": zerombr.FC3_ZeroMbr,
- "zfcp": zfcp.FC3_ZFCP,
- },
-
- # based on f13ish
- RHEL6: {
- "auth": authconfig.FC3_Authconfig,
- "authconfig": authconfig.FC3_Authconfig,
- "autopart": autopart.F12_AutoPart,
- "autostep": autostep.FC3_AutoStep,
- "bootloader": bootloader.RHEL6_Bootloader,
- "cdrom": method.RHEL6_Method,
- "clearpart": clearpart.FC3_ClearPart,
- "cmdline": displaymode.FC3_DisplayMode,
- "device": device.F8_Device,
- "deviceprobe": deviceprobe.FC3_DeviceProbe,
- "dmraid": dmraid.FC6_DmRaid,
- "driverdisk": driverdisk.F12_DriverDisk,
- "fcoe": fcoe.F13_Fcoe,
- "firewall": firewall.F10_Firewall,
- "firstboot": firstboot.FC3_Firstboot,
- "graphical": displaymode.FC3_DisplayMode,
- "group": group.F12_Group,
- "halt": reboot.FC6_Reboot,
- "harddrive": method.RHEL6_Method,
- "ignoredisk": ignoredisk.RHEL6_IgnoreDisk,
- "install": upgrade.F11_Upgrade,
- "interactive": interactive.FC3_Interactive,
- "iscsi": iscsi.F10_Iscsi,
- "iscsiname": iscsiname.FC6_IscsiName,
- "keyboard": keyboard.FC3_Keyboard,
- "lang": lang.FC3_Lang,
- "logging": logging.FC6_Logging,
- "logvol": logvol.F12_LogVol,
- "mediacheck": mediacheck.FC4_MediaCheck,
- "monitor": monitor.F10_Monitor,
- "multipath": multipath.FC6_MultiPath,
- "network": network.RHEL6_Network,
- "nfs": method.RHEL6_Method,
- "part": partition.F12_Partition,
- "partition": partition.F12_Partition,
- "poweroff": reboot.FC6_Reboot,
- "raid": raid.F13_Raid,
- "reboot": reboot.FC6_Reboot,
- "repo": repo.RHEL6_Repo,
- "rescue": rescue.F10_Rescue,
- "rootpw": rootpw.F8_RootPw,
- "selinux": selinux.FC3_SELinux,
- "services": services.FC6_Services,
- "shutdown": reboot.FC6_Reboot,
- "skipx": skipx.FC3_SkipX,
- "sshpw": sshpw.F13_SshPw,
- "text": displaymode.FC3_DisplayMode,
- "timezone": timezone.FC6_Timezone,
- "updates": updates.F7_Updates,
- "upgrade": upgrade.F11_Upgrade,
- "url": method.RHEL6_Method,
- "user": user.F12_User,
- "vnc": vnc.F9_Vnc,
- "volgroup": volgroup.FC3_VolGroup,
- "xconfig": xconfig.F10_XConfig,
- "zerombr": zerombr.F9_ZeroMbr,
- "zfcp": zfcp.F12_ZFCP,
- }
-}
-
-# This map is keyed on kickstart syntax version as provided by
-# pykickstart.version. Within each sub-dict is a mapping from a data object
-# name to the class that provides it. This is a bijective mapping - that is,
-# each name maps to exactly one data class and all data classes have a name.
-# More than one instance of each class is allowed to exist, however.
-dataMap = {
- FC3: {
- "DriverDiskData": driverdisk.FC3_DriverDiskData,
- "LogVolData": logvol.FC3_LogVolData,
- "NetworkData": network.FC3_NetworkData,
- "PartData": partition.FC3_PartData,
- "RaidData": raid.FC3_RaidData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- FC4: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "LogVolData": logvol.FC4_LogVolData,
- "NetworkData": network.FC4_NetworkData,
- "PartData": partition.FC4_PartData,
- "RaidData": raid.FC4_RaidData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- FC5: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "LogVolData": logvol.FC4_LogVolData,
- "NetworkData": network.FC4_NetworkData,
- "PartData": partition.FC4_PartData,
- "RaidData": raid.FC5_RaidData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- FC6: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.FC6_IscsiData,
- "LogVolData": logvol.FC4_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.FC6_NetworkData,
- "PartData": partition.FC4_PartData,
- "RaidData": raid.FC5_RaidData,
- "RepoData": repo.FC6_RepoData,
- "UserData": user.FC6_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F7: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.FC6_IscsiData,
- "LogVolData": logvol.FC4_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.FC6_NetworkData,
- "PartData": partition.FC4_PartData,
- "RaidData": raid.F7_RaidData,
- "RepoData": repo.FC6_RepoData,
- "UserData": user.FC6_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F8: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.FC6_IscsiData,
- "LogVolData": logvol.FC4_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.FC4_PartData,
- "RaidData": raid.F7_RaidData,
- "RepoData": repo.F8_RepoData,
- "UserData": user.F8_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F9: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.FC6_IscsiData,
- "LogVolData": logvol.F9_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F9_PartData,
- "RaidData": raid.F9_RaidData,
- "RepoData": repo.F8_RepoData,
- "UserData": user.F8_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F10: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F9_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F9_PartData,
- "RaidData": raid.F9_RaidData,
- "RepoData": repo.F8_RepoData,
- "UserData": user.F8_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F11: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F9_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F11_PartData,
- "RaidData": raid.F9_RaidData,
- "RepoData": repo.F11_RepoData,
- "UserData": user.F8_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- F12: {
- "DriverDiskData": driverdisk.F12_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F12_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F12_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F12_PartData,
- "RaidData": raid.F12_RaidData,
- "RepoData": repo.F11_RepoData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F12_ZFCPData,
- },
- F13: {
- "DriverDiskData": driverdisk.F12_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F13_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F12_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F12_PartData,
- "RaidData": raid.F13_RaidData,
- "RepoData": repo.F13_RepoData,
- "SshPwData": sshpw.F13_SshPwData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F12_ZFCPData,
- },
- F14: {
- "DriverDiskData": driverdisk.F14_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F13_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F14_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F14_PartData,
- "RaidData": raid.F14_RaidData,
- "RepoData": repo.F14_RepoData,
- "SshPwData": sshpw.F13_SshPwData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F14_ZFCPData,
- },
- F15: {
- "DriverDiskData": driverdisk.F14_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F13_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F15_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F8_NetworkData,
- "PartData": partition.F14_PartData,
- "RaidData": raid.F15_RaidData,
- "RepoData": repo.F15_RepoData,
- "SshPwData": sshpw.F13_SshPwData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F14_ZFCPData,
- },
- F16: {
- "DriverDiskData": driverdisk.F14_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F13_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F15_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.F16_NetworkData,
- "PartData": partition.F14_PartData,
- "RaidData": raid.F15_RaidData,
- "RepoData": repo.F15_RepoData,
- "SshPwData": sshpw.F13_SshPwData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F14_ZFCPData,
- },
- RHEL3: {
- "DriverDiskData": driverdisk.FC3_DriverDiskData,
- "LogVolData": logvol.FC3_LogVolData,
- "NetworkData": network.RHEL4_NetworkData,
- "PartData": partition.FC3_PartData,
- "RaidData": raid.FC3_RaidData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- RHEL4: {
- "DriverDiskData": driverdisk.FC4_DriverDiskData,
- "LogVolData": logvol.FC3_LogVolData,
- "NetworkData": network.RHEL4_NetworkData,
- "PartData": partition.FC3_PartData,
- "RaidData": raid.FC3_RaidData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- RHEL5: {
- "DriverDiskData": driverdisk.F12_DriverDiskData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "IscsiData": iscsi.FC6_IscsiData,
- "LogVolData": logvol.RHEL5_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.FC6_NetworkData,
- "PartData": partition.RHEL5_PartData,
- "RaidData": raid.RHEL5_RaidData,
- "RepoData": repo.FC6_RepoData,
- "UserData": user.FC6_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.FC3_ZFCPData,
- },
- RHEL6: {
- "DriverDiskData": driverdisk.F12_DriverDiskData,
- "DeviceData": device.F8_DeviceData,
- "DmRaidData": dmraid.FC6_DmRaidData,
- "FcoeData": fcoe.F13_FcoeData,
- "GroupData": group.F12_GroupData,
- "IscsiData": iscsi.F10_IscsiData,
- "LogVolData": logvol.F12_LogVolData,
- "MultiPathData": multipath.FC6_MultiPathData,
- "NetworkData": network.RHEL6_NetworkData,
- "PartData": partition.F12_PartData,
- "RaidData": raid.F13_RaidData,
- "RepoData": repo.RHEL6_RepoData,
- "SshPwData": sshpw.F13_SshPwData,
- "UserData": user.F12_UserData,
- "VolGroupData": volgroup.FC3_VolGroupData,
- "ZFCPData": zfcp.F12_ZFCPData,
- }
-}
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py
deleted file mode 100644
index 17c8211bbf..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F10Handler(BaseHandler):
- version = F10
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py
deleted file mode 100644
index d21aee3e8b..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F11Handler(BaseHandler):
- version = F11
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py
deleted file mode 100644
index b94c738f79..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F13Handler(BaseHandler):
- version = F13
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py
deleted file mode 100644
index 478f75d15e..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F14Handler(BaseHandler):
- version = F14
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py
deleted file mode 100644
index 12aecb4c1a..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F15Handler(BaseHandler):
- version = F15
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py
deleted file mode 100644
index 5e856ea983..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F7Handler(BaseHandler):
- version = F7
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py
deleted file mode 100644
index 1a978810f4..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F8Handler(BaseHandler):
- version = F8
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py
deleted file mode 100644
index 116f1b57c9..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F9Handler(BaseHandler):
- version = F9
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py
deleted file mode 100644
index a115dc2646..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class FC3Handler(BaseHandler):
- version = FC3
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py
deleted file mode 100644
index fd47b732ef..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class FC4Handler(BaseHandler):
- version = FC4
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py
deleted file mode 100644
index bcdc29d23a..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class FC5Handler(BaseHandler):
- version = FC5
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py
deleted file mode 100644
index c83a929f84..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class FC6Handler(BaseHandler):
- version = FC6
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py
deleted file mode 100644
index 131763c2a8..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class RHEL3Handler(BaseHandler):
- version = RHEL3
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py
deleted file mode 100644
index 3496c43ea5..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class RHEL4Handler(BaseHandler):
- version = RHEL4
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py
deleted file mode 100644
index abb7a8d36c..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class RHEL5Handler(BaseHandler):
- version = RHEL5
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py b/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py
deleted file mode 100644
index 7202419780..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2. This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc.
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class RHEL6Handler(BaseHandler):
- version = RHEL6
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py
deleted file mode 100644
index 7bcd9d5541..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Copyright 2002-2006 Michael D. Stenner, Ryan Tomayko
-
-# $Id: __init__.py,v 1.20 2006/09/22 00:58:55 mstenner Exp $
-
-"""A high-level cross-protocol url-grabber.
-
-Using urlgrabber, data can be fetched in three basic ways:
-
- urlgrab(url) copy the file to the local filesystem
- urlopen(url) open the remote file and return a file object
- (like urllib2.urlopen)
- urlread(url) return the contents of the file as a string
-
-When using these functions (or methods), urlgrabber supports the
-following features:
-
- * identical behavior for http://, ftp://, and file:// urls
- * http keepalive - faster downloads of many files by using
- only a single connection
- * byte ranges - fetch only a portion of the file
- * reget - for a urlgrab, resume a partial download
- * progress meters - the ability to report download progress
- automatically, even when using urlopen!
- * throttling - restrict bandwidth usage
- * retries - automatically retry a download if it fails. The
- number of retries and failure types are configurable.
- * authenticated server access for http and ftp
- * proxy support - support for authenticated http and ftp proxies
- * mirror groups - treat a list of mirrors as a single source,
- automatically switching mirrors if there is a failure.
-"""
-
-__version__ = '3.1.0'
-__date__ = '2006/09/21'
-__author__ = 'Michael D. Stenner <mstenner@linux.duke.edu>, ' \
- 'Ryan Tomayko <rtomayko@naeblis.cx>'
-__url__ = 'http://linux.duke.edu/projects/urlgrabber/'
-
-from grabber import urlgrab, urlopen, urlread
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py
deleted file mode 100644
index 001b4e32d6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py
+++ /dev/null
@@ -1,463 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-# Copyright 2002-2004 Michael D. Stenner, Ryan Tomayko
-
-# $Id: byterange.py,v 1.12 2006/07/20 20:15:58 mstenner Exp $
-
-import os
-import stat
-import urllib
-import urllib2
-import rfc822
-
-DEBUG = None
-
-try:
- from cStringIO import StringIO
-except ImportError, msg:
- from StringIO import StringIO
-
-class RangeError(IOError):
- """Error raised when an unsatisfiable range is requested."""
- pass
-
-class HTTPRangeHandler(urllib2.BaseHandler):
- """Handler that enables HTTP Range headers.
-
- This was extremely simple. The Range header is a HTTP feature to
- begin with so all this class does is tell urllib2 that the
- "206 Partial Content" reponse from the HTTP server is what we
- expected.
-
- Example:
- import urllib2
- import byterange
-
- range_handler = range.HTTPRangeHandler()
- opener = urllib2.build_opener(range_handler)
-
- # install it
- urllib2.install_opener(opener)
-
- # create Request and set Range header
- req = urllib2.Request('http://www.python.org/')
- req.header['Range'] = 'bytes=30-50'
- f = urllib2.urlopen(req)
- """
-
- def http_error_206(self, req, fp, code, msg, hdrs):
- # 206 Partial Content Response
- r = urllib.addinfourl(fp, hdrs, req.get_full_url())
- r.code = code
- r.msg = msg
- return r
-
- def http_error_416(self, req, fp, code, msg, hdrs):
- # HTTP's Range Not Satisfiable error
- raise RangeError('Requested Range Not Satisfiable')
-
-class HTTPSRangeHandler(HTTPRangeHandler):
- """ Range Header support for HTTPS. """
-
- def https_error_206(self, req, fp, code, msg, hdrs):
- return self.http_error_206(req, fp, code, msg, hdrs)
-
- def https_error_416(self, req, fp, code, msg, hdrs):
- self.https_error_416(req, fp, code, msg, hdrs)
-
-class RangeableFileObject:
- """File object wrapper to enable raw range handling.
- This was implemented primarilary for handling range
- specifications for file:// urls. This object effectively makes
- a file object look like it consists only of a range of bytes in
- the stream.
-
- Examples:
- # expose 10 bytes, starting at byte position 20, from
- # /etc/aliases.
- >>> fo = RangeableFileObject(file('/etc/passwd', 'r'), (20,30))
- # seek seeks within the range (to position 23 in this case)
- >>> fo.seek(3)
- # tell tells where your at _within the range_ (position 3 in
- # this case)
- >>> fo.tell()
- # read EOFs if an attempt is made to read past the last
- # byte in the range. the following will return only 7 bytes.
- >>> fo.read(30)
- """
-
- def __init__(self, fo, rangetup):
- """Create a RangeableFileObject.
- fo -- a file like object. only the read() method need be
- supported but supporting an optimized seek() is
- preferable.
- rangetup -- a (firstbyte,lastbyte) tuple specifying the range
- to work over.
- The file object provided is assumed to be at byte offset 0.
- """
- self.fo = fo
- (self.firstbyte, self.lastbyte) = range_tuple_normalize(rangetup)
- self.realpos = 0
- self._do_seek(self.firstbyte)
-
- def __getattr__(self, name):
- """This effectively allows us to wrap at the instance level.
- Any attribute not found in _this_ object will be searched for
- in self.fo. This includes methods."""
- if hasattr(self.fo, name):
- return getattr(self.fo, name)
- raise AttributeError, name
-
- def tell(self):
- """Return the position within the range.
- This is different from fo.seek in that position 0 is the
- first byte position of the range tuple. For example, if
- this object was created with a range tuple of (500,899),
- tell() will return 0 when at byte position 500 of the file.
- """
- return (self.realpos - self.firstbyte)
-
- def seek(self,offset,whence=0):
- """Seek within the byte range.
- Positioning is identical to that described under tell().
- """
- assert whence in (0, 1, 2)
- if whence == 0: # absolute seek
- realoffset = self.firstbyte + offset
- elif whence == 1: # relative seek
- realoffset = self.realpos + offset
- elif whence == 2: # absolute from end of file
- # XXX: are we raising the right Error here?
- raise IOError('seek from end of file not supported.')
-
- # do not allow seek past lastbyte in range
- if self.lastbyte and (realoffset >= self.lastbyte):
- realoffset = self.lastbyte
-
- self._do_seek(realoffset - self.realpos)
-
- def read(self, size=-1):
- """Read within the range.
- This method will limit the size read based on the range.
- """
- size = self._calc_read_size(size)
- rslt = self.fo.read(size)
- self.realpos += len(rslt)
- return rslt
-
- def readline(self, size=-1):
- """Read lines within the range.
- This method will limit the size read based on the range.
- """
- size = self._calc_read_size(size)
- rslt = self.fo.readline(size)
- self.realpos += len(rslt)
- return rslt
-
- def _calc_read_size(self, size):
- """Handles calculating the amount of data to read based on
- the range.
- """
- if self.lastbyte:
- if size > -1:
- if ((self.realpos + size) >= self.lastbyte):
- size = (self.lastbyte - self.realpos)
- else:
- size = (self.lastbyte - self.realpos)
- return size
-
- def _do_seek(self,offset):
- """Seek based on whether wrapped object supports seek().
- offset is relative to the current position (self.realpos).
- """
- assert offset >= 0
- if not hasattr(self.fo, 'seek'):
- self._poor_mans_seek(offset)
- else:
- self.fo.seek(self.realpos + offset)
- self.realpos+= offset
-
- def _poor_mans_seek(self,offset):
- """Seek by calling the wrapped file objects read() method.
- This is used for file like objects that do not have native
- seek support. The wrapped objects read() method is called
- to manually seek to the desired position.
- offset -- read this number of bytes from the wrapped
- file object.
- raise RangeError if we encounter EOF before reaching the
- specified offset.
- """
- pos = 0
- bufsize = 1024
- while pos < offset:
- if (pos + bufsize) > offset:
- bufsize = offset - pos
- buf = self.fo.read(bufsize)
- if len(buf) != bufsize:
- raise RangeError('Requested Range Not Satisfiable')
- pos+= bufsize
-
-class FileRangeHandler(urllib2.FileHandler):
- """FileHandler subclass that adds Range support.
- This class handles Range headers exactly like an HTTP
- server would.
- """
- def open_local_file(self, req):
- import mimetypes
- import mimetools
- host = req.get_host()
- file = req.get_selector()
- localfile = urllib.url2pathname(file)
- stats = os.stat(localfile)
- size = stats[stat.ST_SIZE]
- modified = rfc822.formatdate(stats[stat.ST_MTIME])
- mtype = mimetypes.guess_type(file)[0]
- if host:
- host, port = urllib.splitport(host)
- if port or socket.gethostbyname(host) not in self.get_names():
- raise urllib2.URLError('file not on local host')
- fo = open(localfile,'rb')
- brange = req.headers.get('Range',None)
- brange = range_header_to_tuple(brange)
- assert brange != ()
- if brange:
- (fb,lb) = brange
- if lb == '': lb = size
- if fb < 0 or fb > size or lb > size:
- raise RangeError('Requested Range Not Satisfiable')
- size = (lb - fb)
- fo = RangeableFileObject(fo, (fb,lb))
- headers = mimetools.Message(StringIO(
- 'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' %
- (mtype or 'text/plain', size, modified)))
- return urllib.addinfourl(fo, headers, 'file:'+file)
-
-
-# FTP Range Support
-# Unfortunately, a large amount of base FTP code had to be copied
-# from urllib and urllib2 in order to insert the FTP REST command.
-# Code modifications for range support have been commented as
-# follows:
-# -- range support modifications start/end here
-
-from urllib import splitport, splituser, splitpasswd, splitattr, \
- unquote, addclosehook, addinfourl
-import ftplib
-import socket
-import sys
-import ftplib
-import mimetypes
-import mimetools
-
-class FTPRangeHandler(urllib2.FTPHandler):
- def ftp_open(self, req):
- host = req.get_host()
- if not host:
- raise IOError, ('ftp error', 'no host given')
- host, port = splitport(host)
- if port is None:
- port = ftplib.FTP_PORT
-
- # username/password handling
- user, host = splituser(host)
- if user:
- user, passwd = splitpasswd(user)
- else:
- passwd = None
- host = unquote(host)
- user = unquote(user or '')
- passwd = unquote(passwd or '')
-
- try:
- host = socket.gethostbyname(host)
- except socket.error, msg:
- raise urllib2.URLError(msg)
- path, attrs = splitattr(req.get_selector())
- dirs = path.split('/')
- dirs = map(unquote, dirs)
- dirs, file = dirs[:-1], dirs[-1]
- if dirs and not dirs[0]:
- dirs = dirs[1:]
- try:
- fw = self.connect_ftp(user, passwd, host, port, dirs)
- type = file and 'I' or 'D'
- for attr in attrs:
- attr, value = splitattr(attr)
- if attr.lower() == 'type' and \
- value in ('a', 'A', 'i', 'I', 'd', 'D'):
- type = value.upper()
-
- # -- range support modifications start here
- rest = None
- range_tup = range_header_to_tuple(req.headers.get('Range',None))
- assert range_tup != ()
- if range_tup:
- (fb,lb) = range_tup
- if fb > 0: rest = fb
- # -- range support modifications end here
-
- fp, retrlen = fw.retrfile(file, type, rest)
-
- # -- range support modifications start here
- if range_tup:
- (fb,lb) = range_tup
- if lb == '':
- if retrlen is None or retrlen == 0:
- raise RangeError('Requested Range Not Satisfiable due to unobtainable file length.')
- lb = retrlen
- retrlen = lb - fb
- if retrlen < 0:
- # beginning of range is larger than file
- raise RangeError('Requested Range Not Satisfiable')
- else:
- retrlen = lb - fb
- fp = RangeableFileObject(fp, (0,retrlen))
- # -- range support modifications end here
-
- headers = ""
- mtype = mimetypes.guess_type(req.get_full_url())[0]
- if mtype:
- headers += "Content-Type: %s\n" % mtype
- if retrlen is not None and retrlen >= 0:
- headers += "Content-Length: %d\n" % retrlen
- sf = StringIO(headers)
- headers = mimetools.Message(sf)
- return addinfourl(fp, headers, req.get_full_url())
- except ftplib.all_errors, msg:
- raise IOError, ('ftp error', msg), sys.exc_info()[2]
-
- def connect_ftp(self, user, passwd, host, port, dirs):
- fw = ftpwrapper(user, passwd, host, port, dirs)
- return fw
-
-class ftpwrapper(urllib.ftpwrapper):
- # range support note:
- # this ftpwrapper code is copied directly from
- # urllib. The only enhancement is to add the rest
- # argument and pass it on to ftp.ntransfercmd
- def retrfile(self, file, type, rest=None):
- self.endtransfer()
- if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1
- else: cmd = 'TYPE ' + type; isdir = 0
- try:
- self.ftp.voidcmd(cmd)
- except ftplib.all_errors:
- self.init()
- self.ftp.voidcmd(cmd)
- conn = None
- if file and not isdir:
- # Use nlst to see if the file exists at all
- try:
- self.ftp.nlst(file)
- except ftplib.error_perm, reason:
- raise IOError, ('ftp error', reason), sys.exc_info()[2]
- # Restore the transfer mode!
- self.ftp.voidcmd(cmd)
- # Try to retrieve as a file
- try:
- cmd = 'RETR ' + file
- conn = self.ftp.ntransfercmd(cmd, rest)
- except ftplib.error_perm, reason:
- if str(reason)[:3] == '501':
- # workaround for REST not supported error
- fp, retrlen = self.retrfile(file, type)
- fp = RangeableFileObject(fp, (rest,''))
- return (fp, retrlen)
- elif str(reason)[:3] != '550':
- raise IOError, ('ftp error', reason), sys.exc_info()[2]
- if not conn:
- # Set transfer mode to ASCII!
- self.ftp.voidcmd('TYPE A')
- # Try a directory listing
- if file: cmd = 'LIST ' + file
- else: cmd = 'LIST'
- conn = self.ftp.ntransfercmd(cmd)
- self.busy = 1
- # Pass back both a suitably decorated object and a retrieval length
- return (addclosehook(conn[0].makefile('rb'),
- self.endtransfer), conn[1])
-
-
-####################################################################
-# Range Tuple Functions
-# XXX: These range tuple functions might go better in a class.
-
-_rangere = None
-def range_header_to_tuple(range_header):
- """Get a (firstbyte,lastbyte) tuple from a Range header value.
-
- Range headers have the form "bytes=<firstbyte>-<lastbyte>". This
- function pulls the firstbyte and lastbyte values and returns
- a (firstbyte,lastbyte) tuple. If lastbyte is not specified in
- the header value, it is returned as an empty string in the
- tuple.
-
- Return None if range_header is None
- Return () if range_header does not conform to the range spec
- pattern.
-
- """
- global _rangere
- if range_header is None: return None
- if _rangere is None:
- import re
- _rangere = re.compile(r'^bytes=(\d{1,})-(\d*)')
- match = _rangere.match(range_header)
- if match:
- tup = range_tuple_normalize(match.group(1,2))
- if tup and tup[1]:
- tup = (tup[0],tup[1]+1)
- return tup
- return ()
-
-def range_tuple_to_header(range_tup):
- """Convert a range tuple to a Range header value.
- Return a string of the form "bytes=<firstbyte>-<lastbyte>" or None
- if no range is needed.
- """
- if range_tup is None: return None
- range_tup = range_tuple_normalize(range_tup)
- if range_tup:
- if range_tup[1]:
- range_tup = (range_tup[0],range_tup[1] - 1)
- return 'bytes=%s-%s' % range_tup
-
-def range_tuple_normalize(range_tup):
- """Normalize a (first_byte,last_byte) range tuple.
- Return a tuple whose first element is guaranteed to be an int
- and whose second element will be '' (meaning: the last byte) or
- an int. Finally, return None if the normalized tuple == (0,'')
- as that is equivelant to retrieving the entire file.
- """
- if range_tup is None: return None
- # handle first byte
- fb = range_tup[0]
- if fb in (None,''): fb = 0
- else: fb = int(fb)
- # handle last byte
- try: lb = range_tup[1]
- except IndexError: lb = ''
- else:
- if lb is None: lb = ''
- elif lb != '': lb = int(lb)
- # check if range is over the entire file
- if (fb,lb) == (0,''): return None
- # check that the range is valid
- if lb < fb: raise RangeError('Invalid byte range: %s-%s' % (fb,lb))
- return (fb,lb)
-
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py
deleted file mode 100644
index fefdab36f6..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py
+++ /dev/null
@@ -1,1477 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-# Copyright 2002-2004 Michael D. Stenner, Ryan Tomayko
-
-"""A high-level cross-protocol url-grabber.
-
-GENERAL ARGUMENTS (kwargs)
-
- Where possible, the module-level default is indicated, and legal
- values are provided.
-
- copy_local = 0 [0|1]
-
- ignored except for file:// urls, in which case it specifies
- whether urlgrab should still make a copy of the file, or simply
- point to the existing copy. The module level default for this
- option is 0.
-
- close_connection = 0 [0|1]
-
- tells URLGrabber to close the connection after a file has been
- transfered. This is ignored unless the download happens with the
- http keepalive handler (keepalive=1). Otherwise, the connection
- is left open for further use. The module level default for this
- option is 0 (keepalive connections will not be closed).
-
- keepalive = 1 [0|1]
-
- specifies whether keepalive should be used for HTTP/1.1 servers
- that support it. The module level default for this option is 1
- (keepalive is enabled).
-
- progress_obj = None
-
- a class instance that supports the following methods:
- po.start(filename, url, basename, length, text)
- # length will be None if unknown
- po.update(read) # read == bytes read so far
- po.end()
-
- text = None
-
- specifies an alternativ text item in the beginning of the progress
- bar line. If not given, the basename of the file is used.
-
- throttle = 1.0
-
- a number - if it's an int, it's the bytes/second throttle limit.
- If it's a float, it is first multiplied by bandwidth. If throttle
- == 0, throttling is disabled. If None, the module-level default
- (which can be set on default_grabber.throttle) is used. See
- BANDWIDTH THROTTLING for more information.
-
- timeout = None
-
- a positive float expressing the number of seconds to wait for socket
- operations. If the value is None or 0.0, socket operations will block
- forever. Setting this option causes urlgrabber to call the settimeout
- method on the Socket object used for the request. See the Python
- documentation on settimeout for more information.
- http://www.python.org/doc/current/lib/socket-objects.html
-
- bandwidth = 0
-
- the nominal max bandwidth in bytes/second. If throttle is a float
- and bandwidth == 0, throttling is disabled. If None, the
- module-level default (which can be set on
- default_grabber.bandwidth) is used. See BANDWIDTH THROTTLING for
- more information.
-
- range = None
-
- a tuple of the form (first_byte, last_byte) describing a byte
- range to retrieve. Either or both of the values may set to
- None. If first_byte is None, byte offset 0 is assumed. If
- last_byte is None, the last byte available is assumed. Note that
- the range specification is python-like in that (0,10) will yeild
- the first 10 bytes of the file.
-
- If set to None, no range will be used.
-
- reget = None [None|'simple'|'check_timestamp']
-
- whether to attempt to reget a partially-downloaded file. Reget
- only applies to .urlgrab and (obviously) only if there is a
- partially downloaded file. Reget has two modes:
-
- 'simple' -- the local file will always be trusted. If there
- are 100 bytes in the local file, then the download will always
- begin 100 bytes into the requested file.
-
- 'check_timestamp' -- the timestamp of the server file will be
- compared to the timestamp of the local file. ONLY if the
- local file is newer than or the same age as the server file
- will reget be used. If the server file is newer, or the
- timestamp is not returned, the entire file will be fetched.
-
- NOTE: urlgrabber can do very little to verify that the partial
- file on disk is identical to the beginning of the remote file.
- You may want to either employ a custom "checkfunc" or simply avoid
- using reget in situations where corruption is a concern.
-
- user_agent = 'urlgrabber/VERSION'
-
- a string, usually of the form 'AGENT/VERSION' that is provided to
- HTTP servers in the User-agent header. The module level default
- for this option is "urlgrabber/VERSION".
-
- http_headers = None
-
- a tuple of 2-tuples, each containing a header and value. These
- will be used for http and https requests only. For example, you
- can do
- http_headers = (('Pragma', 'no-cache'),)
-
- ftp_headers = None
-
- this is just like http_headers, but will be used for ftp requests.
-
- proxies = None
-
- a dictionary that maps protocol schemes to proxy hosts. For
- example, to use a proxy server on host "foo" port 3128 for http
- and https URLs:
- proxies={ 'http' : 'http://foo:3128', 'https' : 'http://foo:3128' }
- note that proxy authentication information may be provided using
- normal URL constructs:
- proxies={ 'http' : 'http://user:host@foo:3128' }
- Lastly, if proxies is None, the default environment settings will
- be used.
-
- prefix = None
-
- a url prefix that will be prepended to all requested urls. For
- example:
- g = URLGrabber(prefix='http://foo.com/mirror/')
- g.urlgrab('some/file.txt')
- ## this will fetch 'http://foo.com/mirror/some/file.txt'
- This option exists primarily to allow identical behavior to
- MirrorGroup (and derived) instances. Note: a '/' will be inserted
- if necessary, so you cannot specify a prefix that ends with a
- partial file or directory name.
-
- opener = None
-
- Overrides the default urllib2.OpenerDirector provided to urllib2
- when making requests. This option exists so that the urllib2
- handler chain may be customized. Note that the range, reget,
- proxy, and keepalive features require that custom handlers be
- provided to urllib2 in order to function properly. If an opener
- option is provided, no attempt is made by urlgrabber to ensure
- chain integrity. You are responsible for ensuring that any
- extension handlers are present if said features are required.
-
- data = None
-
- Only relevant for the HTTP family (and ignored for other
- protocols), this allows HTTP POSTs. When the data kwarg is
- present (and not None), an HTTP request will automatically become
- a POST rather than GET. This is done by direct passthrough to
- urllib2. If you use this, you may also want to set the
- 'Content-length' and 'Content-type' headers with the http_headers
- option. Note that python 2.2 handles the case of these
- badly and if you do not use the proper case (shown here), your
- values will be overridden with the defaults.
-
-
-RETRY RELATED ARGUMENTS
-
- retry = None
-
- the number of times to retry the grab before bailing. If this is
- zero, it will retry forever. This was intentional... really, it
- was :). If this value is not supplied or is supplied but is None
- retrying does not occur.
-
- retrycodes = [-1,2,4,5,6,7]
-
- a sequence of errorcodes (values of e.errno) for which it should
- retry. See the doc on URLGrabError for more details on this. You
- might consider modifying a copy of the default codes rather than
- building yours from scratch so that if the list is extended in the
- future (or one code is split into two) you can still enjoy the
- benefits of the default list. You can do that with something like
- this:
-
- retrycodes = urlgrabber.grabber.URLGrabberOptions().retrycodes
- if 12 not in retrycodes:
- retrycodes.append(12)
-
- checkfunc = None
-
- a function to do additional checks. This defaults to None, which
- means no additional checking. The function should simply return
- on a successful check. It should raise URLGrabError on an
- unsuccessful check. Raising of any other exception will be
- considered immediate failure and no retries will occur.
-
- If it raises URLGrabError, the error code will determine the retry
- behavior. Negative error numbers are reserved for use by these
- passed in functions, so you can use many negative numbers for
- different types of failure. By default, -1 results in a retry,
- but this can be customized with retrycodes.
-
- If you simply pass in a function, it will be given exactly one
- argument: a CallbackObject instance with the .url attribute
- defined and either .filename (for urlgrab) or .data (for urlread).
- For urlgrab, .filename is the name of the local file. For
- urlread, .data is the actual string data. If you need other
- arguments passed to the callback (program state of some sort), you
- can do so like this:
-
- checkfunc=(function, ('arg1', 2), {'kwarg': 3})
-
- if the downloaded file has filename /tmp/stuff, then this will
- result in this call (for urlgrab):
-
- function(obj, 'arg1', 2, kwarg=3)
- # obj.filename = '/tmp/stuff'
- # obj.url = 'http://foo.com/stuff'
-
- NOTE: both the "args" tuple and "kwargs" dict must be present if
- you use this syntax, but either (or both) can be empty.
-
- failure_callback = None
-
- The callback that gets called during retries when an attempt to
- fetch a file fails. The syntax for specifying the callback is
- identical to checkfunc, except for the attributes defined in the
- CallbackObject instance. The attributes for failure_callback are:
-
- exception = the raised exception
- url = the url we're trying to fetch
- tries = the number of tries so far (including this one)
- retry = the value of the retry option
-
- The callback is present primarily to inform the calling program of
- the failure, but if it raises an exception (including the one it's
- passed) that exception will NOT be caught and will therefore cause
- future retries to be aborted.
-
- The callback is called for EVERY failure, including the last one.
- On the last try, the callback can raise an alternate exception,
- but it cannot (without severe trickiness) prevent the exception
- from being raised.
-
- interrupt_callback = None
-
- This callback is called if KeyboardInterrupt is received at any
- point in the transfer. Basically, this callback can have three
- impacts on the fetch process based on the way it exits:
-
- 1) raise no exception: the current fetch will be aborted, but
- any further retries will still take place
-
- 2) raise a URLGrabError: if you're using a MirrorGroup, then
- this will prompt a failover to the next mirror according to
- the behavior of the MirrorGroup subclass. It is recommended
- that you raise URLGrabError with code 15, 'user abort'. If
- you are NOT using a MirrorGroup subclass, then this is the
- same as (3).
-
- 3) raise some other exception (such as KeyboardInterrupt), which
- will not be caught at either the grabber or mirror levels.
- That is, it will be raised up all the way to the caller.
-
- This callback is very similar to failure_callback. They are
- passed the same arguments, so you could use the same function for
- both.
-
- urlparser = URLParser()
-
- The URLParser class handles pre-processing of URLs, including
- auth-handling for user/pass encoded in http urls, file handing
- (that is, filenames not sent as a URL), and URL quoting. If you
- want to override any of this behavior, you can pass in a
- replacement instance. See also the 'quote' option.
-
- quote = None
-
- Whether or not to quote the path portion of a url.
- quote = 1 -> quote the URLs (they're not quoted yet)
- quote = 0 -> do not quote them (they're already quoted)
- quote = None -> guess what to do
-
- This option only affects proper urls like 'file:///etc/passwd'; it
- does not affect 'raw' filenames like '/etc/passwd'. The latter
- will always be quoted as they are converted to URLs. Also, only
- the path part of a url is quoted. If you need more fine-grained
- control, you should probably subclass URLParser and pass it in via
- the 'urlparser' option.
-
-BANDWIDTH THROTTLING
-
- urlgrabber supports throttling via two values: throttle and
- bandwidth Between the two, you can either specify and absolute
- throttle threshold or specify a theshold as a fraction of maximum
- available bandwidth.
-
- throttle is a number - if it's an int, it's the bytes/second
- throttle limit. If it's a float, it is first multiplied by
- bandwidth. If throttle == 0, throttling is disabled. If None, the
- module-level default (which can be set with set_throttle) is used.
-
- bandwidth is the nominal max bandwidth in bytes/second. If throttle
- is a float and bandwidth == 0, throttling is disabled. If None, the
- module-level default (which can be set with set_bandwidth) is used.
-
- THROTTLING EXAMPLES:
-
- Lets say you have a 100 Mbps connection. This is (about) 10^8 bits
- per second, or 12,500,000 Bytes per second. You have a number of
- throttling options:
-
- *) set_bandwidth(12500000); set_throttle(0.5) # throttle is a float
-
- This will limit urlgrab to use half of your available bandwidth.
-
- *) set_throttle(6250000) # throttle is an int
-
- This will also limit urlgrab to use half of your available
- bandwidth, regardless of what bandwidth is set to.
-
- *) set_throttle(6250000); set_throttle(1.0) # float
-
- Use half your bandwidth
-
- *) set_throttle(6250000); set_throttle(2.0) # float
-
- Use up to 12,500,000 Bytes per second (your nominal max bandwidth)
-
- *) set_throttle(6250000); set_throttle(0) # throttle = 0
-
- Disable throttling - this is more efficient than a very large
- throttle setting.
-
- *) set_throttle(0); set_throttle(1.0) # throttle is float, bandwidth = 0
-
- Disable throttling - this is the default when the module is loaded.
-
- SUGGESTED AUTHOR IMPLEMENTATION (THROTTLING)
-
- While this is flexible, it's not extremely obvious to the user. I
- suggest you implement a float throttle as a percent to make the
- distinction between absolute and relative throttling very explicit.
-
- Also, you may want to convert the units to something more convenient
- than bytes/second, such as kbps or kB/s, etc.
-
-"""
-
-# $Id: grabber.py,v 1.48 2006/09/22 00:58:05 mstenner Exp $
-
-import os
-import os.path
-import sys
-import urlparse
-import rfc822
-import time
-import string
-import urllib
-import urllib2
-from stat import * # S_* and ST_*
-
-########################################################################
-# MODULE INITIALIZATION
-########################################################################
-try:
- exec('from ' + (__name__.split('.'))[0] + ' import __version__')
-except:
- __version__ = '???'
-
-import sslfactory
-
-auth_handler = urllib2.HTTPBasicAuthHandler( \
- urllib2.HTTPPasswordMgrWithDefaultRealm())
-
-try:
- from i18n import _
-except ImportError, msg:
- def _(st): return st
-
-try:
- from httplib import HTTPException
-except ImportError, msg:
- HTTPException = None
-
-try:
- # This is a convenient way to make keepalive optional.
- # Just rename the module so it can't be imported.
- import keepalive
- from keepalive import HTTPHandler, HTTPSHandler
- have_keepalive = True
-except ImportError, msg:
- have_keepalive = False
-
-try:
- # add in range support conditionally too
- import byterange
- from byterange import HTTPRangeHandler, HTTPSRangeHandler, \
- FileRangeHandler, FTPRangeHandler, range_tuple_normalize, \
- range_tuple_to_header, RangeError
-except ImportError, msg:
- range_handlers = ()
- RangeError = None
- have_range = 0
-else:
- range_handlers = (HTTPRangeHandler(), HTTPSRangeHandler(),
- FileRangeHandler(), FTPRangeHandler())
- have_range = 1
-
-
-# check whether socket timeout support is available (Python >= 2.3)
-import socket
-try:
- TimeoutError = socket.timeout
- have_socket_timeout = True
-except AttributeError:
- TimeoutError = None
- have_socket_timeout = False
-
-########################################################################
-# functions for debugging output. These functions are here because they
-# are also part of the module initialization.
-DEBUG = None
-def set_logger(DBOBJ):
- """Set the DEBUG object. This is called by _init_default_logger when
- the environment variable URLGRABBER_DEBUG is set, but can also be
- called by a calling program. Basically, if the calling program uses
- the logging module and would like to incorporate urlgrabber logging,
- then it can do so this way. It's probably not necessary as most
- internal logging is only for debugging purposes.
-
- The passed-in object should be a logging.Logger instance. It will
- be pushed into the keepalive and byterange modules if they're
- being used. The mirror module pulls this object in on import, so
- you will need to manually push into it. In fact, you may find it
- tidier to simply push your logging object (or objects) into each
- of these modules independently.
- """
-
- global DEBUG
- DEBUG = DBOBJ
- if have_keepalive and keepalive.DEBUG is None:
- keepalive.DEBUG = DBOBJ
- if have_range and byterange.DEBUG is None:
- byterange.DEBUG = DBOBJ
- if sslfactory.DEBUG is None:
- sslfactory.DEBUG = DBOBJ
-
-def _init_default_logger():
- '''Examines the environment variable URLGRABBER_DEBUG and creates
- a logging object (logging.logger) based on the contents. It takes
- the form
-
- URLGRABBER_DEBUG=level,filename
-
- where "level" can be either an integer or a log level from the
- logging module (DEBUG, INFO, etc). If the integer is zero or
- less, logging will be disabled. Filename is the filename where
- logs will be sent. If it is "-", then stdout will be used. If
- the filename is empty or missing, stderr will be used. If the
- variable cannot be processed or the logging module cannot be
- imported (python < 2.3) then logging will be disabled. Here are
- some examples:
-
- URLGRABBER_DEBUG=1,debug.txt # log everything to debug.txt
- URLGRABBER_DEBUG=WARNING,- # log warning and higher to stdout
- URLGRABBER_DEBUG=INFO # log info and higher to stderr
-
- This funtion is called during module initialization. It is not
- intended to be called from outside. The only reason it is a
- function at all is to keep the module-level namespace tidy and to
- collect the code into a nice block.'''
-
- try:
- dbinfo = os.environ['URLGRABBER_DEBUG'].split(',')
- import logging
- level = logging._levelNames.get(dbinfo[0], int(dbinfo[0]))
- if level < 1: raise ValueError()
-
- formatter = logging.Formatter('%(asctime)s %(message)s')
- if len(dbinfo) > 1: filename = dbinfo[1]
- else: filename = ''
- if filename == '': handler = logging.StreamHandler(sys.stderr)
- elif filename == '-': handler = logging.StreamHandler(sys.stdout)
- else: handler = logging.FileHandler(filename)
- handler.setFormatter(formatter)
- DBOBJ = logging.getLogger('urlgrabber')
- DBOBJ.addHandler(handler)
- DBOBJ.setLevel(level)
- except (KeyError, ImportError, ValueError):
- DBOBJ = None
- set_logger(DBOBJ)
-
-_init_default_logger()
-########################################################################
-# END MODULE INITIALIZATION
-########################################################################
-
-
-
-class URLGrabError(IOError):
- """
- URLGrabError error codes:
-
- URLGrabber error codes (0 -- 255)
- 0 - everything looks good (you should never see this)
- 1 - malformed url
- 2 - local file doesn't exist
- 3 - request for non-file local file (dir, etc)
- 4 - IOError on fetch
- 5 - OSError on fetch
- 6 - no content length header when we expected one
- 7 - HTTPException
- 8 - Exceeded read limit (for urlread)
- 9 - Requested byte range not satisfiable.
- 10 - Byte range requested, but range support unavailable
- 11 - Illegal reget mode
- 12 - Socket timeout
- 13 - malformed proxy url
- 14 - HTTPError (includes .code and .exception attributes)
- 15 - user abort
-
- MirrorGroup error codes (256 -- 511)
- 256 - No more mirrors left to try
-
- Custom (non-builtin) classes derived from MirrorGroup (512 -- 767)
- [ this range reserved for application-specific error codes ]
-
- Retry codes (< 0)
- -1 - retry the download, unknown reason
-
- Note: to test which group a code is in, you can simply do integer
- division by 256: e.errno / 256
-
- Negative codes are reserved for use by functions passed in to
- retrygrab with checkfunc. The value -1 is built in as a generic
- retry code and is already included in the retrycodes list.
- Therefore, you can create a custom check function that simply
- returns -1 and the fetch will be re-tried. For more customized
- retries, you can use other negative number and include them in
- retry-codes. This is nice for outputting useful messages about
- what failed.
-
- You can use these error codes like so:
- try: urlgrab(url)
- except URLGrabError, e:
- if e.errno == 3: ...
- # or
- print e.strerror
- # or simply
- print e #### print '[Errno %i] %s' % (e.errno, e.strerror)
- """
- pass
-
-class CallbackObject:
- """Container for returned callback data.
-
- This is currently a dummy class into which urlgrabber can stuff
- information for passing to callbacks. This way, the prototype for
- all callbacks is the same, regardless of the data that will be
- passed back. Any function that accepts a callback function as an
- argument SHOULD document what it will define in this object.
-
- It is possible that this class will have some greater
- functionality in the future.
- """
- def __init__(self, **kwargs):
- self.__dict__.update(kwargs)
-
-def urlgrab(url, filename=None, **kwargs):
- """grab the file at <url> and make a local copy at <filename>
- If filename is none, the basename of the url is used.
- urlgrab returns the filename of the local file, which may be different
- from the passed-in filename if the copy_local kwarg == 0.
-
- See module documentation for a description of possible kwargs.
- """
- return default_grabber.urlgrab(url, filename, **kwargs)
-
-def urlopen(url, **kwargs):
- """open the url and return a file object
- If a progress object or throttle specifications exist, then
- a special file object will be returned that supports them.
- The file object can be treated like any other file object.
-
- See module documentation for a description of possible kwargs.
- """
- return default_grabber.urlopen(url, **kwargs)
-
-def urlread(url, limit=None, **kwargs):
- """read the url into a string, up to 'limit' bytes
- If the limit is exceeded, an exception will be thrown. Note that urlread
- is NOT intended to be used as a way of saying "I want the first N bytes"
- but rather 'read the whole file into memory, but don't use too much'
-
- See module documentation for a description of possible kwargs.
- """
- return default_grabber.urlread(url, limit, **kwargs)
-
-
-class URLParser:
- """Process the URLs before passing them to urllib2.
-
- This class does several things:
-
- * add any prefix
- * translate a "raw" file to a proper file: url
- * handle any http or https auth that's encoded within the url
- * quote the url
-
- Only the "parse" method is called directly, and it calls sub-methods.
-
- An instance of this class is held in the options object, which
- means that it's easy to change the behavior by sub-classing and
- passing the replacement in. It need only have a method like:
-
- url, parts = urlparser.parse(url, opts)
- """
-
- def parse(self, url, opts):
- """parse the url and return the (modified) url and its parts
-
- Note: a raw file WILL be quoted when it's converted to a URL.
- However, other urls (ones which come with a proper scheme) may
- or may not be quoted according to opts.quote
-
- opts.quote = 1 --> quote it
- opts.quote = 0 --> do not quote it
- opts.quote = None --> guess
- """
- quote = opts.quote
-
- if opts.prefix:
- url = self.add_prefix(url, opts.prefix)
-
- parts = urlparse.urlparse(url)
- (scheme, host, path, parm, query, frag) = parts
-
- if not scheme or (len(scheme) == 1 and scheme in string.letters):
- # if a scheme isn't specified, we guess that it's "file:"
- if url[0] not in '/\\': url = os.path.abspath(url)
- url = 'file:' + urllib.pathname2url(url)
- parts = urlparse.urlparse(url)
- quote = 0 # pathname2url quotes, so we won't do it again
-
- if scheme in ['http', 'https']:
- parts = self.process_http(parts)
-
- if quote is None:
- quote = self.guess_should_quote(parts)
- if quote:
- parts = self.quote(parts)
-
- url = urlparse.urlunparse(parts)
- return url, parts
-
- def add_prefix(self, url, prefix):
- if prefix[-1] == '/' or url[0] == '/':
- url = prefix + url
- else:
- url = prefix + '/' + url
- return url
-
- def process_http(self, parts):
- (scheme, host, path, parm, query, frag) = parts
-
- if '@' in host and auth_handler:
- try:
- user_pass, host = host.split('@', 1)
- if ':' in user_pass:
- user, password = user_pass.split(':', 1)
- except ValueError, e:
- raise URLGrabError(1, _('Bad URL: %s') % url)
- if DEBUG: DEBUG.info('adding HTTP auth: %s, XXXXXXXX', user)
- auth_handler.add_password(None, host, user, password)
-
- return (scheme, host, path, parm, query, frag)
-
- def quote(self, parts):
- """quote the URL
-
- This method quotes ONLY the path part. If you need to quote
- other parts, you should override this and pass in your derived
- class. The other alternative is to quote other parts before
- passing into urlgrabber.
- """
- (scheme, host, path, parm, query, frag) = parts
- path = urllib.quote(path)
- return (scheme, host, path, parm, query, frag)
-
- hexvals = '0123456789ABCDEF'
- def guess_should_quote(self, parts):
- """
- Guess whether we should quote a path. This amounts to
- guessing whether it's already quoted.
-
- find ' ' -> 1
- find '%' -> 1
- find '%XX' -> 0
- else -> 1
- """
- (scheme, host, path, parm, query, frag) = parts
- if ' ' in path:
- return 1
- ind = string.find(path, '%')
- if ind > -1:
- while ind > -1:
- if len(path) < ind+3:
- return 1
- code = path[ind+1:ind+3].upper()
- if code[0] not in self.hexvals or \
- code[1] not in self.hexvals:
- return 1
- ind = string.find(path, '%', ind+1)
- return 0
- return 1
-
-class URLGrabberOptions:
- """Class to ease kwargs handling."""
-
- def __init__(self, delegate=None, **kwargs):
- """Initialize URLGrabberOptions object.
- Set default values for all options and then update options specified
- in kwargs.
- """
- self.delegate = delegate
- if delegate is None:
- self._set_defaults()
- self._set_attributes(**kwargs)
-
- def __getattr__(self, name):
- if self.delegate and hasattr(self.delegate, name):
- return getattr(self.delegate, name)
- raise AttributeError, name
-
- def raw_throttle(self):
- """Calculate raw throttle value from throttle and bandwidth
- values.
- """
- if self.throttle <= 0:
- return 0
- elif type(self.throttle) == type(0):
- return float(self.throttle)
- else: # throttle is a float
- return self.bandwidth * self.throttle
-
- def derive(self, **kwargs):
- """Create a derived URLGrabberOptions instance.
- This method creates a new instance and overrides the
- options specified in kwargs.
- """
- return URLGrabberOptions(delegate=self, **kwargs)
-
- def _set_attributes(self, **kwargs):
- """Update object attributes with those provided in kwargs."""
- self.__dict__.update(kwargs)
- if have_range and kwargs.has_key('range'):
- # normalize the supplied range value
- self.range = range_tuple_normalize(self.range)
- if not self.reget in [None, 'simple', 'check_timestamp']:
- raise URLGrabError(11, _('Illegal reget mode: %s') \
- % (self.reget, ))
-
- def _set_defaults(self):
- """Set all options to their default values.
- When adding new options, make sure a default is
- provided here.
- """
- self.progress_obj = None
- self.throttle = 1.0
- self.bandwidth = 0
- self.retry = None
- self.retrycodes = [-1,2,4,5,6,7]
- self.checkfunc = None
- self.copy_local = 0
- self.close_connection = 0
- self.range = None
- self.user_agent = 'urlgrabber/%s' % __version__
- self.keepalive = 1
- self.proxies = None
- self.reget = None
- self.failure_callback = None
- self.interrupt_callback = None
- self.prefix = None
- self.opener = None
- self.cache_openers = True
- self.timeout = None
- self.text = None
- self.http_headers = None
- self.ftp_headers = None
- self.data = None
- self.urlparser = URLParser()
- self.quote = None
- self.ssl_ca_cert = None
- self.ssl_context = None
-
-class URLGrabber:
- """Provides easy opening of URLs with a variety of options.
-
- All options are specified as kwargs. Options may be specified when
- the class is created and may be overridden on a per request basis.
-
- New objects inherit default values from default_grabber.
- """
-
- def __init__(self, **kwargs):
- self.opts = URLGrabberOptions(**kwargs)
-
- def _retry(self, opts, func, *args):
- tries = 0
- while 1:
- # there are only two ways out of this loop. The second has
- # several "sub-ways"
- # 1) via the return in the "try" block
- # 2) by some exception being raised
- # a) an excepton is raised that we don't "except"
- # b) a callback raises ANY exception
- # c) we're not retry-ing or have run out of retries
- # d) the URLGrabError code is not in retrycodes
- # beware of infinite loops :)
- tries = tries + 1
- exception = None
- retrycode = None
- callback = None
- if DEBUG: DEBUG.info('attempt %i/%s: %s',
- tries, opts.retry, args[0])
- try:
- r = apply(func, (opts,) + args, {})
- if DEBUG: DEBUG.info('success')
- return r
- except URLGrabError, e:
- exception = e
- callback = opts.failure_callback
- retrycode = e.errno
- except KeyboardInterrupt, e:
- exception = e
- callback = opts.interrupt_callback
-
- if DEBUG: DEBUG.info('exception: %s', exception)
- if callback:
- if DEBUG: DEBUG.info('calling callback: %s', callback)
- cb_func, cb_args, cb_kwargs = self._make_callback(callback)
- obj = CallbackObject(exception=exception, url=args[0],
- tries=tries, retry=opts.retry)
- cb_func(obj, *cb_args, **cb_kwargs)
-
- if (opts.retry is None) or (tries == opts.retry):
- if DEBUG: DEBUG.info('retries exceeded, re-raising')
- raise
-
- if (retrycode is not None) and (retrycode not in opts.retrycodes):
- if DEBUG: DEBUG.info('retrycode (%i) not in list %s, re-raising',
- retrycode, opts.retrycodes)
- raise
-
- def urlopen(self, url, **kwargs):
- """open the url and return a file object
- If a progress object or throttle value specified when this
- object was created, then a special file object will be
- returned that supports them. The file object can be treated
- like any other file object.
- """
- opts = self.opts.derive(**kwargs)
- (url,parts) = opts.urlparser.parse(url, opts)
- def retryfunc(opts, url):
- return URLGrabberFileObject(url, filename=None, opts=opts)
- return self._retry(opts, retryfunc, url)
-
- def urlgrab(self, url, filename=None, **kwargs):
- """grab the file at <url> and make a local copy at <filename>
- If filename is none, the basename of the url is used.
- urlgrab returns the filename of the local file, which may be
- different from the passed-in filename if copy_local == 0.
- """
- opts = self.opts.derive(**kwargs)
- (url,parts) = opts.urlparser.parse(url, opts)
- (scheme, host, path, parm, query, frag) = parts
- if filename is None:
- filename = os.path.basename( urllib.unquote(path) )
- if scheme == 'file' and not opts.copy_local:
- # just return the name of the local file - don't make a
- # copy currently
- path = urllib.url2pathname(path)
- if host:
- path = os.path.normpath('//' + host + path)
- if not os.path.exists(path):
- raise URLGrabError(2,
- _('Local file does not exist: %s') % (path, ))
- elif not os.path.isfile(path):
- raise URLGrabError(3,
- _('Not a normal file: %s') % (path, ))
- elif not opts.range:
- return path
-
- def retryfunc(opts, url, filename):
- fo = URLGrabberFileObject(url, filename, opts)
- try:
- fo._do_grab()
- if not opts.checkfunc is None:
- cb_func, cb_args, cb_kwargs = \
- self._make_callback(opts.checkfunc)
- obj = CallbackObject()
- obj.filename = filename
- obj.url = url
- apply(cb_func, (obj, )+cb_args, cb_kwargs)
- finally:
- fo.close()
- return filename
-
- return self._retry(opts, retryfunc, url, filename)
-
- def urlread(self, url, limit=None, **kwargs):
- """read the url into a string, up to 'limit' bytes
- If the limit is exceeded, an exception will be thrown. Note
- that urlread is NOT intended to be used as a way of saying
- "I want the first N bytes" but rather 'read the whole file
- into memory, but don't use too much'
- """
- opts = self.opts.derive(**kwargs)
- (url,parts) = opts.urlparser.parse(url, opts)
- if limit is not None:
- limit = limit + 1
-
- def retryfunc(opts, url, limit):
- fo = URLGrabberFileObject(url, filename=None, opts=opts)
- s = ''
- try:
- # this is an unfortunate thing. Some file-like objects
- # have a default "limit" of None, while the built-in (real)
- # file objects have -1. They each break the other, so for
- # now, we just force the default if necessary.
- if limit is None: s = fo.read()
- else: s = fo.read(limit)
-
- if not opts.checkfunc is None:
- cb_func, cb_args, cb_kwargs = \
- self._make_callback(opts.checkfunc)
- obj = CallbackObject()
- obj.data = s
- obj.url = url
- apply(cb_func, (obj, )+cb_args, cb_kwargs)
- finally:
- fo.close()
- return s
-
- s = self._retry(opts, retryfunc, url, limit)
- if limit and len(s) > limit:
- raise URLGrabError(8,
- _('Exceeded limit (%i): %s') % (limit, url))
- return s
-
- def _make_callback(self, callback_obj):
- if callable(callback_obj):
- return callback_obj, (), {}
- else:
- return callback_obj
-
-# create the default URLGrabber used by urlXXX functions.
-# NOTE: actual defaults are set in URLGrabberOptions
-default_grabber = URLGrabber()
-
-class URLGrabberFileObject:
- """This is a file-object wrapper that supports progress objects
- and throttling.
-
- This exists to solve the following problem: lets say you want to
- drop-in replace a normal open with urlopen. You want to use a
- progress meter and/or throttling, but how do you do that without
- rewriting your code? Answer: urlopen will return a wrapped file
- object that does the progress meter and-or throttling internally.
- """
-
- def __init__(self, url, filename, opts):
- self.url = url
- self.filename = filename
- self.opts = opts
- self.fo = None
- self._rbuf = ''
- self._rbufsize = 1024*8
- self._ttime = time.time()
- self._tsize = 0
- self._amount_read = 0
- self._opener = None
- self._do_open()
-
- def __getattr__(self, name):
- """This effectively allows us to wrap at the instance level.
- Any attribute not found in _this_ object will be searched for
- in self.fo. This includes methods."""
- if hasattr(self.fo, name):
- return getattr(self.fo, name)
- raise AttributeError, name
-
- def _get_opener(self):
- """Build a urllib2 OpenerDirector based on request options."""
- if self.opts.opener:
- return self.opts.opener
- elif self._opener is None:
- handlers = []
- need_keepalive_handler = (have_keepalive and self.opts.keepalive)
- need_range_handler = (range_handlers and \
- (self.opts.range or self.opts.reget))
- # if you specify a ProxyHandler when creating the opener
- # it _must_ come before all other handlers in the list or urllib2
- # chokes.
- if self.opts.proxies:
- handlers.append( CachedProxyHandler(self.opts.proxies) )
-
- # -------------------------------------------------------
- # OK, these next few lines are a serious kludge to get
- # around what I think is a bug in python 2.2's
- # urllib2. The basic idea is that default handlers
- # get applied first. If you override one (like a
- # proxy handler), then the default gets pulled, but
- # the replacement goes on the end. In the case of
- # proxies, this means the normal handler picks it up
- # first and the proxy isn't used. Now, this probably
- # only happened with ftp or non-keepalive http, so not
- # many folks saw it. The simple approach to fixing it
- # is just to make sure you override the other
- # conflicting defaults as well. I would LOVE to see
- # these go way or be dealt with more elegantly. The
- # problem isn't there after 2.2. -MDS 2005/02/24
- if not need_keepalive_handler:
- handlers.append( urllib2.HTTPHandler() )
- if not need_range_handler:
- handlers.append( urllib2.FTPHandler() )
- # -------------------------------------------------------
-
- ssl_factory = sslfactory.get_factory(self.opts.ssl_ca_cert,
- self.opts.ssl_context)
-
- if need_keepalive_handler:
- handlers.append(HTTPHandler())
- handlers.append(HTTPSHandler(ssl_factory))
- if need_range_handler:
- handlers.extend( range_handlers )
- handlers.append( auth_handler )
- if self.opts.cache_openers:
- self._opener = CachedOpenerDirector(ssl_factory, *handlers)
- else:
- self._opener = ssl_factory.create_opener(*handlers)
- # OK, I don't like to do this, but otherwise, we end up with
- # TWO user-agent headers.
- self._opener.addheaders = []
- return self._opener
-
- def _do_open(self):
- opener = self._get_opener()
-
- req = urllib2.Request(self.url, self.opts.data) # build request object
- self._add_headers(req) # add misc headers that we need
- self._build_range(req) # take care of reget and byterange stuff
-
- fo, hdr = self._make_request(req, opener)
- if self.reget_time and self.opts.reget == 'check_timestamp':
- # do this if we have a local file with known timestamp AND
- # we're in check_timestamp reget mode.
- fetch_again = 0
- try:
- modified_tuple = hdr.getdate_tz('last-modified')
- modified_stamp = rfc822.mktime_tz(modified_tuple)
- if modified_stamp > self.reget_time: fetch_again = 1
- except (TypeError,):
- fetch_again = 1
-
- if fetch_again:
- # the server version is newer than the (incomplete) local
- # version, so we should abandon the version we're getting
- # and fetch the whole thing again.
- fo.close()
- self.opts.reget = None
- del req.headers['Range']
- self._build_range(req)
- fo, hdr = self._make_request(req, opener)
-
- (scheme, host, path, parm, query, frag) = urlparse.urlparse(self.url)
- path = urllib.unquote(path)
- if not (self.opts.progress_obj or self.opts.raw_throttle() \
- or self.opts.timeout):
- # if we're not using the progress_obj, throttling, or timeout
- # we can get a performance boost by going directly to
- # the underlying fileobject for reads.
- self.read = fo.read
- if hasattr(fo, 'readline'):
- self.readline = fo.readline
- elif self.opts.progress_obj:
- try:
- length = int(hdr['Content-Length'])
- length = length + self._amount_read # Account for regets
- except (KeyError, ValueError, TypeError):
- length = None
-
- self.opts.progress_obj.start(str(self.filename),
- urllib.unquote(self.url),
- os.path.basename(path),
- length, text=self.opts.text)
- self.opts.progress_obj.update(0)
- (self.fo, self.hdr) = (fo, hdr)
-
- def _add_headers(self, req):
- if self.opts.user_agent:
- req.add_header('User-agent', self.opts.user_agent)
- try: req_type = req.get_type()
- except ValueError: req_type = None
- if self.opts.http_headers and req_type in ('http', 'https'):
- for h, v in self.opts.http_headers:
- req.add_header(h, v)
- if self.opts.ftp_headers and req_type == 'ftp':
- for h, v in self.opts.ftp_headers:
- req.add_header(h, v)
-
- def _build_range(self, req):
- self.reget_time = None
- self.append = 0
- reget_length = 0
- rt = None
- if have_range and self.opts.reget and type(self.filename) == type(''):
- # we have reget turned on and we're dumping to a file
- try:
- s = os.stat(self.filename)
- except OSError:
- pass
- else:
- self.reget_time = s[ST_MTIME]
- reget_length = s[ST_SIZE]
-
- # Set initial length when regetting
- self._amount_read = reget_length
-
- rt = reget_length, ''
- self.append = 1
-
- if self.opts.range:
- if not have_range:
- raise URLGrabError(10, _('Byte range requested but range '\
- 'support unavailable'))
- rt = self.opts.range
- if rt[0]: rt = (rt[0] + reget_length, rt[1])
-
- if rt:
- header = range_tuple_to_header(rt)
- if header: req.add_header('Range', header)
-
- def _make_request(self, req, opener):
- try:
- if have_socket_timeout and self.opts.timeout:
- old_to = socket.getdefaulttimeout()
- socket.setdefaulttimeout(self.opts.timeout)
- try:
- fo = opener.open(req)
- finally:
- socket.setdefaulttimeout(old_to)
- else:
- fo = opener.open(req)
- hdr = fo.info()
- except ValueError, e:
- raise URLGrabError(1, _('Bad URL: %s') % (e, ))
- except RangeError, e:
- raise URLGrabError(9, str(e))
- except urllib2.HTTPError, e:
- new_e = URLGrabError(14, str(e))
- new_e.code = e.code
- new_e.exception = e
- raise new_e
- except IOError, e:
- if hasattr(e, 'reason') and have_socket_timeout and \
- isinstance(e.reason, TimeoutError):
- raise URLGrabError(12, _('Timeout: %s') % (e, ))
- else:
- raise URLGrabError(4, _('IOError: %s') % (e, ))
- except OSError, e:
- raise URLGrabError(5, _('OSError: %s') % (e, ))
- except HTTPException, e:
- raise URLGrabError(7, _('HTTP Exception (%s): %s') % \
- (e.__class__.__name__, e))
- else:
- return (fo, hdr)
-
- def _do_grab(self):
- """dump the file to self.filename."""
- if self.append: new_fo = open(self.filename, 'ab')
- else: new_fo = open(self.filename, 'wb')
- bs = 1024*8
- size = 0
-
- block = self.read(bs)
- size = size + len(block)
- while block:
- new_fo.write(block)
- block = self.read(bs)
- size = size + len(block)
-
- new_fo.close()
- try:
- modified_tuple = self.hdr.getdate_tz('last-modified')
- modified_stamp = rfc822.mktime_tz(modified_tuple)
- os.utime(self.filename, (modified_stamp, modified_stamp))
- except (TypeError,), e: pass
-
- return size
-
- def _fill_buffer(self, amt=None):
- """fill the buffer to contain at least 'amt' bytes by reading
- from the underlying file object. If amt is None, then it will
- read until it gets nothing more. It updates the progress meter
- and throttles after every self._rbufsize bytes."""
- # the _rbuf test is only in this first 'if' for speed. It's not
- # logically necessary
- if self._rbuf and not amt is None:
- L = len(self._rbuf)
- if amt > L:
- amt = amt - L
- else:
- return
-
- # if we've made it here, then we don't have enough in the buffer
- # and we need to read more.
-
- buf = [self._rbuf]
- bufsize = len(self._rbuf)
- while amt is None or amt:
- # first, delay if necessary for throttling reasons
- if self.opts.raw_throttle():
- diff = self._tsize/self.opts.raw_throttle() - \
- (time.time() - self._ttime)
- if diff > 0: time.sleep(diff)
- self._ttime = time.time()
-
- # now read some data, up to self._rbufsize
- if amt is None: readamount = self._rbufsize
- else: readamount = min(amt, self._rbufsize)
- try:
- new = self.fo.read(readamount)
- except socket.error, e:
- raise URLGrabError(4, _('Socket Error: %s') % (e, ))
- except TimeoutError, e:
- raise URLGrabError(12, _('Timeout: %s') % (e, ))
- except IOError, e:
- raise URLGrabError(4, _('IOError: %s') %(e,))
- newsize = len(new)
- if not newsize: break # no more to read
-
- if amt: amt = amt - newsize
- buf.append(new)
- bufsize = bufsize + newsize
- self._tsize = newsize
- self._amount_read = self._amount_read + newsize
- if self.opts.progress_obj:
- self.opts.progress_obj.update(self._amount_read)
-
- self._rbuf = string.join(buf, '')
- return
-
- def read(self, amt=None):
- self._fill_buffer(amt)
- if amt is None:
- s, self._rbuf = self._rbuf, ''
- else:
- s, self._rbuf = self._rbuf[:amt], self._rbuf[amt:]
- return s
-
- def readline(self, limit=-1):
- i = string.find(self._rbuf, '\n')
- while i < 0 and not (0 < limit <= len(self._rbuf)):
- L = len(self._rbuf)
- self._fill_buffer(L + self._rbufsize)
- if not len(self._rbuf) > L: break
- i = string.find(self._rbuf, '\n', L)
-
- if i < 0: i = len(self._rbuf)
- else: i = i+1
- if 0 <= limit < len(self._rbuf): i = limit
-
- s, self._rbuf = self._rbuf[:i], self._rbuf[i:]
- return s
-
- def close(self):
- if self.opts.progress_obj:
- self.opts.progress_obj.end(self._amount_read)
- self.fo.close()
- if self.opts.close_connection:
- try: self.fo.close_connection()
- except: pass
-
-_handler_cache = []
-def CachedOpenerDirector(ssl_factory = None, *handlers):
- for (cached_handlers, opener) in _handler_cache:
- if cached_handlers == handlers:
- for handler in opener.handlers:
- handler.add_parent(opener)
- return opener
- if not ssl_factory:
- ssl_factory = sslfactory.get_factory()
- opener = ssl_factory.create_opener(*handlers)
- _handler_cache.append( (handlers, opener) )
- return opener
-
-_proxy_cache = []
-def CachedProxyHandler(proxies):
- for (pdict, handler) in _proxy_cache:
- if pdict == proxies:
- if DEBUG: DEBUG.debug('re-using proxy settings: %s', proxies)
- break
- else:
- for k, v in proxies.items():
- utype, url = urllib.splittype(v)
- host, other = urllib.splithost(url)
- if (utype is None) or (host is None):
- raise URLGrabError(13, _('Bad proxy URL: %s') % v)
-
- if DEBUG: DEBUG.info('creating new proxy handler: %s', proxies)
- handler = urllib2.ProxyHandler(proxies)
- _proxy_cache.append( (proxies, handler) )
- return handler
-
-#####################################################################
-# DEPRECATED FUNCTIONS
-def set_throttle(new_throttle):
- """Deprecated. Use: default_grabber.throttle = new_throttle"""
- default_grabber.throttle = new_throttle
-
-def set_bandwidth(new_bandwidth):
- """Deprecated. Use: default_grabber.bandwidth = new_bandwidth"""
- default_grabber.bandwidth = new_bandwidth
-
-def set_progress_obj(new_progress_obj):
- """Deprecated. Use: default_grabber.progress_obj = new_progress_obj"""
- default_grabber.progress_obj = new_progress_obj
-
-def set_user_agent(new_user_agent):
- """Deprecated. Use: default_grabber.user_agent = new_user_agent"""
- default_grabber.user_agent = new_user_agent
-
-def retrygrab(url, filename=None, copy_local=0, close_connection=0,
- progress_obj=None, throttle=None, bandwidth=None,
- numtries=3, retrycodes=[-1,2,4,5,6,7], checkfunc=None):
- """Deprecated. Use: urlgrab() with the retry arg instead"""
- kwargs = {'copy_local' : copy_local,
- 'close_connection' : close_connection,
- 'progress_obj' : progress_obj,
- 'throttle' : throttle,
- 'bandwidth' : bandwidth,
- 'retry' : numtries,
- 'retrycodes' : retrycodes,
- 'checkfunc' : checkfunc
- }
- return urlgrab(url, filename, **kwargs)
-
-
-#####################################################################
-# TESTING
-def _main_test():
- import sys
- try: url, filename = sys.argv[1:3]
- except ValueError:
- print 'usage:', sys.argv[0], \
- '<url> <filename> [copy_local=0|1] [close_connection=0|1]'
- sys.exit()
-
- kwargs = {}
- for a in sys.argv[3:]:
- k, v = string.split(a, '=', 1)
- kwargs[k] = int(v)
-
- set_throttle(1.0)
- set_bandwidth(32 * 1024)
- print "throttle: %s, throttle bandwidth: %s B/s" % (default_grabber.throttle,
- default_grabber.bandwidth)
-
- try: from progress import text_progress_meter
- except ImportError, e: pass
- else: kwargs['progress_obj'] = text_progress_meter()
-
- try: name = apply(urlgrab, (url, filename), kwargs)
- except URLGrabError, e: print e
- else: print 'LOCAL FILE:', name
-
-
-def _retry_test():
- import sys
- try: url, filename = sys.argv[1:3]
- except ValueError:
- print 'usage:', sys.argv[0], \
- '<url> <filename> [copy_local=0|1] [close_connection=0|1]'
- sys.exit()
-
- kwargs = {}
- for a in sys.argv[3:]:
- k, v = string.split(a, '=', 1)
- kwargs[k] = int(v)
-
- try: from progress import text_progress_meter
- except ImportError, e: pass
- else: kwargs['progress_obj'] = text_progress_meter()
-
- def cfunc(filename, hello, there='foo'):
- print hello, there
- import random
- rnum = random.random()
- if rnum < .5:
- print 'forcing retry'
- raise URLGrabError(-1, 'forcing retry')
- if rnum < .75:
- print 'forcing failure'
- raise URLGrabError(-2, 'forcing immediate failure')
- print 'success'
- return
-
- kwargs['checkfunc'] = (cfunc, ('hello',), {'there':'there'})
- try: name = apply(retrygrab, (url, filename), kwargs)
- except URLGrabError, e: print e
- else: print 'LOCAL FILE:', name
-
-def _file_object_test(filename=None):
- import random, cStringIO, sys
- if filename is None:
- filename = __file__
- print 'using file "%s" for comparisons' % filename
- fo = open(filename)
- s_input = fo.read()
- fo.close()
-
- for testfunc in [_test_file_object_smallread,
- _test_file_object_readall,
- _test_file_object_readline,
- _test_file_object_readlines]:
- fo_input = cStringIO.StringIO(s_input)
- fo_output = cStringIO.StringIO()
- wrapper = URLGrabberFileObject(fo_input, None, 0)
- print 'testing %-30s ' % testfunc.__name__,
- testfunc(wrapper, fo_output)
- s_output = fo_output.getvalue()
- if s_output == s_input: print 'passed'
- else: print 'FAILED'
-
-def _test_file_object_smallread(wrapper, fo_output):
- while 1:
- s = wrapper.read(23)
- fo_output.write(s)
- if not s: return
-
-def _test_file_object_readall(wrapper, fo_output):
- s = wrapper.read()
- fo_output.write(s)
-
-def _test_file_object_readline(wrapper, fo_output):
- while 1:
- s = wrapper.readline()
- fo_output.write(s)
- if not s: return
-
-def _test_file_object_readlines(wrapper, fo_output):
- li = wrapper.readlines()
- fo_output.write(string.join(li, ''))
-
-if __name__ == '__main__':
- _main_test()
- _retry_test()
- _file_object_test('test')
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py
deleted file mode 100644
index 71393e2b8d..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py
+++ /dev/null
@@ -1,617 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-# Copyright 2002-2004 Michael D. Stenner, Ryan Tomayko
-
-"""An HTTP handler for urllib2 that supports HTTP 1.1 and keepalive.
-
->>> import urllib2
->>> from keepalive import HTTPHandler
->>> keepalive_handler = HTTPHandler()
->>> opener = urllib2.build_opener(keepalive_handler)
->>> urllib2.install_opener(opener)
->>>
->>> fo = urllib2.urlopen('http://www.python.org')
-
-If a connection to a given host is requested, and all of the existing
-connections are still in use, another connection will be opened. If
-the handler tries to use an existing connection but it fails in some
-way, it will be closed and removed from the pool.
-
-To remove the handler, simply re-run build_opener with no arguments, and
-install that opener.
-
-You can explicitly close connections by using the close_connection()
-method of the returned file-like object (described below) or you can
-use the handler methods:
-
- close_connection(host)
- close_all()
- open_connections()
-
-NOTE: using the close_connection and close_all methods of the handler
-should be done with care when using multiple threads.
- * there is nothing that prevents another thread from creating new
- connections immediately after connections are closed
- * no checks are done to prevent in-use connections from being closed
-
->>> keepalive_handler.close_all()
-
-EXTRA ATTRIBUTES AND METHODS
-
- Upon a status of 200, the object returned has a few additional
- attributes and methods, which should not be used if you want to
- remain consistent with the normal urllib2-returned objects:
-
- close_connection() - close the connection to the host
- readlines() - you know, readlines()
- status - the return status (ie 404)
- reason - english translation of status (ie 'File not found')
-
- If you want the best of both worlds, use this inside an
- AttributeError-catching try:
-
- >>> try: status = fo.status
- >>> except AttributeError: status = None
-
- Unfortunately, these are ONLY there if status == 200, so it's not
- easy to distinguish between non-200 responses. The reason is that
- urllib2 tries to do clever things with error codes 301, 302, 401,
- and 407, and it wraps the object upon return.
-
- For python versions earlier than 2.4, you can avoid this fancy error
- handling by setting the module-level global HANDLE_ERRORS to zero.
- You see, prior to 2.4, it's the HTTP Handler's job to determine what
- to handle specially, and what to just pass up. HANDLE_ERRORS == 0
- means "pass everything up". In python 2.4, however, this job no
- longer belongs to the HTTP Handler and is now done by a NEW handler,
- HTTPErrorProcessor. Here's the bottom line:
-
- python version < 2.4
- HANDLE_ERRORS == 1 (default) pass up 200, treat the rest as
- errors
- HANDLE_ERRORS == 0 pass everything up, error processing is
- left to the calling code
- python version >= 2.4
- HANDLE_ERRORS == 1 pass up 200, treat the rest as errors
- HANDLE_ERRORS == 0 (default) pass everything up, let the
- other handlers (specifically,
- HTTPErrorProcessor) decide what to do
-
- In practice, setting the variable either way makes little difference
- in python 2.4, so for the most consistent behavior across versions,
- you probably just want to use the defaults, which will give you
- exceptions on errors.
-
-"""
-
-# $Id: keepalive.py,v 1.16 2006/09/22 00:58:05 mstenner Exp $
-
-import urllib2
-import httplib
-import socket
-import thread
-
-DEBUG = None
-
-import sslfactory
-
-import sys
-if sys.version_info < (2, 4): HANDLE_ERRORS = 1
-else: HANDLE_ERRORS = 0
-
-class ConnectionManager:
- """
- The connection manager must be able to:
- * keep track of all existing
- """
- def __init__(self):
- self._lock = thread.allocate_lock()
- self._hostmap = {} # map hosts to a list of connections
- self._connmap = {} # map connections to host
- self._readymap = {} # map connection to ready state
-
- def add(self, host, connection, ready):
- self._lock.acquire()
- try:
- if not self._hostmap.has_key(host): self._hostmap[host] = []
- self._hostmap[host].append(connection)
- self._connmap[connection] = host
- self._readymap[connection] = ready
- finally:
- self._lock.release()
-
- def remove(self, connection):
- self._lock.acquire()
- try:
- try:
- host = self._connmap[connection]
- except KeyError:
- pass
- else:
- del self._connmap[connection]
- del self._readymap[connection]
- self._hostmap[host].remove(connection)
- if not self._hostmap[host]: del self._hostmap[host]
- finally:
- self._lock.release()
-
- def set_ready(self, connection, ready):
- try: self._readymap[connection] = ready
- except KeyError: pass
-
- def get_ready_conn(self, host):
- conn = None
- self._lock.acquire()
- try:
- if self._hostmap.has_key(host):
- for c in self._hostmap[host]:
- if self._readymap[c]:
- self._readymap[c] = 0
- conn = c
- break
- finally:
- self._lock.release()
- return conn
-
- def get_all(self, host=None):
- if host:
- return list(self._hostmap.get(host, []))
- else:
- return dict(self._hostmap)
-
-class KeepAliveHandler:
- def __init__(self):
- self._cm = ConnectionManager()
-
- #### Connection Management
- def open_connections(self):
- """return a list of connected hosts and the number of connections
- to each. [('foo.com:80', 2), ('bar.org', 1)]"""
- return [(host, len(li)) for (host, li) in self._cm.get_all().items()]
-
- def close_connection(self, host):
- """close connection(s) to <host>
- host is the host:port spec, as in 'www.cnn.com:8080' as passed in.
- no error occurs if there is no connection to that host."""
- for h in self._cm.get_all(host):
- self._cm.remove(h)
- h.close()
-
- def close_all(self):
- """close all open connections"""
- for host, conns in self._cm.get_all().items():
- for h in conns:
- self._cm.remove(h)
- h.close()
-
- def _request_closed(self, request, host, connection):
- """tells us that this request is now closed and the the
- connection is ready for another request"""
- self._cm.set_ready(connection, 1)
-
- def _remove_connection(self, host, connection, close=0):
- if close: connection.close()
- self._cm.remove(connection)
-
- #### Transaction Execution
- def do_open(self, req):
- host = req.get_host()
- if not host:
- raise urllib2.URLError('no host given')
-
- try:
- h = self._cm.get_ready_conn(host)
- while h:
- r = self._reuse_connection(h, req, host)
-
- # if this response is non-None, then it worked and we're
- # done. Break out, skipping the else block.
- if r: break
-
- # connection is bad - possibly closed by server
- # discard it and ask for the next free connection
- h.close()
- self._cm.remove(h)
- h = self._cm.get_ready_conn(host)
- else:
- # no (working) free connections were found. Create a new one.
- h = self._get_connection(host)
- if DEBUG: DEBUG.info("creating new connection to %s (%d)",
- host, id(h))
- self._cm.add(host, h, 0)
- self._start_transaction(h, req)
- r = h.getresponse()
- except (socket.error, httplib.HTTPException), err:
- raise urllib2.URLError(err)
-
- # if not a persistent connection, don't try to reuse it
- if r.will_close: self._cm.remove(h)
-
- if DEBUG: DEBUG.info("STATUS: %s, %s", r.status, r.reason)
- r._handler = self
- r._host = host
- r._url = req.get_full_url()
- r._connection = h
- r.code = r.status
- r.headers = r.msg
- r.msg = r.reason
-
- if r.status == 200 or not HANDLE_ERRORS:
- return r
- else:
- return self.parent.error('http', req, r,
- r.status, r.msg, r.headers)
-
- def _reuse_connection(self, h, req, host):
- """start the transaction with a re-used connection
- return a response object (r) upon success or None on failure.
- This DOES not close or remove bad connections in cases where
- it returns. However, if an unexpected exception occurs, it
- will close and remove the connection before re-raising.
- """
- try:
- self._start_transaction(h, req)
- r = h.getresponse()
- # note: just because we got something back doesn't mean it
- # worked. We'll check the version below, too.
- except (socket.error, httplib.HTTPException):
- r = None
- except:
- # adding this block just in case we've missed
- # something we will still raise the exception, but
- # lets try and close the connection and remove it
- # first. We previously got into a nasty loop
- # where an exception was uncaught, and so the
- # connection stayed open. On the next try, the
- # same exception was raised, etc. The tradeoff is
- # that it's now possible this call will raise
- # a DIFFERENT exception
- if DEBUG: DEBUG.error("unexpected exception - closing " + \
- "connection to %s (%d)", host, id(h))
- self._cm.remove(h)
- h.close()
- raise
-
- if r is None or r.version == 9:
- # httplib falls back to assuming HTTP 0.9 if it gets a
- # bad header back. This is most likely to happen if
- # the socket has been closed by the server since we
- # last used the connection.
- if DEBUG: DEBUG.info("failed to re-use connection to %s (%d)",
- host, id(h))
- r = None
- else:
- if DEBUG: DEBUG.info("re-using connection to %s (%d)", host, id(h))
-
- return r
-
- def _start_transaction(self, h, req):
- try:
- if req.has_data():
- data = req.get_data()
- h.putrequest('POST', req.get_selector())
- if not req.headers.has_key('Content-type'):
- h.putheader('Content-type',
- 'application/x-www-form-urlencoded')
- if not req.headers.has_key('Content-length'):
- h.putheader('Content-length', '%d' % len(data))
- else:
- h.putrequest('GET', req.get_selector())
- except (socket.error, httplib.HTTPException), err:
- raise urllib2.URLError(err)
-
- for args in self.parent.addheaders:
- h.putheader(*args)
- for k, v in req.headers.items():
- h.putheader(k, v)
- h.endheaders()
- if req.has_data():
- h.send(data)
-
- def _get_connection(self, host):
- return NotImplementedError
-
-class HTTPHandler(KeepAliveHandler, urllib2.HTTPHandler):
- def __init__(self):
- KeepAliveHandler.__init__(self)
-
- def http_open(self, req):
- return self.do_open(req)
-
- def _get_connection(self, host):
- return HTTPConnection(host)
-
-class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
- def __init__(self, ssl_factory=None):
- KeepAliveHandler.__init__(self)
- if not ssl_factory:
- ssl_factory = sslfactory.get_factory()
- self._ssl_factory = ssl_factory
-
- def https_open(self, req):
- return self.do_open(req)
-
- def _get_connection(self, host):
- return self._ssl_factory.get_https_connection(host)
-
-class HTTPResponse(httplib.HTTPResponse):
- # we need to subclass HTTPResponse in order to
- # 1) add readline() and readlines() methods
- # 2) add close_connection() methods
- # 3) add info() and geturl() methods
-
- # in order to add readline(), read must be modified to deal with a
- # buffer. example: readline must read a buffer and then spit back
- # one line at a time. The only real alternative is to read one
- # BYTE at a time (ick). Once something has been read, it can't be
- # put back (ok, maybe it can, but that's even uglier than this),
- # so if you THEN do a normal read, you must first take stuff from
- # the buffer.
-
- # the read method wraps the original to accomodate buffering,
- # although read() never adds to the buffer.
- # Both readline and readlines have been stolen with almost no
- # modification from socket.py
-
-
- def __init__(self, sock, debuglevel=0, strict=0, method=None):
- if method: # the httplib in python 2.3 uses the method arg
- httplib.HTTPResponse.__init__(self, sock, debuglevel, method)
- else: # 2.2 doesn't
- httplib.HTTPResponse.__init__(self, sock, debuglevel)
- self.fileno = sock.fileno
- self.code = None
- self._rbuf = ''
- self._rbufsize = 8096
- self._handler = None # inserted by the handler later
- self._host = None # (same)
- self._url = None # (same)
- self._connection = None # (same)
-
- _raw_read = httplib.HTTPResponse.read
-
- def close(self):
- if self.fp:
- self.fp.close()
- self.fp = None
- if self._handler:
- self._handler._request_closed(self, self._host,
- self._connection)
-
- def close_connection(self):
- self._handler._remove_connection(self._host, self._connection, close=1)
- self.close()
-
- def info(self):
- return self.headers
-
- def geturl(self):
- return self._url
-
- def read(self, amt=None):
- # the _rbuf test is only in this first if for speed. It's not
- # logically necessary
- if self._rbuf and not amt is None:
- L = len(self._rbuf)
- if amt > L:
- amt -= L
- else:
- s = self._rbuf[:amt]
- self._rbuf = self._rbuf[amt:]
- return s
-
- s = self._rbuf + self._raw_read(amt)
- self._rbuf = ''
- return s
-
- def readline(self, limit=-1):
- data = ""
- i = self._rbuf.find('\n')
- while i < 0 and not (0 < limit <= len(self._rbuf)):
- new = self._raw_read(self._rbufsize)
- if not new: break
- i = new.find('\n')
- if i >= 0: i = i + len(self._rbuf)
- self._rbuf = self._rbuf + new
- if i < 0: i = len(self._rbuf)
- else: i = i+1
- if 0 <= limit < len(self._rbuf): i = limit
- data, self._rbuf = self._rbuf[:i], self._rbuf[i:]
- return data
-
- def readlines(self, sizehint = 0):
- total = 0
- list = []
- while 1:
- line = self.readline()
- if not line: break
- list.append(line)
- total += len(line)
- if sizehint and total >= sizehint:
- break
- return list
-
-
-class HTTPConnection(httplib.HTTPConnection):
- # use the modified response class
- response_class = HTTPResponse
-
-class HTTPSConnection(httplib.HTTPSConnection):
- response_class = HTTPResponse
-
-#########################################################################
-##### TEST FUNCTIONS
-#########################################################################
-
-def error_handler(url):
- global HANDLE_ERRORS
- orig = HANDLE_ERRORS
- keepalive_handler = HTTPHandler()
- opener = urllib2.build_opener(keepalive_handler)
- urllib2.install_opener(opener)
- pos = {0: 'off', 1: 'on'}
- for i in (0, 1):
- print " fancy error handling %s (HANDLE_ERRORS = %i)" % (pos[i], i)
- HANDLE_ERRORS = i
- try:
- fo = urllib2.urlopen(url)
- foo = fo.read()
- fo.close()
- try: status, reason = fo.status, fo.reason
- except AttributeError: status, reason = None, None
- except IOError, e:
- print " EXCEPTION: %s" % e
- raise
- else:
- print " status = %s, reason = %s" % (status, reason)
- HANDLE_ERRORS = orig
- hosts = keepalive_handler.open_connections()
- print "open connections:", hosts
- keepalive_handler.close_all()
-
-def continuity(url):
- import md5
- format = '%25s: %s'
-
- # first fetch the file with the normal http handler
- opener = urllib2.build_opener()
- urllib2.install_opener(opener)
- fo = urllib2.urlopen(url)
- foo = fo.read()
- fo.close()
- m = md5.new(foo)
- print format % ('normal urllib', m.hexdigest())
-
- # now install the keepalive handler and try again
- opener = urllib2.build_opener(HTTPHandler())
- urllib2.install_opener(opener)
-
- fo = urllib2.urlopen(url)
- foo = fo.read()
- fo.close()
- m = md5.new(foo)
- print format % ('keepalive read', m.hexdigest())
-
- fo = urllib2.urlopen(url)
- foo = ''
- while 1:
- f = fo.readline()
- if f: foo = foo + f
- else: break
- fo.close()
- m = md5.new(foo)
- print format % ('keepalive readline', m.hexdigest())
-
-def comp(N, url):
- print ' making %i connections to:\n %s' % (N, url)
-
- sys.stdout.write(' first using the normal urllib handlers')
- # first use normal opener
- opener = urllib2.build_opener()
- urllib2.install_opener(opener)
- t1 = fetch(N, url)
- print ' TIME: %.3f s' % t1
-
- sys.stdout.write(' now using the keepalive handler ')
- # now install the keepalive handler and try again
- opener = urllib2.build_opener(HTTPHandler())
- urllib2.install_opener(opener)
- t2 = fetch(N, url)
- print ' TIME: %.3f s' % t2
- print ' improvement factor: %.2f' % (t1/t2, )
-
-def fetch(N, url, delay=0):
- import time
- lens = []
- starttime = time.time()
- for i in range(N):
- if delay and i > 0: time.sleep(delay)
- fo = urllib2.urlopen(url)
- foo = fo.read()
- fo.close()
- lens.append(len(foo))
- diff = time.time() - starttime
-
- j = 0
- for i in lens[1:]:
- j = j + 1
- if not i == lens[0]:
- print "WARNING: inconsistent length on read %i: %i" % (j, i)
-
- return diff
-
-def test_timeout(url):
- global DEBUG
- dbbackup = DEBUG
- class FakeLogger:
- def debug(self, msg, *args): print msg % args
- info = warning = error = debug
- DEBUG = FakeLogger()
- print " fetching the file to establish a connection"
- fo = urllib2.urlopen(url)
- data1 = fo.read()
- fo.close()
-
- i = 20
- print " waiting %i seconds for the server to close the connection" % i
- while i > 0:
- sys.stdout.write('\r %2i' % i)
- sys.stdout.flush()
- time.sleep(1)
- i -= 1
- sys.stderr.write('\r')
-
- print " fetching the file a second time"
- fo = urllib2.urlopen(url)
- data2 = fo.read()
- fo.close()
-
- if data1 == data2:
- print ' data are identical'
- else:
- print ' ERROR: DATA DIFFER'
-
- DEBUG = dbbackup
-
-
-def test(url, N=10):
- print "checking error hander (do this on a non-200)"
- try: error_handler(url)
- except IOError, e:
- print "exiting - exception will prevent further tests"
- sys.exit()
- print
- print "performing continuity test (making sure stuff isn't corrupted)"
- continuity(url)
- print
- print "performing speed comparison"
- comp(N, url)
- print
- print "performing dropped-connection check"
- test_timeout(url)
-
-if __name__ == '__main__':
- import time
- import sys
- try:
- N = int(sys.argv[1])
- url = sys.argv[2]
- except:
- print "%s <integer> <url>" % sys.argv[0]
- else:
- test(url, N)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py
deleted file mode 100644
index 9664c6b5c5..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py
+++ /dev/null
@@ -1,458 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-# Copyright 2002-2004 Michael D. Stenner, Ryan Tomayko
-
-"""Module for downloading files from a pool of mirrors
-
-DESCRIPTION
-
- This module provides support for downloading files from a pool of
- mirrors with configurable failover policies. To a large extent, the
- failover policy is chosen by using different classes derived from
- the main class, MirrorGroup.
-
- Instances of MirrorGroup (and cousins) act very much like URLGrabber
- instances in that they have urlread, urlgrab, and urlopen methods.
- They can therefore, be used in very similar ways.
-
- from urlgrabber.grabber import URLGrabber
- from urlgrabber.mirror import MirrorGroup
- gr = URLGrabber()
- mg = MirrorGroup(gr, ['http://foo.com/some/directory/',
- 'http://bar.org/maybe/somewhere/else/',
- 'ftp://baz.net/some/other/place/entirely/']
- mg.urlgrab('relative/path.zip')
-
- The assumption is that all mirrors are identical AFTER the base urls
- specified, so that any mirror can be used to fetch any file.
-
-FAILOVER
-
- The failover mechanism is designed to be customized by subclassing
- from MirrorGroup to change the details of the behavior. In general,
- the classes maintain a master mirror list and a "current mirror"
- index. When a download is initiated, a copy of this list and index
- is created for that download only. The specific failover policy
- depends on the class used, and so is documented in the class
- documentation. Note that ANY behavior of the class can be
- overridden, so any failover policy at all is possible (although
- you may need to change the interface in extreme cases).
-
-CUSTOMIZATION
-
- Most customization of a MirrorGroup object is done at instantiation
- time (or via subclassing). There are four major types of
- customization:
-
- 1) Pass in a custom urlgrabber - The passed in urlgrabber will be
- used (by default... see #2) for the grabs, so options to it
- apply for the url-fetching
-
- 2) Custom mirror list - Mirror lists can simply be a list of
- stings mirrors (as shown in the example above) but each can
- also be a dict, allowing for more options. For example, the
- first mirror in the list above could also have been:
-
- {'mirror': 'http://foo.com/some/directory/',
- 'grabber': <a custom grabber to be used for this mirror>,
- 'kwargs': { <a dict of arguments passed to the grabber> }}
-
- All mirrors are converted to this format internally. If
- 'grabber' is omitted, the default grabber will be used. If
- kwargs are omitted, then (duh) they will not be used.
-
- 3) Pass keyword arguments when instantiating the mirror group.
- See, for example, the failure_callback argument.
-
- 4) Finally, any kwargs passed in for the specific file (to the
- urlgrab method, for example) will be folded in. The options
- passed into the grabber's urlXXX methods will override any
- options specified in a custom mirror dict.
-
-"""
-
-# $Id: mirror.py,v 1.14 2006/02/22 18:26:46 mstenner Exp $
-
-import random
-import thread # needed for locking to make this threadsafe
-
-from grabber import URLGrabError, CallbackObject, DEBUG
-
-try:
- from i18n import _
-except ImportError, msg:
- def _(st): return st
-
-class GrabRequest:
- """This is a dummy class used to hold information about the specific
- request. For example, a single file. By maintaining this information
- separately, we can accomplish two things:
-
- 1) make it a little easier to be threadsafe
- 2) have request-specific parameters
- """
- pass
-
-class MirrorGroup:
- """Base Mirror class
-
- Instances of this class are built with a grabber object and a list
- of mirrors. Then all calls to urlXXX should be passed relative urls.
- The requested file will be searched for on the first mirror. If the
- grabber raises an exception (possibly after some retries) then that
- mirror will be removed from the list, and the next will be attempted.
- If all mirrors are exhausted, then an exception will be raised.
-
- MirrorGroup has the following failover policy:
-
- * downloads begin with the first mirror
-
- * by default (see default_action below) a failure (after retries)
- causes it to increment the local AND master indices. Also,
- the current mirror is removed from the local list (but NOT the
- master list - the mirror can potentially be used for other
- files)
-
- * if the local list is ever exhausted, a URLGrabError will be
- raised (errno=256, no more mirrors)
-
- OPTIONS
-
- In addition to the required arguments "grabber" and "mirrors",
- MirrorGroup also takes the following optional arguments:
-
- default_action
-
- A dict that describes the actions to be taken upon failure
- (after retries). default_action can contain any of the
- following keys (shown here with their default values):
-
- default_action = {'increment': 1,
- 'increment_master': 1,
- 'remove': 1,
- 'remove_master': 0,
- 'fail': 0}
-
- In this context, 'increment' means "use the next mirror" and
- 'remove' means "never use this mirror again". The two
- 'master' values refer to the instance-level mirror list (used
- for all files), whereas the non-master values refer to the
- current download only.
-
- The 'fail' option will cause immediate failure by re-raising
- the exception and no further attempts to get the current
- download.
-
- This dict can be set at instantiation time,
- mg = MirrorGroup(grabber, mirrors, default_action={'fail':1})
- at method-execution time (only applies to current fetch),
- filename = mg.urlgrab(url, default_action={'increment': 0})
- or by returning an action dict from the failure_callback
- return {'fail':0}
- in increasing precedence.
-
- If all three of these were done, the net result would be:
- {'increment': 0, # set in method
- 'increment_master': 1, # class default
- 'remove': 1, # class default
- 'remove_master': 0, # class default
- 'fail': 0} # set at instantiation, reset
- # from callback
-
- failure_callback
-
- this is a callback that will be called when a mirror "fails",
- meaning the grabber raises some URLGrabError. If this is a
- tuple, it is interpreted to be of the form (cb, args, kwargs)
- where cb is the actual callable object (function, method,
- etc). Otherwise, it is assumed to be the callable object
- itself. The callback will be passed a grabber.CallbackObject
- instance along with args and kwargs (if present). The following
- attributes are defined withing the instance:
-
- obj.exception = < exception that was raised >
- obj.mirror = < the mirror that was tried >
- obj.relative_url = < url relative to the mirror >
- obj.url = < full url that failed >
- # .url is just the combination of .mirror
- # and .relative_url
-
- The failure callback can return an action dict, as described
- above.
-
- Like default_action, the failure_callback can be set at
- instantiation time or when the urlXXX method is called. In
- the latter case, it applies only for that fetch.
-
- The callback can re-raise the exception quite easily. For
- example, this is a perfectly adequate callback function:
-
- def callback(obj): raise obj.exception
-
- WARNING: do not save the exception object (or the
- CallbackObject instance). As they contain stack frame
- references, they can lead to circular references.
-
- Notes:
- * The behavior can be customized by deriving and overriding the
- 'CONFIGURATION METHODS'
- * The 'grabber' instance is kept as a reference, not copied.
- Therefore, the grabber instance can be modified externally
- and changes will take effect immediately.
- """
-
- # notes on thread-safety:
-
- # A GrabRequest should never be shared by multiple threads because
- # it's never saved inside the MG object and never returned outside it.
- # therefore, it should be safe to access/modify grabrequest data
- # without a lock. However, accessing the mirrors and _next attributes
- # of the MG itself must be done when locked to prevent (for example)
- # removal of the wrong mirror.
-
- ##############################################################
- # CONFIGURATION METHODS - intended to be overridden to
- # customize behavior
- def __init__(self, grabber, mirrors, **kwargs):
- """Initialize the MirrorGroup object.
-
- REQUIRED ARGUMENTS
-
- grabber - URLGrabber instance
- mirrors - a list of mirrors
-
- OPTIONAL ARGUMENTS
-
- failure_callback - callback to be used when a mirror fails
- default_action - dict of failure actions
-
- See the module-level and class level documentation for more
- details.
- """
-
- # OVERRIDE IDEAS:
- # shuffle the list to randomize order
- self.grabber = grabber
- self.mirrors = self._parse_mirrors(mirrors)
- self._next = 0
- self._lock = thread.allocate_lock()
- self.default_action = None
- self._process_kwargs(kwargs)
-
- # if these values are found in **kwargs passed to one of the urlXXX
- # methods, they will be stripped before getting passed on to the
- # grabber
- options = ['default_action', 'failure_callback']
-
- def _process_kwargs(self, kwargs):
- self.failure_callback = kwargs.get('failure_callback')
- self.default_action = kwargs.get('default_action')
-
- def _parse_mirrors(self, mirrors):
- parsed_mirrors = []
- for m in mirrors:
- if type(m) == type(''): m = {'mirror': m}
- parsed_mirrors.append(m)
- return parsed_mirrors
-
- def _load_gr(self, gr):
- # OVERRIDE IDEAS:
- # shuffle gr list
- self._lock.acquire()
- gr.mirrors = list(self.mirrors)
- gr._next = self._next
- self._lock.release()
-
- def _get_mirror(self, gr):
- # OVERRIDE IDEAS:
- # return a random mirror so that multiple mirrors get used
- # even without failures.
- if not gr.mirrors:
- raise URLGrabError(256, _('No more mirrors to try.'))
- return gr.mirrors[gr._next]
-
- def _failure(self, gr, cb_obj):
- # OVERRIDE IDEAS:
- # inspect the error - remove=1 for 404, remove=2 for connection
- # refused, etc. (this can also be done via
- # the callback)
- cb = gr.kw.get('failure_callback') or self.failure_callback
- if cb:
- if type(cb) == type( () ):
- cb, args, kwargs = cb
- else:
- args, kwargs = (), {}
- action = cb(cb_obj, *args, **kwargs) or {}
- else:
- action = {}
- # XXXX - decide - there are two ways to do this
- # the first is action-overriding as a whole - use the entire action
- # or fall back on module level defaults
- #action = action or gr.kw.get('default_action') or self.default_action
- # the other is to fall through for each element in the action dict
- a = dict(self.default_action or {})
- a.update(gr.kw.get('default_action', {}))
- a.update(action)
- action = a
- self.increment_mirror(gr, action)
- if action and action.get('fail', 0): raise
-
- def increment_mirror(self, gr, action={}):
- """Tell the mirror object increment the mirror index
-
- This increments the mirror index, which amounts to telling the
- mirror object to use a different mirror (for this and future
- downloads).
-
- This is a SEMI-public method. It will be called internally,
- and you may never need to call it. However, it is provided
- (and is made public) so that the calling program can increment
- the mirror choice for methods like urlopen. For example, with
- urlopen, there's no good way for the mirror group to know that
- an error occurs mid-download (it's already returned and given
- you the file object).
-
- remove --- can have several values
- 0 do not remove the mirror from the list
- 1 remove the mirror for this download only
- 2 remove the mirror permanently
-
- beware of remove=0 as it can lead to infinite loops
- """
- badmirror = gr.mirrors[gr._next]
-
- self._lock.acquire()
- try:
- ind = self.mirrors.index(badmirror)
- except ValueError:
- pass
- else:
- if action.get('remove_master', 0):
- del self.mirrors[ind]
- elif self._next == ind and action.get('increment_master', 1):
- self._next += 1
- if self._next >= len(self.mirrors): self._next = 0
- self._lock.release()
-
- if action.get('remove', 1):
- del gr.mirrors[gr._next]
- elif action.get('increment', 1):
- gr._next += 1
- if gr._next >= len(gr.mirrors): gr._next = 0
-
- if DEBUG:
- grm = [m['mirror'] for m in gr.mirrors]
- DEBUG.info('GR mirrors: [%s] %i', ' '.join(grm), gr._next)
- selfm = [m['mirror'] for m in self.mirrors]
- DEBUG.info('MAIN mirrors: [%s] %i', ' '.join(selfm), self._next)
-
- #####################################################################
- # NON-CONFIGURATION METHODS
- # these methods are designed to be largely workhorse methods that
- # are not intended to be overridden. That doesn't mean you can't;
- # if you want to, feel free, but most things can be done by
- # by overriding the configuration methods :)
-
- def _join_url(self, base_url, rel_url):
- if base_url.endswith('/') or rel_url.startswith('/'):
- return base_url + rel_url
- else:
- return base_url + '/' + rel_url
-
- def _mirror_try(self, func, url, kw):
- gr = GrabRequest()
- gr.func = func
- gr.url = url
- gr.kw = dict(kw)
- self._load_gr(gr)
-
- for k in self.options:
- try: del kw[k]
- except KeyError: pass
-
- while 1:
- mirrorchoice = self._get_mirror(gr)
- fullurl = self._join_url(mirrorchoice['mirror'], gr.url)
- kwargs = dict(mirrorchoice.get('kwargs', {}))
- kwargs.update(kw)
- grabber = mirrorchoice.get('grabber') or self.grabber
- func_ref = getattr(grabber, func)
- if DEBUG: DEBUG.info('MIRROR: trying %s -> %s', url, fullurl)
- try:
- return func_ref( *(fullurl,), **kwargs )
- except URLGrabError, e:
- if DEBUG: DEBUG.info('MIRROR: failed')
- obj = CallbackObject()
- obj.exception = e
- obj.mirror = mirrorchoice['mirror']
- obj.relative_url = gr.url
- obj.url = fullurl
- self._failure(gr, obj)
-
- def urlgrab(self, url, filename=None, **kwargs):
- kw = dict(kwargs)
- kw['filename'] = filename
- func = 'urlgrab'
- return self._mirror_try(func, url, kw)
-
- def urlopen(self, url, **kwargs):
- kw = dict(kwargs)
- func = 'urlopen'
- return self._mirror_try(func, url, kw)
-
- def urlread(self, url, limit=None, **kwargs):
- kw = dict(kwargs)
- kw['limit'] = limit
- func = 'urlread'
- return self._mirror_try(func, url, kw)
-
-
-class MGRandomStart(MirrorGroup):
- """A mirror group that starts at a random mirror in the list.
-
- This behavior of this class is identical to MirrorGroup, except that
- it starts at a random location in the mirror list.
- """
-
- def __init__(self, grabber, mirrors, **kwargs):
- """Initialize the object
-
- The arguments for intialization are the same as for MirrorGroup
- """
- MirrorGroup.__init__(self, grabber, mirrors, **kwargs)
- self._next = random.randrange(len(mirrors))
-
-class MGRandomOrder(MirrorGroup):
- """A mirror group that uses mirrors in a random order.
-
- This behavior of this class is identical to MirrorGroup, except that
- it uses the mirrors in a random order. Note that the order is set at
- initialization time and fixed thereafter. That is, it does not pick a
- random mirror after each failure.
- """
-
- def __init__(self, grabber, mirrors, **kwargs):
- """Initialize the object
-
- The arguments for intialization are the same as for MirrorGroup
- """
- MirrorGroup.__init__(self, grabber, mirrors, **kwargs)
- random.shuffle(self.mirrors)
-
-if __name__ == '__main__':
- pass
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py
deleted file mode 100644
index 02db524e76..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py
+++ /dev/null
@@ -1,530 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-# Copyright 2002-2004 Michael D. Stenner, Ryan Tomayko
-
-# $Id: progress.py,v 1.7 2005/08/19 21:59:07 mstenner Exp $
-
-import sys
-import time
-import math
-import thread
-
-class BaseMeter:
- def __init__(self):
- self.update_period = 0.3 # seconds
-
- self.filename = None
- self.url = None
- self.basename = None
- self.text = None
- self.size = None
- self.start_time = None
- self.last_amount_read = 0
- self.last_update_time = None
- self.re = RateEstimator()
-
- def start(self, filename=None, url=None, basename=None,
- size=None, now=None, text=None):
- self.filename = filename
- self.url = url
- self.basename = basename
- self.text = text
-
- #size = None ######### TESTING
- self.size = size
- if not size is None: self.fsize = format_number(size) + 'B'
-
- if now is None: now = time.time()
- self.start_time = now
- self.re.start(size, now)
- self.last_amount_read = 0
- self.last_update_time = now
- self._do_start(now)
-
- def _do_start(self, now=None):
- pass
-
- def update(self, amount_read, now=None):
- # for a real gui, you probably want to override and put a call
- # to your mainloop iteration function here
- if now is None: now = time.time()
- if (now >= self.last_update_time + self.update_period) or \
- not self.last_update_time:
- self.re.update(amount_read, now)
- self.last_amount_read = amount_read
- self.last_update_time = now
- self._do_update(amount_read, now)
-
- def _do_update(self, amount_read, now=None):
- pass
-
- def end(self, amount_read, now=None):
- if now is None: now = time.time()
- self.re.update(amount_read, now)
- self.last_amount_read = amount_read
- self.last_update_time = now
- self._do_end(amount_read, now)
-
- def _do_end(self, amount_read, now=None):
- pass
-
-class TextMeter(BaseMeter):
- def __init__(self, fo=sys.stderr):
- BaseMeter.__init__(self)
- self.fo = fo
-
- def _do_update(self, amount_read, now=None):
- etime = self.re.elapsed_time()
- fetime = format_time(etime)
- fread = format_number(amount_read)
- #self.size = None
- if self.text is not None:
- text = self.text
- else:
- text = self.basename
- if self.size is None:
- out = '\r%-60.60s %5sB %s ' % \
- (text, fread, fetime)
- else:
- rtime = self.re.remaining_time()
- frtime = format_time(rtime)
- frac = self.re.fraction_read()
- bar = '='*int(25 * frac)
-
- out = '\r%-25.25s %3i%% |%-25.25s| %5sB %8s ETA ' % \
- (text, frac*100, bar, fread, frtime)
-
- self.fo.write(out)
- self.fo.flush()
-
- def _do_end(self, amount_read, now=None):
- total_time = format_time(self.re.elapsed_time())
- total_size = format_number(amount_read)
- if self.text is not None:
- text = self.text
- else:
- text = self.basename
- if self.size is None:
- out = '\r%-60.60s %5sB %s ' % \
- (text, total_size, total_time)
- else:
- bar = '='*25
- out = '\r%-25.25s %3i%% |%-25.25s| %5sB %8s ' % \
- (text, 100, bar, total_size, total_time)
- self.fo.write(out + '\n')
- self.fo.flush()
-
-text_progress_meter = TextMeter
-
-class MultiFileHelper(BaseMeter):
- def __init__(self, master):
- BaseMeter.__init__(self)
- self.master = master
-
- def _do_start(self, now):
- self.master.start_meter(self, now)
-
- def _do_update(self, amount_read, now):
- # elapsed time since last update
- self.master.update_meter(self, now)
-
- def _do_end(self, amount_read, now):
- self.ftotal_time = format_time(now - self.start_time)
- self.ftotal_size = format_number(self.last_amount_read)
- self.master.end_meter(self, now)
-
- def failure(self, message, now=None):
- self.master.failure_meter(self, message, now)
-
- def message(self, message):
- self.master.message_meter(self, message)
-
-class MultiFileMeter:
- helperclass = MultiFileHelper
- def __init__(self):
- self.meters = []
- self.in_progress_meters = []
- self._lock = thread.allocate_lock()
- self.update_period = 0.3 # seconds
-
- self.numfiles = None
- self.finished_files = 0
- self.failed_files = 0
- self.open_files = 0
- self.total_size = None
- self.failed_size = 0
- self.start_time = None
- self.finished_file_size = 0
- self.last_update_time = None
- self.re = RateEstimator()
-
- def start(self, numfiles=None, total_size=None, now=None):
- if now is None: now = time.time()
- self.numfiles = numfiles
- self.finished_files = 0
- self.failed_files = 0
- self.open_files = 0
- self.total_size = total_size
- self.failed_size = 0
- self.start_time = now
- self.finished_file_size = 0
- self.last_update_time = now
- self.re.start(total_size, now)
- self._do_start(now)
-
- def _do_start(self, now):
- pass
-
- def end(self, now=None):
- if now is None: now = time.time()
- self._do_end(now)
-
- def _do_end(self, now):
- pass
-
- def lock(self): self._lock.acquire()
- def unlock(self): self._lock.release()
-
- ###########################################################
- # child meter creation and destruction
- def newMeter(self):
- newmeter = self.helperclass(self)
- self.meters.append(newmeter)
- return newmeter
-
- def removeMeter(self, meter):
- self.meters.remove(meter)
-
- ###########################################################
- # child functions - these should only be called by helpers
- def start_meter(self, meter, now):
- if not meter in self.meters:
- raise ValueError('attempt to use orphaned meter')
- self._lock.acquire()
- try:
- if not meter in self.in_progress_meters:
- self.in_progress_meters.append(meter)
- self.open_files += 1
- finally:
- self._lock.release()
- self._do_start_meter(meter, now)
-
- def _do_start_meter(self, meter, now):
- pass
-
- def update_meter(self, meter, now):
- if not meter in self.meters:
- raise ValueError('attempt to use orphaned meter')
- if (now >= self.last_update_time + self.update_period) or \
- not self.last_update_time:
- self.re.update(self._amount_read(), now)
- self.last_update_time = now
- self._do_update_meter(meter, now)
-
- def _do_update_meter(self, meter, now):
- pass
-
- def end_meter(self, meter, now):
- if not meter in self.meters:
- raise ValueError('attempt to use orphaned meter')
- self._lock.acquire()
- try:
- try: self.in_progress_meters.remove(meter)
- except ValueError: pass
- self.open_files -= 1
- self.finished_files += 1
- self.finished_file_size += meter.last_amount_read
- finally:
- self._lock.release()
- self._do_end_meter(meter, now)
-
- def _do_end_meter(self, meter, now):
- pass
-
- def failure_meter(self, meter, message, now):
- if not meter in self.meters:
- raise ValueError('attempt to use orphaned meter')
- self._lock.acquire()
- try:
- try: self.in_progress_meters.remove(meter)
- except ValueError: pass
- self.open_files -= 1
- self.failed_files += 1
- if meter.size and self.failed_size is not None:
- self.failed_size += meter.size
- else:
- self.failed_size = None
- finally:
- self._lock.release()
- self._do_failure_meter(meter, message, now)
-
- def _do_failure_meter(self, meter, message, now):
- pass
-
- def message_meter(self, meter, message):
- pass
-
- ########################################################
- # internal functions
- def _amount_read(self):
- tot = self.finished_file_size
- for m in self.in_progress_meters:
- tot += m.last_amount_read
- return tot
-
-
-class TextMultiFileMeter(MultiFileMeter):
- def __init__(self, fo=sys.stderr):
- self.fo = fo
- MultiFileMeter.__init__(self)
-
- # files: ###/### ###% data: ######/###### ###% time: ##:##:##/##:##:##
- def _do_update_meter(self, meter, now):
- self._lock.acquire()
- try:
- format = "files: %3i/%-3i %3i%% data: %6.6s/%-6.6s %3i%% " \
- "time: %8.8s/%8.8s"
- df = self.finished_files
- tf = self.numfiles or 1
- pf = 100 * float(df)/tf + 0.49
- dd = self.re.last_amount_read
- td = self.total_size
- pd = 100 * (self.re.fraction_read() or 0) + 0.49
- dt = self.re.elapsed_time()
- rt = self.re.remaining_time()
- if rt is None: tt = None
- else: tt = dt + rt
-
- fdd = format_number(dd) + 'B'
- ftd = format_number(td) + 'B'
- fdt = format_time(dt, 1)
- ftt = format_time(tt, 1)
-
- out = '%-79.79s' % (format % (df, tf, pf, fdd, ftd, pd, fdt, ftt))
- self.fo.write('\r' + out)
- self.fo.flush()
- finally:
- self._lock.release()
-
- def _do_end_meter(self, meter, now):
- self._lock.acquire()
- try:
- format = "%-30.30s %6.6s %8.8s %9.9s"
- fn = meter.basename
- size = meter.last_amount_read
- fsize = format_number(size) + 'B'
- et = meter.re.elapsed_time()
- fet = format_time(et, 1)
- frate = format_number(size / et) + 'B/s'
-
- out = '%-79.79s' % (format % (fn, fsize, fet, frate))
- self.fo.write('\r' + out + '\n')
- finally:
- self._lock.release()
- self._do_update_meter(meter, now)
-
- def _do_failure_meter(self, meter, message, now):
- self._lock.acquire()
- try:
- format = "%-30.30s %6.6s %s"
- fn = meter.basename
- if type(message) in (type(''), type(u'')):
- message = message.splitlines()
- if not message: message = ['']
- out = '%-79s' % (format % (fn, 'FAILED', message[0] or ''))
- self.fo.write('\r' + out + '\n')
- for m in message[1:]: self.fo.write(' ' + m + '\n')
- self._lock.release()
- finally:
- self._do_update_meter(meter, now)
-
- def message_meter(self, meter, message):
- self._lock.acquire()
- try:
- pass
- finally:
- self._lock.release()
-
- def _do_end(self, now):
- self._do_update_meter(None, now)
- self._lock.acquire()
- try:
- self.fo.write('\n')
- self.fo.flush()
- finally:
- self._lock.release()
-
-######################################################################
-# support classes and functions
-
-class RateEstimator:
- def __init__(self, timescale=5.0):
- self.timescale = timescale
-
- def start(self, total=None, now=None):
- if now is None: now = time.time()
- self.total = total
- self.start_time = now
- self.last_update_time = now
- self.last_amount_read = 0
- self.ave_rate = None
-
- def update(self, amount_read, now=None):
- if now is None: now = time.time()
- if amount_read == 0:
- # if we just started this file, all bets are off
- self.last_update_time = now
- self.last_amount_read = 0
- self.ave_rate = None
- return
-
- #print 'times', now, self.last_update_time
- time_diff = now - self.last_update_time
- read_diff = amount_read - self.last_amount_read
- self.last_update_time = now
- self.last_amount_read = amount_read
- self.ave_rate = self._temporal_rolling_ave(\
- time_diff, read_diff, self.ave_rate, self.timescale)
- #print 'results', time_diff, read_diff, self.ave_rate
-
- #####################################################################
- # result methods
- def average_rate(self):
- "get the average transfer rate (in bytes/second)"
- return self.ave_rate
-
- def elapsed_time(self):
- "the time between the start of the transfer and the most recent update"
- return self.last_update_time - self.start_time
-
- def remaining_time(self):
- "estimated time remaining"
- if not self.ave_rate or not self.total: return None
- return (self.total - self.last_amount_read) / self.ave_rate
-
- def fraction_read(self):
- """the fraction of the data that has been read
- (can be None for unknown transfer size)"""
- if self.total is None: return None
- elif self.total == 0: return 1.0
- else: return float(self.last_amount_read)/self.total
-
- #########################################################################
- # support methods
- def _temporal_rolling_ave(self, time_diff, read_diff, last_ave, timescale):
- """a temporal rolling average performs smooth averaging even when
- updates come at irregular intervals. This is performed by scaling
- the "epsilon" according to the time since the last update.
- Specifically, epsilon = time_diff / timescale
-
- As a general rule, the average will take on a completely new value
- after 'timescale' seconds."""
- epsilon = time_diff / timescale
- if epsilon > 1: epsilon = 1.0
- return self._rolling_ave(time_diff, read_diff, last_ave, epsilon)
-
- def _rolling_ave(self, time_diff, read_diff, last_ave, epsilon):
- """perform a "rolling average" iteration
- a rolling average "folds" new data into an existing average with
- some weight, epsilon. epsilon must be between 0.0 and 1.0 (inclusive)
- a value of 0.0 means only the old value (initial value) counts,
- and a value of 1.0 means only the newest value is considered."""
-
- try:
- recent_rate = read_diff / time_diff
- except ZeroDivisionError:
- recent_rate = None
- if last_ave is None: return recent_rate
- elif recent_rate is None: return last_ave
-
- # at this point, both last_ave and recent_rate are numbers
- return epsilon * recent_rate + (1 - epsilon) * last_ave
-
- def _round_remaining_time(self, rt, start_time=15.0):
- """round the remaining time, depending on its size
- If rt is between n*start_time and (n+1)*start_time round downward
- to the nearest multiple of n (for any counting number n).
- If rt < start_time, round down to the nearest 1.
- For example (for start_time = 15.0):
- 2.7 -> 2.0
- 25.2 -> 25.0
- 26.4 -> 26.0
- 35.3 -> 34.0
- 63.6 -> 60.0
- """
-
- if rt < 0: return 0.0
- shift = int(math.log(rt/start_time)/math.log(2))
- rt = int(rt)
- if shift <= 0: return rt
- return float(int(rt) >> shift << shift)
-
-
-def format_time(seconds, use_hours=0):
- if seconds is None or seconds < 0:
- if use_hours: return '--:--:--'
- else: return '--:--'
- else:
- seconds = int(seconds)
- minutes = seconds / 60
- seconds = seconds % 60
- if use_hours:
- hours = minutes / 60
- minutes = minutes % 60
- return '%02i:%02i:%02i' % (hours, minutes, seconds)
- else:
- return '%02i:%02i' % (minutes, seconds)
-
-def format_number(number, SI=0, space=' '):
- """Turn numbers into human-readable metric-like numbers"""
- symbols = ['', # (none)
- 'k', # kilo
- 'M', # mega
- 'G', # giga
- 'T', # tera
- 'P', # peta
- 'E', # exa
- 'Z', # zetta
- 'Y'] # yotta
-
- if SI: step = 1000.0
- else: step = 1024.0
-
- thresh = 999
- depth = 0
- max_depth = len(symbols) - 1
-
- # we want numbers between 0 and thresh, but don't exceed the length
- # of our list. In that event, the formatting will be screwed up,
- # but it'll still show the right number.
- while number > thresh and depth < max_depth:
- depth = depth + 1
- number = number / step
-
- if type(number) == type(1) or type(number) == type(1L):
- # it's an int or a long, which means it didn't get divided,
- # which means it's already short enough
- format = '%i%s%s'
- elif number < 9.95:
- # must use 9.95 for proper sizing. For example, 9.99 will be
- # rounded to 10.0 with the .1f format string (which is too long)
- format = '%.1f%s%s'
- else:
- format = '%.0f%s%s'
-
- return(format % (float(number or 0), space, symbols[depth]))
diff --git a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py b/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py
deleted file mode 100644
index 07848dac7c..0000000000
--- a/scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-# This file is part of urlgrabber, a high-level cross-protocol url-grabber
-
-import httplib
-import urllib2
-
-try:
- from M2Crypto import SSL
- from M2Crypto import httpslib
- from M2Crypto import m2urllib2
-
- SSL.Connection.clientPostConnectionCheck = None
- have_m2crypto = True
-except ImportError:
- have_m2crypto = False
-
-DEBUG = None
-
-if have_m2crypto:
-
- class M2SSLFactory:
-
- def __init__(self, ssl_ca_cert, ssl_context):
- self.ssl_context = self._get_ssl_context(ssl_ca_cert, ssl_context)
-
- def _get_ssl_context(self, ssl_ca_cert, ssl_context):
- """
- Create an ssl context using the CA cert file or ssl context.
-
- The CA cert is used first if it was passed as an option. If not,
- then the supplied ssl context is used. If no ssl context was supplied,
- None is returned.
- """
- if ssl_ca_cert:
- context = SSL.Context()
- context.load_verify_locations(ssl_ca_cert)
- context.set_verify(SSL.verify_none, -1)
- return context
- else:
- return ssl_context
-
- def create_https_connection(self, host, response_class = None):
- connection = httplib.HTTPSConnection(host, self.ssl_context)
- if response_class:
- connection.response_class = response_class
- return connection
-
- def create_opener(self, *handlers):
- return m2urllib2.build_opener(self.ssl_context, *handlers)
-
-
-class SSLFactory:
-
- def create_https_connection(self, host, response_class = None):
- connection = httplib.HTTPSConnection(host)
- if response_class:
- connection.response_class = response_class
- return connection
-
- def create_opener(self, *handlers):
- return urllib2.build_opener(*handlers)
-
-
-
-def get_factory(ssl_ca_cert = None, ssl_context = None):
- """ Return an SSLFactory, based on if M2Crypto is available. """
- if have_m2crypto:
- return M2SSLFactory(ssl_ca_cert, ssl_context)
- else:
- # Log here if someone provides the args but we don't use them.
- if ssl_ca_cert or ssl_context:
- if DEBUG:
- DEBUG.warning("SSL arguments supplied, but M2Crypto is not available. "
- "Using Python SSL.")
- return SSLFactory()
diff --git a/scripts/lib/mic/__version__.py b/scripts/lib/mic/__version__.py
deleted file mode 100644
index 60d7626cac..0000000000
--- a/scripts/lib/mic/__version__.py
+++ /dev/null
@@ -1 +0,0 @@
-VERSION = "0.14"
diff --git a/scripts/lib/mic/bootstrap.py b/scripts/lib/mic/bootstrap.py
deleted file mode 100644
index 66c291b0a8..0000000000
--- a/scripts/lib/mic/bootstrap.py
+++ /dev/null
@@ -1,279 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import sys
-import tempfile
-import shutil
-import subprocess
-import rpm
-from mic import msger
-from mic.utils import errors, proxy, misc
-from mic.utils.rpmmisc import readRpmHeader, RPMInstallCallback
-from mic.chroot import cleanup_mounts, setup_chrootenv, cleanup_chrootenv
-
-PATH_BOOTSTRAP = "/usr/sbin:/usr/bin:/sbin:/bin"
-
-RPMTRANS_FLAGS = [
- rpm.RPMTRANS_FLAG_ALLFILES,
- rpm.RPMTRANS_FLAG_NOSCRIPTS,
- rpm.RPMTRANS_FLAG_NOTRIGGERS,
- ]
-
-RPMVSF_FLAGS = [
- rpm._RPMVSF_NOSIGNATURES,
- rpm._RPMVSF_NODIGESTS
- ]
-
-RPMPROB_FLAGS = [
- rpm.RPMPROB_FILTER_OLDPACKAGE,
- rpm.RPMPROB_FILTER_REPLACEPKG,
- rpm.RPMPROB_FILTER_IGNOREARCH
- ]
-
-class MiniBackend(object):
- def __init__(self, rootdir, arch=None, repomd=None):
- self._ts = None
- self.rootdir = os.path.abspath(rootdir)
- self.arch = arch
- self.repomd = repomd
- self.dlpkgs = []
- self.localpkgs = {}
- self.optionals = []
- self.preins = {}
- self.postins = {}
- self.scriptlets = False
-
- def __del__(self):
- try:
- del self.ts
- except:
- pass
-
- def get_ts(self):
- if not self._ts:
- self._ts = rpm.TransactionSet(self.rootdir)
- self._ts.setFlags(reduce(lambda x, y: x|y, RPMTRANS_FLAGS))
- self._ts.setVSFlags(reduce(lambda x, y: x|y, RPMVSF_FLAGS))
- self._ts.setProbFilter(reduce(lambda x, y: x|y, RPMPROB_FLAGS))
-
- return self._ts
-
- def del_ts(self):
- if self._ts:
- self._ts.closeDB()
- self._ts = None
-
- ts = property(fget = lambda self: self.get_ts(),
- fdel = lambda self: self.del_ts(),
- doc="TransactionSet object")
-
- def selectPackage(self, pkg):
- if not pkg in self.dlpkgs:
- self.dlpkgs.append(pkg)
-
- def runInstall(self):
- # FIXME: check space
- self.downloadPkgs()
- self.installPkgs()
-
- if not self.scriptlets:
- return
-
- for pkg in self.preins.keys():
- prog, script = self.preins[pkg]
- self.run_pkg_script(pkg, prog, script, '0')
- for pkg in self.postins.keys():
- prog, script = self.postins[pkg]
- self.run_pkg_script(pkg, prog, script, '1')
-
- def downloadPkgs(self):
- nonexist = []
- for pkg in self.dlpkgs:
- localpth = misc.get_package(pkg, self.repomd, self.arch)
- if localpth:
- self.localpkgs[pkg] = localpth
- elif pkg in self.optionals:
- # skip optional rpm
- continue
- else:
- # mark nonexist rpm
- nonexist.append(pkg)
-
- if nonexist:
- raise errors.BootstrapError("Can't get rpm binary: %s" %
- ','.join(nonexist))
-
- def installPkgs(self):
- for pkg in self.localpkgs.keys():
- rpmpath = self.localpkgs[pkg]
-
- hdr = readRpmHeader(self.ts, rpmpath)
-
- # save prein and postin scripts
- self.preins[pkg] = (hdr['PREINPROG'], hdr['PREIN'])
- self.postins[pkg] = (hdr['POSTINPROG'], hdr['POSTIN'])
-
- # mark pkg as install
- self.ts.addInstall(hdr, rpmpath, 'u')
-
- # run transaction
- self.ts.order()
- cb = RPMInstallCallback(self.ts)
- self.ts.run(cb.callback, '')
-
- def run_pkg_script(self, pkg, prog, script, arg):
- mychroot = lambda: os.chroot(self.rootdir)
-
- if not script:
- return
-
- if prog == "<lua>":
- prog = "/usr/bin/lua"
-
- tmpdir = os.path.join(self.rootdir, "tmp")
- if not os.path.exists(tmpdir):
- os.makedirs(tmpdir)
- tmpfd, tmpfp = tempfile.mkstemp(dir=tmpdir, prefix="%s.pre-" % pkg)
- script = script.replace('\r', '')
- os.write(tmpfd, script)
- os.close(tmpfd)
- os.chmod(tmpfp, 0700)
-
- try:
- script_fp = os.path.join('/tmp', os.path.basename(tmpfp))
- subprocess.call([prog, script_fp, arg], preexec_fn=mychroot)
- except (OSError, IOError), err:
- msger.warning(str(err))
- finally:
- os.unlink(tmpfp)
-
-class Bootstrap(object):
- def __init__(self, rootdir, distro, arch=None):
- self.rootdir = misc.mkdtemp(dir=rootdir, prefix=distro)
- self.distro = distro
- self.arch = arch
- self.logfile = None
- self.pkgslist = []
- self.repomd = None
-
- def __del__(self):
- self.cleanup()
-
- def get_rootdir(self):
- if os.path.exists(self.rootdir):
- shutil.rmtree(self.rootdir, ignore_errors=True)
- os.makedirs(self.rootdir)
- return self.rootdir
-
- def dirsetup(self, rootdir=None):
- _path = lambda pth: os.path.join(rootdir, pth.lstrip('/'))
-
- if not rootdir:
- rootdir = self.rootdir
-
- try:
- # make /tmp and /etc path
- tmpdir = _path('/tmp')
- if not os.path.exists(tmpdir):
- os.makedirs(tmpdir)
- etcdir = _path('/etc')
- if not os.path.exists(etcdir):
- os.makedirs(etcdir)
-
- # touch distro file
- tzdist = _path('/etc/%s-release' % self.distro)
- if not os.path.exists(tzdist):
- with open(tzdist, 'w') as wf:
- wf.write("bootstrap")
- except:
- pass
-
- def create(self, repomd, pkglist, optlist=()):
- try:
- pkgmgr = MiniBackend(self.get_rootdir())
- pkgmgr.arch = self.arch
- pkgmgr.repomd = repomd
- pkgmgr.optionals = list(optlist)
- map(pkgmgr.selectPackage, pkglist + list(optlist))
- pkgmgr.runInstall()
- except (OSError, IOError, errors.CreatorError), err:
- raise errors.BootstrapError("%s" % err)
-
- def run(self, cmd, chdir, rootdir=None, bindmounts=None):
- def mychroot():
- os.chroot(rootdir)
- os.chdir(chdir)
-
- def sync_timesetting(rootdir):
- try:
- # sync time and zone info to bootstrap
- if os.path.exists(rootdir + "/etc/localtime"):
- os.unlink(rootdir + "/etc/localtime")
- shutil.copyfile("/etc/localtime", rootdir + "/etc/localtime")
- except:
- pass
-
- def sync_passwdfile(rootdir):
- try:
- # sync passwd file to bootstrap, saving the user info
- if os.path.exists(rootdir + "/etc/passwd"):
- os.unlink(rootdir + "/etc/passwd")
- shutil.copyfile("/etc/passwd", rootdir + "/etc/passwd")
- except:
- pass
-
- if not rootdir:
- rootdir = self.rootdir
-
- if isinstance(cmd, list):
- shell = False
- else:
- shell = True
-
- env = os.environ
- env['PATH'] = "%s:%s" % (PATH_BOOTSTRAP, env['PATH'])
-
- retcode = 0
- gloablmounts = None
- try:
- proxy.set_proxy_environ()
- gloablmounts = setup_chrootenv(rootdir, bindmounts, False)
- sync_timesetting(rootdir)
- sync_passwdfile(rootdir)
- retcode = subprocess.call(cmd, preexec_fn=mychroot, env=env, shell=shell)
- except (OSError, IOError):
- # add additional information to original exception
- value, tb = sys.exc_info()[1:]
- value = '%s: %s' % (value, ' '.join(cmd))
- raise RuntimeError, value, tb
- finally:
- if self.logfile and os.path.isfile(self.logfile):
- msger.log(file(self.logfile).read())
- cleanup_chrootenv(rootdir, bindmounts, gloablmounts)
- proxy.unset_proxy_environ()
- return retcode
-
- def cleanup(self):
- try:
- # clean mounts
- cleanup_mounts(self.rootdir)
- # remove rootdir
- shutil.rmtree(self.rootdir, ignore_errors=True)
- except:
- pass
diff --git a/scripts/lib/mic/chroot.py b/scripts/lib/mic/chroot.py
deleted file mode 100644
index 99fb9a2c17..0000000000
--- a/scripts/lib/mic/chroot.py
+++ /dev/null
@@ -1,343 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import shutil
-import subprocess
-
-from mic import msger
-from mic.conf import configmgr
-from mic.utils import misc, errors, runner, fs_related
-
-chroot_lockfd = -1
-chroot_lock = ""
-BIND_MOUNTS = (
- "/proc",
- "/proc/sys/fs/binfmt_misc",
- "/sys",
- "/dev",
- "/dev/pts",
- "/dev/shm",
- "/var/lib/dbus",
- "/var/run/dbus",
- "/var/lock",
- )
-
-def cleanup_after_chroot(targettype,imgmount,tmpdir,tmpmnt):
- if imgmount and targettype == "img":
- imgmount.cleanup()
-
- if tmpdir:
- shutil.rmtree(tmpdir, ignore_errors = True)
-
- if tmpmnt:
- shutil.rmtree(tmpmnt, ignore_errors = True)
-
-def check_bind_mounts(chrootdir, bindmounts):
- chrootmounts = []
- for mount in bindmounts.split(";"):
- if not mount:
- continue
-
- srcdst = mount.split(":")
- if len(srcdst) == 1:
- srcdst.append("none")
-
- if not os.path.isdir(srcdst[0]):
- return False
-
- if srcdst[1] == "" or srcdst[1] == "none":
- srcdst[1] = None
-
- if srcdst[0] in BIND_MOUNTS or srcdst[0] == '/':
- continue
-
- if chrootdir:
- if not srcdst[1]:
- srcdst[1] = os.path.abspath(os.path.expanduser(srcdst[0]))
- else:
- srcdst[1] = os.path.abspath(os.path.expanduser(srcdst[1]))
-
- tmpdir = chrootdir + "/" + srcdst[1]
- if os.path.isdir(tmpdir):
- msger.warning("Warning: dir %s has existed." % tmpdir)
-
- return True
-
-def cleanup_mounts(chrootdir):
- umountcmd = misc.find_binary_path("umount")
- abs_chrootdir = os.path.abspath(chrootdir)
- mounts = open('/proc/mounts').readlines()
- for line in reversed(mounts):
- if abs_chrootdir not in line:
- continue
-
- point = line.split()[1]
-
- # '/' to avoid common name prefix
- if abs_chrootdir == point or point.startswith(abs_chrootdir + '/'):
- args = [ umountcmd, "-l", point ]
- ret = runner.quiet(args)
- if ret != 0:
- msger.warning("failed to unmount %s" % point)
-
- return 0
-
-def setup_chrootenv(chrootdir, bindmounts = None, mountparent = True):
- global chroot_lockfd, chroot_lock
-
- def get_bind_mounts(chrootdir, bindmounts, mountparent = True):
- chrootmounts = []
- if bindmounts in ("", None):
- bindmounts = ""
-
- for mount in bindmounts.split(";"):
- if not mount:
- continue
-
- srcdst = mount.split(":")
- srcdst[0] = os.path.abspath(os.path.expanduser(srcdst[0]))
- if len(srcdst) == 1:
- srcdst.append("none")
-
- # if some bindmount is not existed, but it's created inside
- # chroot, this is not expected
- if not os.path.exists(srcdst[0]):
- os.makedirs(srcdst[0])
-
- if not os.path.isdir(srcdst[0]):
- continue
-
- if srcdst[0] in BIND_MOUNTS or srcdst[0] == '/':
- msger.verbose("%s will be mounted by default." % srcdst[0])
- continue
-
- if srcdst[1] == "" or srcdst[1] == "none":
- srcdst[1] = None
- else:
- srcdst[1] = os.path.abspath(os.path.expanduser(srcdst[1]))
- if os.path.isdir(chrootdir + "/" + srcdst[1]):
- msger.warning("%s has existed in %s , skip it."\
- % (srcdst[1], chrootdir))
- continue
-
- chrootmounts.append(fs_related.BindChrootMount(srcdst[0],
- chrootdir,
- srcdst[1]))
-
- """Default bind mounts"""
- for pt in BIND_MOUNTS:
- if not os.path.exists(pt):
- continue
- chrootmounts.append(fs_related.BindChrootMount(pt,
- chrootdir,
- None))
-
- if mountparent:
- chrootmounts.append(fs_related.BindChrootMount("/",
- chrootdir,
- "/parentroot",
- "ro"))
-
- for kernel in os.listdir("/lib/modules"):
- chrootmounts.append(fs_related.BindChrootMount(
- "/lib/modules/"+kernel,
- chrootdir,
- None,
- "ro"))
-
- return chrootmounts
-
- def bind_mount(chrootmounts):
- for b in chrootmounts:
- msger.verbose("bind_mount: %s -> %s" % (b.src, b.dest))
- b.mount()
-
- def setup_resolv(chrootdir):
- try:
- shutil.copyfile("/etc/resolv.conf", chrootdir + "/etc/resolv.conf")
- except:
- pass
-
- globalmounts = get_bind_mounts(chrootdir, bindmounts, mountparent)
- bind_mount(globalmounts)
-
- setup_resolv(chrootdir)
-
- mtab = "/etc/mtab"
- dstmtab = chrootdir + mtab
- if not os.path.islink(dstmtab):
- shutil.copyfile(mtab, dstmtab)
-
- chroot_lock = os.path.join(chrootdir, ".chroot.lock")
- chroot_lockfd = open(chroot_lock, "w")
-
- return globalmounts
-
-def cleanup_chrootenv(chrootdir, bindmounts=None, globalmounts=()):
- global chroot_lockfd, chroot_lock
-
- def bind_unmount(chrootmounts):
- for b in reversed(chrootmounts):
- msger.verbose("bind_unmount: %s -> %s" % (b.src, b.dest))
- b.unmount()
-
- def cleanup_resolv(chrootdir):
- try:
- fd = open(chrootdir + "/etc/resolv.conf", "w")
- fd.truncate(0)
- fd.close()
- except:
- pass
-
- def kill_processes(chrootdir):
- import glob
- for fp in glob.glob("/proc/*/root"):
- try:
- if os.readlink(fp) == chrootdir:
- pid = int(fp.split("/")[2])
- os.kill(pid, 9)
- except:
- pass
-
- def cleanup_mountdir(chrootdir, bindmounts):
- if bindmounts == "" or bindmounts == None:
- return
- chrootmounts = []
- for mount in bindmounts.split(";"):
- if not mount:
- continue
-
- srcdst = mount.split(":")
-
- if len(srcdst) == 1:
- srcdst.append("none")
-
- if srcdst[0] == "/":
- continue
-
- if srcdst[1] == "" or srcdst[1] == "none":
- srcdst[1] = srcdst[0]
-
- srcdst[1] = os.path.abspath(os.path.expanduser(srcdst[1]))
- tmpdir = chrootdir + "/" + srcdst[1]
- if os.path.isdir(tmpdir):
- if len(os.listdir(tmpdir)) == 0:
- shutil.rmtree(tmpdir, ignore_errors = True)
- else:
- msger.warning("Warning: dir %s isn't empty." % tmpdir)
-
- chroot_lockfd.close()
- bind_unmount(globalmounts)
-
- if not fs_related.my_fuser(chroot_lock):
- tmpdir = chrootdir + "/parentroot"
- if os.path.exists(tmpdir) and len(os.listdir(tmpdir)) == 0:
- shutil.rmtree(tmpdir, ignore_errors = True)
-
- cleanup_resolv(chrootdir)
-
- if os.path.exists(chrootdir + "/etc/mtab"):
- os.unlink(chrootdir + "/etc/mtab")
-
- kill_processes(chrootdir)
-
- cleanup_mountdir(chrootdir, bindmounts)
-
-def chroot(chrootdir, bindmounts = None, execute = "/bin/bash"):
- def mychroot():
- os.chroot(chrootdir)
- os.chdir("/")
-
- if configmgr.chroot['saveto']:
- savefs = True
- saveto = configmgr.chroot['saveto']
- wrnmsg = "Can't save chroot fs for dir %s exists" % saveto
- if saveto == chrootdir:
- savefs = False
- wrnmsg = "Dir %s is being used to chroot" % saveto
- elif os.path.exists(saveto):
- if msger.ask("Dir %s already exists, cleanup and continue?" %
- saveto):
- shutil.rmtree(saveto, ignore_errors = True)
- savefs = True
- else:
- savefs = False
-
- if savefs:
- msger.info("Saving image to directory %s" % saveto)
- fs_related.makedirs(os.path.dirname(os.path.abspath(saveto)))
- runner.quiet("cp -af %s %s" % (chrootdir, saveto))
- devs = ['dev/fd',
- 'dev/stdin',
- 'dev/stdout',
- 'dev/stderr',
- 'etc/mtab']
- ignlst = [os.path.join(saveto, x) for x in devs]
- map(os.unlink, filter(os.path.exists, ignlst))
- else:
- msger.warning(wrnmsg)
-
- dev_null = os.open("/dev/null", os.O_WRONLY)
- files_to_check = ["/bin/bash", "/sbin/init"]
-
- architecture_found = False
-
- """ Register statically-linked qemu-arm if it is an ARM fs """
- qemu_emulator = None
-
- for ftc in files_to_check:
- ftc = "%s/%s" % (chrootdir,ftc)
-
- # Return code of 'file' is "almost always" 0 based on some man pages
- # so we need to check the file existance first.
- if not os.path.exists(ftc):
- continue
-
- for line in runner.outs(['file', ftc]).splitlines():
- if 'ARM' in line:
- qemu_emulator = misc.setup_qemu_emulator(chrootdir, "arm")
- architecture_found = True
- break
-
- if 'Intel' in line:
- architecture_found = True
- break
-
- if architecture_found:
- break
-
- os.close(dev_null)
- if not architecture_found:
- raise errors.CreatorError("Failed to get architecture from any of the "
- "following files %s from chroot." \
- % files_to_check)
-
- try:
- msger.info("Launching shell. Exit to continue.\n"
- "----------------------------------")
- globalmounts = setup_chrootenv(chrootdir, bindmounts)
- subprocess.call(execute, preexec_fn = mychroot, shell=True)
-
- except OSError, err:
- raise errors.CreatorError("chroot err: %s" % str(err))
-
- finally:
- cleanup_chrootenv(chrootdir, bindmounts, globalmounts)
- if qemu_emulator:
- os.unlink(chrootdir + qemu_emulator)
diff --git a/scripts/lib/mic/conf.py b/scripts/lib/mic/conf.py
deleted file mode 100644
index b850d80520..0000000000
--- a/scripts/lib/mic/conf.py
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys, re
-import ConfigParser
-
-from mic import msger
-from mic import kickstart
-from mic.utils import misc, runner, proxy, errors
-
-
-def get_siteconf():
- mic_path = os.path.dirname(__file__)
- eos = mic_path.find('scripts') + len('scripts')
- scripts_path = mic_path[:eos]
-
- return scripts_path + "/lib/image/config/wic.conf"
-
-class ConfigMgr(object):
- prefer_backends = ["zypp", "yum"]
-
- DEFAULTS = {'common': {
- "distro_name": "Default Distribution",
- "plugin_dir": "/usr/lib/wic/plugins", # TODO use prefix also?
- },
- 'create': {
- "tmpdir": '/var/tmp/wic',
- "cachedir": '/var/tmp/wic/cache',
- "outdir": './wic-output',
-
- "arch": None, # None means auto-detect
- "pkgmgr": "auto",
- "name": "output",
- "ksfile": None,
- "ks": None,
- "repomd": None,
- "local_pkgs_path": None,
- "release": None,
- "logfile": None,
- "record_pkgs": [],
- "pack_to": None,
- "name_prefix": None,
- "name_suffix": None,
- "proxy": None,
- "no_proxy": None,
- "copy_kernel": False,
- "install_pkgs": None,
- "repourl": {},
- "localrepos": [], # save localrepos
- "runtime": "bootstrap",
- },
- 'chroot': {
- "saveto": None,
- },
- 'convert': {
- "shell": False,
- },
- 'bootstrap': {
- "rootdir": '/var/tmp/wic-bootstrap',
- "packages": [],
- },
- }
-
- # make the manager class as singleton
- _instance = None
- def __new__(cls, *args, **kwargs):
- if not cls._instance:
- cls._instance = super(ConfigMgr, cls).__new__(cls, *args, **kwargs)
-
- return cls._instance
-
- def __init__(self, ksconf=None, siteconf=None):
- # reset config options
- self.reset()
-
- if not siteconf:
- siteconf = get_siteconf()
-
- # initial options from siteconf
- self._siteconf = siteconf
-
- if ksconf:
- self._ksconf = ksconf
-
- def reset(self):
- self.__ksconf = None
- self.__siteconf = None
-
- # initialize the values with defaults
- for sec, vals in self.DEFAULTS.iteritems():
- setattr(self, sec, vals)
-
- def __set_siteconf(self, siteconf):
- try:
- self.__siteconf = siteconf
- self._parse_siteconf(siteconf)
- except ConfigParser.Error, error:
- raise errors.ConfigError("%s" % error)
- def __get_siteconf(self):
- return self.__siteconf
- _siteconf = property(__get_siteconf, __set_siteconf)
-
- def __set_ksconf(self, ksconf):
- if not os.path.isfile(ksconf):
- msger.error('Cannot find ks file: %s' % ksconf)
-
- self.__ksconf = ksconf
- self._parse_kickstart(ksconf)
- def __get_ksconf(self):
- return self.__ksconf
- _ksconf = property(__get_ksconf, __set_ksconf)
-
- def _parse_siteconf(self, siteconf):
- if not siteconf:
- return
-
- if not os.path.exists(siteconf):
- msger.warning("cannot read config file: %s" % siteconf)
- return
-
- parser = ConfigParser.SafeConfigParser()
- parser.read(siteconf)
-
- for section in parser.sections():
- if section in self.DEFAULTS:
- getattr(self, section).update(dict(parser.items(section)))
-
- # append common section items to other sections
- for section in self.DEFAULTS.keys():
- if section != "common":
- getattr(self, section).update(self.common)
-
- # check and normalize the scheme of proxy url
- if self.create['proxy']:
- m = re.match('^(\w+)://.*', self.create['proxy'])
- if m:
- scheme = m.group(1)
- if scheme not in ('http', 'https', 'ftp', 'socks'):
- msger.error("%s: proxy scheme is incorrect" % siteconf)
- else:
- msger.warning("%s: proxy url w/o scheme, use http as default"
- % siteconf)
- self.create['proxy'] = "http://" + self.create['proxy']
-
- proxy.set_proxies(self.create['proxy'], self.create['no_proxy'])
-
- # bootstrap option handling
- self.set_runtime(self.create['runtime'])
- if isinstance(self.bootstrap['packages'], basestring):
- packages = self.bootstrap['packages'].replace('\n', ' ')
- if packages.find(',') != -1:
- packages = packages.split(',')
- else:
- packages = packages.split()
- self.bootstrap['packages'] = packages
-
- def _parse_kickstart(self, ksconf=None):
- if not ksconf:
- return
-
- ksconf = misc.normalize_ksfile(ksconf,
- self.create['release'],
- self.create['arch'])
-
- ks = kickstart.read_kickstart(ksconf)
-
- self.create['ks'] = ks
- self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0]
-
- self.create['name'] = misc.build_name(ksconf,
- self.create['release'],
- self.create['name_prefix'],
- self.create['name_suffix'])
-
- def set_runtime(self, runtime):
- if runtime not in ("bootstrap", "native"):
- msger.error("Invalid runtime mode: %s" % runtime)
-
- if misc.get_distro()[0] in ("tizen", "Tizen"):
- runtime = "native"
- self.create['runtime'] = runtime
-
-configmgr = ConfigMgr()
diff --git a/scripts/lib/mic/creator.py b/scripts/lib/mic/creator.py
deleted file mode 100644
index 267928f877..0000000000
--- a/scripts/lib/mic/creator.py
+++ /dev/null
@@ -1,351 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys, re
-from optparse import SUPPRESS_HELP
-
-from mic import msger
-from mic.utils import cmdln, errors
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-
-
-class Creator(cmdln.Cmdln):
- """${name}: create an image
-
- Usage:
- ${name} SUBCOMMAND <ksfile> [OPTS]
-
- ${command_list}
- ${option_list}
- """
-
- name = 'mic create(cr)'
-
- def __init__(self, *args, **kwargs):
- cmdln.Cmdln.__init__(self, *args, **kwargs)
- self._subcmds = []
-
- # get cmds from pluginmgr
- # mix-in do_subcmd interface
- for subcmd, klass in pluginmgr.get_plugins('imager').iteritems():
- if not hasattr(klass, 'do_create'):
- msger.warning("Unsurpport subcmd: %s" % subcmd)
- continue
-
- func = getattr(klass, 'do_create')
- setattr(self.__class__, "do_"+subcmd, func)
- self._subcmds.append(subcmd)
-
- def get_optparser(self):
- optparser = cmdln.CmdlnOptionParser(self)
- optparser.add_option('-d', '--debug', action='store_true',
- dest='debug',
- help=SUPPRESS_HELP)
- optparser.add_option('-v', '--verbose', action='store_true',
- dest='verbose',
- help=SUPPRESS_HELP)
- optparser.add_option('', '--logfile', type='string', dest='logfile',
- default=None,
- help='Path of logfile')
- optparser.add_option('-c', '--config', type='string', dest='config',
- default=None,
- help='Specify config file for mic')
- optparser.add_option('-k', '--cachedir', type='string', action='store',
- dest='cachedir', default=None,
- help='Cache directory to store the downloaded')
- optparser.add_option('-o', '--outdir', type='string', action='store',
- dest='outdir', default=None,
- help='Output directory')
- optparser.add_option('-A', '--arch', type='string', dest='arch',
- default=None,
- help='Specify repo architecture')
- optparser.add_option('', '--release', type='string', dest='release',
- default=None, metavar='RID',
- help='Generate a release of RID with all necessary'
- ' files, when @BUILD_ID@ is contained in '
- 'kickstart file, it will be replaced by RID')
- optparser.add_option("", "--record-pkgs", type="string",
- dest="record_pkgs", default=None,
- help='Record the info of installed packages, '
- 'multiple values can be specified which '
- 'joined by ",", valid values: "name", '
- '"content", "license", "vcs"')
- optparser.add_option('', '--pkgmgr', type='string', dest='pkgmgr',
- default=None,
- help='Specify backend package manager')
- optparser.add_option('', '--local-pkgs-path', type='string',
- dest='local_pkgs_path', default=None,
- help='Path for local pkgs(rpms) to be installed')
- optparser.add_option('', '--runtime', type='string',
- dest='runtime', default=None,
- help='Specify runtime mode, avaiable: bootstrap, native')
- # --taring-to is alias to --pack-to
- optparser.add_option('', '--taring-to', type='string',
- dest='pack_to', default=None,
- help=SUPPRESS_HELP)
- optparser.add_option('', '--pack-to', type='string',
- dest='pack_to', default=None,
- help='Pack the images together into the specified'
- ' achive, extension supported: .zip, .tar, '
- '.tar.gz, .tar.bz2, etc. by default, .tar '
- 'will be used')
- optparser.add_option('', '--copy-kernel', action='store_true',
- dest='copy_kernel',
- help='Copy kernel files from image /boot directory'
- ' to the image output directory.')
- optparser.add_option('', '--install-pkgs', type='string', action='store',
- dest='install_pkgs', default=None,
- help='Specify what type of packages to be installed,'
- ' valid: source, debuginfo, debugsource')
- optparser.add_option('', '--tmpfs', action='store_true', dest='enabletmpfs',
- help='Setup tmpdir as tmpfs to accelerate, experimental'
- ' feature, use it if you have more than 4G memory')
- optparser.add_option('', '--repourl', action='append',
- dest='repourl', default=[],
- help=SUPPRESS_HELP)
- return optparser
-
- def preoptparse(self, argv):
- optparser = self.get_optparser()
-
- largs = []
- rargs = []
- while argv:
- arg = argv.pop(0)
-
- if arg in ('-h', '--help'):
- rargs.append(arg)
-
- elif optparser.has_option(arg):
- largs.append(arg)
-
- if optparser.get_option(arg).takes_value():
- try:
- largs.append(argv.pop(0))
- except IndexError:
- raise errors.Usage("option %s requires arguments" % arg)
-
- else:
- if arg.startswith("--"):
- if "=" in arg:
- opt = arg.split("=")[0]
- else:
- opt = None
- elif arg.startswith("-") and len(arg) > 2:
- opt = arg[0:2]
- else:
- opt = None
-
- if opt and optparser.has_option(opt):
- largs.append(arg)
- else:
- rargs.append(arg)
-
- return largs + rargs
-
- def postoptparse(self):
- abspath = lambda pth: os.path.abspath(os.path.expanduser(pth))
-
- if self.options.verbose:
- msger.set_loglevel('verbose')
- if self.options.debug:
- msger.set_loglevel('debug')
-
- if self.options.logfile:
- logfile_abs_path = abspath(self.options.logfile)
- if os.path.isdir(logfile_abs_path):
- raise errors.Usage("logfile's path %s should be file"
- % self.options.logfile)
- if not os.path.exists(os.path.dirname(logfile_abs_path)):
- os.makedirs(os.path.dirname(logfile_abs_path))
- msger.set_interactive(False)
- msger.set_logfile(logfile_abs_path)
- configmgr.create['logfile'] = self.options.logfile
-
- if self.options.config:
- configmgr.reset()
- configmgr._siteconf = self.options.config
-
- if self.options.outdir is not None:
- configmgr.create['outdir'] = abspath(self.options.outdir)
- if self.options.cachedir is not None:
- configmgr.create['cachedir'] = abspath(self.options.cachedir)
- os.environ['ZYPP_LOCKFILE_ROOT'] = configmgr.create['cachedir']
-
- for cdir in ('outdir', 'cachedir'):
- if os.path.exists(configmgr.create[cdir]) \
- and not os.path.isdir(configmgr.create[cdir]):
- msger.error('Invalid directory specified: %s' \
- % configmgr.create[cdir])
-
- if self.options.local_pkgs_path is not None:
- if not os.path.exists(self.options.local_pkgs_path):
- msger.error('Local pkgs directory: \'%s\' not exist' \
- % self.options.local_pkgs_path)
- configmgr.create['local_pkgs_path'] = self.options.local_pkgs_path
-
- if self.options.release:
- configmgr.create['release'] = self.options.release.rstrip('/')
-
- if self.options.record_pkgs:
- configmgr.create['record_pkgs'] = []
- for infotype in self.options.record_pkgs.split(','):
- if infotype not in ('name', 'content', 'license', 'vcs'):
- raise errors.Usage('Invalid pkg recording: %s, valid ones:'
- ' "name", "content", "license", "vcs"' \
- % infotype)
-
- configmgr.create['record_pkgs'].append(infotype)
-
- if self.options.arch is not None:
- supported_arch = sorted(rpmmisc.archPolicies.keys(), reverse=True)
- if self.options.arch in supported_arch:
- configmgr.create['arch'] = self.options.arch
- else:
- raise errors.Usage('Invalid architecture: "%s".\n'
- ' Supported architectures are: \n'
- ' %s' % (self.options.arch,
- ', '.join(supported_arch)))
-
- if self.options.pkgmgr is not None:
- configmgr.create['pkgmgr'] = self.options.pkgmgr
-
- if self.options.runtime:
- configmgr.set_runtime(self.options.runtime)
-
- if self.options.pack_to is not None:
- configmgr.create['pack_to'] = self.options.pack_to
-
- if self.options.copy_kernel:
- configmgr.create['copy_kernel'] = self.options.copy_kernel
-
- if self.options.install_pkgs:
- configmgr.create['install_pkgs'] = []
- for pkgtype in self.options.install_pkgs.split(','):
- if pkgtype not in ('source', 'debuginfo', 'debugsource'):
- raise errors.Usage('Invalid parameter specified: "%s", '
- 'valid values: source, debuginfo, '
- 'debusource' % pkgtype)
-
- configmgr.create['install_pkgs'].append(pkgtype)
-
- if self.options.enabletmpfs:
- configmgr.create['enabletmpfs'] = self.options.enabletmpfs
-
- if self.options.repourl:
- for item in self.options.repourl:
- try:
- key, val = item.split('=')
- except:
- continue
- configmgr.create['repourl'][key] = val
-
- def main(self, argv=None):
- if argv is None:
- argv = sys.argv
- else:
- argv = argv[:] # don't modify caller's list
-
- self.optparser = self.get_optparser()
- if self.optparser:
- try:
- argv = self.preoptparse(argv)
- self.options, args = self.optparser.parse_args(argv)
-
- except cmdln.CmdlnUserError, ex:
- msg = "%s: %s\nTry '%s help' for info.\n"\
- % (self.name, ex, self.name)
- msger.error(msg)
-
- except cmdln.StopOptionProcessing, ex:
- return 0
- else:
- # optparser=None means no process for opts
- self.options, args = None, argv[1:]
-
- if not args:
- return self.emptyline()
-
- self.postoptparse()
-
- return self.cmd(args)
-
- def precmd(self, argv): # check help before cmd
-
- if '-h' in argv or '?' in argv or '--help' in argv or 'help' in argv:
- return argv
-
- if len(argv) == 1:
- return ['help', argv[0]]
-
- return argv
-
- def do_auto(self, subcmd, opts, *args):
- """${cmd_name}: auto detect image type from magic header
-
- Usage:
- ${name} ${cmd_name} <ksfile>
-
- ${cmd_option_list}
- """
- def parse_magic_line(re_str, pstr, ptype='mic'):
- ptn = re.compile(re_str)
- m = ptn.match(pstr)
- if not m or not m.groups():
- return None
-
- inline_argv = m.group(1).strip()
- if ptype == 'mic':
- m2 = re.search('(?P<format>\w+)', inline_argv)
- elif ptype == 'mic2':
- m2 = re.search('(-f|--format(=)?)\s*(?P<format>\w+)',
- inline_argv)
- else:
- return None
-
- if m2:
- cmdname = m2.group('format')
- inline_argv = inline_argv.replace(m2.group(0), '')
- return (cmdname, inline_argv)
-
- return None
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- if not os.path.exists(args[0]):
- raise errors.CreatorError("Can't find the file: %s" % args[0])
-
- with open(args[0], 'r') as rf:
- first_line = rf.readline()
-
- mic_re = '^#\s*-\*-mic-options-\*-\s+(.*)\s+-\*-mic-options-\*-'
- mic2_re = '^#\s*-\*-mic2-options-\*-\s+(.*)\s+-\*-mic2-options-\*-'
-
- result = parse_magic_line(mic_re, first_line, 'mic') \
- or parse_magic_line(mic2_re, first_line, 'mic2')
- if not result:
- raise errors.KsError("Invalid magic line in file: %s" % args[0])
-
- if result[0] not in self._subcmds:
- raise errors.KsError("Unsupport format '%s' in %s"
- % (result[0], args[0]))
-
- argv = ' '.join(result + args).split()
- self.main(argv)
-
diff --git a/scripts/lib/mic/imager/baseimager.py b/scripts/lib/mic/imager/baseimager.py
deleted file mode 100644
index b7212493b4..0000000000
--- a/scripts/lib/mic/imager/baseimager.py
+++ /dev/null
@@ -1,1263 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2007 Red Hat Inc.
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os, sys
-import stat
-import tempfile
-import shutil
-import subprocess
-import re
-import tarfile
-import glob
-
-from mic import kickstart
-from mic import msger
-from mic.utils.errors import CreatorError, Abort
-from mic.utils import misc, runner, fs_related as fs
-
-class BaseImageCreator(object):
- """Installs a system to a chroot directory.
-
- ImageCreator is the simplest creator class available; it will install and
- configure a system image according to the supplied kickstart file.
-
- e.g.
-
- import mic.imgcreate as imgcreate
- ks = imgcreate.read_kickstart("foo.ks")
- imgcreate.ImageCreator(ks, "foo").create()
-
- """
-
- def __del__(self):
- self.cleanup()
-
- def __init__(self, createopts = None, pkgmgr = None):
- """Initialize an ImageCreator instance.
-
- ks -- a pykickstart.KickstartParser instance; this instance will be
- used to drive the install by e.g. providing the list of packages
- to be installed, the system configuration and %post scripts
-
- name -- a name for the image; used for e.g. image filenames or
- filesystem labels
- """
-
- self.pkgmgr = pkgmgr
-
- self.__builddir = None
- self.__bindmounts = []
-
- self.ks = None
- self.name = "target"
- self.tmpdir = "/var/tmp/wic"
- self.cachedir = "/var/tmp/wic/cache"
- self.workdir = "/var/tmp/wic/build"
-
- self.destdir = "."
- self.installerfw_prefix = "INSTALLERFW_"
- self.target_arch = "noarch"
- self._local_pkgs_path = None
- self.pack_to = None
- self.repourl = {}
-
- # If the kernel is save to the destdir when copy_kernel cmd is called.
- self._need_copy_kernel = False
- # setup tmpfs tmpdir when enabletmpfs is True
- self.enabletmpfs = False
-
- if createopts:
- # Mapping table for variables that have different names.
- optmap = {"pkgmgr" : "pkgmgr_name",
- "outdir" : "destdir",
- "arch" : "target_arch",
- "local_pkgs_path" : "_local_pkgs_path",
- "copy_kernel" : "_need_copy_kernel",
- }
-
- # update setting from createopts
- for key in createopts.keys():
- if key in optmap:
- option = optmap[key]
- else:
- option = key
- setattr(self, option, createopts[key])
-
- self.destdir = os.path.abspath(os.path.expanduser(self.destdir))
-
- if 'release' in createopts and createopts['release']:
- self.name = createopts['release'] + '_' + self.name
-
- if self.pack_to:
- if '@NAME@' in self.pack_to:
- self.pack_to = self.pack_to.replace('@NAME@', self.name)
- (tar, ext) = os.path.splitext(self.pack_to)
- if ext in (".gz", ".bz2") and tar.endswith(".tar"):
- ext = ".tar" + ext
- if ext not in misc.pack_formats:
- self.pack_to += ".tar"
-
- self._dep_checks = ["ls", "bash", "cp", "echo", "modprobe"]
-
- # Output image file names
- self.outimage = []
-
- # A flag to generate checksum
- self._genchecksum = False
-
- self._alt_initrd_name = None
-
- self._recording_pkgs = []
-
- # available size in root fs, init to 0
- self._root_fs_avail = 0
-
- # Name of the disk image file that is created.
- self._img_name = None
-
- self.image_format = None
-
- # Save qemu emulator file name in order to clean up it finally
- self.qemu_emulator = None
-
- # No ks provided when called by convertor, so skip the dependency check
- if self.ks:
- # If we have btrfs partition we need to check necessary tools
- for part in self.ks.handler.partition.partitions:
- if part.fstype and part.fstype == "btrfs":
- self._dep_checks.append("mkfs.btrfs")
- break
-
- if self.target_arch and self.target_arch.startswith("arm"):
- for dep in self._dep_checks:
- if dep == "extlinux":
- self._dep_checks.remove(dep)
-
- if not os.path.exists("/usr/bin/qemu-arm") or \
- not misc.is_statically_linked("/usr/bin/qemu-arm"):
- self._dep_checks.append("qemu-arm-static")
-
- if os.path.exists("/proc/sys/vm/vdso_enabled"):
- vdso_fh = open("/proc/sys/vm/vdso_enabled","r")
- vdso_value = vdso_fh.read().strip()
- vdso_fh.close()
- if (int)(vdso_value) == 1:
- msger.warning("vdso is enabled on your host, which might "
- "cause problems with arm emulations.\n"
- "\tYou can disable vdso with following command before "
- "starting image build:\n"
- "\techo 0 | sudo tee /proc/sys/vm/vdso_enabled")
-
- # make sure the specified tmpdir and cachedir exist
- if not os.path.exists(self.tmpdir):
- os.makedirs(self.tmpdir)
- if not os.path.exists(self.cachedir):
- os.makedirs(self.cachedir)
-
-
- #
- # Properties
- #
- def __get_instroot(self):
- if self.__builddir is None:
- raise CreatorError("_instroot is not valid before calling mount()")
- return self.__builddir + "/install_root"
- _instroot = property(__get_instroot)
- """The location of the install root directory.
-
- This is the directory into which the system is installed. Subclasses may
- mount a filesystem image here or copy files to/from here.
-
- Note, this directory does not exist before ImageCreator.mount() is called.
-
- Note also, this is a read-only attribute.
-
- """
-
- def __get_outdir(self):
- if self.__builddir is None:
- raise CreatorError("_outdir is not valid before calling mount()")
- return self.__builddir + "/out"
- _outdir = property(__get_outdir)
- """The staging location for the final image.
-
- This is where subclasses should stage any files that are part of the final
- image. ImageCreator.package() will copy any files found here into the
- requested destination directory.
-
- Note, this directory does not exist before ImageCreator.mount() is called.
-
- Note also, this is a read-only attribute.
-
- """
-
-
- #
- # Hooks for subclasses
- #
- def _mount_instroot(self, base_on = None):
- """Mount or prepare the install root directory.
-
- This is the hook where subclasses may prepare the install root by e.g.
- mounting creating and loopback mounting a filesystem image to
- _instroot.
-
- There is no default implementation.
-
- base_on -- this is the value passed to mount() and can be interpreted
- as the subclass wishes; it might e.g. be the location of
- a previously created ISO containing a system image.
-
- """
- pass
-
- def _unmount_instroot(self):
- """Undo anything performed in _mount_instroot().
-
- This is the hook where subclasses must undo anything which was done
- in _mount_instroot(). For example, if a filesystem image was mounted
- onto _instroot, it should be unmounted here.
-
- There is no default implementation.
-
- """
- pass
-
- def _create_bootconfig(self):
- """Configure the image so that it's bootable.
-
- This is the hook where subclasses may prepare the image for booting by
- e.g. creating an initramfs and bootloader configuration.
-
- This hook is called while the install root is still mounted, after the
- packages have been installed and the kickstart configuration has been
- applied, but before the %post scripts have been executed.
-
- There is no default implementation.
-
- """
- pass
-
- def _stage_final_image(self):
- """Stage the final system image in _outdir.
-
- This is the hook where subclasses should place the image in _outdir
- so that package() can copy it to the requested destination directory.
-
- By default, this moves the install root into _outdir.
-
- """
- shutil.move(self._instroot, self._outdir + "/" + self.name)
-
- def get_installed_packages(self):
- return self._pkgs_content.keys()
-
- def _save_recording_pkgs(self, destdir):
- """Save the list or content of installed packages to file.
- """
- pkgs = self._pkgs_content.keys()
- pkgs.sort() # inplace op
-
- if not os.path.exists(destdir):
- os.makedirs(destdir)
-
- content = None
- if 'vcs' in self._recording_pkgs:
- vcslst = ["%s %s" % (k, v) for (k, v) in self._pkgs_vcsinfo.items()]
- content = '\n'.join(sorted(vcslst))
- elif 'name' in self._recording_pkgs:
- content = '\n'.join(pkgs)
- if content:
- namefile = os.path.join(destdir, self.name + '.packages')
- f = open(namefile, "w")
- f.write(content)
- f.close()
- self.outimage.append(namefile);
-
- # if 'content', save more details
- if 'content' in self._recording_pkgs:
- contfile = os.path.join(destdir, self.name + '.files')
- f = open(contfile, "w")
-
- for pkg in pkgs:
- content = pkg + '\n'
-
- pkgcont = self._pkgs_content[pkg]
- content += ' '
- content += '\n '.join(pkgcont)
- content += '\n'
-
- content += '\n'
- f.write(content)
- f.close()
- self.outimage.append(contfile)
-
- if 'license' in self._recording_pkgs:
- licensefile = os.path.join(destdir, self.name + '.license')
- f = open(licensefile, "w")
-
- f.write('Summary:\n')
- for license in reversed(sorted(self._pkgs_license, key=\
- lambda license: len(self._pkgs_license[license]))):
- f.write(" - %s: %s\n" \
- % (license, len(self._pkgs_license[license])))
-
- f.write('\nDetails:\n')
- for license in reversed(sorted(self._pkgs_license, key=\
- lambda license: len(self._pkgs_license[license]))):
- f.write(" - %s:\n" % (license))
- for pkg in sorted(self._pkgs_license[license]):
- f.write(" - %s\n" % (pkg))
- f.write('\n')
-
- f.close()
- self.outimage.append(licensefile)
-
- def _get_required_packages(self):
- """Return a list of required packages.
-
- This is the hook where subclasses may specify a set of packages which
- it requires to be installed.
-
- This returns an empty list by default.
-
- Note, subclasses should usually chain up to the base class
- implementation of this hook.
-
- """
- return []
-
- def _get_excluded_packages(self):
- """Return a list of excluded packages.
-
- This is the hook where subclasses may specify a set of packages which
- it requires _not_ to be installed.
-
- This returns an empty list by default.
-
- Note, subclasses should usually chain up to the base class
- implementation of this hook.
-
- """
- return []
-
- def _get_local_packages(self):
- """Return a list of rpm path to be local installed.
-
- This is the hook where subclasses may specify a set of rpms which
- it requires to be installed locally.
-
- This returns an empty list by default.
-
- Note, subclasses should usually chain up to the base class
- implementation of this hook.
-
- """
- if self._local_pkgs_path:
- if os.path.isdir(self._local_pkgs_path):
- return glob.glob(
- os.path.join(self._local_pkgs_path, '*.rpm'))
- elif os.path.splitext(self._local_pkgs_path)[-1] == '.rpm':
- return [self._local_pkgs_path]
-
- return []
-
- def _get_fstab(self):
- """Return the desired contents of /etc/fstab.
-
- This is the hook where subclasses may specify the contents of
- /etc/fstab by returning a string containing the desired contents.
-
- A sensible default implementation is provided.
-
- """
- s = "/dev/root / %s %s 0 0\n" \
- % (self._fstype,
- "defaults,noatime" if not self._fsopts else self._fsopts)
- s += self._get_fstab_special()
- return s
-
- def _get_fstab_special(self):
- s = "devpts /dev/pts devpts gid=5,mode=620 0 0\n"
- s += "tmpfs /dev/shm tmpfs defaults 0 0\n"
- s += "proc /proc proc defaults 0 0\n"
- s += "sysfs /sys sysfs defaults 0 0\n"
- return s
-
- def _set_part_env(self, pnum, prop, value):
- """ This is a helper function which generates an environment variable
- for a property "prop" with value "value" of a partition number "pnum".
-
- The naming convention is:
- * Variables start with INSTALLERFW_PART
- * Then goes the partition number, the order is the same as
- specified in the KS file
- * Then goes the property name
- """
-
- if value == None:
- value = ""
- else:
- value = str(value)
-
- name = self.installerfw_prefix + ("PART%d_" % pnum) + prop
- return { name : value }
-
- def _get_post_scripts_env(self, in_chroot):
- """Return an environment dict for %post scripts.
-
- This is the hook where subclasses may specify some environment
- variables for %post scripts by return a dict containing the desired
- environment.
-
- in_chroot -- whether this %post script is to be executed chroot()ed
- into _instroot.
- """
-
- env = {}
- pnum = 0
-
- for p in kickstart.get_partitions(self.ks):
- env.update(self._set_part_env(pnum, "SIZE", p.size))
- env.update(self._set_part_env(pnum, "MOUNTPOINT", p.mountpoint))
- env.update(self._set_part_env(pnum, "FSTYPE", p.fstype))
- env.update(self._set_part_env(pnum, "LABEL", p.label))
- env.update(self._set_part_env(pnum, "FSOPTS", p.fsopts))
- env.update(self._set_part_env(pnum, "BOOTFLAG", p.active))
- env.update(self._set_part_env(pnum, "ALIGN", p.align))
- env.update(self._set_part_env(pnum, "TYPE_ID", p.part_type))
- env.update(self._set_part_env(pnum, "DEVNODE",
- "/dev/%s%d" % (p.disk, pnum + 1)))
- pnum += 1
-
- # Count of paritions
- env[self.installerfw_prefix + "PART_COUNT"] = str(pnum)
-
- # Partition table format
- ptable_format = self.ks.handler.bootloader.ptable
- env[self.installerfw_prefix + "PTABLE_FORMAT"] = ptable_format
-
- # The kerned boot parameters
- kernel_opts = self.ks.handler.bootloader.appendLine
- env[self.installerfw_prefix + "KERNEL_OPTS"] = kernel_opts
-
- # Name of the distribution
- env[self.installerfw_prefix + "DISTRO_NAME"] = self.distro_name
-
- # Name of the image creation tool
- env[self.installerfw_prefix + "INSTALLER_NAME"] = "wic"
-
- # The real current location of the mounted file-systems
- if in_chroot:
- mount_prefix = "/"
- else:
- mount_prefix = self._instroot
- env[self.installerfw_prefix + "MOUNT_PREFIX"] = mount_prefix
-
- # These are historical variables which lack the common name prefix
- if not in_chroot:
- env["INSTALL_ROOT"] = self._instroot
- env["IMG_NAME"] = self._name
-
- return env
-
- def __get_imgname(self):
- return self.name
- _name = property(__get_imgname)
- """The name of the image file.
-
- """
-
- def _get_kernel_versions(self):
- """Return a dict detailing the available kernel types/versions.
-
- This is the hook where subclasses may override what kernel types and
- versions should be available for e.g. creating the booloader
- configuration.
-
- A dict should be returned mapping the available kernel types to a list
- of the available versions for those kernels.
-
- The default implementation uses rpm to iterate over everything
- providing 'kernel', finds /boot/vmlinuz-* and returns the version
- obtained from the vmlinuz filename. (This can differ from the kernel
- RPM's n-v-r in the case of e.g. xen)
-
- """
- def get_kernel_versions(instroot):
- ret = {}
- versions = set()
- files = glob.glob(instroot + "/boot/vmlinuz-*")
- for file in files:
- version = os.path.basename(file)[8:]
- if version is None:
- continue
- versions.add(version)
- ret["kernel"] = list(versions)
- return ret
-
- def get_version(header):
- version = None
- for f in header['filenames']:
- if f.startswith('/boot/vmlinuz-'):
- version = f[14:]
- return version
-
- if self.ks is None:
- return get_kernel_versions(self._instroot)
-
- ts = rpm.TransactionSet(self._instroot)
-
- ret = {}
- for header in ts.dbMatch('provides', 'kernel'):
- version = get_version(header)
- if version is None:
- continue
-
- name = header['name']
- if not name in ret:
- ret[name] = [version]
- elif not version in ret[name]:
- ret[name].append(version)
-
- return ret
-
-
- #
- # Helpers for subclasses
- #
- def _do_bindmounts(self):
- """Mount various system directories onto _instroot.
-
- This method is called by mount(), but may also be used by subclasses
- in order to re-mount the bindmounts after modifying the underlying
- filesystem.
-
- """
- for b in self.__bindmounts:
- b.mount()
-
- def _undo_bindmounts(self):
- """Unmount the bind-mounted system directories from _instroot.
-
- This method is usually only called by unmount(), but may also be used
- by subclasses in order to gain access to the filesystem obscured by
- the bindmounts - e.g. in order to create device nodes on the image
- filesystem.
-
- """
- self.__bindmounts.reverse()
- for b in self.__bindmounts:
- b.unmount()
-
- def _chroot(self):
- """Chroot into the install root.
-
- This method may be used by subclasses when executing programs inside
- the install root e.g.
-
- subprocess.call(["/bin/ls"], preexec_fn = self.chroot)
-
- """
- os.chroot(self._instroot)
- os.chdir("/")
-
- def _mkdtemp(self, prefix = "tmp-"):
- """Create a temporary directory.
-
- This method may be used by subclasses to create a temporary directory
- for use in building the final image - e.g. a subclass might create
- a temporary directory in order to bundle a set of files into a package.
-
- The subclass may delete this directory if it wishes, but it will be
- automatically deleted by cleanup().
-
- The absolute path to the temporary directory is returned.
-
- Note, this method should only be called after mount() has been called.
-
- prefix -- a prefix which should be used when creating the directory;
- defaults to "tmp-".
-
- """
- self.__ensure_builddir()
- return tempfile.mkdtemp(dir = self.__builddir, prefix = prefix)
-
- def _mkstemp(self, prefix = "tmp-"):
- """Create a temporary file.
-
- This method may be used by subclasses to create a temporary file
- for use in building the final image - e.g. a subclass might need
- a temporary location to unpack a compressed file.
-
- The subclass may delete this file if it wishes, but it will be
- automatically deleted by cleanup().
-
- A tuple containing a file descriptor (returned from os.open() and the
- absolute path to the temporary directory is returned.
-
- Note, this method should only be called after mount() has been called.
-
- prefix -- a prefix which should be used when creating the file;
- defaults to "tmp-".
-
- """
- self.__ensure_builddir()
- return tempfile.mkstemp(dir = self.__builddir, prefix = prefix)
-
- def _mktemp(self, prefix = "tmp-"):
- """Create a temporary file.
-
- This method simply calls _mkstemp() and closes the returned file
- descriptor.
-
- The absolute path to the temporary file is returned.
-
- Note, this method should only be called after mount() has been called.
-
- prefix -- a prefix which should be used when creating the file;
- defaults to "tmp-".
-
- """
-
- (f, path) = self._mkstemp(prefix)
- os.close(f)
- return path
-
-
- #
- # Actual implementation
- #
- def __ensure_builddir(self):
- if not self.__builddir is None:
- return
-
- try:
- self.workdir = os.path.join(self.tmpdir, "build")
- if not os.path.exists(self.workdir):
- os.makedirs(self.workdir)
- self.__builddir = tempfile.mkdtemp(dir = self.workdir,
- prefix = "imgcreate-")
- except OSError, (err, msg):
- raise CreatorError("Failed create build directory in %s: %s" %
- (self.tmpdir, msg))
-
- def get_cachedir(self, cachedir = None):
- if self.cachedir:
- return self.cachedir
-
- self.__ensure_builddir()
- if cachedir:
- self.cachedir = cachedir
- else:
- self.cachedir = self.__builddir + "/wic-cache"
- fs.makedirs(self.cachedir)
- return self.cachedir
-
- def __sanity_check(self):
- """Ensure that the config we've been given is sane."""
- if not (kickstart.get_packages(self.ks) or
- kickstart.get_groups(self.ks)):
- raise CreatorError("No packages or groups specified")
-
- kickstart.convert_method_to_repo(self.ks)
-
- if not kickstart.get_repos(self.ks):
- raise CreatorError("No repositories specified")
-
- def __write_fstab(self):
- fstab_contents = self._get_fstab()
- if fstab_contents:
- fstab = open(self._instroot + "/etc/fstab", "w")
- fstab.write(fstab_contents)
- fstab.close()
-
- def __create_minimal_dev(self):
- """Create a minimal /dev so that we don't corrupt the host /dev"""
- origumask = os.umask(0000)
- devices = (('null', 1, 3, 0666),
- ('urandom',1, 9, 0666),
- ('random', 1, 8, 0666),
- ('full', 1, 7, 0666),
- ('ptmx', 5, 2, 0666),
- ('tty', 5, 0, 0666),
- ('zero', 1, 5, 0666))
-
- links = (("/proc/self/fd", "/dev/fd"),
- ("/proc/self/fd/0", "/dev/stdin"),
- ("/proc/self/fd/1", "/dev/stdout"),
- ("/proc/self/fd/2", "/dev/stderr"))
-
- for (node, major, minor, perm) in devices:
- if not os.path.exists(self._instroot + "/dev/" + node):
- os.mknod(self._instroot + "/dev/" + node,
- perm | stat.S_IFCHR,
- os.makedev(major,minor))
-
- for (src, dest) in links:
- if not os.path.exists(self._instroot + dest):
- os.symlink(src, self._instroot + dest)
-
- os.umask(origumask)
-
- def __setup_tmpdir(self):
- if not self.enabletmpfs:
- return
-
- runner.show('mount -t tmpfs -o size=4G tmpfs %s' % self.workdir)
-
- def __clean_tmpdir(self):
- if not self.enabletmpfs:
- return
-
- runner.show('umount -l %s' % self.workdir)
-
- def mount(self, base_on = None, cachedir = None):
- """Setup the target filesystem in preparation for an install.
-
- This function sets up the filesystem which the ImageCreator will
- install into and configure. The ImageCreator class merely creates an
- install root directory, bind mounts some system directories (e.g. /dev)
- and writes out /etc/fstab. Other subclasses may also e.g. create a
- sparse file, format it and loopback mount it to the install root.
-
- base_on -- a previous install on which to base this install; defaults
- to None, causing a new image to be created
-
- cachedir -- a directory in which to store the Yum cache; defaults to
- None, causing a new cache to be created; by setting this
- to another directory, the same cache can be reused across
- multiple installs.
-
- """
- self.__setup_tmpdir()
- self.__ensure_builddir()
-
- self._mount_instroot(base_on)
-
- def unmount(self):
- """Unmounts the target filesystem.
-
- The ImageCreator class detaches the system from the install root, but
- other subclasses may also detach the loopback mounted filesystem image
- from the install root.
-
- """
- self._unmount_instroot()
-
-
- def cleanup(self):
- """Unmounts the target filesystem and deletes temporary files.
-
- This method calls unmount() and then deletes any temporary files and
- directories that were created on the host system while building the
- image.
-
- Note, make sure to call this method once finished with the creator
- instance in order to ensure no stale files are left on the host e.g.:
-
- creator = ImageCreator(ks, name)
- try:
- creator.create()
- finally:
- creator.cleanup()
-
- """
- if not self.__builddir:
- return
-
- self.unmount()
-
- shutil.rmtree(self.__builddir, ignore_errors = True)
- self.__builddir = None
-
- self.__clean_tmpdir()
-
- def __is_excluded_pkg(self, pkg):
- if pkg in self._excluded_pkgs:
- self._excluded_pkgs.remove(pkg)
- return True
-
- for xpkg in self._excluded_pkgs:
- if xpkg.endswith('*'):
- if pkg.startswith(xpkg[:-1]):
- return True
- elif xpkg.startswith('*'):
- if pkg.endswith(xpkg[1:]):
- return True
-
- return None
-
- def __select_packages(self, pkg_manager):
- skipped_pkgs = []
- for pkg in self._required_pkgs:
- e = pkg_manager.selectPackage(pkg)
- if e:
- if kickstart.ignore_missing(self.ks):
- skipped_pkgs.append(pkg)
- elif self.__is_excluded_pkg(pkg):
- skipped_pkgs.append(pkg)
- else:
- raise CreatorError("Failed to find package '%s' : %s" %
- (pkg, e))
-
- for pkg in skipped_pkgs:
- msger.warning("Skipping missing package '%s'" % (pkg,))
-
- def __select_groups(self, pkg_manager):
- skipped_groups = []
- for group in self._required_groups:
- e = pkg_manager.selectGroup(group.name, group.include)
- if e:
- if kickstart.ignore_missing(self.ks):
- skipped_groups.append(group)
- else:
- raise CreatorError("Failed to find group '%s' : %s" %
- (group.name, e))
-
- for group in skipped_groups:
- msger.warning("Skipping missing group '%s'" % (group.name,))
-
- def __deselect_packages(self, pkg_manager):
- for pkg in self._excluded_pkgs:
- pkg_manager.deselectPackage(pkg)
-
- def __localinst_packages(self, pkg_manager):
- for rpm_path in self._get_local_packages():
- pkg_manager.installLocal(rpm_path)
-
- def __preinstall_packages(self, pkg_manager):
- if not self.ks:
- return
-
- self._preinstall_pkgs = kickstart.get_pre_packages(self.ks)
- for pkg in self._preinstall_pkgs:
- pkg_manager.preInstall(pkg)
-
- def __attachment_packages(self, pkg_manager):
- if not self.ks:
- return
-
- self._attachment = []
- for item in kickstart.get_attachment(self.ks):
- if item.startswith('/'):
- fpaths = os.path.join(self._instroot, item.lstrip('/'))
- for fpath in glob.glob(fpaths):
- self._attachment.append(fpath)
- continue
-
- filelist = pkg_manager.getFilelist(item)
- if filelist:
- # found rpm in rootfs
- for pfile in pkg_manager.getFilelist(item):
- fpath = os.path.join(self._instroot, pfile.lstrip('/'))
- self._attachment.append(fpath)
- continue
-
- # try to retrieve rpm file
- (url, proxies) = pkg_manager.package_url(item)
- if not url:
- msger.warning("Can't get url from repo for %s" % item)
- continue
- fpath = os.path.join(self.cachedir, os.path.basename(url))
- if not os.path.exists(fpath):
- # download pkgs
- try:
- fpath = grabber.myurlgrab(url, fpath, proxies, None)
- except CreatorError:
- raise
-
- tmpdir = self._mkdtemp()
- misc.extract_rpm(fpath, tmpdir)
- for (root, dirs, files) in os.walk(tmpdir):
- for fname in files:
- fpath = os.path.join(root, fname)
- self._attachment.append(fpath)
-
- def install(self, repo_urls=None):
- """Install packages into the install root.
-
- This function installs the packages listed in the supplied kickstart
- into the install root. By default, the packages are installed from the
- repository URLs specified in the kickstart.
-
- repo_urls -- a dict which maps a repository name to a repository URL;
- if supplied, this causes any repository URLs specified in
- the kickstart to be overridden.
-
- """
-
- # initialize pkg list to install
- if self.ks:
- self.__sanity_check()
-
- self._required_pkgs = \
- kickstart.get_packages(self.ks, self._get_required_packages())
- self._excluded_pkgs = \
- kickstart.get_excluded(self.ks, self._get_excluded_packages())
- self._required_groups = kickstart.get_groups(self.ks)
- else:
- self._required_pkgs = None
- self._excluded_pkgs = None
- self._required_groups = None
-
- pkg_manager = self.get_pkg_manager()
- pkg_manager.setup()
-
- if hasattr(self, 'install_pkgs') and self.install_pkgs:
- if 'debuginfo' in self.install_pkgs:
- pkg_manager.install_debuginfo = True
-
- for repo in kickstart.get_repos(self.ks, repo_urls):
- (name, baseurl, mirrorlist, inc, exc,
- proxy, proxy_username, proxy_password, debuginfo,
- source, gpgkey, disable, ssl_verify, nocache,
- cost, priority) = repo
-
- yr = pkg_manager.addRepository(name, baseurl, mirrorlist, proxy,
- proxy_username, proxy_password, inc, exc, ssl_verify,
- nocache, cost, priority)
-
- if kickstart.exclude_docs(self.ks):
- rpm.addMacro("_excludedocs", "1")
- rpm.addMacro("_dbpath", "/var/lib/rpm")
- rpm.addMacro("__file_context_path", "%{nil}")
- if kickstart.inst_langs(self.ks) != None:
- rpm.addMacro("_install_langs", kickstart.inst_langs(self.ks))
-
- try:
- self.__preinstall_packages(pkg_manager)
- self.__select_packages(pkg_manager)
- self.__select_groups(pkg_manager)
- self.__deselect_packages(pkg_manager)
- self.__localinst_packages(pkg_manager)
-
- BOOT_SAFEGUARD = 256L * 1024 * 1024 # 256M
- checksize = self._root_fs_avail
- if checksize:
- checksize -= BOOT_SAFEGUARD
- if self.target_arch:
- pkg_manager._add_prob_flags(rpm.RPMPROB_FILTER_IGNOREARCH)
- pkg_manager.runInstall(checksize)
- except CreatorError, e:
- raise
- except KeyboardInterrupt:
- raise
- else:
- self._pkgs_content = pkg_manager.getAllContent()
- self._pkgs_license = pkg_manager.getPkgsLicense()
- self._pkgs_vcsinfo = pkg_manager.getVcsInfo()
- self.__attachment_packages(pkg_manager)
- finally:
- pkg_manager.close()
-
- # hook post install
- self.postinstall()
-
- # do some clean up to avoid lvm info leakage. this sucks.
- for subdir in ("cache", "backup", "archive"):
- lvmdir = self._instroot + "/etc/lvm/" + subdir
- try:
- for f in os.listdir(lvmdir):
- os.unlink(lvmdir + "/" + f)
- except:
- pass
-
- def postinstall(self):
- self.copy_attachment()
-
- def __run_post_scripts(self):
- msger.info("Running scripts ...")
- if os.path.exists(self._instroot + "/tmp"):
- shutil.rmtree(self._instroot + "/tmp")
- os.mkdir (self._instroot + "/tmp", 0755)
- for s in kickstart.get_post_scripts(self.ks):
- (fd, path) = tempfile.mkstemp(prefix = "ks-script-",
- dir = self._instroot + "/tmp")
-
- s.script = s.script.replace("\r", "")
- os.write(fd, s.script)
- os.close(fd)
- os.chmod(path, 0700)
-
- env = self._get_post_scripts_env(s.inChroot)
-
- if not s.inChroot:
- preexec = None
- script = path
- else:
- preexec = self._chroot
- script = "/tmp/" + os.path.basename(path)
-
- try:
- try:
- subprocess.call([s.interp, script],
- preexec_fn = preexec,
- env = env,
- stdout = sys.stdout,
- stderr = sys.stderr)
- except OSError, (err, msg):
- raise CreatorError("Failed to execute %%post script "
- "with '%s' : %s" % (s.interp, msg))
- finally:
- os.unlink(path)
-
- def __save_repo_keys(self, repodata):
- if not repodata:
- return None
-
- gpgkeydir = "/etc/pki/rpm-gpg"
- fs.makedirs(self._instroot + gpgkeydir)
- for repo in repodata:
- if repo["repokey"]:
- repokey = gpgkeydir + "/RPM-GPG-KEY-%s" % repo["name"]
- shutil.copy(repo["repokey"], self._instroot + repokey)
-
- def configure(self, repodata = None):
- """Configure the system image according to the kickstart.
-
- This method applies the (e.g. keyboard or network) configuration
- specified in the kickstart and executes the kickstart %post scripts.
-
- If necessary, it also prepares the image to be bootable by e.g.
- creating an initrd and bootloader configuration.
-
- """
- ksh = self.ks.handler
-
- msger.info('Applying configurations ...')
- try:
- kickstart.LanguageConfig(self._instroot).apply(ksh.lang)
- kickstart.KeyboardConfig(self._instroot).apply(ksh.keyboard)
- kickstart.TimezoneConfig(self._instroot).apply(ksh.timezone)
- #kickstart.AuthConfig(self._instroot).apply(ksh.authconfig)
- kickstart.FirewallConfig(self._instroot).apply(ksh.firewall)
- kickstart.RootPasswordConfig(self._instroot).apply(ksh.rootpw)
- kickstart.UserConfig(self._instroot).apply(ksh.user)
- kickstart.ServicesConfig(self._instroot).apply(ksh.services)
- kickstart.XConfig(self._instroot).apply(ksh.xconfig)
- kickstart.NetworkConfig(self._instroot).apply(ksh.network)
- kickstart.RPMMacroConfig(self._instroot).apply(self.ks)
- kickstart.DesktopConfig(self._instroot).apply(ksh.desktop)
- self.__save_repo_keys(repodata)
- kickstart.MoblinRepoConfig(self._instroot).apply(ksh.repo, repodata, self.repourl)
- except:
- msger.warning("Failed to apply configuration to image")
- raise
-
- self._create_bootconfig()
- self.__run_post_scripts()
-
- def launch_shell(self, launch):
- """Launch a shell in the install root.
-
- This method is launches a bash shell chroot()ed in the install root;
- this can be useful for debugging.
-
- """
- if launch:
- msger.info("Launching shell. Exit to continue.")
- subprocess.call(["/bin/bash"], preexec_fn = self._chroot)
-
- def do_genchecksum(self, image_name):
- if not self._genchecksum:
- return
-
- md5sum = misc.get_md5sum(image_name)
- with open(image_name + ".md5sum", "w") as f:
- f.write("%s %s" % (md5sum, os.path.basename(image_name)))
- self.outimage.append(image_name+".md5sum")
-
- def package(self, destdir = "."):
- """Prepares the created image for final delivery.
-
- In its simplest form, this method merely copies the install root to the
- supplied destination directory; other subclasses may choose to package
- the image by e.g. creating a bootable ISO containing the image and
- bootloader configuration.
-
- destdir -- the directory into which the final image should be moved;
- this defaults to the current directory.
-
- """
- self._stage_final_image()
-
- if not os.path.exists(destdir):
- fs.makedirs(destdir)
-
- if self._recording_pkgs:
- self._save_recording_pkgs(destdir)
-
- # For image formats with two or multiple image files, it will be
- # better to put them under a directory
- if self.image_format in ("raw", "vmdk", "vdi", "nand", "mrstnand"):
- destdir = os.path.join(destdir, "%s-%s" \
- % (self.name, self.image_format))
- msger.debug("creating destination dir: %s" % destdir)
- fs.makedirs(destdir)
-
- # Ensure all data is flushed to _outdir
- runner.quiet('sync')
-
- misc.check_space_pre_cp(self._outdir, destdir)
- for f in os.listdir(self._outdir):
- shutil.move(os.path.join(self._outdir, f),
- os.path.join(destdir, f))
- self.outimage.append(os.path.join(destdir, f))
- self.do_genchecksum(os.path.join(destdir, f))
-
- def print_outimage_info(self):
- msg = "The new image can be found here:\n"
- self.outimage.sort()
- for file in self.outimage:
- msg += ' %s\n' % os.path.abspath(file)
-
- msger.info(msg)
-
- def check_depend_tools(self):
- for tool in self._dep_checks:
- fs.find_binary_path(tool)
-
- def package_output(self, image_format, destdir = ".", package="none"):
- if not package or package == "none":
- return
-
- destdir = os.path.abspath(os.path.expanduser(destdir))
- (pkg, comp) = os.path.splitext(package)
- if comp:
- comp=comp.lstrip(".")
-
- if pkg == "tar":
- if comp:
- dst = "%s/%s-%s.tar.%s" %\
- (destdir, self.name, image_format, comp)
- else:
- dst = "%s/%s-%s.tar" %\
- (destdir, self.name, image_format)
-
- msger.info("creating %s" % dst)
- tar = tarfile.open(dst, "w:" + comp)
-
- for file in self.outimage:
- msger.info("adding %s to %s" % (file, dst))
- tar.add(file,
- arcname=os.path.join("%s-%s" \
- % (self.name, image_format),
- os.path.basename(file)))
- if os.path.isdir(file):
- shutil.rmtree(file, ignore_errors = True)
- else:
- os.remove(file)
-
- tar.close()
-
- '''All the file in outimage has been packaged into tar.* file'''
- self.outimage = [dst]
-
- def release_output(self, config, destdir, release):
- """ Create release directory and files
- """
-
- def _rpath(fn):
- """ release path """
- return os.path.join(destdir, fn)
-
- outimages = self.outimage
-
- # new ks
- new_kspath = _rpath(self.name+'.ks')
- with open(config) as fr:
- with open(new_kspath, "w") as wf:
- # When building a release we want to make sure the .ks
- # file generates the same build even when --release not used.
- wf.write(fr.read().replace("@BUILD_ID@", release))
- outimages.append(new_kspath)
-
- # save log file, logfile is only available in creator attrs
- if hasattr(self, 'logfile') and not self.logfile:
- log_path = _rpath(self.name + ".log")
- # touch the log file, else outimages will filter it out
- with open(log_path, 'w') as wf:
- wf.write('')
- msger.set_logfile(log_path)
- outimages.append(_rpath(self.name + ".log"))
-
- # rename iso and usbimg
- for f in os.listdir(destdir):
- if f.endswith(".iso"):
- newf = f[:-4] + '.img'
- elif f.endswith(".usbimg"):
- newf = f[:-7] + '.img'
- else:
- continue
- os.rename(_rpath(f), _rpath(newf))
- outimages.append(_rpath(newf))
-
- # generate MD5SUMS
- with open(_rpath("MD5SUMS"), "w") as wf:
- for f in os.listdir(destdir):
- if f == "MD5SUMS":
- continue
-
- if os.path.isdir(os.path.join(destdir, f)):
- continue
-
- md5sum = misc.get_md5sum(_rpath(f))
- # There needs to be two spaces between the sum and
- # filepath to match the syntax with md5sum.
- # This way also md5sum -c MD5SUMS can be used by users
- wf.write("%s *%s\n" % (md5sum, f))
-
- outimages.append("%s/MD5SUMS" % destdir)
-
- # Filter out the nonexist file
- for fp in outimages[:]:
- if not os.path.exists("%s" % fp):
- outimages.remove(fp)
-
- def copy_kernel(self):
- """ Copy kernel files to the outimage directory.
- NOTE: This needs to be called before unmounting the instroot.
- """
-
- if not self._need_copy_kernel:
- return
-
- if not os.path.exists(self.destdir):
- os.makedirs(self.destdir)
-
- for kernel in glob.glob("%s/boot/vmlinuz-*" % self._instroot):
- kernelfilename = "%s/%s-%s" % (self.destdir,
- self.name,
- os.path.basename(kernel))
- msger.info('copy kernel file %s as %s' % (os.path.basename(kernel),
- kernelfilename))
- shutil.copy(kernel, kernelfilename)
- self.outimage.append(kernelfilename)
-
- def copy_attachment(self):
- """ Subclass implement it to handle attachment files
- NOTE: This needs to be called before unmounting the instroot.
- """
- pass
-
- def get_pkg_manager(self):
- return self.pkgmgr(target_arch = self.target_arch,
- instroot = self._instroot,
- cachedir = self.cachedir)
diff --git a/scripts/lib/mic/imager/fs.py b/scripts/lib/mic/imager/fs.py
deleted file mode 100644
index d53b29cb47..0000000000
--- a/scripts/lib/mic/imager/fs.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-
-from mic import msger
-from mic.utils import runner, misc
-from mic.utils.errors import CreatorError
-from mic.utils.fs_related import find_binary_path
-from mic.imager.baseimager import BaseImageCreator
-
-class FsImageCreator(BaseImageCreator):
- def __init__(self, cfgmgr = None, pkgmgr = None):
- self.zips = {
- "tar.bz2" : ""
- }
- BaseImageCreator.__init__(self, cfgmgr, pkgmgr)
- self._fstype = None
- self._fsopts = None
- self._include_src = False
-
- def package(self, destdir = "."):
-
- ignores = ["/dev/fd",
- "/dev/stdin",
- "/dev/stdout",
- "/dev/stderr",
- "/etc/mtab"]
-
- if not os.path.exists(destdir):
- os.makedirs(destdir)
-
- if self._recording_pkgs:
- self._save_recording_pkgs(destdir)
-
- if not self.pack_to:
- fsdir = os.path.join(destdir, self.name)
-
- misc.check_space_pre_cp(self._instroot, destdir)
- msger.info("Copying %s to %s ..." % (self._instroot, fsdir))
- runner.show(['cp', "-af", self._instroot, fsdir])
-
- for exclude in ignores:
- if os.path.exists(fsdir + exclude):
- os.unlink(fsdir + exclude)
-
- self.outimage.append(fsdir)
-
- else:
- (tar, comp) = os.path.splitext(self.pack_to)
- try:
- tarcreat = {'.tar': '-cf',
- '.gz': '-czf',
- '.bz2': '-cjf',
- '.tgz': '-czf',
- '.tbz': '-cjf'}[comp]
- except KeyError:
- raise CreatorError("Unsupported comression for this image type:"
- " '%s', try '.tar', '.tar.gz', etc" % comp)
-
- dst = os.path.join(destdir, self.pack_to)
- msger.info("Pack rootfs to %s. Please wait..." % dst)
-
- tar = find_binary_path('tar')
- tar_cmdline = [tar, "--numeric-owner",
- "--preserve-permissions",
- "--preserve-order",
- "--one-file-system",
- "--directory",
- self._instroot]
- for ignore_entry in ignores:
- if ignore_entry.startswith('/'):
- ignore_entry = ignore_entry[1:]
-
- tar_cmdline.append("--exclude=%s" % (ignore_entry))
-
- tar_cmdline.extend([tarcreat, dst, "."])
-
- rc = runner.show(tar_cmdline)
- if rc:
- raise CreatorError("Failed compress image with tar.bz2. "
- "Cmdline: %s" % (" ".join(tar_cmdline)))
-
- self.outimage.append(dst)
-
diff --git a/scripts/lib/mic/imager/livecd.py b/scripts/lib/mic/imager/livecd.py
deleted file mode 100644
index e36f4a76c6..0000000000
--- a/scripts/lib/mic/imager/livecd.py
+++ /dev/null
@@ -1,750 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys
-import glob
-import shutil
-
-from mic import kickstart, msger
-from mic.utils import fs_related, runner, misc
-from mic.utils.errors import CreatorError
-from mic.imager.loop import LoopImageCreator
-
-
-class LiveImageCreatorBase(LoopImageCreator):
- """A base class for LiveCD image creators.
-
- This class serves as a base class for the architecture-specific LiveCD
- image creator subclass, LiveImageCreator.
-
- LiveImageCreator creates a bootable ISO containing the system image,
- bootloader, bootloader configuration, kernel and initramfs.
- """
-
- def __init__(self, creatoropts = None, pkgmgr = None):
- """Initialise a LiveImageCreator instance.
-
- This method takes the same arguments as ImageCreator.__init__().
- """
- LoopImageCreator.__init__(self, creatoropts, pkgmgr)
-
- #Controls whether to use squashfs to compress the image.
- self.skip_compression = False
-
- #Controls whether an image minimizing snapshot should be created.
- #
- #This snapshot can be used when copying the system image from the ISO in
- #order to minimize the amount of data that needs to be copied; simply,
- #it makes it possible to create a version of the image's filesystem with
- #no spare space.
- self.skip_minimize = False
-
- #A flag which indicates i act as a convertor default false
- self.actasconvertor = False
-
- #The bootloader timeout from kickstart.
- if self.ks:
- self._timeout = kickstart.get_timeout(self.ks, 10)
- else:
- self._timeout = 10
-
- #The default kernel type from kickstart.
- if self.ks:
- self._default_kernel = kickstart.get_default_kernel(self.ks,
- "kernel")
- else:
- self._default_kernel = None
-
- if self.ks:
- parts = kickstart.get_partitions(self.ks)
- if len(parts) > 1:
- raise CreatorError("Can't support multi partitions in ks file "
- "for this image type")
- # FIXME: rename rootfs img to self.name,
- # else can't find files when create iso
- self._instloops[0]['name'] = self.name + ".img"
-
- self.__isodir = None
-
- self.__modules = ["=ata",
- "sym53c8xx",
- "aic7xxx",
- "=usb",
- "=firewire",
- "=mmc",
- "=pcmcia",
- "mptsas"]
- if self.ks:
- self.__modules.extend(kickstart.get_modules(self.ks))
-
- self._dep_checks.extend(["isohybrid",
- "unsquashfs",
- "mksquashfs",
- "dd",
- "genisoimage"])
-
- #
- # Hooks for subclasses
- #
- def _configure_bootloader(self, isodir):
- """Create the architecture specific booloader configuration.
-
- This is the hook where subclasses must create the booloader
- configuration in order to allow a bootable ISO to be built.
-
- isodir -- the directory where the contents of the ISO are to
- be staged
- """
- raise CreatorError("Bootloader configuration is arch-specific, "
- "but not implemented for this arch!")
- def _get_menu_options(self):
- """Return a menu options string for syslinux configuration.
- """
- if self.ks is None:
- return "liveinst autoinst"
- r = kickstart.get_menu_args(self.ks)
- return r
-
- def _get_kernel_options(self):
- """Return a kernel options string for bootloader configuration.
-
- This is the hook where subclasses may specify a set of kernel
- options which should be included in the images bootloader
- configuration.
-
- A sensible default implementation is provided.
- """
-
- if self.ks is None:
- r = "ro rd.live.image"
- else:
- r = kickstart.get_kernel_args(self.ks)
-
- return r
-
- def _get_mkisofs_options(self, isodir):
- """Return the architecture specific mkisosfs options.
-
- This is the hook where subclasses may specify additional arguments
- to mkisofs, e.g. to enable a bootable ISO to be built.
-
- By default, an empty list is returned.
- """
- return []
-
- #
- # Helpers for subclasses
- #
- def _has_checkisomd5(self):
- """Check whether checkisomd5 is available in the install root."""
- def _exists(path):
- return os.path.exists(self._instroot + path)
-
- if _exists("/usr/bin/checkisomd5") and os.path.exists("/usr/bin/implantisomd5"):
- return True
-
- return False
-
- def __restore_file(self,path):
- try:
- os.unlink(path)
- except:
- pass
- if os.path.exists(path + '.rpmnew'):
- os.rename(path + '.rpmnew', path)
-
- def _mount_instroot(self, base_on = None):
- LoopImageCreator._mount_instroot(self, base_on)
- self.__write_initrd_conf(self._instroot + "/etc/sysconfig/mkinitrd")
- self.__write_dracut_conf(self._instroot + "/etc/dracut.conf.d/02livecd.conf")
-
- def _unmount_instroot(self):
- self.__restore_file(self._instroot + "/etc/sysconfig/mkinitrd")
- self.__restore_file(self._instroot + "/etc/dracut.conf.d/02livecd.conf")
- LoopImageCreator._unmount_instroot(self)
-
- def __ensure_isodir(self):
- if self.__isodir is None:
- self.__isodir = self._mkdtemp("iso-")
- return self.__isodir
-
- def _get_isodir(self):
- return self.__ensure_isodir()
-
- def _set_isodir(self, isodir = None):
- self.__isodir = isodir
-
- def _create_bootconfig(self):
- """Configure the image so that it's bootable."""
- self._configure_bootloader(self.__ensure_isodir())
-
- def _get_post_scripts_env(self, in_chroot):
- env = LoopImageCreator._get_post_scripts_env(self, in_chroot)
-
- if not in_chroot:
- env["LIVE_ROOT"] = self.__ensure_isodir()
-
- return env
- def __write_dracut_conf(self, path):
- if not os.path.exists(os.path.dirname(path)):
- fs_related.makedirs(os.path.dirname(path))
- f = open(path, "a")
- f.write('add_dracutmodules+=" dmsquash-live pollcdrom "')
- f.close()
-
- def __write_initrd_conf(self, path):
- content = ""
- if not os.path.exists(os.path.dirname(path)):
- fs_related.makedirs(os.path.dirname(path))
- f = open(path, "w")
-
- content += 'LIVEOS="yes"\n'
- content += 'PROBE="no"\n'
- content += 'MODULES+="squashfs ext3 ext2 vfat msdos "\n'
- content += 'MODULES+="sr_mod sd_mod ide-cd cdrom "\n'
-
- for module in self.__modules:
- if module == "=usb":
- content += 'MODULES+="ehci_hcd uhci_hcd ohci_hcd "\n'
- content += 'MODULES+="usb_storage usbhid "\n'
- elif module == "=firewire":
- content += 'MODULES+="firewire-sbp2 firewire-ohci "\n'
- content += 'MODULES+="sbp2 ohci1394 ieee1394 "\n'
- elif module == "=mmc":
- content += 'MODULES+="mmc_block sdhci sdhci-pci "\n'
- elif module == "=pcmcia":
- content += 'MODULES+="pata_pcmcia "\n'
- else:
- content += 'MODULES+="' + module + ' "\n'
- f.write(content)
- f.close()
-
- def __create_iso(self, isodir):
- iso = self._outdir + "/" + self.name + ".iso"
- genisoimage = fs_related.find_binary_path("genisoimage")
- args = [genisoimage,
- "-J", "-r",
- "-hide-rr-moved", "-hide-joliet-trans-tbl",
- "-V", self.fslabel,
- "-o", iso]
-
- args.extend(self._get_mkisofs_options(isodir))
-
- args.append(isodir)
-
- if runner.show(args) != 0:
- raise CreatorError("ISO creation failed!")
-
- """ It should be ok still even if you haven't isohybrid """
- isohybrid = None
- try:
- isohybrid = fs_related.find_binary_path("isohybrid")
- except:
- pass
-
- if isohybrid:
- args = [isohybrid, "-partok", iso ]
- if runner.show(args) != 0:
- raise CreatorError("Hybrid ISO creation failed!")
-
- self.__implant_md5sum(iso)
-
- def __implant_md5sum(self, iso):
- """Implant an isomd5sum."""
- if os.path.exists("/usr/bin/implantisomd5"):
- implantisomd5 = "/usr/bin/implantisomd5"
- else:
- msger.warning("isomd5sum not installed; not setting up mediacheck")
- implantisomd5 = ""
- return
-
- runner.show([implantisomd5, iso])
-
- def _stage_final_image(self):
- try:
- fs_related.makedirs(self.__ensure_isodir() + "/LiveOS")
-
- minimal_size = self._resparse()
-
- if not self.skip_minimize:
- fs_related.create_image_minimizer(self.__isodir + \
- "/LiveOS/osmin.img",
- self._image,
- minimal_size)
-
- if self.skip_compression:
- shutil.move(self._image, self.__isodir + "/LiveOS/ext3fs.img")
- else:
- fs_related.makedirs(os.path.join(
- os.path.dirname(self._image),
- "LiveOS"))
- shutil.move(self._image,
- os.path.join(os.path.dirname(self._image),
- "LiveOS", "ext3fs.img"))
- fs_related.mksquashfs(os.path.dirname(self._image),
- self.__isodir + "/LiveOS/squashfs.img")
-
- self.__create_iso(self.__isodir)
-
- if self.pack_to:
- isoimg = os.path.join(self._outdir, self.name + ".iso")
- packimg = os.path.join(self._outdir, self.pack_to)
- misc.packing(packimg, isoimg)
- os.unlink(isoimg)
-
- finally:
- shutil.rmtree(self.__isodir, ignore_errors = True)
- self.__isodir = None
-
-class x86LiveImageCreator(LiveImageCreatorBase):
- """ImageCreator for x86 machines"""
- def _get_mkisofs_options(self, isodir):
- return [ "-b", "isolinux/isolinux.bin",
- "-c", "isolinux/boot.cat",
- "-no-emul-boot", "-boot-info-table",
- "-boot-load-size", "4" ]
-
- def _get_required_packages(self):
- return ["syslinux", "syslinux-extlinux"] + \
- LiveImageCreatorBase._get_required_packages(self)
-
- def _get_isolinux_stanzas(self, isodir):
- return ""
-
- def __find_syslinux_menu(self):
- for menu in ["vesamenu.c32", "menu.c32"]:
- if os.path.isfile(self._instroot + "/usr/share/syslinux/" + menu):
- return menu
-
- raise CreatorError("syslinux not installed : "
- "no suitable /usr/share/syslinux/*menu.c32 found")
-
- def __find_syslinux_mboot(self):
- #
- # We only need the mboot module if we have any xen hypervisors
- #
- if not glob.glob(self._instroot + "/boot/xen.gz*"):
- return None
-
- return "mboot.c32"
-
- def __copy_syslinux_files(self, isodir, menu, mboot = None):
- files = ["isolinux.bin", menu]
- if mboot:
- files += [mboot]
-
- for f in files:
- path = self._instroot + "/usr/share/syslinux/" + f
-
- if not os.path.isfile(path):
- raise CreatorError("syslinux not installed : "
- "%s not found" % path)
-
- shutil.copy(path, isodir + "/isolinux/")
-
- def __copy_syslinux_background(self, isodest):
- background_path = self._instroot + \
- "/usr/share/branding/default/syslinux/syslinux-vesa-splash.jpg"
-
- if not os.path.exists(background_path):
- return False
-
- shutil.copyfile(background_path, isodest)
-
- return True
-
- def __copy_kernel_and_initramfs(self, isodir, version, index):
- bootdir = self._instroot + "/boot"
- isDracut = False
-
- if self._alt_initrd_name:
- src_initrd_path = os.path.join(bootdir, self._alt_initrd_name)
- else:
- if os.path.exists(bootdir + "/initramfs-" + version + ".img"):
- src_initrd_path = os.path.join(bootdir, "initramfs-" +version+ ".img")
- isDracut = True
- else:
- src_initrd_path = os.path.join(bootdir, "initrd-" +version+ ".img")
-
- try:
- msger.debug("copy %s to %s" % (bootdir + "/vmlinuz-" + version, isodir + "/isolinux/vmlinuz" + index))
- shutil.copyfile(bootdir + "/vmlinuz-" + version,
- isodir + "/isolinux/vmlinuz" + index)
-
- msger.debug("copy %s to %s" % (src_initrd_path, isodir + "/isolinux/initrd" + index + ".img"))
- shutil.copyfile(src_initrd_path,
- isodir + "/isolinux/initrd" + index + ".img")
- except:
- raise CreatorError("Unable to copy valid kernels or initrds, "
- "please check the repo.")
-
- is_xen = False
- if os.path.exists(bootdir + "/xen.gz-" + version[:-3]):
- shutil.copyfile(bootdir + "/xen.gz-" + version[:-3],
- isodir + "/isolinux/xen" + index + ".gz")
- is_xen = True
-
- return (is_xen,isDracut)
-
- def __is_default_kernel(self, kernel, kernels):
- if len(kernels) == 1:
- return True
-
- if kernel == self._default_kernel:
- return True
-
- if kernel.startswith("kernel-") and kernel[7:] == self._default_kernel:
- return True
-
- return False
-
- def __get_basic_syslinux_config(self, **args):
- return """
-default %(menu)s
-timeout %(timeout)d
-
-%(background)s
-menu title Welcome to %(distroname)s!
-menu color border 0 #ffffffff #00000000
-menu color sel 7 #ff000000 #ffffffff
-menu color title 0 #ffffffff #00000000
-menu color tabmsg 0 #ffffffff #00000000
-menu color unsel 0 #ffffffff #00000000
-menu color hotsel 0 #ff000000 #ffffffff
-menu color hotkey 7 #ffffffff #ff000000
-menu color timeout_msg 0 #ffffffff #00000000
-menu color timeout 0 #ffffffff #00000000
-menu color cmdline 0 #ffffffff #00000000
-menu hidden
-menu clear
-""" % args
-
- def __get_image_stanza(self, is_xen, isDracut, **args):
- if isDracut:
- args["rootlabel"] = "live:CDLABEL=%(fslabel)s" % args
- else:
- args["rootlabel"] = "CDLABEL=%(fslabel)s" % args
- if not is_xen:
- template = """label %(short)s
- menu label %(long)s
- kernel vmlinuz%(index)s
- append initrd=initrd%(index)s.img root=%(rootlabel)s rootfstype=iso9660 %(liveargs)s %(extra)s
-"""
- else:
- template = """label %(short)s
- menu label %(long)s
- kernel mboot.c32
- append xen%(index)s.gz --- vmlinuz%(index)s root=%(rootlabel)s rootfstype=iso9660 %(liveargs)s %(extra)s --- initrd%(index)s.img
-"""
- return template % args
-
- def __get_image_stanzas(self, isodir):
- versions = []
- kernels = self._get_kernel_versions()
- for kernel in kernels:
- for version in kernels[kernel]:
- versions.append(version)
-
- if not versions:
- raise CreatorError("Unable to find valid kernels, "
- "please check the repo")
-
- kernel_options = self._get_kernel_options()
-
- """ menu can be customized highly, the format is:
-
- short_name1:long_name1:extra_opts1;short_name2:long_name2:extra_opts2
-
- e.g.: autoinst:InstallationOnly:systemd.unit=installer-graphical.service
- but in order to keep compatible with old format, these are still ok:
-
- liveinst autoinst
- liveinst;autoinst
- liveinst::;autoinst::
- """
- oldmenus = {"basic": {
- "short": "basic",
- "long": "Installation Only (Text based)",
- "extra": "basic nosplash 4"
- },
- "liveinst": {
- "short": "liveinst",
- "long": "Installation Only",
- "extra": "liveinst nosplash 4"
- },
- "autoinst": {
- "short": "autoinst",
- "long": "Autoinstall (Deletes all existing content)",
- "extra": "autoinst nosplash 4"
- },
- "netinst": {
- "short": "netinst",
- "long": "Network Installation",
- "extra": "netinst 4"
- },
- "verify": {
- "short": "check",
- "long": "Verify and",
- "extra": "check"
- }
- }
- menu_options = self._get_menu_options()
- menus = menu_options.split(";")
- for i in range(len(menus)):
- menus[i] = menus[i].split(":")
- if len(menus) == 1 and len(menus[0]) == 1:
- """ Keep compatible with the old usage way """
- menus = menu_options.split()
- for i in range(len(menus)):
- menus[i] = [menus[i]]
-
- cfg = ""
-
- default_version = None
- default_index = None
- index = "0"
- netinst = None
- for version in versions:
- (is_xen, isDracut) = self.__copy_kernel_and_initramfs(isodir, version, index)
- if index == "0":
- self._isDracut = isDracut
-
- default = self.__is_default_kernel(kernel, kernels)
-
- if default:
- long = "Boot %s" % self.distro_name
- elif kernel.startswith("kernel-"):
- long = "Boot %s(%s)" % (self.name, kernel[7:])
- else:
- long = "Boot %s(%s)" % (self.name, kernel)
-
- oldmenus["verify"]["long"] = "%s %s" % (oldmenus["verify"]["long"],
- long)
- # tell dracut not to ask for LUKS passwords or activate mdraid sets
- if isDracut:
- kern_opts = kernel_options + " rd.luks=0 rd.md=0 rd.dm=0"
- else:
- kern_opts = kernel_options
-
- cfg += self.__get_image_stanza(is_xen, isDracut,
- fslabel = self.fslabel,
- liveargs = kern_opts,
- long = long,
- short = "linux" + index,
- extra = "",
- index = index)
-
- if default:
- cfg += "menu default\n"
- default_version = version
- default_index = index
-
- for menu in menus:
- if not menu[0]:
- continue
- short = menu[0] + index
-
- if len(menu) >= 2:
- long = menu[1]
- else:
- if menu[0] in oldmenus.keys():
- if menu[0] == "verify" and not self._has_checkisomd5():
- continue
- if menu[0] == "netinst":
- netinst = oldmenus[menu[0]]
- continue
- long = oldmenus[menu[0]]["long"]
- extra = oldmenus[menu[0]]["extra"]
- else:
- long = short.upper() + " X" + index
- extra = ""
-
- if len(menu) >= 3:
- extra = menu[2]
-
- cfg += self.__get_image_stanza(is_xen, isDracut,
- fslabel = self.fslabel,
- liveargs = kernel_options,
- long = long,
- short = short,
- extra = extra,
- index = index)
-
- index = str(int(index) + 1)
-
- if not default_version:
- default_version = versions[0]
- if not default_index:
- default_index = "0"
-
- if netinst:
- cfg += self.__get_image_stanza(is_xen, isDracut,
- fslabel = self.fslabel,
- liveargs = kernel_options,
- long = netinst["long"],
- short = netinst["short"],
- extra = netinst["extra"],
- index = default_index)
-
- return cfg
-
- def __get_memtest_stanza(self, isodir):
- memtest = glob.glob(self._instroot + "/boot/memtest86*")
- if not memtest:
- return ""
-
- shutil.copyfile(memtest[0], isodir + "/isolinux/memtest")
-
- return """label memtest
- menu label Memory Test
- kernel memtest
-"""
-
- def __get_local_stanza(self, isodir):
- return """label local
- menu label Boot from local drive
- localboot 0xffff
-"""
-
- def _configure_syslinux_bootloader(self, isodir):
- """configure the boot loader"""
- fs_related.makedirs(isodir + "/isolinux")
-
- menu = self.__find_syslinux_menu()
-
- self.__copy_syslinux_files(isodir, menu,
- self.__find_syslinux_mboot())
-
- background = ""
- if self.__copy_syslinux_background(isodir + "/isolinux/splash.jpg"):
- background = "menu background splash.jpg"
-
- cfg = self.__get_basic_syslinux_config(menu = menu,
- background = background,
- name = self.name,
- timeout = self._timeout * 10,
- distroname = self.distro_name)
-
- cfg += self.__get_image_stanzas(isodir)
- cfg += self.__get_memtest_stanza(isodir)
- cfg += self.__get_local_stanza(isodir)
- cfg += self._get_isolinux_stanzas(isodir)
-
- cfgf = open(isodir + "/isolinux/isolinux.cfg", "w")
- cfgf.write(cfg)
- cfgf.close()
-
- def __copy_efi_files(self, isodir):
- if not os.path.exists(self._instroot + "/boot/efi/EFI/redhat/grub.efi"):
- return False
- shutil.copy(self._instroot + "/boot/efi/EFI/redhat/grub.efi",
- isodir + "/EFI/boot/grub.efi")
- shutil.copy(self._instroot + "/boot/grub/splash.xpm.gz",
- isodir + "/EFI/boot/splash.xpm.gz")
-
- return True
-
- def __get_basic_efi_config(self, **args):
- return """
-default=0
-splashimage=/EFI/boot/splash.xpm.gz
-timeout %(timeout)d
-hiddenmenu
-
-""" %args
-
- def __get_efi_image_stanza(self, **args):
- return """title %(long)s
- kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s
- initrd /EFI/boot/initrd%(index)s.img
-""" %args
-
- def __get_efi_image_stanzas(self, isodir, name):
- # FIXME: this only supports one kernel right now...
-
- kernel_options = self._get_kernel_options()
- checkisomd5 = self._has_checkisomd5()
-
- cfg = ""
-
- for index in range(0, 9):
- # we don't support xen kernels
- if os.path.exists("%s/EFI/boot/xen%d.gz" %(isodir, index)):
- continue
- cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- liveargs = kernel_options,
- long = name,
- extra = "", index = index)
- if checkisomd5:
- cfg += self.__get_efi_image_stanza(
- fslabel = self.fslabel,
- liveargs = kernel_options,
- long = "Verify and Boot " + name,
- extra = "check",
- index = index)
- break
-
- return cfg
-
- def _configure_efi_bootloader(self, isodir):
- """Set up the configuration for an EFI bootloader"""
- fs_related.makedirs(isodir + "/EFI/boot")
-
- if not self.__copy_efi_files(isodir):
- shutil.rmtree(isodir + "/EFI")
- return
-
- for f in os.listdir(isodir + "/isolinux"):
- os.link("%s/isolinux/%s" %(isodir, f),
- "%s/EFI/boot/%s" %(isodir, f))
-
-
- cfg = self.__get_basic_efi_config(name = self.name,
- timeout = self._timeout)
- cfg += self.__get_efi_image_stanzas(isodir, self.name)
-
- cfgf = open(isodir + "/EFI/boot/grub.conf", "w")
- cfgf.write(cfg)
- cfgf.close()
-
- # first gen mactel machines get the bootloader name wrong apparently
- if rpmmisc.getBaseArch() == "i386":
- os.link(isodir + "/EFI/boot/grub.efi",
- isodir + "/EFI/boot/boot.efi")
- os.link(isodir + "/EFI/boot/grub.conf",
- isodir + "/EFI/boot/boot.conf")
-
- # for most things, we want them named boot$efiarch
- efiarch = {"i386": "ia32", "x86_64": "x64"}
- efiname = efiarch[rpmmisc.getBaseArch()]
- os.rename(isodir + "/EFI/boot/grub.efi",
- isodir + "/EFI/boot/boot%s.efi" %(efiname,))
- os.link(isodir + "/EFI/boot/grub.conf",
- isodir + "/EFI/boot/boot%s.conf" %(efiname,))
-
-
- def _configure_bootloader(self, isodir):
- self._configure_syslinux_bootloader(isodir)
- self._configure_efi_bootloader(isodir)
-
-arch = "i386"
-if arch in ("i386", "x86_64"):
- LiveCDImageCreator = x86LiveImageCreator
-elif arch.startswith("arm"):
- LiveCDImageCreator = LiveImageCreatorBase
-else:
- raise CreatorError("Architecture not supported!")
diff --git a/scripts/lib/mic/imager/liveusb.py b/scripts/lib/mic/imager/liveusb.py
deleted file mode 100644
index a909928a4c..0000000000
--- a/scripts/lib/mic/imager/liveusb.py
+++ /dev/null
@@ -1,308 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import re
-
-from mic import msger
-from mic.utils import misc, fs_related, runner
-from mic.utils.errors import CreatorError, MountError
-from mic.utils.partitionedfs import PartitionedMount
-from mic.imager.livecd import LiveCDImageCreator
-
-
-class LiveUSBImageCreator(LiveCDImageCreator):
- def __init__(self, *args):
- LiveCDImageCreator.__init__(self, *args)
-
- self._dep_checks.extend(["kpartx", "parted"])
-
- # remove dependency of genisoimage in parent class
- if "genisoimage" in self._dep_checks:
- self._dep_checks.remove("genisoimage")
-
- def _create_usbimg(self, isodir):
- overlaysizemb = 64 #default
- #skipcompress = self.skip_compression?
- fstype = "vfat"
- homesizemb=0
- swapsizemb=0
- homefile="home.img"
- plussize=128
- kernelargs=None
-
- if fstype == 'vfat':
- if overlaysizemb > 2047:
- raise CreatorError("Can't have an overlay of 2048MB or "
- "greater on VFAT")
-
- if homesizemb > 2047:
- raise CreatorError("Can't have an home overlay of 2048MB or "
- "greater on VFAT")
-
- if swapsizemb > 2047:
- raise CreatorError("Can't have an swap overlay of 2048MB or "
- "greater on VFAT")
-
- livesize = misc.get_file_size(isodir + "/LiveOS")
-
- usbimgsize = (overlaysizemb + \
- homesizemb + \
- swapsizemb + \
- livesize + \
- plussize) * 1024L * 1024L
-
- disk = fs_related.SparseLoopbackDisk("%s/%s.usbimg" \
- % (self._outdir, self.name),
- usbimgsize)
- usbmnt = self._mkdtemp("usb-mnt")
- usbloop = PartitionedMount(usbmnt)
- usbloop.add_disk('/dev/sdb', disk)
-
- usbloop.add_partition(usbimgsize/1024/1024,
- "/dev/sdb",
- "/",
- fstype,
- boot=True)
-
- usbloop.mount()
-
- try:
- fs_related.makedirs(usbmnt + "/LiveOS")
-
- if os.path.exists(isodir + "/LiveOS/squashfs.img"):
- shutil.copyfile(isodir + "/LiveOS/squashfs.img",
- usbmnt + "/LiveOS/squashfs.img")
- else:
- fs_related.mksquashfs(os.path.dirname(self._image),
- usbmnt + "/LiveOS/squashfs.img")
-
- if os.path.exists(isodir + "/LiveOS/osmin.img"):
- shutil.copyfile(isodir + "/LiveOS/osmin.img",
- usbmnt + "/LiveOS/osmin.img")
-
- if fstype == "vfat" or fstype == "msdos":
- uuid = usbloop.partitions[0]['mount'].uuid
- label = usbloop.partitions[0]['mount'].fslabel
- usblabel = "UUID=%s-%s" % (uuid[0:4], uuid[4:8])
- overlaysuffix = "-%s-%s-%s" % (label, uuid[0:4], uuid[4:8])
- else:
- diskmount = usbloop.partitions[0]['mount']
- usblabel = "UUID=%s" % diskmount.uuid
- overlaysuffix = "-%s-%s" % (diskmount.fslabel, diskmount.uuid)
-
- args = ['cp', "-Rf", isodir + "/isolinux", usbmnt + "/syslinux"]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't copy isolinux directory %s" \
- % (isodir + "/isolinux/*"))
-
- if os.path.isfile("/usr/share/syslinux/isolinux.bin"):
- syslinux_path = "/usr/share/syslinux"
- elif os.path.isfile("/usr/lib/syslinux/isolinux.bin"):
- syslinux_path = "/usr/lib/syslinux"
- else:
- raise CreatorError("syslinux not installed : "
- "cannot find syslinux installation path")
-
- for f in ("isolinux.bin", "vesamenu.c32"):
- path = os.path.join(syslinux_path, f)
- if os.path.isfile(path):
- args = ['cp', path, usbmnt + "/syslinux/"]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't copy syslinux file " + path)
- else:
- raise CreatorError("syslinux not installed: "
- "syslinux file %s not found" % path)
-
- fd = open(isodir + "/isolinux/isolinux.cfg", "r")
- text = fd.read()
- fd.close()
- pattern = re.compile('CDLABEL=[^ ]*')
- text = pattern.sub(usblabel, text)
- pattern = re.compile('rootfstype=[^ ]*')
- text = pattern.sub("rootfstype=" + fstype, text)
- if kernelargs:
- text = text.replace("rd.live.image", "rd.live.image " + kernelargs)
-
- if overlaysizemb > 0:
- msger.info("Initializing persistent overlay file")
- overfile = "overlay" + overlaysuffix
- if fstype == "vfat":
- args = ['dd',
- "if=/dev/zero",
- "of=" + usbmnt + "/LiveOS/" + overfile,
- "count=%d" % overlaysizemb,
- "bs=1M"]
- else:
- args = ['dd',
- "if=/dev/null",
- "of=" + usbmnt + "/LiveOS/" + overfile,
- "count=1",
- "bs=1M",
- "seek=%d" % overlaysizemb]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't create overlay file")
- text = text.replace("rd.live.image", "rd.live.image rd.live.overlay=" + usblabel)
- text = text.replace(" ro ", " rw ")
-
- if swapsizemb > 0:
- msger.info("Initializing swap file")
- swapfile = usbmnt + "/LiveOS/" + "swap.img"
- args = ['dd',
- "if=/dev/zero",
- "of=" + swapfile,
- "count=%d" % swapsizemb,
- "bs=1M"]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't create swap file")
- args = ["mkswap", "-f", swapfile]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't mkswap on swap file")
-
- if homesizemb > 0:
- msger.info("Initializing persistent /home")
- homefile = usbmnt + "/LiveOS/" + homefile
- if fstype == "vfat":
- args = ['dd',
- "if=/dev/zero",
- "of=" + homefile,
- "count=%d" % homesizemb,
- "bs=1M"]
- else:
- args = ['dd',
- "if=/dev/null",
- "of=" + homefile,
- "count=1",
- "bs=1M",
- "seek=%d" % homesizemb]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't create home file")
-
- mkfscmd = fs_related.find_binary_path("/sbin/mkfs." + fstype)
- if fstype == "ext2" or fstype == "ext3":
- args = [mkfscmd, "-F", "-j", homefile]
- else:
- args = [mkfscmd, homefile]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't mke2fs home file")
- if fstype == "ext2" or fstype == "ext3":
- tune2fs = fs_related.find_binary_path("tune2fs")
- args = [tune2fs,
- "-c0",
- "-i0",
- "-ouser_xattr,acl",
- homefile]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't tune2fs home file")
-
- if fstype == "vfat" or fstype == "msdos":
- syslinuxcmd = fs_related.find_binary_path("syslinux")
- syslinuxcfg = usbmnt + "/syslinux/syslinux.cfg"
- args = [syslinuxcmd,
- "-d",
- "syslinux",
- usbloop.partitions[0]["device"]]
-
- elif fstype == "ext2" or fstype == "ext3":
- extlinuxcmd = fs_related.find_binary_path("extlinux")
- syslinuxcfg = usbmnt + "/syslinux/extlinux.conf"
- args = [extlinuxcmd,
- "-i",
- usbmnt + "/syslinux"]
-
- else:
- raise CreatorError("Invalid file system type: %s" % (fstype))
-
- os.unlink(usbmnt + "/syslinux/isolinux.cfg")
- fd = open(syslinuxcfg, "w")
- fd.write(text)
- fd.close()
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't install boot loader.")
-
- finally:
- usbloop.unmount()
- usbloop.cleanup()
-
- # Need to do this after image is unmounted and device mapper is closed
- msger.info("set MBR")
- mbrfile = "/usr/lib/syslinux/mbr.bin"
- if not os.path.exists(mbrfile):
- mbrfile = "/usr/share/syslinux/mbr.bin"
- if not os.path.exists(mbrfile):
- raise CreatorError("mbr.bin file didn't exist.")
- mbrsize = os.path.getsize(mbrfile)
- outimg = "%s/%s.usbimg" % (self._outdir, self.name)
-
- args = ['dd',
- "if=" + mbrfile,
- "of=" + outimg,
- "seek=0",
- "conv=notrunc",
- "bs=1",
- "count=%d" % (mbrsize)]
- rc = runner.show(args)
- if rc:
- raise CreatorError("Can't set MBR.")
-
- def _stage_final_image(self):
- try:
- isodir = self._get_isodir()
- fs_related.makedirs(isodir + "/LiveOS")
-
- minimal_size = self._resparse()
-
- if not self.skip_minimize:
- fs_related.create_image_minimizer(isodir + "/LiveOS/osmin.img",
- self._image,
- minimal_size)
-
- if self.skip_compression:
- shutil.move(self._image,
- isodir + "/LiveOS/ext3fs.img")
- else:
- fs_related.makedirs(os.path.join(
- os.path.dirname(self._image),
- "LiveOS"))
- shutil.move(self._image,
- os.path.join(os.path.dirname(self._image),
- "LiveOS", "ext3fs.img"))
- fs_related.mksquashfs(os.path.dirname(self._image),
- isodir + "/LiveOS/squashfs.img")
-
- self._create_usbimg(isodir)
-
- if self.pack_to:
- usbimg = os.path.join(self._outdir, self.name + ".usbimg")
- packimg = os.path.join(self._outdir, self.pack_to)
- misc.packing(packimg, usbimg)
- os.unlink(usbimg)
-
- finally:
- shutil.rmtree(isodir, ignore_errors = True)
- self._set_isodir(None)
-
diff --git a/scripts/lib/mic/imager/loop.py b/scripts/lib/mic/imager/loop.py
deleted file mode 100644
index 4d05ef271d..0000000000
--- a/scripts/lib/mic/imager/loop.py
+++ /dev/null
@@ -1,418 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import glob
-import shutil
-
-from mic import kickstart, msger
-from mic.utils.errors import CreatorError, MountError
-from mic.utils import misc, runner, fs_related as fs
-from mic.imager.baseimager import BaseImageCreator
-
-
-# The maximum string length supported for LoopImageCreator.fslabel
-FSLABEL_MAXLEN = 32
-
-
-def save_mountpoints(fpath, loops, arch = None):
- """Save mount points mapping to file
-
- :fpath, the xml file to store partition info
- :loops, dict of partition info
- :arch, image arch
- """
-
- if not fpath or not loops:
- return
-
- from xml.dom import minidom
- doc = minidom.Document()
- imgroot = doc.createElement("image")
- doc.appendChild(imgroot)
- if arch:
- imgroot.setAttribute('arch', arch)
- for loop in loops:
- part = doc.createElement("partition")
- imgroot.appendChild(part)
- for (key, val) in loop.items():
- if isinstance(val, fs.Mount):
- continue
- part.setAttribute(key, str(val))
-
- with open(fpath, 'w') as wf:
- wf.write(doc.toprettyxml(indent=' '))
-
- return
-
-def load_mountpoints(fpath):
- """Load mount points mapping from file
-
- :fpath, file path to load
- """
-
- if not fpath:
- return
-
- from xml.dom import minidom
- mount_maps = []
- with open(fpath, 'r') as rf:
- dom = minidom.parse(rf)
- imgroot = dom.documentElement
- for part in imgroot.getElementsByTagName("partition"):
- p = dict(part.attributes.items())
-
- try:
- mp = (p['mountpoint'], p['label'], p['name'],
- int(p['size']), p['fstype'])
- except KeyError:
- msger.warning("Wrong format line in file: %s" % fpath)
- except ValueError:
- msger.warning("Invalid size '%s' in file: %s" % (p['size'], fpath))
- else:
- mount_maps.append(mp)
-
- return mount_maps
-
-class LoopImageCreator(BaseImageCreator):
- """Installs a system into a loopback-mountable filesystem image.
-
- LoopImageCreator is a straightforward ImageCreator subclass; the system
- is installed into an ext3 filesystem on a sparse file which can be
- subsequently loopback-mounted.
-
- When specifying multiple partitions in kickstart file, each partition
- will be created as a separated loop image.
- """
-
- def __init__(self, creatoropts=None, pkgmgr=None,
- compress_image=None,
- shrink_image=False):
- """Initialize a LoopImageCreator instance.
-
- This method takes the same arguments as ImageCreator.__init__()
- with the addition of:
-
- fslabel -- A string used as a label for any filesystems created.
- """
-
- BaseImageCreator.__init__(self, creatoropts, pkgmgr)
-
- self.compress_image = compress_image
- self.shrink_image = shrink_image
-
- self.__fslabel = None
- self.fslabel = self.name
-
- self.__blocksize = 4096
- if self.ks:
- self.__fstype = kickstart.get_image_fstype(self.ks,
- "ext3")
- self.__fsopts = kickstart.get_image_fsopts(self.ks,
- "defaults,noatime")
-
- allloops = []
- for part in sorted(kickstart.get_partitions(self.ks),
- key=lambda p: p.mountpoint):
- if part.fstype == "swap":
- continue
-
- label = part.label
- mp = part.mountpoint
- if mp == '/':
- # the base image
- if not label:
- label = self.name
- else:
- mp = mp.rstrip('/')
- if not label:
- msger.warning('no "label" specified for loop img at %s'
- ', use the mountpoint as the name' % mp)
- label = mp.split('/')[-1]
-
- imgname = misc.strip_end(label, '.img') + '.img'
- allloops.append({
- 'mountpoint': mp,
- 'label': label,
- 'name': imgname,
- 'size': part.size or 4096L * 1024 * 1024,
- 'fstype': part.fstype or 'ext3',
- 'extopts': part.extopts or None,
- 'loop': None, # to be created in _mount_instroot
- })
- self._instloops = allloops
-
- else:
- self.__fstype = None
- self.__fsopts = None
- self._instloops = []
-
- self.__imgdir = None
-
- if self.ks:
- self.__image_size = kickstart.get_image_size(self.ks,
- 4096L * 1024 * 1024)
- else:
- self.__image_size = 0
-
- self._img_name = self.name + ".img"
-
- def get_image_names(self):
- if not self._instloops:
- return None
-
- return [lo['name'] for lo in self._instloops]
-
- def _set_fstype(self, fstype):
- self.__fstype = fstype
-
- def _set_image_size(self, imgsize):
- self.__image_size = imgsize
-
-
- #
- # Properties
- #
- def __get_fslabel(self):
- if self.__fslabel is None:
- return self.name
- else:
- return self.__fslabel
- def __set_fslabel(self, val):
- if val is None:
- self.__fslabel = None
- else:
- self.__fslabel = val[:FSLABEL_MAXLEN]
- #A string used to label any filesystems created.
- #
- #Some filesystems impose a constraint on the maximum allowed size of the
- #filesystem label. In the case of ext3 it's 16 characters, but in the case
- #of ISO9660 it's 32 characters.
- #
- #mke2fs silently truncates the label, but mkisofs aborts if the label is
- #too long. So, for convenience sake, any string assigned to this attribute
- #is silently truncated to FSLABEL_MAXLEN (32) characters.
- fslabel = property(__get_fslabel, __set_fslabel)
-
- def __get_image(self):
- if self.__imgdir is None:
- raise CreatorError("_image is not valid before calling mount()")
- return os.path.join(self.__imgdir, self._img_name)
- #The location of the image file.
- #
- #This is the path to the filesystem image. Subclasses may use this path
- #in order to package the image in _stage_final_image().
- #
- #Note, this directory does not exist before ImageCreator.mount() is called.
- #
- #Note also, this is a read-only attribute.
- _image = property(__get_image)
-
- def __get_blocksize(self):
- return self.__blocksize
- def __set_blocksize(self, val):
- if self._instloops:
- raise CreatorError("_blocksize must be set before calling mount()")
- try:
- self.__blocksize = int(val)
- except ValueError:
- raise CreatorError("'%s' is not a valid integer value "
- "for _blocksize" % val)
- #The block size used by the image's filesystem.
- #
- #This is the block size used when creating the filesystem image. Subclasses
- #may change this if they wish to use something other than a 4k block size.
- #
- #Note, this attribute may only be set before calling mount().
- _blocksize = property(__get_blocksize, __set_blocksize)
-
- def __get_fstype(self):
- return self.__fstype
- def __set_fstype(self, val):
- if val != "ext2" and val != "ext3":
- raise CreatorError("Unknown _fstype '%s' supplied" % val)
- self.__fstype = val
- #The type of filesystem used for the image.
- #
- #This is the filesystem type used when creating the filesystem image.
- #Subclasses may change this if they wish to use something other ext3.
- #
- #Note, only ext2 and ext3 are currently supported.
- #
- #Note also, this attribute may only be set before calling mount().
- _fstype = property(__get_fstype, __set_fstype)
-
- def __get_fsopts(self):
- return self.__fsopts
- def __set_fsopts(self, val):
- self.__fsopts = val
- #Mount options of filesystem used for the image.
- #
- #This can be specified by --fsoptions="xxx,yyy" in part command in
- #kickstart file.
- _fsopts = property(__get_fsopts, __set_fsopts)
-
-
- #
- # Helpers for subclasses
- #
- def _resparse(self, size=None):
- """Rebuild the filesystem image to be as sparse as possible.
-
- This method should be used by subclasses when staging the final image
- in order to reduce the actual space taken up by the sparse image file
- to be as little as possible.
-
- This is done by resizing the filesystem to the minimal size (thereby
- eliminating any space taken up by deleted files) and then resizing it
- back to the supplied size.
-
- size -- the size in, in bytes, which the filesystem image should be
- resized to after it has been minimized; this defaults to None,
- causing the original size specified by the kickstart file to
- be used (or 4GiB if not specified in the kickstart).
- """
- minsize = 0
- for item in self._instloops:
- if item['name'] == self._img_name:
- minsize = item['loop'].resparse(size)
- else:
- item['loop'].resparse(size)
-
- return minsize
-
- def _base_on(self, base_on=None):
- if base_on and self._image != base_on:
- shutil.copyfile(base_on, self._image)
-
- def _check_imgdir(self):
- if self.__imgdir is None:
- self.__imgdir = self._mkdtemp()
-
-
- #
- # Actual implementation
- #
- def _mount_instroot(self, base_on=None):
-
- if base_on and os.path.isfile(base_on):
- self.__imgdir = os.path.dirname(base_on)
- imgname = os.path.basename(base_on)
- self._base_on(base_on)
- self._set_image_size(misc.get_file_size(self._image))
-
- # here, self._instloops must be []
- self._instloops.append({
- "mountpoint": "/",
- "label": self.name,
- "name": imgname,
- "size": self.__image_size or 4096L,
- "fstype": self.__fstype or "ext3",
- "extopts": None,
- "loop": None
- })
-
- self._check_imgdir()
-
- for loop in self._instloops:
- fstype = loop['fstype']
- mp = os.path.join(self._instroot, loop['mountpoint'].lstrip('/'))
- size = loop['size'] * 1024L * 1024L
- imgname = loop['name']
-
- if fstype in ("ext2", "ext3", "ext4"):
- MyDiskMount = fs.ExtDiskMount
- elif fstype == "btrfs":
- MyDiskMount = fs.BtrfsDiskMount
- elif fstype in ("vfat", "msdos"):
- MyDiskMount = fs.VfatDiskMount
- else:
- msger.error('Cannot support fstype: %s' % fstype)
-
- loop['loop'] = MyDiskMount(fs.SparseLoopbackDisk(
- os.path.join(self.__imgdir, imgname),
- size),
- mp,
- fstype,
- self._blocksize,
- loop['label'])
-
- if fstype in ("ext2", "ext3", "ext4"):
- loop['loop'].extopts = loop['extopts']
-
- try:
- msger.verbose('Mounting image "%s" on "%s"' % (imgname, mp))
- fs.makedirs(mp)
- loop['loop'].mount()
- except MountError, e:
- raise
-
- def _unmount_instroot(self):
- for item in reversed(self._instloops):
- try:
- item['loop'].cleanup()
- except:
- pass
-
- def _stage_final_image(self):
-
- if self.pack_to or self.shrink_image:
- self._resparse(0)
- else:
- self._resparse()
-
- for item in self._instloops:
- imgfile = os.path.join(self.__imgdir, item['name'])
- if item['fstype'] == "ext4":
- runner.show('/sbin/tune2fs -O ^huge_file,extents,uninit_bg %s '
- % imgfile)
- if self.compress_image:
- misc.compressing(imgfile, self.compress_image)
-
- if not self.pack_to:
- for item in os.listdir(self.__imgdir):
- shutil.move(os.path.join(self.__imgdir, item),
- os.path.join(self._outdir, item))
- else:
- msger.info("Pack all loop images together to %s" % self.pack_to)
- dstfile = os.path.join(self._outdir, self.pack_to)
- misc.packing(dstfile, self.__imgdir)
-
- if self.pack_to:
- mountfp_xml = os.path.splitext(self.pack_to)[0]
- mountfp_xml = misc.strip_end(mountfp_xml, '.tar') + ".xml"
- else:
- mountfp_xml = self.name + ".xml"
- # save mount points mapping file to xml
- save_mountpoints(os.path.join(self._outdir, mountfp_xml),
- self._instloops,
- self.target_arch)
-
- def copy_attachment(self):
- if not hasattr(self, '_attachment') or not self._attachment:
- return
-
- self._check_imgdir()
-
- msger.info("Copying attachment files...")
- for item in self._attachment:
- if not os.path.exists(item):
- continue
- dpath = os.path.join(self.__imgdir, os.path.basename(item))
- msger.verbose("Copy attachment %s to %s" % (item, dpath))
- shutil.copy(item, dpath)
-
diff --git a/scripts/lib/mic/imager/raw.py b/scripts/lib/mic/imager/raw.py
deleted file mode 100644
index 838191a6f1..0000000000
--- a/scripts/lib/mic/imager/raw.py
+++ /dev/null
@@ -1,501 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import stat
-import shutil
-
-from mic import kickstart, msger
-from mic.utils import fs_related, runner, misc
-from mic.utils.partitionedfs import PartitionedMount
-from mic.utils.errors import CreatorError, MountError
-from mic.imager.baseimager import BaseImageCreator
-
-
-class RawImageCreator(BaseImageCreator):
- """Installs a system into a file containing a partitioned disk image.
-
- ApplianceImageCreator is an advanced ImageCreator subclass; a sparse file
- is formatted with a partition table, each partition loopback mounted
- and the system installed into an virtual disk. The disk image can
- subsequently be booted in a virtual machine or accessed with kpartx
- """
-
- def __init__(self, creatoropts=None, pkgmgr=None, compress_image=None, generate_bmap=None, fstab_entry="uuid"):
- """Initialize a ApplianceImageCreator instance.
-
- This method takes the same arguments as ImageCreator.__init__()
- """
- BaseImageCreator.__init__(self, creatoropts, pkgmgr)
-
- self.__instloop = None
- self.__imgdir = None
- self.__disks = {}
- self.__disk_format = "raw"
- self._disk_names = []
- self._ptable_format = self.ks.handler.bootloader.ptable
- self.vmem = 512
- self.vcpu = 1
- self.checksum = False
- self.use_uuid = fstab_entry == "uuid"
- self.appliance_version = None
- self.appliance_release = None
- self.compress_image = compress_image
- self.bmap_needed = generate_bmap
- self._need_extlinux = not kickstart.use_installerfw(self.ks, "extlinux")
- #self.getsource = False
- #self.listpkg = False
-
- self._dep_checks.extend(["sync", "kpartx", "parted"])
- if self._need_extlinux:
- self._dep_checks.extend(["extlinux"])
-
- def configure(self, repodata = None):
- import subprocess
- def chroot():
- os.chroot(self._instroot)
- os.chdir("/")
-
- if os.path.exists(self._instroot + "/usr/bin/Xorg"):
- subprocess.call(["/bin/chmod", "u+s", "/usr/bin/Xorg"],
- preexec_fn = chroot)
-
- BaseImageCreator.configure(self, repodata)
-
- def _get_fstab(self):
- if kickstart.use_installerfw(self.ks, "fstab"):
- # The fstab file will be generated by installer framework scripts
- # instead.
- return None
-
- s = ""
- for mp in self.__instloop.mountOrder:
- p = None
- for p1 in self.__instloop.partitions:
- if p1['mountpoint'] == mp:
- p = p1
- break
-
- if self.use_uuid and p['uuid']:
- device = "UUID=%s" % p['uuid']
- else:
- device = "/dev/%s%-d" % (p['disk_name'], p['num'])
-
- s += "%(device)s %(mountpoint)s %(fstype)s %(fsopts)s 0 0\n" % {
- 'device': device,
- 'mountpoint': p['mountpoint'],
- 'fstype': p['fstype'],
- 'fsopts': "defaults,noatime" if not p['fsopts'] else p['fsopts']}
-
- if p['mountpoint'] == "/":
- for subvol in self.__instloop.subvolumes:
- if subvol['mountpoint'] == "/":
- continue
- s += "%(device)s %(mountpoint)s %(fstype)s %(fsopts)s 0 0\n" % {
- 'device': "/dev/%s%-d" % (p['disk_name'], p['num']),
- 'mountpoint': subvol['mountpoint'],
- 'fstype': p['fstype'],
- 'fsopts': "defaults,noatime" if not subvol['fsopts'] else subvol['fsopts']}
-
- s += "devpts /dev/pts devpts gid=5,mode=620 0 0\n"
- s += "tmpfs /dev/shm tmpfs defaults 0 0\n"
- s += "proc /proc proc defaults 0 0\n"
- s += "sysfs /sys sysfs defaults 0 0\n"
- return s
-
- def _create_mkinitrd_config(self):
- """write to tell which modules to be included in initrd"""
-
- mkinitrd = ""
- mkinitrd += "PROBE=\"no\"\n"
- mkinitrd += "MODULES+=\"ext3 ata_piix sd_mod libata scsi_mod\"\n"
- mkinitrd += "rootfs=\"ext3\"\n"
- mkinitrd += "rootopts=\"defaults\"\n"
-
- msger.debug("Writing mkinitrd config %s/etc/sysconfig/mkinitrd" \
- % self._instroot)
- os.makedirs(self._instroot + "/etc/sysconfig/",mode=644)
- cfg = open(self._instroot + "/etc/sysconfig/mkinitrd", "w")
- cfg.write(mkinitrd)
- cfg.close()
-
- def _get_parts(self):
- if not self.ks:
- raise CreatorError("Failed to get partition info, "
- "please check your kickstart setting.")
-
- # Set a default partition if no partition is given out
- if not self.ks.handler.partition.partitions:
- partstr = "part / --size 1900 --ondisk sda --fstype=ext3"
- args = partstr.split()
- pd = self.ks.handler.partition.parse(args[1:])
- if pd not in self.ks.handler.partition.partitions:
- self.ks.handler.partition.partitions.append(pd)
-
- # partitions list from kickstart file
- return kickstart.get_partitions(self.ks)
-
- def get_disk_names(self):
- """ Returns a list of physical target disk names (e.g., 'sdb') which
- will be created. """
-
- if self._disk_names:
- return self._disk_names
-
- #get partition info from ks handler
- parts = self._get_parts()
-
- for i in range(len(parts)):
- if parts[i].disk:
- disk_name = parts[i].disk
- else:
- raise CreatorError("Failed to create disks, no --ondisk "
- "specified in partition line of ks file")
-
- if parts[i].mountpoint and not parts[i].fstype:
- raise CreatorError("Failed to create disks, no --fstype "
- "specified for partition with mountpoint "
- "'%s' in the ks file")
-
- self._disk_names.append(disk_name)
-
- return self._disk_names
-
- def _full_name(self, name, extention):
- """ Construct full file name for a file we generate. """
- return "%s-%s.%s" % (self.name, name, extention)
-
- def _full_path(self, path, name, extention):
- """ Construct full file path to a file we generate. """
- return os.path.join(path, self._full_name(name, extention))
-
- #
- # Actual implemention
- #
- def _mount_instroot(self, base_on = None):
- parts = self._get_parts()
- self.__instloop = PartitionedMount(self._instroot)
-
- for p in parts:
- self.__instloop.add_partition(int(p.size),
- p.disk,
- p.mountpoint,
- p.fstype,
- p.label,
- fsopts = p.fsopts,
- boot = p.active,
- align = p.align,
- part_type = p.part_type)
-
- self.__instloop.layout_partitions(self._ptable_format)
-
- # Create the disks
- self.__imgdir = self._mkdtemp()
- for disk_name, disk in self.__instloop.disks.items():
- full_path = self._full_path(self.__imgdir, disk_name, "raw")
- msger.debug("Adding disk %s as %s with size %s bytes" \
- % (disk_name, full_path, disk['min_size']))
-
- disk_obj = fs_related.SparseLoopbackDisk(full_path,
- disk['min_size'])
- self.__disks[disk_name] = disk_obj
- self.__instloop.add_disk(disk_name, disk_obj)
-
- self.__instloop.mount()
- self._create_mkinitrd_config()
-
- def _get_required_packages(self):
- required_packages = BaseImageCreator._get_required_packages(self)
- if self._need_extlinux:
- if not self.target_arch or not self.target_arch.startswith("arm"):
- required_packages += ["syslinux", "syslinux-extlinux"]
- return required_packages
-
- def _get_excluded_packages(self):
- return BaseImageCreator._get_excluded_packages(self)
-
- def _get_syslinux_boot_config(self):
- rootdev = None
- root_part_uuid = None
- for p in self.__instloop.partitions:
- if p['mountpoint'] == "/":
- rootdev = "/dev/%s%-d" % (p['disk_name'], p['num'])
- root_part_uuid = p['partuuid']
-
- return (rootdev, root_part_uuid)
-
- def _create_syslinux_config(self):
-
- splash = os.path.join(self._instroot, "boot/extlinux")
- if os.path.exists(splash):
- splashline = "menu background splash.jpg"
- else:
- splashline = ""
-
- (rootdev, root_part_uuid) = self._get_syslinux_boot_config()
- options = self.ks.handler.bootloader.appendLine
-
- #XXX don't hardcode default kernel - see livecd code
- syslinux_conf = ""
- syslinux_conf += "prompt 0\n"
- syslinux_conf += "timeout 1\n"
- syslinux_conf += "\n"
- syslinux_conf += "default vesamenu.c32\n"
- syslinux_conf += "menu autoboot Starting %s...\n" % self.distro_name
- syslinux_conf += "menu hidden\n"
- syslinux_conf += "\n"
- syslinux_conf += "%s\n" % splashline
- syslinux_conf += "menu title Welcome to %s!\n" % self.distro_name
- syslinux_conf += "menu color border 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color sel 7 #ffffffff #ff000000\n"
- syslinux_conf += "menu color title 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color tabmsg 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color unsel 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color hotsel 0 #ff000000 #ffffffff\n"
- syslinux_conf += "menu color hotkey 7 #ffffffff #ff000000\n"
- syslinux_conf += "menu color timeout_msg 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color timeout 0 #ffffffff #00000000\n"
- syslinux_conf += "menu color cmdline 0 #ffffffff #00000000\n"
-
- versions = []
- kernels = self._get_kernel_versions()
- symkern = "%s/boot/vmlinuz" % self._instroot
-
- if os.path.lexists(symkern):
- v = os.path.realpath(symkern).replace('%s-' % symkern, "")
- syslinux_conf += "label %s\n" % self.distro_name.lower()
- syslinux_conf += "\tmenu label %s (%s)\n" % (self.distro_name, v)
- syslinux_conf += "\tlinux ../vmlinuz\n"
- if self._ptable_format == 'msdos':
- rootstr = rootdev
- else:
- if not root_part_uuid:
- raise MountError("Cannot find the root GPT partition UUID")
- rootstr = "PARTUUID=%s" % root_part_uuid
- syslinux_conf += "\tappend ro root=%s %s\n" % (rootstr, options)
- syslinux_conf += "\tmenu default\n"
- else:
- for kernel in kernels:
- for version in kernels[kernel]:
- versions.append(version)
-
- footlabel = 0
- for v in versions:
- syslinux_conf += "label %s%d\n" \
- % (self.distro_name.lower(), footlabel)
- syslinux_conf += "\tmenu label %s (%s)\n" % (self.distro_name, v)
- syslinux_conf += "\tlinux ../vmlinuz-%s\n" % v
- syslinux_conf += "\tappend ro root=%s %s\n" \
- % (rootdev, options)
- if footlabel == 0:
- syslinux_conf += "\tmenu default\n"
- footlabel += 1;
-
- msger.debug("Writing syslinux config %s/boot/extlinux/extlinux.conf" \
- % self._instroot)
- cfg = open(self._instroot + "/boot/extlinux/extlinux.conf", "w")
- cfg.write(syslinux_conf)
- cfg.close()
-
- def _install_syslinux(self):
- for name in self.__disks.keys():
- loopdev = self.__disks[name].device
-
- # Set MBR
- mbrfile = "%s/usr/share/syslinux/" % self._instroot
- if self._ptable_format == 'gpt':
- mbrfile += "gptmbr.bin"
- else:
- mbrfile += "mbr.bin"
-
- msger.debug("Installing syslinux bootloader '%s' to %s" % \
- (mbrfile, loopdev))
-
- mbrsize = os.stat(mbrfile)[stat.ST_SIZE]
- rc = runner.show(['dd', 'if=%s' % mbrfile, 'of=' + loopdev])
- if rc != 0:
- raise MountError("Unable to set MBR to %s" % loopdev)
-
-
- # Ensure all data is flushed to disk before doing syslinux install
- runner.quiet('sync')
-
- fullpathsyslinux = fs_related.find_binary_path("extlinux")
- rc = runner.show([fullpathsyslinux,
- "-i",
- "%s/boot/extlinux" % self._instroot])
- if rc != 0:
- raise MountError("Unable to install syslinux bootloader to %s" \
- % loopdev)
-
- def _create_bootconfig(self):
- #If syslinux is available do the required configurations.
- if self._need_extlinux \
- and os.path.exists("%s/usr/share/syslinux/" % (self._instroot)) \
- and os.path.exists("%s/boot/extlinux/" % (self._instroot)):
- self._create_syslinux_config()
- self._install_syslinux()
-
- def _unmount_instroot(self):
- if not self.__instloop is None:
- try:
- self.__instloop.cleanup()
- except MountError, err:
- msger.warning("%s" % err)
-
- def _resparse(self, size = None):
- return self.__instloop.resparse(size)
-
- def _get_post_scripts_env(self, in_chroot):
- env = BaseImageCreator._get_post_scripts_env(self, in_chroot)
-
- # Export the file-system UUIDs and partition UUIDs (AKA PARTUUIDs)
- for p in self.__instloop.partitions:
- env.update(self._set_part_env(p['ks_pnum'], "UUID", p['uuid']))
- env.update(self._set_part_env(p['ks_pnum'], "PARTUUID", p['partuuid']))
-
- return env
-
- def _stage_final_image(self):
- """Stage the final system image in _outdir.
- write meta data
- """
- self._resparse()
-
- if self.compress_image:
- for imgfile in os.listdir(self.__imgdir):
- if imgfile.endswith('.raw') or imgfile.endswith('bin'):
- imgpath = os.path.join(self.__imgdir, imgfile)
- misc.compressing(imgpath, self.compress_image)
-
- if self.pack_to:
- dst = os.path.join(self._outdir, self.pack_to)
- msger.info("Pack all raw images to %s" % dst)
- misc.packing(dst, self.__imgdir)
- else:
- msger.debug("moving disks to stage location")
- for imgfile in os.listdir(self.__imgdir):
- src = os.path.join(self.__imgdir, imgfile)
- dst = os.path.join(self._outdir, imgfile)
- msger.debug("moving %s to %s" % (src,dst))
- shutil.move(src,dst)
- self._write_image_xml()
-
- def _write_image_xml(self):
- imgarch = "i686"
- if self.target_arch and self.target_arch.startswith("arm"):
- imgarch = "arm"
- xml = "<image>\n"
-
- name_attributes = ""
- if self.appliance_version:
- name_attributes += " version='%s'" % self.appliance_version
- if self.appliance_release:
- name_attributes += " release='%s'" % self.appliance_release
- xml += " <name%s>%s</name>\n" % (name_attributes, self.name)
- xml += " <domain>\n"
- # XXX don't hardcode - determine based on the kernel we installed for
- # grub baremetal vs xen
- xml += " <boot type='hvm'>\n"
- xml += " <guest>\n"
- xml += " <arch>%s</arch>\n" % imgarch
- xml += " </guest>\n"
- xml += " <os>\n"
- xml += " <loader dev='hd'/>\n"
- xml += " </os>\n"
-
- i = 0
- for name in self.__disks.keys():
- full_name = self._full_name(name, self.__disk_format)
- xml += " <drive disk='%s' target='hd%s'/>\n" \
- % (full_name, chr(ord('a') + i))
- i = i + 1
-
- xml += " </boot>\n"
- xml += " <devices>\n"
- xml += " <vcpu>%s</vcpu>\n" % self.vcpu
- xml += " <memory>%d</memory>\n" %(self.vmem * 1024)
- for network in self.ks.handler.network.network:
- xml += " <interface/>\n"
- xml += " <graphics/>\n"
- xml += " </devices>\n"
- xml += " </domain>\n"
- xml += " <storage>\n"
-
- if self.checksum is True:
- for name in self.__disks.keys():
- diskpath = self._full_path(self._outdir, name, \
- self.__disk_format)
- full_name = self._full_name(name, self.__disk_format)
-
- msger.debug("Generating disk signature for %s" % full_name)
-
- xml += " <disk file='%s' use='system' format='%s'>\n" \
- % (full_name, self.__disk_format)
-
- hashes = misc.calc_hashes(diskpath, ('sha1', 'sha256'))
-
- xml += " <checksum type='sha1'>%s</checksum>\n" \
- % hashes[0]
- xml += " <checksum type='sha256'>%s</checksum>\n" \
- % hashes[1]
- xml += " </disk>\n"
- else:
- for name in self.__disks.keys():
- full_name = self._full_name(name, self.__disk_format)
- xml += " <disk file='%s' use='system' format='%s'/>\n" \
- % (full_name, self.__disk_format)
-
- xml += " </storage>\n"
- xml += "</image>\n"
-
- msger.debug("writing image XML to %s/%s.xml" %(self._outdir, self.name))
- cfg = open("%s/%s.xml" % (self._outdir, self.name), "w")
- cfg.write(xml)
- cfg.close()
-
- def generate_bmap(self):
- """ Generate block map file for the image. The idea is that while disk
- images we generate may be large (e.g., 4GiB), they may actually contain
- only little real data, e.g., 512MiB. This data are files, directories,
- file-system meta-data, partition table, etc. In other words, when
- flashing the image to the target device, you do not have to copy all the
- 4GiB of data, you can copy only 512MiB of it, which is 4 times faster.
-
- This function generates the block map file for an arbitrary image that
- mic has generated. The block map file is basically an XML file which
- contains a list of blocks which have to be copied to the target device.
- The other blocks are not used and there is no need to copy them. """
-
- if self.bmap_needed is None:
- return
-
- from mic.utils import BmapCreate
- msger.info("Generating the map file(s)")
-
- for name in self.__disks.keys():
- image = self._full_path(self.__imgdir, name, self.__disk_format)
- bmap_file = self._full_path(self._outdir, name, "bmap")
-
- msger.debug("Generating block map file '%s'" % bmap_file)
-
- try:
- creator = BmapCreate.BmapCreate(image, bmap_file)
- creator.generate()
- del creator
- except BmapCreate.Error as err:
- raise CreatorError("Failed to create bmap file: %s" % str(err))
diff --git a/scripts/lib/mic/kickstart/__init__.py b/scripts/lib/mic/kickstart/__init__.py
deleted file mode 100644
index 72f3ca6849..0000000000
--- a/scripts/lib/mic/kickstart/__init__.py
+++ /dev/null
@@ -1,892 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2007 Red Hat, Inc.
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys, re
-import shutil
-import subprocess
-import string
-
-import pykickstart.sections as kssections
-import pykickstart.commands as kscommands
-import pykickstart.constants as ksconstants
-import pykickstart.errors as kserrors
-import pykickstart.parser as ksparser
-import pykickstart.version as ksversion
-from pykickstart.handlers.control import commandMap
-from pykickstart.handlers.control import dataMap
-
-from mic import msger
-from mic.utils import errors, misc, runner, fs_related as fs
-from custom_commands import desktop, micrepo, wicboot, partition, installerfw
-
-
-AUTH_URL_PTN = r"(?P<scheme>.*)://(?P<username>.*)(:?P<password>.*)?@(?P<url>.*)"
-
-
-class PrepackageSection(kssections.Section):
- sectionOpen = "%prepackages"
-
- def handleLine(self, line):
- if not self.handler:
- return
-
- (h, s, t) = line.partition('#')
- line = h.rstrip()
-
- self.handler.prepackages.add([line])
-
- def handleHeader(self, lineno, args):
- kssections.Section.handleHeader(self, lineno, args)
-
-class AttachmentSection(kssections.Section):
- sectionOpen = "%attachment"
-
- def handleLine(self, line):
- if not self.handler:
- return
-
- (h, s, t) = line.partition('#')
- line = h.rstrip()
-
- self.handler.attachment.add([line])
-
- def handleHeader(self, lineno, args):
- kssections.Section.handleHeader(self, lineno, args)
-
-def apply_wrapper(func):
- def wrapper(*kargs, **kwargs):
- try:
- func(*kargs, **kwargs)
- except (OSError, IOError, errors.KsError), err:
- cfgcls = kargs[0].__class__.__name__
- if msger.ask("Failed to apply %s, skip and continue?" % cfgcls):
- msger.warning("%s" % err)
- pass
- else:
- # just throw out the exception
- raise
- return wrapper
-
-def read_kickstart(path):
- """Parse a kickstart file and return a KickstartParser instance.
-
- This is a simple utility function which takes a path to a kickstart file,
- parses it and returns a pykickstart KickstartParser instance which can
- be then passed to an ImageCreator constructor.
-
- If an error occurs, a CreatorError exception is thrown.
- """
-
- #version = ksversion.makeVersion()
- #ks = ksparser.KickstartParser(version)
-
- using_version = ksversion.DEVEL
- commandMap[using_version]["desktop"] = desktop.Mic_Desktop
- commandMap[using_version]["repo"] = micrepo.Mic_Repo
- commandMap[using_version]["bootloader"] = wicboot.Wic_Bootloader
- commandMap[using_version]["part"] = partition.Wic_Partition
- commandMap[using_version]["partition"] = partition.Wic_Partition
- commandMap[using_version]["installerfw"] = installerfw.Mic_installerfw
- dataMap[using_version]["RepoData"] = micrepo.Mic_RepoData
- dataMap[using_version]["PartData"] = partition.Wic_PartData
- superclass = ksversion.returnClassForVersion(version=using_version)
-
- class KSHandlers(superclass):
- def __init__(self):
- superclass.__init__(self, mapping=commandMap[using_version])
- self.prepackages = ksparser.Packages()
- self.attachment = ksparser.Packages()
-
- ks = ksparser.KickstartParser(KSHandlers(), errorsAreFatal=False)
- ks.registerSection(PrepackageSection(ks.handler))
- ks.registerSection(AttachmentSection(ks.handler))
-
- try:
- ks.readKickstart(path)
- except (kserrors.KickstartParseError, kserrors.KickstartError), err:
- if msger.ask("Errors occured on kickstart file, skip and continue?"):
- msger.warning("%s" % err)
- pass
- else:
- raise errors.KsError("%s" % err)
-
- return ks
-
-class KickstartConfig(object):
- """A base class for applying kickstart configurations to a system."""
- def __init__(self, instroot):
- self.instroot = instroot
-
- def path(self, subpath):
- return self.instroot + subpath
-
- def _check_sysconfig(self):
- if not os.path.exists(self.path("/etc/sysconfig")):
- fs.makedirs(self.path("/etc/sysconfig"))
-
- def chroot(self):
- os.chroot(self.instroot)
- os.chdir("/")
-
- def call(self, args):
- if not os.path.exists("%s/%s" %(self.instroot, args[0])):
- raise errors.KsError("Can't find %s in chroot" % args[0])
- subprocess.call(args, preexec_fn = self.chroot)
-
- def apply(self):
- pass
-
-class LanguageConfig(KickstartConfig):
- """A class to apply a kickstart language configuration to a system."""
- @apply_wrapper
- def apply(self, kslang):
- self._check_sysconfig()
- if kslang.lang:
- f = open(self.path("/etc/sysconfig/i18n"), "w+")
- f.write("LANG=\"" + kslang.lang + "\"\n")
- f.close()
-
-class KeyboardConfig(KickstartConfig):
- """A class to apply a kickstart keyboard configuration to a system."""
- @apply_wrapper
- def apply(self, kskeyboard):
- #
- # FIXME:
- # should this impact the X keyboard config too?
- # or do we want to make X be able to do this mapping?
- #
- #k = rhpl.keyboard.Keyboard()
- #if kskeyboard.keyboard:
- # k.set(kskeyboard.keyboard)
- #k.write(self.instroot)
- pass
-
-class TimezoneConfig(KickstartConfig):
- """A class to apply a kickstart timezone configuration to a system."""
- @apply_wrapper
- def apply(self, kstimezone):
- self._check_sysconfig()
- tz = kstimezone.timezone or "America/New_York"
- utc = str(kstimezone.isUtc)
-
- f = open(self.path("/etc/sysconfig/clock"), "w+")
- f.write("ZONE=\"" + tz + "\"\n")
- f.write("UTC=" + utc + "\n")
- f.close()
- tz_source = "/usr/share/zoneinfo/%s" % (tz)
- tz_dest = "/etc/localtime"
- try:
- cpcmd = fs.find_binary_inchroot('cp', self.instroot)
- if cpcmd:
- self.call([cpcmd, "-f", tz_source, tz_dest])
- else:
- cpcmd = fs.find_binary_path('cp')
- subprocess.call([cpcmd, "-f",
- self.path(tz_source),
- self.path(tz_dest)])
- except (IOError, OSError), (errno, msg):
- raise errors.KsError("Timezone setting error: %s" % msg)
-
-class AuthConfig(KickstartConfig):
- """A class to apply a kickstart authconfig configuration to a system."""
- @apply_wrapper
- def apply(self, ksauthconfig):
- auth = ksauthconfig.authconfig or "--useshadow --enablemd5"
- args = ["/usr/share/authconfig/authconfig.py", "--update", "--nostart"]
- self.call(args + auth.split())
-
-class FirewallConfig(KickstartConfig):
- """A class to apply a kickstart firewall configuration to a system."""
- @apply_wrapper
- def apply(self, ksfirewall):
- #
- # FIXME: should handle the rest of the options
- #
- if not os.path.exists(self.path("/usr/sbin/lokkit")):
- return
- if ksfirewall.enabled:
- status = "--enabled"
- else:
- status = "--disabled"
-
- self.call(["/usr/sbin/lokkit",
- "-f", "--quiet", "--nostart", status])
-
-class RootPasswordConfig(KickstartConfig):
- """A class to apply a kickstart root password configuration to a system."""
- def unset(self):
- self.call(["/usr/bin/passwd", "-d", "root"])
-
- def set_encrypted(self, password):
- self.call(["/usr/sbin/usermod", "-p", password, "root"])
-
- def set_unencrypted(self, password):
- for p in ("/bin/echo", "/usr/sbin/chpasswd"):
- if not os.path.exists("%s/%s" %(self.instroot, p)):
- raise errors.KsError("Unable to set unencrypted password due "
- "to lack of %s" % p)
-
- p1 = subprocess.Popen(["/bin/echo", "root:%s" %password],
- stdout = subprocess.PIPE,
- preexec_fn = self.chroot)
- p2 = subprocess.Popen(["/usr/sbin/chpasswd", "-m"],
- stdin = p1.stdout,
- stdout = subprocess.PIPE,
- preexec_fn = self.chroot)
- p2.communicate()
-
- @apply_wrapper
- def apply(self, ksrootpw):
- if ksrootpw.isCrypted:
- self.set_encrypted(ksrootpw.password)
- elif ksrootpw.password != "":
- self.set_unencrypted(ksrootpw.password)
- else:
- self.unset()
-
-class UserConfig(KickstartConfig):
- def set_empty_passwd(self, user):
- self.call(["/usr/bin/passwd", "-d", user])
-
- def set_encrypted_passwd(self, user, password):
- self.call(["/usr/sbin/usermod", "-p", "%s" % password, user])
-
- def set_unencrypted_passwd(self, user, password):
- for p in ("/bin/echo", "/usr/sbin/chpasswd"):
- if not os.path.exists("%s/%s" %(self.instroot, p)):
- raise errors.KsError("Unable to set unencrypted password due "
- "to lack of %s" % p)
-
- p1 = subprocess.Popen(["/bin/echo", "%s:%s" %(user, password)],
- stdout = subprocess.PIPE,
- preexec_fn = self.chroot)
- p2 = subprocess.Popen(["/usr/sbin/chpasswd", "-m"],
- stdin = p1.stdout,
- stdout = subprocess.PIPE,
- preexec_fn = self.chroot)
- p2.communicate()
-
- def addUser(self, userconfig):
- args = [ "/usr/sbin/useradd" ]
- if userconfig.groups:
- args += [ "--groups", string.join(userconfig.groups, ",") ]
- if userconfig.name:
- args += [ "-m"]
- args += [ "-d", "/home/%s" % userconfig.name ]
- args.append(userconfig.name)
- try:
- dev_null = os.open("/dev/null", os.O_WRONLY)
- msger.debug('adding user with %s' % args)
- subprocess.call(args,
- stdout = dev_null,
- stderr = dev_null,
- preexec_fn = self.chroot)
- os.close(dev_null)
- except:
- msger.warning('Cannot add user using "useradd"')
-
- if userconfig.password not in (None, ""):
- if userconfig.isCrypted:
- self.set_encrypted_passwd(userconfig.name,
- userconfig.password)
- else:
- self.set_unencrypted_passwd(userconfig.name,
- userconfig.password)
- else:
- self.set_empty_passwd(userconfig.name)
- else:
- raise errors.KsError("Invalid kickstart command: %s" \
- % userconfig.__str__())
-
- @apply_wrapper
- def apply(self, user):
- for userconfig in user.userList:
- self.addUser(userconfig)
-
-class ServicesConfig(KickstartConfig):
- """A class to apply a kickstart services configuration to a system."""
- @apply_wrapper
- def apply(self, ksservices):
- if not os.path.exists(self.path("/sbin/chkconfig")):
- return
- for s in ksservices.enabled:
- self.call(["/sbin/chkconfig", s, "on"])
- for s in ksservices.disabled:
- self.call(["/sbin/chkconfig", s, "off"])
-
-class XConfig(KickstartConfig):
- """A class to apply a kickstart X configuration to a system."""
- @apply_wrapper
- def apply(self, ksxconfig):
- if ksxconfig.startX and os.path.exists(self.path("/etc/inittab")):
- f = open(self.path("/etc/inittab"), "rw+")
- buf = f.read()
- buf = buf.replace("id:3:initdefault", "id:5:initdefault")
- f.seek(0)
- f.write(buf)
- f.close()
- if ksxconfig.defaultdesktop:
- self._check_sysconfig()
- f = open(self.path("/etc/sysconfig/desktop"), "w")
- f.write("DESKTOP="+ksxconfig.defaultdesktop+"\n")
- f.close()
-
-class DesktopConfig(KickstartConfig):
- """A class to apply a kickstart desktop configuration to a system."""
- @apply_wrapper
- def apply(self, ksdesktop):
- if ksdesktop.defaultdesktop:
- self._check_sysconfig()
- f = open(self.path("/etc/sysconfig/desktop"), "w")
- f.write("DESKTOP="+ksdesktop.defaultdesktop+"\n")
- f.close()
- if os.path.exists(self.path("/etc/gdm/custom.conf")):
- f = open(self.path("/etc/skel/.dmrc"), "w")
- f.write("[Desktop]\n")
- f.write("Session="+ksdesktop.defaultdesktop.lower()+"\n")
- f.close()
- if ksdesktop.session:
- if os.path.exists(self.path("/etc/sysconfig/uxlaunch")):
- f = open(self.path("/etc/sysconfig/uxlaunch"), "a+")
- f.write("session="+ksdesktop.session.lower()+"\n")
- f.close()
- if ksdesktop.autologinuser:
- self._check_sysconfig()
- f = open(self.path("/etc/sysconfig/desktop"), "a+")
- f.write("AUTOLOGIN_USER=" + ksdesktop.autologinuser + "\n")
- f.close()
- if os.path.exists(self.path("/etc/gdm/custom.conf")):
- f = open(self.path("/etc/gdm/custom.conf"), "w")
- f.write("[daemon]\n")
- f.write("AutomaticLoginEnable=true\n")
- f.write("AutomaticLogin=" + ksdesktop.autologinuser + "\n")
- f.close()
-
-class MoblinRepoConfig(KickstartConfig):
- """A class to apply a kickstart desktop configuration to a system."""
- def __create_repo_section(self, repo, type, fd):
- baseurl = None
- mirrorlist = None
- reposuffix = {"base":"", "debuginfo":"-debuginfo", "source":"-source"}
- reponame = repo.name + reposuffix[type]
- if type == "base":
- if repo.baseurl:
- baseurl = repo.baseurl
- if repo.mirrorlist:
- mirrorlist = repo.mirrorlist
-
- elif type == "debuginfo":
- if repo.baseurl:
- if repo.baseurl.endswith("/"):
- baseurl = os.path.dirname(os.path.dirname(repo.baseurl))
- else:
- baseurl = os.path.dirname(repo.baseurl)
- baseurl += "/debug"
-
- if repo.mirrorlist:
- variant = repo.mirrorlist[repo.mirrorlist.find("$"):]
- mirrorlist = repo.mirrorlist[0:repo.mirrorlist.find("$")]
- mirrorlist += "debug" + "-" + variant
-
- elif type == "source":
- if repo.baseurl:
- if repo.baseurl.endswith("/"):
- baseurl = os.path.dirname(
- os.path.dirname(
- os.path.dirname(repo.baseurl)))
- else:
- baseurl = os.path.dirname(os.path.dirname(repo.baseurl))
- baseurl += "/source"
-
- if repo.mirrorlist:
- variant = repo.mirrorlist[repo.mirrorlist.find("$"):]
- mirrorlist = repo.mirrorlist[0:repo.mirrorlist.find("$")]
- mirrorlist += "source" + "-" + variant
-
- fd.write("[" + reponame + "]\n")
- fd.write("name=" + reponame + "\n")
- fd.write("failovermethod=priority\n")
- if baseurl:
- auth_url = re.compile(AUTH_URL_PTN)
- m = auth_url.match(baseurl)
- if m:
- baseurl = "%s://%s" % (m.group('scheme'), m.group('url'))
- fd.write("baseurl=" + baseurl + "\n")
- if mirrorlist:
- fd.write("mirrorlist=" + mirrorlist + "\n")
- """ Skip saving proxy settings """
- #if repo.proxy:
- # fd.write("proxy=" + repo.proxy + "\n")
- #if repo.proxy_username:
- # fd.write("proxy_username=" + repo.proxy_username + "\n")
- #if repo.proxy_password:
- # fd.write("proxy_password=" + repo.proxy_password + "\n")
- if repo.gpgkey:
- fd.write("gpgkey=" + repo.gpgkey + "\n")
- fd.write("gpgcheck=1\n")
- else:
- fd.write("gpgcheck=0\n")
- if type == "source" or type == "debuginfo" or repo.disable:
- fd.write("enabled=0\n")
- else:
- fd.write("enabled=1\n")
- fd.write("\n")
-
- def __create_repo_file(self, repo, repodir):
- fs.makedirs(self.path(repodir))
- f = open(self.path(repodir + "/" + repo.name + ".repo"), "w")
- self.__create_repo_section(repo, "base", f)
- if repo.debuginfo:
- self.__create_repo_section(repo, "debuginfo", f)
- if repo.source:
- self.__create_repo_section(repo, "source", f)
- f.close()
-
- @apply_wrapper
- def apply(self, ksrepo, repodata, repourl):
- for repo in ksrepo.repoList:
- if repo.name in repourl:
- repo.baseurl = repourl[repo.name]
- if repo.save:
- #self.__create_repo_file(repo, "/etc/yum.repos.d")
- self.__create_repo_file(repo, "/etc/zypp/repos.d")
- """ Import repo gpg keys """
- if repodata:
- for repo in repodata:
- if repo['repokey']:
- runner.quiet(['rpm',
- "--root=%s" % self.instroot,
- "--import",
- repo['repokey']])
-
-class RPMMacroConfig(KickstartConfig):
- """A class to apply the specified rpm macros to the filesystem"""
- @apply_wrapper
- def apply(self, ks):
- if not ks:
- return
- if not os.path.exists(self.path("/etc/rpm")):
- os.mkdir(self.path("/etc/rpm"))
- f = open(self.path("/etc/rpm/macros.imgcreate"), "w+")
- if exclude_docs(ks):
- f.write("%_excludedocs 1\n")
- f.write("%__file_context_path %{nil}\n")
- if inst_langs(ks) != None:
- f.write("%_install_langs ")
- f.write(inst_langs(ks))
- f.write("\n")
- f.close()
-
-class NetworkConfig(KickstartConfig):
- """A class to apply a kickstart network configuration to a system."""
- def write_ifcfg(self, network):
- p = self.path("/etc/sysconfig/network-scripts/ifcfg-" + network.device)
-
- f = file(p, "w+")
- os.chmod(p, 0644)
-
- f.write("DEVICE=%s\n" % network.device)
- f.write("BOOTPROTO=%s\n" % network.bootProto)
-
- if network.bootProto.lower() == "static":
- if network.ip:
- f.write("IPADDR=%s\n" % network.ip)
- if network.netmask:
- f.write("NETMASK=%s\n" % network.netmask)
-
- if network.onboot:
- f.write("ONBOOT=on\n")
- else:
- f.write("ONBOOT=off\n")
-
- if network.essid:
- f.write("ESSID=%s\n" % network.essid)
-
- if network.ethtool:
- if network.ethtool.find("autoneg") == -1:
- network.ethtool = "autoneg off " + network.ethtool
- f.write("ETHTOOL_OPTS=%s\n" % network.ethtool)
-
- if network.bootProto.lower() == "dhcp":
- if network.hostname:
- f.write("DHCP_HOSTNAME=%s\n" % network.hostname)
- if network.dhcpclass:
- f.write("DHCP_CLASSID=%s\n" % network.dhcpclass)
-
- if network.mtu:
- f.write("MTU=%s\n" % network.mtu)
-
- f.close()
-
- def write_wepkey(self, network):
- if not network.wepkey:
- return
-
- p = self.path("/etc/sysconfig/network-scripts/keys-" + network.device)
- f = file(p, "w+")
- os.chmod(p, 0600)
- f.write("KEY=%s\n" % network.wepkey)
- f.close()
-
- def write_sysconfig(self, useipv6, hostname, gateway):
- path = self.path("/etc/sysconfig/network")
- f = file(path, "w+")
- os.chmod(path, 0644)
-
- f.write("NETWORKING=yes\n")
-
- if useipv6:
- f.write("NETWORKING_IPV6=yes\n")
- else:
- f.write("NETWORKING_IPV6=no\n")
-
- if hostname:
- f.write("HOSTNAME=%s\n" % hostname)
- else:
- f.write("HOSTNAME=localhost.localdomain\n")
-
- if gateway:
- f.write("GATEWAY=%s\n" % gateway)
-
- f.close()
-
- def write_hosts(self, hostname):
- localline = ""
- if hostname and hostname != "localhost.localdomain":
- localline += hostname + " "
- l = hostname.split(".")
- if len(l) > 1:
- localline += l[0] + " "
- localline += "localhost.localdomain localhost"
-
- path = self.path("/etc/hosts")
- f = file(path, "w+")
- os.chmod(path, 0644)
- f.write("127.0.0.1\t\t%s\n" % localline)
- f.write("::1\t\tlocalhost6.localdomain6 localhost6\n")
- f.close()
-
- def write_resolv(self, nodns, nameservers):
- if nodns or not nameservers:
- return
-
- path = self.path("/etc/resolv.conf")
- f = file(path, "w+")
- os.chmod(path, 0644)
-
- for ns in (nameservers):
- if ns:
- f.write("nameserver %s\n" % ns)
-
- f.close()
-
- @apply_wrapper
- def apply(self, ksnet):
- fs.makedirs(self.path("/etc/sysconfig/network-scripts"))
-
- useipv6 = False
- nodns = False
- hostname = None
- gateway = None
- nameservers = None
-
- for network in ksnet.network:
- if not network.device:
- raise errors.KsError("No --device specified with "
- "network kickstart command")
-
- if (network.onboot and network.bootProto.lower() != "dhcp" and
- not (network.ip and network.netmask)):
- raise errors.KsError("No IP address and/or netmask "
- "specified with static "
- "configuration for '%s'" %
- network.device)
-
- self.write_ifcfg(network)
- self.write_wepkey(network)
-
- if network.ipv6:
- useipv6 = True
- if network.nodns:
- nodns = True
-
- if network.hostname:
- hostname = network.hostname
- if network.gateway:
- gateway = network.gateway
-
- if network.nameserver:
- nameservers = network.nameserver.split(",")
-
- self.write_sysconfig(useipv6, hostname, gateway)
- self.write_hosts(hostname)
- self.write_resolv(nodns, nameservers)
-
-def use_installerfw(ks, feature):
- """ Check if the installer framework has to be used for a feature
- "feature". """
-
- features = ks.handler.installerfw.features
- if features:
- if feature in features or "all" in features:
- return True
- return False
-
-def get_image_size(ks, default = None):
- __size = 0
- for p in ks.handler.partition.partitions:
- if p.mountpoint == "/" and p.size:
- __size = p.size
- if __size > 0:
- return int(__size) * 1024L * 1024L
- else:
- return default
-
-def get_image_fstype(ks, default = None):
- for p in ks.handler.partition.partitions:
- if p.mountpoint == "/" and p.fstype:
- return p.fstype
- return default
-
-def get_image_fsopts(ks, default = None):
- for p in ks.handler.partition.partitions:
- if p.mountpoint == "/" and p.fsopts:
- return p.fsopts
- return default
-
-def get_modules(ks):
- devices = []
- if isinstance(ks.handler.device, kscommands.device.FC3_Device):
- devices.append(ks.handler.device)
- else:
- devices.extend(ks.handler.device.deviceList)
-
- modules = []
- for device in devices:
- if not device.moduleName:
- continue
- modules.extend(device.moduleName.split(":"))
-
- return modules
-
-def get_timeout(ks, default = None):
- if not hasattr(ks.handler.bootloader, "timeout"):
- return default
- if ks.handler.bootloader.timeout is None:
- return default
- return int(ks.handler.bootloader.timeout)
-
-def get_kernel_args(ks, default = "ro rd.live.image"):
- if not hasattr(ks.handler.bootloader, "appendLine"):
- return default
- if ks.handler.bootloader.appendLine is None:
- return default
- return "%s %s" %(default, ks.handler.bootloader.appendLine)
-
-def get_menu_args(ks, default = ""):
- if not hasattr(ks.handler.bootloader, "menus"):
- return default
- if ks.handler.bootloader.menus in (None, ""):
- return default
- return "%s" % ks.handler.bootloader.menus
-
-def get_default_kernel(ks, default = None):
- if not hasattr(ks.handler.bootloader, "default"):
- return default
- if not ks.handler.bootloader.default:
- return default
- return ks.handler.bootloader.default
-
-def get_repos(ks, repo_urls=None):
- repos = {}
- for repo in ks.handler.repo.repoList:
- inc = []
- if hasattr(repo, "includepkgs"):
- inc.extend(repo.includepkgs)
-
- exc = []
- if hasattr(repo, "excludepkgs"):
- exc.extend(repo.excludepkgs)
-
- baseurl = repo.baseurl
- mirrorlist = repo.mirrorlist
-
- if repo_urls and repo.name in repo_urls:
- baseurl = repo_urls[repo.name]
- mirrorlist = None
-
- if repos.has_key(repo.name):
- msger.warning("Overriding already specified repo %s" %(repo.name,))
-
- proxy = None
- if hasattr(repo, "proxy"):
- proxy = repo.proxy
- proxy_username = None
- if hasattr(repo, "proxy_username"):
- proxy_username = repo.proxy_username
- proxy_password = None
- if hasattr(repo, "proxy_password"):
- proxy_password = repo.proxy_password
- if hasattr(repo, "debuginfo"):
- debuginfo = repo.debuginfo
- if hasattr(repo, "source"):
- source = repo.source
- if hasattr(repo, "gpgkey"):
- gpgkey = repo.gpgkey
- if hasattr(repo, "disable"):
- disable = repo.disable
- ssl_verify = True
- if hasattr(repo, "ssl_verify"):
- ssl_verify = repo.ssl_verify == "yes"
- nocache = False
- if hasattr(repo, "nocache"):
- nocache = repo.nocache
- cost = None
- if hasattr(repo, "cost"):
- cost = repo.cost
- priority = None
- if hasattr(repo, "priority"):
- priority = repo.priority
-
- repos[repo.name] = (repo.name, baseurl, mirrorlist, inc, exc,
- proxy, proxy_username, proxy_password, debuginfo,
- source, gpgkey, disable, ssl_verify, nocache,
- cost, priority)
-
- return repos.values()
-
-def convert_method_to_repo(ks):
- try:
- ks.handler.repo.methodToRepo()
- except (AttributeError, kserrors.KickstartError):
- pass
-
-def get_attachment(ks, required=()):
- return ks.handler.attachment.packageList + list(required)
-
-def get_pre_packages(ks, required=()):
- return ks.handler.prepackages.packageList + list(required)
-
-def get_packages(ks, required=()):
- return ks.handler.packages.packageList + list(required)
-
-def get_groups(ks, required=()):
- return ks.handler.packages.groupList + list(required)
-
-def get_excluded(ks, required=()):
- return ks.handler.packages.excludedList + list(required)
-
-def get_partitions(ks):
- return ks.handler.partition.partitions
-
-def ignore_missing(ks):
- return ks.handler.packages.handleMissing == ksconstants.KS_MISSING_IGNORE
-
-def exclude_docs(ks):
- return ks.handler.packages.excludeDocs
-
-def inst_langs(ks):
- if hasattr(ks.handler.packages, "instLange"):
- return ks.handler.packages.instLange
- elif hasattr(ks.handler.packages, "instLangs"):
- return ks.handler.packages.instLangs
- return ""
-
-def get_post_scripts(ks):
- scripts = []
- for s in ks.handler.scripts:
- if s.type != ksparser.KS_SCRIPT_POST:
- continue
- scripts.append(s)
- return scripts
-
-def add_repo(ks, repostr):
- args = repostr.split()
- repoobj = ks.handler.repo.parse(args[1:])
- if repoobj and repoobj not in ks.handler.repo.repoList:
- ks.handler.repo.repoList.append(repoobj)
-
-def remove_all_repos(ks):
- while len(ks.handler.repo.repoList) != 0:
- del ks.handler.repo.repoList[0]
-
-def remove_duplicate_repos(ks):
- i = 0
- j = i + 1
- while True:
- if len(ks.handler.repo.repoList) < 2:
- break
- if i >= len(ks.handler.repo.repoList) - 1:
- break
- name = ks.handler.repo.repoList[i].name
- baseurl = ks.handler.repo.repoList[i].baseurl
- if j < len(ks.handler.repo.repoList):
- if (ks.handler.repo.repoList[j].name == name or \
- ks.handler.repo.repoList[j].baseurl == baseurl):
- del ks.handler.repo.repoList[j]
- else:
- j += 1
- if j >= len(ks.handler.repo.repoList):
- i += 1
- j = i + 1
- else:
- i += 1
- j = i + 1
-
-def resolve_groups(creatoropts, repometadata):
- iszypp = False
- if 'zypp' == creatoropts['pkgmgr']:
- iszypp = True
- ks = creatoropts['ks']
-
- for repo in repometadata:
- """ Mustn't replace group with package list if repo is ready for the
- corresponding package manager.
- """
-
- if iszypp and repo["patterns"]:
- continue
- if not iszypp and repo["comps"]:
- continue
-
- # But we also must handle such cases, use zypp but repo only has comps,
- # use yum but repo only has patterns, use zypp but use_comps is true,
- # use yum but use_comps is false.
- groupfile = None
- if iszypp and repo["comps"]:
- groupfile = repo["comps"]
- get_pkglist_handler = misc.get_pkglist_in_comps
- if not iszypp and repo["patterns"]:
- groupfile = repo["patterns"]
- get_pkglist_handler = misc.get_pkglist_in_patterns
-
- if groupfile:
- i = 0
- while True:
- if i >= len(ks.handler.packages.groupList):
- break
- pkglist = get_pkglist_handler(
- ks.handler.packages.groupList[i].name,
- groupfile)
- if pkglist:
- del ks.handler.packages.groupList[i]
- for pkg in pkglist:
- if pkg not in ks.handler.packages.packageList:
- ks.handler.packages.packageList.append(pkg)
- else:
- i = i + 1
diff --git a/scripts/lib/mic/kickstart/custom_commands/desktop.py b/scripts/lib/mic/kickstart/custom_commands/desktop.py
deleted file mode 100644
index c8bd647ae3..0000000000
--- a/scripts/lib/mic/kickstart/custom_commands/desktop.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2008, 2009, 2010 Intel, Inc.
-#
-# Yi Yang <yi.y.yang@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-class Mic_Desktop(KickstartCommand):
- def __init__(self, writePriority=0,
- defaultdesktop=None,
- defaultdm=None,
- autologinuser=None,
- session=None):
-
- KickstartCommand.__init__(self, writePriority)
-
- self.__new_version = False
- self.op = self._getParser()
-
- self.defaultdesktop = defaultdesktop
- self.autologinuser = autologinuser
- self.defaultdm = defaultdm
- self.session = session
-
- def __str__(self):
- retval = ""
-
- if self.defaultdesktop != None:
- retval += " --defaultdesktop=%s" % self.defaultdesktop
- if self.session != None:
- retval += " --session=\"%s\"" % self.session
- if self.autologinuser != None:
- retval += " --autologinuser=%s" % self.autologinuser
- if self.defaultdm != None:
- retval += " --defaultdm=%s" % self.defaultdm
-
- if retval != "":
- retval = "# Default Desktop Settings\ndesktop %s\n" % retval
-
- return retval
-
- def _getParser(self):
- try:
- op = KSOptionParser(lineno=self.lineno)
- except TypeError:
- # the latest version has not lineno argument
- op = KSOptionParser()
- self.__new_version = True
-
- op.add_option("--defaultdesktop", dest="defaultdesktop",
- action="store",
- type="string",
- nargs=1)
- op.add_option("--autologinuser", dest="autologinuser",
- action="store",
- type="string",
- nargs=1)
- op.add_option("--defaultdm", dest="defaultdm",
- action="store",
- type="string",
- nargs=1)
- op.add_option("--session", dest="session",
- action="store",
- type="string",
- nargs=1)
- return op
-
- def parse(self, args):
- if self.__new_version:
- (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
- else:
- (opts, extra) = self.op.parse_args(args=args)
-
- if extra:
- m = _("Unexpected arguments to %(command)s command: %(options)s") \
- % {"command": "desktop", "options": extra}
- raise KickstartValueError, formatErrorMsg(self.lineno, msg=m)
-
- self._setToSelf(self.op, opts)
diff --git a/scripts/lib/mic/kickstart/custom_commands/installerfw.py b/scripts/lib/mic/kickstart/custom_commands/installerfw.py
deleted file mode 100644
index 2466f1dc07..0000000000
--- a/scripts/lib/mic/kickstart/custom_commands/installerfw.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2013 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from pykickstart.base import *
-from pykickstart.options import *
-
-class Mic_installerfw(KickstartCommand):
- """ This class implements the "installerfw" KS option. The argument
- of the option is a comman-separated list of MIC features which have to be
- disabled and instead, will be done in the installer. For example,
- "installerfw=extlinux" disables all the MIC code which installs extlinux to
- the target images, and instead, the extlinux or whatever boot-loader will
- be installed by the installer instead.
-
- The installer is a tool which is external to MIC, it comes from the
- installation repositories and can be executed by MIC in order to perform
- various configuration actions. The main point here is to make sure MIC has
- no hard-wired knoledge about the target OS configuration. """
-
- removedKeywords = KickstartCommand.removedKeywords
- removedAttrs = KickstartCommand.removedAttrs
-
- def __init__(self, *args, **kwargs):
- KickstartCommand.__init__(self, *args, **kwargs)
- self.op = self._getParser()
- self.features = kwargs.get("installerfw", None)
-
- def __str__(self):
- retval = KickstartCommand.__str__(self)
-
- if self.features:
- retval += "# Enable installer framework features\ninstallerfw\n"
-
- return retval
-
- def _getParser(self):
- op = KSOptionParser()
- return op
-
- def parse(self, args):
- (_, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
- if len(extra) != 1:
- msg = "Kickstart command \"installerfw\" requires one " \
- "argumet - a list of legacy features to disable"
- raise KickstartValueError, formatErrorMsg(self.lineno, msg = msg)
-
- self.features = extra[0].split(",")
- return self
diff --git a/scripts/lib/mic/kickstart/custom_commands/micrepo.py b/scripts/lib/mic/kickstart/custom_commands/micrepo.py
deleted file mode 100644
index b31576e400..0000000000
--- a/scripts/lib/mic/kickstart/custom_commands/micrepo.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2008, 2009, 2010 Intel, Inc.
-#
-# Yi Yang <yi.y.yang@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-from pykickstart.commands.repo import *
-
-class Mic_RepoData(F8_RepoData):
-
- def __init__(self, baseurl="", mirrorlist=None, name="", priority=None,
- includepkgs=(), excludepkgs=(), save=False, proxy=None,
- proxy_username=None, proxy_password=None, debuginfo=False,
- source=False, gpgkey=None, disable=False, ssl_verify="yes",
- nocache=False):
- kw = {}
- # F8_RepoData keywords
- if includepkgs:
- kw['includepkgs'] = includepkgs
- if excludepkgs:
- kw['excludepkgs'] = excludepkgs
-
- #FC6_RepoData keywords
- if baseurl:
- kw['baseurl'] = baseurl
- if mirrorlist:
- kw['mirrorlist'] = mirrorlist
- if name:
- kw['name'] = name
-
- F8_RepoData.__init__(self, **kw)
- self.save = save
- self.proxy = proxy
- self.proxy_username = proxy_username
- self.proxy_password = proxy_password
- self.debuginfo = debuginfo
- self.disable = disable
- self.source = source
- self.gpgkey = gpgkey
- self.ssl_verify = ssl_verify.lower()
- self.priority = priority
- self.nocache = nocache
-
- def _getArgsAsStr(self):
- retval = F8_RepoData._getArgsAsStr(self)
-
- if self.save:
- retval += " --save"
- if self.proxy:
- retval += " --proxy=%s" % self.proxy
- if self.proxy_username:
- retval += " --proxyuser=%s" % self.proxy_username
- if self.proxy_password:
- retval += " --proxypasswd=%s" % self.proxy_password
- if self.debuginfo:
- retval += " --debuginfo"
- if self.source:
- retval += " --source"
- if self.gpgkey:
- retval += " --gpgkey=%s" % self.gpgkey
- if self.disable:
- retval += " --disable"
- if self.ssl_verify:
- retval += " --ssl_verify=%s" % self.ssl_verify
- if self.priority:
- retval += " --priority=%s" % self.priority
- if self.nocache:
- retval += " --nocache"
-
- return retval
-
-class Mic_Repo(F8_Repo):
- def __init__(self, writePriority=0, repoList=None):
- F8_Repo.__init__(self, writePriority, repoList)
-
- def __str__(self):
- retval = ""
- for repo in self.repoList:
- retval += repo.__str__()
-
- return retval
-
- def _getParser(self):
- def list_cb (option, opt_str, value, parser):
- for d in value.split(','):
- parser.values.ensure_value(option.dest, []).append(d)
-
- op = F8_Repo._getParser(self)
- op.add_option("--save", action="store_true", dest="save",
- default=False)
- op.add_option("--proxy", type="string", action="store", dest="proxy",
- default=None, nargs=1)
- op.add_option("--proxyuser", type="string", action="store",
- dest="proxy_username", default=None, nargs=1)
- op.add_option("--proxypasswd", type="string", action="store",
- dest="proxy_password", default=None, nargs=1)
- op.add_option("--debuginfo", action="store_true", dest="debuginfo",
- default=False)
- op.add_option("--source", action="store_true", dest="source",
- default=False)
- op.add_option("--disable", action="store_true", dest="disable",
- default=False)
- op.add_option("--gpgkey", type="string", action="store", dest="gpgkey",
- default=None, nargs=1)
- op.add_option("--ssl_verify", type="string", action="store",
- dest="ssl_verify", default="yes")
- op.add_option("--priority", type="int", action="store", dest="priority",
- default=None)
- op.add_option("--nocache", action="store_true", dest="nocache",
- default=False)
- return op
diff --git a/scripts/lib/mic/plugins/backend/yumpkgmgr.py b/scripts/lib/mic/plugins/backend/yumpkgmgr.py
deleted file mode 100644
index 955f813109..0000000000
--- a/scripts/lib/mic/plugins/backend/yumpkgmgr.py
+++ /dev/null
@@ -1,490 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2007 Red Hat Inc.
-# Copyright (c) 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys
-import re
-import tempfile
-import glob
-from string import Template
-
-import rpmUtils
-import yum
-
-from mic import msger
-from mic.kickstart import ksparser
-from mic.utils import misc, rpmmisc
-from mic.utils.grabber import TextProgress
-from mic.utils.proxy import get_proxy_for
-from mic.utils.errors import CreatorError
-from mic.imager.baseimager import BaseImageCreator
-
-YUMCONF_TEMP = """[main]
-installroot=$installroot
-cachedir=/var/cache/yum
-persistdir=/var/lib/yum
-plugins=0
-reposdir=
-failovermethod=priority
-http_caching=packages
-sslverify=1
-"""
-
-class MyYumRepository(yum.yumRepo.YumRepository):
- def __del__(self):
- pass
-
- def dirSetup(self):
- super(MyYumRepository, self).dirSetup()
- # relocate package dir
- pkgdir = os.path.join(self.basecachedir, 'packages', self.id)
- self.setAttribute('_dir_setup_pkgdir', pkgdir)
- self._dirSetupMkdir_p(self.pkgdir)
-
- def _getFile(self, url=None,
- relative=None,
- local=None,
- start=None,
- end=None,
- copy_local=None,
- checkfunc=None,
- text=None,
- reget='simple',
- cache=True,
- size=None):
-
- m2c_connection = None
- if not self.sslverify:
- try:
- import M2Crypto
- m2c_connection = M2Crypto.SSL.Connection.clientPostConnectionCheck
- M2Crypto.SSL.Connection.clientPostConnectionCheck = None
- except ImportError, err:
- raise CreatorError("%s, please try to install python-m2crypto" % str(err))
-
- proxy = None
- if url:
- proxy = get_proxy_for(url)
- else:
- proxy = get_proxy_for(self.urls[0])
-
- if proxy:
- self.proxy = str(proxy)
-
- size = int(size) if size else None
- rvalue = super(MyYumRepository, self)._getFile(url,
- relative,
- local,
- start,
- end,
- copy_local,
- checkfunc,
- text,
- reget,
- cache,
- size)
-
- if m2c_connection and \
- not M2Crypto.SSL.Connection.clientPostConnectionCheck:
- M2Crypto.SSL.Connection.clientPostConnectionCheck = m2c_connection
-
- return rvalue
-
-from mic.pluginbase import BackendPlugin
-class Yum(BackendPlugin, yum.YumBase):
- name = 'yum'
-
- def __init__(self, target_arch, instroot, cachedir):
- yum.YumBase.__init__(self)
-
- self.cachedir = cachedir
- self.instroot = instroot
- self.target_arch = target_arch
-
- if self.target_arch:
- if not rpmUtils.arch.arches.has_key(self.target_arch):
- rpmUtils.arch.arches["armv7hl"] = "noarch"
- rpmUtils.arch.arches["armv7tnhl"] = "armv7nhl"
- rpmUtils.arch.arches["armv7tnhl"] = "armv7thl"
- rpmUtils.arch.arches["armv7thl"] = "armv7hl"
- rpmUtils.arch.arches["armv7nhl"] = "armv7hl"
- self.arch.setup_arch(self.target_arch)
-
- self.__pkgs_license = {}
- self.__pkgs_content = {}
- self.__pkgs_vcsinfo = {}
-
- self.install_debuginfo = False
-
- def doFileLogSetup(self, uid, logfile):
- # don't do the file log for the livecd as it can lead to open fds
- # being left and an inability to clean up after ourself
- pass
-
- def close(self):
- try:
- os.unlink(self.confpath)
- os.unlink(self.conf.installroot + "/yum.conf")
- except:
- pass
-
- if self.ts:
- self.ts.close()
- self._delRepos()
- self._delSacks()
- yum.YumBase.close(self)
- self.closeRpmDB()
-
- if not os.path.exists("/etc/fedora-release") and \
- not os.path.exists("/etc/meego-release"):
- for i in range(3, os.sysconf("SC_OPEN_MAX")):
- try:
- os.close(i)
- except:
- pass
-
- def __del__(self):
- pass
-
- def _writeConf(self, confpath, installroot):
- conf = Template(YUMCONF_TEMP).safe_substitute(installroot=installroot)
-
- f = file(confpath, "w+")
- f.write(conf)
- f.close()
-
- os.chmod(confpath, 0644)
-
- def _cleanupRpmdbLocks(self, installroot):
- # cleans up temporary files left by bdb so that differing
- # versions of rpm don't cause problems
- for f in glob.glob(installroot + "/var/lib/rpm/__db*"):
- os.unlink(f)
-
- def setup(self):
- # create yum.conf
- (fn, self.confpath) = tempfile.mkstemp(dir=self.cachedir,
- prefix='yum.conf-')
- os.close(fn)
- self._writeConf(self.confpath, self.instroot)
- self._cleanupRpmdbLocks(self.instroot)
- # do setup
- self.doConfigSetup(fn = self.confpath, root = self.instroot)
- self.conf.cache = 0
- self.doTsSetup()
- self.doRpmDBSetup()
- self.doRepoSetup()
- self.doSackSetup()
-
- def preInstall(self, pkg):
- # FIXME: handle pre-install package
- return None
-
- def selectPackage(self, pkg):
- """Select a given package.
- Can be specified with name.arch or name*
- """
-
- try:
- self.install(pattern = pkg)
- return None
- except yum.Errors.InstallError:
- return "No package(s) available to install"
- except yum.Errors.RepoError, e:
- raise CreatorError("Unable to download from repo : %s" % (e,))
- except yum.Errors.YumBaseError, e:
- raise CreatorError("Unable to install: %s" % (e,))
-
- def deselectPackage(self, pkg):
- """Deselect package. Can be specified as name.arch or name*
- """
-
- sp = pkg.rsplit(".", 2)
- txmbrs = []
- if len(sp) == 2:
- txmbrs = self.tsInfo.matchNaevr(name=sp[0], arch=sp[1])
-
- if len(txmbrs) == 0:
- exact, match, unmatch = yum.packages.parsePackages(
- self.pkgSack.returnPackages(),
- [pkg],
- casematch=1)
- for p in exact + match:
- txmbrs.append(p)
-
- if len(txmbrs) > 0:
- for x in txmbrs:
- self.tsInfo.remove(x.pkgtup)
- # we also need to remove from the conditionals
- # dict so that things don't get pulled back in as a result
- # of them. yes, this is ugly. conditionals should die.
- for req, pkgs in self.tsInfo.conditionals.iteritems():
- if x in pkgs:
- pkgs.remove(x)
- self.tsInfo.conditionals[req] = pkgs
- else:
- msger.warning("No such package %s to remove" %(pkg,))
-
- def selectGroup(self, grp, include = ksparser.GROUP_DEFAULT):
- try:
- yum.YumBase.selectGroup(self, grp)
- if include == ksparser.GROUP_REQUIRED:
- for p in grp.default_packages.keys():
- self.deselectPackage(p)
-
- elif include == ksparser.GROUP_ALL:
- for p in grp.optional_packages.keys():
- self.selectPackage(p)
-
- return None
- except (yum.Errors.InstallError, yum.Errors.GroupsError), e:
- return e
- except yum.Errors.RepoError, e:
- raise CreatorError("Unable to download from repo : %s" % (e,))
- except yum.Errors.YumBaseError, e:
- raise CreatorError("Unable to install: %s" % (e,))
-
- def addRepository(self, name, url = None, mirrorlist = None, proxy = None,
- proxy_username = None, proxy_password = None,
- inc = None, exc = None, ssl_verify=True, nocache=False,
- cost = None, priority=None):
- # TODO: Handle priority attribute for repos
- def _varSubstitute(option):
- # takes a variable and substitutes like yum configs do
- option = option.replace("$basearch", rpmUtils.arch.getBaseArch())
- option = option.replace("$arch", rpmUtils.arch.getCanonArch())
- return option
-
- repo = MyYumRepository(name)
-
- # Set proxy
- repo.proxy = proxy
- repo.proxy_username = proxy_username
- repo.proxy_password = proxy_password
-
- if url:
- repo.baseurl.append(_varSubstitute(url))
-
- # check LICENSE files
- if not rpmmisc.checkRepositoryEULA(name, repo):
- msger.warning('skip repo:%s for failed EULA confirmation' % name)
- return None
-
- if mirrorlist:
- repo.mirrorlist = _varSubstitute(mirrorlist)
-
- conf = yum.config.RepoConf()
- for k, v in conf.iteritems():
- if v or not hasattr(repo, k):
- repo.setAttribute(k, v)
-
- repo.sslverify = ssl_verify
- repo.cache = not nocache
-
- repo.basecachedir = self.cachedir
- repo.base_persistdir = self.conf.persistdir
- repo.failovermethod = "priority"
- repo.metadata_expire = 0
- # Enable gpg check for verifying corrupt packages
- repo.gpgcheck = 1
- repo.enable()
- repo.setup(0)
- self.repos.add(repo)
- if cost:
- repo.cost = cost
-
- msger.verbose('repo: %s was added' % name)
- return repo
-
- def installLocal(self, pkg, po=None, updateonly=False):
- ts = rpmUtils.transaction.initReadOnlyTransaction()
- try:
- hdr = rpmUtils.miscutils.hdrFromPackage(ts, pkg)
- except rpmUtils.RpmUtilsError, e:
- raise yum.Errors.MiscError, \
- 'Could not open local rpm file: %s: %s' % (pkg, e)
-
- self.deselectPackage(hdr['name'])
- yum.YumBase.installLocal(self, pkg, po, updateonly)
-
- def installHasFile(self, file):
- provides_pkg = self.whatProvides(file, None, None)
- dlpkgs = map(
- lambda x: x.po,
- filter(
- lambda txmbr: txmbr.ts_state in ("i", "u"),
- self.tsInfo.getMembers()))
-
- for p in dlpkgs:
- for q in provides_pkg:
- if (p == q):
- return True
-
- return False
-
- def runInstall(self, checksize = 0):
- os.environ["HOME"] = "/"
- os.environ["LD_PRELOAD"] = ""
- try:
- (res, resmsg) = self.buildTransaction()
- except yum.Errors.RepoError, e:
- raise CreatorError("Unable to download from repo : %s" %(e,))
-
- if res != 2:
- raise CreatorError("Failed to build transaction : %s" \
- % str.join("\n", resmsg))
-
- dlpkgs = map(
- lambda x: x.po,
- filter(
- lambda txmbr: txmbr.ts_state in ("i", "u"),
- self.tsInfo.getMembers()))
-
- # record all pkg and the content
- for pkg in dlpkgs:
- pkg_long_name = misc.RPM_FMT % {
- 'name': pkg.name,
- 'arch': pkg.arch,
- 'version': pkg.version,
- 'release': pkg.release
- }
- self.__pkgs_content[pkg_long_name] = pkg.files
- license = pkg.license
- if license in self.__pkgs_license.keys():
- self.__pkgs_license[license].append(pkg_long_name)
- else:
- self.__pkgs_license[license] = [pkg_long_name]
-
- total_count = len(dlpkgs)
- cached_count = 0
- download_total_size = sum(map(lambda x: int(x.packagesize), dlpkgs))
-
- msger.info("\nChecking packages cached ...")
- for po in dlpkgs:
- local = po.localPkg()
- repo = filter(lambda r: r.id == po.repoid, self.repos.listEnabled())[0]
- if not repo.cache and os.path.exists(local):
- os.unlink(local)
- if not os.path.exists(local):
- continue
- if not self.verifyPkg(local, po, False):
- msger.warning("Package %s is damaged: %s" \
- % (os.path.basename(local), local))
- else:
- download_total_size -= int(po.packagesize)
- cached_count +=1
-
- cache_avail_size = misc.get_filesystem_avail(self.cachedir)
- if cache_avail_size < download_total_size:
- raise CreatorError("No enough space used for downloading.")
-
- # record the total size of installed pkgs
- pkgs_total_size = 0L
- for x in dlpkgs:
- if hasattr(x, 'installedsize'):
- pkgs_total_size += int(x.installedsize)
- else:
- pkgs_total_size += int(x.size)
-
- # check needed size before actually download and install
- if checksize and pkgs_total_size > checksize:
- raise CreatorError("No enough space used for installing, "
- "please resize partition size in ks file")
-
- msger.info("Packages: %d Total, %d Cached, %d Missed" \
- % (total_count, cached_count, total_count - cached_count))
-
- try:
- repos = self.repos.listEnabled()
- for repo in repos:
- repo.setCallback(TextProgress(total_count - cached_count))
-
- self.downloadPkgs(dlpkgs)
- # FIXME: sigcheck?
-
- self.initActionTs()
- self.populateTs(keepold=0)
-
- deps = self.ts.check()
- if len(deps) != 0:
- # This isn't fatal, Ubuntu has this issue but it is ok.
- msger.debug(deps)
- msger.warning("Dependency check failed!")
-
- rc = self.ts.order()
- if rc != 0:
- raise CreatorError("ordering packages for installation failed")
-
- # FIXME: callback should be refactored a little in yum
- cb = rpmmisc.RPMInstallCallback(self.ts)
- cb.tsInfo = self.tsInfo
- cb.filelog = False
-
- msger.warning('\nCaution, do NOT interrupt the installation, '
- 'else mic cannot finish the cleanup.')
-
- installlogfile = "%s/__catched_stderr.buf" % (self.instroot)
- msger.enable_logstderr(installlogfile)
- self.runTransaction(cb)
- self._cleanupRpmdbLocks(self.conf.installroot)
-
- except rpmUtils.RpmUtilsError, e:
- raise CreatorError("mic does NOT support delta rpm: %s" % e)
- except yum.Errors.RepoError, e:
- raise CreatorError("Unable to download from repo : %s" % e)
- except yum.Errors.YumBaseError, e:
- raise CreatorError("Unable to install: %s" % e)
- finally:
- msger.disable_logstderr()
-
- def getVcsInfo(self):
- return self.__pkgs_vcsinfo
-
- def getAllContent(self):
- return self.__pkgs_content
-
- def getPkgsLicense(self):
- return self.__pkgs_license
-
- def getFilelist(self, pkgname):
- if not pkgname:
- return None
-
- pkg = filter(lambda txmbr: txmbr.po.name == pkgname, self.tsInfo.getMembers())
- if not pkg:
- return None
- return pkg[0].po.filelist
-
- def package_url(self, pkgname):
- pkgs = self.pkgSack.searchNevra(name=pkgname)
- if pkgs:
- proxy = None
- proxies = None
- url = pkgs[0].remote_url
- repoid = pkgs[0].repoid
- repos = filter(lambda r: r.id == repoid, self.repos.listEnabled())
-
- if repos:
- proxy = repos[0].proxy
- if not proxy:
- proxy = get_proxy_for(url)
- if proxy:
- proxies = {str(url.split(':')[0]): str(proxy)}
-
- return (url, proxies)
-
- return (None, None)
diff --git a/scripts/lib/mic/plugins/backend/zypppkgmgr.py b/scripts/lib/mic/plugins/backend/zypppkgmgr.py
deleted file mode 100755
index c760859832..0000000000
--- a/scripts/lib/mic/plugins/backend/zypppkgmgr.py
+++ /dev/null
@@ -1,973 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import urlparse
-import rpm
-
-import zypp
-if not hasattr(zypp, 'PoolQuery') or \
- not hasattr(zypp.RepoManager, 'loadSolvFile'):
- raise ImportError("python-zypp in host system cannot support PoolQuery or "
- "loadSolvFile interface, please update it to enhanced "
- "version which can be found in download.tizen.org/tools")
-
-from mic import msger
-from mic.kickstart import ksparser
-from mic.utils import misc, rpmmisc, runner, fs_related
-from mic.utils.grabber import myurlgrab, TextProgress
-from mic.utils.proxy import get_proxy_for
-from mic.utils.errors import CreatorError, RepoError, RpmError
-from mic.imager.baseimager import BaseImageCreator
-
-class RepositoryStub:
- def __init__(self):
- self.name = None
- self.baseurl = []
- self.mirrorlist = None
- self.proxy = None
- self.proxy_username = None
- self.proxy_password = None
- self.nocache = False
-
- self.enabled = True
- self.autorefresh = True
- self.keeppackages = True
- self.priority = None
-
-from mic.pluginbase import BackendPlugin
-class Zypp(BackendPlugin):
- name = 'zypp'
-
- def __init__(self, target_arch, instroot, cachedir):
- self.cachedir = cachedir
- self.instroot = instroot
- self.target_arch = target_arch
-
- self.__pkgs_license = {}
- self.__pkgs_content = {}
- self.__pkgs_vcsinfo = {}
- self.repos = []
- self.to_deselect = []
- self.localpkgs = {}
- self.repo_manager = None
- self.repo_manager_options = None
- self.Z = None
- self.ts = None
- self.ts_pre = None
- self.incpkgs = {}
- self.excpkgs = {}
- self.pre_pkgs = []
- self.probFilterFlags = [ rpm.RPMPROB_FILTER_OLDPACKAGE,
- rpm.RPMPROB_FILTER_REPLACEPKG ]
-
- self.has_prov_query = True
- self.install_debuginfo = False
-
- def doFileLogSetup(self, uid, logfile):
- # don't do the file log for the livecd as it can lead to open fds
- # being left and an inability to clean up after ourself
- pass
-
- def closeRpmDB(self):
- pass
-
- def close(self):
- if self.ts:
- self.ts.closeDB()
- self.ts = None
-
- if self.ts_pre:
- self.ts_pre.closeDB()
- self.ts = None
-
- self.closeRpmDB()
-
- if not os.path.exists("/etc/fedora-release") and \
- not os.path.exists("/etc/meego-release"):
- for i in range(3, os.sysconf("SC_OPEN_MAX")):
- try:
- os.close(i)
- except:
- pass
-
- def __del__(self):
- self.close()
-
- def _cleanupRpmdbLocks(self, installroot):
- # cleans up temporary files left by bdb so that differing
- # versions of rpm don't cause problems
- import glob
- for f in glob.glob(installroot + "/var/lib/rpm/__db*"):
- os.unlink(f)
-
- def _cleanupZyppJunk(self, installroot):
- try:
- shutil.rmtree(os.path.join(installroot, '.zypp'))
- except:
- pass
-
- def setup(self):
- self._cleanupRpmdbLocks(self.instroot)
-
- def whatObsolete(self, pkg):
- query = zypp.PoolQuery()
- query.addKind(zypp.ResKind.package)
- query.addAttribute(zypp.SolvAttr.obsoletes, pkg)
- query.setMatchExact()
- for pi in query.queryResults(self.Z.pool()):
- return pi
- return None
-
- def _zyppQueryPackage(self, pkg):
- query = zypp.PoolQuery()
- query.addKind(zypp.ResKind.package)
- query.addAttribute(zypp.SolvAttr.name,pkg)
- query.setMatchExact()
- for pi in query.queryResults(self.Z.pool()):
- return pi
- return None
-
- def _splitPkgString(self, pkg):
- sp = pkg.rsplit(".",1)
- name = sp[0]
- arch = None
- if len(sp) == 2:
- arch = sp[1]
- sysarch = zypp.Arch(self.target_arch)
- if not zypp.Arch(arch).compatible_with (sysarch):
- arch = None
- name = ".".join(sp)
- return name, arch
-
- def selectPackage(self, pkg):
- """Select a given package or package pattern, can be specified
- with name.arch or name* or *name
- """
-
- if not self.Z:
- self.__initialize_zypp()
-
- def markPoolItem(obs, pi):
- if obs == None:
- pi.status().setToBeInstalled (zypp.ResStatus.USER)
- else:
- obs.status().setToBeInstalled (zypp.ResStatus.USER)
-
- def cmpEVR(p1, p2):
- # compare criterion: arch compatibility first, then repo
- # priority, and version last
- a1 = p1.arch()
- a2 = p2.arch()
- if str(a1) != str(a2):
- if a1.compatible_with(a2):
- return -1
- else:
- return 1
- # Priority of a repository is an integer value between 0 (the
- # highest priority) and 99 (the lowest priority)
- pr1 = int(p1.repoInfo().priority())
- pr2 = int(p2.repoInfo().priority())
- if pr1 > pr2:
- return -1
- elif pr1 < pr2:
- return 1
-
- ed1 = p1.edition()
- ed2 = p2.edition()
- (e1, v1, r1) = map(str, [ed1.epoch(), ed1.version(), ed1.release()])
- (e2, v2, r2) = map(str, [ed2.epoch(), ed2.version(), ed2.release()])
- return rpm.labelCompare((e1, v1, r1), (e2, v2, r2))
-
- found = False
- startx = pkg.startswith("*")
- endx = pkg.endswith("*")
- ispattern = startx or endx
- name, arch = self._splitPkgString(pkg)
-
- q = zypp.PoolQuery()
- q.addKind(zypp.ResKind.package)
-
- if ispattern:
- if startx and not endx:
- pattern = '%s$' % (pkg[1:])
- if endx and not startx:
- pattern = '^%s' % (pkg[0:-1])
- if endx and startx:
- pattern = '%s' % (pkg[1:-1])
- q.setMatchRegex()
- q.addAttribute(zypp.SolvAttr.name,pattern)
-
- elif arch:
- q.setMatchExact()
- q.addAttribute(zypp.SolvAttr.name,name)
-
- else:
- q.setMatchExact()
- q.addAttribute(zypp.SolvAttr.name,pkg)
-
- for pitem in sorted(
- q.queryResults(self.Z.pool()),
- cmp=lambda x,y: cmpEVR(zypp.asKindPackage(x), zypp.asKindPackage(y)),
- reverse=True):
- item = zypp.asKindPackage(pitem)
- if item.name() in self.excpkgs.keys() and \
- self.excpkgs[item.name()] == item.repoInfo().name():
- continue
- if item.name() in self.incpkgs.keys() and \
- self.incpkgs[item.name()] != item.repoInfo().name():
- continue
-
- found = True
- obspkg = self.whatObsolete(item.name())
- if arch:
- if arch == str(item.arch()):
- item.status().setToBeInstalled (zypp.ResStatus.USER)
- else:
- markPoolItem(obspkg, pitem)
- if not ispattern:
- break
-
- # Can't match using package name, then search from packge
- # provides infomation
- if found == False and not ispattern:
- q.addAttribute(zypp.SolvAttr.provides, pkg)
- q.addAttribute(zypp.SolvAttr.name,'')
-
- for pitem in sorted(
- q.queryResults(self.Z.pool()),
- cmp=lambda x,y: cmpEVR(zypp.asKindPackage(x), zypp.asKindPackage(y)),
- reverse=True):
- item = zypp.asKindPackage(pitem)
- if item.name() in self.excpkgs.keys() and \
- self.excpkgs[item.name()] == item.repoInfo().name():
- continue
- if item.name() in self.incpkgs.keys() and \
- self.incpkgs[item.name()] != item.repoInfo().name():
- continue
-
- found = True
- obspkg = self.whatObsolete(item.name())
- markPoolItem(obspkg, pitem)
- break
-
- if found:
- return None
- else:
- raise CreatorError("Unable to find package: %s" % (pkg,))
-
- def inDeselectPackages(self, pitem):
- """check if specified pacakges are in the list of inDeselectPackages
- """
- item = zypp.asKindPackage(pitem)
- name = item.name()
- for pkg in self.to_deselect:
- startx = pkg.startswith("*")
- endx = pkg.endswith("*")
- ispattern = startx or endx
- pkgname, pkgarch = self._splitPkgString(pkg)
- if not ispattern:
- if pkgarch:
- if name == pkgname and str(item.arch()) == pkgarch:
- return True;
- else:
- if name == pkgname:
- return True;
- else:
- if startx and name.endswith(pkg[1:]):
- return True;
- if endx and name.startswith(pkg[:-1]):
- return True;
-
- return False;
-
- def deselectPackage(self, pkg):
- """collect packages should not be installed"""
- self.to_deselect.append(pkg)
-
- def selectGroup(self, grp, include = ksparser.GROUP_DEFAULT):
- if not self.Z:
- self.__initialize_zypp()
- found = False
- q=zypp.PoolQuery()
- q.addKind(zypp.ResKind.pattern)
- for pitem in q.queryResults(self.Z.pool()):
- item = zypp.asKindPattern(pitem)
- summary = "%s" % item.summary()
- name = "%s" % item.name()
- if name == grp or summary == grp:
- found = True
- pitem.status().setToBeInstalled (zypp.ResStatus.USER)
- break
-
- if found:
- if include == ksparser.GROUP_REQUIRED:
- map(
- lambda p: self.deselectPackage(p),
- grp.default_packages.keys())
-
- return None
- else:
- raise CreatorError("Unable to find pattern: %s" % (grp,))
-
- def addRepository(self, name,
- url = None,
- mirrorlist = None,
- proxy = None,
- proxy_username = None,
- proxy_password = None,
- inc = None,
- exc = None,
- ssl_verify = True,
- nocache = False,
- cost=None,
- priority=None):
- # TODO: Handle cost attribute for repos
-
- if not self.repo_manager:
- self.__initialize_repo_manager()
-
- if not proxy and url:
- proxy = get_proxy_for(url)
-
- repo = RepositoryStub()
- repo.name = name
- repo.id = name
- repo.proxy = proxy
- repo.proxy_username = proxy_username
- repo.proxy_password = proxy_password
- repo.ssl_verify = ssl_verify
- repo.nocache = nocache
- repo.baseurl.append(url)
- if inc:
- for pkg in inc:
- self.incpkgs[pkg] = name
- if exc:
- for pkg in exc:
- self.excpkgs[pkg] = name
-
- # check LICENSE files
- if not rpmmisc.checkRepositoryEULA(name, repo):
- msger.warning('skip repo:%s for failed EULA confirmation' % name)
- return None
-
- if mirrorlist:
- repo.mirrorlist = mirrorlist
-
- # Enable gpg check for verifying corrupt packages
- repo.gpgcheck = 1
- if priority is not None:
- # priority 0 has issue in RepoInfo.setPriority
- repo.priority = priority + 1
-
- try:
- repo_info = zypp.RepoInfo()
- repo_info.setAlias(repo.name)
- repo_info.setName(repo.name)
- repo_info.setEnabled(repo.enabled)
- repo_info.setAutorefresh(repo.autorefresh)
- repo_info.setKeepPackages(repo.keeppackages)
- baseurl = zypp.Url(repo.baseurl[0])
- if not ssl_verify:
- baseurl.setQueryParam("ssl_verify", "no")
- if proxy:
- scheme, host, path, parm, query, frag = urlparse.urlparse(proxy)
-
- proxyinfo = host.split(":")
- host = proxyinfo[0]
-
- port = "80"
- if len(proxyinfo) > 1:
- port = proxyinfo[1]
-
- if proxy.startswith("socks") and len(proxy.rsplit(':', 1)) == 2:
- host = proxy.rsplit(':', 1)[0]
- port = proxy.rsplit(':', 1)[1]
-
- baseurl.setQueryParam ("proxy", host)
- baseurl.setQueryParam ("proxyport", port)
-
- repo.baseurl[0] = baseurl.asCompleteString()
- self.repos.append(repo)
-
- repo_info.addBaseUrl(baseurl)
-
- if repo.priority is not None:
- repo_info.setPriority(repo.priority)
-
- # this hack is used to change zypp credential file location
- # the default one is $HOME/.zypp, which cause conflicts when
- # installing some basic packages, and the location doesn't
- # have any interface actually, so use a tricky way anyway
- homedir = None
- if 'HOME' in os.environ:
- homedir = os.environ['HOME']
- os.environ['HOME'] = '/'
- else:
- os.environ['HOME'] = '/'
-
- self.repo_manager.addRepository(repo_info)
-
- # save back the $HOME env
- if homedir:
- os.environ['HOME'] = homedir
- else:
- del os.environ['HOME']
-
- self.__build_repo_cache(name)
-
- except RuntimeError, e:
- raise CreatorError(str(e))
-
- msger.verbose('repo: %s was added' % name)
- return repo
-
- def installHasFile(self, file):
- return False
-
- def preInstall(self, pkg):
- self.pre_pkgs.append(pkg)
-
- def runInstall(self, checksize = 0):
- os.environ["HOME"] = "/"
- os.environ["LD_PRELOAD"] = ""
- self.buildTransaction()
-
- todo = zypp.GetResolvablesToInsDel(self.Z.pool())
- installed_pkgs = todo._toInstall
- dlpkgs = []
- for pitem in installed_pkgs:
- if not zypp.isKindPattern(pitem) and \
- not self.inDeselectPackages(pitem):
- item = zypp.asKindPackage(pitem)
- dlpkgs.append(item)
-
- if not self.install_debuginfo or str(item.arch()) == "noarch":
- continue
-
- dipkg = self._zyppQueryPackage("%s-debuginfo" % item.name())
- if dipkg:
- ditem = zypp.asKindPackage(dipkg)
- dlpkgs.append(ditem)
- else:
- msger.warning("No debuginfo rpm found for: %s" \
- % item.name())
-
- # record all pkg and the content
- localpkgs = self.localpkgs.keys()
- for pkg in dlpkgs:
- license = ''
- if pkg.name() in localpkgs:
- hdr = rpmmisc.readRpmHeader(self.ts, self.localpkgs[pkg.name()])
- pkg_long_name = misc.RPM_FMT % {
- 'name': hdr['name'],
- 'arch': hdr['arch'],
- 'version': hdr['version'],
- 'release': hdr['release']
- }
- license = hdr['license']
-
- else:
- pkg_long_name = misc.RPM_FMT % {
- 'name': pkg.name(),
- 'arch': pkg.arch(),
- 'version': pkg.edition().version(),
- 'release': pkg.edition().release()
- }
-
- license = pkg.license()
-
- if license in self.__pkgs_license.keys():
- self.__pkgs_license[license].append(pkg_long_name)
- else:
- self.__pkgs_license[license] = [pkg_long_name]
-
- total_count = len(dlpkgs)
- cached_count = 0
- download_total_size = sum(map(lambda x: int(x.downloadSize()), dlpkgs))
- localpkgs = self.localpkgs.keys()
-
- msger.info("Checking packages cached ...")
- for po in dlpkgs:
- # Check if it is cached locally
- if po.name() in localpkgs:
- cached_count += 1
- else:
- local = self.getLocalPkgPath(po)
- name = str(po.repoInfo().name())
- try:
- repo = filter(lambda r: r.name == name, self.repos)[0]
- except IndexError:
- repo = None
- nocache = repo.nocache if repo else False
-
- if os.path.exists(local):
- if nocache or self.checkPkg(local) !=0:
- os.unlink(local)
- else:
- download_total_size -= int(po.downloadSize())
- cached_count += 1
- cache_avail_size = misc.get_filesystem_avail(self.cachedir)
- if cache_avail_size < download_total_size:
- raise CreatorError("No enough space used for downloading.")
-
- # record the total size of installed pkgs
- install_total_size = sum(map(lambda x: int(x.installSize()), dlpkgs))
- # check needed size before actually download and install
-
- # FIXME: for multiple partitions for loop type, check fails
- # skip the check temporarily
- #if checksize and install_total_size > checksize:
- # raise CreatorError("No enough space used for installing, "
- # "please resize partition size in ks file")
-
- download_count = total_count - cached_count
- msger.info("Packages: %d Total, %d Cached, %d Missed" \
- % (total_count, cached_count, download_count))
-
- try:
- if download_count > 0:
- msger.info("Downloading packages ...")
- self.downloadPkgs(dlpkgs, download_count)
-
- self.installPkgs(dlpkgs)
-
- except (RepoError, RpmError):
- raise
- except Exception, e:
- raise CreatorError("Package installation failed: %s" % (e,))
-
- def getVcsInfo(self):
- if self.__pkgs_vcsinfo:
- return
-
- if not self.ts:
- self.__initialize_transaction()
-
- mi = self.ts.dbMatch()
- for hdr in mi:
- lname = misc.RPM_FMT % {
- 'name': hdr['name'],
- 'arch': hdr['arch'],
- 'version': hdr['version'],
- 'release': hdr['release']
- }
- self.__pkgs_vcsinfo[lname] = hdr['VCS']
-
- return self.__pkgs_vcsinfo
-
- def getAllContent(self):
- if self.__pkgs_content:
- return self.__pkgs_content
-
- if not self.ts:
- self.__initialize_transaction()
-
- mi = self.ts.dbMatch()
- for hdr in mi:
- lname = misc.RPM_FMT % {
- 'name': hdr['name'],
- 'arch': hdr['arch'],
- 'version': hdr['version'],
- 'release': hdr['release']
- }
- self.__pkgs_content[lname] = hdr['FILENAMES']
-
- return self.__pkgs_content
-
- def getPkgsLicense(self):
- return self.__pkgs_license
-
- def getFilelist(self, pkgname):
- if not pkgname:
- return None
-
- if not self.ts:
- self.__initialize_transaction()
-
- mi = self.ts.dbMatch('name', pkgname)
- for header in mi:
- return header['FILENAMES']
-
- def __initialize_repo_manager(self):
- if self.repo_manager:
- return
-
- # Clean up repo metadata
- shutil.rmtree(self.cachedir + "/etc", ignore_errors = True)
- shutil.rmtree(self.cachedir + "/solv", ignore_errors = True)
- shutil.rmtree(self.cachedir + "/raw", ignore_errors = True)
-
- zypp.KeyRing.setDefaultAccept( zypp.KeyRing.ACCEPT_UNSIGNED_FILE
- | zypp.KeyRing.ACCEPT_VERIFICATION_FAILED
- | zypp.KeyRing.ACCEPT_UNKNOWNKEY
- | zypp.KeyRing.TRUST_KEY_TEMPORARILY
- )
-
- self.repo_manager_options = \
- zypp.RepoManagerOptions(zypp.Pathname(self.instroot))
-
- self.repo_manager_options.knownReposPath = \
- zypp.Pathname(self.cachedir + "/etc/zypp/repos.d")
-
- self.repo_manager_options.repoCachePath = \
- zypp.Pathname(self.cachedir)
-
- self.repo_manager_options.repoRawCachePath = \
- zypp.Pathname(self.cachedir + "/raw")
-
- self.repo_manager_options.repoSolvCachePath = \
- zypp.Pathname(self.cachedir + "/solv")
-
- self.repo_manager_options.repoPackagesCachePath = \
- zypp.Pathname(self.cachedir + "/packages")
-
- self.repo_manager = zypp.RepoManager(self.repo_manager_options)
-
- def __build_repo_cache(self, name):
- repo = self.repo_manager.getRepositoryInfo(name)
- if self.repo_manager.isCached(repo) or not repo.enabled():
- return
-
- msger.info('Refreshing repository: %s ...' % name)
- self.repo_manager.buildCache(repo, zypp.RepoManager.BuildIfNeeded)
-
- def __initialize_zypp(self):
- if self.Z:
- return
-
- zconfig = zypp.ZConfig_instance()
-
- # Set system architecture
- if self.target_arch:
- zconfig.setSystemArchitecture(zypp.Arch(self.target_arch))
-
- msger.info("zypp architecture is <%s>" % zconfig.systemArchitecture())
-
- # repoPackagesCachePath is corrected by this
- self.repo_manager = zypp.RepoManager(self.repo_manager_options)
- repos = self.repo_manager.knownRepositories()
- for repo in repos:
- if not repo.enabled():
- continue
- self.repo_manager.loadFromCache(repo)
-
- self.Z = zypp.ZYppFactory_instance().getZYpp()
- self.Z.initializeTarget(zypp.Pathname(self.instroot))
- self.Z.target().load()
-
- def buildTransaction(self):
- if not self.Z.resolver().resolvePool():
- probs = self.Z.resolver().problems()
-
- for problem in probs:
- msger.warning("repo problem: %s, %s" \
- % (problem.description().decode("utf-8"),
- problem.details().decode("utf-8")))
-
- raise RepoError("found %d resolver problem, abort!" \
- % len(probs))
-
- def getLocalPkgPath(self, po):
- repoinfo = po.repoInfo()
- cacheroot = repoinfo.packagesPath()
- location= po.location()
- rpmpath = str(location.filename())
- pkgpath = "%s/%s" % (cacheroot, os.path.basename(rpmpath))
- return pkgpath
-
- def installLocal(self, pkg, po=None, updateonly=False):
- if not self.ts:
- self.__initialize_transaction()
-
- solvfile = "%s/.solv" % (self.cachedir)
-
- rc, out = runner.runtool([fs_related.find_binary_path("rpms2solv"),
- pkg])
- if rc == 0:
- f = open(solvfile, "w+")
- f.write(out)
- f.close()
-
- warnmsg = self.repo_manager.loadSolvFile(solvfile,
- os.path.basename(pkg))
- if warnmsg:
- msger.warning(warnmsg)
-
- os.unlink(solvfile)
- else:
- msger.warning('Can not get %s solv data.' % pkg)
-
- hdr = rpmmisc.readRpmHeader(self.ts, pkg)
- arch = zypp.Arch(hdr['arch'])
- sysarch = zypp.Arch(self.target_arch)
-
- if arch.compatible_with (sysarch):
- pkgname = hdr['name']
- self.localpkgs[pkgname] = pkg
- self.selectPackage(pkgname)
- msger.info("Marking %s to be installed" % (pkg))
-
- else:
- msger.warning("Cannot add package %s to transaction. "
- "Not a compatible architecture: %s" \
- % (pkg, hdr['arch']))
-
- def downloadPkgs(self, package_objects, count):
- localpkgs = self.localpkgs.keys()
- progress_obj = TextProgress(count)
-
- for po in package_objects:
- if po.name() in localpkgs:
- continue
-
- filename = self.getLocalPkgPath(po)
- if os.path.exists(filename):
- if self.checkPkg(filename) == 0:
- continue
-
- dirn = os.path.dirname(filename)
- if not os.path.exists(dirn):
- os.makedirs(dirn)
-
- url = self.get_url(po)
- proxies = self.get_proxies(po)
-
- try:
- filename = myurlgrab(url, filename, proxies, progress_obj)
- except CreatorError:
- self.close()
- raise
-
- def preinstallPkgs(self):
- if not self.ts_pre:
- self.__initialize_transaction()
-
- self.ts_pre.order()
- cb = rpmmisc.RPMInstallCallback(self.ts_pre)
- cb.headmsg = "Preinstall"
- installlogfile = "%s/__catched_stderr.buf" % (self.instroot)
-
- # start to catch stderr output from librpm
- msger.enable_logstderr(installlogfile)
-
- errors = self.ts_pre.run(cb.callback, '')
- # stop catch
- msger.disable_logstderr()
- self.ts_pre.closeDB()
- self.ts_pre = None
-
- if errors is not None:
- if len(errors) == 0:
- msger.warning('scriptlet or other non-fatal errors occurred '
- 'during transaction.')
-
- else:
- for e in errors:
- msger.warning(e[0])
- raise RepoError('Could not run transaction.')
-
- def installPkgs(self, package_objects):
- if not self.ts:
- self.__initialize_transaction()
-
- # clean rpm lock
- self._cleanupRpmdbLocks(self.instroot)
- self._cleanupZyppJunk(self.instroot)
- # Set filters
- probfilter = 0
- for flag in self.probFilterFlags:
- probfilter |= flag
- self.ts.setProbFilter(probfilter)
- self.ts_pre.setProbFilter(probfilter)
-
- localpkgs = self.localpkgs.keys()
-
- for po in package_objects:
- pkgname = po.name()
- if pkgname in localpkgs:
- rpmpath = self.localpkgs[pkgname]
- else:
- rpmpath = self.getLocalPkgPath(po)
-
- if not os.path.exists(rpmpath):
- # Maybe it is a local repo
- rpmuri = self.get_url(po)
- if rpmuri.startswith("file:/"):
- rpmpath = rpmuri[5:]
-
- if not os.path.exists(rpmpath):
- raise RpmError("Error: %s doesn't exist" % rpmpath)
-
- h = rpmmisc.readRpmHeader(self.ts, rpmpath)
-
- if pkgname in self.pre_pkgs:
- msger.verbose("pre-install package added: %s" % pkgname)
- self.ts_pre.addInstall(h, rpmpath, 'u')
-
- self.ts.addInstall(h, rpmpath, 'u')
-
- unresolved_dependencies = self.ts.check()
- if not unresolved_dependencies:
- if self.pre_pkgs:
- self.preinstallPkgs()
-
- self.ts.order()
- cb = rpmmisc.RPMInstallCallback(self.ts)
- installlogfile = "%s/__catched_stderr.buf" % (self.instroot)
-
- # start to catch stderr output from librpm
- msger.enable_logstderr(installlogfile)
-
- errors = self.ts.run(cb.callback, '')
- # stop catch
- msger.disable_logstderr()
- self.ts.closeDB()
- self.ts = None
-
- if errors is not None:
- if len(errors) == 0:
- msger.warning('scriptlet or other non-fatal errors occurred '
- 'during transaction.')
-
- else:
- for e in errors:
- msger.warning(e[0])
- raise RepoError('Could not run transaction.')
-
- else:
- for pkg, need, needflags, sense, key in unresolved_dependencies:
- package = '-'.join(pkg)
-
- if needflags == rpm.RPMSENSE_LESS:
- deppkg = ' < '.join(need)
- elif needflags == rpm.RPMSENSE_EQUAL:
- deppkg = ' = '.join(need)
- elif needflags == rpm.RPMSENSE_GREATER:
- deppkg = ' > '.join(need)
- else:
- deppkg = '-'.join(need)
-
- if sense == rpm.RPMDEP_SENSE_REQUIRES:
- msger.warning("[%s] Requires [%s], which is not provided" \
- % (package, deppkg))
-
- elif sense == rpm.RPMDEP_SENSE_CONFLICTS:
- msger.warning("[%s] Conflicts with [%s]" %(package,deppkg))
-
- raise RepoError("Unresolved dependencies, transaction failed.")
-
- def __initialize_transaction(self):
- if not self.ts:
- self.ts = rpm.TransactionSet(self.instroot)
- # Set to not verify DSA signatures.
- self.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)
-
- if not self.ts_pre:
- self.ts_pre = rpm.TransactionSet(self.instroot)
- # Just unpack the files, don't run scripts
- self.ts_pre.setFlags(rpm.RPMTRANS_FLAG_ALLFILES | rpm.RPMTRANS_FLAG_NOSCRIPTS)
- # Set to not verify DSA signatures.
- self.ts_pre.setVSFlags(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)
-
- def checkPkg(self, pkg):
- ret = 1
- if not os.path.exists(pkg):
- return ret
- ret = rpmmisc.checkRpmIntegrity('rpm', pkg)
- if ret != 0:
- msger.warning("package %s is damaged: %s" \
- % (os.path.basename(pkg), pkg))
-
- return ret
-
- def _add_prob_flags(self, *flags):
- for flag in flags:
- if flag not in self.probFilterFlags:
- self.probFilterFlags.append(flag)
-
- def get_proxies(self, pobj):
- if not pobj:
- return None
-
- proxy = None
- proxies = None
- repoinfo = pobj.repoInfo()
- reponame = "%s" % repoinfo.name()
- repos = filter(lambda r: r.name == reponame, self.repos)
- repourl = str(repoinfo.baseUrls()[0])
-
- if repos:
- proxy = repos[0].proxy
- if not proxy:
- proxy = get_proxy_for(repourl)
- if proxy:
- proxies = {str(repourl.split(':')[0]): str(proxy)}
-
- return proxies
-
- def get_url(self, pobj):
- if not pobj:
- return None
-
- name = str(pobj.repoInfo().name())
- try:
- repo = filter(lambda r: r.name == name, self.repos)[0]
- except IndexError:
- return None
-
- baseurl = repo.baseurl[0]
-
- index = baseurl.find("?")
- if index > -1:
- baseurl = baseurl[:index]
-
- location = pobj.location()
- location = str(location.filename())
- if location.startswith("./"):
- location = location[2:]
-
- return os.path.join(baseurl, location)
-
- def package_url(self, pkgname):
-
- def cmpEVR(p1, p2):
- ed1 = p1.edition()
- ed2 = p2.edition()
- (e1, v1, r1) = map(str, [ed1.epoch(), ed1.version(), ed1.release()])
- (e2, v2, r2) = map(str, [ed2.epoch(), ed2.version(), ed2.release()])
- return rpm.labelCompare((e1, v1, r1), (e2, v2, r2))
-
- if not self.Z:
- self.__initialize_zypp()
-
- q = zypp.PoolQuery()
- q.addKind(zypp.ResKind.package)
- q.setMatchExact()
- q.addAttribute(zypp.SolvAttr.name, pkgname)
- items = sorted(q.queryResults(self.Z.pool()),
- cmp=lambda x,y: cmpEVR(zypp.asKindPackage(x), zypp.asKindPackage(y)),
- reverse=True)
-
- if items:
- item = zypp.asKindPackage(items[0])
- url = self.get_url(item)
- proxies = self.get_proxies(item)
- return (url, proxies)
-
- return (None, None)
diff --git a/scripts/lib/mic/plugins/hook/.py b/scripts/lib/mic/plugins/hook/.py
deleted file mode 100644
index e69de29bb2..0000000000
--- a/scripts/lib/mic/plugins/hook/.py
+++ /dev/null
diff --git a/scripts/lib/mic/plugins/hook/empty_hook.py b/scripts/lib/mic/plugins/hook/empty_hook.py
deleted file mode 100644
index 397585d8c1..0000000000
--- a/scripts/lib/mic/plugins/hook/empty_hook.py
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/python
-
-# TODO: plugin base for hooks
diff --git a/scripts/lib/mic/plugins/imager/fs_plugin.py b/scripts/lib/mic/plugins/imager/fs_plugin.py
deleted file mode 100644
index 6bcaf00729..0000000000
--- a/scripts/lib/mic/plugins/imager/fs_plugin.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import sys
-
-from mic import chroot, msger
-from mic.utils import cmdln, misc, errors, fs_related
-from mic.imager import fs
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-
-from mic.pluginbase import ImagerPlugin
-class FsPlugin(ImagerPlugin):
- name = 'fs'
-
- @classmethod
- @cmdln.option("--include-src",
- dest="include_src",
- action="store_true",
- default=False,
- help="Generate a image with source rpms included")
- def do_create(self, subcmd, opts, *args):
- """${cmd_name}: create fs image
-
- Usage:
- ${name} ${cmd_name} <ksfile> [OPTS]
-
- ${cmd_option_list}
- """
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- creatoropts = configmgr.create
- ksconf = args[0]
-
- if creatoropts['runtime'] == 'bootstrap':
- configmgr._ksconf = ksconf
- rt_util.bootstrap_mic()
-
- recording_pkgs = []
- if len(creatoropts['record_pkgs']) > 0:
- recording_pkgs = creatoropts['record_pkgs']
-
- if creatoropts['release'] is not None:
- if 'name' not in recording_pkgs:
- recording_pkgs.append('name')
- if 'vcs' not in recording_pkgs:
- recording_pkgs.append('vcs')
-
- configmgr._ksconf = ksconf
-
- # Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
- if creatoropts['release'] is not None:
- creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])
-
- # try to find the pkgmgr
- pkgmgr = None
- backends = pluginmgr.get_plugins('backend')
- if 'auto' == creatoropts['pkgmgr']:
- for key in configmgr.prefer_backends:
- if key in backends:
- pkgmgr = backends[key]
- break
- else:
- for key in backends.keys():
- if key == creatoropts['pkgmgr']:
- pkgmgr = backends[key]
- break
-
- if not pkgmgr:
- raise errors.CreatorError("Can't find backend: %s, "
- "available choices: %s" %
- (creatoropts['pkgmgr'],
- ','.join(backends.keys())))
-
- creator = fs.FsImageCreator(creatoropts, pkgmgr)
- creator._include_src = opts.include_src
-
- if len(recording_pkgs) > 0:
- creator._recording_pkgs = recording_pkgs
-
- self.check_image_exists(creator.destdir,
- creator.pack_to,
- [creator.name],
- creatoropts['release'])
-
- try:
- creator.check_depend_tools()
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- #Download the source packages ###private options
- if opts.include_src:
- installed_pkgs = creator.get_installed_packages()
- msger.info('--------------------------------------------------')
- msger.info('Generating the image with source rpms included ...')
- if not misc.SrcpkgsDownload(installed_pkgs, creatoropts["repomd"], creator._instroot, creatoropts["cachedir"]):
- msger.warning("Source packages can't be downloaded")
-
- creator.configure(creatoropts["repomd"])
- creator.copy_kernel()
- creator.unmount()
- creator.package(creatoropts["outdir"])
- if creatoropts['release'] is not None:
- creator.release_output(ksconf, creatoropts['outdir'], creatoropts['release'])
- creator.print_outimage_info()
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- msger.info("Finished.")
- return 0
-
- @classmethod
- def do_chroot(self, target, cmd=[]):#chroot.py parse opts&args
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", target)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(target, None, cmdline)
- finally:
- chroot.cleanup_after_chroot("dir", None, None, None)
- return 1
diff --git a/scripts/lib/mic/plugins/imager/livecd_plugin.py b/scripts/lib/mic/plugins/imager/livecd_plugin.py
deleted file mode 100644
index 82cb1af7dc..0000000000
--- a/scripts/lib/mic/plugins/imager/livecd_plugin.py
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import tempfile
-
-from mic import chroot, msger
-from mic.utils import misc, fs_related, errors
-from mic.conf import configmgr
-import mic.imager.livecd as livecd
-from mic.plugin import pluginmgr
-
-from mic.pluginbase import ImagerPlugin
-class LiveCDPlugin(ImagerPlugin):
- name = 'livecd'
-
- @classmethod
- def do_create(self, subcmd, opts, *args):
- """${cmd_name}: create livecd image
-
- Usage:
- ${name} ${cmd_name} <ksfile> [OPTS]
-
- ${cmd_option_list}
- """
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- creatoropts = configmgr.create
- ksconf = args[0]
-
- if creatoropts['runtime'] == 'bootstrap':
- configmgr._ksconf = ksconf
- rt_util.bootstrap_mic()
-
- if creatoropts['arch'] and creatoropts['arch'].startswith('arm'):
- msger.warning('livecd cannot support arm images, Quit')
- return
-
- recording_pkgs = []
- if len(creatoropts['record_pkgs']) > 0:
- recording_pkgs = creatoropts['record_pkgs']
-
- if creatoropts['release'] is not None:
- if 'name' not in recording_pkgs:
- recording_pkgs.append('name')
- if 'vcs' not in recording_pkgs:
- recording_pkgs.append('vcs')
-
- configmgr._ksconf = ksconf
-
- # Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
- if creatoropts['release'] is not None:
- creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])
-
- # try to find the pkgmgr
- pkgmgr = None
- backends = pluginmgr.get_plugins('backend')
- if 'auto' == creatoropts['pkgmgr']:
- for key in configmgr.prefer_backends:
- if key in backends:
- pkgmgr = backends[key]
- break
- else:
- for key in backends.keys():
- if key == creatoropts['pkgmgr']:
- pkgmgr = backends[key]
- break
-
- if not pkgmgr:
- raise errors.CreatorError("Can't find backend: %s, "
- "available choices: %s" %
- (creatoropts['pkgmgr'],
- ','.join(backends.keys())))
-
- creator = livecd.LiveCDImageCreator(creatoropts, pkgmgr)
-
- if len(recording_pkgs) > 0:
- creator._recording_pkgs = recording_pkgs
-
- self.check_image_exists(creator.destdir,
- creator.pack_to,
- [creator.name + ".iso"],
- creatoropts['release'])
-
- try:
- creator.check_depend_tools()
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- creator.configure(creatoropts["repomd"])
- creator.copy_kernel()
- creator.unmount()
- creator.package(creatoropts["outdir"])
- if creatoropts['release'] is not None:
- creator.release_output(ksconf, creatoropts['outdir'], creatoropts['release'])
- creator.print_outimage_info()
-
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- msger.info("Finished.")
- return 0
-
- @classmethod
- def do_chroot(cls, target, cmd=[]):
- os_image = cls.do_unpack(target)
- os_image_dir = os.path.dirname(os_image)
-
- # unpack image to target dir
- imgsize = misc.get_file_size(os_image) * 1024L * 1024L
- imgtype = misc.get_image_type(os_image)
- if imgtype == "btrfsimg":
- fstype = "btrfs"
- myDiskMount = fs_related.BtrfsDiskMount
- elif imgtype in ("ext3fsimg", "ext4fsimg"):
- fstype = imgtype[:4]
- myDiskMount = fs_related.ExtDiskMount
- else:
- raise errors.CreatorError("Unsupported filesystem type: %s" % fstype)
-
- extmnt = misc.mkdtemp()
- extloop = myDiskMount(fs_related.SparseLoopbackDisk(os_image, imgsize),
- extmnt,
- fstype,
- 4096,
- "%s label" % fstype)
- try:
- extloop.mount()
-
- except errors.MountError:
- extloop.cleanup()
- shutil.rmtree(extmnt, ignore_errors = True)
- shutil.rmtree(os_image_dir, ignore_errors = True)
- raise
-
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", extmnt)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(extmnt, None, cmdline)
- except:
- raise errors.CreatorError("Failed to chroot to %s." %target)
- finally:
- chroot.cleanup_after_chroot("img", extloop, os_image_dir, extmnt)
-
- @classmethod
- def do_pack(cls, base_on):
- import subprocess
-
- def __mkinitrd(instance):
- kernelver = instance._get_kernel_versions().values()[0][0]
- args = [ "/usr/libexec/mkliveinitrd", "/boot/initrd-%s.img" % kernelver, "%s" % kernelver ]
- try:
- subprocess.call(args, preexec_fn = instance._chroot)
- except OSError, (err, msg):
- raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
-
- def __run_post_cleanups(instance):
- kernelver = instance._get_kernel_versions().values()[0][0]
- args = ["rm", "-f", "/boot/initrd-%s.img" % kernelver]
-
- try:
- subprocess.call(args, preexec_fn = instance._chroot)
- except OSError, (err, msg):
- raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
-
- convertoropts = configmgr.convert
- convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]
- convertor = livecd.LiveCDImageCreator(convertoropts)
- imgtype = misc.get_image_type(base_on)
- if imgtype == "btrfsimg":
- fstype = "btrfs"
- elif imgtype in ("ext3fsimg", "ext4fsimg"):
- fstype = imgtype[:4]
- else:
- raise errors.CreatorError("Unsupported filesystem type: %s" % fstype)
- convertor._set_fstype(fstype)
- try:
- convertor.mount(base_on)
- __mkinitrd(convertor)
- convertor._create_bootconfig()
- __run_post_cleanups(convertor)
- convertor.launch_shell(convertoropts['shell'])
- convertor.unmount()
- convertor.package()
- convertor.print_outimage_info()
- finally:
- shutil.rmtree(os.path.dirname(base_on), ignore_errors = True)
-
- @classmethod
- def do_unpack(cls, srcimg):
- img = srcimg
- imgmnt = misc.mkdtemp()
- imgloop = fs_related.DiskMount(fs_related.LoopbackDisk(img, 0), imgmnt)
- try:
- imgloop.mount()
- except errors.MountError:
- imgloop.cleanup()
- raise
-
- # legacy LiveOS filesystem layout support, remove for F9 or F10
- if os.path.exists(imgmnt + "/squashfs.img"):
- squashimg = imgmnt + "/squashfs.img"
- else:
- squashimg = imgmnt + "/LiveOS/squashfs.img"
-
- tmpoutdir = misc.mkdtemp()
- # unsquashfs requires outdir mustn't exist
- shutil.rmtree(tmpoutdir, ignore_errors = True)
- misc.uncompress_squashfs(squashimg, tmpoutdir)
-
- try:
- # legacy LiveOS filesystem layout support, remove for F9 or F10
- if os.path.exists(tmpoutdir + "/os.img"):
- os_image = tmpoutdir + "/os.img"
- else:
- os_image = tmpoutdir + "/LiveOS/ext3fs.img"
-
- if not os.path.exists(os_image):
- raise errors.CreatorError("'%s' is not a valid live CD ISO : neither "
- "LiveOS/ext3fs.img nor os.img exist" %img)
-
- imgname = os.path.basename(srcimg)
- imgname = os.path.splitext(imgname)[0] + ".img"
- rtimage = os.path.join(tempfile.mkdtemp(dir = "/var/tmp", prefix = "tmp"), imgname)
- shutil.copyfile(os_image, rtimage)
-
- finally:
- imgloop.cleanup()
- shutil.rmtree(tmpoutdir, ignore_errors = True)
- shutil.rmtree(imgmnt, ignore_errors = True)
-
- return rtimage
diff --git a/scripts/lib/mic/plugins/imager/liveusb_plugin.py b/scripts/lib/mic/plugins/imager/liveusb_plugin.py
deleted file mode 100644
index 3d53c84410..0000000000
--- a/scripts/lib/mic/plugins/imager/liveusb_plugin.py
+++ /dev/null
@@ -1,260 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import tempfile
-
-from mic import chroot, msger
-from mic.utils import misc, fs_related, errors
-from mic.utils.partitionedfs import PartitionedMount
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-
-import mic.imager.liveusb as liveusb
-
-from mic.pluginbase import ImagerPlugin
-class LiveUSBPlugin(ImagerPlugin):
- name = 'liveusb'
-
- @classmethod
- def do_create(self, subcmd, opts, *args):
- """${cmd_name}: create liveusb image
-
- Usage:
- ${name} ${cmd_name} <ksfile> [OPTS]
-
- ${cmd_option_list}
- """
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- creatoropts = configmgr.create
- ksconf = args[0]
-
- if creatoropts['runtime'] == "bootstrap":
- configmgr._ksconf = ksconf
- rt_util.bootstrap_mic()
-
- if creatoropts['arch'] and creatoropts['arch'].startswith('arm'):
- msger.warning('liveusb cannot support arm images, Quit')
- return
-
- recording_pkgs = []
- if len(creatoropts['record_pkgs']) > 0:
- recording_pkgs = creatoropts['record_pkgs']
-
- if creatoropts['release'] is not None:
- if 'name' not in recording_pkgs:
- recording_pkgs.append('name')
- if 'vcs' not in recording_pkgs:
- recording_pkgs.append('vcs')
-
- configmgr._ksconf = ksconf
-
- # Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
- if creatoropts['release'] is not None:
- creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])
-
- # try to find the pkgmgr
- pkgmgr = None
- backends = pluginmgr.get_plugins('backend')
- if 'auto' == creatoropts['pkgmgr']:
- for key in configmgr.prefer_backends:
- if key in backends:
- pkgmgr = backends[key]
- break
- else:
- for key in backends.keys():
- if key == creatoropts['pkgmgr']:
- pkgmgr = backends[key]
- break
-
- if not pkgmgr:
- raise errors.CreatorError("Can't find backend: %s, "
- "available choices: %s" %
- (creatoropts['pkgmgr'],
- ','.join(backends.keys())))
-
- creator = liveusb.LiveUSBImageCreator(creatoropts, pkgmgr)
-
- if len(recording_pkgs) > 0:
- creator._recording_pkgs = recording_pkgs
-
- self.check_image_exists(creator.destdir,
- creator.pack_to,
- [creator.name + ".usbimg"],
- creatoropts['release'])
- try:
- creator.check_depend_tools()
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- creator.configure(creatoropts["repomd"])
- creator.copy_kernel()
- creator.unmount()
- creator.package(creatoropts["outdir"])
- if creatoropts['release'] is not None:
- creator.release_output(ksconf, creatoropts['outdir'], creatoropts['release'])
- creator.print_outimage_info()
-
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- msger.info("Finished.")
- return 0
-
- @classmethod
- def do_chroot(cls, target, cmd=[]):
- os_image = cls.do_unpack(target)
- os_image_dir = os.path.dirname(os_image)
-
- # unpack image to target dir
- imgsize = misc.get_file_size(os_image) * 1024L * 1024L
- imgtype = misc.get_image_type(os_image)
- if imgtype == "btrfsimg":
- fstype = "btrfs"
- myDiskMount = fs_related.BtrfsDiskMount
- elif imgtype in ("ext3fsimg", "ext4fsimg"):
- fstype = imgtype[:4]
- myDiskMount = fs_related.ExtDiskMount
- else:
- raise errors.CreatorError("Unsupported filesystem type: %s" % fstype)
-
- extmnt = misc.mkdtemp()
- extloop = myDiskMount(fs_related.SparseLoopbackDisk(os_image, imgsize),
- extmnt,
- fstype,
- 4096,
- "%s label" % fstype)
-
- try:
- extloop.mount()
-
- except errors.MountError:
- extloop.cleanup()
- shutil.rmtree(extmnt, ignore_errors = True)
- raise
-
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", extmnt)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(extmnt, None, cmdline)
- except:
- raise errors.CreatorError("Failed to chroot to %s." %target)
- finally:
- chroot.cleanup_after_chroot("img", extloop, os_image_dir, extmnt)
-
- @classmethod
- def do_pack(cls, base_on):
- import subprocess
-
- def __mkinitrd(instance):
- kernelver = instance._get_kernel_versions().values()[0][0]
- args = [ "/usr/libexec/mkliveinitrd", "/boot/initrd-%s.img" % kernelver, "%s" % kernelver ]
- try:
- subprocess.call(args, preexec_fn = instance._chroot)
-
- except OSError, (err, msg):
- raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
-
- def __run_post_cleanups(instance):
- kernelver = instance._get_kernel_versions().values()[0][0]
- args = ["rm", "-f", "/boot/initrd-%s.img" % kernelver]
-
- try:
- subprocess.call(args, preexec_fn = instance._chroot)
- except OSError, (err, msg):
- raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
-
- convertoropts = configmgr.convert
- convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]
- convertor = liveusb.LiveUSBImageCreator(convertoropts)
- imgtype = misc.get_image_type(base_on)
- if imgtype == "btrfsimg":
- fstype = "btrfs"
- elif imgtype in ("ext3fsimg", "ext4fsimg"):
- fstype = imgtype[:4]
- else:
- raise errors.CreatorError("Unsupported filesystem type: %s" % fstyp)
- convertor._set_fstype(fstype)
- try:
- convertor.mount(base_on)
- __mkinitrd(convertor)
- convertor._create_bootconfig()
- __run_post_cleanups(convertor)
- convertor.launch_shell(convertoropts['shell'])
- convertor.unmount()
- convertor.package()
- convertor.print_outimage_info()
- finally:
- shutil.rmtree(os.path.dirname(base_on), ignore_errors = True)
-
- @classmethod
- def do_unpack(cls, srcimg):
- img = srcimg
- imgsize = misc.get_file_size(img) * 1024L * 1024L
- imgmnt = misc.mkdtemp()
- disk = fs_related.SparseLoopbackDisk(img, imgsize)
- imgloop = PartitionedMount(imgmnt, skipformat = True)
- imgloop.add_disk('/dev/sdb', disk)
- imgloop.add_partition(imgsize/1024/1024, "/dev/sdb", "/", "vfat", boot=False)
- try:
- imgloop.mount()
- except errors.MountError:
- imgloop.cleanup()
- raise
-
- # legacy LiveOS filesystem layout support, remove for F9 or F10
- if os.path.exists(imgmnt + "/squashfs.img"):
- squashimg = imgmnt + "/squashfs.img"
- else:
- squashimg = imgmnt + "/LiveOS/squashfs.img"
-
- tmpoutdir = misc.mkdtemp()
- # unsquashfs requires outdir mustn't exist
- shutil.rmtree(tmpoutdir, ignore_errors = True)
- misc.uncompress_squashfs(squashimg, tmpoutdir)
-
- try:
- # legacy LiveOS filesystem layout support, remove for F9 or F10
- if os.path.exists(tmpoutdir + "/os.img"):
- os_image = tmpoutdir + "/os.img"
- else:
- os_image = tmpoutdir + "/LiveOS/ext3fs.img"
-
- if not os.path.exists(os_image):
- raise errors.CreatorError("'%s' is not a valid live CD ISO : neither "
- "LiveOS/ext3fs.img nor os.img exist" %img)
- imgname = os.path.basename(srcimg)
- imgname = os.path.splitext(imgname)[0] + ".img"
- rtimage = os.path.join(tempfile.mkdtemp(dir = "/var/tmp", prefix = "tmp"), imgname)
- shutil.copyfile(os_image, rtimage)
-
- finally:
- imgloop.cleanup()
- shutil.rmtree(tmpoutdir, ignore_errors = True)
- shutil.rmtree(imgmnt, ignore_errors = True)
-
- return rtimage
diff --git a/scripts/lib/mic/plugins/imager/loop_plugin.py b/scripts/lib/mic/plugins/imager/loop_plugin.py
deleted file mode 100644
index 2a05b3c238..0000000000
--- a/scripts/lib/mic/plugins/imager/loop_plugin.py
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import tempfile
-
-from mic import chroot, msger
-from mic.utils import misc, fs_related, errors, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.imager.loop import LoopImageCreator, load_mountpoints
-
-from mic.pluginbase import ImagerPlugin
-class LoopPlugin(ImagerPlugin):
- name = 'loop'
-
- @classmethod
- @cmdln.option("--compress-disk-image", dest="compress_image",
- type='choice', choices=("gz", "bz2"), default=None,
- help="Same with --compress-image")
- # alias to compress-image for compatibility
- @cmdln.option("--compress-image", dest="compress_image",
- type='choice', choices=("gz", "bz2"), default=None,
- help="Compress all loop images with 'gz' or 'bz2'")
- @cmdln.option("--shrink", action='store_true', default=False,
- help="Whether to shrink loop images to minimal size")
- def do_create(self, subcmd, opts, *args):
- """${cmd_name}: create loop image
-
- Usage:
- ${name} ${cmd_name} <ksfile> [OPTS]
-
- ${cmd_option_list}
- """
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- creatoropts = configmgr.create
- ksconf = args[0]
-
- if creatoropts['runtime'] == "bootstrap":
- configmgr._ksconf = ksconf
- rt_util.bootstrap_mic()
-
- recording_pkgs = []
- if len(creatoropts['record_pkgs']) > 0:
- recording_pkgs = creatoropts['record_pkgs']
-
- if creatoropts['release'] is not None:
- if 'name' not in recording_pkgs:
- recording_pkgs.append('name')
- if 'vcs' not in recording_pkgs:
- recording_pkgs.append('vcs')
-
- configmgr._ksconf = ksconf
-
- # Called After setting the configmgr._ksconf
- # as the creatoropts['name'] is reset there.
- if creatoropts['release'] is not None:
- creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'],
- creatoropts['release'],
- creatoropts['name'])
- # try to find the pkgmgr
- pkgmgr = None
- backends = pluginmgr.get_plugins('backend')
- if 'auto' == creatoropts['pkgmgr']:
- for key in configmgr.prefer_backends:
- if key in backends:
- pkgmgr = backends[key]
- break
- else:
- for key in backends.keys():
- if key == creatoropts['pkgmgr']:
- pkgmgr = backends[key]
- break
-
- if not pkgmgr:
- raise errors.CreatorError("Can't find backend: %s, "
- "available choices: %s" %
- (creatoropts['pkgmgr'],
- ','.join(backends.keys())))
-
- creator = LoopImageCreator(creatoropts,
- pkgmgr,
- opts.compress_image,
- opts.shrink)
-
- if len(recording_pkgs) > 0:
- creator._recording_pkgs = recording_pkgs
-
- image_names = [creator.name + ".img"]
- image_names.extend(creator.get_image_names())
- self.check_image_exists(creator.destdir,
- creator.pack_to,
- image_names,
- creatoropts['release'])
-
- try:
- creator.check_depend_tools()
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- creator.configure(creatoropts["repomd"])
- creator.copy_kernel()
- creator.unmount()
- creator.package(creatoropts["outdir"])
-
- if creatoropts['release'] is not None:
- creator.release_output(ksconf,
- creatoropts['outdir'],
- creatoropts['release'])
- creator.print_outimage_info()
-
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- msger.info("Finished.")
- return 0
-
- @classmethod
- def _do_chroot_tar(cls, target, cmd=[]):
- mountfp_xml = os.path.splitext(target)[0] + '.xml'
- if not os.path.exists(mountfp_xml):
- raise errors.CreatorError("No mount point file found for this tar "
- "image, please check %s" % mountfp_xml)
-
- import tarfile
- tar = tarfile.open(target, 'r')
- tmpdir = misc.mkdtemp()
- tar.extractall(path=tmpdir)
- tar.close()
-
- mntdir = misc.mkdtemp()
-
- loops = []
- for (mp, label, name, size, fstype) in load_mountpoints(mountfp_xml):
- if fstype in ("ext2", "ext3", "ext4"):
- myDiskMount = fs_related.ExtDiskMount
- elif fstype == "btrfs":
- myDiskMount = fs_related.BtrfsDiskMount
- elif fstype in ("vfat", "msdos"):
- myDiskMount = fs_related.VfatDiskMount
- else:
- msger.error("Cannot support fstype: %s" % fstype)
-
- name = os.path.join(tmpdir, name)
- size = size * 1024L * 1024L
- loop = myDiskMount(fs_related.SparseLoopbackDisk(name, size),
- os.path.join(mntdir, mp.lstrip('/')),
- fstype, size, label)
-
- try:
- msger.verbose("Mount %s to %s" % (mp, mntdir + mp))
- fs_related.makedirs(os.path.join(mntdir, mp.lstrip('/')))
- loop.mount()
-
- except:
- loop.cleanup()
- for lp in reversed(loops):
- chroot.cleanup_after_chroot("img", lp, None, mntdir)
-
- shutil.rmtree(tmpdir, ignore_errors=True)
- raise
-
- loops.append(loop)
-
- try:
- if len(cmd) != 0:
- cmdline = "/usr/bin/env HOME=/root " + ' '.join(cmd)
- else:
- cmdline = "/usr/bin/env HOME=/root /bin/bash"
- chroot.chroot(mntdir, None, cmdline)
- except:
- raise errors.CreatorError("Failed to chroot to %s." % target)
- finally:
- for loop in reversed(loops):
- chroot.cleanup_after_chroot("img", loop, None, mntdir)
-
- shutil.rmtree(tmpdir, ignore_errors=True)
-
- @classmethod
- def do_chroot(cls, target, cmd=[]):
- if target.endswith('.tar'):
- import tarfile
- if tarfile.is_tarfile(target):
- LoopPlugin._do_chroot_tar(target, cmd)
- return
- else:
- raise errors.CreatorError("damaged tarball for loop images")
-
- img = target
- imgsize = misc.get_file_size(img) * 1024L * 1024L
- imgtype = misc.get_image_type(img)
- if imgtype == "btrfsimg":
- fstype = "btrfs"
- myDiskMount = fs_related.BtrfsDiskMount
- elif imgtype in ("ext3fsimg", "ext4fsimg"):
- fstype = imgtype[:4]
- myDiskMount = fs_related.ExtDiskMount
- else:
- raise errors.CreatorError("Unsupported filesystem type: %s" \
- % imgtype)
-
- extmnt = misc.mkdtemp()
- extloop = myDiskMount(fs_related.SparseLoopbackDisk(img, imgsize),
- extmnt,
- fstype,
- 4096,
- "%s label" % fstype)
- try:
- extloop.mount()
-
- except errors.MountError:
- extloop.cleanup()
- shutil.rmtree(extmnt, ignore_errors=True)
- raise
-
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", extmnt)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(extmnt, None, cmdline)
- except:
- raise errors.CreatorError("Failed to chroot to %s." % img)
- finally:
- chroot.cleanup_after_chroot("img", extloop, None, extmnt)
-
- @classmethod
- def do_unpack(cls, srcimg):
- image = os.path.join(tempfile.mkdtemp(dir="/var/tmp", prefix="tmp"),
- "target.img")
- msger.info("Copying file system ...")
- shutil.copyfile(srcimg, image)
- return image
diff --git a/scripts/lib/mic/plugins/imager/raw_plugin.py b/scripts/lib/mic/plugins/imager/raw_plugin.py
deleted file mode 100644
index f9625b87e8..0000000000
--- a/scripts/lib/mic/plugins/imager/raw_plugin.py
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import shutil
-import re
-import tempfile
-
-from mic import chroot, msger
-from mic.utils import misc, fs_related, errors, runner, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
-
-import mic.imager.raw as raw
-
-from mic.pluginbase import ImagerPlugin
-class RawPlugin(ImagerPlugin):
- name = 'raw'
-
- @classmethod
- @cmdln.option("--compress-disk-image", dest="compress_image", type='choice',
- choices=("gz", "bz2"), default=None,
- help="Same with --compress-image")
- @cmdln.option("--compress-image", dest="compress_image", type='choice',
- choices=("gz", "bz2"), default = None,
- help="Compress all raw images before package")
- @cmdln.option("--generate-bmap", action="store_true", default = None,
- help="also generate the block map file")
- @cmdln.option("--fstab-entry", dest="fstab_entry", type='choice',
- choices=("name", "uuid"), default="uuid",
- help="Set fstab entry, 'name' means using device names, "
- "'uuid' means using filesystem uuid")
- def do_create(self, subcmd, opts, *args):
- """${cmd_name}: create raw image
-
- Usage:
- ${name} ${cmd_name} <ksfile> [OPTS]
-
- ${cmd_option_list}
- """
-
- if len(args) != 1:
- raise errors.Usage("Extra arguments given")
-
- creatoropts = configmgr.create
- ksconf = args[0]
-
- if creatoropts['runtime'] == "bootstrap":
- configmgr._ksconf = ksconf
- rt_util.bootstrap_mic()
-
- recording_pkgs = []
- if len(creatoropts['record_pkgs']) > 0:
- recording_pkgs = creatoropts['record_pkgs']
-
- if creatoropts['release'] is not None:
- if 'name' not in recording_pkgs:
- recording_pkgs.append('name')
- if 'vcs' not in recording_pkgs:
- recording_pkgs.append('vcs')
-
- configmgr._ksconf = ksconf
-
- # Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
- if creatoropts['release'] is not None:
- creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])
-
- # try to find the pkgmgr
- pkgmgr = None
- backends = pluginmgr.get_plugins('backend')
- if 'auto' == creatoropts['pkgmgr']:
- for key in configmgr.prefer_backends:
- if key in backends:
- pkgmgr = backends[key]
- break
- else:
- for key in backends.keys():
- if key == creatoropts['pkgmgr']:
- pkgmgr = backends[key]
- break
-
- if not pkgmgr:
- raise errors.CreatorError("Can't find backend: %s, "
- "available choices: %s" %
- (creatoropts['pkgmgr'],
- ','.join(backends.keys())))
-
- creator = raw.RawImageCreator(creatoropts, pkgmgr, opts.compress_image,
- opts.generate_bmap, opts.fstab_entry)
-
- if len(recording_pkgs) > 0:
- creator._recording_pkgs = recording_pkgs
-
- images = ["%s-%s.raw" % (creator.name, disk_name)
- for disk_name in creator.get_disk_names()]
- self.check_image_exists(creator.destdir,
- creator.pack_to,
- images,
- creatoropts['release'])
-
- try:
- creator.check_depend_tools()
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- creator.configure(creatoropts["repomd"])
- creator.copy_kernel()
- creator.unmount()
- creator.generate_bmap()
- creator.package(creatoropts["outdir"])
- if creatoropts['release'] is not None:
- creator.release_output(ksconf, creatoropts['outdir'], creatoropts['release'])
- creator.print_outimage_info()
-
- except errors.CreatorError:
- raise
- finally:
- creator.cleanup()
-
- msger.info("Finished.")
- return 0
-
- @classmethod
- def do_chroot(cls, target, cmd=[]):
- img = target
- imgsize = misc.get_file_size(img) * 1024L * 1024L
- partedcmd = fs_related.find_binary_path("parted")
- disk = fs_related.SparseLoopbackDisk(img, imgsize)
- imgmnt = misc.mkdtemp()
- imgloop = PartitionedMount(imgmnt, skipformat = True)
- imgloop.add_disk('/dev/sdb', disk)
- img_fstype = "ext3"
-
- msger.info("Partition Table:")
- partnum = []
- for line in runner.outs([partedcmd, "-s", img, "print"]).splitlines():
- # no use strip to keep line output here
- if "Number" in line:
- msger.raw(line)
- if line.strip() and line.strip()[0].isdigit():
- partnum.append(line.strip()[0])
- msger.raw(line)
-
- rootpart = None
- if len(partnum) > 1:
- rootpart = msger.choice("please choose root partition", partnum)
-
- # Check the partitions from raw disk.
- # if choose root part, the mark it as mounted
- if rootpart:
- root_mounted = True
- else:
- root_mounted = False
- partition_mounts = 0
- for line in runner.outs([partedcmd,"-s",img,"unit","B","print"]).splitlines():
- line = line.strip()
-
- # Lines that start with number are the partitions,
- # because parted can be translated we can't refer to any text lines.
- if not line or not line[0].isdigit():
- continue
-
- # Some vars have extra , as list seperator.
- line = line.replace(",","")
-
- # Example of parted output lines that are handled:
- # Number Start End Size Type File system Flags
- # 1 512B 3400000511B 3400000000B primary
- # 2 3400531968B 3656384511B 255852544B primary linux-swap(v1)
- # 3 3656384512B 3720347647B 63963136B primary fat16 boot, lba
-
- partition_info = re.split("\s+",line)
-
- size = partition_info[3].split("B")[0]
-
- if len(partition_info) < 6 or partition_info[5] in ["boot"]:
- # No filesystem can be found from partition line. Assuming
- # btrfs, because that is the only MeeGo fs that parted does
- # not recognize properly.
- # TODO: Can we make better assumption?
- fstype = "btrfs"
- elif partition_info[5] in ["ext2","ext3","ext4","btrfs"]:
- fstype = partition_info[5]
- elif partition_info[5] in ["fat16","fat32"]:
- fstype = "vfat"
- elif "swap" in partition_info[5]:
- fstype = "swap"
- else:
- raise errors.CreatorError("Could not recognize partition fs type '%s'." % partition_info[5])
-
- if rootpart and rootpart == line[0]:
- mountpoint = '/'
- elif not root_mounted and fstype in ["ext2","ext3","ext4","btrfs"]:
- # TODO: Check that this is actually the valid root partition from /etc/fstab
- mountpoint = "/"
- root_mounted = True
- elif fstype == "swap":
- mountpoint = "swap"
- else:
- # TODO: Assing better mount points for the rest of the partitions.
- partition_mounts += 1
- mountpoint = "/media/partition_%d" % partition_mounts
-
- if "boot" in partition_info:
- boot = True
- else:
- boot = False
-
- msger.verbose("Size: %s Bytes, fstype: %s, mountpoint: %s, boot: %s" % (size, fstype, mountpoint, boot))
- # TODO: add_partition should take bytes as size parameter.
- imgloop.add_partition((int)(size)/1024/1024, "/dev/sdb", mountpoint, fstype = fstype, boot = boot)
-
- try:
- imgloop.mount()
-
- except errors.MountError:
- imgloop.cleanup()
- raise
-
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", imgmnt)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(imgmnt, None, cmdline)
- except:
- raise errors.CreatorError("Failed to chroot to %s." %img)
- finally:
- chroot.cleanup_after_chroot("img", imgloop, None, imgmnt)
-
- @classmethod
- def do_unpack(cls, srcimg):
- srcimgsize = (misc.get_file_size(srcimg)) * 1024L * 1024L
- srcmnt = misc.mkdtemp("srcmnt")
- disk = fs_related.SparseLoopbackDisk(srcimg, srcimgsize)
- srcloop = PartitionedMount(srcmnt, skipformat = True)
-
- srcloop.add_disk('/dev/sdb', disk)
- srcloop.add_partition(srcimgsize/1024/1024, "/dev/sdb", "/", "ext3", boot=False)
- try:
- srcloop.mount()
-
- except errors.MountError:
- srcloop.cleanup()
- raise
-
- image = os.path.join(tempfile.mkdtemp(dir = "/var/tmp", prefix = "tmp"), "target.img")
- args = ['dd', "if=%s" % srcloop.partitions[0]['device'], "of=%s" % image]
-
- msger.info("`dd` image ...")
- rc = runner.show(args)
- srcloop.cleanup()
- shutil.rmtree(os.path.dirname(srcmnt), ignore_errors = True)
-
- if rc != 0:
- raise errors.CreatorError("Failed to dd")
- else:
- return image
diff --git a/scripts/lib/mic/rt_util.py b/scripts/lib/mic/rt_util.py
deleted file mode 100644
index 2a31f4a218..0000000000
--- a/scripts/lib/mic/rt_util.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import sys
-import glob
-import re
-import shutil
-import subprocess
-
-from mic import bootstrap, msger
-from mic.conf import configmgr
-from mic.utils import errors, proxy
-from mic.utils.fs_related import find_binary_path, makedirs
-from mic.chroot import setup_chrootenv, cleanup_chrootenv
-
-expath = lambda p: os.path.abspath(os.path.expanduser(p))
-
-def bootstrap_mic(argv=None):
-
-
- def mychroot():
- os.chroot(rootdir)
- os.chdir(cwd)
-
- # by default, sys.argv is used to run mic in bootstrap
- if not argv:
- argv = sys.argv
- if argv[0] not in ('/usr/bin/mic', 'mic'):
- argv[0] = '/usr/bin/mic'
-
- cropts = configmgr.create
- bsopts = configmgr.bootstrap
- distro = bsopts['distro_name'].lower()
-
- rootdir = bsopts['rootdir']
- pkglist = bsopts['packages']
- cwd = os.getcwd()
-
- # create bootstrap and run mic in bootstrap
- bsenv = bootstrap.Bootstrap(rootdir, distro, cropts['arch'])
- bsenv.logfile = cropts['logfile']
- # rootdir is regenerated as a temp dir
- rootdir = bsenv.rootdir
-
- if 'optional' in bsopts:
- optlist = bsopts['optional']
- else:
- optlist = []
-
- try:
- msger.info("Creating %s bootstrap ..." % distro)
- bsenv.create(cropts['repomd'], pkglist, optlist)
-
- # bootstrap is relocated under "bootstrap"
- if os.path.exists(os.path.join(rootdir, "bootstrap")):
- rootdir = os.path.join(rootdir, "bootstrap")
-
- bsenv.dirsetup(rootdir)
- sync_mic(rootdir)
-
- #FIXME: sync the ks file to bootstrap
- if "/" == os.path.dirname(os.path.abspath(configmgr._ksconf)):
- safecopy(configmgr._ksconf, rootdir)
-
- msger.info("Start mic in bootstrap: %s\n" % rootdir)
- bindmounts = get_bindmounts(cropts)
- ret = bsenv.run(argv, cwd, rootdir, bindmounts)
-
- except errors.BootstrapError, err:
- msger.warning('\n%s' % err)
- if msger.ask("Switch to native mode and continue?"):
- return
- raise
- except RuntimeError, err:
- #change exception type but keep the trace back
- value, tb = sys.exc_info()[1:]
- raise errors.BootstrapError, value, tb
- else:
- sys.exit(ret)
- finally:
- bsenv.cleanup()
-
-def get_bindmounts(cropts):
- binddirs = [
- os.getcwd(),
- cropts['tmpdir'],
- cropts['cachedir'],
- cropts['outdir'],
- cropts['local_pkgs_path'],
- ]
- bindfiles = [
- cropts['logfile'],
- configmgr._ksconf,
- ]
-
- for lrepo in cropts['localrepos']:
- binddirs.append(lrepo)
-
- bindlist = map(expath, filter(None, binddirs))
- bindlist += map(os.path.dirname, map(expath, filter(None, bindfiles)))
- bindlist = sorted(set(bindlist))
- bindmounts = ';'.join(bindlist)
- return bindmounts
-
-
-def get_mic_binpath():
- fp = None
- try:
- import pkg_resources # depends on 'setuptools'
- except ImportError:
- pass
- else:
- dist = pkg_resources.get_distribution('mic')
- # the real script is under EGG_INFO/scripts
- if dist.has_metadata('scripts/mic'):
- fp = os.path.join(dist.egg_info, "scripts/mic")
-
- if fp:
- return fp
-
- # not found script if 'flat' egg installed
- try:
- return find_binary_path('mic')
- except errors.CreatorError:
- raise errors.BootstrapError("Can't find mic binary in host OS")
-
-
-def get_mic_modpath():
- try:
- import mic
- except ImportError:
- raise errors.BootstrapError("Can't find mic module in host OS")
- path = os.path.abspath(mic.__file__)
- return os.path.dirname(path)
-
-def get_mic_libpath():
- # TBD: so far mic lib path is hard coded
- return "/usr/lib/mic"
-
-# the hard code path is prepared for bootstrap
-def sync_mic(bootstrap, binpth = '/usr/bin/mic',
- libpth='/usr/lib',
- pylib = '/usr/lib/python2.7/site-packages',
- conf = '/etc/mic/mic.conf'):
- _path = lambda p: os.path.join(bootstrap, p.lstrip('/'))
-
- micpaths = {
- 'binpth': get_mic_binpath(),
- 'libpth': get_mic_libpath(),
- 'pylib': get_mic_modpath(),
- 'conf': '/etc/mic/mic.conf',
- }
-
- if not os.path.exists(_path(pylib)):
- pyptn = '/usr/lib/python?.?/site-packages'
- pylibs = glob.glob(_path(pyptn))
- if pylibs:
- pylib = pylibs[0].replace(bootstrap, '')
- else:
- raise errors.BootstrapError("Can't find python site dir in: %s" %
- bootstrap)
-
- for key, value in micpaths.items():
- try:
- safecopy(value, _path(eval(key)), False, ["*.pyc", "*.pyo"])
- except (OSError, IOError), err:
- raise errors.BootstrapError(err)
-
- # auto select backend
- conf_str = file(_path(conf)).read()
- conf_str = re.sub("pkgmgr\s*=\s*.*", "pkgmgr=auto", conf_str)
- with open(_path(conf), 'w') as wf:
- wf.write(conf_str)
-
- # chmod +x /usr/bin/mic
- os.chmod(_path(binpth), 0777)
-
- # correct python interpreter
- mic_cont = file(_path(binpth)).read()
- mic_cont = "#!/usr/bin/python\n" + mic_cont
- with open(_path(binpth), 'w') as wf:
- wf.write(mic_cont)
-
-
-def safecopy(src, dst, symlinks=False, ignore_ptns=()):
- if os.path.isdir(src):
- if os.path.isdir(dst):
- dst = os.path.join(dst, os.path.basename(src))
- if os.path.exists(dst):
- shutil.rmtree(dst, ignore_errors=True)
-
- src = src.rstrip('/')
- # check common prefix to ignore copying itself
- if dst.startswith(src + '/'):
- ignore_ptns = list(ignore_ptns) + [ os.path.basename(src) ]
-
- ignores = shutil.ignore_patterns(*ignore_ptns)
- try:
- shutil.copytree(src, dst, symlinks, ignores)
- except (OSError, IOError):
- shutil.rmtree(dst, ignore_errors=True)
- raise
- else:
- if not os.path.isdir(dst):
- makedirs(os.path.dirname(dst))
-
- shutil.copy2(src, dst)
diff --git a/scripts/lib/mic/utils/BmapCreate.py b/scripts/lib/mic/utils/BmapCreate.py
deleted file mode 100644
index 65b19a5f46..0000000000
--- a/scripts/lib/mic/utils/BmapCreate.py
+++ /dev/null
@@ -1,298 +0,0 @@
-""" This module implements the block map (bmap) creation functionality and
-provides the corresponding API in form of the 'BmapCreate' class.
-
-The idea is that while images files may generally be very large (e.g., 4GiB),
-they may nevertheless contain only little real data, e.g., 512MiB. This data
-are files, directories, file-system meta-data, partition table, etc. When
-copying the image to the target device, you do not have to copy all the 4GiB of
-data, you can copy only 512MiB of it, which is 4 times less, so copying should
-presumably be 4 times faster.
-
-The block map file is an XML file which contains a list of blocks which have to
-be copied to the target device. The other blocks are not used and there is no
-need to copy them. The XML file also contains some additional information like
-block size, image size, count of mapped blocks, etc. There are also many
-commentaries, so it is human-readable.
-
-The image has to be a sparse file. Generally, this means that when you generate
-this image file, you should start with a huge sparse file which contains a
-single hole spanning the entire file. Then you should partition it, write all
-the data (probably by means of loop-back mounting the image or parts of it),
-etc. The end result should be a sparse file where mapped areas represent useful
-parts of the image and holes represent useless parts of the image, which do not
-have to be copied when copying the image to the target device.
-
-This module uses the FIBMAP ioctl to detect holes. """
-
-# Disable the following pylint recommendations:
-# * Too many instance attributes - R0902
-# * Too few public methods - R0903
-# pylint: disable=R0902,R0903
-
-import hashlib
-from mic.utils.misc import human_size
-from mic.utils import Fiemap
-
-# The bmap format version we generate
-SUPPORTED_BMAP_VERSION = "1.3"
-
-_BMAP_START_TEMPLATE = \
-"""<?xml version="1.0" ?>
-<!-- This file contains the block map for an image file, which is basically
- a list of useful (mapped) block numbers in the image file. In other words,
- it lists only those blocks which contain data (boot sector, partition
- table, file-system metadata, files, directories, extents, etc). These
- blocks have to be copied to the target device. The other blocks do not
- contain any useful data and do not have to be copied to the target
- device.
-
- The block map an optimization which allows to copy or flash the image to
- the image quicker than copying of flashing the entire image. This is
- because with bmap less data is copied: <MappedBlocksCount> blocks instead
- of <BlocksCount> blocks.
-
- Besides the machine-readable data, this file contains useful commentaries
- which contain human-readable information like image size, percentage of
- mapped data, etc.
-
- The 'version' attribute is the block map file format version in the
- 'major.minor' format. The version major number is increased whenever an
- incompatible block map format change is made. The minor number changes
- in case of minor backward-compatible changes. -->
-
-<bmap version="%s">
- <!-- Image size in bytes: %s -->
- <ImageSize> %u </ImageSize>
-
- <!-- Size of a block in bytes -->
- <BlockSize> %u </BlockSize>
-
- <!-- Count of blocks in the image file -->
- <BlocksCount> %u </BlocksCount>
-
-"""
-
-class Error(Exception):
- """ A class for exceptions generated by this module. We currently support
- only one type of exceptions, and we basically throw human-readable problem
- description in case of errors. """
- pass
-
-class BmapCreate:
- """ This class implements the bmap creation functionality. To generate a
- bmap for an image (which is supposedly a sparse file), you should first
- create an instance of 'BmapCreate' and provide:
-
- * full path or a file-like object of the image to create bmap for
- * full path or a file object to use for writing the results to
-
- Then you should invoke the 'generate()' method of this class. It will use
- the FIEMAP ioctl to generate the bmap. """
-
- def _open_image_file(self):
- """ Open the image file. """
-
- try:
- self._f_image = open(self._image_path, 'rb')
- except IOError as err:
- raise Error("cannot open image file '%s': %s" \
- % (self._image_path, err))
-
- self._f_image_needs_close = True
-
- def _open_bmap_file(self):
- """ Open the bmap file. """
-
- try:
- self._f_bmap = open(self._bmap_path, 'w+')
- except IOError as err:
- raise Error("cannot open bmap file '%s': %s" \
- % (self._bmap_path, err))
-
- self._f_bmap_needs_close = True
-
- def __init__(self, image, bmap):
- """ Initialize a class instance:
- * image - full path or a file-like object of the image to create bmap
- for
- * bmap - full path or a file object to use for writing the resulting
- bmap to """
-
- self.image_size = None
- self.image_size_human = None
- self.block_size = None
- self.blocks_cnt = None
- self.mapped_cnt = None
- self.mapped_size = None
- self.mapped_size_human = None
- self.mapped_percent = None
-
- self._mapped_count_pos1 = None
- self._mapped_count_pos2 = None
- self._sha1_pos = None
-
- self._f_image_needs_close = False
- self._f_bmap_needs_close = False
-
- if hasattr(image, "read"):
- self._f_image = image
- self._image_path = image.name
- else:
- self._image_path = image
- self._open_image_file()
-
- if hasattr(bmap, "read"):
- self._f_bmap = bmap
- self._bmap_path = bmap.name
- else:
- self._bmap_path = bmap
- self._open_bmap_file()
-
- self.fiemap = Fiemap.Fiemap(self._f_image)
-
- self.image_size = self.fiemap.image_size
- self.image_size_human = human_size(self.image_size)
- if self.image_size == 0:
- raise Error("cannot generate bmap for zero-sized image file '%s'" \
- % self._image_path)
-
- self.block_size = self.fiemap.block_size
- self.blocks_cnt = self.fiemap.blocks_cnt
-
- def _bmap_file_start(self):
- """ A helper function which generates the starting contents of the
- block map file: the header comment, image size, block size, etc. """
-
- # We do not know the amount of mapped blocks at the moment, so just put
- # whitespaces instead of real numbers. Assume the longest possible
- # numbers.
- mapped_count = ' ' * len(str(self.image_size))
- mapped_size_human = ' ' * len(self.image_size_human)
-
- xml = _BMAP_START_TEMPLATE \
- % (SUPPORTED_BMAP_VERSION, self.image_size_human,
- self.image_size, self.block_size, self.blocks_cnt)
- xml += " <!-- Count of mapped blocks: "
-
- self._f_bmap.write(xml)
- self._mapped_count_pos1 = self._f_bmap.tell()
-
- # Just put white-spaces instead of real information about mapped blocks
- xml = "%s or %.1f -->\n" % (mapped_size_human, 100.0)
- xml += " <MappedBlocksCount> "
-
- self._f_bmap.write(xml)
- self._mapped_count_pos2 = self._f_bmap.tell()
-
- xml = "%s </MappedBlocksCount>\n\n" % mapped_count
-
- # pylint: disable=C0301
- xml += " <!-- The checksum of this bmap file. When it is calculated, the value of\n"
- xml += " the SHA1 checksum has be zeoro (40 ASCII \"0\" symbols). -->\n"
- xml += " <BmapFileSHA1> "
-
- self._f_bmap.write(xml)
- self._sha1_pos = self._f_bmap.tell()
-
- xml = "0" * 40 + " </BmapFileSHA1>\n\n"
- xml += " <!-- The block map which consists of elements which may either be a\n"
- xml += " range of blocks or a single block. The 'sha1' attribute (if present)\n"
- xml += " is the SHA1 checksum of this blocks range. -->\n"
- xml += " <BlockMap>\n"
- # pylint: enable=C0301
-
- self._f_bmap.write(xml)
-
- def _bmap_file_end(self):
- """ A helper function which generates the final parts of the block map
- file: the ending tags and the information about the amount of mapped
- blocks. """
-
- xml = " </BlockMap>\n"
- xml += "</bmap>\n"
-
- self._f_bmap.write(xml)
-
- self._f_bmap.seek(self._mapped_count_pos1)
- self._f_bmap.write("%s or %.1f%%" % \
- (self.mapped_size_human, self.mapped_percent))
-
- self._f_bmap.seek(self._mapped_count_pos2)
- self._f_bmap.write("%u" % self.mapped_cnt)
-
- self._f_bmap.seek(0)
- sha1 = hashlib.sha1(self._f_bmap.read()).hexdigest()
- self._f_bmap.seek(self._sha1_pos)
- self._f_bmap.write("%s" % sha1)
-
- def _calculate_sha1(self, first, last):
- """ A helper function which calculates SHA1 checksum for the range of
- blocks of the image file: from block 'first' to block 'last'. """
-
- start = first * self.block_size
- end = (last + 1) * self.block_size
-
- self._f_image.seek(start)
- hash_obj = hashlib.new("sha1")
-
- chunk_size = 1024*1024
- to_read = end - start
- read = 0
-
- while read < to_read:
- if read + chunk_size > to_read:
- chunk_size = to_read - read
- chunk = self._f_image.read(chunk_size)
- hash_obj.update(chunk)
- read += chunk_size
-
- return hash_obj.hexdigest()
-
- def generate(self, include_checksums = True):
- """ Generate bmap for the image file. If 'include_checksums' is 'True',
- also generate SHA1 checksums for block ranges. """
-
- # Save image file position in order to restore it at the end
- image_pos = self._f_image.tell()
-
- self._bmap_file_start()
-
- # Generate the block map and write it to the XML block map
- # file as we go.
- self.mapped_cnt = 0
- for first, last in self.fiemap.get_mapped_ranges(0, self.blocks_cnt):
- self.mapped_cnt += last - first + 1
- if include_checksums:
- sha1 = self._calculate_sha1(first, last)
- sha1 = " sha1=\"%s\"" % sha1
- else:
- sha1 = ""
-
- if first != last:
- self._f_bmap.write(" <Range%s> %s-%s </Range>\n" \
- % (sha1, first, last))
- else:
- self._f_bmap.write(" <Range%s> %s </Range>\n" \
- % (sha1, first))
-
- self.mapped_size = self.mapped_cnt * self.block_size
- self.mapped_size_human = human_size(self.mapped_size)
- self.mapped_percent = (self.mapped_cnt * 100.0) / self.blocks_cnt
-
- self._bmap_file_end()
-
- try:
- self._f_bmap.flush()
- except IOError as err:
- raise Error("cannot flush the bmap file '%s': %s" \
- % (self._bmap_path, err))
-
- self._f_image.seek(image_pos)
-
- def __del__(self):
- """ The class destructor which closes the opened files. """
-
- if self._f_image_needs_close:
- self._f_image.close()
- if self._f_bmap_needs_close:
- self._f_bmap.close()
diff --git a/scripts/lib/mic/utils/Fiemap.py b/scripts/lib/mic/utils/Fiemap.py
deleted file mode 100644
index f2db6ff0b8..0000000000
--- a/scripts/lib/mic/utils/Fiemap.py
+++ /dev/null
@@ -1,252 +0,0 @@
-""" This module implements python API for the FIEMAP ioctl. The FIEMAP ioctl
-allows to find holes and mapped areas in a file. """
-
-# Note, a lot of code in this module is not very readable, because it deals
-# with the rather complex FIEMAP ioctl. To understand the code, you need to
-# know the FIEMAP interface, which is documented in the
-# Documentation/filesystems/fiemap.txt file in the Linux kernel sources.
-
-# Disable the following pylint recommendations:
-# * Too many instance attributes (R0902)
-# pylint: disable=R0902
-
-import os
-import struct
-import array
-import fcntl
-from mic.utils.misc import get_block_size
-
-# Format string for 'struct fiemap'
-_FIEMAP_FORMAT = "=QQLLLL"
-# sizeof(struct fiemap)
-_FIEMAP_SIZE = struct.calcsize(_FIEMAP_FORMAT)
-# Format string for 'struct fiemap_extent'
-_FIEMAP_EXTENT_FORMAT = "=QQQQQLLLL"
-# sizeof(struct fiemap_extent)
-_FIEMAP_EXTENT_SIZE = struct.calcsize(_FIEMAP_EXTENT_FORMAT)
-# The FIEMAP ioctl number
-_FIEMAP_IOCTL = 0xC020660B
-
-# Minimum buffer which is required for 'class Fiemap' to operate
-MIN_BUFFER_SIZE = _FIEMAP_SIZE + _FIEMAP_EXTENT_SIZE
-# The default buffer size for 'class Fiemap'
-DEFAULT_BUFFER_SIZE = 256 * 1024
-
-class Error(Exception):
- """ A class for exceptions generated by this module. We currently support
- only one type of exceptions, and we basically throw human-readable problem
- description in case of errors. """
- pass
-
-class Fiemap:
- """ This class provides API to the FIEMAP ioctl. Namely, it allows to
- iterate over all mapped blocks and over all holes. """
-
- def _open_image_file(self):
- """ Open the image file. """
-
- try:
- self._f_image = open(self._image_path, 'rb')
- except IOError as err:
- raise Error("cannot open image file '%s': %s" \
- % (self._image_path, err))
-
- self._f_image_needs_close = True
-
- def __init__(self, image, buf_size = DEFAULT_BUFFER_SIZE):
- """ Initialize a class instance. The 'image' argument is full path to
- the file to operate on, or a file object to operate on.
-
- The 'buf_size' argument is the size of the buffer for 'struct
- fiemap_extent' elements which will be used when invoking the FIEMAP
- ioctl. The larger is the buffer, the less times the FIEMAP ioctl will
- be invoked. """
-
- self._f_image_needs_close = False
-
- if hasattr(image, "fileno"):
- self._f_image = image
- self._image_path = image.name
- else:
- self._image_path = image
- self._open_image_file()
-
- # Validate 'buf_size'
- if buf_size < MIN_BUFFER_SIZE:
- raise Error("too small buffer (%d bytes), minimum is %d bytes" \
- % (buf_size, MIN_BUFFER_SIZE))
-
- # How many 'struct fiemap_extent' elements fit the buffer
- buf_size -= _FIEMAP_SIZE
- self._fiemap_extent_cnt = buf_size / _FIEMAP_EXTENT_SIZE
- self._buf_size = self._fiemap_extent_cnt * _FIEMAP_EXTENT_SIZE
- self._buf_size += _FIEMAP_SIZE
-
- # Allocate a mutable buffer for the FIEMAP ioctl
- self._buf = array.array('B', [0] * self._buf_size)
-
- self.image_size = os.fstat(self._f_image.fileno()).st_size
-
- try:
- self.block_size = get_block_size(self._f_image)
- except IOError as err:
- raise Error("cannot get block size for '%s': %s" \
- % (self._image_path, err))
-
- self.blocks_cnt = self.image_size + self.block_size - 1
- self.blocks_cnt /= self.block_size
-
- # Synchronize the image file to make sure FIEMAP returns correct values
- try:
- self._f_image.flush()
- except IOError as err:
- raise Error("cannot flush image file '%s': %s" \
- % (self._image_path, err))
- try:
- os.fsync(self._f_image.fileno()),
- except OSError as err:
- raise Error("cannot synchronize image file '%s': %s " \
- % (self._image_path, err.strerror))
-
- # Check if the FIEMAP ioctl is supported
- self.block_is_mapped(0)
-
- def __del__(self):
- """ The class destructor which closes the opened files. """
-
- if self._f_image_needs_close:
- self._f_image.close()
-
- def _invoke_fiemap(self, block, count):
- """ Invoke the FIEMAP ioctl for 'count' blocks of the file starting from
- block number 'block'.
-
- The full result of the operation is stored in 'self._buf' on exit.
- Returns the unpacked 'struct fiemap' data structure in form of a python
- list (just like 'struct.upack()'). """
-
- if block < 0 or block >= self.blocks_cnt:
- raise Error("bad block number %d, should be within [0, %d]" \
- % (block, self.blocks_cnt))
-
- # Initialize the 'struct fiemap' part of the buffer
- struct.pack_into(_FIEMAP_FORMAT, self._buf, 0, block * self.block_size,
- count * self.block_size, 0, 0,
- self._fiemap_extent_cnt, 0)
-
- try:
- fcntl.ioctl(self._f_image, _FIEMAP_IOCTL, self._buf, 1)
- except IOError as err:
- error_msg = "the FIEMAP ioctl failed for '%s': %s" \
- % (self._image_path, err)
- if err.errno == os.errno.EPERM or err.errno == os.errno.EACCES:
- # The FIEMAP ioctl was added in kernel version 2.6.28 in 2008
- error_msg += " (looks like your kernel does not support FIEMAP)"
-
- raise Error(error_msg)
-
- return struct.unpack(_FIEMAP_FORMAT, self._buf[:_FIEMAP_SIZE])
-
- def block_is_mapped(self, block):
- """ This function returns 'True' if block number 'block' of the image
- file is mapped and 'False' otherwise. """
-
- struct_fiemap = self._invoke_fiemap(block, 1)
-
- # The 3rd element of 'struct_fiemap' is the 'fm_mapped_extents' field.
- # If it contains zero, the block is not mapped, otherwise it is
- # mapped.
- return bool(struct_fiemap[3])
-
- def block_is_unmapped(self, block):
- """ This function returns 'True' if block number 'block' of the image
- file is not mapped (hole) and 'False' otherwise. """
-
- return not self.block_is_mapped(block)
-
- def _unpack_fiemap_extent(self, index):
- """ Unpack a 'struct fiemap_extent' structure object number 'index'
- from the internal 'self._buf' buffer. """
-
- offset = _FIEMAP_SIZE + _FIEMAP_EXTENT_SIZE * index
- return struct.unpack(_FIEMAP_EXTENT_FORMAT,
- self._buf[offset : offset + _FIEMAP_EXTENT_SIZE])
-
- def _do_get_mapped_ranges(self, start, count):
- """ Implements most the functionality for the 'get_mapped_ranges()'
- generator: invokes the FIEMAP ioctl, walks through the mapped
- extents and yields mapped block ranges. However, the ranges may be
- consecutive (e.g., (1, 100), (100, 200)) and 'get_mapped_ranges()'
- simply merges them. """
-
- block = start
- while block < start + count:
- struct_fiemap = self._invoke_fiemap(block, count)
-
- mapped_extents = struct_fiemap[3]
- if mapped_extents == 0:
- # No more mapped blocks
- return
-
- extent = 0
- while extent < mapped_extents:
- fiemap_extent = self._unpack_fiemap_extent(extent)
-
- # Start of the extent
- extent_start = fiemap_extent[0]
- # Starting block number of the extent
- extent_block = extent_start / self.block_size
- # Length of the extent
- extent_len = fiemap_extent[2]
- # Count of blocks in the extent
- extent_count = extent_len / self.block_size
-
- # Extent length and offset have to be block-aligned
- assert extent_start % self.block_size == 0
- assert extent_len % self.block_size == 0
-
- if extent_block > start + count - 1:
- return
-
- first = max(extent_block, block)
- last = min(extent_block + extent_count, start + count) - 1
- yield (first, last)
-
- extent += 1
-
- block = extent_block + extent_count
-
- def get_mapped_ranges(self, start, count):
- """ A generator which yields ranges of mapped blocks in the file. The
- ranges are tuples of 2 elements: [first, last], where 'first' is the
- first mapped block and 'last' is the last mapped block.
-
- The ranges are yielded for the area of the file of size 'count' blocks,
- starting from block 'start'. """
-
- iterator = self._do_get_mapped_ranges(start, count)
-
- first_prev, last_prev = iterator.next()
-
- for first, last in iterator:
- if last_prev == first - 1:
- last_prev = last
- else:
- yield (first_prev, last_prev)
- first_prev, last_prev = first, last
-
- yield (first_prev, last_prev)
-
- def get_unmapped_ranges(self, start, count):
- """ Just like 'get_mapped_ranges()', but yields unmapped block ranges
- instead (holes). """
-
- hole_first = start
- for first, last in self._do_get_mapped_ranges(start, count):
- if first > hole_first:
- yield (hole_first, first - 1)
-
- hole_first = last + 1
-
- if hole_first < start + count:
- yield (hole_first, start + count - 1)
diff --git a/scripts/lib/mic/utils/fs_related.py b/scripts/lib/mic/utils/fs_related.py
deleted file mode 100644
index dd420e88dc..0000000000
--- a/scripts/lib/mic/utils/fs_related.py
+++ /dev/null
@@ -1,1060 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2007, Red Hat, Inc.
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import sys
-import errno
-import stat
-import random
-import string
-import time
-import uuid
-
-from mic import msger
-from mic.utils import runner
-from mic.utils.errors import *
-from mic.utils.oe.misc import *
-
-def find_binary_inchroot(binary, chroot):
- paths = ["/usr/sbin",
- "/usr/bin",
- "/sbin",
- "/bin"
- ]
-
- for path in paths:
- bin_path = "%s/%s" % (path, binary)
- if os.path.exists("%s/%s" % (chroot, bin_path)):
- return bin_path
- return None
-
-def find_binary_path(binary):
- if os.environ.has_key("PATH"):
- paths = os.environ["PATH"].split(":")
- else:
- paths = []
- if os.environ.has_key("HOME"):
- paths += [os.environ["HOME"] + "/bin"]
- paths += ["/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"]
-
- for path in paths:
- bin_path = "%s/%s" % (path, binary)
- if os.path.exists(bin_path):
- return bin_path
-
- print "External command '%s' not found, exiting." % binary
- print " (Please install '%s' on your host system)" % binary
- sys.exit(1)
-
-def makedirs(dirname):
- """A version of os.makedirs() that doesn't throw an
- exception if the leaf directory already exists.
- """
- try:
- os.makedirs(dirname)
- except OSError, err:
- if err.errno != errno.EEXIST:
- raise
-
-def mksquashfs(in_img, out_img):
- fullpathmksquashfs = find_binary_path("mksquashfs")
- args = [fullpathmksquashfs, in_img, out_img]
-
- if not sys.stdout.isatty():
- args.append("-no-progress")
-
- ret = runner.show(args)
- if ret != 0:
- raise SquashfsError("'%s' exited with error (%d)" % (' '.join(args), ret))
-
-def resize2fs(fs, size):
- resize2fs = find_binary_path("resize2fs")
- if size == 0:
- # it means to minimalize it
- return runner.show([resize2fs, '-M', fs])
- else:
- return runner.show([resize2fs, fs, "%sK" % (size / 1024,)])
-
-def my_fuser(fp):
- fuser = find_binary_path("fuser")
- if not os.path.exists(fp):
- return False
-
- rc = runner.quiet([fuser, "-s", fp])
- if rc == 0:
- for pid in runner.outs([fuser, fp]).split():
- fd = open("/proc/%s/cmdline" % pid, "r")
- cmdline = fd.read()
- fd.close()
- if cmdline[:-1] == "/bin/bash":
- return True
-
- # not found
- return False
-
-class BindChrootMount:
- """Represents a bind mount of a directory into a chroot."""
- def __init__(self, src, chroot, dest = None, option = None):
- self.root = os.path.abspath(os.path.expanduser(chroot))
- self.option = option
-
- self.orig_src = self.src = src
- if os.path.islink(src):
- self.src = os.readlink(src)
- if not self.src.startswith('/'):
- self.src = os.path.abspath(os.path.join(os.path.dirname(src),
- self.src))
-
- if not dest:
- dest = self.src
- self.dest = os.path.join(self.root, dest.lstrip('/'))
-
- self.mounted = False
- self.mountcmd = find_binary_path("mount")
- self.umountcmd = find_binary_path("umount")
-
- def ismounted(self):
- with open('/proc/mounts') as f:
- for line in f:
- if line.split()[1] == os.path.abspath(self.dest):
- return True
-
- return False
-
- def has_chroot_instance(self):
- lock = os.path.join(self.root, ".chroot.lock")
- return my_fuser(lock)
-
- def mount(self):
- if self.mounted or self.ismounted():
- return
-
- makedirs(self.dest)
- rc = runner.show([self.mountcmd, "--bind", self.src, self.dest])
- if rc != 0:
- raise MountError("Bind-mounting '%s' to '%s' failed" %
- (self.src, self.dest))
- if self.option:
- rc = runner.show([self.mountcmd, "--bind", "-o", "remount,%s" % self.option, self.dest])
- if rc != 0:
- raise MountError("Bind-remounting '%s' failed" % self.dest)
-
- self.mounted = True
- if os.path.islink(self.orig_src):
- dest = os.path.join(self.root, self.orig_src.lstrip('/'))
- if not os.path.exists(dest):
- os.symlink(self.src, dest)
-
- def unmount(self):
- if self.has_chroot_instance():
- return
-
- if self.ismounted():
- runner.show([self.umountcmd, "-l", self.dest])
- self.mounted = False
-
-class LoopbackMount:
- """LoopbackMount compatibility layer for old API"""
- def __init__(self, lofile, mountdir, fstype = None):
- self.diskmount = DiskMount(LoopbackDisk(lofile,size = 0),mountdir,fstype,rmmountdir = True)
- self.losetup = False
- self.losetupcmd = find_binary_path("losetup")
-
- def cleanup(self):
- self.diskmount.cleanup()
-
- def unmount(self):
- self.diskmount.unmount()
-
- def lounsetup(self):
- if self.losetup:
- runner.show([self.losetupcmd, "-d", self.loopdev])
- self.losetup = False
- self.loopdev = None
-
- def loopsetup(self):
- if self.losetup:
- return
-
- self.loopdev = get_loop_device(self.losetupcmd, self.lofile)
- self.losetup = True
-
- def mount(self):
- self.diskmount.mount()
-
-class SparseLoopbackMount(LoopbackMount):
- """SparseLoopbackMount compatibility layer for old API"""
- def __init__(self, lofile, mountdir, size, fstype = None):
- self.diskmount = DiskMount(SparseLoopbackDisk(lofile,size),mountdir,fstype,rmmountdir = True)
-
- def expand(self, create = False, size = None):
- self.diskmount.disk.expand(create, size)
-
- def truncate(self, size = None):
- self.diskmount.disk.truncate(size)
-
- def create(self):
- self.diskmount.disk.create()
-
-class SparseExtLoopbackMount(SparseLoopbackMount):
- """SparseExtLoopbackMount compatibility layer for old API"""
- def __init__(self, lofile, mountdir, size, fstype, blocksize, fslabel):
- self.diskmount = ExtDiskMount(SparseLoopbackDisk(lofile,size), mountdir, fstype, blocksize, fslabel, rmmountdir = True)
-
-
- def __format_filesystem(self):
- self.diskmount.__format_filesystem()
-
- def create(self):
- self.diskmount.disk.create()
-
- def resize(self, size = None):
- return self.diskmount.__resize_filesystem(size)
-
- def mount(self):
- self.diskmount.mount()
-
- def __fsck(self):
- self.extdiskmount.__fsck()
-
- def __get_size_from_filesystem(self):
- return self.diskmount.__get_size_from_filesystem()
-
- def __resize_to_minimal(self):
- return self.diskmount.__resize_to_minimal()
-
- def resparse(self, size = None):
- return self.diskmount.resparse(size)
-
-class Disk:
- """Generic base object for a disk
-
- The 'create' method must make the disk visible as a block device - eg
- by calling losetup. For RawDisk, this is obviously a no-op. The 'cleanup'
- method must undo the 'create' operation.
- """
- def __init__(self, size, device = None):
- self._device = device
- self._size = size
-
- def create(self):
- pass
-
- def cleanup(self):
- pass
-
- def get_device(self):
- return self._device
- def set_device(self, path):
- self._device = path
- device = property(get_device, set_device)
-
- def get_size(self):
- return self._size
- size = property(get_size)
-
-
-class RawDisk(Disk):
- """A Disk backed by a block device.
- Note that create() is a no-op.
- """
- def __init__(self, size, device):
- Disk.__init__(self, size, device)
-
- def fixed(self):
- return True
-
- def exists(self):
- return True
-
-
-class DiskImage(Disk):
- """
- A Disk backed by a file.
- """
- def __init__(self, image_file, size):
- Disk.__init__(self, size)
- self.image_file = image_file
-
- def exists(self):
- return os.path.exists(self.image_file)
-
- def create(self):
- if self.device is not None:
- return
-
- blocks = self.size / 1024
- if self.size - blocks * 1024:
- blocks += 1
-
- # create disk image
- dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=1" % \
- (self.image_file, blocks)
- rc, out = exec_cmd(dd_cmd)
-
- self.device = self.image_file
-
-
-class LoopbackDisk(Disk):
- """A Disk backed by a file via the loop module."""
- def __init__(self, lofile, size):
- Disk.__init__(self, size)
- self.lofile = lofile
- self.losetupcmd = find_binary_path("losetup")
-
- def fixed(self):
- return False
-
- def exists(self):
- return os.path.exists(self.lofile)
-
- def create(self):
- if self.device is not None:
- return
-
- self.device = get_loop_device(self.losetupcmd, self.lofile)
-
- def cleanup(self):
- if self.device is None:
- return
- msger.debug("Losetup remove %s" % self.device)
- rc = runner.show([self.losetupcmd, "-d", self.device])
- self.device = None
-
-class SparseLoopbackDisk(LoopbackDisk):
- """A Disk backed by a sparse file via the loop module."""
- def __init__(self, lofile, size):
- LoopbackDisk.__init__(self, lofile, size)
-
- def expand(self, create = False, size = None):
- flags = os.O_WRONLY
- if create:
- flags |= os.O_CREAT
- if not os.path.exists(self.lofile):
- makedirs(os.path.dirname(self.lofile))
-
- if size is None:
- size = self.size
-
- msger.debug("Extending sparse file %s to %d" % (self.lofile, size))
- if create:
- fd = os.open(self.lofile, flags, 0644)
- else:
- fd = os.open(self.lofile, flags)
-
- if size <= 0:
- size = 1
- try:
- os.ftruncate(fd, size)
- except:
- # may be limited by 2G in 32bit env
- os.ftruncate(fd, 2**31L)
-
- os.close(fd)
-
- def truncate(self, size = None):
- if size is None:
- size = self.size
-
- msger.debug("Truncating sparse file %s to %d" % (self.lofile, size))
- fd = os.open(self.lofile, os.O_WRONLY)
- os.ftruncate(fd, size)
- os.close(fd)
-
- def create(self):
- self.expand(create = True)
- LoopbackDisk.create(self)
-
-class Mount:
- """A generic base class to deal with mounting things."""
- def __init__(self, mountdir):
- self.mountdir = mountdir
-
- def cleanup(self):
- self.unmount()
-
- def mount(self, options = None):
- pass
-
- def unmount(self):
- pass
-
-class DiskMount(Mount):
- """A Mount object that handles mounting of a Disk."""
- def __init__(self, disk, mountdir, fstype = None, rmmountdir = True):
- Mount.__init__(self, mountdir)
-
- self.disk = disk
- self.fstype = fstype
- self.rmmountdir = rmmountdir
-
- self.mounted = False
- self.rmdir = False
- if fstype:
- self.mkfscmd = find_binary_path("mkfs." + self.fstype)
- else:
- self.mkfscmd = None
- self.mountcmd = find_binary_path("mount")
- self.umountcmd = find_binary_path("umount")
-
- def cleanup(self):
- Mount.cleanup(self)
- self.disk.cleanup()
-
- def unmount(self):
- if self.mounted:
- msger.debug("Unmounting directory %s" % self.mountdir)
- runner.quiet('sync') # sync the data on this mount point
- rc = runner.show([self.umountcmd, "-l", self.mountdir])
- if rc == 0:
- self.mounted = False
- else:
- raise MountError("Failed to umount %s" % self.mountdir)
- if self.rmdir and not self.mounted:
- try:
- os.rmdir(self.mountdir)
- except OSError, e:
- pass
- self.rmdir = False
-
-
- def __create(self):
- self.disk.create()
-
-
- def mount(self, options = None):
- if self.mounted:
- return
-
- if not os.path.isdir(self.mountdir):
- msger.debug("Creating mount point %s" % self.mountdir)
- os.makedirs(self.mountdir)
- self.rmdir = self.rmmountdir
-
- self.__create()
-
- msger.debug("Mounting %s at %s" % (self.disk.device, self.mountdir))
- if options:
- args = [ self.mountcmd, "-o", options, self.disk.device, self.mountdir ]
- else:
- args = [ self.mountcmd, self.disk.device, self.mountdir ]
- if self.fstype:
- args.extend(["-t", self.fstype])
-
- rc = runner.show(args)
- if rc != 0:
- raise MountError("Failed to mount '%s' to '%s' with command '%s'. Retval: %s" %
- (self.disk.device, self.mountdir, " ".join(args), rc))
-
- self.mounted = True
-
-class ExtDiskMount(DiskMount):
- """A DiskMount object that is able to format/resize ext[23] filesystems."""
- def __init__(self, disk, mountdir, fstype, blocksize, fslabel, rmmountdir=True, skipformat = False, fsopts = None):
- DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir)
- self.blocksize = blocksize
- self.fslabel = fslabel.replace("/", "")
- self.uuid = str(uuid.uuid4())
- self.skipformat = skipformat
- self.fsopts = fsopts
- self.extopts = None
- self.dumpe2fs = find_binary_path("dumpe2fs")
- self.tune2fs = find_binary_path("tune2fs")
-
- def __parse_field(self, output, field):
- for line in output.split("\n"):
- if line.startswith(field + ":"):
- return line[len(field) + 1:].strip()
-
- raise KeyError("Failed to find field '%s' in output" % field)
-
- def __format_filesystem(self):
- if self.skipformat:
- msger.debug("Skip filesystem format.")
- return
-
- msger.verbose("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
- cmdlist = [self.mkfscmd, "-F", "-L", self.fslabel, "-m", "1", "-b",
- str(self.blocksize), "-U", self.uuid]
- if self.extopts:
- cmdlist.extend(self.extopts.split())
- cmdlist.extend([self.disk.device])
-
- rc, errout = runner.runtool(cmdlist, catch=2)
- if rc != 0:
- raise MountError("Error creating %s filesystem on disk %s:\n%s" %
- (self.fstype, self.disk.device, errout))
-
- if not self.extopts:
- msger.debug("Tuning filesystem on %s" % self.disk.device)
- runner.show([self.tune2fs, "-c0", "-i0", "-Odir_index", "-ouser_xattr,acl", self.disk.device])
-
- def __resize_filesystem(self, size = None):
- current_size = os.stat(self.disk.lofile)[stat.ST_SIZE]
-
- if size is None:
- size = self.disk.size
-
- if size == current_size:
- return
-
- if size > current_size:
- self.disk.expand(size)
-
- self.__fsck()
-
- resize2fs(self.disk.lofile, size)
- return size
-
- def __create(self):
- resize = False
- if not self.disk.fixed() and self.disk.exists():
- resize = True
-
- self.disk.create()
-
- if resize:
- self.__resize_filesystem()
- else:
- self.__format_filesystem()
-
- def mount(self, options = None):
- self.__create()
- DiskMount.mount(self, options)
-
- def __fsck(self):
- msger.info("Checking filesystem %s" % self.disk.lofile)
- runner.quiet(["/sbin/e2fsck", "-f", "-y", self.disk.lofile])
-
- def __get_size_from_filesystem(self):
- return int(self.__parse_field(runner.outs([self.dumpe2fs, '-h', self.disk.lofile]),
- "Block count")) * self.blocksize
-
- def __resize_to_minimal(self):
- self.__fsck()
-
- #
- # Use a binary search to find the minimal size
- # we can resize the image to
- #
- bot = 0
- top = self.__get_size_from_filesystem()
- while top != (bot + 1):
- t = bot + ((top - bot) / 2)
-
- if not resize2fs(self.disk.lofile, t):
- top = t
- else:
- bot = t
- return top
-
- def resparse(self, size = None):
- self.cleanup()
- if size == 0:
- minsize = 0
- else:
- minsize = self.__resize_to_minimal()
- self.disk.truncate(minsize)
-
- self.__resize_filesystem(size)
- return minsize
-
-class VfatDiskMount(DiskMount):
- """A DiskMount object that is able to format vfat/msdos filesystems."""
- def __init__(self, disk, mountdir, fstype, blocksize, fslabel, rmmountdir=True, skipformat = False, fsopts = None):
- DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir)
- self.blocksize = blocksize
- self.fslabel = fslabel.replace("/", "")
- rand1 = random.randint(0, 2**16 - 1)
- rand2 = random.randint(0, 2**16 - 1)
- self.uuid = "%04X-%04X" % (rand1, rand2)
- self.skipformat = skipformat
- self.fsopts = fsopts
- self.fsckcmd = find_binary_path("fsck." + self.fstype)
-
- def __format_filesystem(self):
- if self.skipformat:
- msger.debug("Skip filesystem format.")
- return
-
- msger.verbose("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
- rc = runner.show([self.mkfscmd, "-n", self.fslabel,
- "-i", self.uuid.replace("-", ""), self.disk.device])
- if rc != 0:
- raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))
-
- msger.verbose("Tuning filesystem on %s" % self.disk.device)
-
- def __resize_filesystem(self, size = None):
- current_size = os.stat(self.disk.lofile)[stat.ST_SIZE]
-
- if size is None:
- size = self.disk.size
-
- if size == current_size:
- return
-
- if size > current_size:
- self.disk.expand(size)
-
- self.__fsck()
-
- #resize2fs(self.disk.lofile, size)
- return size
-
- def __create(self):
- resize = False
- if not self.disk.fixed() and self.disk.exists():
- resize = True
-
- self.disk.create()
-
- if resize:
- self.__resize_filesystem()
- else:
- self.__format_filesystem()
-
- def mount(self, options = None):
- self.__create()
- DiskMount.mount(self, options)
-
- def __fsck(self):
- msger.debug("Checking filesystem %s" % self.disk.lofile)
- runner.show([self.fsckcmd, "-y", self.disk.lofile])
-
- def __get_size_from_filesystem(self):
- return self.disk.size
-
- def __resize_to_minimal(self):
- self.__fsck()
-
- #
- # Use a binary search to find the minimal size
- # we can resize the image to
- #
- bot = 0
- top = self.__get_size_from_filesystem()
- return top
-
- def resparse(self, size = None):
- self.cleanup()
- minsize = self.__resize_to_minimal()
- self.disk.truncate(minsize)
- self.__resize_filesystem(size)
- return minsize
-
-class BtrfsDiskMount(DiskMount):
- """A DiskMount object that is able to format/resize btrfs filesystems."""
- def __init__(self, disk, mountdir, fstype, blocksize, fslabel, rmmountdir=True, skipformat = False, fsopts = None):
- self.__check_btrfs()
- DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir)
- self.blocksize = blocksize
- self.fslabel = fslabel.replace("/", "")
- self.uuid = None
- self.skipformat = skipformat
- self.fsopts = fsopts
- self.blkidcmd = find_binary_path("blkid")
- self.btrfsckcmd = find_binary_path("btrfsck")
-
- def __check_btrfs(self):
- found = False
- """ Need to load btrfs module to mount it """
- load_module("btrfs")
- for line in open("/proc/filesystems").xreadlines():
- if line.find("btrfs") > -1:
- found = True
- break
- if not found:
- raise MountError("Your system can't mount btrfs filesystem, please make sure your kernel has btrfs support and the module btrfs.ko has been loaded.")
-
- # disable selinux, selinux will block write
- if os.path.exists("/usr/sbin/setenforce"):
- runner.show(["/usr/sbin/setenforce", "0"])
-
- def __parse_field(self, output, field):
- for line in output.split(" "):
- if line.startswith(field + "="):
- return line[len(field) + 1:].strip().replace("\"", "")
-
- raise KeyError("Failed to find field '%s' in output" % field)
-
- def __format_filesystem(self):
- if self.skipformat:
- msger.debug("Skip filesystem format.")
- return
-
- msger.verbose("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
- rc = runner.show([self.mkfscmd, "-L", self.fslabel, self.disk.device])
- if rc != 0:
- raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))
-
- self.uuid = self.__parse_field(runner.outs([self.blkidcmd, self.disk.device]), "UUID")
-
- def __resize_filesystem(self, size = None):
- current_size = os.stat(self.disk.lofile)[stat.ST_SIZE]
-
- if size is None:
- size = self.disk.size
-
- if size == current_size:
- return
-
- if size > current_size:
- self.disk.expand(size)
-
- self.__fsck()
- return size
-
- def __create(self):
- resize = False
- if not self.disk.fixed() and self.disk.exists():
- resize = True
-
- self.disk.create()
-
- if resize:
- self.__resize_filesystem()
- else:
- self.__format_filesystem()
-
- def mount(self, options = None):
- self.__create()
- DiskMount.mount(self, options)
-
- def __fsck(self):
- msger.debug("Checking filesystem %s" % self.disk.lofile)
- runner.quiet([self.btrfsckcmd, self.disk.lofile])
-
- def __get_size_from_filesystem(self):
- return self.disk.size
-
- def __resize_to_minimal(self):
- self.__fsck()
-
- return self.__get_size_from_filesystem()
-
- def resparse(self, size = None):
- self.cleanup()
- minsize = self.__resize_to_minimal()
- self.disk.truncate(minsize)
- self.__resize_filesystem(size)
- return minsize
-
-class DeviceMapperSnapshot(object):
- def __init__(self, imgloop, cowloop):
- self.imgloop = imgloop
- self.cowloop = cowloop
-
- self.__created = False
- self.__name = None
- self.dmsetupcmd = find_binary_path("dmsetup")
-
- """Load dm_snapshot if it isn't loaded"""
- load_module("dm_snapshot")
-
- def get_path(self):
- if self.__name is None:
- return None
- return os.path.join("/dev/mapper", self.__name)
- path = property(get_path)
-
- def create(self):
- if self.__created:
- return
-
- self.imgloop.create()
- self.cowloop.create()
-
- self.__name = "imgcreate-%d-%d" % (os.getpid(),
- random.randint(0, 2**16))
-
- size = os.stat(self.imgloop.lofile)[stat.ST_SIZE]
-
- table = "0 %d snapshot %s %s p 8" % (size / 512,
- self.imgloop.device,
- self.cowloop.device)
-
- args = [self.dmsetupcmd, "create", self.__name, "--table", table]
- if runner.show(args) != 0:
- self.cowloop.cleanup()
- self.imgloop.cleanup()
- raise SnapshotError("Could not create snapshot device using: " + ' '.join(args))
-
- self.__created = True
-
- def remove(self, ignore_errors = False):
- if not self.__created:
- return
-
- time.sleep(2)
- rc = runner.show([self.dmsetupcmd, "remove", self.__name])
- if not ignore_errors and rc != 0:
- raise SnapshotError("Could not remove snapshot device")
-
- self.__name = None
- self.__created = False
-
- self.cowloop.cleanup()
- self.imgloop.cleanup()
-
- def get_cow_used(self):
- if not self.__created:
- return 0
-
- #
- # dmsetup status on a snapshot returns e.g.
- # "0 8388608 snapshot 416/1048576"
- # or, more generally:
- # "A B snapshot C/D"
- # where C is the number of 512 byte sectors in use
- #
- out = runner.outs([self.dmsetupcmd, "status", self.__name])
- try:
- return int((out.split()[3]).split('/')[0]) * 512
- except ValueError:
- raise SnapshotError("Failed to parse dmsetup status: " + out)
-
-def create_image_minimizer(path, image, minimal_size):
- """
- Builds a copy-on-write image which can be used to
- create a device-mapper snapshot of an image where
- the image's filesystem is as small as possible
-
- The steps taken are:
- 1) Create a sparse COW
- 2) Loopback mount the image and the COW
- 3) Create a device-mapper snapshot of the image
- using the COW
- 4) Resize the filesystem to the minimal size
- 5) Determine the amount of space used in the COW
- 6) Restroy the device-mapper snapshot
- 7) Truncate the COW, removing unused space
- 8) Create a squashfs of the COW
- """
- imgloop = LoopbackDisk(image, None) # Passing bogus size - doesn't matter
-
- cowloop = SparseLoopbackDisk(os.path.join(os.path.dirname(path), "osmin"),
- 64L * 1024L * 1024L)
-
- snapshot = DeviceMapperSnapshot(imgloop, cowloop)
-
- try:
- snapshot.create()
-
- resize2fs(snapshot.path, minimal_size)
-
- cow_used = snapshot.get_cow_used()
- finally:
- snapshot.remove(ignore_errors = (not sys.exc_info()[0] is None))
-
- cowloop.truncate(cow_used)
-
- mksquashfs(cowloop.lofile, path)
-
- os.unlink(cowloop.lofile)
-
-def load_module(module):
- found = False
- for line in open('/proc/modules').xreadlines():
- if line.startswith("%s " % module):
- found = True
- break
- if not found:
- msger.info("Loading %s..." % module)
- runner.quiet(['modprobe', module])
-
-class LoopDevice(object):
- def __init__(self, loopid=None):
- self.device = None
- self.loopid = loopid
- self.created = False
- self.kpartxcmd = find_binary_path("kpartx")
- self.losetupcmd = find_binary_path("losetup")
-
- def register(self, device):
- self.device = device
- self.loopid = None
- self.created = True
-
- def reg_atexit(self):
- import atexit
- atexit.register(self.close)
-
- def _genloopid(self):
- import glob
- if not glob.glob("/dev/loop[0-9]*"):
- return 10
-
- fint = lambda x: x[9:].isdigit() and int(x[9:]) or 0
- maxid = 1 + max(filter(lambda x: x<100,
- map(fint, glob.glob("/dev/loop[0-9]*"))))
- if maxid < 10: maxid = 10
- if maxid >= 100: raise
- return maxid
-
- def _kpseek(self, device):
- rc, out = runner.runtool([self.kpartxcmd, '-l', '-v', device])
- if rc != 0:
- raise MountError("Can't query dm snapshot on %s" % device)
- for line in out.splitlines():
- if line and line.startswith("loop"):
- return True
- return False
-
- def _loseek(self, device):
- import re
- rc, out = runner.runtool([self.losetupcmd, '-a'])
- if rc != 0:
- raise MountError("Failed to run 'losetup -a'")
- for line in out.splitlines():
- m = re.match("([^:]+): .*", line)
- if m and m.group(1) == device:
- return True
- return False
-
- def create(self):
- if not self.created:
- if not self.loopid:
- self.loopid = self._genloopid()
- self.device = "/dev/loop%d" % self.loopid
- if os.path.exists(self.device):
- if self._loseek(self.device):
- raise MountError("Device busy: %s" % self.device)
- else:
- self.created = True
- return
-
- mknod = find_binary_path('mknod')
- rc = runner.show([mknod, '-m664', self.device, 'b', '7', str(self.loopid)])
- if rc != 0:
- raise MountError("Failed to create device %s" % self.device)
- else:
- self.created = True
-
- def close(self):
- if self.created:
- try:
- self.cleanup()
- self.device = None
- except MountError, e:
- msger.error("%s" % e)
-
- def cleanup(self):
-
- if self.device is None:
- return
-
-
- if self._kpseek(self.device):
- if self.created:
- for i in range(3, os.sysconf("SC_OPEN_MAX")):
- try:
- os.close(i)
- except:
- pass
- runner.quiet([self.kpartxcmd, "-d", self.device])
- if self._loseek(self.device):
- runner.quiet([self.losetupcmd, "-d", self.device])
- # FIXME: should sleep a while between two loseek
- if self._loseek(self.device):
- msger.warning("Can't cleanup loop device %s" % self.device)
- elif self.loopid:
- os.unlink(self.device)
-
-DEVICE_PIDFILE_DIR = "/var/tmp/mic/device"
-DEVICE_LOCKFILE = "/var/lock/__mic_loopdev.lock"
-
-def get_loop_device(losetupcmd, lofile):
- global DEVICE_PIDFILE_DIR
- global DEVICE_LOCKFILE
-
- import fcntl
- makedirs(os.path.dirname(DEVICE_LOCKFILE))
- fp = open(DEVICE_LOCKFILE, 'w')
- fcntl.flock(fp, fcntl.LOCK_EX)
- try:
- loopdev = None
- devinst = LoopDevice()
-
- # clean up left loop device first
- clean_loop_devices()
-
- # provide an avaible loop device
- rc, out = runner.runtool([losetupcmd, "--find"])
- if rc == 0:
- loopdev = out.split()[0]
- devinst.register(loopdev)
- if not loopdev or not os.path.exists(loopdev):
- devinst.create()
- loopdev = devinst.device
-
- # setup a loop device for image file
- rc = runner.show([losetupcmd, loopdev, lofile])
- if rc != 0:
- raise MountError("Failed to setup loop device for '%s'" % lofile)
-
- devinst.reg_atexit()
-
- # try to save device and pid
- makedirs(DEVICE_PIDFILE_DIR)
- pidfile = os.path.join(DEVICE_PIDFILE_DIR, os.path.basename(loopdev))
- if os.path.exists(pidfile):
- os.unlink(pidfile)
- with open(pidfile, 'w') as wf:
- wf.write(str(os.getpid()))
-
- except MountError, err:
- raise CreatorError("%s" % str(err))
- except:
- raise
- finally:
- try:
- fcntl.flock(fp, fcntl.LOCK_UN)
- fp.close()
- os.unlink(DEVICE_LOCKFILE)
- except:
- pass
-
- return loopdev
-
-def clean_loop_devices(piddir=DEVICE_PIDFILE_DIR):
- if not os.path.exists(piddir) or not os.path.isdir(piddir):
- return
-
- for loopdev in os.listdir(piddir):
- pidfile = os.path.join(piddir, loopdev)
- try:
- with open(pidfile, 'r') as rf:
- devpid = int(rf.read())
- except:
- devpid = None
-
- # if the process using this device is alive, skip it
- if not devpid or os.path.exists(os.path.join('/proc', str(devpid))):
- continue
-
- # try to clean it up
- try:
- devinst = LoopDevice()
- devinst.register(os.path.join('/dev', loopdev))
- devinst.cleanup()
- os.unlink(pidfile)
- except:
- pass
-
diff --git a/scripts/lib/mic/utils/gpt_parser.py b/scripts/lib/mic/utils/gpt_parser.py
deleted file mode 100644
index 5d43b70778..0000000000
--- a/scripts/lib/mic/utils/gpt_parser.py
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2013 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-""" This module implements a simple GPT partitions parser which can read the
-GPT header and the GPT partition table. """
-
-import struct
-import uuid
-import binascii
-from mic.utils.errors import MountError
-
-_GPT_HEADER_FORMAT = "<8s4sIIIQQQQ16sQIII"
-_GPT_HEADER_SIZE = struct.calcsize(_GPT_HEADER_FORMAT)
-_GPT_ENTRY_FORMAT = "<16s16sQQQ72s"
-_GPT_ENTRY_SIZE = struct.calcsize(_GPT_ENTRY_FORMAT)
-_SUPPORTED_GPT_REVISION = '\x00\x00\x01\x00'
-
-def _stringify_uuid(binary_uuid):
- """ A small helper function to transform a binary UUID into a string
- format. """
-
- uuid_str = str(uuid.UUID(bytes_le = binary_uuid))
-
- return uuid_str.upper()
-
-def _calc_header_crc(raw_hdr):
- """ Calculate GPT header CRC32 checksum. The 'raw_hdr' parameter has to
- be a list or a tuple containing all the elements of the GPT header in a
- "raw" form, meaning that it should simply contain "unpacked" disk data.
- """
-
- raw_hdr = list(raw_hdr)
- raw_hdr[3] = 0
- raw_hdr = struct.pack(_GPT_HEADER_FORMAT, *raw_hdr)
-
- return binascii.crc32(raw_hdr) & 0xFFFFFFFF
-
-def _validate_header(raw_hdr):
- """ Validate the GPT header. The 'raw_hdr' parameter has to be a list or a
- tuple containing all the elements of the GPT header in a "raw" form,
- meaning that it should simply contain "unpacked" disk data. """
-
- # Validate the signature
- if raw_hdr[0] != 'EFI PART':
- raise MountError("GPT partition table not found")
-
- # Validate the revision
- if raw_hdr[1] != _SUPPORTED_GPT_REVISION:
- raise MountError("Unsupported GPT revision '%s', supported revision " \
- "is '%s'" % \
- (binascii.hexlify(raw_hdr[1]),
- binascii.hexlify(_SUPPORTED_GPT_REVISION)))
-
- # Validate header size
- if raw_hdr[2] != _GPT_HEADER_SIZE:
- raise MountError("Bad GPT header size: %d bytes, expected %d" % \
- (raw_hdr[2], _GPT_HEADER_SIZE))
-
- crc = _calc_header_crc(raw_hdr)
- if raw_hdr[3] != crc:
- raise MountError("GPT header crc mismatch: %#x, should be %#x" % \
- (crc, raw_hdr[3]))
-
-class GptParser:
- """ GPT partition table parser. Allows reading the GPT header and the
- partition table, as well as modifying the partition table records. """
-
- def __init__(self, disk_path, sector_size = 512):
- """ The class constructor which accepts the following parameters:
- * disk_path - full path to the disk image or device node
- * sector_size - size of a disk sector in bytes """
-
- self.sector_size = sector_size
- self.disk_path = disk_path
-
- try:
- self._disk_obj = open(disk_path, 'r+b')
- except IOError as err:
- raise MountError("Cannot open file '%s' for reading GPT " \
- "partitions: %s" % (disk_path, err))
-
- def __del__(self):
- """ The class destructor. """
-
- self._disk_obj.close()
-
- def _read_disk(self, offset, size):
- """ A helper function which reads 'size' bytes from offset 'offset' of
- the disk and checks all the error conditions. """
-
- self._disk_obj.seek(offset)
- try:
- data = self._disk_obj.read(size)
- except IOError as err:
- raise MountError("cannot read from '%s': %s" % \
- (self.disk_path, err))
-
- if len(data) != size:
- raise MountError("cannot read %d bytes from offset '%d' of '%s', " \
- "read only %d bytes" % \
- (size, offset, self.disk_path, len(data)))
-
- return data
-
- def _write_disk(self, offset, buf):
- """ A helper function which writes buffer 'buf' to offset 'offset' of
- the disk. This function takes care of unaligned writes and checks all
- the error conditions. """
-
- # Since we may be dealing with a block device, we only can write in
- # 'self.sector_size' chunks. Find the aligned starting and ending
- # disk offsets to read.
- start = (offset / self.sector_size) * self.sector_size
- end = ((start + len(buf)) / self.sector_size + 1) * self.sector_size
-
- data = self._read_disk(start, end - start)
- off = offset - start
- data = data[:off] + buf + data[off + len(buf):]
-
- self._disk_obj.seek(start)
- try:
- self._disk_obj.write(data)
- except IOError as err:
- raise MountError("cannot write to '%s': %s" % (self.disk_path, err))
-
- def read_header(self, primary = True):
- """ Read and verify the GPT header and return a dictionary containing
- the following elements:
-
- 'signature' : header signature
- 'revision' : header revision
- 'hdr_size' : header size in bytes
- 'hdr_crc' : header CRC32
- 'hdr_lba' : LBA of this header
- 'hdr_offs' : byte disk offset of this header
- 'backup_lba' : backup header LBA
- 'backup_offs' : byte disk offset of backup header
- 'first_lba' : first usable LBA for partitions
- 'first_offs' : first usable byte disk offset for partitions
- 'last_lba' : last usable LBA for partitions
- 'last_offs' : last usable byte disk offset for partitions
- 'disk_uuid' : UUID of the disk
- 'ptable_lba' : starting LBA of array of partition entries
- 'ptable_offs' : disk byte offset of the start of the partition table
- 'ptable_size' : partition table size in bytes
- 'entries_cnt' : number of available partition table entries
- 'entry_size' : size of a single partition entry
- 'ptable_crc' : CRC32 of the partition table
- 'primary' : a boolean, if 'True', this is the primary GPT header,
- if 'False' - the secondary
- 'primary_str' : contains string "primary" if this is the primary GPT
- header, and "backup" otherwise
-
- This dictionary corresponds to the GPT header format. Please, see the
- UEFI standard for the description of these fields.
-
- If the 'primary' parameter is 'True', the primary GPT header is read,
- otherwise the backup GPT header is read instead. """
-
- # Read and validate the primary GPT header
- raw_hdr = self._read_disk(self.sector_size, _GPT_HEADER_SIZE)
- raw_hdr = struct.unpack(_GPT_HEADER_FORMAT, raw_hdr)
- _validate_header(raw_hdr)
- primary_str = "primary"
-
- if not primary:
- # Read and validate the backup GPT header
- raw_hdr = self._read_disk(raw_hdr[6] * self.sector_size, _GPT_HEADER_SIZE)
- raw_hdr = struct.unpack(_GPT_HEADER_FORMAT, raw_hdr)
- _validate_header(raw_hdr)
- primary_str = "backup"
-
- return { 'signature' : raw_hdr[0],
- 'revision' : raw_hdr[1],
- 'hdr_size' : raw_hdr[2],
- 'hdr_crc' : raw_hdr[3],
- 'hdr_lba' : raw_hdr[5],
- 'hdr_offs' : raw_hdr[5] * self.sector_size,
- 'backup_lba' : raw_hdr[6],
- 'backup_offs' : raw_hdr[6] * self.sector_size,
- 'first_lba' : raw_hdr[7],
- 'first_offs' : raw_hdr[7] * self.sector_size,
- 'last_lba' : raw_hdr[8],
- 'last_offs' : raw_hdr[8] * self.sector_size,
- 'disk_uuid' :_stringify_uuid(raw_hdr[9]),
- 'ptable_lba' : raw_hdr[10],
- 'ptable_offs' : raw_hdr[10] * self.sector_size,
- 'ptable_size' : raw_hdr[11] * raw_hdr[12],
- 'entries_cnt' : raw_hdr[11],
- 'entry_size' : raw_hdr[12],
- 'ptable_crc' : raw_hdr[13],
- 'primary' : primary,
- 'primary_str' : primary_str }
-
- def _read_raw_ptable(self, header):
- """ Read and validate primary or backup partition table. The 'header'
- argument is the GPT header. If it is the primary GPT header, then the
- primary partition table is read and validated, otherwise - the backup
- one. The 'header' argument is a dictionary which is returned by the
- 'read_header()' method. """
-
- raw_ptable = self._read_disk(header['ptable_offs'],
- header['ptable_size'])
-
- crc = binascii.crc32(raw_ptable) & 0xFFFFFFFF
- if crc != header['ptable_crc']:
- raise MountError("Partition table at LBA %d (%s) is corrupted" % \
- (header['ptable_lba'], header['primary_str']))
-
- return raw_ptable
-
- def get_partitions(self, primary = True):
- """ This is a generator which parses the GPT partition table and
- generates the following dictionary for each partition:
-
- 'index' : the index of the partition table endry
- 'offs' : byte disk offset of the partition table entry
- 'type_uuid' : partition type UUID
- 'part_uuid' : partition UUID
- 'first_lba' : the first LBA
- 'last_lba' : the last LBA
- 'flags' : attribute flags
- 'name' : partition name
- 'primary' : a boolean, if 'True', this is the primary partition
- table, if 'False' - the secondary
- 'primary_str' : contains string "primary" if this is the primary GPT
- header, and "backup" otherwise
-
- This dictionary corresponds to the GPT header format. Please, see the
- UEFI standard for the description of these fields.
-
- If the 'primary' parameter is 'True', partitions from the primary GPT
- partition table are generated, otherwise partitions from the backup GPT
- partition table are generated. """
-
- if primary:
- primary_str = "primary"
- else:
- primary_str = "backup"
-
- header = self.read_header(primary)
- raw_ptable = self._read_raw_ptable(header)
-
- for index in xrange(0, header['entries_cnt']):
- start = header['entry_size'] * index
- end = start + header['entry_size']
- raw_entry = struct.unpack(_GPT_ENTRY_FORMAT, raw_ptable[start:end])
-
- if raw_entry[2] == 0 or raw_entry[3] == 0:
- continue
-
- part_name = str(raw_entry[5].decode('UTF-16').split('\0', 1)[0])
-
- yield { 'index' : index,
- 'offs' : header['ptable_offs'] + start,
- 'type_uuid' : _stringify_uuid(raw_entry[0]),
- 'part_uuid' : _stringify_uuid(raw_entry[1]),
- 'first_lba' : raw_entry[2],
- 'last_lba' : raw_entry[3],
- 'flags' : raw_entry[4],
- 'name' : part_name,
- 'primary' : primary,
- 'primary_str' : primary_str }
-
- def _change_partition(self, header, entry):
- """ A helper function for 'change_partitions()' which changes a
- a paricular instance of the partition table (primary or backup). """
-
- if entry['index'] >= header['entries_cnt']:
- raise MountError("Partition table at LBA %d has only %d " \
- "records cannot change record number %d" % \
- (header['entries_cnt'], entry['index']))
- # Read raw GPT header
- raw_hdr = self._read_disk(header['hdr_offs'], _GPT_HEADER_SIZE)
- raw_hdr = list(struct.unpack(_GPT_HEADER_FORMAT, raw_hdr))
- _validate_header(raw_hdr)
-
- # Prepare the new partition table entry
- raw_entry = struct.pack(_GPT_ENTRY_FORMAT,
- uuid.UUID(entry['type_uuid']).bytes_le,
- uuid.UUID(entry['part_uuid']).bytes_le,
- entry['first_lba'],
- entry['last_lba'],
- entry['flags'],
- entry['name'].encode('UTF-16'))
-
- # Write the updated entry to the disk
- entry_offs = header['ptable_offs'] + \
- header['entry_size'] * entry['index']
- self._write_disk(entry_offs, raw_entry)
-
- # Calculate and update partition table CRC32
- raw_ptable = self._read_disk(header['ptable_offs'],
- header['ptable_size'])
- raw_hdr[13] = binascii.crc32(raw_ptable) & 0xFFFFFFFF
-
- # Calculate and update the GPT header CRC
- raw_hdr[3] = _calc_header_crc(raw_hdr)
-
- # Write the updated header to the disk
- raw_hdr = struct.pack(_GPT_HEADER_FORMAT, *raw_hdr)
- self._write_disk(header['hdr_offs'], raw_hdr)
-
- def change_partition(self, entry):
- """ Change a GPT partition. The 'entry' argument has the same format as
- 'get_partitions()' returns. This function simply changes the partition
- table record corresponding to 'entry' in both, the primary and the
- backup GPT partition tables. The parition table CRC is re-calculated
- and the GPT headers are modified accordingly. """
-
- # Change the primary partition table
- header = self.read_header(True)
- self._change_partition(header, entry)
-
- # Change the backup partition table
- header = self.read_header(False)
- self._change_partition(header, entry)
diff --git a/scripts/lib/mic/utils/grabber.py b/scripts/lib/mic/utils/grabber.py
deleted file mode 100644
index 45e30b4fb0..0000000000
--- a/scripts/lib/mic/utils/grabber.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import rpm
-import fcntl
-import struct
-import termios
-
-from mic import msger
-from mic.utils import runner
-from mic.utils.errors import CreatorError
-
-from urlgrabber import grabber
-from urlgrabber import __version__ as grabber_version
-
-if rpm.labelCompare(grabber_version.split('.'), '3.9.0'.split('.')) == -1:
- msger.warning("Version of python-urlgrabber is %s, lower than '3.9.0', "
- "you may encounter some network issues" % grabber_version)
-
-def myurlgrab(url, filename, proxies, progress_obj = None):
- g = grabber.URLGrabber()
- if progress_obj is None:
- progress_obj = TextProgress()
-
- if url.startswith("file:/"):
- filepath = "/%s" % url.replace("file:", "").lstrip('/')
- if not os.path.exists(filepath):
- raise CreatorError("URLGrabber error: can't find file %s" % url)
- if url.endswith('.rpm'):
- return filepath
- else:
- # untouch repometadata in source path
- runner.show(['cp', '-f', filepath, filename])
-
- else:
- try:
- filename = g.urlgrab(url=str(url),
- filename=filename,
- ssl_verify_host=False,
- ssl_verify_peer=False,
- proxies=proxies,
- http_headers=(('Pragma', 'no-cache'),),
- quote=0,
- progress_obj=progress_obj)
- except grabber.URLGrabError, err:
- msg = str(err)
- if msg.find(url) < 0:
- msg += ' on %s' % url
- raise CreatorError(msg)
-
- return filename
-
-def terminal_width(fd=1):
- """ Get the real terminal width """
- try:
- buf = 'abcdefgh'
- buf = fcntl.ioctl(fd, termios.TIOCGWINSZ, buf)
- return struct.unpack('hhhh', buf)[1]
- except: # IOError
- return 80
-
-def truncate_url(url, width):
- return os.path.basename(url)[0:width]
-
-class TextProgress(object):
- # make the class as singleton
- _instance = None
- def __new__(cls, *args, **kwargs):
- if not cls._instance:
- cls._instance = super(TextProgress, cls).__new__(cls, *args, **kwargs)
-
- return cls._instance
-
- def __init__(self, totalnum = None):
- self.total = totalnum
- self.counter = 1
-
- def start(self, filename, url, *args, **kwargs):
- self.url = url
- self.termwidth = terminal_width()
- msger.info("\r%-*s" % (self.termwidth, " "))
- if self.total is None:
- msger.info("\rRetrieving %s ..." % truncate_url(self.url, self.termwidth - 15))
- else:
- msger.info("\rRetrieving %s [%d/%d] ..." % (truncate_url(self.url, self.termwidth - 25), self.counter, self.total))
-
- def update(self, *args):
- pass
-
- def end(self, *args):
- if self.counter == self.total:
- msger.raw("\n")
-
- if self.total is not None:
- self.counter += 1
-
diff --git a/scripts/lib/mic/utils/misc.py b/scripts/lib/mic/utils/misc.py
deleted file mode 100644
index 95241d7f15..0000000000
--- a/scripts/lib/mic/utils/misc.py
+++ /dev/null
@@ -1,1065 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2010, 2011 Intel Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import sys
-import time
-import tempfile
-import re
-import shutil
-import glob
-import hashlib
-import subprocess
-import platform
-import traceback
-
-
-try:
- import sqlite3 as sqlite
-except ImportError:
- import sqlite
-
-try:
- from xml.etree import cElementTree
-except ImportError:
- import cElementTree
-xmlparse = cElementTree.parse
-
-from mic import msger
-from mic.utils.errors import CreatorError, SquashfsError
-from mic.utils.fs_related import find_binary_path, makedirs
-from mic.utils.proxy import get_proxy_for
-from mic.utils import runner
-
-
-RPM_RE = re.compile("(.*)\.(.*) (.*)-(.*)")
-RPM_FMT = "%(name)s.%(arch)s %(version)s-%(release)s"
-SRPM_RE = re.compile("(.*)-(\d+.*)-(\d+\.\d+).src.rpm")
-
-
-def build_name(kscfg, release=None, prefix = None, suffix = None):
- """Construct and return an image name string.
-
- This is a utility function to help create sensible name and fslabel
- strings. The name is constructed using the sans-prefix-and-extension
- kickstart filename and the supplied prefix and suffix.
-
- kscfg -- a path to a kickstart file
- release -- a replacement to suffix for image release
- prefix -- a prefix to prepend to the name; defaults to None, which causes
- no prefix to be used
- suffix -- a suffix to append to the name; defaults to None, which causes
- a YYYYMMDDHHMM suffix to be used
-
- Note, if maxlen is less then the len(suffix), you get to keep both pieces.
-
- """
- name = os.path.basename(kscfg)
- idx = name.rfind('.')
- if idx >= 0:
- name = name[:idx]
-
- if release is not None:
- suffix = ""
- if prefix is None:
- prefix = ""
- if suffix is None:
- suffix = time.strftime("%Y%m%d%H%M")
-
- if name.startswith(prefix):
- name = name[len(prefix):]
-
- prefix = "%s-" % prefix if prefix else ""
- suffix = "-%s" % suffix if suffix else ""
-
- ret = prefix + name + suffix
- return ret
-
-def get_distro():
- """Detect linux distribution, support "meego"
- """
-
- support_dists = ('SuSE',
- 'debian',
- 'fedora',
- 'redhat',
- 'centos',
- 'meego',
- 'moblin',
- 'tizen')
- try:
- (dist, ver, id) = platform.linux_distribution( \
- supported_dists = support_dists)
- except:
- (dist, ver, id) = platform.dist( \
- supported_dists = support_dists)
-
- return (dist, ver, id)
-
-def get_distro_str():
- """Get composited string for current linux distribution
- """
- (dist, ver, id) = get_distro()
-
- if not dist:
- return 'Unknown Linux Distro'
- else:
- distro_str = ' '.join(map(str.strip, (dist, ver, id)))
- return distro_str.strip()
-
-_LOOP_RULE_PTH = None
-
-def hide_loopdev_presentation():
- udev_rules = "80-prevent-loop-present.rules"
- udev_rules_dir = [
- '/usr/lib/udev/rules.d/',
- '/lib/udev/rules.d/',
- '/etc/udev/rules.d/'
- ]
-
- global _LOOP_RULE_PTH
-
- for rdir in udev_rules_dir:
- if os.path.exists(rdir):
- _LOOP_RULE_PTH = os.path.join(rdir, udev_rules)
-
- if not _LOOP_RULE_PTH:
- return
-
- try:
- with open(_LOOP_RULE_PTH, 'w') as wf:
- wf.write('KERNEL=="loop*", ENV{UDISKS_PRESENTATION_HIDE}="1"')
-
- runner.quiet('udevadm trigger')
- except:
- pass
-
-def unhide_loopdev_presentation():
- global _LOOP_RULE_PTH
-
- if not _LOOP_RULE_PTH:
- return
-
- try:
- os.unlink(_LOOP_RULE_PTH)
- runner.quiet('udevadm trigger')
- except:
- pass
-
-def extract_rpm(rpmfile, targetdir):
- rpm2cpio = find_binary_path("rpm2cpio")
- cpio = find_binary_path("cpio")
-
- olddir = os.getcwd()
- os.chdir(targetdir)
-
- msger.verbose("Extract rpm file with cpio: %s" % rpmfile)
- p1 = subprocess.Popen([rpm2cpio, rpmfile], stdout=subprocess.PIPE)
- p2 = subprocess.Popen([cpio, "-idv"], stdin=p1.stdout,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- (sout, serr) = p2.communicate()
- msger.verbose(sout or serr)
-
- os.chdir(olddir)
-
-def compressing(fpath, method):
- comp_map = {
- "gz": "gzip",
- "bz2": "bzip2"
- }
- if method not in comp_map:
- raise CreatorError("Unsupport compress format: %s, valid values: %s"
- % (method, ','.join(comp_map.keys())))
- cmd = find_binary_path(comp_map[method])
- rc = runner.show([cmd, "-f", fpath])
- if rc:
- raise CreatorError("Failed to %s file: %s" % (comp_map[method], fpath))
-
-def taring(dstfile, target):
- import tarfile
- basen, ext = os.path.splitext(dstfile)
- comp = {".tar": None,
- ".gz": "gz", # for .tar.gz
- ".bz2": "bz2", # for .tar.bz2
- ".tgz": "gz",
- ".tbz": "bz2"}[ext]
-
- # specify tarball file path
- if not comp:
- tarpath = dstfile
- elif basen.endswith(".tar"):
- tarpath = basen
- else:
- tarpath = basen + ".tar"
- wf = tarfile.open(tarpath, 'w')
-
- if os.path.isdir(target):
- for item in os.listdir(target):
- wf.add(os.path.join(target, item), item)
- else:
- wf.add(target, os.path.basename(target))
- wf.close()
-
- if comp:
- compressing(tarpath, comp)
- # when dstfile ext is ".tgz" and ".tbz", should rename
- if not basen.endswith(".tar"):
- shutil.move("%s.%s" % (tarpath, comp), dstfile)
-
-def ziping(dstfile, target):
- import zipfile
- wf = zipfile.ZipFile(dstfile, 'w', compression=zipfile.ZIP_DEFLATED)
- if os.path.isdir(target):
- for item in os.listdir(target):
- fpath = os.path.join(target, item)
- if not os.path.isfile(fpath):
- continue
- wf.write(fpath, item, zipfile.ZIP_DEFLATED)
- else:
- wf.write(target, os.path.basename(target), zipfile.ZIP_DEFLATED)
- wf.close()
-
-pack_formats = {
- ".tar": taring,
- ".tar.gz": taring,
- ".tar.bz2": taring,
- ".tgz": taring,
- ".tbz": taring,
- ".zip": ziping,
-}
-
-def packing(dstfile, target):
- (base, ext) = os.path.splitext(dstfile)
- if ext in (".gz", ".bz2") and base.endswith(".tar"):
- ext = ".tar" + ext
- if ext not in pack_formats:
- raise CreatorError("Unsupport pack format: %s, valid values: %s"
- % (ext, ','.join(pack_formats.keys())))
- func = pack_formats[ext]
- # func should be callable
- func(dstfile, target)
-
-def human_size(size):
- """Return human readable string for Bytes size
- """
-
- if size <= 0:
- return "0M"
- import math
- measure = ['B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
- expo = int(math.log(size, 1024))
- mant = float(size/math.pow(1024, expo))
- return "{0:.1f}{1:s}".format(mant, measure[expo])
-
-def get_block_size(file_obj):
- """ Returns block size for file object 'file_obj'. Errors are indicated by
- the 'IOError' exception. """
-
- from fcntl import ioctl
- import struct
-
- # Get the block size of the host file-system for the image file by calling
- # the FIGETBSZ ioctl (number 2).
- binary_data = ioctl(file_obj, 2, struct.pack('I', 0))
- return struct.unpack('I', binary_data)[0]
-
-def check_space_pre_cp(src, dst):
- """Check whether disk space is enough before 'cp' like
- operations, else exception will be raised.
- """
-
- srcsize = get_file_size(src) * 1024 * 1024
- freesize = get_filesystem_avail(dst)
- if srcsize > freesize:
- raise CreatorError("space on %s(%s) is not enough for about %s files"
- % (dst, human_size(freesize), human_size(srcsize)))
-
-def calc_hashes(file_path, hash_names, start = 0, end = None):
- """ Calculate hashes for a file. The 'file_path' argument is the file
- to calculate hash functions for, 'start' and 'end' are the starting and
- ending file offset to calculate the has functions for. The 'hash_names'
- argument is a list of hash names to calculate. Returns the the list
- of calculated hash values in the hexadecimal form in the same order
- as 'hash_names'.
- """
- if end == None:
- end = os.path.getsize(file_path)
-
- chunk_size = 65536
- to_read = end - start
- read = 0
-
- hashes = []
- for hash_name in hash_names:
- hashes.append(hashlib.new(hash_name))
-
- with open(file_path, "rb") as f:
- f.seek(start)
-
- while read < to_read:
- if read + chunk_size > to_read:
- chunk_size = to_read - read
- chunk = f.read(chunk_size)
- for hash_obj in hashes:
- hash_obj.update(chunk)
- read += chunk_size
-
- result = []
- for hash_obj in hashes:
- result.append(hash_obj.hexdigest())
-
- return result
-
-def get_md5sum(fpath):
- return calc_hashes(fpath, ('md5', ))[0]
-
-
-def normalize_ksfile(ksconf, release, arch):
- '''
- Return the name of a normalized ks file in which macro variables
- @BUILD_ID@ and @ARCH@ are replace with real values.
-
- The original ks file is returned if no special macro is used, otherwise
- a temp file is created and returned, which will be deleted when program
- exits normally.
- '''
-
- if not release:
- release = "latest"
- if not arch or re.match(r'i.86', arch):
- arch = "ia32"
-
- with open(ksconf) as f:
- ksc = f.read()
-
- if "@ARCH@" not in ksc and "@BUILD_ID@" not in ksc:
- return ksconf
-
- msger.info("Substitute macro variable @BUILD_ID@/@ARCH@ in ks: %s" % ksconf)
- ksc = ksc.replace("@ARCH@", arch)
- ksc = ksc.replace("@BUILD_ID@", release)
-
- fd, ksconf = tempfile.mkstemp(prefix=os.path.basename(ksconf))
- os.write(fd, ksc)
- os.close(fd)
-
- msger.debug('normalized ks file:%s' % ksconf)
-
- def remove_temp_ks():
- try:
- os.unlink(ksconf)
- except OSError, err:
- msger.warning('Failed to remove temp ks file:%s:%s' % (ksconf, err))
-
- import atexit
- atexit.register(remove_temp_ks)
-
- return ksconf
-
-
-def _check_mic_chroot(rootdir):
- def _path(path):
- return rootdir.rstrip('/') + path
-
- release_files = map(_path, [ "/etc/moblin-release",
- "/etc/meego-release",
- "/etc/tizen-release"])
-
- if not any(map(os.path.exists, release_files)):
- msger.warning("Dir %s is not a MeeGo/Tizen chroot env" % rootdir)
-
- if not glob.glob(rootdir + "/boot/vmlinuz-*"):
- msger.warning("Failed to find kernel module under %s" % rootdir)
-
- return
-
-def selinux_check(arch, fstypes):
- try:
- getenforce = find_binary_path('getenforce')
- except CreatorError:
- return
-
- selinux_status = runner.outs([getenforce])
- if arch and arch.startswith("arm") and selinux_status == "Enforcing":
- raise CreatorError("Can't create arm image if selinux is enabled, "
- "please run 'setenforce 0' to disable selinux")
-
- use_btrfs = filter(lambda typ: typ == 'btrfs', fstypes)
- if use_btrfs and selinux_status == "Enforcing":
- raise CreatorError("Can't create btrfs image if selinux is enabled,"
- " please run 'setenforce 0' to disable selinux")
-
-def get_image_type(path):
- def _get_extension_name(path):
- match = re.search("(?<=\.)\w+$", path)
- if match:
- return match.group(0)
- else:
- return None
-
- if os.path.isdir(path):
- _check_mic_chroot(path)
- return "fs"
-
- maptab = {
- "tar": "loop",
- "raw":"raw",
- "vmdk":"vmdk",
- "vdi":"vdi",
- "iso":"livecd",
- "usbimg":"liveusb",
- }
-
- extension = _get_extension_name(path)
- if extension in maptab:
- return maptab[extension]
-
- fd = open(path, "rb")
- file_header = fd.read(1024)
- fd.close()
- vdi_flag = "<<< Sun VirtualBox Disk Image >>>"
- if file_header[0:len(vdi_flag)] == vdi_flag:
- return maptab["vdi"]
-
- output = runner.outs(['file', path])
- isoptn = re.compile(r".*ISO 9660 CD-ROM filesystem.*(bootable).*")
- usbimgptn = re.compile(r".*x86 boot sector.*active.*")
- rawptn = re.compile(r".*x86 boot sector.*")
- vmdkptn = re.compile(r".*VMware. disk image.*")
- ext3fsimgptn = re.compile(r".*Linux.*ext3 filesystem data.*")
- ext4fsimgptn = re.compile(r".*Linux.*ext4 filesystem data.*")
- btrfsimgptn = re.compile(r".*BTRFS.*")
- if isoptn.match(output):
- return maptab["iso"]
- elif usbimgptn.match(output):
- return maptab["usbimg"]
- elif rawptn.match(output):
- return maptab["raw"]
- elif vmdkptn.match(output):
- return maptab["vmdk"]
- elif ext3fsimgptn.match(output):
- return "ext3fsimg"
- elif ext4fsimgptn.match(output):
- return "ext4fsimg"
- elif btrfsimgptn.match(output):
- return "btrfsimg"
- else:
- raise CreatorError("Cannot detect the type of image: %s" % path)
-
-
-def get_file_size(filename):
- """ Return size in MB unit """
- cmd = ['du', "-s", "-b", "-B", "1M", filename]
- rc, duOutput = runner.runtool(cmd)
- if rc != 0:
- raise CreatorError("Failed to run: %s" % ' '.join(cmd))
- size1 = int(duOutput.split()[0])
-
- cmd = ['du', "-s", "-B", "1M", filename]
- rc, duOutput = runner.runtool(cmd)
- if rc != 0:
- raise CreatorError("Failed to run: %s" % ' '.join(cmd))
-
- size2 = int(duOutput.split()[0])
- return max(size1, size2)
-
-
-def get_filesystem_avail(fs):
- vfstat = os.statvfs(fs)
- return vfstat.f_bavail * vfstat.f_bsize
-
-def convert_image(srcimg, srcfmt, dstimg, dstfmt):
- #convert disk format
- if dstfmt != "raw":
- raise CreatorError("Invalid destination image format: %s" % dstfmt)
- msger.debug("converting %s image to %s" % (srcimg, dstimg))
- if srcfmt == "vmdk":
- path = find_binary_path("qemu-img")
- argv = [path, "convert", "-f", "vmdk", srcimg, "-O", dstfmt, dstimg]
- elif srcfmt == "vdi":
- path = find_binary_path("VBoxManage")
- argv = [path, "internalcommands", "converttoraw", srcimg, dstimg]
- else:
- raise CreatorError("Invalid soure image format: %s" % srcfmt)
-
- rc = runner.show(argv)
- if rc == 0:
- msger.debug("convert successful")
- if rc != 0:
- raise CreatorError("Unable to convert disk to %s" % dstfmt)
-
-def uncompress_squashfs(squashfsimg, outdir):
- """Uncompress file system from squshfs image"""
- unsquashfs = find_binary_path("unsquashfs")
- args = [ unsquashfs, "-d", outdir, squashfsimg ]
- rc = runner.show(args)
- if (rc != 0):
- raise SquashfsError("Failed to uncompress %s." % squashfsimg)
-
-def mkdtemp(dir = "/var/tmp", prefix = "wic-tmp-"):
- """ FIXME: use the dir in wic.conf instead """
-
- makedirs(dir)
- return tempfile.mkdtemp(dir = dir, prefix = prefix)
-
-def get_repostrs_from_ks(ks):
- def _get_temp_reponame(baseurl):
- md5obj = hashlib.md5(baseurl)
- tmpreponame = "%s" % md5obj.hexdigest()
- return tmpreponame
-
- kickstart_repos = []
-
- for repodata in ks.handler.repo.repoList:
- repo = {}
- for attr in ('name',
- 'baseurl',
- 'mirrorlist',
- 'includepkgs', # val is list
- 'excludepkgs', # val is list
- 'cost', # int
- 'priority',# int
- 'save',
- 'proxy',
- 'proxyuser',
- 'proxypasswd',
- 'proxypasswd',
- 'debuginfo',
- 'source',
- 'gpgkey',
- 'ssl_verify'):
- if hasattr(repodata, attr) and getattr(repodata, attr):
- repo[attr] = getattr(repodata, attr)
-
- if 'name' not in repo:
- repo['name'] = _get_temp_reponame(repodata.baseurl)
-
- kickstart_repos.append(repo)
-
- return kickstart_repos
-
-def _get_uncompressed_data_from_url(url, filename, proxies):
- filename = myurlgrab(url, filename, proxies)
- suffix = None
- if filename.endswith(".gz"):
- suffix = ".gz"
- runner.quiet(['gunzip', "-f", filename])
- elif filename.endswith(".bz2"):
- suffix = ".bz2"
- runner.quiet(['bunzip2', "-f", filename])
- if suffix:
- filename = filename.replace(suffix, "")
- return filename
-
-def _get_metadata_from_repo(baseurl, proxies, cachedir, reponame, filename,
- sumtype=None, checksum=None):
- url = os.path.join(baseurl, filename)
- filename_tmp = str("%s/%s/%s" % (cachedir, reponame, os.path.basename(filename)))
- if os.path.splitext(filename_tmp)[1] in (".gz", ".bz2"):
- filename = os.path.splitext(filename_tmp)[0]
- else:
- filename = filename_tmp
- if sumtype and checksum and os.path.exists(filename):
- try:
- sumcmd = find_binary_path("%ssum" % sumtype)
- except:
- file_checksum = None
- else:
- file_checksum = runner.outs([sumcmd, filename]).split()[0]
-
- if file_checksum and file_checksum == checksum:
- return filename
-
- return _get_uncompressed_data_from_url(url,filename_tmp,proxies)
-
-def get_metadata_from_repos(repos, cachedir):
- my_repo_metadata = []
- for repo in repos:
- reponame = repo['name']
- baseurl = repo['baseurl']
-
-
- if 'proxy' in repo:
- proxy = repo['proxy']
- else:
- proxy = get_proxy_for(baseurl)
-
- proxies = None
- if proxy:
- proxies = {str(baseurl.split(":")[0]):str(proxy)}
-
- makedirs(os.path.join(cachedir, reponame))
- url = os.path.join(baseurl, "repodata/repomd.xml")
- filename = os.path.join(cachedir, reponame, 'repomd.xml')
- repomd = myurlgrab(url, filename, proxies)
- try:
- root = xmlparse(repomd)
- except SyntaxError:
- raise CreatorError("repomd.xml syntax error.")
-
- ns = root.getroot().tag
- ns = ns[0:ns.rindex("}")+1]
-
- filepaths = {}
- checksums = {}
- sumtypes = {}
-
- for elm in root.getiterator("%sdata" % ns):
- if elm.attrib["type"] == "patterns":
- filepaths['patterns'] = elm.find("%slocation" % ns).attrib['href']
- checksums['patterns'] = elm.find("%sopen-checksum" % ns).text
- sumtypes['patterns'] = elm.find("%sopen-checksum" % ns).attrib['type']
- break
-
- for elm in root.getiterator("%sdata" % ns):
- if elm.attrib["type"] in ("group_gz", "group"):
- filepaths['comps'] = elm.find("%slocation" % ns).attrib['href']
- checksums['comps'] = elm.find("%sopen-checksum" % ns).text
- sumtypes['comps'] = elm.find("%sopen-checksum" % ns).attrib['type']
- break
-
- primary_type = None
- for elm in root.getiterator("%sdata" % ns):
- if elm.attrib["type"] in ("primary_db", "primary"):
- primary_type = elm.attrib["type"]
- filepaths['primary'] = elm.find("%slocation" % ns).attrib['href']
- checksums['primary'] = elm.find("%sopen-checksum" % ns).text
- sumtypes['primary'] = elm.find("%sopen-checksum" % ns).attrib['type']
- break
-
- if not primary_type:
- continue
-
- for item in ("primary", "patterns", "comps"):
- if item not in filepaths:
- filepaths[item] = None
- continue
- if not filepaths[item]:
- continue
- filepaths[item] = _get_metadata_from_repo(baseurl,
- proxies,
- cachedir,
- reponame,
- filepaths[item],
- sumtypes[item],
- checksums[item])
-
- """ Get repo key """
- try:
- repokey = _get_metadata_from_repo(baseurl,
- proxies,
- cachedir,
- reponame,
- "repodata/repomd.xml.key")
- except CreatorError:
- repokey = None
- msger.debug("\ncan't get %s/%s" % (baseurl, "repodata/repomd.xml.key"))
-
- my_repo_metadata.append({"name":reponame,
- "baseurl":baseurl,
- "repomd":repomd,
- "primary":filepaths['primary'],
- "cachedir":cachedir,
- "proxies":proxies,
- "patterns":filepaths['patterns'],
- "comps":filepaths['comps'],
- "repokey":repokey})
-
- return my_repo_metadata
-
-def get_rpmver_in_repo(repometadata):
- for repo in repometadata:
- if repo["primary"].endswith(".xml"):
- root = xmlparse(repo["primary"])
- ns = root.getroot().tag
- ns = ns[0:ns.rindex("}")+1]
-
- versionlist = []
- for elm in root.getiterator("%spackage" % ns):
- if elm.find("%sname" % ns).text == 'rpm':
- for node in elm.getchildren():
- if node.tag == "%sversion" % ns:
- versionlist.append(node.attrib['ver'])
-
- if versionlist:
- return reversed(
- sorted(
- versionlist,
- key = lambda ver: map(int, ver.split('.')))).next()
-
- elif repo["primary"].endswith(".sqlite"):
- con = sqlite.connect(repo["primary"])
- for row in con.execute("select version from packages where "
- "name=\"rpm\" ORDER by version DESC"):
- con.close()
- return row[0]
-
- return None
-
-def get_arch(repometadata):
- archlist = []
- for repo in repometadata:
- if repo["primary"].endswith(".xml"):
- root = xmlparse(repo["primary"])
- ns = root.getroot().tag
- ns = ns[0:ns.rindex("}")+1]
- for elm in root.getiterator("%spackage" % ns):
- if elm.find("%sarch" % ns).text not in ("noarch", "src"):
- arch = elm.find("%sarch" % ns).text
- if arch not in archlist:
- archlist.append(arch)
- elif repo["primary"].endswith(".sqlite"):
- con = sqlite.connect(repo["primary"])
- for row in con.execute("select arch from packages where arch not in (\"src\", \"noarch\")"):
- if row[0] not in archlist:
- archlist.append(row[0])
-
- con.close()
-
- uniq_arch = []
- for i in range(len(archlist)):
- if archlist[i] not in rpmmisc.archPolicies.keys():
- continue
- need_append = True
- j = 0
- while j < len(uniq_arch):
- if archlist[i] in rpmmisc.archPolicies[uniq_arch[j]].split(':'):
- need_append = False
- break
- if uniq_arch[j] in rpmmisc.archPolicies[archlist[i]].split(':'):
- if need_append:
- uniq_arch[j] = archlist[i]
- need_append = False
- else:
- uniq_arch.remove(uniq_arch[j])
- continue
- j += 1
- if need_append:
- uniq_arch.append(archlist[i])
-
- return uniq_arch, archlist
-
-def get_package(pkg, repometadata, arch = None):
- ver = ""
- target_repo = None
- if not arch:
- arches = []
- elif arch not in rpmmisc.archPolicies:
- arches = [arch]
- else:
- arches = rpmmisc.archPolicies[arch].split(':')
- arches.append('noarch')
-
- for repo in repometadata:
- if repo["primary"].endswith(".xml"):
- root = xmlparse(repo["primary"])
- ns = root.getroot().tag
- ns = ns[0:ns.rindex("}")+1]
- for elm in root.getiterator("%spackage" % ns):
- if elm.find("%sname" % ns).text == pkg:
- if elm.find("%sarch" % ns).text in arches:
- version = elm.find("%sversion" % ns)
- tmpver = "%s-%s" % (version.attrib['ver'], version.attrib['rel'])
- if tmpver > ver:
- ver = tmpver
- location = elm.find("%slocation" % ns)
- pkgpath = "%s" % location.attrib['href']
- target_repo = repo
- break
- if repo["primary"].endswith(".sqlite"):
- con = sqlite.connect(repo["primary"])
- if arch:
- sql = 'select version, release, location_href from packages ' \
- 'where name = "%s" and arch IN ("%s")' % \
- (pkg, '","'.join(arches))
- for row in con.execute(sql):
- tmpver = "%s-%s" % (row[0], row[1])
- if tmpver > ver:
- ver = tmpver
- pkgpath = "%s" % row[2]
- target_repo = repo
- break
- else:
- sql = 'select version, release, location_href from packages ' \
- 'where name = "%s"' % pkg
- for row in con.execute(sql):
- tmpver = "%s-%s" % (row[0], row[1])
- if tmpver > ver:
- ver = tmpver
- pkgpath = "%s" % row[2]
- target_repo = repo
- break
- con.close()
- if target_repo:
- makedirs("%s/packages/%s" % (target_repo["cachedir"], target_repo["name"]))
- url = os.path.join(target_repo["baseurl"], pkgpath)
- filename = str("%s/packages/%s/%s" % (target_repo["cachedir"], target_repo["name"], os.path.basename(pkgpath)))
- if os.path.exists(filename):
- ret = rpmmisc.checkRpmIntegrity('rpm', filename)
- if ret == 0:
- return filename
-
- msger.warning("package %s is damaged: %s" %
- (os.path.basename(filename), filename))
- os.unlink(filename)
-
- pkg = myurlgrab(str(url), filename, target_repo["proxies"])
- return pkg
- else:
- return None
-
-def get_source_name(pkg, repometadata):
-
- def get_bin_name(pkg):
- m = RPM_RE.match(pkg)
- if m:
- return m.group(1)
- return None
-
- def get_src_name(srpm):
- m = SRPM_RE.match(srpm)
- if m:
- return m.group(1)
- return None
-
- ver = ""
- target_repo = None
-
- pkg_name = get_bin_name(pkg)
- if not pkg_name:
- return None
-
- for repo in repometadata:
- if repo["primary"].endswith(".xml"):
- root = xmlparse(repo["primary"])
- ns = root.getroot().tag
- ns = ns[0:ns.rindex("}")+1]
- for elm in root.getiterator("%spackage" % ns):
- if elm.find("%sname" % ns).text == pkg_name:
- if elm.find("%sarch" % ns).text != "src":
- version = elm.find("%sversion" % ns)
- tmpver = "%s-%s" % (version.attrib['ver'], version.attrib['rel'])
- if tmpver > ver:
- ver = tmpver
- fmt = elm.find("%sformat" % ns)
- if fmt:
- fns = fmt.getchildren()[0].tag
- fns = fns[0:fns.rindex("}")+1]
- pkgpath = fmt.find("%ssourcerpm" % fns).text
- target_repo = repo
- break
-
- if repo["primary"].endswith(".sqlite"):
- con = sqlite.connect(repo["primary"])
- for row in con.execute("select version, release, rpm_sourcerpm from packages where name = \"%s\" and arch != \"src\"" % pkg_name):
- tmpver = "%s-%s" % (row[0], row[1])
- if tmpver > ver:
- pkgpath = "%s" % row[2]
- target_repo = repo
- break
- con.close()
- if target_repo:
- return get_src_name(pkgpath)
- else:
- return None
-
-def get_pkglist_in_patterns(group, patterns):
- found = False
- pkglist = []
- try:
- root = xmlparse(patterns)
- except SyntaxError:
- raise SyntaxError("%s syntax error." % patterns)
-
- for elm in list(root.getroot()):
- ns = elm.tag
- ns = ns[0:ns.rindex("}")+1]
- name = elm.find("%sname" % ns)
- summary = elm.find("%ssummary" % ns)
- if name.text == group or summary.text == group:
- found = True
- break
-
- if not found:
- return pkglist
-
- found = False
- for requires in list(elm):
- if requires.tag.endswith("requires"):
- found = True
- break
-
- if not found:
- return pkglist
-
- for pkg in list(requires):
- pkgname = pkg.attrib["name"]
- if pkgname not in pkglist:
- pkglist.append(pkgname)
-
- return pkglist
-
-def get_pkglist_in_comps(group, comps):
- found = False
- pkglist = []
- try:
- root = xmlparse(comps)
- except SyntaxError:
- raise SyntaxError("%s syntax error." % comps)
-
- for elm in root.getiterator("group"):
- id = elm.find("id")
- name = elm.find("name")
- if id.text == group or name.text == group:
- packagelist = elm.find("packagelist")
- found = True
- break
-
- if not found:
- return pkglist
-
- for require in elm.getiterator("packagereq"):
- if require.tag.endswith("packagereq"):
- pkgname = require.text
- if pkgname not in pkglist:
- pkglist.append(pkgname)
-
- return pkglist
-
-def is_statically_linked(binary):
- return ", statically linked, " in runner.outs(['file', binary])
-
-def setup_qemu_emulator(rootdir, arch):
- # mount binfmt_misc if it doesn't exist
- if not os.path.exists("/proc/sys/fs/binfmt_misc"):
- modprobecmd = find_binary_path("modprobe")
- runner.show([modprobecmd, "binfmt_misc"])
- if not os.path.exists("/proc/sys/fs/binfmt_misc/register"):
- mountcmd = find_binary_path("mount")
- runner.show([mountcmd, "-t", "binfmt_misc", "none", "/proc/sys/fs/binfmt_misc"])
-
- # qemu_emulator is a special case, we can't use find_binary_path
- # qemu emulator should be a statically-linked executable file
- qemu_emulator = "/usr/bin/qemu-arm"
- if not os.path.exists(qemu_emulator) or not is_statically_linked(qemu_emulator):
- qemu_emulator = "/usr/bin/qemu-arm-static"
- if not os.path.exists(qemu_emulator):
- raise CreatorError("Please install a statically-linked qemu-arm")
-
- # qemu emulator version check
- armv7_list = [arch for arch in rpmmisc.archPolicies.keys() if arch.startswith('armv7')]
- if arch in armv7_list: # need qemu (>=0.13.0)
- qemuout = runner.outs([qemu_emulator, "-h"])
- m = re.search("version\s*([.\d]+)", qemuout)
- if m:
- qemu_version = m.group(1)
- if qemu_version < "0.13":
- raise CreatorError("Requires %s version >=0.13 for %s" % (qemu_emulator, arch))
- else:
- msger.warning("Can't get version info of %s, please make sure it's higher than 0.13.0" % qemu_emulator)
-
- if not os.path.exists(rootdir + "/usr/bin"):
- makedirs(rootdir + "/usr/bin")
- shutil.copy(qemu_emulator, rootdir + "/usr/bin/qemu-arm-static")
- qemu_emulator = "/usr/bin/qemu-arm-static"
-
- # disable selinux, selinux will block qemu emulator to run
- if os.path.exists("/usr/sbin/setenforce"):
- msger.info('Try to disable selinux')
- runner.show(["/usr/sbin/setenforce", "0"])
-
- # unregister it if it has been registered and is a dynamically-linked executable
- node = "/proc/sys/fs/binfmt_misc/arm"
- if os.path.exists(node):
- qemu_unregister_string = "-1\n"
- fd = open("/proc/sys/fs/binfmt_misc/arm", "w")
- fd.write(qemu_unregister_string)
- fd.close()
-
- # register qemu emulator for interpreting other arch executable file
- if not os.path.exists(node):
- qemu_arm_string = ":arm:M::\\x7fELF\\x01\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x28\\x00:\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xfa\\xff\\xff\\xff:%s:\n" % qemu_emulator
- fd = open("/proc/sys/fs/binfmt_misc/register", "w")
- fd.write(qemu_arm_string)
- fd.close()
-
- return qemu_emulator
-
-def SrcpkgsDownload(pkgs, repometadata, instroot, cachedir):
- def get_source_repometadata(repometadata):
- src_repometadata=[]
- for repo in repometadata:
- if repo["name"].endswith("-source"):
- src_repometadata.append(repo)
- if src_repometadata:
- return src_repometadata
- return None
-
- def get_src_name(srpm):
- m = SRPM_RE.match(srpm)
- if m:
- return m.group(1)
- return None
-
- src_repometadata = get_source_repometadata(repometadata)
-
- if not src_repometadata:
- msger.warning("No source repo found")
- return None
-
- src_pkgs = []
- lpkgs_dict = {}
- lpkgs_path = []
- for repo in src_repometadata:
- cachepath = "%s/%s/packages/*.src.rpm" %(cachedir, repo["name"])
- lpkgs_path += glob.glob(cachepath)
-
- for lpkg in lpkgs_path:
- lpkg_name = get_src_name(os.path.basename(lpkg))
- lpkgs_dict[lpkg_name] = lpkg
- localpkgs = lpkgs_dict.keys()
-
- cached_count = 0
- destdir = instroot+'/usr/src/SRPMS'
- if not os.path.exists(destdir):
- os.makedirs(destdir)
-
- srcpkgset = set()
- for _pkg in pkgs:
- srcpkg_name = get_source_name(_pkg, repometadata)
- if not srcpkg_name:
- continue
- srcpkgset.add(srcpkg_name)
-
- for pkg in list(srcpkgset):
- if pkg in localpkgs:
- cached_count += 1
- shutil.copy(lpkgs_dict[pkg], destdir)
- src_pkgs.append(os.path.basename(lpkgs_dict[pkg]))
- else:
- src_pkg = get_package(pkg, src_repometadata, 'src')
- if src_pkg:
- shutil.copy(src_pkg, destdir)
- src_pkgs.append(src_pkg)
- msger.info("%d source packages gotten from cache" % cached_count)
-
- return src_pkgs
-
-def strip_end(text, suffix):
- if not text.endswith(suffix):
- return text
- return text[:-len(suffix)]
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
deleted file mode 100644
index 6607466a83..0000000000
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ /dev/null
@@ -1,782 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-# Copyright (c) 2007, 2008 Red Hat, Inc.
-# Copyright (c) 2008 Daniel P. Berrange
-# Copyright (c) 2008 David P. Huff
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-
-from mic import msger
-from mic.utils import runner
-from mic.utils.errors import MountError
-from mic.utils.fs_related import *
-from mic.utils.gpt_parser import GptParser
-from mic.utils.oe.misc import *
-
-# Overhead of the MBR partitioning scheme (just one sector)
-MBR_OVERHEAD = 1
-# Overhead of the GPT partitioning scheme
-GPT_OVERHEAD = 34
-
-# Size of a sector in bytes
-SECTOR_SIZE = 512
-
-class PartitionedMount(Mount):
- def __init__(self, mountdir, skipformat = False):
- Mount.__init__(self, mountdir)
- self.disks = {}
- self.partitions = []
- self.subvolumes = []
- self.mapped = False
- self.mountOrder = []
- self.unmountOrder = []
- self.parted = find_binary_path("parted")
- self.btrfscmd=None
- self.skipformat = skipformat
- self.snapshot_created = self.skipformat
- # Size of a sector used in calculations
- self.sector_size = SECTOR_SIZE
- self._partitions_layed_out = False
-
- def __add_disk(self, disk_name):
- """ Add a disk 'disk_name' to the internal list of disks. Note,
- 'disk_name' is the name of the disk in the target system
- (e.g., sdb). """
-
- if disk_name in self.disks:
- # We already have this disk
- return
-
- assert not self._partitions_layed_out
-
- self.disks[disk_name] = \
- { 'disk': None, # Disk object
- 'mapped': False, # True if kpartx mapping exists
- 'numpart': 0, # Number of allocate partitions
- 'partitions': [], # Indexes to self.partitions
- 'offset': 0, # Offset of next partition (in sectors)
- # Minimum required disk size to fit all partitions (in bytes)
- 'min_size': 0,
- 'ptable_format': "msdos" } # Partition table format
-
- def add_disk(self, disk_name, disk_obj):
- """ Add a disk object which have to be partitioned. More than one disk
- can be added. In case of multiple disks, disk partitions have to be
- added for each disk separately with 'add_partition()". """
-
- self.__add_disk(disk_name)
- self.disks[disk_name]['disk'] = disk_obj
-
- def __add_partition(self, part):
- """ This is a helper function for 'add_partition()' which adds a
- partition to the internal list of partitions. """
-
- assert not self._partitions_layed_out
-
- self.partitions.append(part)
- self.__add_disk(part['disk_name'])
-
- def add_partition(self, size, disk_name, mountpoint, source_file = None, fstype = None,
- label=None, fsopts = None, boot = False, align = None,
- part_type = None):
- """ Add the next partition. Prtitions have to be added in the
- first-to-last order. """
-
- ks_pnum = len(self.partitions)
-
- # Converting MB to sectors for parted
- size = size * 1024 * 1024 / self.sector_size
-
- # We need to handle subvolumes for btrfs
- if fstype == "btrfs" and fsopts and fsopts.find("subvol=") != -1:
- self.btrfscmd=find_binary_path("btrfs")
- subvol = None
- opts = fsopts.split(",")
- for opt in opts:
- if opt.find("subvol=") != -1:
- subvol = opt.replace("subvol=", "").strip()
- break
- if not subvol:
- raise MountError("No subvolume: %s" % fsopts)
- self.subvolumes.append({'size': size, # In sectors
- 'mountpoint': mountpoint, # Mount relative to chroot
- 'fstype': fstype, # Filesystem type
- 'fsopts': fsopts, # Filesystem mount options
- 'disk_name': disk_name, # physical disk name holding partition
- 'device': None, # kpartx device node for partition
- 'mount': None, # Mount object
- 'subvol': subvol, # Subvolume name
- 'boot': boot, # Bootable flag
- 'mounted': False # Mount flag
- })
-
- # We still need partition for "/" or non-subvolume
- if mountpoint == "/" or not fsopts or fsopts.find("subvol=") == -1:
- # Don't need subvolume for "/" because it will be set as default subvolume
- if fsopts and fsopts.find("subvol=") != -1:
- opts = fsopts.split(",")
- for opt in opts:
- if opt.strip().startswith("subvol="):
- opts.remove(opt)
- break
- fsopts = ",".join(opts)
-
- part = { 'ks_pnum' : ks_pnum, # Partition number in the KS file
- 'size': size, # In sectors
- 'mountpoint': mountpoint, # Mount relative to chroot
- 'source_file': source_file, # partition contents
- 'fstype': fstype, # Filesystem type
- 'fsopts': fsopts, # Filesystem mount options
- 'label': label, # Partition label
- 'disk_name': disk_name, # physical disk name holding partition
- 'device': None, # kpartx device node for partition
- 'mount': None, # Mount object
- 'num': None, # Partition number
- 'boot': boot, # Bootable flag
- 'align': align, # Partition alignment
- 'part_type' : part_type, # Partition type
- 'partuuid': None } # Partition UUID (GPT-only)
-
- self.__add_partition(part)
-
- def layout_partitions(self, ptable_format = "msdos"):
- """ Layout the partitions, meaning calculate the position of every
- partition on the disk. The 'ptable_format' parameter defines the
- partition table format, and may be either "msdos" or "gpt". """
-
- msger.debug("Assigning %s partitions to disks" % ptable_format)
-
- if ptable_format not in ('msdos', 'gpt'):
- raise MountError("Unknown partition table format '%s', supported " \
- "formats are: 'msdos' and 'gpt'" % ptable_format)
-
- if self._partitions_layed_out:
- return
-
- self._partitions_layed_out = True
-
- # Go through partitions in the order they are added in .ks file
- for n in range(len(self.partitions)):
- p = self.partitions[n]
-
- if not self.disks.has_key(p['disk_name']):
- raise MountError("No disk %s for partition %s" \
- % (p['disk_name'], p['mountpoint']))
-
- if p['part_type'] and ptable_format != 'gpt':
- # The --part-type can also be implemented for MBR partitions,
- # in which case it would map to the 1-byte "partition type"
- # filed at offset 3 of the partition entry.
- raise MountError("setting custom partition type is only " \
- "imlemented for GPT partitions")
-
- # Get the disk where the partition is located
- d = self.disks[p['disk_name']]
- d['numpart'] += 1
- d['ptable_format'] = ptable_format
-
- if d['numpart'] == 1:
- if ptable_format == "msdos":
- overhead = MBR_OVERHEAD
- else:
- overhead = GPT_OVERHEAD
-
- # Skip one sector required for the partitioning scheme overhead
- d['offset'] += overhead
- # Steal few sectors from the first partition to offset for the
- # partitioning overhead
- p['size'] -= overhead
-
- if p['align']:
- # If not first partition and we do have alignment set we need
- # to align the partition.
- # FIXME: This leaves a empty spaces to the disk. To fill the
- # gaps we could enlargea the previous partition?
-
- # Calc how much the alignment is off.
- align_sectors = d['offset'] % (p['align'] * 1024 / self.sector_size)
- # We need to move forward to the next alignment point
- align_sectors = (p['align'] * 1024 / self.sector_size) - align_sectors
-
- msger.debug("Realignment for %s%s with %s sectors, original"
- " offset %s, target alignment is %sK." %
- (p['disk_name'], d['numpart'], align_sectors,
- d['offset'], p['align']))
-
- # increase the offset so we actually start the partition on right alignment
- d['offset'] += align_sectors
-
- p['start'] = d['offset']
- d['offset'] += p['size']
-
- p['type'] = 'primary'
- p['num'] = d['numpart']
-
- if d['ptable_format'] == "msdos":
- if d['numpart'] > 2:
- # Every logical partition requires an additional sector for
- # the EBR, so steal the last sector from the end of each
- # partition starting from the 3rd one for the EBR. This
- # will make sure the logical partitions are aligned
- # correctly.
- p['size'] -= 1
-
- if d['numpart'] > 3:
- p['type'] = 'logical'
- p['num'] = d['numpart'] + 1
-
- d['partitions'].append(n)
- msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
- "sectors (%d bytes)." \
- % (p['mountpoint'], p['disk_name'], p['num'],
- p['start'], p['start'] + p['size'] - 1,
- p['size'], p['size'] * self.sector_size))
-
- # Once all the partitions have been layed out, we can calculate the
- # minumim disk sizes.
- for disk_name, d in self.disks.items():
- d['min_size'] = d['offset']
- if d['ptable_format'] == 'gpt':
- # Account for the backup partition table at the end of the disk
- d['min_size'] += GPT_OVERHEAD
-
- d['min_size'] *= self.sector_size
-
- def __run_parted(self, args):
- """ Run parted with arguments specified in the 'args' list. """
-
- args.insert(0, self.parted)
- msger.debug(args)
-
- rc, out = runner.runtool(args, catch = 3)
- out = out.strip()
- if out:
- msger.debug('"parted" output: %s' % out)
-
- if rc != 0:
- # We don't throw exception when return code is not 0, because
- # parted always fails to reload part table with loop devices. This
- # prevents us from distinguishing real errors based on return
- # code.
- msger.debug("WARNING: parted returned '%s' instead of 0" % rc)
-
- def __create_partition(self, device, parttype, fstype, start, size):
- """ Create a partition on an image described by the 'device' object. """
-
- # Start is included to the size so we need to substract one from the end.
- end = start + size - 1
- msger.debug("Added '%s' partition, sectors %d-%d, size %d sectors" %
- (parttype, start, end, size))
-
- args = ["-s", device, "unit", "s", "mkpart", parttype]
- if fstype:
- args.extend([fstype])
- args.extend(["%d" % start, "%d" % end])
-
- return self.__run_parted(args)
-
- def __format_disks(self):
- self.layout_partitions()
-
- if self.skipformat:
- msger.debug("Skipping disk format, because skipformat flag is set.")
- return
-
- for dev in self.disks.keys():
- d = self.disks[dev]
- msger.debug("Initializing partition table for %s" % \
- (d['disk'].device))
- self.__run_parted(["-s", d['disk'].device, "mklabel",
- d['ptable_format']])
-
- msger.debug("Creating partitions")
-
- for p in self.partitions:
- d = self.disks[p['disk_name']]
- if d['ptable_format'] == "msdos" and p['num'] == 5:
- # The last sector of the 3rd partition was reserved for the EBR
- # of the first _logical_ partition. This is why the extended
- # partition should start one sector before the first logical
- # partition.
- self.__create_partition(d['disk'].device, "extended",
- None, p['start'] - 1,
- d['offset'] - p['start'])
-
- if p['fstype'] == "swap":
- parted_fs_type = "linux-swap"
- elif p['fstype'] == "vfat":
- parted_fs_type = "fat32"
- elif p['fstype'] == "msdos":
- parted_fs_type = "fat16"
- else:
- # Type for ext2/ext3/ext4/btrfs
- parted_fs_type = "ext2"
-
- # Boot ROM of OMAP boards require vfat boot partition to have an
- # even number of sectors.
- if p['mountpoint'] == "/boot" and p['fstype'] in ["vfat", "msdos"] \
- and p['size'] % 2:
- msger.debug("Substracting one sector from '%s' partition to " \
- "get even number of sectors for the partition" % \
- p['mountpoint'])
- p['size'] -= 1
-
- self.__create_partition(d['disk'].device, p['type'],
- parted_fs_type, p['start'], p['size'])
-
- if p['boot']:
- if d['ptable_format'] == 'gpt':
- flag_name = "legacy_boot"
- else:
- flag_name = "boot"
- msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \
- (flag_name, p['num'], d['disk'].device))
- self.__run_parted(["-s", d['disk'].device, "set",
- "%d" % p['num'], flag_name, "on"])
-
- # Parted defaults to enabling the lba flag for fat16 partitions,
- # which causes compatibility issues with some firmware (and really
- # isn't necessary).
- if parted_fs_type == "fat16":
- if d['ptable_format'] == 'msdos':
- msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \
- (p['num'], d['disk'].device))
- self.__run_parted(["-s", d['disk'].device, "set",
- "%d" % p['num'], "lba", "off"])
-
- # If the partition table format is "gpt", find out PARTUUIDs for all
- # the partitions. And if users specified custom parition type UUIDs,
- # set them.
- for disk_name, disk in self.disks.items():
- if disk['ptable_format'] != 'gpt':
- continue
-
- pnum = 0
- gpt_parser = GptParser(d['disk'].device, SECTOR_SIZE)
- # Iterate over all GPT partitions on this disk
- for entry in gpt_parser.get_partitions():
- pnum += 1
- # Find the matching partition in the 'self.partitions' list
- for n in d['partitions']:
- p = self.partitions[n]
- if p['num'] == pnum:
- # Found, fetch PARTUUID (partition's unique ID)
- p['partuuid'] = entry['part_uuid']
- msger.debug("PARTUUID for partition %d on disk '%s' " \
- "(mount point '%s') is '%s'" % (pnum, \
- disk_name, p['mountpoint'], p['partuuid']))
- if p['part_type']:
- entry['type_uuid'] = p['part_type']
- msger.debug("Change type of partition %d on disk " \
- "'%s' (mount point '%s') to '%s'" % \
- (pnum, disk_name, p['mountpoint'],
- p['part_type']))
- gpt_parser.change_partition(entry)
-
- del gpt_parser
-
- def __map_partitions(self):
- """Load it if dm_snapshot isn't loaded. """
- load_module("dm_snapshot")
-
- for dev in self.disks.keys():
- d = self.disks[dev]
- if d['mapped']:
- continue
-
- msger.debug("Running kpartx on %s" % d['disk'].device )
- rc, kpartxOutput = runner.runtool([self.kpartx, "-l", "-v", d['disk'].device])
- kpartxOutput = kpartxOutput.splitlines()
-
- if rc != 0:
- raise MountError("Failed to query partition mapping for '%s'" %
- d['disk'].device)
-
- # Strip trailing blank and mask verbose output
- i = 0
- while i < len(kpartxOutput) and kpartxOutput[i][0:4] != "loop":
- i = i + 1
- kpartxOutput = kpartxOutput[i:]
-
- # Make sure kpartx reported the right count of partitions
- if len(kpartxOutput) != d['numpart']:
- # If this disk has more than 3 partitions, then in case of MBR
- # paritions there is an extended parition. Different versions
- # of kpartx behave differently WRT the extended partition -
- # some map it, some ignore it. This is why we do the below hack
- # - if kpartx reported one more partition and the partition
- # table type is "msdos" and the amount of partitions is more
- # than 3, we just assume kpartx mapped the extended parition
- # and we remove it.
- if len(kpartxOutput) == d['numpart'] + 1 \
- and d['ptable_format'] == 'msdos' and len(kpartxOutput) > 3:
- kpartxOutput.pop(3)
- else:
- raise MountError("Unexpected number of partitions from " \
- "kpartx: %d != %d" % \
- (len(kpartxOutput), d['numpart']))
-
- for i in range(len(kpartxOutput)):
- line = kpartxOutput[i]
- newdev = line.split()[0]
- mapperdev = "/dev/mapper/" + newdev
- loopdev = d['disk'].device + newdev[-1]
-
- msger.debug("Dev %s: %s -> %s" % (newdev, loopdev, mapperdev))
- pnum = d['partitions'][i]
- self.partitions[pnum]['device'] = loopdev
-
- # grub's install wants partitions to be named
- # to match their parent device + partition num
- # kpartx doesn't work like this, so we add compat
- # symlinks to point to /dev/mapper
- if os.path.lexists(loopdev):
- os.unlink(loopdev)
- os.symlink(mapperdev, loopdev)
-
- msger.debug("Adding partx mapping for %s" % d['disk'].device)
- rc = runner.show([self.kpartx, "-v", "-a", d['disk'].device])
-
- if rc != 0:
- # Make sure that the device maps are also removed on error case.
- # The d['mapped'] isn't set to True if the kpartx fails so
- # failed mapping will not be cleaned on cleanup either.
- runner.quiet([self.kpartx, "-d", d['disk'].device])
- raise MountError("Failed to map partitions for '%s'" %
- d['disk'].device)
-
- # FIXME: there is a bit delay for multipath device setup,
- # wait 10ms for the setup
- import time
- time.sleep(10)
- d['mapped'] = True
-
- def __unmap_partitions(self):
- for dev in self.disks.keys():
- d = self.disks[dev]
- if not d['mapped']:
- continue
-
- msger.debug("Removing compat symlinks")
- for pnum in d['partitions']:
- if self.partitions[pnum]['device'] != None:
- os.unlink(self.partitions[pnum]['device'])
- self.partitions[pnum]['device'] = None
-
- msger.debug("Unmapping %s" % d['disk'].device)
- rc = runner.quiet([self.kpartx, "-d", d['disk'].device])
- if rc != 0:
- raise MountError("Failed to unmap partitions for '%s'" %
- d['disk'].device)
-
- d['mapped'] = False
-
- def __calculate_mountorder(self):
- msger.debug("Calculating mount order")
- for p in self.partitions:
- if p['mountpoint']:
- self.mountOrder.append(p['mountpoint'])
- self.unmountOrder.append(p['mountpoint'])
-
- self.mountOrder.sort()
- self.unmountOrder.sort()
- self.unmountOrder.reverse()
-
- def cleanup(self):
- Mount.cleanup(self)
- if self.disks:
- self.__unmap_partitions()
- for dev in self.disks.keys():
- d = self.disks[dev]
- try:
- d['disk'].cleanup()
- except:
- pass
-
- def unmount(self):
- self.__unmount_subvolumes()
- for mp in self.unmountOrder:
- if mp == 'swap':
- continue
- p = None
- for p1 in self.partitions:
- if p1['mountpoint'] == mp:
- p = p1
- break
-
- if p['mount'] != None:
- try:
- # Create subvolume snapshot here
- if p['fstype'] == "btrfs" and p['mountpoint'] == "/" and not self.snapshot_created:
- self.__create_subvolume_snapshots(p, p["mount"])
- p['mount'].cleanup()
- except:
- pass
- p['mount'] = None
-
- # Only for btrfs
- def __get_subvolume_id(self, rootpath, subvol):
- if not self.btrfscmd:
- self.btrfscmd=find_binary_path("btrfs")
- argv = [ self.btrfscmd, "subvolume", "list", rootpath ]
-
- rc, out = runner.runtool(argv)
- msger.debug(out)
-
- if rc != 0:
- raise MountError("Failed to get subvolume id from %s', return code: %d." % (rootpath, rc))
-
- subvolid = -1
- for line in out.splitlines():
- if line.endswith(" path %s" % subvol):
- subvolid = line.split()[1]
- if not subvolid.isdigit():
- raise MountError("Invalid subvolume id: %s" % subvolid)
- subvolid = int(subvolid)
- break
- return subvolid
-
- def __create_subvolume_metadata(self, p, pdisk):
- if len(self.subvolumes) == 0:
- return
-
- argv = [ self.btrfscmd, "subvolume", "list", pdisk.mountdir ]
- rc, out = runner.runtool(argv)
- msger.debug(out)
-
- if rc != 0:
- raise MountError("Failed to get subvolume id from %s', return code: %d." % (pdisk.mountdir, rc))
-
- subvolid_items = out.splitlines()
- subvolume_metadata = ""
- for subvol in self.subvolumes:
- for line in subvolid_items:
- if line.endswith(" path %s" % subvol["subvol"]):
- subvolid = line.split()[1]
- if not subvolid.isdigit():
- raise MountError("Invalid subvolume id: %s" % subvolid)
-
- subvolid = int(subvolid)
- opts = subvol["fsopts"].split(",")
- for opt in opts:
- if opt.strip().startswith("subvol="):
- opts.remove(opt)
- break
- fsopts = ",".join(opts)
- subvolume_metadata += "%d\t%s\t%s\t%s\n" % (subvolid, subvol["subvol"], subvol['mountpoint'], fsopts)
-
- if subvolume_metadata:
- fd = open("%s/.subvolume_metadata" % pdisk.mountdir, "w")
- fd.write(subvolume_metadata)
- fd.close()
-
- def __get_subvolume_metadata(self, p, pdisk):
- subvolume_metadata_file = "%s/.subvolume_metadata" % pdisk.mountdir
- if not os.path.exists(subvolume_metadata_file):
- return
-
- fd = open(subvolume_metadata_file, "r")
- content = fd.read()
- fd.close()
-
- for line in content.splitlines():
- items = line.split("\t")
- if items and len(items) == 4:
- self.subvolumes.append({'size': 0, # In sectors
- 'mountpoint': items[2], # Mount relative to chroot
- 'fstype': "btrfs", # Filesystem type
- 'fsopts': items[3] + ",subvol=%s" % items[1], # Filesystem mount options
- 'disk_name': p['disk_name'], # physical disk name holding partition
- 'device': None, # kpartx device node for partition
- 'mount': None, # Mount object
- 'subvol': items[1], # Subvolume name
- 'boot': False, # Bootable flag
- 'mounted': False # Mount flag
- })
-
- def __create_subvolumes(self, p, pdisk):
- """ Create all the subvolumes. """
-
- for subvol in self.subvolumes:
- argv = [ self.btrfscmd, "subvolume", "create", pdisk.mountdir + "/" + subvol["subvol"]]
-
- rc = runner.show(argv)
- if rc != 0:
- raise MountError("Failed to create subvolume '%s', return code: %d." % (subvol["subvol"], rc))
-
- # Set default subvolume, subvolume for "/" is default
- subvol = None
- for subvolume in self.subvolumes:
- if subvolume["mountpoint"] == "/" and p['disk_name'] == subvolume['disk_name']:
- subvol = subvolume
- break
-
- if subvol:
- # Get default subvolume id
- subvolid = self. __get_subvolume_id(pdisk.mountdir, subvol["subvol"])
- # Set default subvolume
- if subvolid != -1:
- rc = runner.show([ self.btrfscmd, "subvolume", "set-default", "%d" % subvolid, pdisk.mountdir])
- if rc != 0:
- raise MountError("Failed to set default subvolume id: %d', return code: %d." % (subvolid, rc))
-
- self.__create_subvolume_metadata(p, pdisk)
-
- def __mount_subvolumes(self, p, pdisk):
- if self.skipformat:
- # Get subvolume info
- self.__get_subvolume_metadata(p, pdisk)
- # Set default mount options
- if len(self.subvolumes) != 0:
- for subvol in self.subvolumes:
- if subvol["mountpoint"] == p["mountpoint"] == "/":
- opts = subvol["fsopts"].split(",")
- for opt in opts:
- if opt.strip().startswith("subvol="):
- opts.remove(opt)
- break
- pdisk.fsopts = ",".join(opts)
- break
-
- if len(self.subvolumes) == 0:
- # Return directly if no subvolumes
- return
-
- # Remount to make default subvolume mounted
- rc = runner.show([self.umountcmd, pdisk.mountdir])
- if rc != 0:
- raise MountError("Failed to umount %s" % pdisk.mountdir)
-
- rc = runner.show([self.mountcmd, "-o", pdisk.fsopts, pdisk.disk.device, pdisk.mountdir])
- if rc != 0:
- raise MountError("Failed to umount %s" % pdisk.mountdir)
-
- for subvol in self.subvolumes:
- if subvol["mountpoint"] == "/":
- continue
- subvolid = self. __get_subvolume_id(pdisk.mountdir, subvol["subvol"])
- if subvolid == -1:
- msger.debug("WARNING: invalid subvolume %s" % subvol["subvol"])
- continue
- # Replace subvolume name with subvolume ID
- opts = subvol["fsopts"].split(",")
- for opt in opts:
- if opt.strip().startswith("subvol="):
- opts.remove(opt)
- break
-
- opts.extend(["subvolrootid=0", "subvol=%s" % subvol["subvol"]])
- fsopts = ",".join(opts)
- subvol['fsopts'] = fsopts
- mountpoint = self.mountdir + subvol['mountpoint']
- makedirs(mountpoint)
- rc = runner.show([self.mountcmd, "-o", fsopts, pdisk.disk.device, mountpoint])
- if rc != 0:
- raise MountError("Failed to mount subvolume %s to %s" % (subvol["subvol"], mountpoint))
- subvol["mounted"] = True
-
- def __unmount_subvolumes(self):
- """ It may be called multiple times, so we need to chekc if it is still mounted. """
- for subvol in self.subvolumes:
- if subvol["mountpoint"] == "/":
- continue
- if not subvol["mounted"]:
- continue
- mountpoint = self.mountdir + subvol['mountpoint']
- rc = runner.show([self.umountcmd, mountpoint])
- if rc != 0:
- raise MountError("Failed to unmount subvolume %s from %s" % (subvol["subvol"], mountpoint))
- subvol["mounted"] = False
-
- def __create_subvolume_snapshots(self, p, pdisk):
- import time
-
- if self.snapshot_created:
- return
-
- # Remount with subvolid=0
- rc = runner.show([self.umountcmd, pdisk.mountdir])
- if rc != 0:
- raise MountError("Failed to umount %s" % pdisk.mountdir)
- if pdisk.fsopts:
- mountopts = pdisk.fsopts + ",subvolid=0"
- else:
- mountopts = "subvolid=0"
- rc = runner.show([self.mountcmd, "-o", mountopts, pdisk.disk.device, pdisk.mountdir])
- if rc != 0:
- raise MountError("Failed to umount %s" % pdisk.mountdir)
-
- # Create all the subvolume snapshots
- snapshotts = time.strftime("%Y%m%d-%H%M")
- for subvol in self.subvolumes:
- subvolpath = pdisk.mountdir + "/" + subvol["subvol"]
- snapshotpath = subvolpath + "_%s-1" % snapshotts
- rc = runner.show([ self.btrfscmd, "subvolume", "snapshot", subvolpath, snapshotpath ])
- if rc != 0:
- raise MountError("Failed to create subvolume snapshot '%s' for '%s', return code: %d." % (snapshotpath, subvolpath, rc))
-
- self.snapshot_created = True
-
- def __install_partition(self, num, source_file, start, size):
- """
- Install source_file contents into a partition.
- """
- if not source_file: # nothing to install
- return
-
- # Start is included in the size so need to substract one from the end.
- end = start + size - 1
- msger.debug("Installed %s in partition %d, sectors %d-%d, size %d sectors" % (source_file, num, start, end, size))
-
- dd_cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \
- (source_file, self.image_file, self.sector_size, start, size)
- rc, out = exec_cmd(dd_cmd)
-
-
- def install(self, image_file):
- msger.debug("Installing partitions")
-
- self.image_file = image_file
-
- for p in self.partitions:
- d = self.disks[p['disk_name']]
- if d['ptable_format'] == "msdos" and p['num'] == 5:
- # The last sector of the 3rd partition was reserved for the EBR
- # of the first _logical_ partition. This is why the extended
- # partition should start one sector before the first logical
- # partition.
- self.__install_partition(p['num'], p['source_file'],
- p['start'] - 1,
- d['offset'] - p['start'])
-
- self.__install_partition(p['num'], p['source_file'],
- p['start'], p['size'])
-
- def mount(self):
- for dev in self.disks.keys():
- d = self.disks[dev]
- d['disk'].create()
-
- self.__format_disks()
-
- self.__calculate_mountorder()
-
- return
-
- def resparse(self, size = None):
- # Can't re-sparse a disk image - too hard
- pass
diff --git a/scripts/lib/mic/utils/proxy.py b/scripts/lib/mic/utils/proxy.py
deleted file mode 100644
index 91451a2d01..0000000000
--- a/scripts/lib/mic/utils/proxy.py
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import urlparse
-
-_my_proxies = {}
-_my_noproxy = None
-_my_noproxy_list = []
-
-def set_proxy_environ():
- global _my_noproxy, _my_proxies
- if not _my_proxies:
- return
- for key in _my_proxies.keys():
- os.environ[key + "_proxy"] = _my_proxies[key]
- if not _my_noproxy:
- return
- os.environ["no_proxy"] = _my_noproxy
-
-def unset_proxy_environ():
- for env in ('http_proxy',
- 'https_proxy',
- 'ftp_proxy',
- 'all_proxy'):
- if env in os.environ:
- del os.environ[env]
-
- ENV=env.upper()
- if ENV in os.environ:
- del os.environ[ENV]
-
-def _set_proxies(proxy = None, no_proxy = None):
- """Return a dictionary of scheme -> proxy server URL mappings.
- """
-
- global _my_noproxy, _my_proxies
- _my_proxies = {}
- _my_noproxy = None
- proxies = []
- if proxy:
- proxies.append(("http_proxy", proxy))
- if no_proxy:
- proxies.append(("no_proxy", no_proxy))
-
- # Get proxy settings from environment if not provided
- if not proxy and not no_proxy:
- proxies = os.environ.items()
-
- # Remove proxy env variables, urllib2 can't handle them correctly
- unset_proxy_environ()
-
- for name, value in proxies:
- name = name.lower()
- if value and name[-6:] == '_proxy':
- if name[0:2] != "no":
- _my_proxies[name[:-6]] = value
- else:
- _my_noproxy = value
-
-def _ip_to_int(ip):
- ipint=0
- shift=24
- for dec in ip.split("."):
- ipint |= int(dec) << shift
- shift -= 8
- return ipint
-
-def _int_to_ip(val):
- ipaddr=""
- shift=0
- for i in range(4):
- dec = val >> shift
- dec &= 0xff
- ipaddr = ".%d%s" % (dec, ipaddr)
- shift += 8
- return ipaddr[1:]
-
-def _isip(host):
- if host.replace(".", "").isdigit():
- return True
- return False
-
-def _set_noproxy_list():
- global _my_noproxy, _my_noproxy_list
- _my_noproxy_list = []
- if not _my_noproxy:
- return
- for item in _my_noproxy.split(","):
- item = item.strip()
- if not item:
- continue
-
- if item[0] != '.' and item.find("/") == -1:
- # Need to match it
- _my_noproxy_list.append({"match":0,"needle":item})
-
- elif item[0] == '.':
- # Need to match at tail
- _my_noproxy_list.append({"match":1,"needle":item})
-
- elif item.find("/") > 3:
- # IP/MASK, need to match at head
- needle = item[0:item.find("/")].strip()
- ip = _ip_to_int(needle)
- netmask = 0
- mask = item[item.find("/")+1:].strip()
-
- if mask.isdigit():
- netmask = int(mask)
- netmask = ~((1<<(32-netmask)) - 1)
- ip &= netmask
- else:
- shift=24
- netmask=0
- for dec in mask.split("."):
- netmask |= int(dec) << shift
- shift -= 8
- ip &= netmask
-
- _my_noproxy_list.append({"match":2,"needle":ip,"netmask":netmask})
-
-def _isnoproxy(url):
- (scheme, host, path, parm, query, frag) = urlparse.urlparse(url)
-
- if '@' in host:
- user_pass, host = host.split('@', 1)
-
- if ':' in host:
- host, port = host.split(':', 1)
-
- hostisip = _isip(host)
- for item in _my_noproxy_list:
- if hostisip and item["match"] <= 1:
- continue
-
- if item["match"] == 2 and hostisip:
- if (_ip_to_int(host) & item["netmask"]) == item["needle"]:
- return True
-
- if item["match"] == 0:
- if host == item["needle"]:
- return True
-
- if item["match"] == 1:
- if host.rfind(item["needle"]) > 0:
- return True
-
- return False
-
-def set_proxies(proxy = None, no_proxy = None):
- _set_proxies(proxy, no_proxy)
- _set_noproxy_list()
- set_proxy_environ()
-
-def get_proxy_for(url):
- if url.startswith('file:') or _isnoproxy(url):
- return None
-
- type = url[0:url.index(":")]
- proxy = None
- if _my_proxies.has_key(type):
- proxy = _my_proxies[type]
- elif _my_proxies.has_key("http"):
- proxy = _my_proxies["http"]
- else:
- proxy = None
-
- return proxy
diff --git a/scripts/lib/mic/utils/rpmmisc.py b/scripts/lib/mic/utils/rpmmisc.py
deleted file mode 100644
index af15763e18..0000000000
--- a/scripts/lib/mic/utils/rpmmisc.py
+++ /dev/null
@@ -1,600 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2008, 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import sys
-import re
-import rpm
-
-from mic import msger
-from mic.utils.errors import CreatorError
-from mic.utils.proxy import get_proxy_for
-from mic.utils import runner
-
-
-class RPMInstallCallback:
- """ Command line callback class for callbacks from the RPM library.
- """
-
- def __init__(self, ts, output=1):
- self.output = output
- self.callbackfilehandles = {}
- self.total_actions = 0
- self.total_installed = 0
- self.installed_pkg_names = []
- self.total_removed = 0
- self.mark = "+"
- self.marks = 40
- self.lastmsg = None
- self.tsInfo = None # this needs to be set for anything else to work
- self.ts = ts
- self.filelog = False
- self.logString = []
- self.headmsg = "Installing"
-
- def _dopkgtup(self, hdr):
- tmpepoch = hdr['epoch']
- if tmpepoch is None: epoch = '0'
- else: epoch = str(tmpepoch)
-
- return (hdr['name'], hdr['arch'], epoch, hdr['version'], hdr['release'])
-
- def _makeHandle(self, hdr):
- handle = '%s:%s.%s-%s-%s' % (hdr['epoch'], hdr['name'], hdr['version'],
- hdr['release'], hdr['arch'])
-
- return handle
-
- def _localprint(self, msg):
- if self.output:
- msger.info(msg)
-
- def _makefmt(self, percent, progress = True):
- l = len(str(self.total_actions))
- size = "%s.%s" % (l, l)
- fmt_done = "[%" + size + "s/%" + size + "s]"
- done = fmt_done % (self.total_installed + self.total_removed,
- self.total_actions)
- marks = self.marks - (2 * l)
- width = "%s.%s" % (marks, marks)
- fmt_bar = "%-" + width + "s"
- if progress:
- bar = fmt_bar % (self.mark * int(marks * (percent / 100.0)), )
- fmt = "\r %-10.10s: %-20.20s " + bar + " " + done
- else:
- bar = fmt_bar % (self.mark * marks, )
- fmt = " %-10.10s: %-20.20s " + bar + " " + done
- return fmt
-
- def _logPkgString(self, hdr):
- """return nice representation of the package for the log"""
- (n,a,e,v,r) = self._dopkgtup(hdr)
- if e == '0':
- pkg = '%s.%s %s-%s' % (n, a, v, r)
- else:
- pkg = '%s.%s %s:%s-%s' % (n, a, e, v, r)
-
- return pkg
-
- def callback(self, what, bytes, total, h, user):
- if what == rpm.RPMCALLBACK_TRANS_START:
- if bytes == 6:
- self.total_actions = total
-
- elif what == rpm.RPMCALLBACK_TRANS_PROGRESS:
- pass
-
- elif what == rpm.RPMCALLBACK_TRANS_STOP:
- pass
-
- elif what == rpm.RPMCALLBACK_INST_OPEN_FILE:
- self.lastmsg = None
- hdr = None
- if h is not None:
- try:
- hdr, rpmloc = h
- except:
- rpmloc = h
- hdr = readRpmHeader(self.ts, h)
-
- handle = self._makeHandle(hdr)
- fd = os.open(rpmloc, os.O_RDONLY)
- self.callbackfilehandles[handle]=fd
- if hdr['name'] not in self.installed_pkg_names:
- self.installed_pkg_names.append(hdr['name'])
- self.total_installed += 1
- return fd
- else:
- self._localprint("No header - huh?")
-
- elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
- hdr = None
- if h is not None:
- try:
- hdr, rpmloc = h
- except:
- rpmloc = h
- hdr = readRpmHeader(self.ts, h)
-
- handle = self._makeHandle(hdr)
- os.close(self.callbackfilehandles[handle])
- fd = 0
-
- # log stuff
- #pkgtup = self._dopkgtup(hdr)
- self.logString.append(self._logPkgString(hdr))
-
- elif what == rpm.RPMCALLBACK_INST_PROGRESS:
- if h is not None:
- percent = (self.total_installed*100L)/self.total_actions
- if total > 0:
- try:
- hdr, rpmloc = h
- except:
- rpmloc = h
-
- m = re.match("(.*)-(\d+.*)-(\d+\.\d+)\.(.+)\.rpm", os.path.basename(rpmloc))
- if m:
- pkgname = m.group(1)
- else:
- pkgname = os.path.basename(rpmloc)
- if self.output:
- fmt = self._makefmt(percent)
- msg = fmt % (self.headmsg, pkgname)
- if msg != self.lastmsg:
- self.lastmsg = msg
-
- msger.info(msg)
-
- if self.total_installed == self.total_actions:
- msger.raw('')
- msger.verbose('\n'.join(self.logString))
-
- elif what == rpm.RPMCALLBACK_UNINST_START:
- pass
-
- elif what == rpm.RPMCALLBACK_UNINST_PROGRESS:
- pass
-
- elif what == rpm.RPMCALLBACK_UNINST_STOP:
- self.total_removed += 1
-
- elif what == rpm.RPMCALLBACK_REPACKAGE_START:
- pass
-
- elif what == rpm.RPMCALLBACK_REPACKAGE_STOP:
- pass
-
- elif what == rpm.RPMCALLBACK_REPACKAGE_PROGRESS:
- pass
-
-def readRpmHeader(ts, filename):
- """ Read an rpm header. """
-
- fd = os.open(filename, os.O_RDONLY)
- h = ts.hdrFromFdno(fd)
- os.close(fd)
- return h
-
-def splitFilename(filename):
- """ Pass in a standard style rpm fullname
-
- Return a name, version, release, epoch, arch, e.g.::
- foo-1.0-1.i386.rpm returns foo, 1.0, 1, i386
- 1:bar-9-123a.ia64.rpm returns bar, 9, 123a, 1, ia64
- """
-
- if filename[-4:] == '.rpm':
- filename = filename[:-4]
-
- archIndex = filename.rfind('.')
- arch = filename[archIndex+1:]
-
- relIndex = filename[:archIndex].rfind('-')
- rel = filename[relIndex+1:archIndex]
-
- verIndex = filename[:relIndex].rfind('-')
- ver = filename[verIndex+1:relIndex]
-
- epochIndex = filename.find(':')
- if epochIndex == -1:
- epoch = ''
- else:
- epoch = filename[:epochIndex]
-
- name = filename[epochIndex + 1:verIndex]
- return name, ver, rel, epoch, arch
-
-def getCanonX86Arch(arch):
- #
- if arch == "i586":
- f = open("/proc/cpuinfo", "r")
- lines = f.readlines()
- f.close()
- for line in lines:
- if line.startswith("model name") and line.find("Geode(TM)") != -1:
- return "geode"
- return arch
- # only athlon vs i686 isn't handled with uname currently
- if arch != "i686":
- return arch
-
- # if we're i686 and AuthenticAMD, then we should be an athlon
- f = open("/proc/cpuinfo", "r")
- lines = f.readlines()
- f.close()
- for line in lines:
- if line.startswith("vendor") and line.find("AuthenticAMD") != -1:
- return "athlon"
- # i686 doesn't guarantee cmov, but we depend on it
- elif line.startswith("flags") and line.find("cmov") == -1:
- return "i586"
-
- return arch
-
-def getCanonX86_64Arch(arch):
- if arch != "x86_64":
- return arch
-
- vendor = None
- f = open("/proc/cpuinfo", "r")
- lines = f.readlines()
- f.close()
- for line in lines:
- if line.startswith("vendor_id"):
- vendor = line.split(':')[1]
- break
- if vendor is None:
- return arch
-
- if vendor.find("Authentic AMD") != -1 or vendor.find("AuthenticAMD") != -1:
- return "amd64"
- if vendor.find("GenuineIntel") != -1:
- return "ia32e"
- return arch
-
-def getCanonArch():
- arch = os.uname()[4]
-
- if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"):
- return getCanonX86Arch(arch)
-
- if arch == "x86_64":
- return getCanonX86_64Arch(arch)
-
- return arch
-
-# Copy from libsatsolver:poolarch.c, with cleanup
-archPolicies = {
- "x86_64": "x86_64:i686:i586:i486:i386",
- "i686": "i686:i586:i486:i386",
- "i586": "i586:i486:i386",
- "ia64": "ia64:i686:i586:i486:i386",
- "armv7tnhl": "armv7tnhl:armv7thl:armv7nhl:armv7hl",
- "armv7thl": "armv7thl:armv7hl",
- "armv7nhl": "armv7nhl:armv7hl",
- "armv7hl": "armv7hl",
- "armv7l": "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
- "armv6l": "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
- "armv5tejl": "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
- "armv5tel": "armv5tel:armv5l:armv4tl:armv4l:armv3l",
- "armv5l": "armv5l:armv4tl:armv4l:armv3l",
-}
-
-# dict mapping arch -> ( multicompat, best personality, biarch personality )
-multilibArches = {
- "x86_64": ( "athlon", "x86_64", "athlon" ),
-}
-
-# from yumUtils.py
-arches = {
- # ia32
- "athlon": "i686",
- "i686": "i586",
- "geode": "i586",
- "i586": "i486",
- "i486": "i386",
- "i386": "noarch",
-
- # amd64
- "x86_64": "athlon",
- "amd64": "x86_64",
- "ia32e": "x86_64",
-
- # arm
- "armv7tnhl": "armv7nhl",
- "armv7nhl": "armv7hl",
- "armv7hl": "noarch",
- "armv7l": "armv6l",
- "armv6l": "armv5tejl",
- "armv5tejl": "armv5tel",
- "armv5tel": "noarch",
-
- #itanium
- "ia64": "noarch",
-}
-
-def isMultiLibArch(arch=None):
- """returns true if arch is a multilib arch, false if not"""
- if arch is None:
- arch = getCanonArch()
-
- if not arches.has_key(arch): # or we could check if it is noarch
- return False
-
- if multilibArches.has_key(arch):
- return True
-
- if multilibArches.has_key(arches[arch]):
- return True
-
- return False
-
-def getBaseArch():
- myarch = getCanonArch()
- if not arches.has_key(myarch):
- return myarch
-
- if isMultiLibArch(arch=myarch):
- if multilibArches.has_key(myarch):
- return myarch
- else:
- return arches[myarch]
-
- if arches.has_key(myarch):
- basearch = myarch
- value = arches[basearch]
- while value != 'noarch':
- basearch = value
- value = arches[basearch]
-
- return basearch
-
-def checkRpmIntegrity(bin_rpm, package):
- return runner.quiet([bin_rpm, "-K", "--nosignature", package])
-
-def checkSig(ts, package):
- """ Takes a transaction set and a package, check it's sigs,
- return 0 if they are all fine
- return 1 if the gpg key can't be found
- return 2 if the header is in someway damaged
- return 3 if the key is not trusted
- return 4 if the pkg is not gpg or pgp signed
- """
-
- value = 0
- currentflags = ts.setVSFlags(0)
- fdno = os.open(package, os.O_RDONLY)
- try:
- hdr = ts.hdrFromFdno(fdno)
-
- except rpm.error, e:
- if str(e) == "public key not availaiable":
- value = 1
- if str(e) == "public key not available":
- value = 1
- if str(e) == "public key not trusted":
- value = 3
- if str(e) == "error reading package header":
- value = 2
- else:
- error, siginfo = getSigInfo(hdr)
- if error == 101:
- os.close(fdno)
- del hdr
- value = 4
- else:
- del hdr
-
- try:
- os.close(fdno)
- except OSError:
- pass
-
- ts.setVSFlags(currentflags) # put things back like they were before
- return value
-
-def getSigInfo(hdr):
- """ checks signature from an hdr hand back signature information and/or
- an error code
- """
-
- import locale
- locale.setlocale(locale.LC_ALL, 'C')
-
- string = '%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|'
- siginfo = hdr.sprintf(string)
- if siginfo != '(none)':
- error = 0
- sigtype, sigdate, sigid = siginfo.split(',')
- else:
- error = 101
- sigtype = 'MD5'
- sigdate = 'None'
- sigid = 'None'
-
- infotuple = (sigtype, sigdate, sigid)
- return error, infotuple
-
-def checkRepositoryEULA(name, repo):
- """ This function is to check the EULA file if provided.
- return True: no EULA or accepted
- return False: user declined the EULA
- """
-
- import tempfile
- import shutil
- import urlparse
- import urllib2 as u2
- import httplib
- from mic.utils.errors import CreatorError
-
- def _check_and_download_url(u2opener, url, savepath):
- try:
- if u2opener:
- f = u2opener.open(url)
- else:
- f = u2.urlopen(url)
- except u2.HTTPError, httperror:
- if httperror.code in (404, 503):
- return None
- else:
- raise CreatorError(httperror)
- except OSError, oserr:
- if oserr.errno == 2:
- return None
- else:
- raise CreatorError(oserr)
- except IOError, oserr:
- if hasattr(oserr, "reason") and oserr.reason.errno == 2:
- return None
- else:
- raise CreatorError(oserr)
- except u2.URLError, err:
- raise CreatorError(err)
- except httplib.HTTPException, e:
- raise CreatorError(e)
-
- # save to file
- licf = open(savepath, "w")
- licf.write(f.read())
- licf.close()
- f.close()
-
- return savepath
-
- def _pager_file(savepath):
-
- if os.path.splitext(savepath)[1].upper() in ('.HTM', '.HTML'):
- pagers = ('w3m', 'links', 'lynx', 'less', 'more')
- else:
- pagers = ('less', 'more')
-
- file_showed = False
- for pager in pagers:
- cmd = "%s %s" % (pager, savepath)
- try:
- os.system(cmd)
- except OSError:
- continue
- else:
- file_showed = True
- break
-
- if not file_showed:
- f = open(savepath)
- msger.raw(f.read())
- f.close()
- msger.pause()
-
- # when proxy needed, make urllib2 follow it
- proxy = repo.proxy
- proxy_username = repo.proxy_username
- proxy_password = repo.proxy_password
-
- if not proxy:
- proxy = get_proxy_for(repo.baseurl[0])
-
- handlers = []
- auth_handler = u2.HTTPBasicAuthHandler(u2.HTTPPasswordMgrWithDefaultRealm())
- u2opener = None
- if proxy:
- if proxy_username:
- proxy_netloc = urlparse.urlsplit(proxy).netloc
- if proxy_password:
- proxy_url = 'http://%s:%s@%s' % (proxy_username, proxy_password, proxy_netloc)
- else:
- proxy_url = 'http://%s@%s' % (proxy_username, proxy_netloc)
- else:
- proxy_url = proxy
-
- proxy_support = u2.ProxyHandler({'http': proxy_url,
- 'https': proxy_url,
- 'ftp': proxy_url})
- handlers.append(proxy_support)
-
- # download all remote files to one temp dir
- baseurl = None
- repo_lic_dir = tempfile.mkdtemp(prefix = 'repolic')
-
- for url in repo.baseurl:
- tmphandlers = handlers[:]
-
- (scheme, host, path, parm, query, frag) = urlparse.urlparse(url.rstrip('/') + '/')
- if scheme not in ("http", "https", "ftp", "ftps", "file"):
- raise CreatorError("Error: invalid url %s" % url)
-
- if '@' in host:
- try:
- user_pass, host = host.split('@', 1)
- if ':' in user_pass:
- user, password = user_pass.split(':', 1)
- except ValueError, e:
- raise CreatorError('Bad URL: %s' % url)
-
- msger.verbose("adding HTTP auth: %s, XXXXXXXX" %(user))
- auth_handler.add_password(None, host, user, password)
- tmphandlers.append(auth_handler)
- url = scheme + "://" + host + path + parm + query + frag
-
- if tmphandlers:
- u2opener = u2.build_opener(*tmphandlers)
-
- # try to download
- repo_eula_url = urlparse.urljoin(url, "LICENSE.txt")
- repo_eula_path = _check_and_download_url(
- u2opener,
- repo_eula_url,
- os.path.join(repo_lic_dir, repo.id + '_LICENSE.txt'))
- if repo_eula_path:
- # found
- baseurl = url
- break
-
- if not baseurl:
- shutil.rmtree(repo_lic_dir) #cleanup
- return True
-
- # show the license file
- msger.info('For the software packages in this yum repo:')
- msger.info(' %s: %s' % (name, baseurl))
- msger.info('There is an "End User License Agreement" file that need to be checked.')
- msger.info('Please read the terms and conditions outlined in it and answer the followed qustions.')
- msger.pause()
-
- _pager_file(repo_eula_path)
-
- # Asking for the "Accept/Decline"
- if not msger.ask('Would you agree to the terms and conditions outlined in the above End User License Agreement?'):
- msger.warning('Will not install pkgs from this repo.')
- shutil.rmtree(repo_lic_dir) #cleanup
- return False
-
- # try to find support_info.html for extra infomation
- repo_info_url = urlparse.urljoin(baseurl, "support_info.html")
- repo_info_path = _check_and_download_url(
- u2opener,
- repo_info_url,
- os.path.join(repo_lic_dir, repo.id + '_support_info.html'))
- if repo_info_path:
- msger.info('There is one more file in the repo for additional support information, please read it')
- msger.pause()
- _pager_file(repo_info_path)
-
- #cleanup
- shutil.rmtree(repo_lic_dir)
- return True
diff --git a/scripts/lib/mic/imager/__init__.py b/scripts/lib/recipetool/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/mic/imager/__init__.py
+++ b/scripts/lib/recipetool/__init__.py
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
new file mode 100644
index 0000000000..38f5eadaf5
--- /dev/null
+++ b/scripts/lib/recipetool/create.py
@@ -0,0 +1,415 @@
+# Recipe creation tool - create command plugin
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import sys
+import os
+import argparse
+import glob
+import fnmatch
+import re
+import logging
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+plugins = None
+
+def plugin_init(pluginlist):
+ # Take a reference to the list so we can use it later
+ global plugins
+ plugins = pluginlist
+
+def tinfoil_init(instance):
+ global tinfoil
+ tinfoil = instance
+
+class RecipeHandler():
+ @staticmethod
+ def checkfiles(path, speclist):
+ results = []
+ for spec in speclist:
+ results.extend(glob.glob(os.path.join(path, spec)))
+ return results
+
+ def genfunction(self, outlines, funcname, content):
+ outlines.append('%s () {' % funcname)
+ for line in content:
+ outlines.append('\t%s' % line)
+ outlines.append('}')
+ outlines.append('')
+
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ return False
+
+
+
+def fetch_source(uri, destdir):
+ import bb.data
+ bb.utils.mkdirhier(destdir)
+ localdata = bb.data.createCopy(tinfoil.config_data)
+ bb.data.update_data(localdata)
+ localdata.setVar('BB_STRICT_CHECKSUM', '')
+ localdata.setVar('SRCREV', '${AUTOREV}')
+ ret = (None, None)
+ olddir = os.getcwd()
+ try:
+ fetcher = bb.fetch2.Fetch([uri], localdata)
+ for u in fetcher.ud:
+ ud = fetcher.ud[u]
+ ud.ignore_checksums = True
+ fetcher.download()
+ fetcher.unpack(destdir)
+ for u in fetcher.ud:
+ ud = fetcher.ud[u]
+ if ud.method.recommends_checksum(ud):
+ md5value = bb.utils.md5_file(ud.localpath)
+ sha256value = bb.utils.sha256_file(ud.localpath)
+ ret = (md5value, sha256value)
+ except bb.fetch2.BBFetchException, e:
+ raise bb.build.FuncFailed(e)
+ finally:
+ os.chdir(olddir)
+ return ret
+
+def supports_srcrev(uri):
+ localdata = bb.data.createCopy(tinfoil.config_data)
+ bb.data.update_data(localdata)
+ fetcher = bb.fetch2.Fetch([uri], localdata)
+ urldata = fetcher.ud
+ for u in urldata:
+ if urldata[u].method.supports_srcrev():
+ return True
+ return False
+
+def create_recipe(args):
+ import bb.process
+ import tempfile
+ import shutil
+
+ pkgarch = ""
+ if args.machine:
+ pkgarch = "${MACHINE_ARCH}"
+
+ checksums = (None, None)
+ tempsrc = ''
+ srcsubdir = ''
+ if '://' in args.source:
+ # Fetch a URL
+ srcuri = args.source
+ if args.externalsrc:
+ srctree = args.externalsrc
+ else:
+ tempsrc = tempfile.mkdtemp(prefix='recipetool-')
+ srctree = tempsrc
+ logger.info('Fetching %s...' % srcuri)
+ checksums = fetch_source(args.source, srctree)
+ dirlist = os.listdir(srctree)
+ if 'git.indirectionsymlink' in dirlist:
+ dirlist.remove('git.indirectionsymlink')
+ if len(dirlist) == 1 and os.path.isdir(os.path.join(srctree, dirlist[0])):
+ # We unpacked a single directory, so we should use that
+ srcsubdir = dirlist[0]
+ srctree = os.path.join(srctree, srcsubdir)
+ else:
+ # Assume we're pointing to an existing source tree
+ if args.externalsrc:
+ logger.error('externalsrc cannot be specified if source is a directory')
+ sys.exit(1)
+ if not os.path.isdir(args.source):
+ logger.error('Invalid source directory %s' % args.source)
+ sys.exit(1)
+ srcuri = ''
+ srctree = args.source
+
+ outfile = args.outfile
+ if outfile and outfile != '-':
+ if os.path.exists(outfile):
+ logger.error('Output file %s already exists' % outfile)
+ sys.exit(1)
+
+ lines_before = []
+ lines_after = []
+
+ lines_before.append('# Recipe created by %s' % os.path.basename(sys.argv[0]))
+ lines_before.append('# This is the basis of a recipe and may need further editing in order to be fully functional.')
+ lines_before.append('# (Feel free to remove these comments when editing.)')
+ lines_before.append('#')
+
+ licvalues = guess_license(srctree)
+ lic_files_chksum = []
+ if licvalues:
+ licenses = []
+ for licvalue in licvalues:
+ if not licvalue[0] in licenses:
+ licenses.append(licvalue[0])
+ lic_files_chksum.append('file://%s;md5=%s' % (licvalue[1], licvalue[2]))
+ lines_before.append('# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is')
+ lines_before.append('# your responsibility to verify that the values are complete and correct.')
+ if len(licvalues) > 1:
+ lines_before.append('#')
+ lines_before.append('# NOTE: multiple licenses have been detected; if that is correct you should separate')
+ lines_before.append('# these in the LICENSE value using & if the multiple licenses all apply, or | if there')
+ lines_before.append('# is a choice between the multiple licenses. If in doubt, check the accompanying')
+ lines_before.append('# documentation to determine which situation is applicable.')
+ else:
+ lines_before.append('# Unable to find any files that looked like license statements. Check the accompanying')
+ lines_before.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.')
+ lines_before.append('#')
+ lines_before.append('# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if')
+ lines_before.append('# this is not accurate with respect to the licensing of the software being built (it')
+ lines_before.append('# will not be in most cases) you must specify the correct value before using this')
+ lines_before.append('# recipe for anything other than initial testing/development!')
+ licenses = ['CLOSED']
+ lines_before.append('LICENSE = "%s"' % ' '.join(licenses))
+ lines_before.append('LIC_FILES_CHKSUM = "%s"' % ' \\\n '.join(lic_files_chksum))
+ lines_before.append('')
+
+ # FIXME This is kind of a hack, we probably ought to be using bitbake to do this
+ # we'd also want a way to automatically set outfile based upon auto-detecting these values from the source if possible
+ recipefn = os.path.splitext(os.path.basename(outfile))[0]
+ fnsplit = recipefn.split('_')
+ if len(fnsplit) > 1:
+ pn = fnsplit[0]
+ pv = fnsplit[1]
+ else:
+ pn = recipefn
+ pv = None
+
+ if srcuri:
+ if pv and pv not in 'git svn hg'.split():
+ srcuri = srcuri.replace(pv, '${PV}')
+ else:
+ lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)')
+ lines_before.append('SRC_URI = "%s"' % srcuri)
+ (md5value, sha256value) = checksums
+ if md5value:
+ lines_before.append('SRC_URI[md5sum] = "%s"' % md5value)
+ if sha256value:
+ lines_before.append('SRC_URI[sha256sum] = "%s"' % sha256value)
+ if srcuri and supports_srcrev(srcuri):
+ lines_before.append('')
+ lines_before.append('# Modify these as desired')
+ lines_before.append('PV = "1.0+git${SRCPV}"')
+ lines_before.append('SRCREV = "${AUTOREV}"')
+ lines_before.append('')
+
+ if srcsubdir and pv:
+ if srcsubdir == "%s-%s" % (pn, pv):
+ # This would be the default, so we don't need to set S in the recipe
+ srcsubdir = ''
+ if srcsubdir:
+ if pv and pv not in 'git svn hg'.split():
+ srcsubdir = srcsubdir.replace(pv, '${PV}')
+ lines_before.append('S = "${WORKDIR}/%s"' % srcsubdir)
+ lines_before.append('')
+
+ if pkgarch:
+ lines_after.append('PACKAGE_ARCH = "%s"' % pkgarch)
+ lines_after.append('')
+
+ # Find all plugins that want to register handlers
+ handlers = []
+ for plugin in plugins:
+ if hasattr(plugin, 'register_recipe_handlers'):
+ plugin.register_recipe_handlers(handlers)
+
+ # Apply the handlers
+ classes = []
+ handled = []
+ for handler in handlers:
+ handler.process(srctree, classes, lines_before, lines_after, handled)
+
+ outlines = []
+ outlines.extend(lines_before)
+ if classes:
+ outlines.append('inherit %s' % ' '.join(classes))
+ outlines.append('')
+ outlines.extend(lines_after)
+
+ if outfile == '-':
+ sys.stdout.write('\n'.join(outlines) + '\n')
+ else:
+ with open(outfile, 'w') as f:
+ f.write('\n'.join(outlines) + '\n')
+ logger.info('Recipe %s has been created; further editing may be required to make it fully functional' % outfile)
+
+ if tempsrc:
+ shutil.rmtree(tempsrc)
+
+ return 0
+
+def get_license_md5sums(d, static_only=False):
+ import bb.utils
+ md5sums = {}
+ if not static_only:
+ # Gather md5sums of license files in common license dir
+ commonlicdir = d.getVar('COMMON_LICENSE_DIR', True)
+ for fn in os.listdir(commonlicdir):
+ md5value = bb.utils.md5_file(os.path.join(commonlicdir, fn))
+ md5sums[md5value] = fn
+ # The following were extracted from common values in various recipes
+ # (double checking the license against the license file itself, not just
+ # the LICENSE value in the recipe)
+ md5sums['94d55d512a9ba36caa9b7df079bae19f'] = 'GPLv2'
+ md5sums['b234ee4d69f5fce4486a80fdaf4a4263'] = 'GPLv2'
+ md5sums['59530bdf33659b29e73d4adb9f9f6552'] = 'GPLv2'
+ md5sums['0636e73ff0215e8d672dc4c32c317bb3'] = 'GPLv2'
+ md5sums['eb723b61539feef013de476e68b5c50a'] = 'GPLv2'
+ md5sums['751419260aa954499f7abaabaa882bbe'] = 'GPLv2'
+ md5sums['393a5ca445f6965873eca0259a17f833'] = 'GPLv2'
+ md5sums['12f884d2ae1ff87c09e5b7ccc2c4ca7e'] = 'GPLv2'
+ md5sums['8ca43cbc842c2336e835926c2166c28b'] = 'GPLv2'
+ md5sums['ebb5c50ab7cab4baeffba14977030c07'] = 'GPLv2'
+ md5sums['c93c0550bd3173f4504b2cbd8991e50b'] = 'GPLv2'
+ md5sums['9ac2e7cff1ddaf48b6eab6028f23ef88'] = 'GPLv2'
+ md5sums['4325afd396febcb659c36b49533135d4'] = 'GPLv2'
+ md5sums['18810669f13b87348459e611d31ab760'] = 'GPLv2'
+ md5sums['d7810fab7487fb0aad327b76f1be7cd7'] = 'GPLv2' # the Linux kernel's COPYING file
+ md5sums['bbb461211a33b134d42ed5ee802b37ff'] = 'LGPLv2.1'
+ md5sums['7fbc338309ac38fefcd64b04bb903e34'] = 'LGPLv2.1'
+ md5sums['4fbd65380cdd255951079008b364516c'] = 'LGPLv2.1'
+ md5sums['2d5025d4aa3495befef8f17206a5b0a1'] = 'LGPLv2.1'
+ md5sums['fbc093901857fcd118f065f900982c24'] = 'LGPLv2.1'
+ md5sums['a6f89e2100d9b6cdffcea4f398e37343'] = 'LGPLv2.1'
+ md5sums['d8045f3b8f929c1cb29a1e3fd737b499'] = 'LGPLv2.1'
+ md5sums['fad9b3332be894bab9bc501572864b29'] = 'LGPLv2.1'
+ md5sums['3bf50002aefd002f49e7bb854063f7e7'] = 'LGPLv2'
+ md5sums['9f604d8a4f8e74f4f5140845a21b6674'] = 'LGPLv2'
+ md5sums['5f30f0716dfdd0d91eb439ebec522ec2'] = 'LGPLv2'
+ md5sums['55ca817ccb7d5b5b66355690e9abc605'] = 'LGPLv2'
+ md5sums['252890d9eee26aab7b432e8b8a616475'] = 'LGPLv2'
+ md5sums['d32239bcb673463ab874e80d47fae504'] = 'GPLv3'
+ md5sums['f27defe1e96c2e1ecd4e0c9be8967949'] = 'GPLv3'
+ md5sums['6a6a8e020838b23406c81b19c1d46df6'] = 'LGPLv3'
+ md5sums['3b83ef96387f14655fc854ddc3c6bd57'] = 'Apache-2.0'
+ md5sums['385c55653886acac3821999a3ccd17b3'] = 'Artistic-1.0 | GPL-2.0' # some perl modules
+ return md5sums
+
+def guess_license(srctree):
+ import bb
+ md5sums = get_license_md5sums(tinfoil.config_data)
+
+ licenses = []
+ licspecs = ['LICENSE*', 'COPYING*', '*[Ll]icense*', 'LICENCE*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*']
+ licfiles = []
+ for root, dirs, files in os.walk(srctree):
+ for fn in files:
+ for spec in licspecs:
+ if fnmatch.fnmatch(fn, spec):
+ licfiles.append(os.path.join(root, fn))
+ for licfile in licfiles:
+ md5value = bb.utils.md5_file(licfile)
+ license = md5sums.get(md5value, 'Unknown')
+ licenses.append((license, os.path.relpath(licfile, srctree), md5value))
+
+ # FIXME should we grab at least one source file with a license header and add that too?
+
+ return licenses
+
+def read_pkgconfig_provides(d):
+ pkgdatadir = d.getVar('PKGDATA_DIR', True)
+ pkgmap = {}
+ for fn in glob.glob(os.path.join(pkgdatadir, 'shlibs2', '*.pclist')):
+ with open(fn, 'r') as f:
+ for line in f:
+ pkgmap[os.path.basename(line.rstrip())] = os.path.splitext(os.path.basename(fn))[0]
+ recipemap = {}
+ for pc, pkg in pkgmap.iteritems():
+ pkgdatafile = os.path.join(pkgdatadir, 'runtime', pkg)
+ if os.path.exists(pkgdatafile):
+ with open(pkgdatafile, 'r') as f:
+ for line in f:
+ if line.startswith('PN: '):
+ recipemap[pc] = line.split(':', 1)[1].strip()
+ return recipemap
+
+def convert_pkginfo(pkginfofile):
+ values = {}
+ with open(pkginfofile, 'r') as f:
+ indesc = False
+ for line in f:
+ if indesc:
+ if line.strip():
+ values['DESCRIPTION'] += ' ' + line.strip()
+ else:
+ indesc = False
+ else:
+ splitline = line.split(': ', 1)
+ key = line[0]
+ value = line[1]
+ if key == 'LICENSE':
+ for dep in value.split(','):
+ dep = dep.split()[0]
+ mapped = depmap.get(dep, '')
+ if mapped:
+ depends.append(mapped)
+ elif key == 'License':
+ values['LICENSE'] = value
+ elif key == 'Summary':
+ values['SUMMARY'] = value
+ elif key == 'Description':
+ values['DESCRIPTION'] = value
+ indesc = True
+ return values
+
+def convert_debian(debpath):
+ # FIXME extend this mapping - perhaps use distro_alias.inc?
+ depmap = {'libz-dev': 'zlib'}
+
+ values = {}
+ depends = []
+ with open(os.path.join(debpath, 'control')) as f:
+ indesc = False
+ for line in f:
+ if indesc:
+ if line.strip():
+ if line.startswith(' This package contains'):
+ indesc = False
+ else:
+ values['DESCRIPTION'] += ' ' + line.strip()
+ else:
+ indesc = False
+ else:
+ splitline = line.split(':', 1)
+ key = line[0]
+ value = line[1]
+ if key == 'Build-Depends':
+ for dep in value.split(','):
+ dep = dep.split()[0]
+ mapped = depmap.get(dep, '')
+ if mapped:
+ depends.append(mapped)
+ elif key == 'Section':
+ values['SECTION'] = value
+ elif key == 'Description':
+ values['SUMMARY'] = value
+ indesc = True
+
+ if depends:
+ values['DEPENDS'] = ' '.join(depends)
+
+ return values
+
+
+def register_command(subparsers):
+ parser_create = subparsers.add_parser('create', help='Create a new recipe')
+ parser_create.add_argument('source', help='Path or URL to source')
+ parser_create.add_argument('-o', '--outfile', help='Full path and filename to recipe to add', required=True)
+ parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
+ parser_create.add_argument('-x', '--externalsrc', help='Assuming source is a URL, fetch it and extract it to the specified directory')
+ parser_create.set_defaults(func=create_recipe)
+
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
new file mode 100644
index 0000000000..6c9e0efa2a
--- /dev/null
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -0,0 +1,319 @@
+# Recipe creation tool - create command build system handlers
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import re
+import logging
+from recipetool.create import RecipeHandler, read_pkgconfig_provides
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+
+def tinfoil_init(instance):
+ global tinfoil
+ tinfoil = instance
+
+class CmakeRecipeHandler(RecipeHandler):
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ if RecipeHandler.checkfiles(srctree, ['CMakeLists.txt']):
+ classes.append('cmake')
+ lines_after.append('# Specify any options you want to pass to cmake using EXTRA_OECMAKE:')
+ lines_after.append('EXTRA_OECMAKE = ""')
+ lines_after.append('')
+ handled.append('buildsystem')
+ return True
+ return False
+
+class SconsRecipeHandler(RecipeHandler):
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ if RecipeHandler.checkfiles(srctree, ['SConstruct', 'Sconstruct', 'sconstruct']):
+ classes.append('scons')
+ lines_after.append('# Specify any options you want to pass to scons using EXTRA_OESCONS:')
+ lines_after.append('EXTRA_OESCONS = ""')
+ lines_after.append('')
+ handled.append('buildsystem')
+ return True
+ return False
+
+class QmakeRecipeHandler(RecipeHandler):
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ if RecipeHandler.checkfiles(srctree, ['*.pro']):
+ classes.append('qmake2')
+ handled.append('buildsystem')
+ return True
+ return False
+
+class AutotoolsRecipeHandler(RecipeHandler):
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ autoconf = False
+ if RecipeHandler.checkfiles(srctree, ['configure.ac', 'configure.in']):
+ autoconf = True
+ values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree)
+ classes.extend(values.pop('inherit', '').split())
+ for var, value in values.iteritems():
+ lines_before.append('%s = "%s"' % (var, value))
+ else:
+ conffile = RecipeHandler.checkfiles(srctree, ['configure'])
+ if conffile:
+ # Check if this is just a pre-generated autoconf configure script
+ with open(conffile[0], 'r') as f:
+ for i in range(1, 10):
+ if 'Generated by GNU Autoconf' in f.readline():
+ autoconf = True
+ break
+
+ if autoconf:
+ lines_before.append('# NOTE: if this software is not capable of being built in a separate build directory')
+ lines_before.append('# from the source, you should replace autotools with autotools-brokensep in the')
+ lines_before.append('# inherit line')
+ classes.append('autotools')
+ lines_after.append('# Specify any options you want to pass to the configure script using EXTRA_OECONF:')
+ lines_after.append('EXTRA_OECONF = ""')
+ lines_after.append('')
+ handled.append('buildsystem')
+ return True
+
+ return False
+
+ @staticmethod
+ def extract_autotools_deps(outlines, srctree, acfile=None):
+ import shlex
+ import oe.package
+
+ values = {}
+ inherits = []
+
+ # FIXME this mapping is very thin
+ progmap = {'flex': 'flex-native',
+ 'bison': 'bison-native',
+ 'm4': 'm4-native'}
+ progclassmap = {'gconftool-2': 'gconf',
+ 'pkg-config': 'pkgconfig'}
+
+ ignoredeps = ['gcc-runtime', 'glibc', 'uclibc']
+
+ pkg_re = re.compile('PKG_CHECK_MODULES\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)[),].*')
+ lib_re = re.compile('AC_CHECK_LIB\(\[?([a-zA-Z0-9]*)\]?, .*')
+ progs_re = re.compile('_PROGS?\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)\]?[),].*')
+ dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?')
+
+ # Build up lib library->package mapping
+ shlib_providers = oe.package.read_shlib_providers(tinfoil.config_data)
+ libdir = tinfoil.config_data.getVar('libdir', True)
+ base_libdir = tinfoil.config_data.getVar('base_libdir', True)
+ libpaths = list(set([base_libdir, libdir]))
+ libname_re = re.compile('^lib(.+)\.so.*$')
+ pkglibmap = {}
+ for lib, item in shlib_providers.iteritems():
+ for path, pkg in item.iteritems():
+ if path in libpaths:
+ res = libname_re.match(lib)
+ if res:
+ libname = res.group(1)
+ if not libname in pkglibmap:
+ pkglibmap[libname] = pkg[0]
+ else:
+ logger.debug('unable to extract library name from %s' % lib)
+
+ # Now turn it into a library->recipe mapping
+ recipelibmap = {}
+ pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ for libname, pkg in pkglibmap.iteritems():
+ try:
+ with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
+ for line in f:
+ if line.startswith('PN:'):
+ recipelibmap[libname] = line.split(':', 1)[-1].strip()
+ break
+ except IOError as ioe:
+ if ioe.errno == 2:
+ logger.warn('unable to find a pkgdata file for package %s' % pkg)
+ else:
+ raise
+
+ # Since a configure.ac file is essentially a program, this is only ever going to be
+ # a hack unfortunately; but it ought to be enough of an approximation
+ if acfile:
+ srcfiles = [acfile]
+ else:
+ srcfiles = RecipeHandler.checkfiles(srctree, ['configure.ac', 'configure.in'])
+ pcdeps = []
+ deps = []
+ unmapped = []
+ unmappedlibs = []
+ with open(srcfiles[0], 'r') as f:
+ for line in f:
+ if 'PKG_CHECK_MODULES' in line:
+ res = pkg_re.search(line)
+ if res:
+ res = dep_re.findall(res.group(1))
+ if res:
+ pcdeps.extend([x[0] for x in res])
+ inherits.append('pkgconfig')
+ if line.lstrip().startswith('AM_GNU_GETTEXT'):
+ inherits.append('gettext')
+ elif 'AC_CHECK_PROG' in line or 'AC_PATH_PROG' in line:
+ res = progs_re.search(line)
+ if res:
+ for prog in shlex.split(res.group(1)):
+ prog = prog.split()[0]
+ progclass = progclassmap.get(prog, None)
+ if progclass:
+ inherits.append(progclass)
+ else:
+ progdep = progmap.get(prog, None)
+ if progdep:
+ deps.append(progdep)
+ else:
+ if not prog.startswith('$'):
+ unmapped.append(prog)
+ elif 'AC_CHECK_LIB' in line:
+ res = lib_re.search(line)
+ if res:
+ lib = res.group(1)
+ libdep = recipelibmap.get(lib, None)
+ if libdep:
+ deps.append(libdep)
+ else:
+ if libdep is None:
+ if not lib.startswith('$'):
+ unmappedlibs.append(lib)
+ elif 'AC_PATH_X' in line:
+ deps.append('libx11')
+
+ if unmapped:
+ outlines.append('# NOTE: the following prog dependencies are unknown, ignoring: %s' % ' '.join(unmapped))
+
+ if unmappedlibs:
+ outlines.append('# NOTE: the following library dependencies are unknown, ignoring: %s' % ' '.join(unmappedlibs))
+ outlines.append('# (this is based on recipes that have previously been built and packaged)')
+
+ recipemap = read_pkgconfig_provides(tinfoil.config_data)
+ unmapped = []
+ for pcdep in pcdeps:
+ recipe = recipemap.get(pcdep, None)
+ if recipe:
+ deps.append(recipe)
+ else:
+ if not pcdep.startswith('$'):
+ unmapped.append(pcdep)
+
+ deps = set(deps).difference(set(ignoredeps))
+
+ if unmapped:
+ outlines.append('# NOTE: unable to map the following pkg-config dependencies: %s' % ' '.join(unmapped))
+ outlines.append('# (this is based on recipes that have previously been built and packaged)')
+
+ if deps:
+ values['DEPENDS'] = ' '.join(deps)
+
+ if inherits:
+ values['inherit'] = ' '.join(list(set(inherits)))
+
+ return values
+
+
+class MakefileRecipeHandler(RecipeHandler):
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ makefile = RecipeHandler.checkfiles(srctree, ['Makefile'])
+ if makefile:
+ lines_after.append('# NOTE: this is a Makefile-only piece of software, so we cannot generate much of the')
+ lines_after.append('# recipe automatically - you will need to examine the Makefile yourself and ensure')
+ lines_after.append('# that the appropriate arguments are passed in.')
+ lines_after.append('')
+
+ scanfile = os.path.join(srctree, 'configure.scan')
+ skipscan = False
+ try:
+ stdout, stderr = bb.process.run('autoscan', cwd=srctree, shell=True)
+ except bb.process.ExecutionError as e:
+ skipscan = True
+ if scanfile and os.path.exists(scanfile):
+ values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, acfile=scanfile)
+ classes.extend(values.pop('inherit', '').split())
+ for var, value in values.iteritems():
+ if var == 'DEPENDS':
+ lines_before.append('# NOTE: some of these dependencies may be optional, check the Makefile and/or upstream documentation')
+ lines_before.append('%s = "%s"' % (var, value))
+ lines_before.append('')
+ for f in ['configure.scan', 'autoscan.log']:
+ fp = os.path.join(srctree, f)
+ if os.path.exists(fp):
+ os.remove(fp)
+
+ self.genfunction(lines_after, 'do_configure', ['# Specify any needed configure commands here'])
+
+ func = []
+ func.append('# You will almost certainly need to add additional arguments here')
+ func.append('oe_runmake')
+ self.genfunction(lines_after, 'do_compile', func)
+
+ installtarget = True
+ try:
+ stdout, stderr = bb.process.run('make -qn install', cwd=srctree, shell=True)
+ except bb.process.ExecutionError as e:
+ if e.exitcode != 1:
+ installtarget = False
+ func = []
+ if installtarget:
+ func.append('# This is a guess; additional arguments may be required')
+ makeargs = ''
+ with open(makefile[0], 'r') as f:
+ for i in range(1, 100):
+ if 'DESTDIR' in f.readline():
+ makeargs += " 'DESTDIR=${D}'"
+ break
+ func.append('oe_runmake install%s' % makeargs)
+ else:
+ func.append('# NOTE: unable to determine what to put here - there is a Makefile but no')
+ func.append('# target named "install", so you will need to define this yourself')
+ self.genfunction(lines_after, 'do_install', func)
+
+ handled.append('buildsystem')
+ else:
+ lines_after.append('# NOTE: no Makefile found, unable to determine what needs to be done')
+ lines_after.append('')
+ self.genfunction(lines_after, 'do_configure', ['# Specify any needed configure commands here'])
+ self.genfunction(lines_after, 'do_compile', ['# Specify compilation commands here'])
+ self.genfunction(lines_after, 'do_install', ['# Specify install commands here'])
+
+
+def plugin_init(pluginlist):
+ pass
+
+def register_recipe_handlers(handlers):
+ # These are in a specific order so that the right one is detected first
+ handlers.append(CmakeRecipeHandler())
+ handlers.append(AutotoolsRecipeHandler())
+ handlers.append(SconsRecipeHandler())
+ handlers.append(QmakeRecipeHandler())
+ handlers.append(MakefileRecipeHandler())
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
new file mode 100644
index 0000000000..f4f4212559
--- /dev/null
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -0,0 +1,720 @@
+# Recipe creation tool - create build system handler for python
+#
+# Copyright (C) 2015 Mentor Graphics Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import ast
+import codecs
+import collections
+import distutils.command.build_py
+import email
+import imp
+import glob
+import itertools
+import logging
+import os
+import re
+import sys
+import subprocess
+from recipetool.create import RecipeHandler
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+
+
+def tinfoil_init(instance):
+ global tinfoil
+ tinfoil = instance
+
+
+class PythonRecipeHandler(RecipeHandler):
+ base_pkgdeps = ['python-core']
+ excluded_pkgdeps = ['python-dbg']
+ # os.path is provided by python-core
+ assume_provided = ['builtins', 'os.path']
+ # Assumes that the host python builtin_module_names is sane for target too
+ assume_provided = assume_provided + list(sys.builtin_module_names)
+
+ bbvar_map = {
+ 'Name': 'PN',
+ 'Version': 'PV',
+ 'Home-page': 'HOMEPAGE',
+ 'Summary': 'SUMMARY',
+ 'Description': 'DESCRIPTION',
+ 'License': 'LICENSE',
+ 'Requires': 'RDEPENDS_${PN}',
+ 'Provides': 'RPROVIDES_${PN}',
+ 'Obsoletes': 'RREPLACES_${PN}',
+ }
+ # PN/PV are already set by recipetool core & desc can be extremely long
+ excluded_fields = [
+ 'Name',
+ 'Version',
+ 'Description',
+ ]
+ setup_parse_map = {
+ 'Url': 'Home-page',
+ 'Classifiers': 'Classifier',
+ 'Description': 'Summary',
+ }
+ setuparg_map = {
+ 'Home-page': 'url',
+ 'Classifier': 'classifiers',
+ 'Summary': 'description',
+ 'Description': 'long-description',
+ }
+ # Values which are lists, used by the setup.py argument based metadata
+ # extraction method, to determine how to process the setup.py output.
+ setuparg_list_fields = [
+ 'Classifier',
+ 'Requires',
+ 'Provides',
+ 'Obsoletes',
+ 'Platform',
+ 'Supported-Platform',
+ ]
+ setuparg_multi_line_values = ['Description']
+ replacements = [
+ ('License', r' ', '-'),
+ ('License', r'-License$', ''),
+ ('License', r'^UNKNOWN$', ''),
+
+ # Remove currently unhandled version numbers from these variables
+ ('Requires', r' *\([^)]*\)', ''),
+ ('Provides', r' *\([^)]*\)', ''),
+ ('Obsoletes', r' *\([^)]*\)', ''),
+ ('Install-requires', r'^([^><= ]+).*', r'\1'),
+ ('Extras-require', r'^([^><= ]+).*', r'\1'),
+ ('Tests-require', r'^([^><= ]+).*', r'\1'),
+
+ # Remove unhandled dependency on particular features (e.g. foo[PDF])
+ ('Install-requires', r'\[[^\]]+\]$', ''),
+ ]
+
+ classifier_license_map = {
+ 'License :: OSI Approved :: Academic Free License (AFL)': 'AFL',
+ 'License :: OSI Approved :: Apache Software License': 'Apache',
+ 'License :: OSI Approved :: Apple Public Source License': 'APSL',
+ 'License :: OSI Approved :: Artistic License': 'Artistic',
+ 'License :: OSI Approved :: Attribution Assurance License': 'AAL',
+ 'License :: OSI Approved :: BSD License': 'BSD',
+ 'License :: OSI Approved :: Common Public License': 'CPL',
+ 'License :: OSI Approved :: Eiffel Forum License': 'EFL',
+ 'License :: OSI Approved :: European Union Public Licence 1.0 (EUPL 1.0)': 'EUPL-1.0',
+ 'License :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)': 'EUPL-1.1',
+ 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)': 'AGPL-3.0+',
+ 'License :: OSI Approved :: GNU Affero General Public License v3': 'AGPL-3.0',
+ 'License :: OSI Approved :: GNU Free Documentation License (FDL)': 'GFDL',
+ 'License :: OSI Approved :: GNU General Public License (GPL)': 'GPL',
+ 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)': 'GPL-2.0',
+ 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)': 'GPL-2.0+',
+ 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)': 'GPL-3.0',
+ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)': 'GPL-3.0+',
+ 'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)': 'LGPL-2.0',
+ 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)': 'LGPL-2.0+',
+ 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)': 'LGPL-3.0',
+ 'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)': 'LGPL-3.0+',
+ 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)': 'LGPL',
+ 'License :: OSI Approved :: IBM Public License': 'IPL',
+ 'License :: OSI Approved :: ISC License (ISCL)': 'ISC',
+ 'License :: OSI Approved :: Intel Open Source License': 'Intel',
+ 'License :: OSI Approved :: Jabber Open Source License': 'Jabber',
+ 'License :: OSI Approved :: MIT License': 'MIT',
+ 'License :: OSI Approved :: MITRE Collaborative Virtual Workspace License (CVW)': 'CVWL',
+ 'License :: OSI Approved :: Motosoto License': 'Motosoto',
+ 'License :: OSI Approved :: Mozilla Public License 1.0 (MPL)': 'MPL-1.0',
+ 'License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)': 'MPL-1.1',
+ 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)': 'MPL-2.0',
+ 'License :: OSI Approved :: Nethack General Public License': 'NGPL',
+ 'License :: OSI Approved :: Nokia Open Source License': 'Nokia',
+ 'License :: OSI Approved :: Open Group Test Suite License': 'OGTSL',
+ 'License :: OSI Approved :: Python License (CNRI Python License)': 'CNRI-Python',
+ 'License :: OSI Approved :: Python Software Foundation License': 'PSF',
+ 'License :: OSI Approved :: Qt Public License (QPL)': 'QPL',
+ 'License :: OSI Approved :: Ricoh Source Code Public License': 'RSCPL',
+ 'License :: OSI Approved :: Sleepycat License': 'Sleepycat',
+ 'License :: OSI Approved :: Sun Industry Standards Source License (SISSL)': '-- Sun Industry Standards Source License (SISSL)',
+ 'License :: OSI Approved :: Sun Public License': 'SPL',
+ 'License :: OSI Approved :: University of Illinois/NCSA Open Source License': 'NCSA',
+ 'License :: OSI Approved :: Vovida Software License 1.0': 'VSL-1.0',
+ 'License :: OSI Approved :: W3C License': 'W3C',
+ 'License :: OSI Approved :: X.Net License': 'Xnet',
+ 'License :: OSI Approved :: Zope Public License': 'ZPL',
+ 'License :: OSI Approved :: zlib/libpng License': 'Zlib',
+ }
+
+ def __init__(self):
+ pass
+
+ def process(self, srctree, classes, lines_before, lines_after, handled):
+ if 'buildsystem' in handled:
+ return False
+
+ if not RecipeHandler.checkfiles(srctree, ['setup.py']):
+ return
+
+ # setup.py is always parsed to get at certain required information, such as
+ # distutils vs setuptools
+ #
+ # If egg info is available, we use it for both its PKG-INFO metadata
+ # and for its requires.txt for install_requires.
+ # If PKG-INFO is available but no egg info is, we use that for metadata in preference to
+ # the parsed setup.py, but use the install_requires info from the
+ # parsed setup.py.
+
+ setupscript = os.path.join(srctree, 'setup.py')
+ try:
+ setup_info, uses_setuptools, setup_non_literals, extensions = self.parse_setup_py(setupscript)
+ except Exception:
+ logger.exception("Failed to parse setup.py")
+ setup_info, uses_setuptools, setup_non_literals, extensions = {}, True, [], []
+
+ egginfo = glob.glob(os.path.join(srctree, '*.egg-info'))
+ if egginfo:
+ info = self.get_pkginfo(os.path.join(egginfo[0], 'PKG-INFO'))
+ requires_txt = os.path.join(egginfo[0], 'requires.txt')
+ if os.path.exists(requires_txt):
+ with codecs.open(requires_txt) as f:
+ inst_req = []
+ extras_req = collections.defaultdict(list)
+ current_feature = None
+ for line in f.readlines():
+ line = line.rstrip()
+ if not line:
+ continue
+
+ if line.startswith('['):
+ current_feature = line[1:-1]
+ elif current_feature:
+ extras_req[current_feature].append(line)
+ else:
+ inst_req.append(line)
+ info['Install-requires'] = inst_req
+ info['Extras-require'] = extras_req
+ elif RecipeHandler.checkfiles(srctree, ['PKG-INFO']):
+ info = self.get_pkginfo(os.path.join(srctree, 'PKG-INFO'))
+
+ if setup_info:
+ if 'Install-requires' in setup_info:
+ info['Install-requires'] = setup_info['Install-requires']
+ if 'Extras-require' in setup_info:
+ info['Extras-require'] = setup_info['Extras-require']
+ else:
+ if setup_info:
+ info = setup_info
+ else:
+ info = self.get_setup_args_info(setupscript)
+
+ self.apply_info_replacements(info)
+
+ if uses_setuptools:
+ classes.append('setuptools')
+ else:
+ classes.append('distutils')
+
+ if 'Classifier' in info:
+ licenses = []
+ for classifier in info['Classifier']:
+ if classifier in self.classifier_license_map:
+ license = self.classifier_license_map[classifier]
+ licenses.append(license)
+
+ if licenses:
+ info['License'] = ' & '.join(licenses)
+
+
+ # Map PKG-INFO & setup.py fields to bitbake variables
+ bbinfo = {}
+ for field, values in info.iteritems():
+ if field in self.excluded_fields:
+ continue
+
+ if field not in self.bbvar_map:
+ continue
+
+ if isinstance(values, basestring):
+ value = values
+ else:
+ value = ' '.join(str(v) for v in values if v)
+
+ bbvar = self.bbvar_map[field]
+ if bbvar not in bbinfo and value:
+ bbinfo[bbvar] = value
+
+ comment_lic_line = None
+ for pos, line in enumerate(list(lines_before)):
+ if line.startswith('#') and 'LICENSE' in line:
+ comment_lic_line = pos
+ elif line.startswith('LICENSE =') and 'LICENSE' in bbinfo:
+ if line in ('LICENSE = "Unknown"', 'LICENSE = "CLOSED"'):
+ lines_before[pos] = 'LICENSE = "{}"'.format(bbinfo['LICENSE'])
+ if line == 'LICENSE = "CLOSED"' and comment_lic_line:
+ lines_before[comment_lic_line:pos] = [
+ '# WARNING: the following LICENSE value is a best guess - it is your',
+ '# responsibility to verify that the value is complete and correct.'
+ ]
+ del bbinfo['LICENSE']
+
+ src_uri_line = None
+ for pos, line in enumerate(lines_before):
+ if line.startswith('SRC_URI ='):
+ src_uri_line = pos
+
+ if bbinfo:
+ mdinfo = ['']
+ for k in sorted(bbinfo):
+ v = bbinfo[k]
+ mdinfo.append('{} = "{}"'.format(k, v))
+ lines_before[src_uri_line-1:src_uri_line-1] = mdinfo
+
+ mapped_deps, unmapped_deps = self.scan_setup_python_deps(srctree, setup_info, setup_non_literals)
+
+ extras_req = set()
+ if 'Extras-require' in info:
+ extras_req = info['Extras-require']
+ if extras_req:
+ lines_after.append('# The following configs & dependencies are from setuptools extras_require.')
+ lines_after.append('# These dependencies are optional, hence can be controlled via PACKAGECONFIG.')
+ lines_after.append('# The upstream names may not correspond exactly to bitbake package names.')
+ lines_after.append('#')
+ lines_after.append('# Uncomment this line to enable all the optional features.')
+ lines_after.append('#PACKAGECONFIG ?= "{}"'.format(' '.join(k.lower() for k in extras_req.iterkeys())))
+ for feature, feature_reqs in extras_req.iteritems():
+ unmapped_deps.difference_update(feature_reqs)
+
+ feature_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(feature_reqs))
+ lines_after.append('PACKAGECONFIG[{}] = ",,,{}"'.format(feature.lower(), ' '.join(feature_req_deps)))
+
+ inst_reqs = set()
+ if 'Install-requires' in info:
+ if extras_req:
+ lines_after.append('')
+ inst_reqs = info['Install-requires']
+ if inst_reqs:
+ unmapped_deps.difference_update(inst_reqs)
+
+ inst_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(inst_reqs))
+ lines_after.append('# WARNING: the following rdepends are from setuptools install_requires. These')
+ lines_after.append('# upstream names may not correspond exactly to bitbake package names.')
+ lines_after.append('RDEPENDS_${{PN}} += "{}"'.format(' '.join(inst_req_deps)))
+
+ if mapped_deps:
+ name = info.get('Name')
+ if name and name[0] in mapped_deps:
+ # Attempt to avoid self-reference
+ mapped_deps.remove(name[0])
+ mapped_deps -= set(self.excluded_pkgdeps)
+ if inst_reqs or extras_req:
+ lines_after.append('')
+ lines_after.append('# WARNING: the following rdepends are determined through basic analysis of the')
+ lines_after.append('# python sources, and might not be 100% accurate.')
+ lines_after.append('RDEPENDS_${{PN}} += "{}"'.format(' '.join(sorted(mapped_deps))))
+
+ unmapped_deps -= set(extensions)
+ unmapped_deps -= set(self.assume_provided)
+ if unmapped_deps:
+ if mapped_deps:
+ lines_after.append('')
+ lines_after.append('# WARNING: We were unable to map the following python package/module')
+ lines_after.append('# dependencies to the bitbake packages which include them:')
+ lines_after.extend('# {}'.format(d) for d in sorted(unmapped_deps))
+
+ handled.append('buildsystem')
+
+ def get_pkginfo(self, pkginfo_fn):
+ msg = email.message_from_file(open(pkginfo_fn, 'r'))
+ msginfo = {}
+ for field in msg.keys():
+ values = msg.get_all(field)
+ if len(values) == 1:
+ msginfo[field] = values[0]
+ else:
+ msginfo[field] = values
+ return msginfo
+
+ def parse_setup_py(self, setupscript='./setup.py'):
+ with codecs.open(setupscript) as f:
+ info, imported_modules, non_literals, extensions = gather_setup_info(f)
+
+ def _map(key):
+ key = key.replace('_', '-')
+ key = key[0].upper() + key[1:]
+ if key in self.setup_parse_map:
+ key = self.setup_parse_map[key]
+ return key
+
+ # Naive mapping of setup() arguments to PKG-INFO field names
+ for d in [info, non_literals]:
+ for key, value in d.items():
+ new_key = _map(key)
+ if new_key != key:
+ del d[key]
+ d[new_key] = value
+
+ return info, 'setuptools' in imported_modules, non_literals, extensions
+
+ def get_setup_args_info(self, setupscript='./setup.py'):
+ cmd = ['python', setupscript]
+ info = {}
+ keys = set(self.bbvar_map.keys())
+ keys |= set(self.setuparg_list_fields)
+ keys |= set(self.setuparg_multi_line_values)
+ grouped_keys = itertools.groupby(keys, lambda k: (k in self.setuparg_list_fields, k in self.setuparg_multi_line_values))
+ for index, keys in grouped_keys:
+ if index == (True, False):
+ # Splitlines output for each arg as a list value
+ for key in keys:
+ arg = self.setuparg_map.get(key, key.lower())
+ try:
+ arg_info = self.run_command(cmd + ['--' + arg], cwd=os.path.dirname(setupscript))
+ except (OSError, subprocess.CalledProcessError):
+ pass
+ else:
+ info[key] = [l.rstrip() for l in arg_info.splitlines()]
+ elif index == (False, True):
+ # Entire output for each arg
+ for key in keys:
+ arg = self.setuparg_map.get(key, key.lower())
+ try:
+ arg_info = self.run_command(cmd + ['--' + arg], cwd=os.path.dirname(setupscript))
+ except (OSError, subprocess.CalledProcessError):
+ pass
+ else:
+ info[key] = arg_info
+ else:
+ info.update(self.get_setup_byline(list(keys), setupscript))
+ return info
+
+ def get_setup_byline(self, fields, setupscript='./setup.py'):
+ info = {}
+
+ cmd = ['python', setupscript]
+ cmd.extend('--' + self.setuparg_map.get(f, f.lower()) for f in fields)
+ try:
+ info_lines = self.run_command(cmd, cwd=os.path.dirname(setupscript)).splitlines()
+ except (OSError, subprocess.CalledProcessError):
+ pass
+ else:
+ if len(fields) != len(info_lines):
+ logger.error('Mismatch between setup.py output lines and number of fields')
+ sys.exit(1)
+
+ for lineno, line in enumerate(info_lines):
+ line = line.rstrip()
+ info[fields[lineno]] = line
+ return info
+
+ def apply_info_replacements(self, info):
+ for variable, search, replace in self.replacements:
+ if variable not in info:
+ continue
+
+ def replace_value(search, replace, value):
+ if replace is None:
+ if re.search(search, value):
+ return None
+ else:
+ new_value = re.sub(search, replace, value)
+ if value != new_value:
+ return new_value
+ return value
+
+ value = info[variable]
+ if isinstance(value, basestring):
+ new_value = replace_value(search, replace, value)
+ if new_value is None:
+ del info[variable]
+ elif new_value != value:
+ info[variable] = new_value
+ elif hasattr(value, 'iteritems'):
+ for dkey, dvalue in value.iteritems():
+ new_list = []
+ for pos, a_value in enumerate(dvalue):
+ new_value = replace_value(search, replace, a_value)
+ if new_value is not None and new_value != value:
+ new_list.append(new_value)
+
+ if value != new_list:
+ value[dkey] = new_list
+ else:
+ new_list = []
+ for pos, a_value in enumerate(value):
+ new_value = replace_value(search, replace, a_value)
+ if new_value is not None and new_value != value:
+ new_list.append(new_value)
+
+ if value != new_list:
+ info[variable] = new_list
+
+ def scan_setup_python_deps(self, srctree, setup_info, setup_non_literals):
+ if 'Package-dir' in setup_info:
+ package_dir = setup_info['Package-dir']
+ else:
+ package_dir = {}
+
+ class PackageDir(distutils.command.build_py.build_py):
+ def __init__(self, package_dir):
+ self.package_dir = package_dir
+
+ pd = PackageDir(package_dir)
+ to_scan = []
+ if not any(v in setup_non_literals for v in ['Py-modules', 'Scripts', 'Packages']):
+ if 'Py-modules' in setup_info:
+ for module in setup_info['Py-modules']:
+ try:
+ package, module = module.rsplit('.', 1)
+ except ValueError:
+ package, module = '.', module
+ module_path = os.path.join(pd.get_package_dir(package), module + '.py')
+ to_scan.append(module_path)
+
+ if 'Packages' in setup_info:
+ for package in setup_info['Packages']:
+ to_scan.append(pd.get_package_dir(package))
+
+ if 'Scripts' in setup_info:
+ to_scan.extend(setup_info['Scripts'])
+ else:
+ logger.info("Scanning the entire source tree, as one or more of the following setup keywords are non-literal: py_modules, scripts, packages.")
+
+ if not to_scan:
+ to_scan = ['.']
+
+ logger.info("Scanning paths for packages & dependencies: %s", ', '.join(to_scan))
+
+ provided_packages = self.parse_pkgdata_for_python_packages()
+ scanned_deps = self.scan_python_dependencies([os.path.join(srctree, p) for p in to_scan])
+ mapped_deps, unmapped_deps = set(self.base_pkgdeps), set()
+ for dep in scanned_deps:
+ mapped = provided_packages.get(dep)
+ if mapped:
+ mapped_deps.add(mapped)
+ else:
+ unmapped_deps.add(dep)
+ return mapped_deps, unmapped_deps
+
+ def scan_python_dependencies(self, paths):
+ deps = set()
+ try:
+ dep_output = self.run_command(['pythondeps', '-d'] + paths)
+ except (OSError, subprocess.CalledProcessError):
+ pass
+ else:
+ for line in dep_output.splitlines():
+ line = line.rstrip()
+ dep, filename = line.split('\t', 1)
+ if filename.endswith('/setup.py'):
+ continue
+ deps.add(dep)
+
+ try:
+ provides_output = self.run_command(['pythondeps', '-p'] + paths)
+ except (OSError, subprocess.CalledProcessError):
+ pass
+ else:
+ provides_lines = (l.rstrip() for l in provides_output.splitlines())
+ provides = set(l for l in provides_lines if l and l != 'setup')
+ deps -= provides
+
+ return deps
+
+ def parse_pkgdata_for_python_packages(self):
+ suffixes = [t[0] for t in imp.get_suffixes()]
+ pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+
+ ldata = tinfoil.config_data.createCopy()
+ bb.parse.handle('classes/python-dir.bbclass', ldata, True)
+ python_sitedir = ldata.getVar('PYTHON_SITEPACKAGES_DIR', True)
+
+ dynload_dir = os.path.join(os.path.dirname(python_sitedir), 'lib-dynload')
+ python_dirs = [python_sitedir + os.sep,
+ os.path.join(os.path.dirname(python_sitedir), 'dist-packages') + os.sep,
+ os.path.dirname(python_sitedir) + os.sep]
+ packages = {}
+ for pkgdatafile in glob.glob('{}/runtime/*'.format(pkgdata_dir)):
+ files_info = None
+ with open(pkgdatafile, 'r') as f:
+ for line in f.readlines():
+ field, value = line.split(': ', 1)
+ if field == 'FILES_INFO':
+ files_info = ast.literal_eval(value)
+ break
+ else:
+ continue
+
+ for fn in files_info.iterkeys():
+ for suffix in suffixes:
+ if fn.endswith(suffix):
+ break
+ else:
+ continue
+
+ if fn.startswith(dynload_dir + os.sep):
+ base = os.path.basename(fn)
+ provided = base.split('.', 1)[0]
+ packages[provided] = os.path.basename(pkgdatafile)
+ continue
+
+ for python_dir in python_dirs:
+ if fn.startswith(python_dir):
+ relpath = fn[len(python_dir):]
+ relstart, _, relremaining = relpath.partition(os.sep)
+ if relstart.endswith('.egg'):
+ relpath = relremaining
+ base, _ = os.path.splitext(relpath)
+
+ if '/.debug/' in base:
+ continue
+ if os.path.basename(base) == '__init__':
+ base = os.path.dirname(base)
+ base = base.replace(os.sep + os.sep, os.sep)
+ provided = base.replace(os.sep, '.')
+ packages[provided] = os.path.basename(pkgdatafile)
+ return packages
+
+ @classmethod
+ def run_command(cls, cmd, **popenargs):
+ if 'stderr' not in popenargs:
+ popenargs['stderr'] = subprocess.STDOUT
+ try:
+ return subprocess.check_output(cmd, **popenargs)
+ except OSError as exc:
+ logger.error('Unable to run `{}`: {}', ' '.join(cmd), exc)
+ raise
+ except subprocess.CalledProcessError as exc:
+ logger.error('Unable to run `{}`: {}', ' '.join(cmd), exc.output)
+ raise
+
+
+def gather_setup_info(fileobj):
+ parsed = ast.parse(fileobj.read(), fileobj.name)
+ visitor = SetupScriptVisitor()
+ visitor.visit(parsed)
+
+ non_literals, extensions = {}, []
+ for key, value in visitor.keywords.items():
+ if key == 'ext_modules':
+ if isinstance(value, list):
+ for ext in value:
+ if (isinstance(ext, ast.Call) and
+ isinstance(ext.func, ast.Name) and
+ ext.func.id == 'Extension' and
+ not has_non_literals(ext.args)):
+ extensions.append(ext.args[0])
+ elif has_non_literals(value):
+ non_literals[key] = value
+ del visitor.keywords[key]
+
+ return visitor.keywords, visitor.imported_modules, non_literals, extensions
+
+
+class SetupScriptVisitor(ast.NodeVisitor):
+ def __init__(self):
+ ast.NodeVisitor.__init__(self)
+ self.keywords = {}
+ self.non_literals = []
+ self.imported_modules = set()
+
+ def visit_Expr(self, node):
+ if isinstance(node.value, ast.Call) and \
+ isinstance(node.value.func, ast.Name) and \
+ node.value.func.id == 'setup':
+ self.visit_setup(node.value)
+
+ def visit_setup(self, node):
+ call = LiteralAstTransform().visit(node)
+ self.keywords = call.keywords
+ for k, v in self.keywords.iteritems():
+ if has_non_literals(v):
+ self.non_literals.append(k)
+
+ def visit_Import(self, node):
+ for alias in node.names:
+ self.imported_modules.add(alias.name)
+
+ def visit_ImportFrom(self, node):
+ self.imported_modules.add(node.module)
+
+
+class LiteralAstTransform(ast.NodeTransformer):
+ """Simplify the ast through evaluation of literals."""
+ excluded_fields = ['ctx']
+
+ def visit(self, node):
+ if not isinstance(node, ast.AST):
+ return node
+ else:
+ return ast.NodeTransformer.visit(self, node)
+
+ def generic_visit(self, node):
+ try:
+ return ast.literal_eval(node)
+ except ValueError:
+ for field, value in ast.iter_fields(node):
+ if field in self.excluded_fields:
+ delattr(node, field)
+ if value is None:
+ continue
+
+ if isinstance(value, list):
+ if field in ('keywords', 'kwargs'):
+ new_value = dict((kw.arg, self.visit(kw.value)) for kw in value)
+ else:
+ new_value = [self.visit(i) for i in value]
+ else:
+ new_value = self.visit(value)
+ setattr(node, field, new_value)
+ return node
+
+ def visit_Name(self, node):
+ if hasattr('__builtins__', node.id):
+ return getattr(__builtins__, node.id)
+ else:
+ return self.generic_visit(node)
+
+ def visit_Tuple(self, node):
+ return tuple(self.visit(v) for v in node.elts)
+
+ def visit_List(self, node):
+ return [self.visit(v) for v in node.elts]
+
+ def visit_Set(self, node):
+ return set(self.visit(v) for v in node.elts)
+
+ def visit_Dict(self, node):
+ keys = (self.visit(k) for k in node.keys)
+ values = (self.visit(v) for v in node.values)
+ return dict(zip(keys, values))
+
+
+def has_non_literals(value):
+ if isinstance(value, ast.AST):
+ return True
+ elif isinstance(value, basestring):
+ return False
+ elif hasattr(value, 'itervalues'):
+ return any(has_non_literals(v) for v in value.itervalues())
+ elif hasattr(value, '__iter__'):
+ return any(has_non_literals(v) for v in value)
+
+
+def plugin_init(pluginlist):
+ pass
+
+
+def register_recipe_handlers(handlers):
+ # We need to make sure this is ahead of the makefile fallback handler
+ handlers.insert(0, PythonRecipeHandler())
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
new file mode 100644
index 0000000000..e7861268a5
--- /dev/null
+++ b/scripts/lib/scriptutils.py
@@ -0,0 +1,60 @@
+# Script utility functions
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import sys
+import os
+import logging
+import glob
+
+def logger_create(name):
+ logger = logging.getLogger(name)
+ loggerhandler = logging.StreamHandler()
+ loggerhandler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
+ logger.addHandler(loggerhandler)
+ logger.setLevel(logging.INFO)
+ return logger
+
+def logger_setup_color(logger, color='auto'):
+ from bb.msg import BBLogFormatter
+ console = logging.StreamHandler(sys.stdout)
+ formatter = BBLogFormatter("%(levelname)s: %(message)s")
+ console.setFormatter(formatter)
+ logger.handlers = [console]
+ if color == 'always' or (color=='auto' and console.stream.isatty()):
+ formatter.enable_color()
+
+
+def load_plugins(logger, plugins, pluginpath):
+ import imp
+
+ def load_plugin(name):
+ logger.debug('Loading plugin %s' % name)
+ fp, pathname, description = imp.find_module(name, [pluginpath])
+ try:
+ return imp.load_module(name, fp, pathname, description)
+ finally:
+ if fp:
+ fp.close()
+
+ logger.debug('Loading plugins from %s...' % pluginpath)
+ for fn in glob.glob(os.path.join(pluginpath, '*.py')):
+ name = os.path.splitext(os.path.basename(fn))[0]
+ if name != '__init__':
+ plugin = load_plugin(name)
+ if hasattr(plugin, 'plugin_init'):
+ plugin.plugin_init(plugins)
+ plugins.append(plugin)
diff --git a/scripts/lib/mic/utils/__init__.py b/scripts/lib/wic/3rdparty/pykickstart/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/mic/utils/__init__.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/__init__.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/base.py b/scripts/lib/wic/3rdparty/pykickstart/base.py
index e6c8f56f9d..e6c8f56f9d 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/base.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/base.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py b/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py
index cea3ecef6b..2d94550935 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py
@@ -17,8 +17,4 @@
# subject to the GNU General Public License and may only be used or replicated
# with the express permission of Red Hat, Inc.
#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F12Handler(BaseHandler):
- version = F12
+import bootloader, partition
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py b/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py
index b227fac3be..c2b552f689 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py
@@ -214,52 +214,3 @@ class F15_Bootloader(F14_Bootloader):
op.add_option("--iscrypted", dest="isCrypted", action="store_true", default=False)
op.add_option("--md5pass", action="callback", callback=password_cb, nargs=1, type="string")
return op
-
-class RHEL5_Bootloader(FC4_Bootloader):
- removedKeywords = FC4_Bootloader.removedKeywords
- removedAttrs = FC4_Bootloader.removedAttrs
-
- def __init__(self, writePriority=10, *args, **kwargs):
- FC4_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
- self.hvArgs = kwargs.get("hvArgs", "")
-
- def _getArgsAsStr(self):
- ret = FC4_Bootloader._getArgsAsStr(self)
-
- if self.hvArgs:
- ret += " --hvargs=\"%s\"" %(self.hvArgs,)
-
- return ret
-
- def _getParser(self):
- op = FC4_Bootloader._getParser(self)
- op.add_option("--hvargs", dest="hvArgs", type="string")
- return op
-
-class RHEL6_Bootloader(F12_Bootloader):
- removedKeywords = F12_Bootloader.removedKeywords
- removedAttrs = F12_Bootloader.removedAttrs
-
- def __init__(self, writePriority=10, *args, **kwargs):
- F12_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
- self.isCrypted = kwargs.get("isCrypted", False)
-
- def _getArgsAsStr(self):
- ret = F12_Bootloader._getArgsAsStr(self)
-
- if self.isCrypted:
- ret += " --iscrypted"
-
- return ret
-
- def _getParser(self):
- def password_cb(option, opt_str, value, parser):
- parser.values.isCrypted = True
- parser.values.password = value
-
- op = F12_Bootloader._getParser(self)
- op.add_option("--iscrypted", dest="isCrypted", action="store_true", default=False)
- op.add_option("--md5pass", action="callback", callback=password_cb, nargs=1, type="string")
- return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/partition.py b/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py
index e65e012d02..56b91aa9d9 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/partition.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py
@@ -115,26 +115,6 @@ class FC4_PartData(FC3_PartData):
return retval
-class RHEL5_PartData(FC4_PartData):
- removedKeywords = FC4_PartData.removedKeywords
- removedAttrs = FC4_PartData.removedAttrs
-
- def __init__(self, *args, **kwargs):
- FC4_PartData.__init__(self, *args, **kwargs)
- self.encrypted = kwargs.get("encrypted", False)
- self.passphrase = kwargs.get("passphrase", "")
-
- def _getArgsAsStr(self):
- retval = FC4_PartData._getArgsAsStr(self)
-
- if self.encrypted:
- retval += " --encrypted"
-
- if self.passphrase != "":
- retval += " --passphrase=\"%s\"" % self.passphrase
-
- return retval
-
class F9_PartData(FC4_PartData):
removedKeywords = FC4_PartData.removedKeywords + ["bytesPerInode"]
removedAttrs = FC4_PartData.removedAttrs + ["bytesPerInode"]
@@ -281,25 +261,6 @@ class FC4_Partition(FC3_Partition):
op.add_option("--label", dest="label")
return op
-class RHEL5_Partition(FC4_Partition):
- removedKeywords = FC4_Partition.removedKeywords
- removedAttrs = FC4_Partition.removedAttrs
-
- def __init__(self, writePriority=130, *args, **kwargs):
- FC4_Partition.__init__(self, writePriority, *args, **kwargs)
-
- def part_cb (option, opt_str, value, parser):
- if value.startswith("/dev/"):
- parser.values.ensure_value(option.dest, value[5:])
- else:
- parser.values.ensure_value(option.dest, value)
-
- def _getParser(self):
- op = FC4_Partition._getParser(self)
- op.add_option("--encrypted", action="store_true", default=False)
- op.add_option("--passphrase")
- return op
-
class F9_Partition(FC4_Partition):
removedKeywords = FC4_Partition.removedKeywords
removedAttrs = FC4_Partition.removedAttrs
diff --git a/scripts/lib/mic/3rdparty/pykickstart/constants.py b/scripts/lib/wic/3rdparty/pykickstart/constants.py
index 5e12fc80ec..5e12fc80ec 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/constants.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/constants.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/errors.py b/scripts/lib/wic/3rdparty/pykickstart/errors.py
index a234d99d43..a234d99d43 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/errors.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/errors.py
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc b/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-features.scc
+++ 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 @@
+#
+# Chris Lumens <clumens@redhat.com>
+#
+# Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# General Public License v.2. This program is distributed in the hope that it
+# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
+# trademarks that are incorporated in the source code or documentation are not
+# subject to the GNU General Public License and may only be used or replicated
+# with the express permission of Red Hat, Inc.
+#
+from pykickstart.version import *
+from pykickstart.commands import *
+
+# This map is keyed on kickstart syntax version as provided by
+# pykickstart.version. Within each sub-dict is a mapping from command name
+# to the class that handles it. This is an onto mapping - that is, multiple
+# command names can map to the same class. However, the Handler will ensure
+# that only one instance of each class ever exists.
+commandMap = {
+ # based on f15
+ F16: {
+ "bootloader": bootloader.F15_Bootloader,
+ "part": partition.F14_Partition,
+ "partition": partition.F14_Partition,
+ },
+}
+
+# This map is keyed on kickstart syntax version as provided by
+# pykickstart.version. Within each sub-dict is a mapping from a data object
+# name to the class that provides it. This is a bijective mapping - that is,
+# each name maps to exactly one data class and all data classes have a name.
+# More than one instance of each class is allowed to exist, however.
+dataMap = {
+ F16: {
+ "PartData": partition.F14_PartData,
+ },
+}
diff --git a/scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py b/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py
index 3c52f8d754..3c52f8d754 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/ko.py b/scripts/lib/wic/3rdparty/pykickstart/ko.py
index 1350d19c70..1350d19c70 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/ko.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/ko.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/options.py b/scripts/lib/wic/3rdparty/pykickstart/options.py
index 341c5d7298..341c5d7298 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/options.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/options.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/parser.py b/scripts/lib/wic/3rdparty/pykickstart/parser.py
index 840a448673..9c9674bf73 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/parser.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/parser.py
@@ -38,8 +38,6 @@ import sys
import tempfile
from copy import copy
from optparse import *
-from urlgrabber import urlread
-import urlgrabber.grabber as grabber
import constants
from errors import KickstartError, KickstartParseError, KickstartValueError, formatErrorMsg
@@ -55,87 +53,6 @@ STATE_COMMANDS = "commands"
ver = version.DEVEL
-def _preprocessStateMachine (lineIter):
- l = None
- lineno = 0
-
- # Now open an output kickstart file that we are going to write to one
- # line at a time.
- (outF, outName) = tempfile.mkstemp("-ks.cfg", "", "/tmp")
-
- while True:
- try:
- l = lineIter.next()
- except StopIteration:
- break
-
- # At the end of the file?
- if l == "":
- break
-
- lineno += 1
- url = None
-
- ll = l.strip()
- if not ll.startswith("%ksappend"):
- os.write(outF, l)
- continue
-
- # Try to pull down the remote file.
- try:
- ksurl = ll.split(' ')[1]
- except:
- raise KickstartParseError, formatErrorMsg(lineno, msg=_("Illegal url for %%ksappend: %s") % ll)
-
- try:
- url = grabber.urlopen(ksurl)
- except grabber.URLGrabError, e:
- raise KickstartError, formatErrorMsg(lineno, msg=_("Unable to open %%ksappend file: %s") % e.strerror)
- else:
- # Sanity check result. Sometimes FTP doesn't catch a file
- # is missing.
- try:
- if url.size < 1:
- raise KickstartError, formatErrorMsg(lineno, msg=_("Unable to open %%ksappend file"))
- except:
- raise KickstartError, formatErrorMsg(lineno, msg=_("Unable to open %%ksappend file"))
-
- # If that worked, write the remote file to the output kickstart
- # file in one burst. Then close everything up to get ready to
- # read ahead in the input file. This allows multiple %ksappend
- # lines to exist.
- if url is not None:
- os.write(outF, url.read())
- url.close()
-
- # All done - close the temp file and return its location.
- os.close(outF)
- return outName
-
-def preprocessFromString (s):
- """Preprocess the kickstart file, provided as the string str. This
- method is currently only useful for handling %ksappend lines,
- which need to be fetched before the real kickstart parser can be
- run. Returns the location of the complete kickstart file.
- """
- i = iter(s.splitlines(True) + [""])
- rc = _preprocessStateMachine (i.next)
- return rc
-
-def preprocessKickstart (f):
- """Preprocess the kickstart file, given by the filename file. This
- method is currently only useful for handling %ksappend lines,
- which need to be fetched before the real kickstart parser can be
- run. Returns the location of the complete kickstart file.
- """
- try:
- fh = urlopen(f)
- except grabber.URLGrabError, e:
- raise KickstartError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror)
-
- rc = _preprocessStateMachine (iter(fh.readlines()))
- fh.close()
- return rc
class PutBackIterator(Iterator):
def __init__(self, iterable):
@@ -682,8 +599,8 @@ class KickstartParser:
self.currentdir[self._includeDepth] = cd
try:
- s = urlread(f)
- except grabber.URLGrabError, e:
+ s = file(f).read()
+ except IOError, e:
raise KickstartError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror)
self.readKickstartFromString(s, reset=False)
diff --git a/scripts/lib/mic/3rdparty/pykickstart/sections.py b/scripts/lib/wic/3rdparty/pykickstart/sections.py
index 44df856b8d..44df856b8d 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/sections.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/sections.py
diff --git a/scripts/lib/mic/3rdparty/pykickstart/version.py b/scripts/lib/wic/3rdparty/pykickstart/version.py
index 102cc37d80..8a8e6aad22 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/version.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/version.py
@@ -44,7 +44,6 @@ This module also exports several functions:
have a version= comment in it.
"""
import imputil, re, sys
-from urlgrabber import urlopen
import gettext
_ = lambda x: gettext.ldgettext("pykickstart", x)
@@ -132,34 +131,6 @@ def versionToString(version, skipDevel=False):
raise KickstartVersionError(_("Unsupported version specified: %s") % version)
-def versionFromFile(f):
- """Given a file or URL, look for a line starting with #version= and
- return the version number. If no version is found, return DEVEL.
- """
- v = DEVEL
-
- fh = urlopen(f)
-
- while True:
- try:
- l = fh.readline()
- except StopIteration:
- break
-
- # At the end of the file?
- if l == "":
- break
-
- if l.isspace() or l.strip() == "":
- continue
-
- if l[:9] == "#version=":
- v = stringToVersion(l[9:].rstrip())
- break
-
- fh.close()
- return v
-
def returnClassForVersion(version=DEVEL):
"""Return the class of the syntax handler for version. version can be
either a string or the matching constant. Raises KickstartValueError
diff --git a/scripts/lib/mic/__init__.py b/scripts/lib/wic/__init__.py
index 63c1d9c846..63c1d9c846 100644
--- a/scripts/lib/mic/__init__.py
+++ b/scripts/lib/wic/__init__.py
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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os, sys, re
+import ConfigParser
+
+from wic import msger
+from wic import kickstart
+from wic.utils import misc, runner, errors
+
+
+def get_siteconf():
+ wic_path = os.path.dirname(__file__)
+ eos = wic_path.find('scripts') + len('scripts')
+ scripts_path = wic_path[:eos]
+
+ return scripts_path + "/lib/image/config/wic.conf"
+
+class ConfigMgr(object):
+ DEFAULTS = {'common': {
+ "distro_name": "Default Distribution",
+ "plugin_dir": "/usr/lib/wic/plugins", # TODO use prefix also?
+ },
+ 'create': {
+ "tmpdir": '/var/tmp/wic',
+ "outdir": './wic-output',
+
+ "release": None,
+ "logfile": None,
+ "name_prefix": None,
+ "name_suffix": None,
+ },
+ }
+
+ # make the manager class as singleton
+ _instance = None
+ def __new__(cls, *args, **kwargs):
+ if not cls._instance:
+ cls._instance = super(ConfigMgr, cls).__new__(cls, *args, **kwargs)
+
+ return cls._instance
+
+ def __init__(self, ksconf=None, siteconf=None):
+ # reset config options
+ self.reset()
+
+ if not siteconf:
+ siteconf = get_siteconf()
+
+ # initial options from siteconf
+ self._siteconf = siteconf
+
+ if ksconf:
+ self._ksconf = ksconf
+
+ def reset(self):
+ self.__ksconf = None
+ self.__siteconf = None
+
+ # initialize the values with defaults
+ for sec, vals in self.DEFAULTS.iteritems():
+ setattr(self, sec, vals)
+
+ def __set_ksconf(self, ksconf):
+ if not os.path.isfile(ksconf):
+ msger.error('Cannot find ks file: %s' % ksconf)
+
+ self.__ksconf = ksconf
+ self._parse_kickstart(ksconf)
+ def __get_ksconf(self):
+ return self.__ksconf
+ _ksconf = property(__get_ksconf, __set_ksconf)
+
+ def _parse_kickstart(self, ksconf=None):
+ if not ksconf:
+ return
+
+ ks = kickstart.read_kickstart(ksconf)
+
+ self.create['ks'] = ks
+ self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0]
+
+ self.create['name'] = misc.build_name(ksconf,
+ self.create['release'],
+ self.create['name_prefix'],
+ self.create['name_suffix'])
+
+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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os, sys, re
+from optparse import SUPPRESS_HELP
+
+from wic import msger
+from wic.utils import cmdln, errors
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
+
+
+class Creator(cmdln.Cmdln):
+ """${name}: create an image
+
+ Usage:
+ ${name} SUBCOMMAND <ksfile> [OPTS]
+
+ ${command_list}
+ ${option_list}
+ """
+
+ name = 'wic create(cr)'
+
+ def __init__(self, *args, **kwargs):
+ cmdln.Cmdln.__init__(self, *args, **kwargs)
+ self._subcmds = []
+
+ # get cmds from pluginmgr
+ # mix-in do_subcmd interface
+ for subcmd, klass in pluginmgr.get_plugins('imager').iteritems():
+ if not hasattr(klass, 'do_create'):
+ msger.warning("Unsupported subcmd: %s" % subcmd)
+ continue
+
+ func = getattr(klass, 'do_create')
+ setattr(self.__class__, "do_"+subcmd, func)
+ self._subcmds.append(subcmd)
+
+ def get_optparser(self):
+ optparser = cmdln.CmdlnOptionParser(self)
+ optparser.add_option('-d', '--debug', action='store_true',
+ dest='debug',
+ help=SUPPRESS_HELP)
+ optparser.add_option('-v', '--verbose', action='store_true',
+ dest='verbose',
+ help=SUPPRESS_HELP)
+ optparser.add_option('', '--logfile', type='string', dest='logfile',
+ default=None,
+ help='Path of logfile')
+ optparser.add_option('-c', '--config', type='string', dest='config',
+ default=None,
+ help='Specify config file for wic')
+ optparser.add_option('-o', '--outdir', type='string', action='store',
+ dest='outdir', default=None,
+ help='Output directory')
+ optparser.add_option('', '--tmpfs', action='store_true', dest='enabletmpfs',
+ help='Setup tmpdir as tmpfs to accelerate, experimental'
+ ' feature, use it if you have more than 4G memory')
+ return optparser
+
+ def preoptparse(self, argv):
+ optparser = self.get_optparser()
+
+ largs = []
+ rargs = []
+ while argv:
+ arg = argv.pop(0)
+
+ if arg in ('-h', '--help'):
+ rargs.append(arg)
+
+ elif optparser.has_option(arg):
+ largs.append(arg)
+
+ if optparser.get_option(arg).takes_value():
+ try:
+ largs.append(argv.pop(0))
+ except IndexError:
+ raise errors.Usage("option %s requires arguments" % arg)
+
+ else:
+ if arg.startswith("--"):
+ if "=" in arg:
+ opt = arg.split("=")[0]
+ else:
+ opt = None
+ elif arg.startswith("-") and len(arg) > 2:
+ opt = arg[0:2]
+ else:
+ opt = None
+
+ if opt and optparser.has_option(opt):
+ largs.append(arg)
+ else:
+ rargs.append(arg)
+
+ return largs + rargs
+
+ def postoptparse(self):
+ abspath = lambda pth: os.path.abspath(os.path.expanduser(pth))
+
+ if self.options.verbose:
+ msger.set_loglevel('verbose')
+ if self.options.debug:
+ msger.set_loglevel('debug')
+
+ if self.options.logfile:
+ logfile_abs_path = abspath(self.options.logfile)
+ if os.path.isdir(logfile_abs_path):
+ raise errors.Usage("logfile's path %s should be file"
+ % self.options.logfile)
+ if not os.path.exists(os.path.dirname(logfile_abs_path)):
+ os.makedirs(os.path.dirname(logfile_abs_path))
+ msger.set_interactive(False)
+ msger.set_logfile(logfile_abs_path)
+ configmgr.create['logfile'] = self.options.logfile
+
+ if self.options.config:
+ configmgr.reset()
+ configmgr._siteconf = self.options.config
+
+ if self.options.outdir is not None:
+ configmgr.create['outdir'] = abspath(self.options.outdir)
+
+ cdir = 'outdir'
+ if os.path.exists(configmgr.create[cdir]) \
+ and not os.path.isdir(configmgr.create[cdir]):
+ msger.error('Invalid directory specified: %s' \
+ % configmgr.create[cdir])
+
+ if self.options.enabletmpfs:
+ configmgr.create['enabletmpfs'] = self.options.enabletmpfs
+
+ def main(self, argv=None):
+ if argv is None:
+ argv = sys.argv
+ else:
+ argv = argv[:] # don't modify caller's list
+
+ self.optparser = self.get_optparser()
+ if self.optparser:
+ try:
+ argv = self.preoptparse(argv)
+ self.options, args = self.optparser.parse_args(argv)
+
+ except cmdln.CmdlnUserError, ex:
+ msg = "%s: %s\nTry '%s help' for info.\n"\
+ % (self.name, ex, self.name)
+ msger.error(msg)
+
+ except cmdln.StopOptionProcessing, ex:
+ return 0
+ else:
+ # optparser=None means no process for opts
+ self.options, args = None, argv[1:]
+
+ if not args:
+ return self.emptyline()
+
+ self.postoptparse()
+
+ return self.cmd(args)
+
+ def precmd(self, argv): # check help before cmd
+
+ if '-h' in argv or '?' in argv or '--help' in argv or 'help' in argv:
+ return argv
+
+ if len(argv) == 1:
+ return ['help', argv[0]]
+
+ return argv
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc b/scripts/lib/wic/imager/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice != "custom": }} files/{{=machine}}-user-patches.scc
+++ 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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2007 Red Hat Inc.
+# Copyright (c) 2009, 2010, 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+from __future__ import with_statement
+import os, sys
+import tempfile
+import shutil
+
+from wic import kickstart
+from wic import msger
+from wic.utils.errors import CreatorError
+from wic.utils import misc, runner, fs_related as fs
+
+class BaseImageCreator(object):
+ """Base class for image creation.
+
+ BaseImageCreator is the simplest creator class available; it will
+ create a system image according to the supplied kickstart file.
+
+ e.g.
+
+ import wic.imgcreate as imgcreate
+ ks = imgcreate.read_kickstart("foo.ks")
+ imgcreate.ImageCreator(ks, "foo").create()
+ """
+
+ def __del__(self):
+ self.cleanup()
+
+ def __init__(self, createopts = None):
+ """Initialize an ImageCreator instance.
+
+ ks -- a pykickstart.KickstartParser instance; this instance will be
+ used to drive the install by e.g. providing the list of packages
+ to be installed, the system configuration and %post scripts
+
+ name -- a name for the image; used for e.g. image filenames or
+ filesystem labels
+ """
+
+ self.__builddir = None
+
+ self.ks = None
+ self.name = "target"
+ self.tmpdir = "/var/tmp/wic"
+ self.workdir = "/var/tmp/wic/build"
+
+ # setup tmpfs tmpdir when enabletmpfs is True
+ self.enabletmpfs = False
+
+ if createopts:
+ # Mapping table for variables that have different names.
+ optmap = {"outdir" : "destdir",
+ }
+
+ # update setting from createopts
+ for key in createopts.keys():
+ if key in optmap:
+ option = optmap[key]
+ else:
+ option = key
+ setattr(self, option, createopts[key])
+
+ self.destdir = os.path.abspath(os.path.expanduser(self.destdir))
+
+ self._dep_checks = ["ls", "bash", "cp", "echo"]
+
+ # Output image file names
+ self.outimage = []
+
+ # No ks provided when called by convertor, so skip the dependency check
+ if self.ks:
+ # If we have btrfs partition we need to check necessary tools
+ for part in self.ks.handler.partition.partitions:
+ if part.fstype and part.fstype == "btrfs":
+ self._dep_checks.append("mkfs.btrfs")
+ break
+
+ # make sure the specified tmpdir and cachedir exist
+ if not os.path.exists(self.tmpdir):
+ os.makedirs(self.tmpdir)
+
+
+ #
+ # Hooks for subclasses
+ #
+ def _create(self):
+ """Create partitions for the disk image(s)
+
+ This is the hook where subclasses may create the partitions
+ that will be assembled into disk image(s).
+
+ There is no default implementation.
+ """
+ pass
+
+ def _cleanup(self):
+ """Undo anything performed in _create().
+
+ This is the hook where subclasses must undo anything which was
+ done in _create().
+
+ There is no default implementation.
+
+ """
+ pass
+
+ #
+ # Actual implementation
+ #
+ def __ensure_builddir(self):
+ if not self.__builddir is None:
+ return
+
+ try:
+ self.workdir = os.path.join(self.tmpdir, "build")
+ if not os.path.exists(self.workdir):
+ os.makedirs(self.workdir)
+ self.__builddir = tempfile.mkdtemp(dir = self.workdir,
+ prefix = "imgcreate-")
+ except OSError, (err, msg):
+ raise CreatorError("Failed create build directory in %s: %s" %
+ (self.tmpdir, msg))
+
+ def __setup_tmpdir(self):
+ if not self.enabletmpfs:
+ return
+
+ runner.show('mount -t tmpfs -o size=4G tmpfs %s' % self.workdir)
+
+ def __clean_tmpdir(self):
+ if not self.enabletmpfs:
+ return
+
+ runner.show('umount -l %s' % self.workdir)
+
+ def create(self):
+ """Create partitions for the disk image(s)
+
+ Create the partitions that will be assembled into disk
+ image(s).
+ """
+ self.__setup_tmpdir()
+ self.__ensure_builddir()
+
+ self._create()
+
+ def cleanup(self):
+ """Undo anything performed in create().
+
+ Note, make sure to call this method once finished with the creator
+ instance in order to ensure no stale files are left on the host e.g.:
+
+ creator = ImageCreator(ks, name)
+ try:
+ creator.create()
+ finally:
+ creator.cleanup()
+
+ """
+ if not self.__builddir:
+ return
+
+ self._cleanup()
+
+ shutil.rmtree(self.__builddir, ignore_errors = True)
+ self.__builddir = None
+
+ self.__clean_tmpdir()
+
+
+ def print_outimage_info(self):
+ msg = "The new image can be found here:\n"
+ self.outimage.sort()
+ for file in self.outimage:
+ msg += ' %s\n' % os.path.abspath(file)
+
+ msger.info(msg)
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 2cf4c8de95..b1dc3e96f4 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# DESCRIPTION
-# This implements the 'direct' image creator class for 'wic', based
-# loosely on the raw image creator from 'mic'
+# This implements the 'direct' image creator class for 'wic'
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
@@ -29,13 +28,13 @@ import os
import stat
import shutil
-from mic import kickstart, msger
-from mic.utils import fs_related, runner, misc
-from mic.utils.partitionedfs import PartitionedMount
-from mic.utils.errors import CreatorError, MountError
-from mic.imager.baseimager import BaseImageCreator
-from mic.utils.oe.misc import *
-from mic.plugin import pluginmgr
+from wic import kickstart, msger
+from wic.utils import fs_related, runner, misc
+from wic.utils.partitionedfs import Image
+from wic.utils.errors import CreatorError, ImageError
+from wic.imager.baseimager import BaseImageCreator
+from wic.utils.oe.misc import *
+from wic.plugin import pluginmgr
disk_methods = {
"do_install_disk":None,
@@ -53,41 +52,33 @@ class DirectImageCreator(BaseImageCreator):
"""
def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
- kernel_dir, native_sysroot, hdddir, staging_data_dir,
- creatoropts=None, pkgmgr=None, compress_image=None,
- generate_bmap=None, fstab_entry="uuid"):
+ kernel_dir, native_sysroot, creatoropts=None):
"""
Initialize a DirectImageCreator instance.
This method takes the same arguments as ImageCreator.__init__()
"""
- BaseImageCreator.__init__(self, creatoropts, pkgmgr)
+ BaseImageCreator.__init__(self, creatoropts)
- self.__instimage = None
- self.__imgdir = None
+ self.__image = None
self.__disks = {}
self.__disk_format = "direct"
self._disk_names = []
self._ptable_format = self.ks.handler.bootloader.ptable
- self.use_uuid = fstab_entry == "uuid"
- self.compress_image = compress_image
- self.bmap_needed = generate_bmap
self.oe_builddir = oe_builddir
if image_output_dir:
self.tmpdir = image_output_dir
- self.cachedir = "%s/cache" % image_output_dir
self.rootfs_dir = rootfs_dir
self.bootimg_dir = bootimg_dir
self.kernel_dir = kernel_dir
self.native_sysroot = native_sysroot
- self.hdddir = hdddir
- self.staging_data_dir = staging_data_dir
def __write_fstab(self, image_rootfs):
- """overriden to generate fstab (temporarily) in rootfs. This
- is called from mount_instroot, make sure it doesn't get called
- from BaseImage.mount()"""
+ """overriden to generate fstab (temporarily) in rootfs. This is called
+ from _create, make sure it doesn't get called from
+ BaseImage.create()
+ """
if image_rootfs is None:
return None
@@ -109,11 +100,27 @@ class DirectImageCreator(BaseImageCreator):
for num, p in enumerate(parts, 1):
if not p.mountpoint or p.mountpoint == "/" or p.mountpoint == "/boot":
continue
- if self._ptable_format == 'msdos' and num > 3:
- device_name = "/dev/" + p.disk + str(num + 1)
- else:
- device_name = "/dev/" + p.disk + str(num)
- fstab_entry = device_name + "\t" + p.mountpoint + "\t" + p.fstype + "\tdefaults\t0\t0\n"
+
+ part = ''
+ # mmc device partitions are named mmcblk0p1, mmcblk0p2..
+ if p.disk.startswith('mmcblk'):
+ part = 'p'
+
+ pnum = num
+ if self._ptable_format == 'msdos' and pnum > 3:
+ # account for logical partition numbering, ex. sda5..
+ pnum += 1
+
+ device_name = "/dev/" + p.disk + part + str(pnum)
+
+ opts = "defaults"
+ if p.fsopts:
+ opts = p.fsopts
+
+ fstab_entry = device_name + "\t" + \
+ p.mountpoint + "\t" + \
+ p.fstype + "\t" + \
+ opts + "\t0\t0\n"
fstab_lines.append(fstab_entry)
def _write_fstab(self, fstab, fstab_lines):
@@ -215,29 +222,15 @@ class DirectImageCreator(BaseImageCreator):
#
# Actual implemention
#
- def _mount_instroot(self, base_on = None):
+ def _create(self):
"""
- For 'wic', we already have our build artifacts and don't want
- to loop mount anything to install into, we just create
+ For 'wic', we already have our build artifacts - we just create
filesystems from the artifacts directly and combine them into
a partitioned image.
-
- We still want to reuse as much of the basic mic machinery
- though; despite the fact that we don't actually do loop or any
- other kind of mounting we still want to do many of the same
- things to prepare images, so we basically just adapt to the
- basic framework and reinterpret what 'mounting' means in our
- context.
-
- _instroot would normally be something like
- /var/tmp/wic/build/imgcreate-s_9AKQ/install_root, for
- installing packages, etc. We don't currently need to do that,
- so we simplify life by just using /var/tmp/wic/build as our
- workdir.
"""
parts = self._get_parts()
- self.__instimage = PartitionedMount(self._instroot)
+ self.__image = Image()
for p in parts:
# as a convenience, set source to the boot partition source
@@ -248,70 +241,64 @@ class DirectImageCreator(BaseImageCreator):
for p in parts:
# need to create the filesystems in order to get their
# sizes before we can add them and do the layout.
- # PartitionedMount.mount() actually calls __format_disks()
- # to create the disk images and carve out the partitions,
- # then self.install() calls PartitionedMount.install()
- # which calls __install_partitition() for each partition
- # to dd the fs into the partitions. It would be nice to
- # be able to use e.g. ExtDiskMount etc to create the
- # filesystems, since that's where existing e.g. mkfs code
- # is, but those are only created after __format_disks()
- # which needs the partition sizes so needs them created
- # before its called. Well, the existing setup is geared
- # to installing packages into mounted filesystems - maybe
- # when/if we need to actually do package selection we
- # should modify things to use those objects, but for now
- # we can avoid that.
+ # Image.create() actually calls __format_disks() to create
+ # the disk images and carve out the partitions, then
+ # self.assemble() calls Image.assemble() which calls
+ # __write_partitition() for each partition to dd the fs
+ # into the partitions.
+ fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
+
p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
self.bootimg_dir, self.kernel_dir, self.native_sysroot)
- fstab = self.__write_fstab(p.get_rootfs())
self._restore_fstab(fstab)
- self.__instimage.add_partition(int(p.size),
- p.disk,
- p.mountpoint,
- p.source_file,
- p.fstype,
- p.label,
- fsopts = p.fsopts,
- boot = p.active,
- align = p.align,
- part_type = p.part_type)
- self.__instimage.layout_partitions(self._ptable_format)
+ self.__image.add_partition(int(p.size),
+ p.disk,
+ p.mountpoint,
+ p.source_file,
+ p.fstype,
+ p.label,
+ fsopts = p.fsopts,
+ boot = p.active,
+ align = p.align,
+ part_type = p.part_type)
+
+ self.__image.layout_partitions(self._ptable_format)
self.__imgdir = self.workdir
- for disk_name, disk in self.__instimage.disks.items():
+ for disk_name, disk in self.__image.disks.items():
full_path = self._full_path(self.__imgdir, disk_name, "direct")
msger.debug("Adding disk %s as %s with size %s bytes" \
% (disk_name, full_path, disk['min_size']))
disk_obj = fs_related.DiskImage(full_path, disk['min_size'])
self.__disks[disk_name] = disk_obj
- self.__instimage.add_disk(disk_name, disk_obj)
+ self.__image.add_disk(disk_name, disk_obj)
- self.__instimage.mount()
+ self.__image.create()
- def install(self, repo_urls=None):
+ def assemble(self):
"""
- Install fs images into partitions
+ Assemble partitions into disk image(s)
"""
- for disk_name, disk in self.__instimage.disks.items():
+ for disk_name, disk in self.__image.disks.items():
full_path = self._full_path(self.__imgdir, disk_name, "direct")
- msger.debug("Installing disk %s as %s with size %s bytes" \
+ msger.debug("Assembling disk %s as %s with size %s bytes" \
% (disk_name, full_path, disk['min_size']))
- self.__instimage.install(full_path)
+ self.__image.assemble(full_path)
- def configure(self, repodata = None):
+ def finalize(self):
"""
- Configure the system image according to kickstart.
+ Finalize the disk image.
- For now, it just prepares the image to be bootable by e.g.
+ For example, prepare the image to be bootable by e.g.
creating and installing a bootloader configuration.
+
"""
source_plugin = self.get_default_source_plugin()
if source_plugin:
self._source_methods = pluginmgr.get_source_plugin_methods(source_plugin, disk_methods)
- for disk_name, disk in self.__instimage.disks.items():
+ for disk_name, disk in self.__image.disks.items():
self._source_methods["do_install_disk"](disk, disk_name, self,
self.workdir,
self.oe_builddir,
@@ -327,7 +314,7 @@ class DirectImageCreator(BaseImageCreator):
parts = self._get_parts()
- for disk_name, disk in self.__instimage.disks.items():
+ for disk_name, disk in self.__image.disks.items():
full_path = self._full_path(self.__imgdir, disk_name, "direct")
msg += ' %s\n\n' % full_path
@@ -371,10 +358,10 @@ class DirectImageCreator(BaseImageCreator):
return (rootdev, root_part_uuid)
- def _unmount_instroot(self):
- if not self.__instimage is None:
+ def _cleanup(self):
+ if not self.__image is None:
try:
- self.__instimage.cleanup()
- except MountError, err:
+ self.__image.cleanup()
+ except ImageError, err:
msger.warning("%s" % err)
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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2007 Red Hat, Inc.
+# Copyright (c) 2009, 2010, 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os, sys, re
+import shutil
+import subprocess
+import string
+
+import pykickstart.sections as kssections
+import pykickstart.commands as kscommands
+import pykickstart.constants as ksconstants
+import pykickstart.errors as kserrors
+import pykickstart.parser as ksparser
+import pykickstart.version as ksversion
+from pykickstart.handlers.control import commandMap
+from pykickstart.handlers.control import dataMap
+
+from wic import msger
+from wic.utils import errors, misc, runner, fs_related as fs
+from custom_commands import wicboot, partition
+
+def read_kickstart(path):
+ """Parse a kickstart file and return a KickstartParser instance.
+
+ This is a simple utility function which takes a path to a kickstart file,
+ parses it and returns a pykickstart KickstartParser instance which can
+ be then passed to an ImageCreator constructor.
+
+ If an error occurs, a CreatorError exception is thrown.
+ """
+
+ #version = ksversion.makeVersion()
+ #ks = ksparser.KickstartParser(version)
+
+ using_version = ksversion.DEVEL
+ commandMap[using_version]["bootloader"] = wicboot.Wic_Bootloader
+ commandMap[using_version]["part"] = partition.Wic_Partition
+ commandMap[using_version]["partition"] = partition.Wic_Partition
+ dataMap[using_version]["PartData"] = partition.Wic_PartData
+ superclass = ksversion.returnClassForVersion(version=using_version)
+
+ class KSHandlers(superclass):
+ def __init__(self):
+ superclass.__init__(self, mapping=commandMap[using_version])
+
+ ks = ksparser.KickstartParser(KSHandlers(), errorsAreFatal=False)
+
+ try:
+ ks.readKickstart(path)
+ except (kserrors.KickstartParseError, kserrors.KickstartError), err:
+ if msger.ask("Errors occured on kickstart file, skip and continue?"):
+ msger.warning("%s" % err)
+ pass
+ else:
+ raise errors.KsError("%s" % err)
+
+ return ks
+
+def get_image_size(ks, default = None):
+ __size = 0
+ for p in ks.handler.partition.partitions:
+ if p.mountpoint == "/" and p.size:
+ __size = p.size
+ if __size > 0:
+ return int(__size) * 1024L * 1024L
+ else:
+ return default
+
+def get_image_fstype(ks, default = None):
+ for p in ks.handler.partition.partitions:
+ if p.mountpoint == "/" and p.fstype:
+ return p.fstype
+ return default
+
+def get_image_fsopts(ks, default = None):
+ for p in ks.handler.partition.partitions:
+ if p.mountpoint == "/" and p.fsopts:
+ return p.fsopts
+ return default
+
+def get_timeout(ks, default = None):
+ if not hasattr(ks.handler.bootloader, "timeout"):
+ return default
+ if ks.handler.bootloader.timeout is None:
+ return default
+ return int(ks.handler.bootloader.timeout)
+
+def get_kernel_args(ks, default = "ro rd.live.image"):
+ if not hasattr(ks.handler.bootloader, "appendLine"):
+ return default
+ if ks.handler.bootloader.appendLine is None:
+ return default
+ return "%s %s" %(default, ks.handler.bootloader.appendLine)
+
+def get_menu_args(ks, default = ""):
+ if not hasattr(ks.handler.bootloader, "menus"):
+ return default
+ if ks.handler.bootloader.menus in (None, ""):
+ return default
+ return "%s" % ks.handler.bootloader.menus
+
+def get_default_kernel(ks, default = None):
+ if not hasattr(ks.handler.bootloader, "default"):
+ return default
+ if not ks.handler.bootloader.default:
+ return default
+ return ks.handler.bootloader.default
+
+def get_partitions(ks):
+ return ks.handler.partition.partitions
diff --git a/scripts/lib/mic/kickstart/custom_commands/__init__.py b/scripts/lib/wic/kickstart/custom_commands/__init__.py
index 6aed0ff6fa..f84c6d9e00 100644
--- a/scripts/lib/mic/kickstart/custom_commands/__init__.py
+++ b/scripts/lib/wic/kickstart/custom_commands/__init__.py
@@ -1,17 +1,10 @@
-from desktop import Mic_Desktop
-from micrepo import Mic_Repo, Mic_RepoData
from micpartition import Mic_Partition
from micpartition import Mic_PartData
-from installerfw import Mic_installerfw
from partition import Wic_Partition
__all__ = (
- "Mic_Desktop",
- "Mic_Repo",
- "Mic_RepoData",
"Mic_Partition",
"Mic_PartData",
- "Mic_installerfw",
"Wic_Partition",
"Wic_PartData",
)
diff --git a/scripts/lib/mic/kickstart/custom_commands/micboot.py b/scripts/lib/wic/kickstart/custom_commands/micboot.py
index 66d1678aa7..d162142506 100644
--- a/scripts/lib/mic/kickstart/custom_commands/micboot.py
+++ b/scripts/lib/wic/kickstart/custom_commands/micboot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Copyright (c) 2008, 2009, 2010 Intel, Inc.
#
diff --git a/scripts/lib/mic/kickstart/custom_commands/micpartition.py b/scripts/lib/wic/kickstart/custom_commands/micpartition.py
index 59a87fb486..43d04f1294 100644
--- a/scripts/lib/mic/kickstart/custom_commands/micpartition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/micpartition.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Marko Saukko <marko.saukko@cybercom.com>
#
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 6b575c0e8d..54a494e033 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -25,11 +25,13 @@
#
import shutil
+import os
+import tempfile
from pykickstart.commands.partition import *
-from mic.utils.oe.misc import *
-from mic.kickstart.custom_commands import *
-from mic.plugin import pluginmgr
+from wic.utils.oe.misc import *
+from wic.kickstart.custom_commands import *
+from wic.plugin import pluginmgr
partition_methods = {
"do_stage_partition":None,
@@ -45,6 +47,7 @@ class Wic_PartData(Mic_PartData):
Mic_PartData.__init__(self, *args, **kwargs)
self.deleteRemovedAttrs()
self.source = kwargs.get("source", None)
+ self.sourceparams = kwargs.get("sourceparams", None)
self.rootfs = kwargs.get("rootfs-dir", None)
self.source_file = ""
self.size = 0
@@ -54,6 +57,8 @@ class Wic_PartData(Mic_PartData):
if self.source:
retval += " --source=%s" % self.source
+ if self.sourceparams:
+ retval += " --sourceparams=%s" % self.sourceparams
if self.rootfs:
retval += " --rootfs-dir=%s" % self.rootfs
@@ -121,7 +126,14 @@ class Wic_PartData(Mic_PartData):
Prepare content for individual partitions, depending on
partition command parameters.
"""
+ self.sourceparams_dict = {}
+
+ if self.sourceparams:
+ self.sourceparams_dict = parse_sourceparams(self.sourceparams)
+
if not self.source:
+ if not self.size:
+ msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint)
if self.fstype and self.fstype == "swap":
self.prepare_swap_partition(cr_workdir, oe_builddir,
native_sysroot)
@@ -130,17 +142,25 @@ class Wic_PartData(Mic_PartData):
native_sysroot)
return
+ plugins = pluginmgr.get_source_plugins()
+
+ if self.source not in plugins:
+ 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))
+
self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods)
- self._source_methods["do_configure_partition"](self, cr, cr_workdir,
+ self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
+ cr, cr_workdir,
oe_builddir,
bootimg_dir,
kernel_dir,
native_sysroot)
- self._source_methods["do_stage_partition"](self, cr, cr_workdir,
+ self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
+ cr, cr_workdir,
oe_builddir,
bootimg_dir, kernel_dir,
native_sysroot)
- self._source_methods["do_prepare_partition"](self, cr, cr_workdir,
+ self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
+ cr, cr_workdir,
oe_builddir,
bootimg_dir, kernel_dir, rootfs_dir,
native_sysroot)
@@ -152,7 +172,7 @@ class Wic_PartData(Mic_PartData):
"""
rootfs = oe_builddir
du_cmd = "du -Lbms %s" % rootfs
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
rootfs_size = out.split()[0]
self.size = rootfs_size
@@ -164,7 +184,7 @@ class Wic_PartData(Mic_PartData):
Prepare content for a rootfs partition i.e. create a partition
and fill it from a /rootfs dir.
- Currently handles ext2/3/4 and btrfs.
+ Currently handles ext2/3/4, btrfs and vfat.
"""
pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot
pseudo += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir
@@ -181,6 +201,15 @@ class Wic_PartData(Mic_PartData):
rootfs_dir, native_sysroot,
pseudo)
+ elif self.fstype.startswith("vfat"):
+ return self.prepare_rootfs_vfat(cr_workdir, oe_builddir,
+ rootfs_dir, native_sysroot,
+ pseudo)
+ elif self.fstype.startswith("squashfs"):
+ return self.prepare_rootfs_squashfs(cr_workdir, oe_builddir,
+ rootfs_dir, native_sysroot,
+ pseudo)
+
def prepare_rootfs_ext(self, cr_workdir, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
@@ -191,7 +220,7 @@ class Wic_PartData(Mic_PartData):
rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
du_cmd = "du -ks %s" % image_rootfs
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
extra_blocks = self.get_extra_block_count(actual_rootfs_size)
@@ -200,24 +229,27 @@ class Wic_PartData(Mic_PartData):
extra_blocks = IMAGE_EXTRA_SPACE
rootfs_size = actual_rootfs_size + extra_blocks
+ rootfs_size *= IMAGE_OVERHEAD_FACTOR
msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
(extra_blocks, self.mountpoint, rootfs_size))
dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
(rootfs, rootfs_size)
- rc, out = exec_cmd(dd_cmd)
+ exec_cmd(dd_cmd)
extra_imagecmd = "-i 8192"
mkfs_cmd = "mkfs.%s -F %s %s -d %s" % \
(self.fstype, extra_imagecmd, rootfs, image_rootfs)
- rc, out = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
-
+ (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ if rc:
+ print "rootfs_dir: %s" % rootfs_dir
+ 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))
# get the rootfs size in the right units for kickstart (Mb)
du_cmd = "du -Lbms %s" % rootfs
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
rootfs_size = out.split()[0]
self.size = rootfs_size
@@ -236,7 +268,7 @@ class Wic_PartData(Mic_PartData):
rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
du_cmd = "du -ks %s" % image_rootfs
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
extra_blocks = self.get_extra_block_count(actual_rootfs_size)
@@ -245,26 +277,100 @@ class Wic_PartData(Mic_PartData):
extra_blocks = IMAGE_EXTRA_SPACE
rootfs_size = actual_rootfs_size + extra_blocks
+ rootfs_size *= IMAGE_OVERHEAD_FACTOR
msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
(extra_blocks, self.mountpoint, rootfs_size))
dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
(rootfs, rootfs_size)
- rc, out = exec_cmd(dd_cmd)
+ exec_cmd(dd_cmd)
mkfs_cmd = "mkfs.%s -b %d -r %s %s" % \
(self.fstype, rootfs_size * 1024, image_rootfs, rootfs)
- rc, out = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+ if rc:
+ 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))
+
+ # get the rootfs size in the right units for kickstart (Mb)
+ du_cmd = "du -Lbms %s" % rootfs
+ out = exec_cmd(du_cmd)
+ rootfs_size = out.split()[0]
+
+ self.size = rootfs_size
+ self.source_file = rootfs
+
+ def prepare_rootfs_vfat(self, cr_workdir, oe_builddir, rootfs_dir,
+ native_sysroot, pseudo):
+ """
+ Prepare content for a vfat rootfs partition.
+ """
+ image_rootfs = rootfs_dir
+ rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
+
+ du_cmd = "du -bks %s" % image_rootfs
+ out = exec_cmd(du_cmd)
+ blocks = int(out.split()[0])
+
+ extra_blocks = self.get_extra_block_count(blocks)
+
+ if extra_blocks < IMAGE_EXTRA_SPACE:
+ extra_blocks = IMAGE_EXTRA_SPACE
+
+ blocks += extra_blocks
+
+ msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+ (extra_blocks, self.mountpoint, blocks))
+
+ # Ensure total sectors is an integral number of sectors per
+ # track or mcopy will complain. Sectors are 512 bytes, and we
+ # generate images with 32 sectors per track. This calculation
+ # is done in blocks, thus the mod by 16 instead of 32. Apply
+ # sector count fix only when needed.
+ if blocks % 16 != 0:
+ blocks += (16 - (blocks % 16))
+
+ dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (rootfs, blocks)
+ exec_native_cmd(dosfs_cmd, native_sysroot)
+
+ mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, image_rootfs)
+ rc, out = exec_native_cmd(mcopy_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mcopy returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % rc)
+
+ chmod_cmd = "chmod 644 %s" % rootfs
+ exec_cmd(chmod_cmd)
+
+ # get the rootfs size in the right units for kickstart (Mb)
+ du_cmd = "du -Lbms %s" % rootfs
+ out = exec_cmd(du_cmd)
+ rootfs_size = out.split()[0]
+
+ self.set_size(rootfs_size)
+ self.set_source_file(rootfs)
+
+ def prepare_rootfs_squashfs(self, cr_workdir, oe_builddir, rootfs_dir,
+ native_sysroot, pseudo):
+ """
+ Prepare content for a squashfs rootfs partition.
+ """
+ image_rootfs = rootfs_dir
+ rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
+
+ squashfs_cmd = "mksquashfs %s %s -noappend" % \
+ (image_rootfs, rootfs)
+ exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
# get the rootfs size in the right units for kickstart (Mb)
du_cmd = "du -Lbms %s" % rootfs
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
rootfs_size = out.split()[0]
self.size = rootfs_size
self.source_file = rootfs
+ return 0
+
def prepare_empty_partition(self, cr_workdir, oe_builddir, native_sysroot):
"""
Prepare an empty partition.
@@ -275,22 +381,30 @@ class Wic_PartData(Mic_PartData):
elif self.fstype.startswith("btrfs"):
return self.prepare_empty_partition_btrfs(cr_workdir, oe_builddir,
native_sysroot)
+ elif self.fstype.startswith("vfat"):
+ return self.prepare_empty_partition_vfat(cr_workdir, oe_builddir,
+ native_sysroot)
+ elif self.fstype.startswith("squashfs"):
+ return self.prepare_empty_partition_squashfs(cr_workdir, oe_builddir,
+ native_sysroot)
def prepare_empty_partition_ext(self, cr_workdir, oe_builddir,
native_sysroot):
"""
Prepare an empty ext2/3/4 partition.
"""
- fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+ fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
(fs, self.size)
- rc, out = exec_cmd(dd_cmd)
+ exec_cmd(dd_cmd)
extra_imagecmd = "-i 8192"
mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs)
- rc, out = exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ 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))
self.source_file = fs
@@ -301,18 +415,71 @@ class Wic_PartData(Mic_PartData):
"""
Prepare an empty btrfs partition.
"""
- fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+ fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
(fs, self.size)
- rc, out = exec_cmd(dd_cmd)
+ exec_cmd(dd_cmd)
mkfs_cmd = "mkfs.%s -b %d %s" % (self.fstype, self.size * 1024, rootfs)
- rc, out = exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ 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))
mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs)
- rc, out = exec_native_cmd(mkfs_cmd, native_sysroot)
+ (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot)
+ if rc:
+ 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))
+
+ self.source_file = fs
+
+ return 0
+
+ def prepare_empty_partition_vfat(self, cr_workdir, oe_builddir,
+ native_sysroot):
+ """
+ Prepare an empty vfat partition.
+ """
+ fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
+
+ blocks = self.size * 1024
+
+ dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (fs, blocks)
+ exec_native_cmd(dosfs_cmd, native_sysroot)
+
+ chmod_cmd = "chmod 644 %s" % fs
+ exec_cmd(chmod_cmd)
+
+ self.source_file = fs
+
+ return 0
+
+ def prepare_empty_partition_squashfs(self, cr_workdir, oe_builddir,
+ native_sysroot):
+ """
+ Prepare an empty squashfs partition.
+ """
+ msger.warning("Creating of an empty squashfs %s partition was attempted. " \
+ "Proceeding as requested." % self.mountpoint)
+
+ fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
+
+ # it is not possible to create a squashfs without source data,
+ # thus prepare an empty temp dir that is used as source
+ tmpdir = tempfile.mkdtemp()
+
+ squashfs_cmd = "mksquashfs %s %s -noappend" % \
+ (tmpdir, fs)
+ exec_native_cmd(squashfs_cmd, native_sysroot)
+
+ os.rmdir(tmpdir)
+
+ # get the rootfs size in the right units for kickstart (Mb)
+ du_cmd = "du -Lbms %s" % fs
+ out = exec_cmd(du_cmd)
+ fs_size = out.split()[0]
+ self.size = fs_size
self.source_file = fs
return 0
@@ -325,14 +492,14 @@ class Wic_PartData(Mic_PartData):
dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
(fs, self.size)
- rc, out = exec_cmd(dd_cmd)
+ exec_cmd(dd_cmd)
import uuid
label_str = ""
if self.label:
label_str = "-L %s" % self.label
mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), fs)
- rc, out = exec_native_cmd(mkswap_cmd, native_sysroot)
+ exec_native_cmd(mkswap_cmd, native_sysroot)
self.source_file = fs
@@ -348,6 +515,9 @@ class Wic_Partition(Mic_Partition):
# and calculate partition size
op.add_option("--source", type="string", action="store",
dest="source", default=None)
+ # comma-separated list of param=value pairs
+ op.add_option("--sourceparams", type="string", action="store",
+ dest="sourceparams", default=None)
# use specified rootfs path to fill the partition
op.add_option("--rootfs-dir", type="string", action="store",
dest="rootfs", default=None)
diff --git a/scripts/lib/mic/kickstart/custom_commands/wicboot.py b/scripts/lib/wic/kickstart/custom_commands/wicboot.py
index ab8871de4e..f1914169d8 100644
--- a/scripts/lib/mic/kickstart/custom_commands/wicboot.py
+++ b/scripts/lib/wic/kickstart/custom_commands/wicboot.py
@@ -29,7 +29,7 @@ from pykickstart.errors import *
from pykickstart.options import *
from pykickstart.commands.bootloader import *
-from mic.kickstart.custom_commands.micboot import *
+from wic.kickstart.custom_commands.micboot import *
class Wic_Bootloader(Mic_Bootloader):
def __init__(self, writePriority=10, appendLine="", driveorder=None,
diff --git a/scripts/lib/mic/msger.py b/scripts/lib/wic/msger.py
index 9afc85be93..9f557e7b9a 100644
--- a/scripts/lib/mic/msger.py
+++ b/scripts/lib/wic/msger.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
# vim: ai ts=4 sts=4 et sw=4
#
# Copyright (c) 2009, 2010, 2011 Intel, Inc.
diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/wic/plugin.py
index 585fd6d563..41a80175ca 100644
--- a/scripts/lib/mic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Copyright (c) 2011 Intel, Inc.
#
@@ -17,16 +17,16 @@
import os, sys
-from mic import msger
-from mic import pluginbase
-from mic.utils import errors
-from mic.utils.oe.misc import *
+from wic import msger
+from wic import pluginbase
+from wic.utils import errors
+from wic.utils.oe.misc import *
__ALL__ = ['PluginMgr', 'pluginmgr']
-PLUGIN_TYPES = ["imager", "source"] # TODO "hook"
+PLUGIN_TYPES = ["imager", "source"]
-PLUGIN_DIR = "/lib/mic/plugins" # relative to scripts
+PLUGIN_DIR = "/lib/wic/plugins" # relative to scripts
SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR
class PluginMgr(object):
@@ -41,9 +41,9 @@ class PluginMgr(object):
return cls._instance
def __init__(self):
- mic_path = os.path.dirname(__file__)
- eos = mic_path.find('scripts') + len('scripts')
- scripts_path = mic_path[:eos]
+ wic_path = os.path.dirname(__file__)
+ eos = wic_path.find('scripts') + len('scripts')
+ scripts_path = wic_path[:eos]
self.scripts_path = scripts_path
self.plugin_dir = scripts_path + PLUGIN_DIR
self.layers_path = None
@@ -117,6 +117,22 @@ class PluginMgr(object):
return pluginbase.get_plugins(ptype)
+ def get_source_plugins(self):
+ """
+ Return list of available source plugins.
+ """
+ plugins_dir = self._build_plugin_dir_list(self.plugin_dir, 'source')
+
+ self.append_dirs(plugins_dir)
+
+ plugins = []
+
+ for _source_name, klass in self.get_plugins('source').iteritems():
+ plugins.append(_source_name)
+
+ return plugins
+
+
def get_source_plugin_methods(self, source_name, methods):
"""
The methods param is a dict with the method names to find. On
diff --git a/scripts/lib/mic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 9cf4c628d1..e3de9bacb8 100644
--- a/scripts/lib/mic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Copyright (c) 2011 Intel, Inc.
#
@@ -17,8 +17,8 @@
import os
import shutil
-from mic import msger
-from mic.utils import errors
+from wic import msger
+from wic.utils import errors
class _Plugin(object):
class __metaclass__(type):
@@ -26,62 +26,27 @@ class _Plugin(object):
if not hasattr(cls, 'plugins'):
cls.plugins = {}
- elif 'mic_plugin_type' in attrs:
- if attrs['mic_plugin_type'] not in cls.plugins:
- cls.plugins[attrs['mic_plugin_type']] = {}
+ elif 'wic_plugin_type' in attrs:
+ if attrs['wic_plugin_type'] not in cls.plugins:
+ cls.plugins[attrs['wic_plugin_type']] = {}
- elif hasattr(cls, 'mic_plugin_type') and 'name' in attrs:
- cls.plugins[cls.mic_plugin_type][attrs['name']] = cls
+ elif hasattr(cls, 'wic_plugin_type') and 'name' in attrs:
+ cls.plugins[cls.wic_plugin_type][attrs['name']] = cls
def show_plugins(cls):
- for cls in cls.plugins[cls.mic_plugin_type]:
+ for cls in cls.plugins[cls.wic_plugin_type]:
print cls
def get_plugins(cls):
return cls.plugins
+
class ImagerPlugin(_Plugin):
- mic_plugin_type = "imager"
+ wic_plugin_type = "imager"
- @classmethod
- def check_image_exists(self, destdir, apacking=None,
- images=(),
- release=None):
-
- # if it's a packing file, reset images
- if apacking:
- images = [apacking]
-
- # release option will override images
- if release is not None:
- images = [os.path.basename(destdir.rstrip('/'))]
- destdir = os.path.dirname(destdir.rstrip('/'))
-
- for name in images:
- if not name:
- continue
-
- image = os.path.join(destdir, name)
- if not os.path.exists(image):
- continue
-
- if msger.ask("Target image/dir: %s already exists, "
- "clean up and continue?" % image):
- if os.path.isdir(image):
- shutil.rmtree(image)
- else:
- os.unlink(image)
- else:
- raise errors.Abort("Cancled")
-
- def do_create(self):
- pass
-
- def do_chroot(self):
- pass
class SourcePlugin(_Plugin):
- mic_plugin_type = "source"
+ wic_plugin_type = "source"
"""
The methods that can be implemented by --source plugins.
@@ -99,8 +64,9 @@ class SourcePlugin(_Plugin):
msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name)
@classmethod
- def do_stage_partition(self, part, cr, workdir, oe_builddir, bootimg_dir,
- kernel_dir, native_sysroot):
+ def do_stage_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
"""
Special content staging hook called before do_prepare_partition(),
normally empty.
@@ -115,8 +81,9 @@ class SourcePlugin(_Plugin):
msger.debug("SourcePlugin: do_stage_partition: part: %s" % part)
@classmethod
- def do_configure_partition(self, part, cr, cr_workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
+ def do_configure_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
"""
Called before do_prepare_partition(), typically used to create
custom configuration files for a partition, for example
@@ -125,20 +92,15 @@ class SourcePlugin(_Plugin):
msger.debug("SourcePlugin: do_configure_partition: part: %s" % part)
@classmethod
- def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir,
- kernel_dir, rootfs_dir, native_sysroot):
+ def do_prepare_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
+ native_sysroot):
"""
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
"""
msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part)
-class BackendPlugin(_Plugin):
- mic_plugin_type="backend"
-
- def addRepository(self):
- pass
-
def get_plugins(typen):
ps = ImagerPlugin.get_plugins()
if typen in ps:
@@ -146,4 +108,4 @@ def get_plugins(typen):
else:
return None
-__all__ = ['ImagerPlugin', 'BackendPlugin', 'SourcePlugin', 'get_plugins']
+__all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins']
diff --git a/scripts/lib/mic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py
index fc7c10c3df..5601c3f1c9 100644
--- a/scripts/lib/mic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/wic/plugins/imager/direct_plugin.py
@@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# DESCRIPTION
-# This implements the 'direct' imager plugin class for 'wic', based
-# loosely on the raw imager plugin from 'mic'
+# This implements the 'direct' imager plugin class for 'wic'
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
@@ -30,14 +29,13 @@ import shutil
import re
import tempfile
-from mic import chroot, msger
-from mic.utils import misc, fs_related, errors, runner, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
+from wic import msger
+from wic.utils import misc, fs_related, errors, runner, cmdln
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
-import mic.imager.direct as direct
-from mic.pluginbase import ImagerPlugin
+import wic.imager.direct as direct
+from wic.pluginbase import ImagerPlugin
class DirectPlugin(ImagerPlugin):
name = 'direct'
@@ -60,21 +58,19 @@ class DirectPlugin(ImagerPlugin):
"""
Create direct image, called from creator as 'direct' cmd
"""
- if len(args) != 9:
+ if len(args) != 7:
raise errors.Usage("Extra arguments given")
- staging_data_dir = args[0]
- hdddir = args[1]
- native_sysroot = args[2]
- kernel_dir = args[3]
- bootimg_dir = args[4]
- rootfs_dir = args[5]
+ native_sysroot = args[0]
+ kernel_dir = args[1]
+ bootimg_dir = args[2]
+ rootfs_dir = args[3]
creatoropts = configmgr.create
- ksconf = args[6]
+ ksconf = args[4]
- image_output_dir = args[7]
- oe_builddir = args[8]
+ image_output_dir = args[5]
+ oe_builddir = args[6]
krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir)
@@ -86,17 +82,12 @@ class DirectPlugin(ImagerPlugin):
bootimg_dir,
kernel_dir,
native_sysroot,
- hdddir,
- staging_data_dir,
- creatoropts,
- None,
- None,
- None)
+ creatoropts)
try:
- creator.mount(None, creatoropts["cachedir"])
- creator.install()
- creator.configure(creatoropts["repomd"])
+ creator.create()
+ creator.assemble()
+ creator.finalize()
creator.print_outimage_info()
except errors.CreatorError:
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 2cc179a337..e4067b6dbf 100644
--- a/scripts/lib/mic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -29,32 +29,23 @@ import shutil
import re
import tempfile
-from mic import kickstart, chroot, msger
-from mic.utils import misc, fs_related, errors, runner, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
-import mic.imager.direct as direct
-from mic.pluginbase import SourcePlugin
-from mic.utils.oe.misc import *
-from mic.imager.direct import DirectImageCreator
+from wic import kickstart, msger
+from wic.utils import misc, fs_related, errors, runner, cmdln
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
+import wic.imager.direct as direct
+from wic.pluginbase import SourcePlugin
+from wic.utils.oe.misc import *
+from wic.imager.direct import DirectImageCreator
class BootimgEFIPlugin(SourcePlugin):
name = 'bootimg-efi'
@classmethod
- def do_configure_partition(self, part, cr, cr_workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
+ def do_configure_grubefi(self, hdddir, cr, cr_workdir):
"""
- Called before do_prepare_partition(), creates grubefi config
+ Create loader-specific (grub-efi) config
"""
- hdddir = "%s/hdd/boot" % cr_workdir
- rm_cmd = "rm -rf %s" % cr_workdir
- exec_cmd(rm_cmd)
-
- install_cmd = "install -d %s/EFI/BOOT" % hdddir
- tmp = exec_cmd(install_cmd)
-
splash = os.path.join(cr_workdir, "/EFI/boot/splash.jpg")
if os.path.exists(splash):
splashline = "menu background splash.jpg"
@@ -73,14 +64,12 @@ class BootimgEFIPlugin(SourcePlugin):
grubefi_conf += "timeout=%s\n" % timeout
grubefi_conf += "menuentry 'boot'{\n"
- kernel = "/vmlinuz"
+ kernel = "/bzImage"
if cr._ptable_format == 'msdos':
rootstr = rootdev
else:
- if not root_part_uuid:
- raise MountError("Cannot find the root GPT partition UUID")
- rootstr = "PARTUUID=%s" % root_part_uuid
+ raise ImageError("Unsupported partition table format found")
grubefi_conf += "linux %s root=%s rootwait %s\n" \
% (kernel, rootstr, options)
@@ -95,8 +84,82 @@ class BootimgEFIPlugin(SourcePlugin):
cfg.close()
@classmethod
- def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir,
- kernel_dir, rootfs_dir, native_sysroot):
+ def do_configure_gummiboot(self, hdddir, cr, cr_workdir):
+ """
+ Create loader-specific (gummiboot) config
+ """
+ install_cmd = "install -d %s/loader" % hdddir
+ exec_cmd(install_cmd)
+
+ install_cmd = "install -d %s/loader/entries" % hdddir
+ exec_cmd(install_cmd)
+
+ (rootdev, root_part_uuid) = cr._get_boot_config()
+ options = cr.ks.handler.bootloader.appendLine
+
+ timeout = kickstart.get_timeout(cr.ks)
+ if not timeout:
+ timeout = 0
+
+ loader_conf = ""
+ loader_conf += "default boot\n"
+ loader_conf += "timeout %d\n" % timeout
+
+ msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \
+ % cr_workdir)
+ cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w")
+ cfg.write(loader_conf)
+ cfg.close()
+
+ kernel = "/bzImage"
+
+ if cr._ptable_format == 'msdos':
+ rootstr = rootdev
+ else:
+ raise ImageError("Unsupported partition table format found")
+
+ boot_conf = ""
+ boot_conf += "title boot\n"
+ boot_conf += "linux %s\n" % kernel
+ boot_conf += "options LABEL=Boot root=%s %s\n" \
+ % (rootstr, options)
+
+ msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
+ % cr_workdir)
+ cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w")
+ cfg.write(boot_conf)
+ cfg.close()
+
+
+ @classmethod
+ def do_configure_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
+ """
+ Called before do_prepare_partition(), creates loader-specific config
+ """
+ hdddir = "%s/hdd/boot" % cr_workdir
+ rm_cmd = "rm -rf %s" % cr_workdir
+ exec_cmd(rm_cmd)
+
+ install_cmd = "install -d %s/EFI/BOOT" % hdddir
+ exec_cmd(install_cmd)
+
+ try:
+ if source_params['loader'] == 'grub-efi':
+ self.do_configure_grubefi(hdddir, cr, cr_workdir)
+ elif source_params['loader'] == 'gummiboot':
+ self.do_configure_gummiboot(hdddir, cr, cr_workdir)
+ else:
+ msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
+ except KeyError:
+ msger.error("bootimg-efi requires a loader, none specified")
+
+
+ @classmethod
+ def do_prepare_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
"""
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
@@ -110,25 +173,31 @@ class BootimgEFIPlugin(SourcePlugin):
cr.set_bootimg_dir(bootimg_dir)
staging_kernel_dir = kernel_dir
- staging_data_dir = bootimg_dir
- hdddir = "%s/hdd" % cr_workdir
+ hdddir = "%s/hdd/boot" % cr_workdir
install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
(staging_kernel_dir, hdddir)
- tmp = exec_cmd(install_cmd)
-
- shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
- "%s/grub.cfg" % cr_workdir)
-
- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (staging_data_dir, hdddir)
- exec_cmd(cp_cmd, True)
-
- shutil.move("%s/grub.cfg" % cr_workdir,
- "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
+ exec_cmd(install_cmd)
+
+ try:
+ if source_params['loader'] == 'grub-efi':
+ shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
+ "%s/grub.cfg" % cr_workdir)
+ cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
+ exec_cmd(cp_cmd, True)
+ shutil.move("%s/grub.cfg" % cr_workdir,
+ "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
+ elif source_params['loader'] == 'gummiboot':
+ cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
+ exec_cmd(cp_cmd, True)
+ else:
+ msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
+ except KeyError:
+ msger.error("bootimg-efi requires a loader, none specified")
du_cmd = "du -bks %s" % hdddir
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
blocks = int(out.split()[0])
extra_blocks = part.get_extra_block_count(blocks)
@@ -160,10 +229,8 @@ class BootimgEFIPlugin(SourcePlugin):
exec_cmd(chmod_cmd)
du_cmd = "du -Lbms %s" % bootimg
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
bootimg_size = out.split()[0]
part.set_size(bootimg_size)
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..6ba39a01f7
--- /dev/null
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -0,0 +1,138 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# DESCRIPTION
+# This implements the 'bootimg-partition' source plugin class for
+# 'wic'. The plugin creates an image of boot partition, copying over
+# files listed in IMAGE_BOOT_FILES bitbake variable.
+#
+# AUTHORS
+# Maciej Borzecki <maciej.borzecki (at] open-rnd.pl>
+#
+
+import os
+import re
+
+from wic import msger
+from wic.pluginbase import SourcePlugin
+from wic.utils.oe.misc import *
+from glob import glob
+
+class BootimgPartitionPlugin(SourcePlugin):
+ name = 'bootimg-partition'
+
+ @classmethod
+ def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir,
+ bootimg_dir, kernel_dir, native_sysroot):
+ """
+ Called after all partitions have been prepared and assembled into a
+ disk image. Do nothing.
+ """
+ pass
+
+ @classmethod
+ def do_configure_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
+ """
+ Called before do_prepare_partition(). Possibly prepare
+ configuration files of some sort.
+
+ """
+ pass
+
+ @classmethod
+ def do_prepare_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
+ """
+ Called to do the actual content population for a partition i.e. it
+ 'prepares' the partition to be incorporated into the image.
+ In this case, does the following:
+ - sets up a vfat partition
+ - copies all files listed in IMAGE_BOOT_FILES variable
+ """
+ hdddir = "%s/boot" % cr_workdir
+ rm_cmd = "rm -rf %s" % cr_workdir
+ exec_cmd(rm_cmd)
+
+ install_cmd = "install -d %s" % hdddir
+ exec_cmd(install_cmd)
+
+ if not bootimg_dir:
+ bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not bootimg_dir:
+ msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+
+ msger.debug('Bootimg dir: %s' % bootimg_dir)
+
+ boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
+
+ if not boot_files:
+ msger.error('No boot files defined, IMAGE_BOOT_FILES unset')
+
+ msger.debug('Boot files: %s' % boot_files)
+
+ # list of tuples (src_name, dst_name)
+ deploy_files = []
+ for src_entry in re.findall(r'[\w;\-\./\*]+', boot_files):
+ if ';' in src_entry:
+ dst_entry = tuple(src_entry.split(';'))
+ if not dst_entry[0] or not dst_entry[1]:
+ msger.error('Malformed boot file entry: %s' % (src_entry))
+ else:
+ dst_entry = (src_entry, src_entry)
+
+ msger.debug('Destination entry: %r' % (dst_entry,))
+ deploy_files.append(dst_entry)
+
+ for deploy_entry in deploy_files:
+ src, dst = deploy_entry
+ install_task = []
+ if '*' in src:
+ # by default install files under their basename
+ entry_name_fn = os.path.basename
+ if dst != src:
+ # unless a target name was given, then treat name
+ # as a directory and append a basename
+ entry_name_fn = lambda name: \
+ os.path.join(dst,
+ os.path.basename(name))
+
+ srcs = glob(os.path.join(bootimg_dir, src))
+
+ msger.debug('Globbed sources: %s' % (', '.join(srcs)))
+ for entry in srcs:
+ entry_dst_name = entry_name_fn(entry)
+ install_task.append((entry,
+ os.path.join(hdddir,
+ entry_dst_name)))
+ else:
+ install_task = [(os.path.join(bootimg_dir, src),
+ os.path.join(hdddir, dst))]
+
+ for task in install_task:
+ src_path, dst_path = task
+ msger.debug('Install %s as %s' % (os.path.basename(src_path),
+ dst_path))
+ install_cmd = "install -m 0644 -D %s %s" \
+ % (src_path, dst_path)
+ exec_cmd(install_cmd)
+
+ msger.debug('Prepare boot partition using rootfs in %s' % (hdddir))
+ part.prepare_rootfs(cr_workdir, oe_builddir, hdddir,
+ native_sysroot)
+
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 1211e5c93b..8a1aca1ad1 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -29,15 +29,14 @@ import shutil
import re
import tempfile
-from mic import kickstart, chroot, msger
-from mic.utils import misc, fs_related, errors, runner, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
-import mic.imager.direct as direct
-from mic.pluginbase import SourcePlugin
-from mic.utils.oe.misc import *
-from mic.imager.direct import DirectImageCreator
+from wic import kickstart, msger
+from wic.utils import misc, fs_related, errors, runner, cmdln
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
+import wic.imager.direct as direct
+from wic.pluginbase import SourcePlugin
+from wic.utils.oe.misc import *
+from wic.imager.direct import DirectImageCreator
class BootimgPcbiosPlugin(SourcePlugin):
name = 'bootimg-pcbios'
@@ -50,9 +49,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
disk image. In this case, we install the MBR.
"""
mbrfile = "%s/syslinux/" % bootimg_dir
- if cr._ptable_format == 'gpt':
- mbrfile += "gptmbr.bin"
- else:
+ if cr._ptable_format == 'msdos':
mbrfile += "mbr.bin"
if not os.path.exists(mbrfile):
@@ -65,11 +62,12 @@ class BootimgPcbiosPlugin(SourcePlugin):
rc = runner.show(['dd', 'if=%s' % mbrfile,
'of=%s' % full_path, 'conv=notrunc'])
if rc != 0:
- raise MountError("Unable to set MBR to %s" % full_path)
+ raise ImageError("Unable to set MBR to %s" % full_path)
@classmethod
- def do_configure_partition(self, part, cr, cr_workdir, oe_builddir,
- bootimg_dir, kernel_dir, native_sysroot):
+ def do_configure_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ native_sysroot):
"""
Called before do_prepare_partition(), creates syslinux config
"""
@@ -78,7 +76,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
exec_cmd(rm_cmd)
install_cmd = "install -d %s" % hdddir
- tmp = exec_cmd(install_cmd)
+ exec_cmd(install_cmd)
splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg")
if os.path.exists(splash):
@@ -110,9 +108,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
if cr._ptable_format == 'msdos':
rootstr = rootdev
else:
- if not root_part_uuid:
- raise MountError("Cannot find the root GPT partition UUID")
- rootstr = "PARTUUID=%s" % root_part_uuid
+ raise ImageError("Unsupported partition table format found")
syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
@@ -123,35 +119,44 @@ class BootimgPcbiosPlugin(SourcePlugin):
cfg.close()
@classmethod
- def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir,
- kernel_dir, rootfs_dir, native_sysroot):
+ def do_prepare_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
"""
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
In this case, prepare content for legacy bios boot partition.
"""
- if not bootimg_dir:
+ def _has_syslinux(dir):
+ if dir:
+ syslinux = "%s/syslinux" % dir
+ if os.path.exists(syslinux):
+ return True
+ return False
+
+ if not _has_syslinux(bootimg_dir):
bootimg_dir = get_bitbake_var("STAGING_DATADIR")
if not bootimg_dir:
msger.error("Couldn't find STAGING_DATADIR, exiting\n")
+ if not _has_syslinux(bootimg_dir):
+ msger.error("Please build syslinux first\n")
# just so the result notes display it
cr.set_bootimg_dir(bootimg_dir)
staging_kernel_dir = kernel_dir
- staging_data_dir = bootimg_dir
hdddir = "%s/hdd/boot" % cr_workdir
install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \
% (staging_kernel_dir, hdddir)
- tmp = exec_cmd(install_cmd)
+ exec_cmd(install_cmd)
install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \
- % (staging_data_dir, hdddir)
- tmp = exec_cmd(install_cmd)
+ % (bootimg_dir, hdddir)
+ exec_cmd(install_cmd)
du_cmd = "du -bks %s" % hdddir
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
blocks = int(out.split()[0])
extra_blocks = part.get_extra_block_count(blocks)
@@ -186,7 +191,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
exec_cmd(chmod_cmd)
du_cmd = "du -Lbms %s" % bootimg
- rc, out = exec_cmd(du_cmd)
+ out = exec_cmd(du_cmd)
bootimg_size = out.split()[0]
part.set_size(bootimg_size)
diff --git a/scripts/lib/mic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index a4d4547318..a432a18705 100644
--- a/scripts/lib/mic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -30,15 +30,14 @@ import shutil
import re
import tempfile
-from mic import kickstart, chroot, msger
-from mic.utils import misc, fs_related, errors, runner, cmdln
-from mic.conf import configmgr
-from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
-import mic.imager.direct as direct
-from mic.pluginbase import SourcePlugin
-from mic.utils.oe.misc import *
-from mic.imager.direct import DirectImageCreator
+from wic import kickstart, msger
+from wic.utils import misc, fs_related, errors, runner, cmdln
+from wic.conf import configmgr
+from wic.plugin import pluginmgr
+import wic.imager.direct as direct
+from wic.pluginbase import SourcePlugin
+from wic.utils.oe.misc import *
+from wic.imager.direct import DirectImageCreator
class RootfsPlugin(SourcePlugin):
name = 'rootfs'
@@ -63,8 +62,9 @@ class RootfsPlugin(SourcePlugin):
return image_rootfs_dir
@classmethod
- def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir,
- kernel_dir, krootfs_dir, native_sysroot):
+ def do_prepare_partition(self, part, source_params, cr, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ krootfs_dir, native_sysroot):
"""
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
diff --git a/scripts/lib/mic/test b/scripts/lib/wic/test
index 9daeafb986..9daeafb986 100644
--- a/scripts/lib/mic/test
+++ b/scripts/lib/wic/test
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf b/scripts/lib/wic/utils/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == "y": }} xorg.conf
+++ b/scripts/lib/wic/utils/__init__.py
diff --git a/scripts/lib/mic/utils/cmdln.py b/scripts/lib/wic/utils/cmdln.py
index b099473ee4..b099473ee4 100644
--- a/scripts/lib/mic/utils/cmdln.py
+++ b/scripts/lib/wic/utils/cmdln.py
diff --git a/scripts/lib/mic/utils/errors.py b/scripts/lib/wic/utils/errors.py
index 8d720f9080..9410311875 100644
--- a/scripts/lib/mic/utils/errors.py
+++ b/scripts/lib/wic/utils/errors.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Copyright (c) 2007 Red Hat, Inc.
# Copyright (c) 2011 Intel, Inc.
@@ -40,32 +40,8 @@ class Usage(CreatorError):
self.msg = str(self.msg)
return self.keyword + self.msg + ', please use "--help" for more info'
-class Abort(CreatorError):
- keyword = ''
-
-class ConfigError(CreatorError):
- keyword = '<config>'
-
class KsError(CreatorError):
keyword = '<kickstart>'
-class RepoError(CreatorError):
- keyword = '<repo>'
-
-class RpmError(CreatorError):
- keyword = '<rpm>'
-
-class MountError(CreatorError):
+class ImageError(CreatorError):
keyword = '<mount>'
-
-class SnapshotError(CreatorError):
- keyword = '<snapshot>'
-
-class SquashfsError(CreatorError):
- keyword = '<squashfs>'
-
-class BootstrapError(CreatorError):
- keyword = '<bootstrap>'
-
-class RuntimeError(CreatorError):
- keyword = '<runtime>'
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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2007, Red Hat, Inc.
+# Copyright (c) 2009, 2010, 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+from __future__ import with_statement
+import os
+import sys
+import errno
+import stat
+import random
+import string
+import time
+import uuid
+
+from wic import msger
+from wic.utils import runner
+from wic.utils.errors import *
+from wic.utils.oe.misc import *
+
+def find_binary_path(binary):
+ if os.environ.has_key("PATH"):
+ paths = os.environ["PATH"].split(":")
+ else:
+ paths = []
+ if os.environ.has_key("HOME"):
+ paths += [os.environ["HOME"] + "/bin"]
+ paths += ["/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"]
+
+ for path in paths:
+ bin_path = "%s/%s" % (path, binary)
+ if os.path.exists(bin_path):
+ return bin_path
+
+ print "External command '%s' not found, exiting." % binary
+ print " (Please install '%s' on your host system)" % binary
+ sys.exit(1)
+
+def makedirs(dirname):
+ """A version of os.makedirs() that doesn't throw an
+ exception if the leaf directory already exists.
+ """
+ try:
+ os.makedirs(dirname)
+ except OSError, err:
+ if err.errno != errno.EEXIST:
+ raise
+
+class Disk:
+ """
+ Generic base object for a disk.
+ """
+ def __init__(self, size, device = None):
+ self._device = device
+ self._size = size
+
+ def create(self):
+ pass
+
+ def cleanup(self):
+ pass
+
+ def get_device(self):
+ return self._device
+ def set_device(self, path):
+ self._device = path
+ device = property(get_device, set_device)
+
+ def get_size(self):
+ return self._size
+ size = property(get_size)
+
+
+class DiskImage(Disk):
+ """
+ A Disk backed by a file.
+ """
+ def __init__(self, image_file, size):
+ Disk.__init__(self, size)
+ self.image_file = image_file
+
+ def exists(self):
+ return os.path.exists(self.image_file)
+
+ def create(self):
+ if self.device is not None:
+ return
+
+ blocks = self.size / 1024
+ if self.size - blocks * 1024:
+ blocks += 1
+
+ # create disk image
+ dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=1" % \
+ (self.image_file, blocks)
+ exec_cmd(dd_cmd)
+
+ 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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2010, 2011 Intel Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os
+import sys
+import time
+
+def build_name(kscfg, release=None, prefix = None, suffix = None):
+ """Construct and return an image name string.
+
+ This is a utility function to help create sensible name and fslabel
+ strings. The name is constructed using the sans-prefix-and-extension
+ kickstart filename and the supplied prefix and suffix.
+
+ kscfg -- a path to a kickstart file
+ release -- a replacement to suffix for image release
+ prefix -- a prefix to prepend to the name; defaults to None, which causes
+ no prefix to be used
+ suffix -- a suffix to append to the name; defaults to None, which causes
+ a YYYYMMDDHHMM suffix to be used
+
+ Note, if maxlen is less then the len(suffix), you get to keep both pieces.
+
+ """
+ name = os.path.basename(kscfg)
+ idx = name.rfind('.')
+ if idx >= 0:
+ name = name[:idx]
+
+ if release is not None:
+ suffix = ""
+ if prefix is None:
+ prefix = ""
+ if suffix is None:
+ suffix = time.strftime("%Y%m%d%H%M")
+
+ if name.startswith(prefix):
+ name = name[len(prefix):]
+
+ prefix = "%s-" % prefix if prefix else ""
+ suffix = "-%s" % suffix if suffix else ""
+
+ ret = prefix + name + suffix
+
+ return ret
diff --git a/scripts/lib/mic/utils/oe/__init__.py b/scripts/lib/wic/utils/oe/__init__.py
index d10e802116..0a81575a74 100644
--- a/scripts/lib/mic/utils/oe/__init__.py
+++ b/scripts/lib/wic/utils/oe/__init__.py
@@ -1,5 +1,5 @@
#
-# OpenEmbedded mic utils library
+# OpenEmbedded wic utils library
#
# Copyright (c) 2013, Intel Corporation.
# All rights reserved.
diff --git a/scripts/lib/mic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py
index 16c250aa9f..b0b5baab73 100644
--- a/scripts/lib/mic/utils/oe/misc.py
+++ b/scripts/lib/wic/utils/oe/misc.py
@@ -18,23 +18,23 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# DESCRIPTION
-# This module provides a place to collect various mic-related utils
+# This module provides a place to collect various wic-related utils
# for the OpenEmbedded Image Tools.
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
#
-from mic import msger
-from mic.utils import runner
+from wic import msger
+from wic.utils import runner
-def exec_cmd(cmd_and_args, as_shell = False, catch = 3):
+def __exec_cmd(cmd_and_args, as_shell = False, catch = 3):
"""
Execute command, catching stderr, stdout
Need to execute as_shell if the command uses wildcards
"""
- msger.debug("exec_cmd: %s" % cmd_and_args)
+ msger.debug("__exec_cmd: %s" % cmd_and_args)
args = cmd_and_args.split()
msger.debug(args)
@@ -43,24 +43,31 @@ def exec_cmd(cmd_and_args, as_shell = False, catch = 3):
else:
rc, out = runner.runtool(args, catch)
out = out.strip()
- msger.debug("exec_cmd: output for %s (rc = %d): %s" % \
- (cmd_and_args, rc, out))
+ msger.debug("__exec_cmd: output for %s (rc = %d): %s" % \
+ (cmd_and_args, rc, out))
+
+ return (rc, out)
+
+
+def exec_cmd(cmd_and_args, as_shell = False, catch = 3):
+ """
+ Execute command, catching stderr, stdout
+
+ Exits if rc non-zero
+ """
+ rc, out = __exec_cmd(cmd_and_args, as_shell, catch)
if rc != 0:
- # We don't throw exception when return code is not 0, because
- # parted always fails to reload part table with loop devices. This
- # prevents us from distinguishing real errors based on return
- # code.
- msger.warning("WARNING: %s returned '%s' instead of 0" % (cmd_and_args, rc))
+ msger.error("exec_cmd: %s returned '%s' instead of 0" % (cmd_and_args, rc))
- return (rc, out)
+ return out
def exec_cmd_quiet(cmd_and_args, as_shell = False):
"""
Execute command, catching nothing in the output
- Need to execute as_shell if the command uses wildcards
+ Exits if rc non-zero
"""
return exec_cmd(cmd_and_args, as_shell, 0)
@@ -82,7 +89,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch = 3):
args = cmd_and_args.split()
msger.debug(args)
- rc, out = exec_cmd(native_cmd_and_args, True, catch)
+ rc, out = __exec_cmd(native_cmd_and_args, True, catch)
if rc == 127: # shell command-not-found
msger.error("A native (host) program required to build the image "
@@ -116,6 +123,7 @@ def add_wks_var(key, val):
BOOTDD_EXTRA_SPACE = 16384
IMAGE_EXTRA_SPACE = 10240
+IMAGE_OVERHEAD_FACTOR = 1.3
__bitbake_env_lines = ""
@@ -135,7 +143,7 @@ def find_bitbake_env_lines(image_name):
bitbake_env_cmd = "bitbake -e %s" % image_name
else:
bitbake_env_cmd = "bitbake -e"
- rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
+ rc, bitbake_env_lines = __exec_cmd(bitbake_env_cmd)
if rc != 0:
print "Couldn't get '%s' output." % bitbake_env_cmd
return None
@@ -172,3 +180,26 @@ def get_bitbake_var(key):
val = get_line_val(line, key)
return val
return None
+
+def parse_sourceparams(sourceparams):
+ """
+ Split sourceparams string of the form key1=val1[,key2=val2,...]
+ into a dict. Also accepts valueless keys i.e. without =.
+
+ Returns dict of param key/val pairs (note that val may be None).
+ """
+ params_dict = {}
+
+ params = sourceparams.split(',')
+ if params:
+ for p in params:
+ if not p:
+ continue
+ if not '=' in p:
+ key = p
+ val = None
+ else:
+ key, val = p.split('=')
+ params_dict[key] = val
+
+ return params_dict
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 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2009, 2010, 2011 Intel, Inc.
+# Copyright (c) 2007, 2008 Red Hat, Inc.
+# Copyright (c) 2008 Daniel P. Berrange
+# Copyright (c) 2008 David P. Huff
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import os
+
+from wic import msger
+from wic.utils import runner
+from wic.utils.errors import ImageError
+from wic.utils.fs_related import *
+from wic.utils.oe.misc import *
+
+# Overhead of the MBR partitioning scheme (just one sector)
+MBR_OVERHEAD = 1
+
+# Size of a sector in bytes
+SECTOR_SIZE = 512
+
+class Image:
+ """
+ Generic base object for an image.
+
+ An Image is a container for a set of DiskImages and associated
+ partitions.
+ """
+ def __init__(self):
+ self.disks = {}
+ self.partitions = []
+ self.parted = find_binary_path("parted")
+ # Size of a sector used in calculations
+ self.sector_size = SECTOR_SIZE
+ self._partitions_layed_out = False
+
+ def __add_disk(self, disk_name):
+ """ Add a disk 'disk_name' to the internal list of disks. Note,
+ 'disk_name' is the name of the disk in the target system
+ (e.g., sdb). """
+
+ if disk_name in self.disks:
+ # We already have this disk
+ return
+
+ assert not self._partitions_layed_out
+
+ self.disks[disk_name] = \
+ { 'disk': None, # Disk object
+ 'numpart': 0, # Number of allocate partitions
+ 'partitions': [], # Indexes to self.partitions
+ 'offset': 0, # Offset of next partition (in sectors)
+ # Minimum required disk size to fit all partitions (in bytes)
+ 'min_size': 0,
+ 'ptable_format': "msdos" } # Partition table format
+
+ def add_disk(self, disk_name, disk_obj):
+ """ Add a disk object which have to be partitioned. More than one disk
+ can be added. In case of multiple disks, disk partitions have to be
+ added for each disk separately with 'add_partition()". """
+
+ self.__add_disk(disk_name)
+ self.disks[disk_name]['disk'] = disk_obj
+
+ def __add_partition(self, part):
+ """ This is a helper function for 'add_partition()' which adds a
+ partition to the internal list of partitions. """
+
+ assert not self._partitions_layed_out
+
+ self.partitions.append(part)
+ self.__add_disk(part['disk_name'])
+
+ def add_partition(self, size, disk_name, mountpoint, source_file = None, fstype = None,
+ label=None, fsopts = None, boot = False, align = None,
+ part_type = None):
+ """ Add the next partition. Prtitions have to be added in the
+ first-to-last order. """
+
+ ks_pnum = len(self.partitions)
+
+ # Converting MB to sectors for parted
+ size = size * 1024 * 1024 / self.sector_size
+
+ # We still need partition for "/" or non-subvolume
+ if mountpoint == "/" or not fsopts:
+ part = { 'ks_pnum' : ks_pnum, # Partition number in the KS file
+ 'size': size, # In sectors
+ 'mountpoint': mountpoint, # Mount relative to chroot
+ 'source_file': source_file, # partition contents
+ 'fstype': fstype, # Filesystem type
+ 'fsopts': fsopts, # Filesystem mount options
+ 'label': label, # Partition label
+ 'disk_name': disk_name, # physical disk name holding partition
+ 'device': None, # kpartx device node for partition
+ 'num': None, # Partition number
+ 'boot': boot, # Bootable flag
+ 'align': align, # Partition alignment
+ 'part_type' : part_type } # Partition type
+
+ self.__add_partition(part)
+
+ def layout_partitions(self, ptable_format = "msdos"):
+ """ Layout the partitions, meaning calculate the position of every
+ partition on the disk. The 'ptable_format' parameter defines the
+ partition table format and may be "msdos". """
+
+ msger.debug("Assigning %s partitions to disks" % ptable_format)
+
+ if ptable_format not in ('msdos'):
+ raise ImageError("Unknown partition table format '%s', supported " \
+ "formats are: 'msdos'" % ptable_format)
+
+ if self._partitions_layed_out:
+ return
+
+ self._partitions_layed_out = True
+
+ # Go through partitions in the order they are added in .ks file
+ for n in range(len(self.partitions)):
+ p = self.partitions[n]
+
+ if not self.disks.has_key(p['disk_name']):
+ raise ImageError("No disk %s for partition %s" \
+ % (p['disk_name'], p['mountpoint']))
+
+ if p['part_type']:
+ # The --part-type can also be implemented for MBR partitions,
+ # in which case it would map to the 1-byte "partition type"
+ # filed at offset 3 of the partition entry.
+ raise ImageError("setting custom partition type is not " \
+ "implemented for msdos partitions")
+
+ # Get the disk where the partition is located
+ d = self.disks[p['disk_name']]
+ d['numpart'] += 1
+ d['ptable_format'] = ptable_format
+
+ if d['numpart'] == 1:
+ if ptable_format == "msdos":
+ overhead = MBR_OVERHEAD
+
+ # Skip one sector required for the partitioning scheme overhead
+ d['offset'] += overhead
+
+ if p['align']:
+ # If not first partition and we do have alignment set we need
+ # to align the partition.
+ # FIXME: This leaves a empty spaces to the disk. To fill the
+ # gaps we could enlargea the previous partition?
+
+ # Calc how much the alignment is off.
+ align_sectors = d['offset'] % (p['align'] * 1024 / self.sector_size)
+
+ if align_sectors:
+ # If partition is not aligned as required, we need
+ # to move forward to the next alignment point
+ align_sectors = (p['align'] * 1024 / self.sector_size) - align_sectors
+
+ msger.debug("Realignment for %s%s with %s sectors, original"
+ " offset %s, target alignment is %sK." %
+ (p['disk_name'], d['numpart'], align_sectors,
+ d['offset'], p['align']))
+
+ # increase the offset so we actually start the partition on right alignment
+ d['offset'] += align_sectors
+
+ p['start'] = d['offset']
+ d['offset'] += p['size']
+
+ p['type'] = 'primary'
+ p['num'] = d['numpart']
+
+ if d['ptable_format'] == "msdos":
+ if d['numpart'] > 2:
+ # Every logical partition requires an additional sector for
+ # the EBR, so steal the last sector from the end of each
+ # partition starting from the 3rd one for the EBR. This
+ # will make sure the logical partitions are aligned
+ # correctly.
+ p['size'] -= 1
+
+ if d['numpart'] > 3:
+ p['type'] = 'logical'
+ p['num'] = d['numpart'] + 1
+
+ d['partitions'].append(n)
+ msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
+ "sectors (%d bytes)." \
+ % (p['mountpoint'], p['disk_name'], p['num'],
+ p['start'], p['start'] + p['size'] - 1,
+ p['size'], p['size'] * self.sector_size))
+
+ # Once all the partitions have been layed out, we can calculate the
+ # minumim disk sizes.
+ for disk_name, d in self.disks.items():
+ d['min_size'] = d['offset']
+
+ d['min_size'] *= self.sector_size
+
+ def __run_parted(self, args):
+ """ Run parted with arguments specified in the 'args' list. """
+
+ args.insert(0, self.parted)
+ msger.debug(args)
+
+ rc, out = runner.runtool(args, catch = 3)
+ out = out.strip()
+ if out:
+ msger.debug('"parted" output: %s' % out)
+
+ if rc != 0:
+ # We don't throw exception when return code is not 0, because
+ # parted always fails to reload part table with loop devices. This
+ # prevents us from distinguishing real errors based on return
+ # code.
+ msger.error("WARNING: parted returned '%s' instead of 0 (use --debug for details)" % rc)
+
+ def __create_partition(self, device, parttype, fstype, start, size):
+ """ Create a partition on an image described by the 'device' object. """
+
+ # Start is included to the size so we need to substract one from the end.
+ end = start + size - 1
+ msger.debug("Added '%s' partition, sectors %d-%d, size %d sectors" %
+ (parttype, start, end, size))
+
+ args = ["-s", device, "unit", "s", "mkpart", parttype]
+ if fstype:
+ args.extend([fstype])
+ args.extend(["%d" % start, "%d" % end])
+
+ return self.__run_parted(args)
+
+ def __format_disks(self):
+ self.layout_partitions()
+
+ for dev in self.disks.keys():
+ d = self.disks[dev]
+ msger.debug("Initializing partition table for %s" % \
+ (d['disk'].device))
+ self.__run_parted(["-s", d['disk'].device, "mklabel",
+ d['ptable_format']])
+
+ msger.debug("Creating partitions")
+
+ for p in self.partitions:
+ d = self.disks[p['disk_name']]
+ if d['ptable_format'] == "msdos" and p['num'] == 5:
+ # The last sector of the 3rd partition was reserved for the EBR
+ # of the first _logical_ partition. This is why the extended
+ # partition should start one sector before the first logical
+ # partition.
+ self.__create_partition(d['disk'].device, "extended",
+ None, p['start'] - 1,
+ d['offset'] - p['start'])
+
+ if p['fstype'] == "swap":
+ parted_fs_type = "linux-swap"
+ elif p['fstype'] == "vfat":
+ parted_fs_type = "fat32"
+ elif p['fstype'] == "msdos":
+ parted_fs_type = "fat16"
+ else:
+ # Type for ext2/ext3/ext4/btrfs
+ parted_fs_type = "ext2"
+
+ # Boot ROM of OMAP boards require vfat boot partition to have an
+ # even number of sectors.
+ if p['mountpoint'] == "/boot" and p['fstype'] in ["vfat", "msdos"] \
+ and p['size'] % 2:
+ msger.debug("Substracting one sector from '%s' partition to " \
+ "get even number of sectors for the partition" % \
+ p['mountpoint'])
+ p['size'] -= 1
+
+ self.__create_partition(d['disk'].device, p['type'],
+ parted_fs_type, p['start'], p['size'])
+
+ if p['boot']:
+ flag_name = "boot"
+ msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \
+ (flag_name, p['num'], d['disk'].device))
+ self.__run_parted(["-s", d['disk'].device, "set",
+ "%d" % p['num'], flag_name, "on"])
+
+ # Parted defaults to enabling the lba flag for fat16 partitions,
+ # which causes compatibility issues with some firmware (and really
+ # isn't necessary).
+ if parted_fs_type == "fat16":
+ if d['ptable_format'] == 'msdos':
+ msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \
+ (p['num'], d['disk'].device))
+ self.__run_parted(["-s", d['disk'].device, "set",
+ "%d" % p['num'], "lba", "off"])
+
+ def cleanup(self):
+ if self.disks:
+ for dev in self.disks.keys():
+ d = self.disks[dev]
+ try:
+ d['disk'].cleanup()
+ except:
+ pass
+
+ def __write_partition(self, num, source_file, start, size):
+ """
+ Install source_file contents into a partition.
+ """
+ if not source_file: # nothing to write
+ return
+
+ # Start is included in the size so need to substract one from the end.
+ end = start + size - 1
+ msger.debug("Installed %s in partition %d, sectors %d-%d, size %d sectors" % (source_file, num, start, end, size))
+
+ dd_cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \
+ (source_file, self.image_file, self.sector_size, start, size)
+ exec_cmd(dd_cmd)
+
+
+ def assemble(self, image_file):
+ msger.debug("Installing partitions")
+
+ self.image_file = image_file
+
+ for p in self.partitions:
+ d = self.disks[p['disk_name']]
+ if d['ptable_format'] == "msdos" and p['num'] == 5:
+ # The last sector of the 3rd partition was reserved for the EBR
+ # of the first _logical_ partition. This is why the extended
+ # partition should start one sector before the first logical
+ # partition.
+ self.__write_partition(p['num'], p['source_file'],
+ p['start'] - 1,
+ d['offset'] - p['start'])
+
+ self.__write_partition(p['num'], p['source_file'],
+ p['start'], p['size'])
+
+ def create(self):
+ for dev in self.disks.keys():
+ d = self.disks[dev]
+ d['disk'].create()
+
+ self.__format_disks()
+
+ return
diff --git a/scripts/lib/mic/utils/runner.py b/scripts/lib/wic/utils/runner.py
index fded3c93fa..2ae9f417c5 100644
--- a/scripts/lib/mic/utils/runner.py
+++ b/scripts/lib/wic/utils/runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
#
# Copyright (c) 2011 Intel, Inc.
#
@@ -18,7 +18,7 @@
import os
import subprocess
-from mic import msger
+from wic import msger
def runtool(cmdln_or_args, catch=1):
""" wrapper for most of the subprocess calls
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 98191faadd..0ce7ed090e 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -121,7 +121,7 @@ if [ "$PROTO" = "socks" ]; then
if [ -z "$PORT" ]; then
PORT="1080"
fi
- METHOD="SOCKS4:$PROXY:$1:$2,socksport=$PORT"
+ METHOD="SOCKS4A:$PROXY:$1:$2,socksport=$PORT"
else
# Assume PROXY (http, https, etc)
if [ -z "$PORT" ]; then
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 8c4ea92610..2332b224ee 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -29,6 +29,7 @@ import os
import sys
import unittest
import logging
+import argparse
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'meta/lib')))
@@ -58,6 +59,16 @@ def logger_create():
log = logger_create()
+def get_args_parser():
+ 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."
+ parser = argparse.ArgumentParser(description=description)
+ group = parser.add_mutually_exclusive_group(required=True)
+ 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>')
+ group.add_argument('--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False, help='Run all (unhidden) tests')
+ group.add_argument('--list-modules', required=False, action="store_true", dest="list_modules", default=False, help='List all available test modules.')
+ return parser
+
+
def preflight_check():
log.info("Checking that everything is in order before running the tests")
@@ -108,13 +119,13 @@ def remove_inc_files():
except OSError as e:
pass
-def get_tests():
+def get_tests(exclusive_modules=[], include_hidden=False):
testslist = []
- for x in sys.argv[1:]:
+ for x in exclusive_modules:
testslist.append('oeqa.selftest.' + x)
if not testslist:
testpath = os.path.abspath(os.path.dirname(oeqa.selftest.__file__))
- files = sorted([f for f in os.listdir(testpath) if f.endswith('.py') and not f.startswith('_') and f != 'base.py'])
+ 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'])
for f in files:
module = 'oeqa.selftest.' + f[:-3]
testslist.append(module)
@@ -122,32 +133,46 @@ def get_tests():
return testslist
def main():
- if not preflight_check():
- return 1
-
- testslist = get_tests()
- suite = unittest.TestSuite()
- loader = unittest.TestLoader()
- loader.sortTestMethodsUsing = None
- runner = unittest.TextTestRunner(verbosity=2)
- # we need to do this here, otherwise just loading the tests
- # will take 2 minutes (bitbake -e calls)
- oeSelfTest.testlayer_path = get_test_layer()
- for test in testslist:
- log.info("Loading tests from: %s" % test)
- try:
- suite.addTests(loader.loadTestsFromName(test))
- except AttributeError as e:
- log.error("Failed to import %s" % test)
- log.error(e)
+ parser = get_args_parser()
+ args = parser.parse_args()
+
+ if args.list_modules:
+ log.info('Listing all available test modules:')
+ testslist = get_tests(include_hidden=True)
+ for test in testslist:
+ module = test.split('.')[-1]
+ info = ''
+ if module.startswith('_'):
+ info = ' (hidden)'
+ print module + info
+
+ if args.run_tests or args.run_all_tests:
+ if not preflight_check():
+ return 1
+
+ testslist = get_tests(exclusive_modules=(args.run_tests or []), include_hidden=False)
+ suite = unittest.TestSuite()
+ loader = unittest.TestLoader()
+ loader.sortTestMethodsUsing = None
+ runner = unittest.TextTestRunner(verbosity=2)
+ # we need to do this here, otherwise just loading the tests
+ # will take 2 minutes (bitbake -e calls)
+ oeSelfTest.testlayer_path = get_test_layer()
+ for test in testslist:
+ log.info("Loading tests from: %s" % test)
+ try:
+ suite.addTests(loader.loadTestsFromName(test))
+ except AttributeError as e:
+ log.error("Failed to import %s" % test)
+ log.error(e)
+ return 1
+ add_include()
+ result = runner.run(suite)
+ log.info("Finished")
+ if result.wasSuccessful():
+ return 0
+ else:
return 1
- add_include()
- result = runner.run(suite)
- log.info("Finished")
- if result.wasSuccessful():
- return 0
- else:
- return 1
if __name__ == "__main__":
try:
diff --git a/scripts/pybootchartgui/pybootchartgui.py b/scripts/pybootchartgui/pybootchartgui.py
index 947ce10338..7ce1a5be40 100755
--- a/scripts/pybootchartgui/pybootchartgui.py
+++ b/scripts/pybootchartgui/pybootchartgui.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# This file is part of pybootchartgui.
diff --git a/scripts/pythondeps b/scripts/pythondeps
new file mode 100755
index 0000000000..ff92e747ed
--- /dev/null
+++ b/scripts/pythondeps
@@ -0,0 +1,250 @@
+#!/usr/bin/env python
+#
+# Determine dependencies of python scripts or available python modules in a search path.
+#
+# Given the -d argument and a filename/filenames, returns the modules imported by those files.
+# Given the -d argument and a directory/directories, recurses to find all
+# python packages and modules, returns the modules imported by these.
+# Given the -p argument and a path or paths, scans that path for available python modules/packages.
+
+import argparse
+import ast
+import imp
+import logging
+import os.path
+import sys
+
+
+logger = logging.getLogger('pythondeps')
+
+suffixes = []
+for triple in imp.get_suffixes():
+ suffixes.append(triple[0])
+
+
+class PythonDepError(Exception):
+ pass
+
+
+class DependError(PythonDepError):
+ def __init__(self, path, error):
+ self.path = path
+ self.error = error
+ PythonDepError.__init__(self, error)
+
+ def __str__(self):
+ return "Failure determining dependencies of {}: {}".format(self.path, self.error)
+
+
+class ImportVisitor(ast.NodeVisitor):
+ def __init__(self):
+ self.imports = set()
+ self.importsfrom = []
+
+ def visit_Import(self, node):
+ for alias in node.names:
+ self.imports.add(alias.name)
+
+ def visit_ImportFrom(self, node):
+ self.importsfrom.append((node.module, [a.name for a in node.names], node.level))
+
+
+def walk_up(path):
+ while path:
+ yield path
+ path, _, _ = path.rpartition(os.sep)
+
+
+def get_provides(path):
+ path = os.path.realpath(path)
+
+ def get_fn_name(fn):
+ for suffix in suffixes:
+ if fn.endswith(suffix):
+ return fn[:-len(suffix)]
+
+ isdir = os.path.isdir(path)
+ if isdir:
+ pkg_path = path
+ walk_path = path
+ else:
+ pkg_path = get_fn_name(path)
+ if pkg_path is None:
+ return
+ walk_path = os.path.dirname(path)
+
+ for curpath in walk_up(walk_path):
+ if not os.path.exists(os.path.join(curpath, '__init__.py')):
+ libdir = curpath
+ break
+ else:
+ libdir = ''
+
+ package_relpath = pkg_path[len(libdir)+1:]
+ package = '.'.join(package_relpath.split(os.sep))
+ if not isdir:
+ yield package, path
+ else:
+ if os.path.exists(os.path.join(path, '__init__.py')):
+ yield package, path
+
+ for dirpath, dirnames, filenames in os.walk(path):
+ relpath = dirpath[len(path)+1:]
+ if relpath:
+ if '__init__.py' not in filenames:
+ dirnames[:] = []
+ continue
+ else:
+ context = '.'.join(relpath.split(os.sep))
+ if package:
+ context = package + '.' + context
+ yield context, dirpath
+ else:
+ context = package
+
+ for fn in filenames:
+ adjusted_fn = get_fn_name(fn)
+ if not adjusted_fn or adjusted_fn == '__init__':
+ continue
+
+ fullfn = os.path.join(dirpath, fn)
+ if context:
+ yield context + '.' + adjusted_fn, fullfn
+ else:
+ yield adjusted_fn, fullfn
+
+
+def get_code_depends(code_string, path=None, provide=None, ispkg=False):
+ try:
+ code = ast.parse(code_string, path)
+ except TypeError as exc:
+ raise DependError(path, exc)
+ except SyntaxError as exc:
+ raise DependError(path, exc)
+
+ visitor = ImportVisitor()
+ visitor.visit(code)
+ for builtin_module in sys.builtin_module_names:
+ if builtin_module in visitor.imports:
+ visitor.imports.remove(builtin_module)
+
+ if provide:
+ provide_elements = provide.split('.')
+ if ispkg:
+ provide_elements.append("__self__")
+ context = '.'.join(provide_elements[:-1])
+ package_path = os.path.dirname(path)
+ else:
+ context = None
+ package_path = None
+
+ levelzero_importsfrom = (module for module, names, level in visitor.importsfrom
+ if level == 0)
+ for module in visitor.imports | set(levelzero_importsfrom):
+ if context and path:
+ module_basepath = os.path.join(package_path, module.replace('.', '/'))
+ if os.path.exists(module_basepath):
+ # Implicit relative import
+ yield context + '.' + module, path
+ continue
+
+ for suffix in suffixes:
+ if os.path.exists(module_basepath + suffix):
+ # Implicit relative import
+ yield context + '.' + module, path
+ break
+ else:
+ yield module, path
+ else:
+ yield module, path
+
+ for module, names, level in visitor.importsfrom:
+ if level == 0:
+ continue
+ elif not provide:
+ raise DependError("Error: ImportFrom non-zero level outside of a package: {0}".format((module, names, level)), path)
+ elif level > len(provide_elements):
+ raise DependError("Error: ImportFrom level exceeds package depth: {0}".format((module, names, level)), path)
+ else:
+ context = '.'.join(provide_elements[:-level])
+ if module:
+ if context:
+ yield context + '.' + module, path
+ else:
+ yield module, path
+
+
+def get_file_depends(path):
+ try:
+ code_string = open(path, 'r').read()
+ except (OSError, IOError) as exc:
+ raise DependError(path, exc)
+
+ return get_code_depends(code_string, path)
+
+
+def get_depends_recursive(directory):
+ directory = os.path.realpath(directory)
+
+ provides = dict((v, k) for k, v in get_provides(directory))
+ for filename, provide in provides.iteritems():
+ if os.path.isdir(filename):
+ filename = os.path.join(filename, '__init__.py')
+ ispkg = True
+ elif not filename.endswith('.py'):
+ continue
+ else:
+ ispkg = False
+
+ with open(filename, 'r') as f:
+ source = f.read()
+
+ depends = get_code_depends(source, filename, provide, ispkg)
+ for depend, by in depends:
+ yield depend, by
+
+
+def get_depends(path):
+ if os.path.isdir(path):
+ return get_depends_recursive(path)
+ else:
+ return get_file_depends(path)
+
+
+def main():
+ logging.basicConfig()
+
+ parser = argparse.ArgumentParser(description='Determine dependencies and provided packages for python scripts/modules')
+ parser.add_argument('path', nargs='+', help='full path to content to be processed')
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('-p', '--provides', action='store_true',
+ help='given a path, display the provided python modules')
+ group.add_argument('-d', '--depends', action='store_true',
+ help='given a filename, display the imported python modules')
+
+ args = parser.parse_args()
+ if args.provides:
+ modules = set()
+ for path in args.path:
+ for provide, fn in get_provides(path):
+ modules.add(provide)
+
+ for module in sorted(modules):
+ print(module)
+ elif args.depends:
+ for path in args.path:
+ try:
+ modules = get_depends(path)
+ except PythonDepError as exc:
+ logger.error(str(exc))
+ sys.exit(1)
+
+ for module, imp_by in modules:
+ print("{}\t{}".format(module, imp_by))
+ else:
+ parser.print_help()
+ sys.exit(2)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/recipetool b/scripts/recipetool
new file mode 100755
index 0000000000..70e6b6c877
--- /dev/null
+++ b/scripts/recipetool
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+
+# Recipe creation tool
+#
+# Copyright (C) 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import sys
+import os
+import argparse
+import glob
+import logging
+
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import scriptutils
+logger = scriptutils.logger_create('recipetool')
+
+plugins = []
+
+def tinfoil_init():
+ import bb.tinfoil
+ import logging
+ tinfoil = bb.tinfoil.Tinfoil()
+ tinfoil.prepare(True)
+
+ for plugin in plugins:
+ if hasattr(plugin, 'tinfoil_init'):
+ plugin.tinfoil_init(tinfoil)
+ tinfoil.logger.setLevel(logging.WARNING)
+
+def main():
+
+ if not os.environ.get('BUILDDIR', ''):
+ logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
+ sys.exit(1)
+
+ parser = argparse.ArgumentParser(description="OpenEmbedded recipe tool",
+ epilog="Use %(prog)s <command> --help to get help on a specific command")
+ parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
+ parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
+ parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto')
+ subparsers = parser.add_subparsers()
+
+ scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'recipetool'))
+ registered = False
+ for plugin in plugins:
+ if hasattr(plugin, 'register_command'):
+ registered = True
+ plugin.register_command(subparsers)
+
+ if not registered:
+ logger.error("No commands registered - missing plugins?")
+ sys.exit(1)
+
+ args = parser.parse_args()
+
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+ elif args.quiet:
+ logger.setLevel(logging.ERROR)
+
+ import scriptpath
+ bitbakepath = scriptpath.add_bitbake_lib_path()
+ if not bitbakepath:
+ logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
+ sys.exit(1)
+ logger.debug('Found bitbake path: %s' % bitbakepath)
+
+ scriptutils.logger_setup_color(logger, args.color)
+
+ tinfoil_init()
+
+ ret = args.func(args)
+
+ return ret
+
+
+if __name__ == "__main__":
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc(5)
+ sys.exit(ret)
diff --git a/scripts/runqemu b/scripts/runqemu
index ff64a1d4c2..da35bb80d2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -108,7 +108,7 @@ process_filename() {
while true; do
arg=${1}
case "$arg" in
- "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
+ "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \
"qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq")
[ -z "$MACHINE" ] && MACHINE=$arg || \
error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -301,6 +301,9 @@ QEMUX86_64_DEFAULT_FSTYPE=ext3
QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
QEMUARM_DEFAULT_FSTYPE=ext3
+QEMUARM64_DEFAULT_KERNEL=Image-qemuarm64.bin
+QEMUARM64_DEFAULT_FSTYPE=ext3
+
QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
QEMUMIPS_DEFAULT_FSTYPE=ext3
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 38745dd126..a0a1e96eb4 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -50,6 +50,9 @@ else
"qemuarm")
mem_size=128
;;
+ "qemuarm64")
+ mem_size=512
+ ;;
"qemumicroblaze")
mem_size=64
;;
@@ -135,7 +138,11 @@ else
return 1
fi
- touch $lockfile.lock
+ touch $lockfile.lock 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Acquiring lockfile for $lockfile.lock failed"
+ return 1
+ fi
exec 8>$lockfile.lock
flock -n -x 8
if [ $? -ne 0 ]; then
@@ -260,8 +267,17 @@ else
DROOT="/dev/hda"
ROOTFS_OPTIONS="-hda $ROOTFS"
fi
+ if [ "$MACHINE" = "qemuarm64" ]; then
+ QEMU_NETWORK_CMD="-netdev tap,id=net0,ifname=$TAP,script=no,downscript=no -device virtio-net-device,netdev=net0 "
+ DROOT="/dev/vda"
+ ROOTFS_OPTIONS="-drive id=disk0,file=$ROOTFS -device virtio-blk-device,drive=disk0"
+ fi
+
KERNCMDLINE="mem=$QEMU_MEMORY"
QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
+ if [ $MACHINE = 'qemuarm64' ]; then
+ QEMU_UI_OPTIONS="-nographic"
+ fi
NFS_INSTANCE=`echo $TAP | sed 's/tap//'`
export NFS_INSTANCE
@@ -274,6 +290,7 @@ fi
case "$MACHINE" in
"qemuarm") ;;
+ "qemuarm64") ;;
"qemumicroblaze") ;;
"qemumips") ;;
"qemumipsel") ;;
@@ -362,6 +379,19 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
fi
fi
+if [ "$MACHINE" = "qemuarm64" ]; then
+ QEMU=qemu-system-aarch64
+
+ export QEMU_AUDIO_DRV="none"
+ QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ KERNCMDLINE="root=/dev/vda rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD"
+ # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now
+ QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
+ fi
+fi
+
+
if [ "$MACHINE" = "qemux86" ]; then
QEMU=qemu-system-i386
if [ "$KVM_ACTIVE" = "yes" ]; then
diff --git a/scripts/send-error-report b/scripts/send-error-report
index 48d983bc0e..01c292ead1 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -20,7 +20,7 @@ def handle_connection(server, data):
# we need to check that the server isn't a local one, as in no_proxy
try:
temp = httplib.HTTPConnection(server, strict=True, timeout=5)
- temp.request("GET", "/")
+ temp.request("GET", "/Errors/")
tempres = temp.getresponse()
if tempres.status == 200:
proxyrequired = False
@@ -62,6 +62,7 @@ def sendData(json_file, server):
g.write(email + "\n")
else:
print("Invalid inputs, try again.")
+ sys.exit(1)
return
with open(json_file) as f:
@@ -74,6 +75,7 @@ def sendData(json_file, server):
data = json.dumps(jsondata, indent=4, sort_keys=True)
except:
print("Invalid json data")
+ sys.exit(1)
return
try:
@@ -87,12 +89,14 @@ def sendData(json_file, server):
print("There was a problem submiting your data, response written in %s.response.html" % json_file)
with open("%s.response.html" % json_file, "w") as f:
f.write(res)
+ sys.exit(1)
conn.close()
except Exception as e:
print("Server connection failed: %s" % e)
-
+ sys.exit(1)
else:
print("No data file found.")
+ sys.exit(1)
if __name__ == '__main__':
diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh
index ca2316cdcc..f62485eaaa 100755
--- a/scripts/sstate-sysroot-cruft.sh
+++ b/scripts/sstate-sysroot-cruft.sh
@@ -17,6 +17,15 @@ Options:
--tmpdir=<tmpdir>
Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
Something like /OE/oe-core/tmp-eglibc (no / at the end).
+
+ --whitelist=<whitelist-file>
+ Text file, each line is regular expression for paths we want to ignore in resulting diff.
+ You can use diff file from the script output, if it contains only expected exceptions.
+ '#' is used as regexp delimiter, so you don't need to prefix forward slashes in paths.
+ ^ and $ is automatically added, so provide only the middle part.
+ Lines starting with '#' are ignored as comments.
+ All paths are relative to "sysroots" directory.
+ Directories don't end with forward slash.
EOF
}
@@ -33,6 +42,11 @@ while [ -n "$1" ]; do
[ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
shift
;;
+ --whitelist=*)
+ fwhitelist=`echo $1 | sed -e 's#^--whitelist=##' | xargs readlink -e`
+ [ -f "$fwhitelist" ] || echo_error "Invalid argument to --whitelist"
+ shift
+ ;;
--help|-h)
usage
exit 0
@@ -51,28 +65,88 @@ done
[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
OUTPUT=${tmpdir}/sysroot.cruft.`date "+%s"`
-WHITELIST="\/var\/pseudo\($\|\/[^\/]*$\) \/shlibs$ \.pyc$ \.pyo$"
+
+# top level directories
+WHITELIST="[^/]*"
+
+# generated by base-passwd recipe
+WHITELIST="${WHITELIST} \
+ .*/etc/group-\? \
+ .*/etc/passwd-\? \
+"
+# generated by pseudo-native
+WHITELIST="${WHITELIST} \
+ .*/var/pseudo \
+ .*/var/pseudo/[^/]* \
+"
+
+# generated by package.bbclass:SHLIBSDIRS = "${PKGDATA_DIR}/${MLPREFIX}shlibs"
+WHITELIST="${WHITELIST} \
+ .*/shlibs \
+ .*/pkgdata \
+"
+
+# generated by python
+WHITELIST="${WHITELIST} \
+ .*\.pyc \
+ .*\.pyo \
+"
+
+# generated by sgml-common-native
+WHITELIST="${WHITELIST} \
+ .*/etc/sgml/sgml-docbook.bak \
+"
+
+# generated by toolchain
+WHITELIST="${WHITELIST} \
+ [^/]*-tcbootstrap/lib \
+"
+
+# generated by useradd.bbclass
+WHITELIST="${WHITELIST} \
+ [^/]*/home \
+ [^/]*/home/xuser \
+"
+
+SYSROOTS="`readlink -f ${tmpdir}`/sysroots/"
mkdir ${OUTPUT}
-find ${tmpdir}/sstate-control -name \*.populate-sysroot\* -o -name \*.package\* | xargs cat | grep sysroots | \
+find ${tmpdir}/sstate-control -name \*.populate-sysroot\* -o -name \*.populate_sysroot\* -o -name \*.package\* | xargs cat | grep sysroots | \
sed 's#/$##g; s#///*#/#g' | \
# work around for paths ending with / for directories and multiplied // (e.g. paths to native sysroot)
- sort > ${OUTPUT}/master.list.all
-sort -u ${OUTPUT}/master.list.all > ${OUTPUT}/master.list # -u because some directories are listed for more recipes
+ sort | sed "s#^${SYSROOTS}##g" > ${OUTPUT}/master.list.all.txt
+sort -u ${OUTPUT}/master.list.all.txt > ${OUTPUT}/master.list.txt # -u because some directories are listed for more recipes
find ${tmpdir}/sysroots/ | \
- sort > ${OUTPUT}/sysroot.list
+ sort | sed "s#^${SYSROOTS}##g" > ${OUTPUT}/sysroot.list.txt
-diff ${OUTPUT}/master.list.all ${OUTPUT}/master.list > ${OUTPUT}/duplicates
-diff ${OUTPUT}/master.list ${OUTPUT}/sysroot.list > ${OUTPUT}/diff.all
+diff ${OUTPUT}/master.list.all.txt ${OUTPUT}/master.list.txt > ${OUTPUT}/duplicates.txt
+diff ${OUTPUT}/master.list.txt ${OUTPUT}/sysroot.list.txt > ${OUTPUT}/diff.all.txt
-cp ${OUTPUT}/diff.all ${OUTPUT}/diff
+grep "^> ." ${OUTPUT}/diff.all.txt | sed 's/^> //g' > ${OUTPUT}/diff.txt
for item in ${WHITELIST}; do
- sed -i "/${item}/d" ${OUTPUT}/diff;
+ sed -i "\\#^${item}\$#d" ${OUTPUT}/diff.txt;
+ echo "${item}" >> ${OUTPUT}/used.whitelist.txt
done
+if [ -s "$fwhitelist" ] ; then
+ cat $fwhitelist >> ${OUTPUT}/used.whitelist.txt
+ cat $fwhitelist | grep -v '^#' | while read item; do
+ sed -i "\\#^${item}\$#d" ${OUTPUT}/diff.txt;
+ done
+fi
# too many false positives for directories
# echo "Following files are installed in sysroot at least twice"
# cat ${OUTPUT}/duplicates
-echo "Following files are installed in sysroot, but not tracked by sstate"
-cat ${OUTPUT}/diff
+RESULT=`cat ${OUTPUT}/diff.txt | wc -l`
+
+if [ "${RESULT}" != "0" ] ; then
+ echo "ERROR: ${RESULT} issues were found."
+ echo "ERROR: Following files are installed in sysroot, but not tracked by sstate:"
+ cat ${OUTPUT}/diff.txt
+else
+ echo "INFO: All files are tracked by sstate or were explicitly ignored by this script"
+fi
+
+echo "INFO: Output written in: ${OUTPUT}"
+exit ${RESULT}
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh
index 6ebfd3e4d6..2bcc2ca4f6 100755
--- a/scripts/test-dependencies.sh
+++ b/scripts/test-dependencies.sh
@@ -209,7 +209,7 @@ compare_deps() {
# OUTPUT_MIN=${OUTPUT_BASE}/3_min \
# openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c
echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" ====="
- [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}
+ [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp
mkdir -p ${OUTPUTC}
OUTPUT_FILE=${OUTPUTC}/dependency-changes
echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages"
@@ -223,9 +223,11 @@ compare_deps() {
find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do
max_pkg=${OUTPUT_MAX}/${pkg}
min_pkg=${OUTPUT_MIN}/${pkg}
- recipe=`echo "${pkg}" | sed 's#/.*##g'`
+ # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest
+ recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'`
+ package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'`
if [ ! -f "${min_pkg}" ] ; then
- echo "ERROR: ${min_pkg} doesn't exist" | tee -a ${OUTPUT_FILE}
+ echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE}
echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
continue
fi
@@ -238,15 +240,17 @@ compare_deps() {
fi
if [ "${max_deps}" = "${min_deps}" ] ; then
# it's annoying long, but at least it's showing some progress, warnings are grepped at the end
- echo "NOTE: ${pkg} dependencies weren't changed" >> ${OUTPUT_FILE}
+ echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE}
else
missing_deps=
for dep in ${max_deps}; do
- echo "${min_deps}" | grep -q " ${dep} " || missing_deps="${missing_deps} ${dep}"
+ if ! echo "${min_deps}" | grep -q " ${dep} " ; then
+ missing_deps="${missing_deps} ${dep}"
+ echo # to get rid of dots on last line
+ echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
+ fi
done
if [ -n "${missing_deps}" ] ; then
- echo # to get rid of dots on last line
- echo "WARN: ${pkg} lost dependency on ${missing_deps}" | tee -a ${OUTPUT_FILE}
echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
fi
fi
@@ -272,7 +276,7 @@ for TYPE in $buildtype; do
esac
done
-cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u > ${OUTPUT_BASE}/failed-recipes.log
+cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log
if [ "${RESULT}" != "0" ] ; then
echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`"
diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index 7d02a84806..f3a44ebe51 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -32,8 +32,15 @@ import logging
import shutil
from abc import ABCMeta, abstractmethod
+# Add path to scripts/lib in sys.path;
+scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+
+import scriptpath
+
# Add meta/lib to sys.path
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'meta/lib')))
+scriptpath.add_oe_lib_path()
import oeqa.utils.ftools as ftools
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
@@ -43,7 +50,10 @@ for path in get_bb_var('BBPATH').split(":"):
sys.path.insert(0, os.path.abspath(os.path.join(path, 'lib')))
# In order to import modules that contain target controllers, we need the bitbake libraries in sys.path .
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'bitbake/lib')))
+bitbakepath = scriptpath.add_bitbake_lib_path()
+if not bitbakepath:
+ sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
+ sys.exit(1)
# create a logger
def logger_create():
@@ -78,6 +88,7 @@ def get_args_parser():
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.')
parser.add_argument('--targetprofile', required=False, action="store", nargs=1, dest="targetprofile", default='AutoTargetProfile', help='The target profile to be used.')
parser.add_argument('--repoprofile', required=False, action="store", nargs=1, dest="repoprofile", default='PublicAB', help='The repo profile to be used.')
+ 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.')
return parser
class BaseTargetProfile(object):
@@ -248,13 +259,14 @@ class PublicAB(BaseRepoProfile):
class HwAuto():
- def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile):
+ def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile, skip_download):
log.info('Initializing..')
self.image_types = image_types
self.repolink = repolink
self.required_packages = required_packages
self.targetprofile = targetprofile
self.repoprofile = repoprofile
+ self.skip_download = skip_download
self.repo = self.get_repo_profile(self.repolink)
# Get the repository profile; for now we only look inside this module.
@@ -304,15 +316,18 @@ class HwAuto():
# For each image type, download the needed files and run the tests.
noissuesfound = True
for image_type in self.image_types:
- target = self.get_target_profile(image_type)
- files_dict = target.get_files_dict()
- log.info("Downloading files for %s" % image_type)
- for f in files_dict:
- if self.repo.check_old_file(files_dict[f]):
- filepath = os.path.join(self.repo.localdir, files_dict[f])
- if os.path.exists(filepath):
- os.remove(filepath)
- self.repo.fetch(files_dict[f])
+ if self.skip_download:
+ log.info("Skipping downloading the images..")
+ else:
+ target = self.get_target_profile(image_type)
+ files_dict = target.get_files_dict()
+ log.info("Downloading files for %s" % image_type)
+ for f in files_dict:
+ if self.repo.check_old_file(files_dict[f]):
+ filepath = os.path.join(self.repo.localdir, files_dict[f])
+ if os.path.exists(filepath):
+ os.remove(filepath)
+ self.repo.fetch(files_dict[f])
result = self.runTestimageBuild(image_type)
if result.status != 0:
@@ -331,7 +346,7 @@ def main():
parser = get_args_parser()
args = parser.parse_args()
- hwauto = HwAuto(image_types=args.image_types, repolink=args.repo_link, required_packages=args.required_packages, targetprofile=args.targetprofile, repoprofile=args.repoprofile)
+ 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)
hwauto.run()
diff --git a/scripts/wic b/scripts/wic
index 2d3fd09d71..e7df60f28e 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -131,11 +131,11 @@ def wic_create_subcommand(args, usage_str):
sys.exit(1)
set_bitbake_env_lines(bitbake_env_lines)
- bootimg_dir = staging_data_dir = hdddir = ""
+ bootimg_dir = ""
if options.image_name:
- (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot) = \
- find_artifacts(options.image_name)
+ (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot) \
+ = find_artifacts(options.image_name)
wks_file = args[0]
@@ -172,8 +172,6 @@ def wic_create_subcommand(args, usage_str):
not_found = not_found_dir = ""
if not os.path.isdir(rootfs_dir):
(not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
- elif not os.path.isdir(hdddir) and not os.path.isdir(staging_data_dir):
- (not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
elif not os.path.isdir(kernel_dir):
(not_found, not_found_dir) = ("kernel-dir", kernel_dir)
elif not os.path.isdir(native_sysroot):
@@ -197,8 +195,8 @@ def wic_create_subcommand(args, usage_str):
rootfs_dir = rootfs_dir_to_args(krootfs_dir)
wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, hdddir, staging_data_dir, scripts_path,
- image_output_dir, options.debug, options.properties_file)
+ native_sysroot, scripts_path, image_output_dir,
+ options.debug, options.properties_file)
def wic_list_subcommand(args, usage_str):
@@ -226,13 +224,35 @@ def wic_list_subcommand(args, usage_str):
sys.exit(1)
+def wic_help_topic_subcommand(args, usage_str):
+ """
+ Command-line handling for help-only 'subcommands'. This is
+ essentially a dummy command that doesn nothing but allow users to
+ use the existing subcommand infrastructure to display help on a
+ particular topic not attached to any particular subcommand.
+ """
+ pass
+
+
+wic_help_topic_usage = """
+"""
+
subcommands = {
- "create": [wic_create_subcommand,
- wic_create_usage,
- wic_create_help],
- "list": [wic_list_subcommand,
- wic_list_usage,
- wic_list_help],
+ "create": [wic_create_subcommand,
+ wic_create_usage,
+ wic_create_help],
+ "list": [wic_list_subcommand,
+ wic_list_usage,
+ wic_list_help],
+ "plugins": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_plugins_help],
+ "overview": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_overview_help],
+ "kickstart": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_kickstart_help],
}